DetailDialog.js 656 Bytes
import FormDialog from '@/components/DetailDialog'
import consumerApi from '@/api/consumer'

const schema = [
  {
    key: 'userId',
    label: '客户ID'
  },
  {
    key: 'realName',
    label: '客户名称'
  },
  {
    key: 'userName',
    label: '登录账号'
  },
  {
    key: 'remark',
    label: '备注'
  }
]

export default {
  async show(row) {
    const list = [
      {
        name: '客户信息',
        startIndex: 0,
        endIndex: 5
      }
    ]
    FormDialog({
      title: '客户详情',
      schema,
      list,
      fetchData: async () => {
        return (await consumerApi.detail(row.userid)).data
      }
    })
  }
}