| | |
| | | </template> |
| | | <script> |
| | | import canvasDialog from "./Dialog"; |
| | | import { updateSnapshot } from "@/api/camera"; |
| | | import { updateSnapshot, updategb28181 } from "@/api/camera"; |
| | | export default { |
| | | name: "myCanvas", |
| | | components: { |
| | |
| | | return `${this.snapshot_url}`; |
| | | } else { |
| | | console.log(this.snapshot_url); |
| | | return `/httpImage/${this.snapshot_url}`; |
| | | return `http://${this.snapshot_url}`; |
| | | } |
| | | } else { |
| | | return this.blackImg; |
| | |
| | | this.$emit("changeLoading", true); |
| | | if (this.currentCamera.cameraId) { |
| | | let _this = this; |
| | | |
| | | if (_this.currentCamera.type === 1) { |
| | | await updategb28181({ |
| | | id: _this.currentCamera.cameraId, |
| | | }).then((res) => { |
| | | if (res.data.cameraId === _this.currentCamera.cameraId) { |
| | | _this.baseImg = "data:image/png;base64," + res.data.base64; |
| | | _this.$emit( |
| | | "refresh", |
| | | _this.baseImg, |
| | | _this.currentCamera.cameraName |
| | | ); |
| | | _this.$forceUpdate(); |
| | | _this.$notify({ |
| | | type: "success", |
| | | message: "底图已刷新", |
| | | }); |
| | | } |
| | | }); |
| | | |
| | | this.$emit("changeLoading", false); |
| | | |
| | | return; |
| | | } |
| | | |
| | | await updateSnapshot({ |
| | | id: _this.currentCamera.cameraId, |
| | |
| | | |
| | | .dialog-footer { |
| | | display: flex; |
| | | justify-content: end; |
| | | justify-content: flex-end; |
| | | text-align: center; |
| | | line-height: 32px; |
| | | font-size: 14px; |