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/management/ManagementView.vue | 8 - src/views/management/TaskSummary.vue | 23 --- src/views/visualization/SubtaskVisual.vue | 13 + src/views/visualization/SupervisionVisual.vue | 20 +- src/views/management/TaskStats.vue | 114 ++++++++------- src/components.d.ts | 2 src/views/inspection/WorkStream.vue | 6 src/views/inspection/problem/component/ProblemChangeChart.vue | 8 src/components/search/OptionSceneType.vue | 2 src/utils/map/marks.js | 6 src/stores/subtask.js | 59 +++++++ src/views/inspection/InspectionView.vue | 13 + src/stores/area.js | 18 ++ src/views/inspection/problem/component/ProblemTable.vue | 8 src/api/fysp/taskApi.js | 4 src/components/inspection/TaskItem.vue | 50 ++++-- src/views/main/MonitorView.vue | 27 ++- src/views/visualization/VisualizationView.vue | 8 18 files changed, 238 insertions(+), 151 deletions(-) diff --git a/src/api/fysp/taskApi.js b/src/api/fysp/taskApi.js index b0072b5..bc65451 100644 --- a/src/api/fysp/taskApi.js +++ b/src/api/fysp/taskApi.js @@ -8,6 +8,10 @@ return $fysp.get('task/alltask/0').then((res) => res.data) }, + fetchTopTaskProgress(area) { + return $fysp.post('task/progress', area).then((res) => res.data) + }, + /** * 鏌ヨ鎬讳换鍔� * @param {Object} area diff --git a/src/components.d.ts b/src/components.d.ts index 721575b..6a17f16 100644 --- a/src/components.d.ts +++ b/src/components.d.ts @@ -12,6 +12,7 @@ BaseTable: typeof import('./components/BaseTable.vue')['default'] CoreHeader: typeof import('./components/core/CoreHeader.vue')['default'] DataTable: typeof import('./components/DataTable.vue')['default'] + ElButton: typeof import('element-plus/es')['ElButton'] ElCalendar: typeof import('element-plus/es')['ElCalendar'] ElCard: typeof import('element-plus/es')['ElCard'] ElCascader: typeof import('element-plus/es')['ElCascader'] @@ -31,6 +32,7 @@ ElSegmented: typeof import('element-plus/es')['ElSegmented'] ElSelect: typeof import('element-plus/es')['ElSelect'] ElSpace: typeof import('element-plus/es')['ElSpace'] + ElSpan: typeof import('element-plus/es')['ElSpan'] ElStatistic: typeof import('element-plus/es')['ElStatistic'] ElTable: typeof import('element-plus/es')['ElTable'] ElTableColumn: typeof import('element-plus/es')['ElTableColumn'] diff --git a/src/components/inspection/TaskItem.vue b/src/components/inspection/TaskItem.vue index ca54f28..f508784 100644 --- a/src/components/inspection/TaskItem.vue +++ b/src/components/inspection/TaskItem.vue @@ -1,5 +1,8 @@ <template> <!-- <div class="demo-progress border-r-small"> --> + <el-row justify="end"> + <el-text type="info">{{ name }}</el-text> + </el-row> <el-row justify="space-evenly"> <el-col span="12"> <div class="v-center"> @@ -8,14 +11,14 @@ :width="100" type="circle" status="warning" - :percentage="(finish / total) * 100" + :percentage="percentFormat(completetask, totaltask)" > <template #default="{ percentage }"> <span class="percentage-value">{{ percentage }}%</span> <!-- <span class="percentage-label">{{ finish + '/' + total }}</span> --> </template> </el-progress> - <el-text size="small">{{ finish + '/' + total }}</el-text> + <el-text size="small">{{ completetask + '/' + totaltask }}</el-text> </div> </el-col> <el-col span="12" class="flex-bottom"> @@ -30,7 +33,7 @@ :stroke-width="3" type="circle" status="warning" - :percentage="(item.finish / item.total) * 100" + :percentage="percentFormat(item.finish, item.total)" > <template #default="{ percentage }"> <span class="percentage-value-small">{{ percentage }}%</span> @@ -53,12 +56,15 @@ export default { props: { name: String, + province: String, district: String, planTime: String, startTime: String, endTime: String, userName: String, status: String, + totaltask: Number, + completetask: Number, count: Array }, @@ -67,22 +73,30 @@ }, watch: {}, computed: { - total() { - let t = 0 - this.count.forEach((c) => { - t += c.total - }) - return t - }, - finish() { - let t = 0 - this.count.forEach((c) => { - t += c.finish - }) - return t - } + // total() { + // let t = 0 + // this.count.forEach((c) => { + // t += c.total + // }) + // return t + // }, + // finish() { + // let t = 0 + // this.count.forEach((c) => { + // t += c.finish + // }) + // return t + // } }, - methods: {} + methods: { + percentFormat(finish, total) { + if (total == 0) { + return 0 + } else { + return Math.round((finish / total) * 100) + } + } + } } </script> diff --git a/src/components/search/OptionSceneType.vue b/src/components/search/OptionSceneType.vue index 4fd1f73..2edc18b 100644 --- a/src/components/search/OptionSceneType.vue +++ b/src/components/search/OptionSceneType.vue @@ -59,7 +59,7 @@ sceneTypes() { if (this.sourceInit) { // 褰撳洜涓簍ype鎴栬�卆llOption鍙傛暟鍙樺寲寮曡捣閫夐」鍙樻洿鏃讹紝娓呯┖褰撳墠閫夐」 - this.handleChange() + // this.handleChange() } return enumScene(this.type, this.allOption) } diff --git a/src/stores/area.js b/src/stores/area.js index 933ce87..59e5d8e 100644 --- a/src/stores/area.js +++ b/src/stores/area.js @@ -6,6 +6,9 @@ export const useAreaStore = defineStore('area', { state: () => { return { + locations: {}, + sceneType: {}, + time: '', area: { provincecode: undefined, provincename: undefined, @@ -28,9 +31,19 @@ this.area.cityname = location.cName this.area.districtcode = location.dCode this.area.districtname = location.dName + + this.locations = { + pCode: location.pCode, + pName: location.pName, + cCode: location.cCode, + cName: location.cName, + dCode: location.dCode, + dName: location.dName + } }, setTimePeriod(time, type) { - const d = time ? dayjs(time) : dayjs() + this.time = time ? time : new Date() + const d = dayjs(this.time) this.area.starttime = d.startOf(type).format('YYYY-MM-DD HH:mm:ss') this.area.endtime = d.endOf(type).format('YYYY-MM-DD HH:mm:ss') }, @@ -44,7 +57,8 @@ }, // 璁剧疆鍦烘櫙绫诲瀷 setSceneType(t) { - this.area.scensetypeid = t + this.sceneType = t + this.area.scensetypeid = t.value } } }) diff --git a/src/stores/subtask.js b/src/stores/subtask.js index 8deda39..aaf96cb 100644 --- a/src/stores/subtask.js +++ b/src/stores/subtask.js @@ -1,21 +1,49 @@ -import { ref } from 'vue' +import { ref, unref } from 'vue' import { defineStore } from 'pinia' import timeUtil from '@/utils/time-util' +import { useMapStore } from '@/stores/map.js' +import taskApi from '@/api/fysp/taskApi.js' +import marks from '@/utils/map/marks.js' +import mapUtil from '@/utils/map/util.js' +import scene_1 from '@/assets/icon/scene_1.png' + +const mapStore = useMapStore() // 宸℃煡浠诲姟 export const useSubtaskStore = defineStore('subtask', () => { + // 鎬讳换鍔′俊鎭� + const taskInfo = ref(null) // 褰撴湡鎵�鏈夊贰鏌ョ粺璁′俊鎭� const summaryList = ref([]) + // 姣忔棩鐨勫贰鏌ョ粺璁′俊鎭� const summaryMap = ref(new Map()) const subtaskLoading = ref(false) + const onFetchInfo = [] const onFetchList = [] const onFetchMap = [] + function fetchTopTaskProgress(area) { + subtaskLoading.value = true + taskApi.fetchTopTaskProgress(area).then((res) => { + if (res.data.length == 0) return + const data = res.data[0] + // 瀛樺偍涓哄叏灞�鏁版嵁 + setSummary(data) + subtaskLoading.value = false + // 缁樺埗鍦板浘鏍囪 + marks.createLabelMarks(scene_1, unref(data.subTaskSummary), (v) => { + mapStore.focusMarker = v + }) + mapUtil.setFitView() + }) + } + // 璁剧疆鏂扮殑鍊� function setSummary(data) { - summaryList.value = data + taskInfo.value = data + summaryList.value = data.subTaskSummary summaryMap.value.clear() - data.forEach((e) => { + data.subTaskSummary.forEach((e) => { const tag = timeUtil.formatYMD(e.subtask.planstarttime) if (!summaryMap.value.has(tag)) { summaryMap.value.set(tag, []) @@ -35,6 +63,19 @@ onFetchMap.forEach((e) => { e(summaryMap.value) }) + } + if (onFetchInfo.length > 0) { + onFetchInfo.forEach((e) => { + e(taskInfo.value) + }) + } + } + + function getTaskInfo(callback) { + if (taskInfo.value == null) { + onFetchInfo.push(callback) + } else { + callback(taskInfo.value) } } @@ -58,5 +99,15 @@ } } - return { summaryList, summaryMap, subtaskLoading, setSummary, getSummaryList, getSummaryMap } + return { + // taskInfo, + // summaryList, + // summaryMap, + subtaskLoading, + fetchTopTaskProgress, + setSummary, + getTaskInfo, + getSummaryList, + getSummaryMap + } }) diff --git a/src/utils/map/marks.js b/src/utils/map/marks.js index cfb8e3c..5d1ab3c 100644 --- a/src/utils/map/marks.js +++ b/src/utils/map/marks.js @@ -6,6 +6,7 @@ import util from './util' var _massMarks = undefined +var _labelMarks = undefined export default { /** @@ -72,6 +73,10 @@ }, createLabelMarks(img, dataList, onClick) { + if (_labelMarks) { + map.remove(_labelMarks) + _labelMarks = undefined + } const layer = new AMap.LabelsLayer({ zooms: [3, 20], zIndex: 1000, @@ -138,6 +143,7 @@ layer.add(labelMarker) } + _labelMarks = layer return layer }, diff --git a/src/views/inspection/InspectionView.vue b/src/views/inspection/InspectionView.vue index 2f2a962..cd09278 100644 --- a/src/views/inspection/InspectionView.vue +++ b/src/views/inspection/InspectionView.vue @@ -1,7 +1,14 @@ <template> <div class="wrapper"> - <div>涓氬姟鐘舵�佷腑鎺�</div> - <WorkStream></WorkStream> + <el-row> + <el-col :span="12"> + <!-- <TaskSummary></TaskSummary> --> + <TaskStats></TaskStats> + </el-col> + <el-col :span="12"> + <WorkStream></WorkStream> + </el-col> + </el-row> </div> </template> @@ -9,8 +16,10 @@ /** * 鐜板満宸℃煡瀹炴椂璺熻釜 */ +import TaskSummary from '@/views/management/TaskSummary.vue' import TaskTrack from '@/views/inspection/TaskTrack.vue' import WorkStream from '@/views/inspection/WorkStream.vue' +import TaskStats from '@/views/management/TaskStats.vue' </script> <style scoped> diff --git a/src/views/inspection/WorkStream.vue b/src/views/inspection/WorkStream.vue index 0800f34..6408be8 100644 --- a/src/views/inspection/WorkStream.vue +++ b/src/views/inspection/WorkStream.vue @@ -1,11 +1,12 @@ <template> <!-- <div class="border-r-small m-h-2 p-h-4"> --> <BaseCard> - <div> + <!-- <div> <input type="text" v-model="inputVal" /> <button @click="handleSend">send</button> <button @click="handleLink">link</button> - </div> + </div> --> + <div>涓氬姟鐘舵�佷腑鎺�</div> <el-scrollbar ref="scrollbarRef" :height="height"> <div ref="scrollContentRef"> <div v-for="item in streams" :key="item.index"> @@ -109,6 +110,7 @@ } onMounted(() => { + handleLink() // setInterval(() => { // streams.push({ // time: dayjs().format('YYYY-MM-DD HH:mm:ss'), diff --git a/src/views/inspection/problem/component/ProblemChangeChart.vue b/src/views/inspection/problem/component/ProblemChangeChart.vue index 73703d6..60cc1d7 100644 --- a/src/views/inspection/problem/component/ProblemChangeChart.vue +++ b/src/views/inspection/problem/component/ProblemChangeChart.vue @@ -1,6 +1,6 @@ <template> <el-row justify="space-between"> - <el-col :span="18"> + <el-col :span="24"> <el-text size="small"> 鍦烘櫙鏁帮細{{ sceneNum }}锛岄棶棰樻�绘暟锛歿{ proNum }}锛屽崟鍦烘櫙闂鍧囧�硷細{{ proEachSceneNum }}锛� </el-text> @@ -10,11 +10,11 @@ }}锛屾湁鏁堟暣鏀圭巼锛歿{ changePassPer }} </el-text> </el-col> - <el-col :span="6"> + <!-- <el-col :span="6"> <el-row justify="end"> - <!-- <OptionTime v-model="time"></OptionTime> --> + <OptionTime v-model="time"></OptionTime> </el-row> - </el-col> + </el-col> --> </el-row> <div ref="echart" class="line-chart"></div> </template> diff --git a/src/views/inspection/problem/component/ProblemTable.vue b/src/views/inspection/problem/component/ProblemTable.vue index 7c8753c..f529c6e 100644 --- a/src/views/inspection/problem/component/ProblemTable.vue +++ b/src/views/inspection/problem/component/ProblemTable.vue @@ -105,9 +105,11 @@ const title = row.scene.name const lnglat = [row.scene.longitude, row.scene.latitude] const img = scene_1 - mapUtil.clearViews() - marks.drawMarker(title, lnglat, img) - mapUtil.setFitView() + // mapUtil.clearViews() + // marks.drawMarker(title, lnglat, img) + // mapUtil.setFitView() + mapUtil.setCenter(lnglat) + mapUtil.setZoomSmall() mapStore.focusMarker = row } diff --git a/src/views/main/MonitorView.vue b/src/views/main/MonitorView.vue index 0df6985..bb6117b 100644 --- a/src/views/main/MonitorView.vue +++ b/src/views/main/MonitorView.vue @@ -53,20 +53,23 @@ dCode: '310106', dName: '闈欏畨鍖�' }) -areaStore.setSceneType('1') +areaStore.setSceneType({ label: '宸ュ湴', value: '1' }) // 鑾峰彇鏈湀鐨勬墍鏈夊贰鏌ョ粺璁′俊鎭� -subtaskStore.subtaskLoading = true -taskApi.fetchSubtaskSummaryByArea(areaStore.area).then((res) => { - // 瀛樺偍涓哄叏灞�鏁版嵁 - subtaskStore.setSummary(res.data) - subtaskStore.subtaskLoading = false - // 缁樺埗鍦板浘鏍囪 - marks.createLabelMarks(scene_1, unref(res.data), (v) => { - mapStore.focusMarker = v - }) - mapUtil.setFitView() -}) +subtaskStore.fetchTopTaskProgress(areaStore.area) +// subtaskStore.subtaskLoading = true +// taskApi.fetchTopTaskProgress(areaStore.area).then((res) => { +// if (res.data.length == 0) return +// const data = res.data[0] +// // 瀛樺偍涓哄叏灞�鏁版嵁 +// subtaskStore.setSummary(data) +// subtaskStore.subtaskLoading = false +// // 缁樺埗鍦板浘鏍囪 +// marks.createLabelMarks(scene_1, unref(data.subTaskSummary), (v) => { +// mapStore.focusMarker = v +// }) +// mapUtil.setFitView() +// }) </script> <style scoped> diff --git a/src/views/management/ManagementView.vue b/src/views/management/ManagementView.vue index ed9e01e..3fe6eac 100644 --- a/src/views/management/ManagementView.vue +++ b/src/views/management/ManagementView.vue @@ -1,22 +1,16 @@ <template> <!-- <el-row> 缁熻绠$悊 </el-row> --> <ProblemTrack ref="statusRef"></ProblemTrack> - <!-- <TaskStats ref="statusRef"></TaskStats> --> <EvaluateSummary :height="height"></EvaluateSummary> - <!-- <TaskSummary ref="summaryRef"></TaskSummary> --> - <!-- <ReInspectionView ref="summaryRef"></ReInspectionView> --> </template> <script> -import TaskStats from '@/views/management/TaskStats.vue' -import TaskSummary from '@/views/management/TaskSummary.vue' import EvaluateSummary from '@/views/management/evaluate/EvaluateSummary.vue' -import ReInspectionView from '@/views/inspection/ReInspectionView.vue' import ProblemTrack from '@/views/inspection/problem/ProblemTrack.vue' import { vResize } from '@/utils/resize-observer' export default { - components: { TaskStats, TaskSummary, EvaluateSummary, ReInspectionView, ProblemTrack }, + components: { EvaluateSummary, ProblemTrack }, data() { return { // height: '500px', diff --git a/src/views/management/TaskStats.vue b/src/views/management/TaskStats.vue index 8cf5c36..bcea3c5 100644 --- a/src/views/management/TaskStats.vue +++ b/src/views/management/TaskStats.vue @@ -1,15 +1,16 @@ <template> - <div class="border-r-small"> - <div class="font-large">浠诲姟鐩戞帶</div> - <el-row justify="space-evenly"> - <el-statistic title="浠婃棩瀹屾垚" :value="10"> </el-statistic> - <el-statistic title="鏈懆瀹屾垚" :value="10"> </el-statistic> - </el-row> - <!-- <el-row> --> - <TaskItem v-for="item in tasks" :key="item.guid" v-bind="item"></TaskItem> - <!-- </el-row> --> + <BaseCard> + <div>浠诲姟鐩戞帶</div> + <el-scrollbar ref="scrollbarRef" :height="height"> + <!-- <el-row justify="space-evenly"> + <el-statistic title="浠婃棩瀹屾垚" :value="10"> </el-statistic> + <el-statistic title="鏈懆瀹屾垚" :value="10"> </el-statistic> + </el-row> --> + <!-- <el-row> --> + <TaskItem v-for="item in tasks" :key="item.guid" v-bind="item"></TaskItem> + <!-- </el-row> --> - <!-- <el-row> + <!-- <el-row> <el-col :span="12"> <SelfInspection></SelfInspection> </el-col> @@ -17,62 +18,67 @@ <JointEnforcement></JointEnforcement> </el-col> </el-row> --> - </div> + </el-scrollbar> + </BaseCard> </template> -<script> +<script setup> +import { inject, ref, onMounted, computed } from 'vue' +import { unCalc } from '@/utils/css-util' import SelfInspection from '@/views/inspection/SelfInspection.vue' import JointEnforcement from '@/views/inspection/JointEnforcement.vue' +import { useSubtaskStore } from '@/stores/subtask.js' /** * 浠诲姟瀹屾垚鎯呭喌 */ -export default { - components: { SelfInspection, JointEnforcement }, - props: { - height: String - }, - data() { - return { - tasks: [] - } - }, - watch: {}, - methods: {}, - mounted() { - let i = 0 - while (i < 1) { - this.tasks.push({ - guid: 'SMuheEkjswioSn7A', - name: '2024骞�6鏈堜笂娴峰競闈欏畨鍖哄贰鏌ヤ换鍔�', - district: '闈欏畨鍖�', - planTime: '2024-06', - startTime: '2024-06-01 00:00:00', - endTime: '2024-06-30 23:59:59', - userName: '鏈辨寮�#閭㈠瓙鐞�', - status: '姝e湪鎵ц', - count: [ - { - sceneType: '宸ュ湴', - total: 90, - finish: 45 - }, - { - sceneType: '椁愰ギ', - total: 90, - finish: 45 - }, - { - sceneType: '姹戒慨', - total: 90, - finish: 45 - } - ] +const excludeMapHeight = inject('excludeMapHeight') +const height = ref(`calc(${unCalc(excludeMapHeight)} - 36px)`) + +const subtaskStore = useSubtaskStore() +const tasks = ref([]) +const sceneTaskMap = ref(new Map()) + +function onGetTaskInfo(tInfo) { + const resList = [] + sceneTaskMap.value.clear() + const total = tInfo.totaltask + tInfo.subTaskSummary.forEach((s) => { + if (!sceneTaskMap.value.has(s.scene.type)) { + sceneTaskMap.value.set(s.scene.type, { + sceneType: s.scene.type, + total: total, + finish: 0 }) - i++ } + const st = sceneTaskMap.value.get(s.scene.type) + st.finish++ + }) + + const task = { + name: tInfo.name, + province: tInfo.provinceName, + district: tInfo.districtName, + totaltask: tInfo.totaltask, + completetask: tInfo.completetask, + count: [] } + + for (const key of sceneTaskMap.value.keys()) { + const value = sceneTaskMap.value.get(key) + task.count.push(value) + } + resList.push(task) + tasks.value = resList } + +function cal() { + subtaskStore.getTaskInfo(onGetTaskInfo) +} + +onMounted(() => { + cal() +}) </script> <style scoped> diff --git a/src/views/management/TaskSummary.vue b/src/views/management/TaskSummary.vue index de24fc4..7334b97 100644 --- a/src/views/management/TaskSummary.vue +++ b/src/views/management/TaskSummary.vue @@ -1,5 +1,5 @@ <template> - <div class="border-r-small"> + <BaseCard> <el-row> 宸℃煡姹囨�� </el-row> <el-segmented v-model="value" :options="options" /> <div><el-text tag="i"> 璇勪及 </el-text></div> @@ -62,26 +62,7 @@ <el-statistic title="宸叉暣鏀�" :value="2" :value-style="styleGreen"> </el-statistic> <el-statistic title="寰呯‘璁�" :value="2" :value-style="styleGreen"> </el-statistic> </el-row> - <!-- <el-row> - <el-col :span="8"> - <TaskSummaryItem title="浠婃棩姹囨��"></TaskSummaryItem> - </el-col> - <el-col :span="8"> - <TaskSummaryItem title="鍛ㄥ害姹囨��"></TaskSummaryItem> - </el-col> - <el-col :span="8"> - <TaskSummaryItem title="鏈堝害姹囨��"></TaskSummaryItem> - </el-col> - </el-row> - <el-row> - <el-col :span="12"> - <TaskSummaryItem title="瀛e害姹囨��"></TaskSummaryItem> - </el-col> - <el-col :span="12"> - <TaskSummaryItem title="骞村害姹囨��"></TaskSummaryItem> - </el-col> - </el-row> --> - </div> + </BaseCard> </template> <script> diff --git a/src/views/visualization/SubtaskVisual.vue b/src/views/visualization/SubtaskVisual.vue index b1957ba..185b452 100644 --- a/src/views/visualization/SubtaskVisual.vue +++ b/src/views/visualization/SubtaskVisual.vue @@ -1,7 +1,10 @@ <template> <el-scrollbar v-if="mapStore.focusMarker" :height="mapHeight"> <el-card class="p-events-auto wrapper"> - <div class="font-small">{{ scene.name }}</div> + <el-row justify="space-between"> + <div class="font-small">{{ scene.name }}</div> + <el-button icon="Close" circle @click="mapStore.focusMarker = undefined"></el-button> + </el-row> <el-divider></el-divider> <div class="font-small">鐘舵�侊細{{ subtask.status }}</div> <div class="font-small">璁″垝锛歿{ $fm.formatYMD(subtask.planstarttime) }}</div> @@ -109,18 +112,18 @@ computed: { ...mapStores(useMapStore), subtask() { - return this.mapStore.focusMarker ? this.mapStore.focusMarker.subtask : {} + return this.mapStore.focusMarker ? this.mapStore.focusMarker.subtask : undefined }, scene() { - return this.mapStore.focusMarker ? this.mapStore.focusMarker.scene : {} + return this.mapStore.focusMarker ? this.mapStore.focusMarker.scene : undefined }, inspection() { - return this.mapStore.focusMarker ? this.mapStore.focusMarker.inspection : {} + return this.mapStore.focusMarker ? this.mapStore.focusMarker.inspection : undefined } }, watch: { subtask(nV, oV) { - if (nV != oV) { + if (nV != undefined && nV != oV) { this.fetchProblem(nV.stguid) } } diff --git a/src/views/visualization/SupervisionVisual.vue b/src/views/visualization/SupervisionVisual.vue index 6d593c6..9d33e29 100644 --- a/src/views/visualization/SupervisionVisual.vue +++ b/src/views/visualization/SupervisionVisual.vue @@ -14,6 +14,7 @@ v-model="sceneType" ></OptionSceneType> <OptionTime v-model="time"></OptionTime> + <el-button size="small" @click="fetchTaskProgress">鏌ヨ</el-button> </div> </el-row> </template> @@ -21,6 +22,7 @@ <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' @@ -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, unref(data)) + this.subtaskStore.fetchTopTaskProgress(this.areaStore.area) } }, mounted() { diff --git a/src/views/visualization/VisualizationView.vue b/src/views/visualization/VisualizationView.vue index 8559d60..d3821d1 100644 --- a/src/views/visualization/VisualizationView.vue +++ b/src/views/visualization/VisualizationView.vue @@ -2,12 +2,14 @@ <!-- <el-row class="wrapper"> 鍙鍖� </el-row> --> <BaseMap></BaseMap> <el-row class="overlay-container" :style="height"> - <el-col :span="14"> - <SupervisionVisual></SupervisionVisual> - </el-col> <el-col :span="10"> <SubtaskVisual></SubtaskVisual> </el-col> + <el-col :span="14"> + <el-row justify="end"> + <SupervisionVisual></SupervisionVisual> + </el-row> + </el-col> </el-row> </template> -- Gitblit v1.9.3