Riku
2025-06-23 ff82e86becbd200adabd2ce56fba1f6b3c6c37e1
src/views/visualization/SupervisionVisual.vue
@@ -1,6 +1,6 @@
<template>
  <el-row>
    <div class="p-events-auto">
  <el-row justify="center" class="wrapper">
    <div class="p-events-auto sv-content">
      <OptionLocation
        :level="3"
        :width="170"
@@ -14,13 +14,17 @@
        v-model="sceneType"
      ></OptionSceneType>
      <OptionTime v-model="time"></OptionTime>
      <el-button :loading="subtaskStore.subtaskLoading" 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'
@@ -45,18 +49,19 @@
        pName: '上海市',
        cCode: '3100',
        cName: '上海市',
        dCode: '310106',
        dName: '静安区'
        dCode: '310104',
        dName: '徐汇区'
      },
      sceneType: {
        label: '工地',
        value: '1'
        label: '全部场景',
        value: null
      },
      time: ''
    }
  },
  computed: {
    ...mapStores(useAreaStore)
    ...mapStores(useAreaStore),
    ...mapStores(useSubtaskStore)
    // area() {
    //   return {
    //     provincecode: this.locations.pCode,
@@ -74,19 +79,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() {
@@ -95,4 +91,15 @@
}
</script>
<style scoped></style>
<style scoped>
.wrapper {
  pointer-events: none;
}
.sv-content {
  background-color: #14428be8;
  border: 2px solid rgb(255, 255, 255);
  border-radius: 8px;
  padding: 4px;
}
</style>