From c870e84abc2d65e0e55e0be06eb277475028bcb4 Mon Sep 17 00:00:00 2001 From: jiangyy Date: Thu, 8 Sep 2022 15:31:10 +0800 Subject: [PATCH 1/3] 111 --- src/views/modules/workSys/resiCate.vue | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/src/views/modules/workSys/resiCate.vue b/src/views/modules/workSys/resiCate.vue index 8deb8b7e4..a0d639e19 100644 --- a/src/views/modules/workSys/resiCate.vue +++ b/src/views/modules/workSys/resiCate.vue @@ -185,6 +185,24 @@ size="small" label="描述文字"> 人/楼栋 + + + + + + + 年龄 + + + + +
Date: Thu, 8 Sep 2022 15:44:28 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E5=B9=B4=E9=BE=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/modules/workSys/resiCate.vue | 39 ++++++++++++++++++++------ 1 file changed, 30 insertions(+), 9 deletions(-) diff --git a/src/views/modules/workSys/resiCate.vue b/src/views/modules/workSys/resiCate.vue index a0d639e19..a25ca42cd 100644 --- a/src/views/modules/workSys/resiCate.vue +++ b/src/views/modules/workSys/resiCate.vue @@ -186,20 +186,22 @@ label="描述文字"> 人/楼栋 - - + + - - 年龄 - + 年龄: + - - {{' — '}} + @@ -308,6 +310,10 @@ export default { level2: 0, level3: 0 }, + + autoMatching: false, + ageMin: 0, + ageMax: 1, rules: { managementIcon: [{ required: true, message: '管理平台图标不能为空', trigger: 'blur' }], dataIcon: [{ required: true, message: '数据平台图标不能为空', trigger: 'blur' }], @@ -457,6 +463,21 @@ export default { if (valid) { if (this.form.warn) { if (!this.form.level1) return this.$message.error('黄色预警不能为0') + + if (this.form.columnName === 'IS_YLFN') { + this.form.autoMatching = this.autoMatching ? '1' : '0' + + if (this.autoMatching) { + if ((this.ageMin > 0 || this.ageMin === 0) && (this.ageMax > 0 || this.ageMax === 0)) { + this.form.ylfnValue = this.ageMin + ',' + this.ageMax + } else { + return this.$message.error('年龄范围不能为空') + } + } + + } else { + + } } this.btnLoading = true const _form = { From 07b89be40723f9cc13882747b7b26420eafb3fcd Mon Sep 17 00:00:00 2001 From: jiangyy Date: Thu, 8 Sep 2022 16:01:10 +0800 Subject: [PATCH 3/3] 111 --- src/views/modules/workSys/resiCate.vue | 42 ++++++++++++++++++-------- 1 file changed, 30 insertions(+), 12 deletions(-) diff --git a/src/views/modules/workSys/resiCate.vue b/src/views/modules/workSys/resiCate.vue index a25ca42cd..6da2debf4 100644 --- a/src/views/modules/workSys/resiCate.vue +++ b/src/views/modules/workSys/resiCate.vue @@ -191,7 +191,7 @@ - 年龄: 0 || this.ageMin === 0) && (this.ageMax > 0 || this.ageMax === 0)) { - this.form.ylfnValue = this.ageMin + ',' + this.ageMax - } else { - return this.$message.error('年龄范围不能为空') - } + if (this.autoMatching) { + if ((this.ageMin > 0 || this.ageMin === 0) && (this.ageMax > 0 || this.ageMax === 0)) { + this.form.ylfnValue = this.ageMin + ',' + this.ageMax + } else { + return this.$message.error('年龄范围不能为空') } + } - } else { + } else { - } } this.btnLoading = true const _form = {