import { SEX } from '../api.ts' export const MOD = 'contacts' export const URL = '/contacts' export const IMPORTMOD = 'Contacts' export const GETSYSFILED = "/sys-dict/getListByCode"; export const GETPERSONNEL = "/user/getSimpleActiveUserList"; export const GETGENERATEFOEM = `sys-form/getListByCode/${MOD}` export const URL_PAGECONTACTS = `${URL}/pageContacts` export const URL_ADD = `${URL}/addContacts` export const URL_UPLOAD = `${URL}/updateContacts` export const URL_DETELERECYCLE = `${URL}/deleteContacts` export const URL_BATCHDETELE = `${URL}/confirmDeleteContacts` export const URL_RECYCLELIST = `${URL}/getDeletedContacts` export const URL_DETELEITEM = `${URL}/confirmDeleteContacts` export const URL_RESTORE = `${URL}/returnContacts` export const URL_GETALL = `${URL}/getAllContacts` export const URL_GETDETAIL = `${URL}/getContactsDetail` export const URL_TRANSFERCONTACTS = `${URL}/transferContacts` export const URL_IMPORTDATACONTACTS = `${URL}/importData` export const URL_EXPORTDATACONTACTS = `${URL}/exportData` export const actionButtons: any[] = [ { text: '新建联系人' }, { text: '批量删除' }, { text: '导入' }, { text: '导出' }, ] export const tableColumns: TableColumn[] = [ { prop: 'name', label: '联系人姓名', event: 'toDetali', width: '150' }, { prop: 'customName', label: '客户名称', width: '150' }, { prop: 'phone', label: '电话号码', width: '200' }, { prop: 'email', label: '邮箱', width: '200' }, { prop: 'position', label: '职务', width: '100' }, { prop: 'sex', label: '性别', width: '100', event: 'getSex' }, { prop: 'ownerName', label: '负责人', width: '100' }, { prop: 'creatorName', label: '创建人', width: '100' }, { prop: 'createTime', label: '创建时间', width: '200' }, ] export const getSex = (val: number) => { let sexItem = SEX.filter((item: sexTYpe) => item.value == val) return sexItem.length > 0 ? sexItem[0].label : '' }