From eb6cfd90fd89f11263146dc4c38069c8a4845fab Mon Sep 17 00:00:00 2001
From: 584911253@qq.com <584911253@qq.com>
Date: 星期五, 10 三月 2023 15:36:37 +0800
Subject: [PATCH] bug修改

---
 src/views/Synthesis/LeftMenu.vue         |   24 +++++
 src/views/maintenance/userManagement.vue |    9 ++
 src/components/login.vue                 |   13 ++
 src/components/mapsdk.vue                |  140 +++++++++++++++++++++++++---------
 4 files changed, 143 insertions(+), 43 deletions(-)

diff --git a/src/components/login.vue b/src/components/login.vue
index ba202bb..ba72a0d 100644
--- a/src/components/login.vue
+++ b/src/components/login.vue
@@ -200,11 +200,15 @@
             .then((response) => {
               if (response.code != 200) {
                 this.loading = false;
-                Message({
+                this.$message({
                   message: response.msg,
                   type: "error",
-                  duration: 5 * 1000,
                 });
+                // Message({
+                //   message: response.msg,
+                //   type: "error",
+                //   duration: 5 * 1000,
+                // });
                 return;
               }
 
@@ -224,6 +228,11 @@
                     sessionStorage.setItem("routerName", "/Thematic");
                     sessionStorage.setItem("changeSelectStyle", 1);
                     this.$router.push("/");
+                  }else {
+                    this.$message({
+                      message: "璇锋偍鑱旂郴绠$悊鍛樺垎閰嶈鑹茶彍鍗�",
+                      type: "error",
+                    });
                   }
                   this.loading = false;
                 } else {
diff --git a/src/components/mapsdk.vue b/src/components/mapsdk.vue
index 8999209..f4dc56b 100644
--- a/src/components/mapsdk.vue
+++ b/src/components/mapsdk.vue
@@ -56,6 +56,7 @@
           </div>
         </el-card>
       </div>
+      <!--鍧愭爣鐐逛綅-->
       <div
         class="coordLocalBox"
         v-if="showCoordLocalBoxDialog"
@@ -95,6 +96,7 @@
           </div>
         </el-card>
       </div>
+      <!--鍦板舰骞虫暣-->
       <div
         class="terrainLevelBox"
         v-if="showTerrainLevelDialog"
@@ -230,6 +232,7 @@
           </div>
         </el-card>
       </div>
+      <!-- 璺緞鍒嗘瀽寮圭獥-->
       <div
         class="pathAnalysisBox"
         v-if="showPathAnalysisBoxDialog"
@@ -315,6 +318,7 @@
           ></div>
         </div>
       </div>
+      <!-- 鍧″害鍒嗘瀽寮圭獥-->
       <div
         class="lengend"
         v-show="showLengendDialog"
@@ -665,6 +669,20 @@
     this.$bus.$on('changemapType', (e) => {
       this.show2DMap = e;
     });
+    this.$bus.$on('closeMenuPop', (e) => {
+      //闈炶矾寰勫垎鏋�
+      if (e != 'd3'){
+        this.showPathAnalysisBoxDialog = false;
+      }
+      //闈炲潯搴﹀垎鏋�
+      if (e != 'd2'){
+        this.showLengendDialog = false;
+      }
+      //闈炲湴褰㈠钩鏁�
+      if (e != 'd10'){
+        this.showTerrainLevelDialog = false;
+      }
+    });
     //妯″瀷鎹曟崏
     this.catchmodel()
   },
@@ -850,7 +868,8 @@
         } else {
           this.showBufferBoxDialog = true;
         }
-      } else if (res.name == "Coord") {
+      }
+      else if (res.name == "Coord") {
         if (res.id == "1") {
           this.showCoordLocalBoxDialog = true;
           this.showToponymicLocalBoxDialog = false;
@@ -859,7 +878,8 @@
           this.showCoordLocalBoxDialog = false;
           this.getToponymicData();
         }
-      } else if (res.name == "Analysis") {
+      }
+      else if (res.name == "Analysis") {
         if (res.id == "3") {
           if (res.show == true) {
             this.showPathAnalysisBoxDialog = true;
@@ -868,23 +888,21 @@
             this.closeBufferBox(4);
           }
         }
-      } else if (res.name == "Trrain") {
+      }
+      else if (res.name == "Trrain") {
         switch (res.id) {
           case "d10":
             this.showTerrainLevelDialog = !this.showTerrainLevelDialog;
             this.clearTerrainLevel();
             break;
         }
-
-      } else if (res.name == "Lengend") {
+      }
+      else if (res.name == "Lengend") {
         switch (res.id) {
           case "d2":
-
             this.showLengendDialog = res.vshow;
-
             break;
         }
-
       }
     },
     handleSizeChange(val) {
@@ -958,6 +976,7 @@
           break;
         case 2:
           this.showCoordLocalBoxDialog = false;
+          sgworld.Creator.DeleteObject(this.imagePoint);
           break;
         case 3:
           this.showToponymicLocalBoxDialog = false;
@@ -990,6 +1009,10 @@
         Y: lat,
         Altitude: 2000,
       };
