From 18db6fdcd0bed3b9db803591b6057a98dd47c597 Mon Sep 17 00:00:00 2001
From: 陈泽平 <chenzeping>
Date: 星期四, 20 五月 2021 10:55:17 +0800
Subject: [PATCH] 横断面数据修改

---
 src/components/panel/topicSearch/SewersSelect/SewersAnalysis.vue |   61 +++++++++++++-----------------
 1 files changed, 27 insertions(+), 34 deletions(-)

diff --git a/src/components/panel/topicSearch/SewersSelect/SewersAnalysis.vue b/src/components/panel/topicSearch/SewersSelect/SewersAnalysis.vue
index 0032468..1cbc51e 100644
--- a/src/components/panel/topicSearch/SewersSelect/SewersAnalysis.vue
+++ b/src/components/panel/topicSearch/SewersSelect/SewersAnalysis.vue
@@ -11,6 +11,7 @@
                 <Flow></Flow>
             </el-tab-pane>
             <el-tab-pane label="妯柇闈�" name="fourth">
+                <!--                <CrossSectional></CrossSectional>-->
                 <el-row>
                     <el-button type="primary" @click="drawLine" size="mini" title="鍦板浘涓婄粯鍒惰杩涜鍒嗘瀽鎴柇闈㈢殑绾�">缁樺埗绾挎</el-button>
                     <el-button type="primary" @click="jdmQuery" size="mini" title="鎴柇闈㈠垎鏋�">鎴柇闈㈠垎鏋�</el-button>
@@ -22,16 +23,16 @@
                 </div>
                 <el-table class="tableBox" :data="tableData" height="150" max-height="200" highlight-current-row
                           style="width: 100%" @row-click="selectRow" size="mini">
-                    <el-table-column prop="pipename" label="浠嬭川绫诲瀷" :show-overflow-tooltip="true"></el-table-column>
+                    <el-table-column prop="mediumtype" label="浠嬭川绫诲瀷" :show-overflow-tooltip="true"></el-table-column>
                     <el-table-column prop="x" label="鏂潰(缁忓害)" :show-overflow-tooltip="true" width="80"></el-table-column>
                     <el-table-column prop="y" label="鏂潰(绾害)" :show-overflow-tooltip="true" width="80"></el-table-column>
                     <el-table-column prop="z" label="鏂潰(楂樼▼)" :show-overflow-tooltip="true" width="80"></el-table-column>
                     <el-table-column prop="spacing" label="闂磋窛(m)" width="80"></el-table-column>
-                    <el-table-column class-name="fixed-table" fixed="right" label="鍥捐〃" width="40">
-                        <template slot-scope="scope">
-                            <el-button @click="selectRow(scope.row)" type="text" size="small">鏌ョ湅</el-button>
-                        </template>
-                    </el-table-column>
+                    <!--                    <el-table-column class-name="fixed-table" fixed="right" label="鍥捐〃" width="40">-->
+                    <!--                        <template slot-scope="scope">-->
+                    <!--                            <el-button @click="selectRow(scope.row)" type="text" size="small">鏌ョ湅</el-button>-->
+                    <!--                        </template>-->
+                    <!--                    </el-table-column>-->
                 </el-table>
                 <!--  </el-card>-->
                 <!-- <el-card class="box-card">
@@ -60,6 +61,7 @@
 import Connectivity from './AnalysisChoose/Connectivity'
 import Tube from './AnalysisChoose/Tube'
 import Flow from './AnalysisChoose/Flow'
+// import CrossSectional from './AnalysisChoose/CrossSectional'
 
 export default {
   name: 'SewersAnalysis',
@@ -67,6 +69,7 @@
     Connectivity,
     Tube,
     Flow
+    // CrossSectional
   },
   data () {
     return {
@@ -118,7 +121,8 @@
       lxTableDataResult: [],
 
       // 妯柇闈� 绠℃鏌ヨ缁撴灉 鐨則able琛ㄦ牸鏁版嵁
-      tableData: []
+      tableData: [],
+      obj: {}
 
     }
   },
@@ -588,33 +592,22 @@
       // 宸茬粯鍒剁嚎鍥� 杩涜缁樺埗妯柇闈㈡暟鎹垎鏋�
       const res = await mapApi.getCrossSection(this.hdmParam)
       console.log(res)
-      // let obj = {}
-      const dataSpacing = res.data.pointInterval
-      console.log(dataSpacing)
-      // for (let i = 0; i < dataSpacing.length; i++) {
-      //   obj.push({
-      //     spacing: dataSpacing[i]
-      //   })
-      //   console.log(obj)
-      // }
-      // const dataPoint = res.data.point
-      // const dataPointjj = res.data.pointInterval
-      // for (let i = 0; i < dataPoint.length; i++) {
-      //   obj = {
-      //     pipename: dataPoint[i].pipelines.extraData.pipename,
-      //     x: dataPoint[i].crossPoint3D.x,
-      //     y: dataPoint[i].crossPoint3D.y,
-      //     z: dataPoint[i].crossPoint3D.z
-      //   }
-      //   this.tableData.push(obj)
-      // }
-      // for (let i = 0; i < dataPointjj.length; i++) {
-      //   obj = {
-      //     pointInterval: dataPointjj[i]
-      //   }
-      //   this.tableData.push(obj)
-      //   console.log(obj)
-      // }
+      const dataPoint = res.data.point
+      // 瀛樺偍闂磋窛list
+      const spacingList = res.data.pointInterval.reverse()
+      // console.log(spacingList)
+      for (let i = 0; i < dataPoint.length; i++) {
+        const obj = {
+          mediumtype: dataPoint[i].pipelines.extraData.mediumtype,
+          x: parseFloat(dataPoint[i].crossPoint3D.x).toFixed(4),
+          y: parseFloat(dataPoint[i].crossPoint3D.y).toFixed(4),
+          z: parseFloat(dataPoint[i].crossPoint3D.z).toFixed(4),
+          spacing: spacingList[i - 1]
+        }
+        this.tableData.push(obj)
+      }
+      // spacingList.reverse()
+      // console.log(spacingList)
       // console.log(this.tableData)
       this.dealWithData(res)
     },

--
Gitblit v1.8.0