From 4f35a8b56c12315c82fd5bd136f32da2dcadc5e2 Mon Sep 17 00:00:00 2001
From: chenyabin <Chenab123!>
Date: 星期二, 27 四月 2021 09:27:22 +0800
Subject: [PATCH] Merge branch 'develop' of http://xearth.cn:6600/r/wuyushui/SewerAndRainNetwork into develop

---
 src/components/panel/topicSearch/SewersSelect/SewersAnalysis.vue |   54 ++++++++++++++++++++++++++----------------------------
 1 files changed, 26 insertions(+), 28 deletions(-)

diff --git a/src/components/panel/topicSearch/SewersSelect/SewersAnalysis.vue b/src/components/panel/topicSearch/SewersSelect/SewersAnalysis.vue
index 9b4a92f..4b3d479 100644
--- a/src/components/panel/topicSearch/SewersSelect/SewersAnalysis.vue
+++ b/src/components/panel/topicSearch/SewersSelect/SewersAnalysis.vue
@@ -17,8 +17,8 @@
                        title="鏍规嵁璧峰銆佺粨鏉熺娈佃繘琛岃繛閫氭�у垎鏋�">娓呴櫎
             </el-button>
             <el-scrollbar style="height:450px">
-              <el-card shadow="hover"> <!-- style="height: 300px"-->
-                <span class="clearfixs">璧峰绠℃</span>
+              <el-card shadow="hover">
+                <span class="fixed-style">璧峰绠℃</span>
                 <el-table
                     ref="singleTable"
                     highlight-current-row
@@ -62,7 +62,7 @@
                     </template>
                   </el-table-column>
                 </el-table>
-                <span class="clearfixs">缁撴潫绠℃</span>
+                <span class="fixed-style">缁撴潫绠℃</span>
                 <el-table
                     max-height="200"
                     highlight-current-row
@@ -105,7 +105,7 @@
                     </template>
                   </el-table-column>
                 </el-table>
-                <span class="clearfixs">鍒嗘瀽缁撴灉:<span style="color: red;">{{ currentLinkIsTrue }}</span></span>
+                <span class="fixed-style">鍒嗘瀽缁撴灉:<span style="color: red;">{{ currentLinkIsTrue }}</span></span>
                 <el-table
                     highlight-current-row
                     max-height="200"
@@ -160,7 +160,7 @@
             <el-button type="primary" @click="handleClick" size="mini" style="margin-bottom: 5px;" title="娓呴櫎缁樺埗">娓呴櫎
             </el-button>
             <el-card shadow="hover">
-              <span class="clearfixs">鍙戠敓鐖嗚鐨勭娈�</span>
+              <span class="fixed-style">鍙戠敓鐖嗚鐨勭娈�</span>
               <el-table
                   ref="singleTable"
                   highlight-current-row
@@ -202,7 +202,7 @@
                   </template>
                 </el-table-column>
               </el-table>
-              <span class="clearfixs">闇�瑕佸叧闂殑闃�闂�</span>
+              <span class="fixed-style">闇�瑕佸叧闂殑闃�闂�</span>
               <el-table
                   highlight-current-row
                   :data="bgFm"
@@ -343,7 +343,7 @@
             <el-button type="primary" @click="jdmClear" size="mini" style="margin-bottom: 5px;" title="娓呴櫎鎴柇闈㈠垎鏋愮粨鏋�">娓呴櫎
             </el-button>
             <el-card class="box-card">
-              <div slot="header" class="clearfixs">
+              <div slot="header" class="fixed-style">
                 <span>绠$嚎鏌ヨ缁撴灉</span>
               </div>
               <el-table
@@ -371,11 +371,11 @@
               </el-table>
             </el-card>
             <el-card class="box-card">
-              <div slot="header" class="clearfixs">
+              <div slot="header" class="fixed-style">
                 <span>鏂潰鍥�</span>
               </div>
               <span v-show="!myChartShow" style="color: #909399;font-size: 12px;">鏆傛棤鏁版嵁</span>
