Browse Source

111

feature
jiangyy 3 years ago
parent
commit
07b89be407
  1. 42
      src/views/modules/workSys/resiCate.vue

42
src/views/modules/workSys/resiCate.vue

@ -191,7 +191,7 @@
<el-switch v-model="autoMatching"></el-switch>
</el-form-item>
<el-form-item v-if="form.columnName==='IS_YLFN'"
<el-form-item v-if="form.columnName==='IS_YLFN' && autoMatching"
label="匹配规则">
<span>年龄</span>
<el-input-number v-model="ageMin"
@ -454,8 +454,26 @@ export default {
warn: row.warn == '1' ? true : false,
level1: row.level1 || 0,
level2: row.level2 || 0,
level3: row.level3 || 0
level3: row.level3 || 0,
}
if (row.columnName === 'IS_YLFN') {
if (row.autoMatching === '1') {
this.autoMatching = true
} else {
this.autoMatching = false
}
if (row.ylfnValue) {
let array = row.ylfnValue.split(',')
this.ageMin = array[0]
this.ageMax = array[1]
}
}
this.dialogVisible = true
},
async handleSUbmit () {
@ -463,21 +481,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.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('年龄范围不能为空')
}
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 = {

Loading…
Cancel
Save