From abe3a86c15105f215992d78bcaaf9b51efa1d565 Mon Sep 17 00:00:00 2001
From: ZZJ <10913410+zzj2100@user.noreply.gitee.com>
Date: 星期四, 28 七月 2022 10:22:41 +0800
Subject: [PATCH] 解决冲突
---
src/components/canvas/index.vue | 30 +++++++++++++++++++++++++++---
1 files changed, 27 insertions(+), 3 deletions(-)
diff --git a/src/components/canvas/index.vue b/src/components/canvas/index.vue
index 016dc18..2467ad5 100644
--- a/src/components/canvas/index.vue
+++ b/src/components/canvas/index.vue
@@ -42,7 +42,7 @@
</template>
<script>
import canvasDialog from "./Dialog";
-import { updateSnapshot } from "@/api/camera";
+import { updateSnapshot, updategb28181 } from "@/api/camera";
export default {
name: "myCanvas",
components: {
@@ -123,7 +123,7 @@
return `${this.snapshot_url}`;
} else {
console.log(this.snapshot_url);
- return `/httpImage/${this.snapshot_url}`;
+ return `http://${this.snapshot_url}`;
}
} else {
return this.blackImg;
@@ -187,6 +187,30 @@
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,
@@ -635,7 +659,7 @@
.dialog-footer {
display: flex;
- justify-content: end;
+ justify-content: flex-end;
text-align: center;
line-height: 32px;
font-size: 14px;
--
Gitblit v1.8.0