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 |   59 +++++++++++++++++++++++++++++++++++++++++++++++++++--------
 1 files changed, 51 insertions(+), 8 deletions(-)

diff --git a/src/views/main/MonitorView.vue b/src/views/main/MonitorView.vue
index 4a88dca..0df6985 100644
--- a/src/views/main/MonitorView.vue
+++ b/src/views/main/MonitorView.vue
@@ -1,6 +1,11 @@
 <template>
   <el-row>
-    <el-col :span="16">
+    <el-col :span="7" class="page-right">
+      <el-scrollbar height="var(--fy-body-height)">
+        <ManagementView></ManagementView>
+      </el-scrollbar>
+    </el-col>
+    <el-col :span="17">
       <el-scrollbar class="page-left-top">
         <VisualizationView></VisualizationView>
       </el-scrollbar>
@@ -8,31 +13,69 @@
         <InspectionView></InspectionView>
       </el-scrollbar>
     </el-col>
-    <el-col :span="8" class="page-right">
+    <!-- <el-col :span="7" class="page-right">
       <el-scrollbar height="var(--fy-body-height)">
-        <ManagementView></ManagementView>
+        <StatisticView></StatisticView>
       </el-scrollbar>
-    </el-col>
+    </el-col> -->
   </el-row>
 </template>
 
 <script setup>
+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'
 
-import { provide } from 'vue'
+provide('mapHeight', 'calc(var(--fy-body-height) / 4 * 3)')
+provide('excludeMapHeight', 'calc(var(--fy-body-height) / 4 * 1)')
+const windowHeight = ref(window.innerHeight)
 
-provide('mapHeight', 'calc(var(--fy-body-height) / 3 * 2)')
+const areaStore = useAreaStore()
+const subtaskStore = useSubtaskStore()
+const mapStore = useMapStore()
+
+// 鍒濆鍖栨煡璇㈣寖鍥�
+areaStore.setTimeOneMonth()
+areaStore.setLocation({
+  pCode: '31',
+  pName: '涓婃捣甯�',
+  cCode: '3100',
+  cName: '涓婃捣甯�',
+  dCode: '310106',
+  dName: '闈欏畨鍖�'
+})
+areaStore.setSceneType('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>
 .page-left-top {
-  height: calc(var(--fy-body-height) / 3 * 2);
+  height: calc(var(--fy-body-height) / 4 * 3);
   /* background-color: aquamarine; */
 }
 .page-left-bottom {
-  height: calc(var(--fy-body-height) / 3 * 1);
+  height: calc(var(--fy-body-height) / 4 * 1);
   /* background-color: bisque; */
 }
 

--
Gitblit v1.9.3