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 } } ]; export const columns: BasicColumn[] = [ { dataIndex: 'code', title: '编码', componentType: 'input', align: 'left', width: 100, sorter: true }, { dataIndex: 'fullName', title: '名称', componentType: 'input', align: 'left', sorter: true }, { dataIndex: 'regionCode', title: '卸货区域', componentType: 'select', align: 'left', sorter: true }, { dataIndex: 'addr', title: '详细地址', componentType: 'textarea', align: 'left', sorter: true }, { dataIndex: 'valid', title: '有效标志', componentType: 'select', align: 'left', width: 80, 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: '400f153c279440de9db30086cdf282e9', field: 'code', label: '编码', type: 'input', component: 'Input', colProps: { span: 24 }, defaultValue: '', componentProps: { width: '100%', span: '', defaultValue: '', labelWidthMode: 'fix', labelFixWidth: 120, responsive: false, respNewRow: false, placeholder: '请输入编码', prefix: '', suffix: '', addonBefore: '', addonAfter: '', disabled: true, allowClear: false, showLabel: true, required: false, rules: [], events: {}, isSave: false, isShow: true, scan: false, style: { width: '100%' } } }, { key: 'e4ae9d4f09fe4781926728bf71bdbebf', field: 'fullName', label: '名称', type: 'input', component: 'Input', colProps: { span: 16 }, defaultValue: '', componentProps: { width: '100%', span: '', defaultValue: '', labelWidthMode: 'fix', labelFixWidth: 120, responsive: false, respNewRow: false, placeholder: '请输入名称', prefix: '', suffix: '', addonBefore: '', addonAfter: '', disabled: false, allowClear: false, showLabel: true, required: true, rules: [], events: {}, isSave: false, isShow: true, scan: false, style: { width: '100%' } } }, { key: '25f8a4fdfe0948ea931c1d34748d9b10', field: 'regionCode', label: '卸货区域', type: 'areacascader', component: 'AreaCascader', colProps: { span: 8 }, componentProps: { width: '100%', span: '', labelWidthMode: 'fix', labelFixWidth: 120, responsive: false, respNewRow: false, placeholder: '请选择区域', showLabel: true, disabled: false, allowClear: true, clearable: false, required: true, rules: [], events: {}, isShow: true, style: { width: '100%' }, fieldNames: { label: 'fullName', value: 'code', children: 'children' }, excludeType: 'CONTINENT', startPCode: 'CHN' } }, { key: 'e622bdd456f846048d26dd3238374f92', field: 'addr', label: '详细地址', type: 'textarea', component: 'InputTextArea', colProps: { span: 24 }, defaultValue: '', componentProps: { width: '100%', span: '', defaultValue: '', labelWidthMode: 'fix', labelFixWidth: 120, responsive: false, respNewRow: true, placeholder: '请输入详细地址', rows: 1, autoSize: false, showCount: false, disabled: false, showLabel: true, allowClear: true, required: true, isShow: true, rules: [], events: {}, style: { width: '100%' } } }, { key: 'e3de858c74fe49c08bf876f521d72b7f', field: 'longitude', label: '经度', type: 'number', component: 'InputNumber', colProps: { span: 12 }, defaultValue: null, componentProps: { labelWidthMode: 'fix', labelFixWidth: 120, responsive: false, width: '100%', precision: '6', span: '', defaultValue: null, min: null, max: null, step: 0.000001, disabled: false, showLabel: true, controls: true, required: false, subTotal: false, isShow: true, rules: [], events: {}, style: { width: '100%' } } }, { key: '381dd67f133b4020a7c12f6bbb0df75e', field: 'latitude', label: '纬度', type: 'number', component: 'InputNumber', colProps: { span: 12 }, defaultValue: null, componentProps: { labelWidthMode: 'fix', labelFixWidth: 120, responsive: false, width: '100%', precision: '6', span: '', defaultValue: null, min: null, max: null, step: 0.000001, disabled: false, showLabel: true, controls: true, required: false, subTotal: false, isShow: true, rules: [], events: {}, style: { width: '100%' } } }, { key: 'f5cce49ce1b34d9d92891cc46c469d71', field: 'sort', label: '显示顺序', type: 'number', component: 'InputNumber', colProps: { span: 12 }, componentProps: { labelWidthMode: 'fix', labelFixWidth: 120, responsive: false, width: '100%', span: '', min: 0, step: 1, disabled: false, showLabel: true, controls: true, required: false, subTotal: false, isShow: true, rules: [], events: {}, style: { width: '100%' } } }, { key: '3e092351b52c4fc8b07cc8aae26d0c4e', field: 'valid', label: '有效标志', type: 'select', component: 'XjrSelect', colProps: { span: 12 }, 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: 'a5198907c3c64bcb984ceb5ff97ab57b', 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: '请输入备注', rows: 2, autoSize: false, showCount: false, disabled: false, showLabel: true, allowClear: true, required: false, isShow: true, rules: [], events: {}, style: { width: '100%' } } } ], showActionButtonGroup: false, buttonLocation: 'center', actionColOptions: { span: 24 }, showResetButton: false, showSubmitButton: false, hiddenComponent: [] };