| | |
| | | </el-select> |
| | | </el-form-item> |
| | | |
| | | |
| | | |
| | | </div> |
| | | <div class="right"> |
| | | <el-form-item label="任务描述"> |
| | |
| | | <template slot-scope="scope"> |
| | | <span v-html="scope.row.group_text"></span> |
| | | </template> |
| | | </el-table-column> --> |
| | | </el-table-column>workTimeId --> |
| | | <el-table-column label="时间段" prop="time_name" align="center"> |
| | | <template slot-scope="scope"> |
| | | {{(scope.row.workingTime || []).map(r => r.labelName).join(' / ') || ''}} |
| | | <!-- {{(scope.row.workingTime || []).map(r => r.labelName).join(' / ') || ''}} --> |
| | | <span v-for="(tag, idx) in VideoManageData.TimeRules.filter(t => t.id === scope.row.workTimeId)" |
| | | :key="idx"> |
| | | {{ tag.name }}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="检测内容" prop="checkContent" align="center"> |
| | |
| | | import RuleEditor from "@/components/subComponents/RuleEditor"; |
| | | import SceneEditor from "./scene/Editor"; |
| | | import { getSoundList } from "@/api/event"; |
| | | import { forEach } from "jszip"; |
| | | |
| | | export default { |
| | | name: "SceneRuleEditor", |
| | |
| | | // this.sceneForm.rules = editorResp.rules; |
| | | // this.sceneForm.id = editorResp.id; |
| | | // this.sceneForm.group_text = editorResp.text; |
| | | const workTimes = [this.sceneForm.workingTimes].map(id => { |
| | | const timeOption = this.VideoManageData.TimeRules.find(opt => opt.id === id) |
| | | return { |
| | | labelId: id, |
| | | labelName: timeOption ? timeOption.name : '' |
| | | } |
| | | }) |
| | | // const workTimes = [this.sceneForm.workingTimes].map(id => { |
| | | // const timeOption = this.VideoManageData.TimeRules.find(opt => opt.id === id) |
| | | // return { |
| | | // labelId: id, |
| | | // labelName: timeOption ? timeOption.name : '' |
| | | // } |
| | | // }) |
| | | const fileIds = this.sceneForm.knowsList.map( |
| | | path => { |
| | | // 提取最后一级的文件ID并转换为数字 |
| | |
| | | this.sceneForm.eventLevel = this.sceneForm.alarm_level |
| | | this.sceneForm.checks = this.sceneForm.checkContents |
| | | this.sceneForm.rules = this.sceneForm.warningRules |
| | | this.sceneForm.workTimes = workTimes |
| | | // this.sceneForm.workTimes = workTimes |
| | | this.sceneForm.workTimeId = this.sceneForm.workingTimes |
| | | this.sceneForm.taskDescription = this.sceneForm.desc |
| | | this.sceneForm.knows = fileIds, |
| | | this.onSaveScene(this.sceneForm); |