diff --git a/src/components/base-dialog/addOrUpdate/index.vue b/src/components/base-dialog/addOrUpdate/index.vue index 40069b3..a7f40a8 100644 --- a/src/components/base-dialog/addOrUpdate/index.vue +++ b/src/components/base-dialog/addOrUpdate/index.vue @@ -38,7 +38,11 @@ :props="configs.fields[(n - 1) * COLUMN_PER_ROW + (c - 1)].props" > - + @@ -322,6 +326,8 @@ export default { return 'select' } else if (['cascader'].includes(opt.type)) { return 'cascader' + } else if (['date'].includes(opt.type)) { + return 'date' } // add more... } else { diff --git a/src/components/base-upload/index.vue b/src/components/base-upload/index.vue index 48a4096..94562c1 100644 --- a/src/components/base-upload/index.vue +++ b/src/components/base-upload/index.vue @@ -9,8 +9,8 @@ :on-preview="handleDownload" :on-remove="handleRemove" :before-upload="/.*?image.*?/i.test(extraParams.typeCode) ? validateImage : validateFile" - :before-remove="beforeRemove" > + {{ buttonContent }} @@ -97,7 +97,7 @@ export default { /** 大小验证,由配置文件开启 */ validateFile(file) { - console.log("[*] 验证文件大小") + console.log('[*] 验证文件大小') const isRightSize = file.size / 1024 / 1024 < 2 if (!isRightSize) { @@ -109,7 +109,7 @@ export default { /** 图片验证,由配置文件开启 */ validateImage(file) { - console.log("[*] 验证图片") + console.log('[*] 验证图片') const isRightSize = file.size / 1024 / 1024 < 2 if (!isRightSize) { diff --git a/src/views/modules/monitoring/equipment.vue b/src/views/modules/monitoring/equipment.vue index af0ea2a..d9eb275 100644 --- a/src/views/modules/monitoring/equipment.vue +++ b/src/views/modules/monitoring/equipment.vue @@ -66,8 +66,32 @@ const addOrUpdateConfigs = { { name: 'abbr', label: '缩写' }, { name: 'equipmentTypeId', label: '设备类型', required: true, type: 'select', options: [] }, { name: 'groupId', label: '设备分组', required: true, type: 'select', options: [] }, - { name: 'productionTime', label: '生产日期' }, - { name: 'enterTime', label: '进厂日期' }, + { + name: 'productionTime', + label: '生产日期', + type: 'date', + props: { + 'type': 'date', // element-ui 的配置 + 'placeholder': '请选择日期', + 'value-format': 'yyyy-MM-ddTHH:mm:ss', + 'style': { + width: '100%' + } + } + }, + { + name: 'enterTime', + label: '进厂日期', + type: 'date', + props: { + 'type': 'date', // element-ui 的配置 + 'placeholder': '请选择日期', + 'value-format': 'yyyy-MM-ddTHH:mm:ss', + 'style': { + width: '100%' + } + } + }, { name: 'tvalue', label: '设备TT值', required: true, rules: [{ type: 'number', message: '请输入正确的浮点值', trigger: 'blur', transform: val => Number(val) }] }, { name: 'processingTime', label: '单件产品加工时间(秒)', rules: [{ type: 'number', message: '请输入正确的数值', trigger: 'blur', transform: val => Number(val) }] }, { name: 'manufacturer', label: '制造商' },