From 548dcb58164aaeb7ec8a4f3425953bcd25d83c65 Mon Sep 17 00:00:00 2001
From: shuishen <1109946754@qq.com>
Date: Wed, 15 Jan 2025 18:40:00 +0800
Subject: [PATCH] 应急空间位置更新

---
 src/views/space/components/leftContainer.vue |  119 +++++++++++++++++++++++++++++++++++------------------------
 1 files changed, 70 insertions(+), 49 deletions(-)

diff --git a/src/views/space/components/leftContainer.vue b/src/views/space/components/leftContainer.vue
index bbf0452..8ae58ce 100644
--- a/src/views/space/components/leftContainer.vue
+++ b/src/views/space/components/leftContainer.vue
@@ -2,32 +2,58 @@
  * @Author: shuishen 1109946754@qq.com
  * @Date: 2023-03-10 15:27:59
  * @LastEditors: shuishen 1109946754@qq.com
- * @LastEditTime: 2024-11-18 16:10:10
+ * @LastEditTime: 2024-12-16 17:42:03
  * @FilePath: \bigScreen\src\views\space\components\leftContainer.vue
- * @Description: 
- * 
- * Copyright (c) 2023 by ${git_name_email}, All Rights Reserved. 
+ * @Description:
+ *
+ * Copyright (c) 2023 by ${git_name_email}, All Rights Reserved.
 -->
 <script setup>
 import EventBus from 'utils/bus'
 
-import { getDictionary } from "@/api/dict/dict"
 import { onUnmounted, reactive } from 'vue'
 const resData = reactive({
-  data: []
+  data: [
+    {
+      label: '应急池',
+      value: 1,
+    },
+    {
+      label: '阀门',
+      value: 2,
+    },
+    {
+      label: '水库',
+      value: 5,
+    },
+    {
+      label: '坑塘',
+      value: 6,
+    },
+    {
+      label: '明渠',
+      value: 7,
+    },
+    {
+      label: '桥梁',
+      value: 8,
+    },
+    {
+      label: '湿地',
+      value: 9,
+    },
+    {
+      label: '洼地',
+      value: 10,
+    },
+    {
+      label: '闸坝',
+      value: 11,
+    },
+  ]
 })
 
 const gawList = ref([
-  {
-    label: '给水管网',
-    value: "3-3-1",
-    select: false
-  },
-  {
-    label: '燃气管网',
-    value: "3-3-3",
-    select: false
-  },
   {
     label: '污水管网',
     value: "3-3-2",
@@ -36,44 +62,34 @@
   {
     label: '雨水管网',
     value: "3-3-4",
-    select: true
+    select: false
   },
 ])
 const curSelect = ref('')
 
-// 获取下拉字典
-const getDictData = (code) => {
-  const param = {
-    code: code,
-  }
-  getDictionary(param).then((res) => {
-    resData.data = res.data.data.map(item => {
-      return {
-        label: item.dictValue,
-        value: item.dictKey
-      }
-    })
-
-    tabClick(resData.data[0])
-  })
-}
-
 const tabClick = (item) => {
-  console.log('tabClick', item)
+  EventBus.emit('destroyPop', 'destroyPop')
   if (curSelect.value) {
     if (curSelect.value == '3') {
+      EventBus.emit('restHandleDelChange', `3-3`)
       EventBus.emit('restHandleDelChange', `3-3-1`)
       EventBus.emit('restHandleDelChange', `3-3-2`)
       EventBus.emit('restHandleDelChange', `3-3-3`)
       EventBus.emit('restHandleDelChange', `3-3-4`)
     } else {
+      gawList.value.forEach(element => {
+        if (element.value == `3-3-2`) {
+          element.select = true
+        } else {
+          element.select = false
+        }
+      })
       EventBus.emit('restHandleDelChange', `3-${curSelect.value}`)
     }
   }
   curSelect.value = item.value
   if (item.value == '3') {
     EventBus.emit('restHandleCheckChange', `3-3-2`)
-    EventBus.emit('restHandleCheckChange', `3-3-4`)
   } else {
     EventBus.emit('restHandleCheckChange', `3-${item.value}`)
   }
@@ -98,7 +114,9 @@
   return false
 })
 
-getDictData("emergency_space_type")
+onMounted(() => {
+  tabClick(resData.data[0])
+})
 
 onUnmounted(() => {
   if (curSelect.value) EventBus.emit('restHandleDelChange', `3-${curSelect.value}`)
@@ -122,8 +140,8 @@
       </div>
     </div>
     <div v-if="curSelect == '3'">
-      <div class="left-container cur-container-title">
-        <div class="tablist h100">
+      <div class="cur-container-title">
+        <div class="tablist">
           <div class="cursor-p" :class="{ on: item.select }" v-for="item, index in gawList" :key="index"
             @click="tabClickGW(item)">
             <div class="label-box">
@@ -139,7 +157,7 @@
 
 <style lang="scss" scoped>
 .left-container {
-  width: 64px;
+  width: auto;
 }
 
 .cur-container {
@@ -156,12 +174,13 @@
       margin-top: 10px;
       padding: 8px;
       width: 64px;
-      height: 64px;
+      height: 48px;
 
       border-radius: 50%;
       box-shadow: inset 0 0 40px #409eff;
       color: #fff;
       box-sizing: content-box;
+      font-size: 12px;
 
       &.on {
         position: relative;
@@ -170,7 +189,8 @@
       }
 
       .label-box {
-        line-height: 24px;
+        padding: 8px;
+        line-height: 20px;
         text-align: center;
       }
     }
@@ -181,8 +201,7 @@
   background: transparent;
   pointer-events: none;
   margin-left: 120px;
-  margin-top: 60px;
-  font-size: 12px;
+  margin-top: 120px;
 
   .tablist {
     pointer-events: all;
@@ -193,13 +212,14 @@
       justify-content: center;
       margin-top: 10px;
       padding: 8px;
-      width: 54px;
-      height: 54px;
+      width: 64px;
+      height: 48px;
 
+      color: #fff;
       border-radius: 50%;
       box-shadow: inset 0 0 40px #409eff;
-      color: #fff;
       box-sizing: content-box;
+      font-size: 12px;
 
       &.on {
         position: relative;
@@ -208,10 +228,11 @@
       }
 
       .label-box {
-        line-height: 14px;
+        padding: 8px;
+        line-height: 16px;
         text-align: center;
       }
     }
   }
 }
-</style>
\ No newline at end of file
+</style>

--
Gitblit v1.9.3