From 234409bb4a612c5b69b78b1e844492f0a7122521 Mon Sep 17 00:00:00 2001
From: TreeWish <1131093754@qq.com>
Date: 星期二, 28 二月 2023 19:15:32 +0800
Subject: [PATCH] 工程&管线接口对接

---
 src/components/Screen/left.vue |   89 +++++++++++++++++++++++++++++++++++++-------
 1 files changed, 74 insertions(+), 15 deletions(-)

diff --git a/src/components/Screen/left.vue b/src/components/Screen/left.vue
index eb15e3c..2f30e4b 100644
--- a/src/components/Screen/left.vue
+++ b/src/components/Screen/left.vue
@@ -20,33 +20,47 @@
     <!-- 鍏ㄧ悆銆佸叏鍥界粺璁℃鏁� -->
     <div class="leftContainer" v-if="currentDisplay == '椤圭洰'">
       <div class="current1" id="leftCurrent1">
-        <div class="aside-title">鍥藉唴銆佸浗澶�</div>
+        <div class="aside-title">鏁版嵁鎬昏</div>
+        <div class="wrapper">
+          <div class="title">{{ currentProject }}</div>
+          <dv-digital-flop style="height: 40px" :config="xmCountConfig" />
+        </div>
       </div>
       <div class="current1" id="leftCurrent2">
-        <div class="aside-title">缁熻鍦扮伨銆佹礊搴撶瓑涓撲笟鏁版嵁瀛樺偍閲�</div>
-        <base-line-chart :project="currProject"></base-line-chart>
+        <div class="aside-title">瀛樺偍淇℃伅</div>
+        <base-line-chart
+          :requsetFn="requsetFn"
+          :project="currentProject"
+          title="鏁版嵁瀛樺偍閲�"
+        ></base-line-chart>
       </div>
       <div class="current1" id="leftCurrent3">
         <div class="aside-title">鏁版嵁瀛樺偍閲�</div>
-        <data-storage></data-storage>
+        <data-storage-type></data-storage-type>
       </div>
     </div>
     <!-- 鍏ㄧ悆銆佸叏鍥界缃戝浘 -->
     <div class="leftContainer" v-if="currentDisplay == '绠$綉'">
       <div class="current1" id="leftCurrent1">
-        <div class="aside-title">绠$綉鍥藉唴銆佸浗澶�</div>
-        <!-- <base-bar-chart :project="currProject"></base-bar-chart> -->
-        <!-- <count-data-apply></count-data-apply> -->
+        <div class="aside-title">鏁版嵁鎬昏</div>
+        <div class="wrapper">
+          <div class="title">{{ currentProject }}</div>
+          <dv-digital-flop style="height: 40px" :config="xmCountConfig" />
+        </div>
       </div>
       <div class="current1" id="leftCurrent2">
-        <div class="aside-title">杈撻�佷粙璐ㄧ被鍒粺璁¢暱搴�</div>
-        <base-line-chart :project="currProject"></base-line-chart>
-        <!-- <base-pie-chart :project="currProject"></base-pie-chart> -->
+        <div class="aside-title">绠$綉闀垮害</div>
+        <base-line-chart
+          :requsetFn="requsetFn"
+          :project="currentProject"
+          title="绠$綉闀垮害"
+        ></base-line-chart>
+        <!-- <base-pie-chart :project="currentProject"></base-pie-chart> -->
         <!-- <service-type></service-type> -->
       </div>
       <div class="current1" id="leftCurrent3">
         <div class="aside-title">鏁版嵁瀛樺偍閲�</div>
-        <data-storage></data-storage>
+        <data-storage-type></data-storage-type>
       </div>
     </div>
     <!-- 鍗曚釜宸ョ▼灞曠ず -->
@@ -64,9 +78,6 @@
         <projectTime></projectTime>
       </div>
     </div>
-    <!-- <div class="leftContainer" v-if="ProjectreeDisplay">
-      <project-tree></project-tree>
-    </div> -->
   </div>
 </template>
 <script>
@@ -74,13 +85,28 @@
 import countDataApply from "@/components/chart/CountDataApply.vue"
 import ServiceType from "../chart/ServiceType.vue"
 import DataStorage from "../chart/DataStorage.vue"
+import DataStorageType from "../chart/DataStorageType.vue"
+
 import BaseBarChart from "../chart/BaseBarChart.vue"
 import BaseLineChart from "../chart/BaseLineChart.vue"
 import BasePieChart from "../chart/BasePieChart .vue"
 import projectintroduction from "../chart/projectintroduction.vue"
 import projectState from "../chart/projectState.vue"
 import projectTime from "../chart/projectTime.vue"
+import {
+  countCountryDimension,
+  countProvinceDimension,
+  countZhPipeStations,
+  countZhPipeMapLength,
+} from "@/api/screen.js"
+function formatter(number) {
+  const numbers = number.toString().split("").reverse()
+  const segs = []
 
+  while (numbers.length) segs.push(numbers.splice(0, 3).join(""))
+
+  return segs.join(",").split("").reverse().join("")
+}
 export default {
   components: {
     ProjectTree,
@@ -93,6 +119,7 @@
     projectintroduction,
     projectState,
     projectTime,
+    DataStorageType
   },
   data() {
     return {
@@ -102,8 +129,14 @@
       GlobleChartDisplay: false,
       CountryChartDisplay: false,
       leftImg: require("../../assets/img/Screen/rightArrow.png"),
-      currProject: "鍏ㄧ悆椤圭洰",
+      currentProject: "鍏ㄧ悆椤圭洰",
       currentDisplay: "澶у睆",
+      requsetFn: countZhPipeMapLength,
+      xmCountConfig: {
+        number: [0],
+        content: "{nt}",
+        formatter,
+      },
     }
   },
   mounted() {
@@ -118,7 +151,16 @@
       } else {
         this.currentDisplay = "宸ョ▼"
       }
+
       this.currentProject = name
+    })
+    this.$bus.$on("changeCount", count => {
+      if (typeof count == "number") {
+        this.xmCountConfig.number = [count]
+        this.xmCountConfig = {
+          ...this.xmCountConfig,
+        }
+      }
     })
   },
   methods: {
@@ -639,6 +681,23 @@
       background-size: 100% 100%;
       background-repeat: no-repeat;
     }
+    .wrapper {
+      display: flex;
+      flex-direction: column;
+      justify-content: center;
+      margin: 15px auto;
+      width: 180px;
+      height: 180px;
+      background: url(../../assets/img/Screen/all.png);
+      background-size: 100% 100%;
+      background-repeat: no-repeat;
+      .title {
+        color: #fff;
+        font-size: 20px;
+        width: 100%;
+        text-align: center;
+      }
+    }
   }
 }
 </style>

--
Gitblit v1.9.3