From c60e56e2b6ceb633c6b10f5dc52e3da88129ad70 Mon Sep 17 00:00:00 2001
From: 陈泽平 <chenzeping>
Date: 星期五, 21 五月 2021 17:35:41 +0800
Subject: [PATCH] 管线分析相关功能问题修改

---
 src/components/panel/topicSearch/SewersSelect/AnalysisChoose/CrossSectional.vue |   81 ++++++++++++++++++++++++----------------
 1 files changed, 49 insertions(+), 32 deletions(-)

diff --git a/src/components/panel/topicSearch/SewersSelect/AnalysisChoose/CrossSectional.vue b/src/components/panel/topicSearch/SewersSelect/AnalysisChoose/CrossSectional.vue
index 50bbded..ddfc644 100644
--- a/src/components/panel/topicSearch/SewersSelect/AnalysisChoose/CrossSectional.vue
+++ b/src/components/panel/topicSearch/SewersSelect/AnalysisChoose/CrossSectional.vue
@@ -78,6 +78,17 @@
     })
   },
   methods: {
+    // 妯柇闈㈡竻闄�
+    jdmClear () {
+      this.hdmParam = null
+      this.tableData = []
+      this.option = []
+      this.myChartShow = false
+      this.myChart.clear()
+      if (this.measure != null) {
+        this.measure.destory()
+      }
+    },
     // 妯柇闈� 绾挎缁樺埗
     drawLine () {
       if (this.measure === null) {
@@ -105,8 +116,8 @@
       }
       // 宸茬粯鍒剁嚎鍥� 杩涜缁樺埗妯柇闈㈡暟鎹垎鏋�
       const res = await mapApi.getCrossSection(this.hdmParam)
-      // 璋冪敤鏁版嵁澶勭悊鏂规硶
-      this.dealWithData(res)
+      // // 璋冪敤鏁版嵁澶勭悊鏂规硶
+      // this.dealWithData(res)
       // table鏁版嵁澶勭悊
       const dataPoint = res.data.point
       // 瀛樺偍闂磋窛list
@@ -117,29 +128,33 @@
           x: parseFloat(dataPoint[i].crossPoint3D.x).toFixed(8),
           y: parseFloat(dataPoint[i].crossPoint3D.y).toFixed(8),
           z: parseFloat(dataPoint[i].crossPoint3D.z).toFixed(2),
-          spacing: spacingList[i - 1]
+          spacing: spacingList[i - 1],
+          startpointz: dataPoint[i].pipelines.extraData.startpointz,
+          diameter: dataPoint[i].pipelines.extraData.diameter
         }
         this.tableData.push(obj)
       }
+      // 璋冪敤鏁版嵁澶勭悊鏂规硶
+      this.dealWithData(this.tableData)
     },
     // 瀵硅幏鍙栧埌鐨勬暟鎹繘琛屽鐞�
-    dealWithData (e) {
-      console.log(e)
-      const dataPoint = e.data.point
-      const spacingList = e.data.pointInterval.reverse()
-      const dataList = []
-      for (let i = 0; i < dataPoint.length; i++) {
-        const obj = {
-          mediumtype: dataPoint[i].pipelines.extraData.mediumtype,
-          startpointz: dataPoint[i].pipelines.extraData.startpointz,
-          diameter: dataPoint[i].pipelines.extraData.diameter,
-          spacing: spacingList[i - 1],
-          x: parseFloat(dataPoint[i].crossPoint3D.x).toFixed(8),
-          y: parseFloat(dataPoint[i].crossPoint3D.y).toFixed(8),
-          z: parseFloat(dataPoint[i].crossPoint3D.z).toFixed(2)
-        }
-        dataList.push(obj)
-      }
+    dealWithData (dataList) {
+      console.log(dataList)
+      // const dataPoint = e.data.point
+      // const spacingList = e.data.pointInterval.reverse()
+      // const dataList = []
+      // for (let i = 0; i < dataPoint.length; i++) {
+      //   const obj = {
+      //     mediumtype: dataPoint[i].pipelines.extraData.mediumtype,
+      //     startpointz: dataPoint[i].pipelines.extraData.startpointz,
+      //     diameter: dataPoint[i].pipelines.extraData.diameter,
+      //     spacing: spacingList[i - 1],
+      //     x: parseFloat(dataPoint[i].crossPoint3D.x).toFixed(8),
+      //     y: parseFloat(dataPoint[i].crossPoint3D.y).toFixed(8),
+      //     z: parseFloat(dataPoint[i].crossPoint3D.z).toFixed(2)
+      //   }
+      //   dataList.push(obj)
+      // }
       // 妯悜鍧愭爣鏁版嵁
       const xAxisData = []
       const dataObj = []
@@ -175,16 +190,29 @@
             },
             show: true
           },
+          axisLine: {
+            lineStyle: {
+              color: '#fff',
+              width: 2
+            }
+          },
           // data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'],
           data: xAxisData,
           axisLabel: {
             interval: 0,
             textStyle: {
               color: '#fff'
-            }
+            },
+            margin: 20
           }
         },
         yAxis: {
+          axisLine: {
+            lineStyle: {
+              color: '#fff',
+              width: 2
+            }
+          },
           axisPointer: {
             snap: true
           },
@@ -209,17 +237,6 @@
       this.myChartShow = true
       this.myChart.clear()
       this.myChart.setOption(option)
-    },
-    // 妯柇闈㈡竻闄�
-    jdmClear () {
-      this.hdmParam = null
-      this.tableData = []
-      this.option = []
-      this.myChartShow = false
-      this.myChart.clear()
-      if (this.measure != null) {
-        this.measure.destory()
-      }
     }
   }
 }

--
Gitblit v1.8.0