From 89ab2ec7f8790c5cc184de98682af032c69c2afc Mon Sep 17 00:00:00 2001
From: riku <risaku@163.com>
Date: 星期三, 11 九月 2024 15:13:27 +0800
Subject: [PATCH] 2024.9.11

---
 src/views/visualization/SupervisionVisual.vue |   50 ++++++++++++++++++++++++++++++++------------------
 1 files changed, 32 insertions(+), 18 deletions(-)

diff --git a/src/views/visualization/SupervisionVisual.vue b/src/views/visualization/SupervisionVisual.vue
index c14bbdd..9d33e29 100644
--- a/src/views/visualization/SupervisionVisual.vue
+++ b/src/views/visualization/SupervisionVisual.vue
@@ -1,16 +1,28 @@
 <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>
+      <el-button size="small" @click="fetchTaskProgress">鏌ヨ</el-button>
     </div>
   </el-row>
 </template>
 
 <script>
-import { inject } from 'vue'
+import { inject, unref } from 'vue'
 import { useAreaStore } from '@/stores/area.js'
+import { useSubtaskStore } from '@/stores/subtask.js'
 import { mapStores } from 'pinia'
 
 import taskApi from '@/api/fysp/taskApi.js'
@@ -30,13 +42,24 @@
   props: {},
   data() {
     return {
-      locations: {},
-      sceneType: {},
+      locations: {
+        pCode: '31',
+        pName: '涓婃捣甯�',
+        cCode: '3100',
+        cName: '涓婃捣甯�',
+        dCode: '310106',
+        dName: '闈欏畨鍖�'
+      },
+      sceneType: {
+        label: '宸ュ湴',
+        value: '1'
+      },
       time: ''
     }
   },
   computed: {
-    ...mapStores(useAreaStore)
+    ...mapStores(useAreaStore),
+    ...mapStores(useSubtaskStore)
     // area() {
     //   return {
     //     provincecode: this.locations.pCode,
@@ -54,19 +77,10 @@
     // 鏌ヨ
     fetchTaskProgress() {
       this.areaStore.setLocation(this.locations)
-      this.areaStore.setTimeOneDay(this.time)
-      this.areaStore.setSceneType(this.sceneType.value)
+      this.areaStore.setTimeOneMonth(this.time)
+      this.areaStore.setSceneType(this.sceneType)
 
-      return taskApi.fetchTaskProgress(this.areaStore.area).then((res) => {
-        let list = []
-        res.data.forEach((e) => {
-          list = list.concat(e.subTaskSummary)
-        })
-        this.newLabelMasks(list)
-      })
-    },
-    newLabelMasks(data) {
-      marks.createLabelMarks(scene_1, data)
+      this.subtaskStore.fetchTopTaskProgress(this.areaStore.area)
     }
   },
   mounted() {

--
Gitblit v1.9.3