riku
2025-06-09 38ff09bd2a638bc43a365efe0390cc3510d62e68
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
<template>
  <el-row justify="center" class="wrapper">
    <div class="p-events-auto sv-content">
      <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 :loading="subtaskStore.subtaskLoading" size="small" @click="fetchTaskProgress"
        >查询</el-button
      >
    </div>
  </el-row>
</template>
 
<script>
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'
import marks from '@/utils/map/marks.js'
import scene_1 from '@/assets/icon/scene_1.png'
/**
 * 监管可视化
 * 展现区域整体监管状态
 */
export default {
  setup() {
    const mapHeight = inject('mapHeight')
 
    const height = 'height:' + mapHeight
    return { height, mapHeight }
  },
  props: {},
  data() {
    return {
      locations: {
        pCode: '31',
        pName: '上海市',
        cCode: '3100',
        cName: '上海市',
        dCode: '310106',
        dName: '静安区'
      },
      sceneType: {
        label: '工地',
        value: '1'
      },
      time: ''
    }
  },
  computed: {
    ...mapStores(useAreaStore),
    ...mapStores(useSubtaskStore)
    // 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: {
    // 查询
    fetchTaskProgress() {
      this.areaStore.setLocation(this.locations)
      this.areaStore.setTimeOneMonth(this.time)
      this.areaStore.setSceneType(this.sceneType)
 
      this.subtaskStore.fetchTopTaskProgress(this.areaStore.area)
    }
  },
  mounted() {
    // this.fetchTaskProgress()
  }
}
</script>
 
<style scoped>
.wrapper {
  pointer-events: none;
}
 
.sv-content {
  background-color: #14428be8;
  border: 2px solid rgb(255, 255, 255);
  border-radius: 8px;
  padding: 4px;
}
</style>