394 lines
9.1 KiB
TypeScript
394 lines
9.1 KiB
TypeScript
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',
|
|
|
|
sorter: true,
|
|
},
|
|
|
|
{
|
|
dataIndex: 'fullName',
|
|
title: '名称',
|
|
componentType: 'input',
|
|
align: 'left',
|
|
|
|
sorter: true,
|
|
},
|
|
|
|
{
|
|
dataIndex: 'freightSign',
|
|
title: '是否承担运费',
|
|
componentType: 'select',
|
|
align: 'left',
|
|
|
|
sorter: true,
|
|
},
|
|
|
|
{
|
|
dataIndex: 'insuranceSign',
|
|
title: '是否承担保险',
|
|
componentType: 'select',
|
|
align: 'left',
|
|
|
|
sorter: true,
|
|
},
|
|
|
|
{
|
|
dataIndex: 'valid',
|
|
title: '有效标志',
|
|
componentType: 'select',
|
|
align: 'left',
|
|
|
|
sorter: true,
|
|
},
|
|
|
|
{
|
|
dataIndex: 'note',
|
|
title: '备注',
|
|
componentType: 'textarea',
|
|
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: 'e5b395b24d214214a16951d8df4e2004',
|
|
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: '请输入编码',
|
|
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: '86536f9d2e8c473b8821c9216c765c9c',
|
|
field: 'fullName',
|
|
label: '名称',
|
|
type: 'input',
|
|
component: 'Input',
|
|
colProps: { span: 24 },
|
|
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: '38c7f7488fe24254a1a939fa9b445657',
|
|
field: 'freightSign',
|
|
label: '是否承担运费',
|
|
type: 'select',
|
|
component: 'XjrSelect',
|
|
colProps: { span: 24 },
|
|
componentProps: {
|
|
width: '100%',
|
|
span: '',
|
|
labelWidthMode: 'fix',
|
|
labelFixWidth: 120,
|
|
responsive: false,
|
|
respNewRow: false,
|
|
placeholder: '请选择是否承担运费',
|
|
sepTextField: '',
|
|
showLabel: true,
|
|
showSearch: false,
|
|
clearable: false,
|
|
disabled: false,
|
|
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: null,
|
|
datasourceType: 'dic',
|
|
params: { itemId: '1978056598125330433' },
|
|
labelField: 'name',
|
|
valueField: 'value',
|
|
apiConfig: {
|
|
path: 'CodeGeneration/selection',
|
|
method: 'GET',
|
|
apiId: '93d735dcb7364a0f8102188ec4d77ac7',
|
|
},
|
|
dicOptions: [],
|
|
required: true,
|
|
rules: [],
|
|
events: {},
|
|
isShow: true,
|
|
itemId: '1978056598125330433',
|
|
style: { width: '100%' },
|
|
},
|
|
},
|
|
{
|
|
key: '10bfa57236b74a5f9a680e9bc5861d55',
|
|
field: 'insuranceSign',
|
|
label: '是否承担保险',
|
|
type: 'select',
|
|
component: 'XjrSelect',
|
|
colProps: { span: 24 },
|
|
componentProps: {
|
|
width: '100%',
|
|
span: '',
|
|
labelWidthMode: 'fix',
|
|
labelFixWidth: 120,
|
|
responsive: false,
|
|
respNewRow: false,
|
|
placeholder: '请选择是否承担保险',
|
|
sepTextField: '',
|
|
showLabel: true,
|
|
showSearch: false,
|
|
clearable: false,
|
|
disabled: false,
|
|
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: null,
|
|
datasourceType: 'dic',
|
|
params: { itemId: '1978056598125330433' },
|
|
labelField: 'name',
|
|
valueField: 'value',
|
|
apiConfig: {
|
|
path: 'CodeGeneration/selection',
|
|
method: 'GET',
|
|
apiId: '93d735dcb7364a0f8102188ec4d77ac7',
|
|
},
|
|
dicOptions: [],
|
|
required: true,
|
|
rules: [],
|
|
events: {},
|
|
isShow: true,
|
|
itemId: '1978056598125330433',
|
|
style: { width: '100%' },
|
|
},
|
|
},
|
|
{
|
|
key: 'd1feff0a3b454fa4a29c53355ab6c9cd',
|
|
field: 'valid',
|
|
label: '有效标志',
|
|
type: 'select',
|
|
component: 'XjrSelect',
|
|
colProps: { span: 24 },
|
|
componentProps: {
|
|
width: '100%',
|
|
span: '',
|
|
labelWidthMode: 'fix',
|
|
labelFixWidth: 120,
|
|
responsive: false,
|
|
respNewRow: false,
|
|
placeholder: '请选择有效标志',
|
|
sepTextField: '',
|
|
showLabel: true,
|
|
showSearch: false,
|
|
clearable: false,
|
|
disabled: true,
|
|
mode: 'multiple',
|
|
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: null,
|
|
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: '297be674c3e84930a81ec6d92600e896',
|
|
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: 400,
|
|
rows: 4,
|
|
autoSize: false,
|
|
showCount: true,
|
|
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: [],
|
|
}; |