From a8b3f0c6e4b19644510d8efeb7f837e50b370c06 Mon Sep 17 00:00:00 2001
From: Surpriseplus <845948745@qq.com>
Date: 星期日, 26 二月 2023 16:59:38 +0800
Subject: [PATCH] 管道分析定位效果修改,

---
 src/views/Tools/pipeLineAnaly.vue |  150 ++++++++++++++++++++++++++++++++++++++-----------
 1 files changed, 116 insertions(+), 34 deletions(-)

diff --git a/src/views/Tools/pipeLineAnaly.vue b/src/views/Tools/pipeLineAnaly.vue
index 05cabd3..4e4b7f9 100644
--- a/src/views/Tools/pipeLineAnaly.vue
+++ b/src/views/Tools/pipeLineAnaly.vue
@@ -2,7 +2,11 @@
   <div class="pipeLineBox">
     <div class="headerBox">
       <div class="elFrom">
-        <el-form ref="form" :model="ruleFrom" label-width="120px">
+        <el-form
+          ref="form"
+          :model="ruleFrom"
+          label-width="120px"
+        >
           <el-form-item label="绠¢亾涓績绾�">
             <el-select
               @change="selectChange"
@@ -54,13 +58,15 @@
         </div>
         <div class="transInfo">
           <div>
-            <el-link @click="setTransRight" :underline="false"
-              ><i class="el-icon-d-arrow-right"></i
-            ></el-link>
+            <el-link
+              @click="setTransRight"
+              :underline="false"
+            ><i class="el-icon-d-arrow-right"></i></el-link>
             <br />
-            <el-link @click="setTransLeft" :underline="false"
-              ><i class="el-icon-d-arrow-left"></i
-            ></el-link>
+            <el-link
+              @click="setTransLeft"
+              :underline="false"
+            ><i class="el-icon-d-arrow-left"></i></el-link>
           </div>
         </div>
         <div class="transBox">
@@ -82,8 +88,14 @@
       </div>
       <div class="sureButton">
         <div class="suerBox">
-          <el-button @click="setAnalysis" size="small">鍒嗘瀽</el-button>
-          <el-button @click="clearAnalysis" size="small">鍙栨秷</el-button>
+          <el-button
+            @click="setAnalysis"
+            size="small"
+          >鍒嗘瀽</el-button>
+          <el-button
+            @click="clearAnalysis"
+            size="small"
+          >鍙栨秷</el-button>
         </div>
       </div>
     </div>
@@ -102,9 +114,11 @@
 
       <div class="contentLeft">
         <div style="float: right; padding: 2px">
-          <el-button @click="showDialogVivable()" size="small" type="info"
-            >涓嬭浇</el-button
-          >
+          <el-button
+            @click="showDialogVivable()"
+            size="small"
+            type="info"
+          >涓嬭浇</el-button>
           <!-- <el-button
             size="mini"
             type="info"
@@ -114,14 +128,22 @@
             type="info"
           >鍒犻櫎</el-button> -->
         </div>
-        <el-table :data="tableData" style="width: 100%" height="70%">
+        <el-table
+          :data="tableData"
+          style="width: 100%"
+          height="70%"
+        >
           <el-table-column
             align="center"
             type="index"
             :label="$t('operatManage.ELM.index')"
             width="70px"
           />
-          <el-table-column label="瀹氫綅" width="100" align="center">
+          <el-table-column
+            label="瀹氫綅"
+            width="100"
+            align="center"
+          >
             <template slot-scope="scope">
               <el-button
                 icon="el-icon-map-location"
@@ -130,18 +152,41 @@
               ></el-button>
             </template>
           </el-table-column>
-          <el-table-column prop="acrossName" label="琚┛瓒婂湴鐗╁悕绉�" width="180">
+          <el-table-column
+            prop="acrossName"
+            label="琚┛瓒婂湴鐗╁悕绉�"
+            width="180"
+          >
           </el-table-column>
-          <el-table-column prop="acrossLength" label="绌胯秺闀垮害" width="100">
+          <el-table-column
+            prop="acrossLength"
+            label="绌胯秺闀垮害"
+            width="100"
+          >
           </el-table-column>
-          <el-table-column prop="pipeName" label="绠$嚎鍚嶇О" width="180">
+          <el-table-column
+            prop="pipeName"
+            label="绠$嚎鍚嶇О"
+            width="180"
+          >
           </el-table-column>