-              <div v-show="myChartShow" id="echarts_box" style="width: 600px;height:300px;"></div>
+              <div v-show="myChartShow" id="echarts_box" ref="myChart" style="width: 600px;height:300px;"></div>
             </el-card>
           </el-tab-pane>
         </el-tabs>
@@ -388,8 +388,7 @@
 
 import eventBus from '../../../../eventBus'
 import DrawLine from './AnalysisChoose/DrawLine'
-// import main from "../leaflet/app/main"
-import mapApi from '@/api/mapApi'
+import mapApi from '../../../../api/mapApi'
 
 export default {
   name: 'SewersAnalysis',
@@ -398,12 +397,13 @@
       // 鍦板浘鐐瑰嚮绫诲瀷 first杩為�氭�х偣鍑�  second鐖嗙鐐瑰嚮  third娴佸悜鐐瑰嚮 fourth妯柇闈�
       activeName: 'first',
       measure: null,
-      map: null,
+      map: window.map,
 
       myChart: null,
       myChartShow: false,
       flowPipeLine: null,
 
+      // 鐢ㄤ簬鍒ゆ柇
       currentSelectStart: null,
       currentSelectEnd: null,
       currentSelectStartLine: null,
@@ -443,12 +443,8 @@
     }
   },
   mounted () {
-    // this.myChart = this.$echarts.init(document.getElementById('echarts_box'))
-    // 鍏ㄥ眬map浼犻�� || this.map = window.map
-    this.map = window.map
-    eventBus.$on('map-obj', (mapObj) => {
-      this.map = mapObj
-    })
+    // 鍒濆鍖杄charts鍥捐〃
+    this.myChart = this.$echarts.init(this.$refs.myChart)
     // 浣跨敤 DrwLine鏂规硶
     eventBus.$on('draw-hdm-line', (points) => {
       this.getHdmPoint(points)
@@ -473,11 +469,11 @@
 
     // 娴佸悜鍦板浘涓婄偣鍑�
     selectPipeLine () {
-      this.map.on('click', this.selectClick)
+      window.map.on('click', this.selectClick)
     },
     // 鍦板浘涓婄偣鍑诲洖璋�
     selectClick (e) {
-      this.map.off('click', this.selectClick)
+      window.map.off('click', this.selectClick)
       const point = [e.latlng.lng, e.latlng.lat]
       console.log(point)
       this.getPipeLine(point)
@@ -776,12 +772,12 @@
 
     // 娴佸悜鏁版嵁璇锋眰
     async getPipeLine (point) {
-      const param = {
-        x: point[0],
-        y: point[1],
-        radius: 3
-      }
-      console.log(param)
+      // const param = {
+      //   x: point[0],
+      //   y: point[1],
+      //   radius: 3
+      // }
+      // console.log(param)
 
       // 鏍规嵁鍙傛暟璇锋眰鎺ュ彛鏁版嵁
       // const res = await api.getPipeline(param)
@@ -813,6 +809,7 @@
       console.log('姝f祦鍚戞樉绀�')
       console.log(e)
 
+      // 娓呴櫎娴佸悜鏂规硶
       this.clearLX()
       // const param = {
       //   points: e.data,
@@ -862,7 +859,8 @@
     // 妯柇闈㈡暟鎹姹�
     async getHdmPoint (line) {
       console.log('妯柇闈㈢殑缁樺埗绾�')
-      console.table(line)
+      // console.table(line)
+      // 妯柇闈㈡暟鎹�
       this.hdmParam = {
         x1: line[0].lng,
         y1: line[0].lat,
@@ -958,7 +956,7 @@
   padding: 0;
 }
 
-/deep/ .clearfixs {
+/deep/ .fixed-style {
   display: inline-block;
   color: #ffffff;
   margin: 15px;

--
Gitblit v1.8.0