import { SEX } from '../api.ts' export const MOD = 'contacts' export const URL = '/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 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 : '' }