From b292a0a81869547e94fd85e783f9597db241a87e Mon Sep 17 00:00:00 2001
From: riku <risaku@163.com>
Date: 星期一, 15 七月 2024 17:30:37 +0800
Subject: [PATCH] 2024.7.15

---
 src/views/visualization/SupervisionVisual.vue |   66 +++++++++++++++++++++++---------
 1 files changed, 47 insertions(+), 19 deletions(-)

diff --git a/src/views/visualization/SupervisionVisual.vue b/src/views/visualization/SupervisionVisual.vue
index d362111..795a7da 100644
--- a/src/views/visualization/SupervisionVisual.vue
+++ b/src/views/visualization/SupervisionVisual.vue
@@ -1,8 +1,18 @@
 <template>
   <el-row>
     <div class="p-events-auto">
-      <OptionLocation :level="3" :width="170" v-model="locations"></OptionLocation>
-      <OptionSceneType :type="2" :width="120" v-model="sceneType"></OptionSceneType>
+      <OptionLocation
+        :level="3"
+        :width="170"
+        :initValue="false"
+        v-model="locations"
+      ></OptionLocation>
+      <OptionSceneType
+        :type="2"
+        :width="120"
+        :initValue="false"
+        v-model="sceneType"
+      ></OptionSceneType>
       <OptionTime v-model="time"></OptionTime>
     </div>
   </el-row>
@@ -10,6 +20,9 @@
 
 <script>
 import { inject } from 'vue'
+import { useAreaStore } from '@/stores/area.js'
+import { mapStores } from 'pinia'
+
 import taskApi from '@/api/fysp/taskApi.js'
 import marks from '@/utils/map/marks.js'
 import scene_1 from '@/assets/icon/scene_1.png'
@@ -27,29 +40,44 @@
   props: {},
   data() {
     return {
-      locations: {},
-      sceneType: {},
+      locations: {
+        pCode: '31',
+        pName: '涓婃捣甯�',
+        cCode: '3100',
+        cName: '涓婃捣甯�',
+        dCode: '310106',
+        dName: '闈欏畨鍖�'
+      },
+      sceneType: {
+        label: '宸ュ湴',
+        value: '1'
+      },
       time: ''
     }
   },
   computed: {
-    area() {
-      return {
-        provincecode: this.locations.pCode,
-        provincename: this.locations.pName,
-        citycode: this.locations.cCode,
-        cityname: this.locations.cName,
-        districtcode: this.locations.dCode,
-        districtname: this.locations.dName,
-        starttime: this.$fm.formatYMDH(this.time),
-        scensetypeid: this.sceneType.value
-      }
-    }
+    ...mapStores(useAreaStore)
+    // area() {
+    //   return {
+    //     provincecode: this.locations.pCode,
+    //     provincename: this.locations.pName,
+    //     citycode: this.locations.cCode,
+    //     cityname: this.locations.cName,
+    //     districtcode: this.locations.dCode,
+    //     districtname: this.locations.dName,
+    //     starttime: this.$fm.formatYMDH(this.time),
+    //     scensetypeid: this.sceneType.value
+    //   }
+    // }
   },
   methods: {
     // 鏌ヨ
-    fetchSubtaskSummaryArea() {
-      return taskApi.fetchSubtaskSummaryArea(this.area).then((res) => {
+    fetchTaskProgress() {
+      this.areaStore.setLocation(this.locations)
+      this.areaStore.setTimeOneDay(this.time)
+      this.areaStore.setSceneType(this.sceneType.value)
+
+      return taskApi.fetchTaskProgress(this.areaStore.area).then((res) => {
         let list = []
         res.data.forEach((e) => {
           list = list.concat(e.subTaskSummary)
@@ -62,7 +90,7 @@
     }
   },
   mounted() {
-    this.fetchSubtaskSummaryArea()
+    // this.fetchTaskProgress()
   }
 }
 </script>

--
Gitblit v1.9.3