Browse Source

预警修改

shibei_master
13176889840 4 years ago
parent
commit
79d57a5ce6
  1. 12
      src/views/modules/workSys/resiCate.vue

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

@ -158,10 +158,10 @@
<el-switch v-model="form.warn"></el-switch>
</el-form-item>
<el-form-item label="黄色预警">
<el-input-number v-model="form.level1" :min="0" size="small" label="描述文字"></el-input-number> /楼宇
<el-input-number v-model="form.level1" :min="0" size="small" label="描述文字" @change="handleLevelChange"></el-input-number> /楼宇
</el-form-item>
<el-form-item label="红色预警">
<el-input-number v-model="form.level2" :min="0" size="small" label="描述文字"></el-input-number> /
<el-input-number v-model="form.level2" :min="form.level1" size="small" label="描述文字" ></el-input-number> /
</el-form-item>
</el-form>
<div class="resi-btns">
@ -329,6 +329,9 @@ export default {
this.conditions = val
this.getTableData()
},
handleLevelChange(val) {
if (val > this.form.level2) this.form.level2 = val
},
handlerCancle() {
this.dialogVisible = false
@ -380,12 +383,15 @@ export default {
},
async handleEdit(row) {
this.form = { ...row }
this.form = { ...row, warn: row.warn == '1' ? true : false }
this.dialogVisible = true
},
async handleSUbmit() {
this.$refs.ruleForm.validate(async (valid) => {
if (valid) {
if (this.form.warn) {
if (!this.form.level1) return this.$message.error('黄色预警不能为0')
}
this.btnLoading = true
const _form = {
...this.form,

Loading…
Cancel
Save