api.ts 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. import { SEX } from '../api.ts'
  2. export const MOD = 'contacts'
  3. export const URL = '/contacts'
  4. export const IMPORTMOD = 'Contacts'
  5. export const GETSYSFILED = "/sys-dict/getListByCode";
  6. export const GETPERSONNEL = "/user/getSimpleActiveUserList";
  7. export const GETGENERATEFOEM = `sys-form/getListByCode/${MOD}`
  8. export const URL_PAGECONTACTS = `${URL}/pageContacts`
  9. export const URL_ADD = `${URL}/addContacts`
  10. export const URL_UPLOAD = `${URL}/updateContacts`
  11. export const URL_DETELERECYCLE = `${URL}/deleteContacts`
  12. export const URL_BATCHDETELE = `${URL}/confirmDeleteContacts`
  13. export const URL_RECYCLELIST = `${URL}/getDeletedContacts`
  14. export const URL_DETELEITEM = `${URL}/confirmDeleteContacts`
  15. export const URL_RESTORE = `${URL}/returnContacts`
  16. export const URL_GETALL = `${URL}/getAllContacts`
  17. export const URL_GETDETAIL = `${URL}/getContactsDetail`
  18. export const URL_TRANSFERCONTACTS = `${URL}/transferContacts`
  19. export const actionButtons: any[] = [
  20. { text: '新建联系人' },
  21. { text: '批量删除' },
  22. { text: '导入' },
  23. { text: '导出' },
  24. ]
  25. export const tableColumns: TableColumn[] = [
  26. { prop: 'name', label: '联系人', event: 'toDetali', width: '150' },
  27. { prop: 'customName', label: '客户名称', width: '150' },
  28. { prop: 'phone', label: '电话号码', width: '200' },
  29. { prop: 'email', label: '邮箱', width: '200' },
  30. { prop: 'position', label: '职务', width: '100' },
  31. { prop: 'sex', label: '性别', width: '100', event: 'getSex' },
  32. { prop: 'ownerName', label: '负责人', width: '100' },
  33. { prop: 'creatorName', label: '创建人', width: '100' },
  34. { prop: 'createTime', label: '创建时间', width: '200' },
  35. ]
  36. export const getSex = (val: number) => {
  37. let sexItem = SEX.filter((item: sexTYpe) => item.value == val)
  38. return sexItem.length > 0 ? sexItem[0].label : ''
  39. }