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 = {