riku
2024-09-11 89ab2ec7f8790c5cc184de98682af032c69c2afc
src/views/visualization/SupervisionVisual.vue
@@ -14,13 +14,15 @@
        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'
@@ -56,7 +58,8 @@
    }
  },
  computed: {
    ...mapStores(useAreaStore)
    ...mapStores(useAreaStore),
    ...mapStores(useSubtaskStore)
    // area() {
    //   return {
    //     provincecode: this.locations.pCode,
@@ -74,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() {