| | |
| | | |
| | | <div class="label">时间段</div> |
| | | <el-form-item prop="time_rule_id"> |
| | | <el-select class="h32 left" v-model="ruleForm.time_rule_id" placeholder="请选择"> |
| | | <el-select @change="changeValue($event)" class="h32 left" v-model="ruleForm.time_rule_id" placeholder="请选择"> |
| | | <el-option |
| | | v-for="item in VideoManageData.TimeRules" |
| | | :key="item.id" |
| | |
| | | } |
| | | ], |
| | | ruleForm: { |
| | | time_name: "", |
| | | alarm_level: 1, |
| | | scene_name: "", |
| | | desc: "", |
| | |
| | | return false |
| | | } |
| | | }) |
| | | }, |
| | | changeValue(val) { |
| | | console.log(val, "val") |
| | | const res = this.VideoManageData.TimeRules.filter((item) => { |
| | | return item.id === val |
| | | }) |
| | | console.log(res, "res") |
| | | this.ruleForm.time_name = res[0].name |
| | | } |
| | | } |
| | | } |
| | |
| | | } else if (newRule.action === "edit") { |
| | | //独立场景 |
| | | if (this.ruleType == "separate") { |
| | | this.SeparateRules[newRule.data.index].time_name = newRule.data.time_name |
| | | this.SeparateRules[newRule.data.index].alarm_level = newRule.data.alarm_level |
| | | this.SeparateRules[newRule.data.index].scene_name = newRule.data.scene_name |
| | | this.SeparateRules[newRule.data.index].desc = newRule.data.desc |