|
|
@ -4,7 +4,6 @@ import { dateFormatter } from '@/utils/formatTime' |
|
|
|
// 表单校验
|
|
|
|
export const MonomerRules = reactive({ |
|
|
|
}) |
|
|
|
|
|
|
|
export const Monomer = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
|
{ |
|
|
|
label: '数据类型', |
|
|
@ -575,3 +574,279 @@ export const Monomer = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
|
} |
|
|
|
} |
|
|
|
])) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
export const StaticMonomerRules = reactive({ |
|
|
|
type: [ |
|
|
|
{ required: true, message: '请选择数据类型', trigger: 'change' }, |
|
|
|
], |
|
|
|
version: [ |
|
|
|
{ required: true, message: '请填写版本号', trigger: 'change' }, |
|
|
|
], |
|
|
|
author: [ |
|
|
|
{ required: true, message: '请填写作者', trigger: 'change' }, |
|
|
|
], |
|
|
|
name: [ |
|
|
|
{ required: true, message: '请填写产线名称', trigger: 'change' }, |
|
|
|
], |
|
|
|
plineId: [ |
|
|
|
{ required: true, message: '请填写产线ID', trigger: 'change' }, |
|
|
|
], |
|
|
|
ptype: [ |
|
|
|
{ required: true, message: '请填写产品型号', trigger: 'change' }, |
|
|
|
], |
|
|
|
procImage: [ |
|
|
|
{ required: true, message: '请填写工艺流程图', trigger: 'change' }, |
|
|
|
], |
|
|
|
procRemark: [ |
|
|
|
{ required: true, message: '请填写工艺流程说明', trigger: 'change' }, |
|
|
|
], |
|
|
|
}) |
|
|
|
|
|
|
|
export const StaticMonomer = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
|
{ |
|
|
|
label: '数据类型', |
|
|
|
field: 'type', |
|
|
|
sort: 'custom', |
|
|
|
isSearch: true, |
|
|
|
// form: {
|
|
|
|
// component: 'InputNumber',
|
|
|
|
// value: 0
|
|
|
|
// },
|
|
|
|
dictType: DICT_TYPE.BATTERY_TYPE, |
|
|
|
dictClass: 'string', |
|
|
|
isTable: true, |
|
|
|
form:{ |
|
|
|
value:'static', |
|
|
|
componentProps:{ |
|
|
|
disabled:true |
|
|
|
} |
|
|
|
}, |
|
|
|
tableForm: { |
|
|
|
type: 'Select' |
|
|
|
} |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '版本号', |
|
|
|
field: 'version', |
|
|
|
sort: 'custom', |
|
|
|
isSearch: false, |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '作者', |
|
|
|
field: 'author', |
|
|
|
sort: 'custom', |
|
|
|
isSearch: true, |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '产线名称', |
|
|
|
field: 'name', |
|
|
|
sort: 'custom', |
|
|
|
isSearch: true, |
|
|
|
}, |
|
|
|
|
|
|
|
{ |
|
|
|
label: '产线ID', |
|
|
|
field: 'plineId', |
|
|
|
sort: 'custom', |
|
|
|
isSearch: true, |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '产品型号', |
|
|
|
field: 'ptype', |
|
|
|
sort: 'custom', |
|
|
|
isSearch: true, |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '工艺流程图', |
|
|
|
field: 'procImage', |
|
|
|
sort: 'custom', |
|
|
|
isSearch: false, |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '工艺流程说明', |
|
|
|
field: 'procRemark', |
|
|
|
sort: 'custom', |
|
|
|
isSearch: false, |
|
|
|
}, |
|
|
|
|
|
|
|
{ |
|
|
|
label: '创建时间', |
|
|
|
field: 'createTime', |
|
|
|
sort: 'custom', |
|
|
|
formatter: dateFormatter, |
|
|
|
isSearch: true, |
|
|
|
search: { |
|
|
|
component: 'DatePicker', |
|
|
|
componentProps: { |
|
|
|
valueFormat: 'YYYY-MM-DD HH:mm:ss', |
|
|
|
type: 'datetimerange', |
|
|
|
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] |
|
|
|
} |
|
|
|
}, |
|
|
|
isForm: false, |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '操作', |
|
|
|
field: 'action', |
|
|
|
isForm: false, |
|
|
|
table: { |
|
|
|
width: 150, |
|
|
|
fixed: 'right' |
|
|
|
} |
|
|
|
} |
|
|
|
])) |
|
|
|
export const DynamicMonomerRules = reactive({ |
|
|
|
type: [ |
|
|
|
{ required: true, message: '请选择数据类型', trigger: 'change' }, |
|
|
|
], |
|
|
|
version: [ |
|
|
|
{ required: true, message: '请填写版本号', trigger: 'change' }, |
|
|
|
], |
|
|
|
author: [ |
|
|
|
{ required: true, message: '请填写作者', trigger: 'change' }, |
|
|
|
], |
|
|
|
timeStamp: [ |
|
|
|
{ required: true, message: '请选择数据报送时间', trigger: 'change' }, |
|
|
|
], |
|
|
|
endTime: [ |
|
|
|
{ required: true, message: '请选择试验结束时间', trigger: 'change' }, |
|
|
|
], |
|
|
|
workNo: [ |
|
|
|
{ required: true, message: '请填写工作控制号', trigger: 'change' }, |
|
|
|
], |
|
|
|
plineId: [ |
|
|
|
{ required: true, message: '请填写产线ID', trigger: 'change' }, |
|
|
|
], |
|
|
|
ptype: [ |
|
|
|
{ required: true, message: '请填写产品型号', trigger: 'change' }, |
|
|
|
], |
|
|
|
testType: [ |
|
|
|
{ required: true, message: '请填写检测类型', trigger: 'change' }, |
|
|
|
], |
|
|
|
workRemark: [ |
|
|
|
{ required: true, message: '请填写报检说明', trigger: 'change' }, |
|
|
|
], |
|
|
|
}) |
|
|
|
export const DynamicMonomer = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
|
{ |
|
|
|
label: '数据类型', |
|
|
|
field: 'type', |
|
|
|
sort: 'custom', |
|
|
|
isSearch: true, |
|
|
|
// form: {
|
|
|
|
// component: 'InputNumber',
|
|
|
|
// value: 0
|
|
|
|
// },
|
|
|
|
dictType: DICT_TYPE.BATTERY_TYPE, |
|
|
|
dictClass: 'string', |
|
|
|
isTable: true, |
|
|
|
form:{ |
|
|
|
value:'moving', |
|
|
|
componentProps:{ |
|
|
|
disabled:true |
|
|
|
} |
|
|
|
}, |
|
|
|
tableForm: { |
|
|
|
type: 'Select' |
|
|
|
} |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '版本号', |
|
|
|
field: 'version', |
|
|
|
sort: 'custom', |
|
|
|
isSearch: false, |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '作者', |
|
|
|
field: 'author', |
|
|
|
sort: 'custom', |
|
|
|
isSearch: true, |
|
|
|
}, |
|
|
|
|
|
|
|
{ |
|
|
|
label: '数据报送时间', |
|
|
|
field: 'timeStamp', |
|
|
|
sort: 'custom', |
|
|
|
isSearch: false, |
|
|
|
formatter: dateFormatter, |
|
|
|
form: { |
|
|
|
component: 'DatePicker', |
|
|
|
componentProps: { |
|
|
|
valueFormat: 'YYYY-MM-DD HH:mm:ss', |
|
|
|
type: 'datetime', |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '工作控制号', |
|
|
|
field: 'workNo', |
|
|
|
sort: 'custom', |
|
|
|
isSearch: true, |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '试验结束时间', |
|
|
|
field: 'endTime', |
|
|
|
sort: 'custom', |
|
|
|
isSearch: false, |
|
|
|
formatter: dateFormatter, |
|
|
|
form: { |
|
|
|
component: 'DatePicker', |
|
|
|
componentProps: { |
|
|
|
valueFormat: 'YYYY-MM-DD HH:mm:ss', |
|
|
|
type: 'datetime', |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '产线ID', |
|
|
|
field: 'plineId', |
|
|
|
sort: 'custom', |
|
|
|
isSearch: true, |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '产品型号', |
|
|
|
field: 'ptype', |
|
|
|
sort: 'custom', |
|
|
|
isSearch: true, |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '检测类型', |
|
|
|
field: 'testType', |
|
|
|
sort: 'custom', |
|
|
|
isSearch: false, |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '报检说明', |
|
|
|
field: 'workRemark', |
|
|
|
sort: 'custom', |
|
|
|
isSearch: false, |
|
|
|
}, |
|
|
|
|
|
|
|
{ |
|
|
|
label: '创建时间', |
|
|
|
field: 'createTime', |
|
|
|
sort: 'custom', |
|
|
|
formatter: dateFormatter, |
|
|
|
isSearch: true, |
|
|
|
search: { |
|
|
|
component: 'DatePicker', |
|
|
|
componentProps: { |
|
|
|
valueFormat: 'YYYY-MM-DD HH:mm:ss', |
|
|
|
type: 'datetimerange', |
|
|
|
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] |
|
|
|
} |
|
|
|
}, |
|
|
|
isForm: false, |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '操作', |
|
|
|
field: 'action', |
|
|
|
isForm: false, |
|
|
|
table: { |
|
|
|
width: 150, |
|
|
|
fixed: 'right' |
|
|
|
} |
|
|
|
} |
|
|
|
])) |
|
|
|