import { FormProps, FormSchema } from '/@/components/Form'; import { BasicColumn } from '/@/components/Table'; export const formConfig = { useCustomConfig: false, }; export const searchFormSchema: FormSchema[] = [ { field: 'fullName', label: '名称', component: 'Input', }, { field: 'valid', label: '有效标志', component: 'XjrSelect', componentProps: { datasourceType: 'dic', params: { itemId: '1978057078528327681' }, labelField: 'name', valueField: 'value', getPopupContainer: () => document.body, }, }, // { // field: 'code', // label: '编码', // component: 'Input', // }, // { // field: 'rate', // label: '税率%', // component: 'InputNumber', // componentProps: { // style: { width: '100%' }, // }, // }, // { // field: 'sort', // label: '显示顺序', // component: 'InputNumber', // componentProps: { // style: { width: '100%' }, // }, // }, // { // field: 'note', // label: '备注', // component: 'Input', // }, ]; export const columns: BasicColumn[] = [ { dataIndex: 'code', title: '编码', componentType: 'input', align: 'left', sorter: true, }, { dataIndex: 'fullName', title: '名称', componentType: 'input', align: 'left', sorter: true, }, { dataIndex: 'rate', title: '税率%', componentType: 'number', align: 'left', sorter: true, }, { dataIndex: 'valid', title: '有效标志', componentType: 'select', align: 'left', sorter: true, }, { dataIndex: 'note', title: '备注', componentType: 'textarea', align: 'left', sorter: true, }, { dataIndex: 'sort', title: '显示顺序', componentType: 'number', align: 'left', sorter: true, }, ]; //表单事件 export const formEventConfigs = { 0: [ { type: 'circle', color: '#2774ff', text: '开始节点', icon: '#icon-kaishi', bgcColor: '#D8E5FF', isUserDefined: false, }, { color: '#F6AB01', icon: '#icon-chushihua', text: '初始化表单', bgcColor: '#f9f5ea', isUserDefined: false, nodeInfo: { processEvent: [] }, }, ], 1: [ { color: '#B36EDB', icon: '#icon-shujufenxi', text: '获取表单数据', detail: '(新增无此操作)', bgcColor: '#F8F2FC', isUserDefined: false, nodeInfo: { processEvent: [] }, }, ], 2: [ { color: '#F8625C', icon: '#icon-jiazai', text: '加载表单', bgcColor: '#FFF1F1', isUserDefined: false, nodeInfo: { processEvent: [] }, }, ], 3: [ { color: '#6C6AE0', icon: '#icon-jsontijiao', text: '提交表单', bgcColor: '#F5F4FF', isUserDefined: false, nodeInfo: { processEvent: [] }, }, ], 4: [ { type: 'circle', color: '#F8625C', text: '结束节点', icon: '#icon-jieshuzhiliao', bgcColor: '#FFD6D6', isLast: true, isUserDefined: false, }, ], }; export const formProps: FormProps = { labelCol: { span: 3, offset: 0 }, labelAlign: 'right', layout: 'horizontal', size: 'default', schemas: [ { key: 'b2105593666543e59343233516072d74', field: 'code', label: '编码', type: 'input', component: 'Input', colProps: { span: 8 }, defaultValue: '', componentProps: { width: '100%', span: '', defaultValue: '', labelWidthMode: 'fix', labelFixWidth: 120, responsive: false, respNewRow: false, placeholder: '请输入编码', maxlength: null, prefix: '', suffix: '', addonBefore: '', addonAfter: '', disabled: false, allowClear: false, showLabel: true, required: true, rules: [], events: {}, isSave: false, isShow: true, scan: false, style: { width: '100%' }, }, }, { key: 'efd10fd6b52540008513c3fb2254b63e', field: 'fullName', label: '名称', type: 'input', component: 'Input', colProps: { span: 8 }, defaultValue: '', componentProps: { width: '100%', span: '', defaultValue: '', labelWidthMode: 'fix', labelFixWidth: 120, responsive: false, respNewRow: false, placeholder: '请输入名称', maxlength: null, prefix: '', suffix: '', addonBefore: '', addonAfter: '', disabled: false, allowClear: false, showLabel: true, required: true, rules: [], events: {}, isSave: false, isShow: true, scan: false, style: { width: '100%' }, }, }, { key: 'f04173ecb4754e2fb8ee2a92aa31b281', field: 'rate', label: '税率%', type: 'number', component: 'InputNumber', colProps: { span: 8 }, defaultValue: null, componentProps: { labelWidthMode: 'fix', labelFixWidth: 120, responsive: false, width: '100%', span: '', defaultValue: null, min: null, max: null, step: null, maxlength: null, disabled: false, showLabel: true, controls: true, required: true, subTotal: false, isShow: true, rules: [], events: {}, style: { width: '100%' }, }, }, { key: '316d13cfd22e4b88ae245258fe68d5e2', field: 'sort', label: '显示顺序', type: 'number', component: 'InputNumber', colProps: { span: 8 }, defaultValue: null, componentProps: { labelWidthMode: 'fix', labelFixWidth: 120, responsive: false, width: '100%', span: '', defaultValue: null, min: 0, max: null, step: 1, maxlength: null, disabled: false, showLabel: true, controls: true, required: false, subTotal: false, isShow: true, rules: [], events: {}, style: { width: '100%' }, }, }, { key: '8c420f9cd77c43cea65f5c39e870087d', field: 'valid', label: '有效标志', type: 'select', component: 'XjrSelect', colProps: { span: 8 }, componentProps: { width: '100%', span: '', labelWidthMode: 'fix', labelFixWidth: 120, responsive: false, respNewRow: false, placeholder: '请选择下拉选择', sepTextField: '', showLabel: true, showSearch: false, clearable: false, disabled: true, mode: '', staticOptions: [ { key: 1, label: 'Option 1', value: 'Option 1' }, { key: 2, label: 'Option 2', value: 'Option 2' }, { key: 3, label: 'Option 3', value: 'Option 3' }, ], defaultSelect: 'Y', datasourceType: 'dic', params: { itemId: '1978057078528327681' }, labelField: 'name', valueField: 'value', apiConfig: { path: 'CodeGeneration/selection', method: 'GET', apiId: '93d735dcb7364a0f8102188ec4d77ac7', }, dicOptions: [], required: false, rules: [], events: {}, isShow: true, itemId: '1978057078528327681', style: { width: '100%' }, }, }, { key: 'f33b25f88b5e4dd4bfdfdae72c650443', field: 'note', label: '备注', type: 'textarea', component: 'InputTextArea', colProps: { span: 24 }, defaultValue: '', componentProps: { width: '100%', span: '', defaultValue: '', labelWidthMode: 'fix', labelFixWidth: 120, responsive: false, respNewRow: true, placeholder: '请输入备注', maxlength: null, rows: 4, autoSize: false, showCount: false, disabled: false, showLabel: true, allowClear: false, required: false, isShow: true, rules: [], events: {}, style: { width: '100%' }, }, }, ], showActionButtonGroup: false, buttonLocation: 'center', actionColOptions: { span: 24 }, showResetButton: false, showSubmitButton: false, hiddenComponent: [], };