智慧园区前端大屏
shuishen
2024-12-16 14230ac0316d1e403c54b5a73430bad8ebad00e7
src/views/space/components/leftContainer.vue
@@ -2,7 +2,7 @@
 * @Author: shuishen 1109946754@qq.com
 * @Date: 2023-03-10 15:27:59
 * @LastEditors: shuishen 1109946754@qq.com
 * @LastEditTime: 2024-11-28 11:35:07
 * @LastEditTime: 2024-12-16 17:42:03
 * @FilePath: \bigScreen\src\views\space\components\leftContainer.vue
 * @Description:
 *
@@ -11,10 +11,46 @@
<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([
@@ -30,23 +66,6 @@
  },
])
const curSelect = ref('')
// 获取下拉字典
const getDictData = (code) => {
  const param = {
    code: code,
  }
  getDictionary(param).then((res) => {
    resData.data = res.data.data.filter(i => i.dictKey != 7 && i.dictKey != 9 && i.dictKey != 11).map(item => {
      return {
        label: item.dictValue,
        value: item.dictKey
      }
    })
    tabClick(resData.data[0])
  })
}
const tabClick = (item) => {
  EventBus.emit('destroyPop', 'destroyPop')
@@ -64,7 +83,7 @@
        } else {
          element.select = false
        }
      });
      })
      EventBus.emit('restHandleDelChange', `3-${curSelect.value}`)
    }
  }
@@ -95,7 +114,9 @@
  return false
})
getDictData("emergency_space_type")
onMounted(() => {
  tabClick(resData.data[0])
})
onUnmounted(() => {
  if (curSelect.value) EventBus.emit('restHandleDelChange', `3-${curSelect.value}`)