From 4a800a8fc83c6bd1f86a8e847b079a51a7532c09 Mon Sep 17 00:00:00 2001
From: zhangzengfei <zhangzengfei@smartai.com>
Date: 星期三, 20 七月 2022 15:05:58 +0800
Subject: [PATCH] 修复国标配置的bug

---
 src/pages/panoramicView/components/LabelMark.vue |   31 +++++++++++++++++++++----------
 1 files changed, 21 insertions(+), 10 deletions(-)

diff --git a/src/pages/panoramicView/components/LabelMark.vue b/src/pages/panoramicView/components/LabelMark.vue
index 35673db..2c78e56 100644
--- a/src/pages/panoramicView/components/LabelMark.vue
+++ b/src/pages/panoramicView/components/LabelMark.vue
@@ -297,7 +297,7 @@
   },
   methods: {
     labelOver(item) {
-      debugger
+      // debugger
       this.$nextTick(() => {
         item.isShow = true;
       })
@@ -319,7 +319,6 @@
     sure() {
       let _this = this;
       this.$refs['labelForm'].validate(valid => {
-        console.log(valid)
         if (valid) {
           _this.isShowPop = false;
           //缂栬緫纭畾
@@ -328,7 +327,6 @@
             _this.curCameraData.coords[editedIndex] = JSON.parse(JSON.stringify(_this.curLabel));
 
           }
-          console.log(_this.curCameraData.coords)
           this.$refs['labelForm'].clearValidate();
         }
       });
@@ -360,8 +358,21 @@
     },
     async submitInfo() {
       this.isEdit = false;
+
+      if (this.curCameraData.coords.length > 0 && this.curCameraData.coords.length < 4) {
+        this.$message({
+          type: "warning",
+          message: "淇濆瓨澶辫触! 鑷冲皯闇�瑕佹爣璁�4澶�!"
+        })
+        return
+      }
+
       let res = await updateCameraMarks(this.curCameraData);
       if (res.success) {
+        this.$message({
+          type: "success",
+          message: "淇濆瓨鎴愬姛"
+        })
         this.findCameraMarks(this.curCameraData.cameraId);
       }
     },
@@ -381,7 +392,6 @@
       })
     },
     showCurPos(e) {
-      console.log(e);
       this.isShowCurPos = true;
       this.traceX = e.offsetX;
       this.traceY = e.offsetY;
@@ -399,7 +409,7 @@
       let param = new FormData();
       param.append('file', params.file)
       putPanoramaPic(param).then(res => {
-        debugger
+        // debugger
         //_this.panoramaPath = res.data.panoramaPath + '?' + Math.random();
         _this.getPanorama()
         _this.$parent.$refs['tracePlot'] && _this.$parent.$refs['tracePlot'].getPanorama();
@@ -411,10 +421,8 @@
       this.newLabel(e);
     },
     newLabel(e) {
-      console.log('鐐瑰嚮浜嗙敾鏉�')
       if (this.isShowPop) return;
       //鑾峰彇榧犳爣鐩稿浜庣敾鏉跨殑瀹氫綅
-      console.log('鑾峰彇褰撳墠瀹氫綅淇℃伅');
       this.$refs['labelForm'].resetFields();
       let target = {
         id: '',
@@ -575,7 +583,8 @@
   }
   .action-bar {
     width: 960px;
-    margin: auto;
+    // margin: auto;
+    margin-left: 100px;
     margin-top: 30px;
     //margin-bottom: 20px;
     text-align: right;
@@ -586,7 +595,8 @@
     }
   }
   .drawboard {
-    margin: auto;
+    // margin: auto;
+    margin-left: 100px;
     width: 960px;
     height: 540px;
     margin-bottom: 130px;
@@ -680,7 +690,8 @@
   }
   .panorama-info {
     width: 1070px;
-    margin: 0 auto;
+    // margin: 0 auto;
+    margin-left: 100px;
     display: flex;
     padding-bottom: 30px;
     .img-wrap {

--
Gitblit v1.8.0