From d00a9f035aec50c37c8e0a1363a1968672fb875f Mon Sep 17 00:00:00 2001
From: riku <risaku@163.com>
Date: 星期二, 16 七月 2024 16:58:39 +0800
Subject: [PATCH] 2024.7.16

---
 src/views/main/MonitorView.vue |   44 ++++++++++++++++++++++++++++++--------------
 1 files changed, 30 insertions(+), 14 deletions(-)

diff --git a/src/views/main/MonitorView.vue b/src/views/main/MonitorView.vue
index 6591259..0df6985 100644
--- a/src/views/main/MonitorView.vue
+++ b/src/views/main/MonitorView.vue
@@ -5,7 +5,7 @@
         <ManagementView></ManagementView>
       </el-scrollbar>
     </el-col>
-    <el-col :span="10">
+    <el-col :span="17">
       <el-scrollbar class="page-left-top">
         <VisualizationView></VisualizationView>
       </el-scrollbar>
@@ -13,25 +13,38 @@
         <InspectionView></InspectionView>
       </el-scrollbar>
     </el-col>
-    <el-col :span="7" class="page-right">
+    <!-- <el-col :span="7" class="page-right">
       <el-scrollbar height="var(--fy-body-height)">
         <StatisticView></StatisticView>
       </el-scrollbar>
-    </el-col>
+    </el-col> -->
   </el-row>
 </template>
 
 <script setup>
-import { provide, ref } from 'vue'
+import { provide, ref, unref } from 'vue'
 import InspectionView from '@/views/inspection/InspectionView.vue'
 import ManagementView from '@/views/management/ManagementView.vue'
 import StatisticView from '@/views/management/StatisticView.vue'
 import VisualizationView from '@/views/visualization/VisualizationView.vue'
 import { useAreaStore } from '@/stores/area.js'
+import { useSubtaskStore } from '@/stores/subtask.js'
+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'
 
+provide('mapHeight', 'calc(var(--fy-body-height) / 4 * 3)')
+provide('excludeMapHeight', 'calc(var(--fy-body-height) / 4 * 1)')
 const windowHeight = ref(window.innerHeight)
+
 const areaStore = useAreaStore()
-areaStore.setTimeOneDay()
+const subtaskStore = useSubtaskStore()
+const mapStore = useMapStore()
+
+// 鍒濆鍖栨煡璇㈣寖鍥�
+areaStore.setTimeOneMonth()
 areaStore.setLocation({
   pCode: '31',
   pName: '涓婃捣甯�',
@@ -42,15 +55,18 @@
 })
 areaStore.setSceneType('1')
 
-// const headerHeight = computed(()=>{
-//   return
-// })
-// fetch('../../assets/styles/layout.scss').then((res) => {
-//   console.log(res.text())
-// })
-
-provide('mapHeight', 'calc(var(--fy-body-height) / 4 * 3)')
-provide('excludeMapHeight', 'calc(var(--fy-body-height) / 4 * 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()
+})
 </script>
 
 <style scoped>

--
Gitblit v1.9.3