+      if (this.imagePoint != null) {
+        sgworld.Creator.DeleteObject(this.imagePoint);
+        this.imagePoint = null;
+      }
       this.imagePoint = sgworld.Creator.CreateLabel(
         position,
         "",
@@ -1068,36 +1091,64 @@
     },
     async showMouseLeftClick(res) {
       if (res == 3) {
-        this.$refs.form.validate((valid) => {
-          if (!valid) {
-            return false;
+        this.$refs.form.validate(async (valid) => {
+          if (valid) {
+            this.clearPathAll(5);
+            var start = this.pathFrom.lon.split(",");
+            var end = this.pathFrom.lat.split(",");
+            var startData = {
+              x1: parseFloat(start[0]),
+              y1: parseFloat(start[1]),
+              x2: parseFloat(end[0]),
+              y2: parseFloat(end[1]),
+            };
+            const data = await comprehensive_selectRoute(startData);
+            if (data.code != 200) {
+              return this.$message.error("鏁版嵁璇锋眰澶辫触");
+            }
+            if (!data.result) {
+              return this.$message.error("鏆傛棤鏁版嵁");
+            }
+            var wkt = this.$wkt.parse(data.result);
+            var bufferSource = Cesium.GeoJsonDataSource.load(wkt, {
+              stroke: new Cesium.Color(82 / 255, 152 / 255, 255 / 255, 1),
+              strokeWidth: 5,
+              clampToGround: true,
+            });
+            bufferSource.then((bufferSource) => {
+              sgworld.Navigate.flyToObj(bufferSource);
+              Viewer.dataSources.add(bufferSource);
+            });
           }
         });
-        this.clearPathAll(3);
-        var start = this.pathFrom.lon.split(",");
-        var end = this.pathFrom.lat.split(",");
-        var startData = {
-          x1: parseFloat(start[0]),
-          y1: parseFloat(start[1]),
-          x2: parseFloat(end[0]),
-          y2: parseFloat(end[1]),
-        };
-
-        const data = await comprehensive_selectRoute(startData);
-        if (data.code != 200) {
-          return this.$message.error("鏁版嵁璇锋眰澶辫触");
-        }
-        var wkt = this.$wkt.parse(data.result);
-        var bufferSource = Cesium.GeoJsonDataSource.load(wkt, {
-          stroke: new Cesium.Color(82 / 255, 152 / 255, 255 / 255, 1),
-
-          strokeWidth: 5,
-          clampToGround: true,
-        });
-        bufferSource.then((bufferSource) => {
-          sgworld.Navigate.flyToObj(bufferSource);
-          Viewer.dataSources.add(bufferSource);
-        });
+        // this.clearPathAll(3);
+        // var start = this.pathFrom.lon.split(",");
+        // var end = this.pathFrom.lat.split(",");
+        // var startData = {
+        //   x1: parseFloat(start[0]),
+        //   y1: parseFloat(start[1]),
+        //   x2: parseFloat(end[0]),
+        //   y2: parseFloat(end[1]),
+        // };
+        //
+        // const data = await comprehensive_selectRoute(startData);
+        // if (data.code != 200) {
+        //   return this.$message.error("鏁版嵁璇锋眰澶辫触");
+        // }
+        // if (!data.result) {
+        //   return this.$message.error("鏆傛棤鏁版嵁");
+        // }
+        // var wkt = this.$wkt.parse(data.result);
+        // var bufferSource = Cesium.GeoJsonDataSource.load(wkt, {
+        //   stroke: new Cesium.Color(82 / 255, 152 / 255, 255 / 255, 1),
+        //
+        //   strokeWidth: 5,
+        //   clampToGround: true,
+        // });
+        // bufferSource.then((bufferSource) => {
+        //   sgworld.Navigate.flyToObj(bufferSource);
+        //   Viewer.dataSources.add(bufferSource);
+        // });
         // var jsonurl =
         //   wnsUrl +
         //   '?start=' +
@@ -1223,6 +1274,13 @@
             sgworld.Creator.DeleteObject(this.linePath);
             this.linePath = null;
           }
+        case 5:
+          if (this.linePath != null) {
+            sgworld.Creator.DeleteObject(this.linePath);
+            this.linePath = null;
+          }
+
+          Viewer.dataSources.removeAll();
           break;
       }
     },
@@ -1448,7 +1506,6 @@
 .mapBox {
   width: 100%;
   height: 100%;
-
   position: relative;
   #mapdiv {
     width: 100%;
@@ -1494,6 +1551,14 @@
         padding: 10px 20px;
       }
     }
+    .pathAnalysisBox{
+      width: 412px;
+      height: 370px;
+      z-index: 40;
+      position: absolute;
+      right: 8%;
+      bottom: 1%;
+    }
     .attributionPop{
       width: 350px;
       height: 370px;
@@ -1508,7 +1573,6 @@
         padding: 10px 20px;
       }
     }
