api.ts 1.2 KB

123456789101112131415161718192021222324252627282930313233
  1. import { SEX } from '../api.ts'
  2. export const MOD = 'contacts'
  3. export const URL = '/contacts'
  4. export const GETSYSFILED = "/sys-dict/getListByCode";
  5. export const GETPERSONNEL = "/user/getSimpleActiveUserList";
  6. export const GETGENERATEFOEM = `sys-form/getListByCode/${MOD}`
  7. export const URL_PAGECONTACTS = `${URL}/pageContacts`
  8. export const actionButtons: any[] = [
  9. { text: '新建' },
  10. { text: '批量删除' },
  11. { text: '导入' },
  12. { text: '导出' },
  13. ]
  14. export const tableColumns: TableColumn[] = [
  15. { prop: 'name', label: '联系人', event: 'toDetali', width: '150' },
  16. { prop: 'customName', label: '客户名称', width: '150' },
  17. { prop: 'phone', label: '电话号码', width: '200' },
  18. { prop: 'email', label: '邮箱', width: '200' },
  19. { prop: 'position', label: '职务', width: '100' },
  20. { prop: 'sex', label: '性别', width: '100', event: 'getSex' },
  21. { prop: 'ownerName', label: '负责人', width: '100' },
  22. { prop: 'creatorName', label: '创建人', width: '100' },
  23. { prop: 'createTime', label: '创建时间', width: '200' },
  24. ]
  25. export const getSex = (val: number) => {
  26. let sexItem = SEX.filter((item: sexTYpe) => item.value == val)
  27. return sexItem.length > 0 ? sexItem[0].label : ''
  28. }