import { BasicColumn, FormSchema } from '/@/components/Table'; export const columns: BasicColumn[] = [ { title: '分类', dataIndex: 'categoryTitle', width: 100 }, { title: '分类码', dataIndex: 'categoryCode', width: 120 }, { title: '调用编码', dataIndex: 'replyCode', width: 180 }, { title: '触发场景', dataIndex: 'triggerScene', width: 220 }, { title: '回复正文', dataIndex: 'replyText', align: 'left' }, { title: '启用', dataIndex: 'enabled', width: 80, customRender: ({ text }) => (text === 1 || text === true ? '是' : '否'), }, { title: '排序', dataIndex: 'sortNo', width: 70 }, ]; export const searchFormSchema: FormSchema[] = [ { field: 'categoryCode', label: '分类', component: 'Select', colProps: { span: 8 }, componentProps: { options: [ { label: '询价中', value: 'inquiring' }, { label: '已报价', value: 'quoted' }, { label: '已成交', value: 'deal' }, { label: '协商中', value: 'negotiating' }, { label: '未成交', value: 'lost' }, { label: '已关闭', value: 'closed' }, { label: '事件异常', value: 'event-ex' }, { label: '系统异常', value: 'sys-ex' }, { label: '转人工', value: 'transfer' }, ], }, }, ]; export const formSchema: FormSchema[] = [ { field: 'id', label: 'id', component: 'Input', show: false }, { field: 'categoryCode', label: '分类码', component: 'Select', required: true, componentProps: { options: [ { label: '询价中 inquiring', value: 'inquiring' }, { label: '已报价 quoted', value: 'quoted' }, { label: '已成交 deal', value: 'deal' }, { label: '协商中 negotiating', value: 'negotiating' }, { label: '未成交 lost', value: 'lost' }, { label: '已关闭 closed', value: 'closed' }, { label: '事件异常 event-ex', value: 'event-ex' }, { label: '系统异常 sys-ex', value: 'sys-ex' }, { label: '转人工 transfer', value: 'transfer' }, ], }, }, { field: 'categoryTitle', label: '分类标题', component: 'Input', required: true }, { field: 'replyCode', label: '调用编码', component: 'Input', componentProps: { placeholder: '如 lost.ask_reason,已有编码不可改' }, }, { field: 'triggerScene', label: '触发场景', component: 'Input', required: true }, { field: 'replyText', label: '回复正文', component: 'InputTextArea', required: true, componentProps: { rows: 4, placeholder: '支持 {{ticket_no}} 等变量' }, }, { field: 'sortNo', label: '排序', component: 'InputNumber', defaultValue: 0 }, { field: 'enabled', label: '启用', component: 'Switch', defaultValue: 1, componentProps: { checkedValue: 1, unCheckedValue: 0 }, }, ];