import type { CrudSchema } from '@/hooks/web/useCrudSchemas' import { dateFormatter } from '@/utils/formatTime' // 表单校验 export const MonomerRules = reactive({ }) export const Monomer = useCrudSchemas(reactive([ { label: '数据类型', field: 'type', sort: 'custom', isSearch: true, // form: { // component: 'InputNumber', // value: 0 // }, dictType: DICT_TYPE.BATTERY_TYPE, dictClass: 'string', isTable: true, form:{ 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: '报送时间', field: 'date', sort: 'custom', isSearch: false, formatter: dateFormatter, form: { component: 'DatePicker', componentProps: { valueFormat: 'YYYY-MM-DD HH:mm:ss', type: 'datetime', } }, }, { 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: '实际生产周期', field: 'actCycle', sort: 'custom', isSearch: false, }, { label: '产线ID', field: 'plineId', sort: 'custom', isSearch: true, }, { label: '产品型号', field: 'ptype', sort: 'custom', isSearch: true, }, { label: '检测类型', field: 'testType', sort: 'custom', isSearch: false, }, { label: '工艺流程图', field: 'procImage', sort: 'custom', isSearch: false, }, { label: '报检说明', field: 'workRemark', sort: 'custom', isSearch: false, }, { label: '工艺流程说明', field: 'procRemark', sort: 'custom', isSearch: false, }, // { // label: '发布', // field: 'sending', // sort: 'custom', // isSearch: false, // dictType: DICT_TYPE.BATTERY_SENDING, // dictClass: 'string', // isTable: true, // tableForm: { // type: 'Select' // } // }, // { // label: '一次注液', // field: 'oneInjectPreCpk', // sort: 'custom', // isSearch: false, // }, // { // label: '二次注液', // field: 'twoInjectPreCpk', // sort: 'custom', // isSearch: false, // }, // { // label: '正极涂布面密度', // field: 'posCoatDenCpk', // sort: 'custom', // isSearch: false, // }, // { // label: '负极涂布面密度', // field: 'negCoatDenCpk', // sort: 'custom', // isSearch: false, // }, // { // label: '正极辊压厚度', // field: 'posRollThickCpk', // sort: 'custom', // isSearch: false, // }, // { // label: '负极辊压厚度', // field: 'negRollThickCpk', // sort: 'custom', // isSearch: false, // }, // { // label: '第一次注液量', // field: 'oneInjectCpk', // sort: 'custom', // isSearch: false, // }, // { // label: '最终注液保有量', // field: 'finalInjectRetenCpk', // sort: 'custom', // isSearch: false, // }, // // { // label: '一次注液车间温度', // field: 'temOfPriinjectPlant', // sort: 'custom', // isSearch: false, // }, // { // label: '化成前静置车间温度', // field: 'temOfPreStandPlant', // sort: 'custom', // isSearch: false, // }, // { // label: '化成车间温度', // field: 'temOfStandPlant', // sort: 'custom', // isSearch: false, // }, // { // label: '化成后静置车间温度', // field: 'temOfAftStandPlant', // sort: 'custom', // isSearch: false, // }, // { // label: '二次注液车间温度', // field: 'temOfSecinjectPlant', // sort: 'custom', // isSearch: false, // }, // { // label: '分容前静置车间温度', // field: 'tempOfBefVolSepPlant', // sort: 'custom', // isSearch: false, // }, // { // label: '分容车间温度', // field: 'tempOfVolSepPlant', // sort: 'custom', // isSearch: false, // }, // { // label: '组装车间湿度', // field: 'humOfVolAssPlant', // sort: 'custom', // isSearch: false, // }, // { // label: '一次注液车间湿度(露点)', // field: 'humOfPriinjectPlant', // sort: 'custom', // isSearch: false, // }, // { // label: '化成前静置车间湿度(露点)', // field: 'humOfPreStandPlant', // sort: 'custom', // isSearch: false, // }, // { // label: '化成车间湿度(露点)', // field: 'humOfStandPlant', // sort: 'custom', // isSearch: false, // }, // { // label: '化成后静置车间湿度(露点)', // field: 'humOfAftStandPlant', // sort: 'custom', // isSearch: false, // }, // { // label: '二次注液车间湿度(露点)', // field: 'humOfSecinjectPlant', // sort: 'custom', // isSearch: false, // }, // { // label: '分容前静置车间湿度', // field: 'humpOfBefVolSepPlant', // sort: 'custom', // isSearch: false, // }, // { // label: '分容车间湿度', // field: 'humpOfVolSepPlant', // sort: 'custom', // isSearch: false, // }, // { // label: '洁净度粉尘粒径', // field: 'standardOfClean', // sort: 'custom', // isSearch: false, // }, // { // label: '涂布车间洁净度', // field: 'cleanOfCoatPlant', // sort: 'custom', // isSearch: false, // }, // { // label: '辊压车间洁净度', // field: 'cleanOfRollPlant', // sort: 'custom', // isSearch: false, // }, // { // label: '分切车间洁净度', // field: 'cleanOfSlitPlant', // sort: 'custom', // isSearch: false, // }, // { // label: '卷绕或者叠片车间洁净度', // field: 'cleanOfStackPlant', // sort: 'custom', // isSearch: false, // }, // { // label: '一次注液车间洁净度', // field: 'cleanOfPriInjectPlant', // sort: 'custom', // isSearch: false, // }, // { // label: '化成前静置车间洁净度', // field: 'cOfPreStandPlant', // sort: 'custom', // isSearch: false, // }, // { // label: '化成车间洁净度', // field: 'clOfStandPlant', // sort: 'custom', // isSearch: false, // }, // { // label: '化成后静置车间洁净度', // field: 'cleanOfAftStandPlant', // sort: 'custom', // isSearch: false, // }, // // { // label: '正极粉料磁性物质含量', // field: 'posPowrMagSub', // sort: 'custom', // isSearch: false, // }, // { // label: '负极粉料磁性物质含量', // field: 'negPowrMagSub', // sort: 'custom', // isSearch: false, // }, // { // label: '正极浆料磁性物质含量', // field: 'posSlurMagSub', // sort: 'custom', // isSearch: false, // }, // { // label: '负极浆料磁性物质含量', // field: 'negSlurMagSub', // sort: 'custom', // isSearch: false, // }, // { // label: '正极极片单面面密度', // field: 'posPolOneSidDen', // sort: 'custom', // isSearch: false, // }, // { // label: '负极极片单面面密度', // field: 'negPolOneSidDen', // sort: 'custom', // isSearch: false, // }, // { // label: '正极极片双面面密度', // field: 'posPolDouSidDen', // sort: 'custom', // isSearch: false, // }, // { // label: '负极极片双面面密度', // field: 'negPolDouSidDen', // sort: 'custom', // isSearch: false, // }, // { // label: '正极辊压厚度', // field: 'posColTh', // sort: 'custom', // isSearch: false, // }, // { // label: '负极辊压厚度', // field: 'negColTh', // sort: 'custom', // isSearch: false, // }, // { // label: '正极极片长度', // field: 'posPolLen', // sort: 'custom', // isSearch: false, // }, // { // label: '负极极片长度', // field: 'negPolLen', // sort: 'custom', // isSearch: false, // }, // { // label: '模切分条后隔膜厚度', // field: 'diaThiAftDieSli', // sort: 'custom', // isSearch: false, // }, // { // label: '模切分条后毛刺长度', // field: 'verHeiAftDieSli', // sort: 'custom', // isSearch: false, // }, // { // label: '烘烤后极片水份含量', // field: 'mosConPolAftBak', // sort: 'custom', // isSearch: false, // }, // // { // label: 'A卷芯或叠芯厚度', // field: 'acoreThi', // sort: 'custom', // isSearch: false, // }, // { // label: 'A卷芯或叠芯宽度', // field: 'acoreWid', // sort: 'custom', // isSearch: false, // }, // { // label: 'B卷芯或叠芯厚度', // field: 'bcoreThi', // sort: 'custom', // isSearch: false, // }, // { // label: 'B卷芯或叠芯宽度', // field: 'bcoreWid', // sort: 'custom', // isSearch: false, // }, // // { // label: '盖板焊接后真空泄露值或氦气检出值', // field: 'vacLeaValOrHelVal', // sort: 'custom', // isSearch: false, // }, // { // label: '密封钉焊接后氦气检出值', // field: 'helDetAftWel', // sort: 'custom', // isSearch: false, // }, // { // label: '总注液量标准值', // field: 'tolInj', // sort: 'custom', // isSearch: false, // }, // { // label: '总注液量偏差百分比', // field: 'tolInjPerDev', // sort: 'custom', // isSearch: false, // }, // { // label: '总重量', // field: 'totWeight', // sort: 'custom', // isSearch: false, // }, // { // label: '出厂电压', // field: 'facVol', // sort: 'custom', // isSearch: false, // }, // { // label: '容量', // field: 'quantitative', // sort: 'custom', // isSearch: false, // }, // { // label: '交流阻抗', // field: 'impAc', // sort: 'custom', // isSearch: false, // }, // { // label: '电芯长度', // field: 'celLen', // sort: 'custom', // isSearch: false, // }, // { // label: '电芯宽度', // field: 'celWid', // sort: 'custom', // isSearch: false, // }, // { // label: '电芯厚度', // field: 'celThi', // sort: 'custom', // isSearch: false, // }, // // { // label: '直通率', // field: 'passPer', // sort: 'custom', // isSearch: false, // }, // { // label: '关键设备清单', // field: 'equAbnList', // sort: 'custom', // isSearch: false, // }, // { // label: '关键设备异常报警次数', // field: 'equAbnAlarm', // sort: 'custom', // isSearch: false, // }, // { // label: '环境异常报警次数', // field: 'environAbnoralarm', // 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 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([ { 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([ { 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' } } ]))