| | |
| | | <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> |
| | |
| | | |
| | | <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' |
| | |
| | | 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) |
| | |
| | | } |
| | | }, |
| | | mounted() { |
| | | this.fetchSubtaskSummaryArea() |
| | | // this.fetchTaskProgress() |
| | | } |
| | | } |
| | | </script> |