table-config.js 1.73 KB
/*
 * @Author: yangming yangming@didihu.com.cn
 * @Date: 2023-12-22 19:29:52
 * @LastEditors: yangming yangming@didihu.com.cn
 * @LastEditTime: 2024-01-08 09:20:15
 * @FilePath: \scrm-micro-peregrination\src\views\journeyConfig\config\table-config.js
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
const tableConfig = {
  data() {
    return {
      getListApi: this.$apis.journeyConfig.getListApi,
      pageConf: { pageSize: 'pageSize', pageNum: 'pageNumber', totalCount: 'total' },
      tableParams: {
        listName: 'list',
        tableOption: true,
        tableColumns: [
          {
            label: '模板ID',
            prop: 'instId'
          },
          {
            label: '旅程模板名称',
            prop: 'instName'
          },
          {
            label: '旅程阶段',
            prop: 'instRemark',
            addHtml: 'instRemark',
            width: 320
          },
          {
            label: '门店名称',
            prop: 'sopTplGrant',
            formatter: cellValue => {
              return cellValue.sopTplGrant && cellValue.sopTplGrant.groupName
            }
          },
          {
            label: '创建时间',
            prop: 'createTime'
          },
          {
            label: '修改时间',
            prop: 'updateTime'
          }
        ]
      },
      tableButtonList: [
        {
          type: 'el-button',
          name: '模板实例详情',
          attrs: {
            type: 'text'
          },
          listeners: {
            click: row => this.gotoDetails(row.instId)
          }
        }
      ]
    }
  }
}

export default tableConfig