-
     .terrainLevelBox {
       width: 350px;
       height: 370px;
diff --git a/src/views/Synthesis/LeftMenu.vue b/src/views/Synthesis/LeftMenu.vue
index da21a69..24c3923 100644
--- a/src/views/Synthesis/LeftMenu.vue
+++ b/src/views/Synthesis/LeftMenu.vue
@@ -647,7 +647,8 @@
       },
       activeName: "first",
       isShowModel: false,
-      options: [{
+      options: [
+          {
         value: '鍊炬枩妯″瀷',
         label: '鍊炬枩妯″瀷'
       }, {
@@ -1413,15 +1414,17 @@
 
     setAnalsy(res) {
       //this.$refs && this.$refs.queryinfo && this.$refs.queryinfo.close("queryinfo");
-
+      this.$bus.$emit("closeMenuPop", res);
       var that = this;
       switch (res) {
         case "d1": //绛夐珮绾垮垎鏋�
+          this.closePipelinePop();
           that.isolineFlag = !that.isolineFlag;
           elevationTool.tf = that.isolineFlag;
           elevationTool.render();
           break;
         case "d2": //鍧″害鍒嗘瀽
+          this.closePipelinePop();
           that.isslopeFlag = !that.isslopeFlag;
           var val = {
             name: "Lengend",
@@ -1440,6 +1443,7 @@
 
           break;
         case "d3": //璺緞鍒嗘瀽
+          this.closePipelinePop();
           this.isRouter = !this.isRouter;
           let value;
           if (this.isRouter) {
@@ -1458,6 +1462,7 @@
           this.$bus.$emit("mapChangeBox", value);
           break;
         case "d4": //鍓栭潰鍒嗘瀽
+          this.closePipelinePop();
           if (window.AnalysisDXPM) {
             window.AnalysisDXPM.end && window.AnalysisDXPM.end("cancel");
             this.clear(res);
@@ -1466,6 +1471,7 @@
           }
           break;
         case "d5": //娲按娣规病鍒嗘瀽
+          this.closePipelinePop();
           if (window.AnalysisFlood) {
             this.clear(res);
           } else {
@@ -1473,6 +1479,7 @@
           }
           break;
         case "d6": //鍦熸柟閲忓垎鏋�
+          this.closePipelinePop();
           if (window.TFvolumetricMeasurementTool) {
             TFvolumetricMeasurementTool.cleanUp();
             if (TFvolumetricMeasurementTool._mouseHandler) {
@@ -1505,6 +1512,7 @@
           }
           break;
         case "d7": //涓夌淮鎴潰鍒嗘瀽
+          this.closePipelinePop();
           // if(window.MXModel) {
           //   Viewer.screenSpaceEventHandler.removeInputAction(Cesium.ScreenSpaceEventType.LEFT_CLICK);
           //   window.MXModel=null;
@@ -1549,6 +1557,7 @@
 
           break;
         case "d8": //褰卞儚瀵规瘮
+          this.closePipelinePop();
           if (this.isContrastFlag == false) {
             this.isContrastFlag = true;
             sgworld.Analysis.createCurtainContrast(2, 1);
@@ -1558,6 +1567,7 @@
           }
           break;
         case "d10": //鍦伴潰鏁村钩
+          this.closePipelinePop();
           var val = {
             name: "Trrain",
             id: res,
@@ -1595,6 +1605,7 @@
           break;
 
         case "d11": //鍦板舰寮�鎸�
+          this.closePipelinePop();
           // this.$refs &&
           //   this.$refs.terrainDig &&
           //   this.$refs.terrainDig.open("绠¢亾绌洪棿鍒嗘瀽", null, {
@@ -1619,6 +1630,7 @@
           break;
 
         case "d12": //閫氳鍒嗘瀽
+          this.closePipelinePop();
           if (window.TSExcavation != null) {
             window.TSExcavation._SimpleGraphic.drawHandler &&
               window.TSExcavation._SimpleGraphic.drawHandler.destroy();
@@ -1635,6 +1647,7 @@
           }
           break;
         case "d13": //瑙嗗煙鍒嗘瀽
+          this.closePipelinePop();
           if (window.SYExcavatio) {
             window.SYExcavatio.end && window.SYExcavatio.end();
             window.SYExcavatio.close();
@@ -1654,6 +1667,7 @@
           }
           break;
         case "d14": //鍦嗗舰鏃跺煙鍒嗘瀽
+          this.closePipelinePop();
           if (window.YXSYExcavation) {
             window.YXSYExcavation.end && window.YXSYExcavation.end();
             window.YXSYExcavation.close();
@@ -1675,6 +1689,12 @@
           break;
       }
     },
+    //鍏抽棴绠¢亾淇℃伅寮圭獥
+    closePipelinePop(){
+      this.$refs &&
+      this.$refs.queryinfo &&
+      this.$refs.queryinfo.close("queryinfo");
+    },
     setclippingModel() {
       if (window.model) {
         setTimeout(() => {
diff --git a/src/views/maintenance/userManagement.vue b/src/views/maintenance/userManagement.vue
index 9688309..d884269 100644
--- a/src/views/maintenance/userManagement.vue
+++ b/src/views/maintenance/userManagement.vue
@@ -278,6 +278,7 @@
       "
       :visible.sync="dialogFormVisible"
       :before-close="handleClose"
+      :close-on-click-modal="false"
     >
      <div style="height: 500px; overflow: auto">
       <el-form
@@ -578,7 +579,7 @@
       :title="$t('common.changepassWord')"
       :visible.sync="resetPwd"
       :before-close="handleClose"
-
+      :close-on-click-modal="false"
     >
 
       <el-form
@@ -1148,6 +1149,12 @@
 
                   this.getUserInfo();
                 }
+                else {
+                  this.$message({
+                    message: res.msg,
+                    type: "error",
+                  });
+                }
               }, 500);
             })
             .catch((res) => {

--
Gitblit v1.9.3