-          <el-table-column prop="segName" label="绠℃鍚嶇О" width="180">
+          <el-table-column
+            prop="segName"
+            label="绠℃鍚嶇О"
+            width="180"
+          >
           </el-table-column>
-          <el-table-column prop="remarks" label="澶囨敞" width="100">
+          <el-table-column
+            prop="remarks"
+            label="澶囨敞"
+            width="100"
+          >
           </el-table-column>
         </el-table>
-        <div class="pagination_box" style="margin-top: 10px">
+        <div
+          class="pagination_box"
+          style="margin-top: 10px"
+        >
           <el-pagination
             @size-change="handleSizeChange"
             @current-change="handleCurrentChange"
@@ -171,14 +216,20 @@
         label-width="100px"
         class="codeForm"
       >
-        <el-form-item :label="$t('common.passworld')" prop="password">
+        <el-form-item
+          :label="$t('common.passworld')"
+          prop="password"
+        >
           <el-input
             type="password"
             v-model="codeForm.password"
             show-password
           ></el-input>
         </el-form-item>
-        <el-form-item :label="$t('common.SPassword')" prop="repassword">
+        <el-form-item
+          :label="$t('common.SPassword')"
+          prop="repassword"
+        >
           <el-input
             type="password"
             v-model="codeForm.repassword"
@@ -186,10 +237,18 @@
           ></el-input>
         </el-form-item>
         <el-form-item>
-          <el-button type="info" size="small" @click="download">{{
+          <el-button
+            type="info"
+            size="small"
+            @click="download"
+          >{{
             $t("common.confirm")
           }}</el-button>
-          <el-button type="info" size="small" @click="closeDialog">{{
+          <el-button
+            type="info"
+            size="small"
+            @click="closeDialog"
+          >{{
             $t("common.cancel")
           }}</el-button>
         </el-form-item>
@@ -343,16 +402,39 @@
       }
     },
     setShowImagePoint(res) {
-      var obj = { X: res[0], Y: res[1], Altitude: 1000 };
-      var imageLabel = sgworld.Creator.CreateImageLabel(
-        obj,
-        SmartEarthRootUrl + "Workers/image/mark.png",
-        {},
-        0,
-        "绠¢亾绌洪棿鍒嗘瀽"
+      // var obj = { X: res[0], Y: res[1], Altitude: 1000 };
+      // var imageLabel = sgworld.Creator.CreateImageLabel(
+      //   obj,
+      //   SmartEarthRootUrl + "Workers/image/mark.png",
+      //   {},
+      //   0,
+      //   "绠¢亾绌洪棿鍒嗘瀽"
+      // );
+      var val = Cesium.Cartesian3.fromDegrees(
+        res[0],
+        res[1]
       );
-      this.$store.state.pipelineEntity.push(imageLabel.item);
-      sgworld.Navigate.flyToObj(imageLabel.item);
+      var point = Viewer.entities.add({
+        position: val,
+        billboard: {
+          // 鍥惧儚鍦板潃锛孶RI鎴朇anvas鐨勫睘鎬�
+          image: SmartEarthRootUrl + "Workers/image/mark.png",
+          heightReference: Cesium.HeightReference.CLAMP_TO_GROUND,
+          // 澶у皬鏄惁浠ョ背涓哄崟浣�
+          sizeInMeters: false,
+          // 鐩稿浜庡潗鏍囩殑鍨傜洿浣嶇疆
+          verticalOrigin: Cesium.VerticalOrigin.CENTER,
+          // 鐩稿浜庡潗鏍囩殑姘村钩浣嶇疆
+          horizontalOrigin: Cesium.HorizontalOrigin.LEFT,
+          // 搴旂敤浜庡浘鍍忕殑缁熶竴姣斾緥銆傛瘮渚嬪ぇ浜庝細1.0鏀惧ぇ鏍囩锛岃�屾瘮渚嬪皬浜庝細1.0缂╁皬鏍囩銆�
+          scale: 1.0,
+          // 鏄惁鏄剧ず
+          show: true,
+        },
+      });
+      point.billboard.disableDepthTestDistance = Number.POSITIVE_INFINITY;
+      this.$store.state.pipelineEntity.push(point);
+      sgworld.Navigate.flyToObj(point);
     },
     setShowImageLine(res) {
       var obj = [];
@@ -424,7 +506,7 @@
         .then((_) => {
           this.closeDialog();
         })
-        .catch((_) => {});
+        .catch((_) => { });
     },
     closeDialog() {
       this.dialogVisible = false;

--
Gitblit v1.9.3