From b9ac64ab13c20b153b54fe12019f63156113bf36 Mon Sep 17 00:00:00 2001 From: g7hoo Date: Sun, 9 Oct 2022 16:45:03 +0800 Subject: [PATCH] update --- .../base-dialog/addOrUpdate/index.vue | 7 +- src/views/modules/monitoring/equipment.vue | 2 +- .../modules/monitoring/equipmentGroup.vue | 16 +++-- .../modules/monitoring/equipmentType.vue | 18 +++-- src/views/modules/monitoring/factory.vue | 17 +++-- src/views/modules/monitoring/product.vue | 6 +- .../modules/monitoring/productionLine.vue | 18 +++-- .../monitoring/qualityInspectionRecord.vue | 67 ++++++++++++------- .../modules/monitoring/workShopSection.vue | 18 +++-- .../monitoring/workshopSectionDialog.vue | 35 ++++++---- 10 files changed, 137 insertions(+), 67 deletions(-) diff --git a/src/components/base-dialog/addOrUpdate/index.vue b/src/components/base-dialog/addOrUpdate/index.vue index c6a8ea0..9d8177e 100644 --- a/src/components/base-dialog/addOrUpdate/index.vue +++ b/src/components/base-dialog/addOrUpdate/index.vue @@ -274,7 +274,8 @@ export default { const requiredRule = { required: true, message: i18n.t('validate.required'), - trigger: 'change' + // trigger: 'change' + trigger: 'blur' } /** 检查是否已经存在该字段的规则 */ const exists = this.dataFormRules[item.name] || null @@ -398,10 +399,10 @@ export default { }).then(({ data: res }) => { if (res && res.code === 0) { const dataFormKeys = Object.keys(this.dataForm) - // console.log('keys ===> ', dataFormKeys) + console.log('keys ===> ', dataFormKeys) // console.log('data form keys: ', dataFormKeys, pick(res.data, dataFormKeys)) this.dataForm = __pick(res.data, dataFormKeys) - // console.log('pick(res.data, dataFormKeys) ===> ', __pick(res.data, dataFormKeys)) + console.log('pick(res.data, dataFormKeys) ===> ', __pick(res.data, dataFormKeys)) // LABEL: FILE_RELATED /** 对文件下载进行分流 */ this.fileList = {} diff --git a/src/views/modules/monitoring/equipment.vue b/src/views/modules/monitoring/equipment.vue index 24384b7..be87026 100644 --- a/src/views/modules/monitoring/equipment.vue +++ b/src/views/modules/monitoring/equipment.vue @@ -92,7 +92,7 @@ const addOrUpdateConfigs = { infoUrl: '/monitoring/equipment', fields: [ { name: 'name', label: i18n.t('eq.name'), required: true }, - { name: 'code', label: i18n.t('eq.code'), api: '/monitoring/equipment/getCode' }, + { name: 'code', label: i18n.t('eq.code'), required: true, api: '/monitoring/equipment/getCode' }, { name: 'enName', label: i18n.t('enname') }, { name: 'abbr', label: i18n.t('abbr') }, { diff --git a/src/views/modules/monitoring/equipmentGroup.vue b/src/views/modules/monitoring/equipmentGroup.vue index d499ab4..ed9b991 100644 --- a/src/views/modules/monitoring/equipmentGroup.vue +++ b/src/views/modules/monitoring/equipmentGroup.vue @@ -10,7 +10,15 @@ - + { - this.addOrUpdateVisible= false - }, /** after dialog animated */ 200); + this.addOrUpdateVisible = false + }, /** after dialog animated */ 200) }, // 获取数据列表 getDataList() { diff --git a/src/views/modules/monitoring/equipmentType.vue b/src/views/modules/monitoring/equipmentType.vue index 6fb1731..7669b6f 100644 --- a/src/views/modules/monitoring/equipmentType.vue +++ b/src/views/modules/monitoring/equipmentType.vue @@ -10,7 +10,15 @@ - + { - this.addOrUpdateVisible= false - }, /** after dialog animated */ 200); + this.addOrUpdateVisible = false + }, /** after dialog animated */ 200) }, // 获取设备类型树形数据 getTreeEquipmentType() { diff --git a/src/views/modules/monitoring/factory.vue b/src/views/modules/monitoring/factory.vue index 2bcfbaa..3f422ec 100644 --- a/src/views/modules/monitoring/factory.vue +++ b/src/views/modules/monitoring/factory.vue @@ -10,7 +10,15 @@ - + { - this.addOrUpdateVisible= false - }, /** after dialog animated */ 200); + this.addOrUpdateVisible = false + }, /** after dialog animated */ 200) }, // 获取数据列表 getDataList() { diff --git a/src/views/modules/monitoring/product.vue b/src/views/modules/monitoring/product.vue index b5cdfaa..beef811 100644 --- a/src/views/modules/monitoring/product.vue +++ b/src/views/modules/monitoring/product.vue @@ -69,11 +69,13 @@ const addOrUpdateConfigs = { fields: [ // 'name', { - name: 'name' + name: 'name', + required: true // label: i18n.t('pl.name') }, { name: 'code', + required: true, // label: i18n.t('pl.code'), api: '/monitoring/product/getCode' }, @@ -183,7 +185,7 @@ export default { handleDestroyDialog() { setTimeout(() => { this.showbasedialog = false - }, /** after dialog animated */ 200); + }, /** after dialog animated */ 200) }, addOrEdit(id) { this.showbasedialog = true diff --git a/src/views/modules/monitoring/productionLine.vue b/src/views/modules/monitoring/productionLine.vue index c7e251a..a35a31d 100644 --- a/src/views/modules/monitoring/productionLine.vue +++ b/src/views/modules/monitoring/productionLine.vue @@ -10,7 +10,15 @@ - + { - this.addOrUpdateVisible= false - }, /** after dialog animated */ 200); + this.addOrUpdateVisible = false + }, /** after dialog animated */ 200) }, // 获取工厂列表 getFactoryList() { diff --git a/src/views/modules/monitoring/qualityInspectionRecord.vue b/src/views/modules/monitoring/qualityInspectionRecord.vue index cba8509..eb5f0f2 100644 --- a/src/views/modules/monitoring/qualityInspectionRecord.vue +++ b/src/views/modules/monitoring/qualityInspectionRecord.vue @@ -1,16 +1,29 @@