| | |
| | | :loading="Camera.loading" |
| | | :canvasWidth="canvasWidth" |
| | | :canvasHeight="canvasHeight" |
| | | :showProportion="960 / canvasWidth" |
| | | @fromCanvas="getCanvasData" |
| | | @changeLoading="changeLoading" |
| | | @refresh="refresh" |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import { getAllTimeRule } from "@/api/timeRule" |
| | | |
| | | import { jsPlumb } from "jsplumb" |
| | | |
| | | import { savePolygon } from "@/api/polygon" |
| | |
| | | cameraId: "", |
| | | showSysInfo: true, |
| | | showCanvas: true, |
| | | canvasWidth: 568, |
| | | canvasHeight: 320, |
| | | canvasWidth: 576, |
| | | canvasHeight: 324, |
| | | stackId: "", |
| | | swiperIndex: 0, |
| | | stackFilesPage: 1, |
| | |
| | | let polyon = { ...data } |
| | | polyon.camera_id = this.Camera.cameraId |
| | | savePolygon(polyon).then((rsp) => { |
| | | if (rsp && rsp.success) { |
| | | if (rsp.data.msg.indexOf("失败") >= 0) { |
| | | this.$message({ type: "error", duration: 5000, message: rsp.data + " 区域已关联场景, 无法删除" }) |
| | | } else { |
| | | this.$message.success(rsp.data.msg) |
| | | } |
| | | } |
| | | this.Camera.getPolygon() |
| | | //this.Camera.getCameraTask(); |
| | | }) |
| | |
| | | }, |
| | | |
| | | // 初始化摄像机信息,父组件调用 |
| | | async initCameraData(id) { |
| | | async initCameraData(id, devId) { |
| | | this.$store.commit("setDevId", devId) |
| | | devId ? false : (devId = "") |
| | | getAllTimeRule(devId).then((rsp) => { |
| | | this.VideoManageData.TimeRules = rsp.data.timeRules |
| | | }) |
| | | if (!id) { |
| | | return |
| | | } |
| | |
| | | } 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 |