Ver código fonte

Merge branch 'master' of http://182.92.126.35:3000/hrx/mky-vent-base

lxh 20 horas atrás
pai
commit
2283349f45
39 arquivos alterados com 4051 adições e 4053 exclusões
  1. 1 1
      .env.production
  2. 2 0
      src/components/vent/ventBox1.vue
  3. 1 0
      src/views/vent/comment/components/fourBorderBg.vue
  4. 0 7
      src/views/vent/deviceManager/comment/warningTabel/warning.data.ts
  5. 1 1
      src/views/vent/deviceManager/configurationTable/types.ts
  6. 1 0
      src/views/vent/home/colliery/components/main-monitor.vue
  7. 63 274
      src/views/vent/home/configurable/blue/components/ModuleDustNew.vue
  8. 185 185
      src/views/vent/home/configurable/blue/components/ModuleFireNew.vue
  9. 221 221
      src/views/vent/home/configurable/blue/components/NewNavFire.vue
  10. 310 309
      src/views/vent/home/configurable/blue/components/content-FireNew.vue
  11. 312 311
      src/views/vent/home/configurable/blue/components/content-New.vue
  12. 278 282
      src/views/vent/home/configurable/blue/components/content-warn.vue
  13. 330 329
      src/views/vent/home/configurable/blue/components/content.vue
  14. 65 59
      src/views/vent/home/configurable/blue/components/header.vue
  15. 85 85
      src/views/vent/home/configurable/blue/components/moduleLeft-warn.vue
  16. 111 0
      src/views/vent/home/configurable/blue/components/moduleMini-warn.vue
  17. 140 140
      src/views/vent/home/configurable/blue/dustNew.vue
  18. 152 152
      src/views/vent/home/configurable/blue/fireNew.vue
  19. 127 131
      src/views/vent/home/configurable/blue/ventNew.vue
  20. 2 3
      src/views/vent/home/configurable/blue/warnMonitor.vue
  21. 4 3
      src/views/vent/home/configurable/components/content-New.vue
  22. 1 0
      src/views/vent/home/configurable/components/content.vue
  23. 9 5
      src/views/vent/home/configurable/components/detail/CustomChart.vue
  24. 1 0
      src/views/vent/home/configurable/components/detail/MiniBoard.vue
  25. 6 4
      src/views/vent/home/configurable/components/preset/DeviceAlarm.vue
  26. 1 0
      src/views/vent/home/configurable/components/preset/QHCurve.vue
  27. 18 24
      src/views/vent/home/configurable/configurable.data.New.ts
  28. 89 92
      src/views/vent/home/configurable/configurable.data.ts
  29. 1 1
      src/views/vent/home/configurable/fireMine.vue
  30. 3 4
      src/views/vent/home/configurable/fireTS.vue
  31. 100 93
      src/views/vent/home/configurable/green/common-green.vue
  32. 3 0
      src/views/vent/monitorManager/deviceMonitor/components/device/device.api.ts
  33. 1343 1306
      src/views/vent/monitorManager/deviceMonitor/components/device/index.vue
  34. 2 2
      src/views/vent/monitorManager/windowMonitor/components/windowSVG.vue
  35. 13 8
      src/views/vent/monitorManager/windowMonitor/index.vue
  36. 41 7
      src/views/vent/monitorManager/windowMonitor/window.data.ts
  37. 17 7
      src/views/vent/monitorManager/windrectMonitor/components/scanSVG.vue
  38. 8 3
      src/views/vent/monitorManager/windrectMonitor/index.vue
  39. 4 4
      src/views/vent/monitorManager/windrectMonitor/windrect.data.ts

+ 1 - 1
.env.production

@@ -63,7 +63,7 @@ VITE_LEGACY = false
 #VITE_APP_SUB_APP = [["micro-need-air", "//182.92.126.35:8093/"], ["micro-vent-3dModal", "//182.92.126.35:8091/"]]
 #VITE_APP_SUB_APP = [["micro-need-air", ":8093/"], ["micro-vent-3dModal", ":8091/"]]
 #VITE_APP_SUB_APP = [["micro-vent-3dModal", ":8091/", "micro-vent-3dModal"], ["micro-need-air", ":8093/", "micro-need-air"]]
-VITE_APP_SUB_APP = [["micro-vent-3dModal", "/models/", ":8091/"],["micro-vent-2dModal", "/tun2D/", ":8099/"],["micro-need-air", "/vent-need-air/", ":8093/"]] #[name, entry, container]
+VITE_APP_SUB_APP = [["micro-vent-3dModal", "/models/", ":8091/"],["micro-vent-2dModal", "/tun2D/", ":8099/"],["micro-need-air", "/vent-need-air/", ":8093/"],["micro-vent-doc", "/micro-vent-doc/", ":8076/"],] #[name, entry, container]
 # VITE_APP_SUB_APP = [["micro-vent-3dModal", "//182.92.126.35:8091/", "micro-vent-3dModal"],["micro-vent-2dModal", "//localhost:8088/", "micro-vent-2dModal"], ["micro-need-air", "//182.92.126.35:8099/", "micro-need-air"], ["micro-fire-front", "//182.92.126.35:8097/", "fire-Micro"]]
 #VITE_APP_SUB_APP = [["micro-need-air", "//172.16.41.171:7123/"], ["micro-vent-3dModal", "//172.16.41.171:7121/"]]
 #VITE_APP_SUB_APP = [["micro-vent-3dModal", "//192.168.0.79:7121/"]]

+ 2 - 0
src/components/vent/ventBox1.vue

@@ -39,6 +39,7 @@
       border-radius: 10px;
       background: var(--container-color) no-repeat;
       padding-top: 5px;
+
       .box1-top {
         height: 35px;
         background: var(--image-box1-top) no-repeat;
@@ -63,6 +64,7 @@
     width: 100%;
     min-height: 80px;
     position: relative;
+    overflow-x: hidden;
     .box1-top {
       width: 100%;
       height: 35px;

+ 1 - 0
src/views/vent/comment/components/fourBorderBg.vue

@@ -33,6 +33,7 @@
     box-shadow: 0 0 10px #333;
     padding: 5px 8px;
     color: #ffffffee;
+    overflow-x: hidden;
   }
   .border_corner {
     z-index: 2500;

+ 0 - 7
src/views/vent/deviceManager/comment/warningTabel/warning.data.ts

@@ -48,15 +48,8 @@ export const levelColumns: BasicColumn[] = [
   },
   {
     title: '报警类型',
-    // width: 180,
-    // editRow: true,
-    // dataIndex: 'alarm_type',
-    // editRule: true,
-    // editComponent: 'ApiSelect',
-    // editComponentProps: { api: initDictOptions.bind(null, 'alarm_type'), labelField: 'label', valueField: 'value' },
     dataIndex: 'alarmType',
     editRow: true,
-    editRule: true,
     width: 100,
     editComponent: 'ApiSelect',
     editComponentProps: {

+ 1 - 1
src/views/vent/deviceManager/configurationTable/types.ts

@@ -124,7 +124,7 @@ export interface ShowStyle {
   /** 模块的宽高,特殊情况下可以自定义宽高 */
   size: string;
   /** 模块的版本,除了新版,只要有一个模块指定为旧版或其他版本,那么整个页面风格将变更为对应版本,优先级 旧版 > 普通版 > 新版 */
-  version: '原版' | '新版' | '普通版' | '保德';
+  version: '原版' | '新版' | '普通版' | '保德' | '淡蓝色' | '翠绿色';
   /** 模块的位置,即定位,特殊情况下可以自定义定位 */
   position: string;
   // 模块位置  根据这个配置决定使用hearder的方式

+ 1 - 0
src/views/vent/home/colliery/components/main-monitor.vue

@@ -452,6 +452,7 @@
       .main {
         width: 100%;
         height: 100%;
+        overflow-x: hidden;
       }
     }
   }

+ 63 - 274
src/views/vent/home/configurable/blue/components/ModuleDustNew.vue

@@ -1,281 +1,70 @@
 <template>
-  <div class="dane-bd" :style="style">
-    <div v-if="moduleName" class="dane-title" :class="daneClass">
-      <div class="common-navL" :class="{ 'cursor-pointer': !!moduleData.to }" @click="redirectTo"
-        ><span class="title">{{ moduleName }}</span></div
-      >
-
-      <div class="common-navR">
-        <!-- 下拉框 -->
-        <div class="common-navR-select" v-if="header.show && header.selector.show">
-          <a-select
-            style="width: 140px"
-            size="small"
-            placeholder="请选择"
-            v-model:value="selectedDeviceID"
-            allowClear
-            :options="options"
-            @change="selectHandler"
-          />
-        </div>
-        <div v-if="header.show && header.slot.show">
-          {{ getFormattedText(selectedDevice, header.slot.value) }}
-        </div>
-      </div>
-    </div>
-    <div class="dane-content">
-      <slot>
-        <ContentNew style="height: 100%" :moduleData="moduleData" :data="selectedDevice" />
-      </slot>
-    </div>
-  </div>
+  <!-- 新版模块 -->
+  <component
+    :is="getModuleComponent(showStyle)"
+    :style="style"
+    :title="moduleName"
+    :visible="visible"
+    :class="{ 'cursor-pointer': !!moduleData.to }"
+    @close="$emit('close')"
+    @click="redirectTo"
+  >
+    <slot>
+      <Header :deviceType="deviceType" :moduleData="moduleData" :data="data" @select="selectedData = $event" />
+      <Content :style="{ height: header.show ? 'calc(100% - 30px)' : '100%' }" :moduleData="moduleData" :data="selectedData" />
+    </slot>
+  </component>
 </template>
-
-<script setup lang="ts">
-import ContentNew from './content-New.vue';
-import { defineProps, defineEmits, computed, watch } from 'vue';
-import { useInitModule } from '../../hooks/useInit';
-import { getFormattedText } from '../../hooks/helper';
-import { openWindow } from '/@/utils';
-// import { ModuleProps } from '../types';
-
-const props = defineProps<{
-  /** 配置的详细模块信息 */
-  moduleData: any;
-  /** 配置的详细样式信息 */
-  showStyle: any;
-  /** 该模块配置中的设备标识符 */
-  deviceType: string;
-  /** api返回的数据 */
-  data: any;
-  moduleName: string;
-  visible: boolean;
-}>();
-const emit = defineEmits(['close', 'select']);
-
-const { header } = props.moduleData;
-
-const { selectedDeviceID, selectedDevice, options, init } = useInitModule(props.deviceType, props.moduleData);
-
-const style = computed(() => {
-  const size = props.showStyle.size;
-  const position = props.showStyle.position;
-  return size + position;
-});
-
-// 根据配置里的定位判断应该使用哪个module组件
-const daneClass = computed(() => {
-  const headerPosition = props.showStyle.headerPosition;
-  const size = props.showStyle.size;
-  const [_, width] = size.match(/width:([0-9]+)px/) || [];
-  // if (position.includes('bottom') || parseInt(width) > 800) {
-  //   return 'dane-w';
-  // }
-  // if (position.includes('left')) {
-  //   return 'dane-m';
-  // }
-  // if (position.includes('right')) {
-  //   return 'dane-m';
-  // }
-  // return 'dane-m';
-  if (headerPosition === 'leftTop') {
-    return 'left-1';
-  }
-  if (headerPosition === 'leftCenter') {
-    return 'left-2';
-  }
-  if (headerPosition === 'leftBottom') {
-    return 'left-3';
-  }
-  if (headerPosition === 'rightTop') {
-    return 'right-1';
-  }
-  if (headerPosition === 'rightCenter') {
-    return 'right-2';
-  }
-  if (headerPosition === 'rightBottom') {
-    return 'right-3';
-  }
-  if (headerPosition === 'centerBottom') {
-    return 'center-Bottom';
-  }
-  return 'dane-m'; // 默认返回顶部模块
-});
-
-//切换时间选项
-// function onChange(value, dateString) {
-//   console.log('Selected Time: ', value);
-//   console.log('Formatted Selected Time: ', dateString);
-// }
-// function onOk(val) {
-//   console.log('onOk: ', val);
-// }
-
-//下拉框选项切换
-function selectHandler(id) {
-  selectedDeviceID.value = id;
-  emit('select', selectedDevice);
-}
-
-function redirectTo() {
-  const { to } = props.moduleData;
-  if (!to) return;
-  openWindow(to);
-}
-
-watch(
-  () => props.data,
-  (d) => {
-    init(d);
-    selectedDeviceID.value = options.value[0]?.value;
-  },
-  {
-    immediate: true,
-  }
-);
-</script>
-
-<style scoped lang="less">
-@import '/@/design/theme.less';
-
-@{theme-deepblue} {
-  .dane-bd {
-    --image-Left1: url('@/assets/images/vent/homeNew/left1.png');
-    --image-Left2: url('@/assets/images/vent/homeNew/left2.png');
-    --image-Left3: url('@/assets/images/vent/homeNew/left3.png');
-    --image-Right1: url('@/assets/images/vent/homeNew/right1.png');
-    --image-Right2: url('@/assets/images/vent/homeNew/right2.png');
-    --image-Right3: url('@/assets/images/vent/homeNew/right3.png');
-    --image-CenterBottom: url('@/assets/images/vent/homeNew/center-Bottom.png');
-  }
-}
-
-.dane-bd {
-  --image-Left1: url('@/assets/images/vent/homeNew/left1.png');
-  --image-Left2: url('@/assets/images/vent/homeNew/left2.png');
-  --image-Left3: url('@/assets/images/vent/homeNew/left3.png');
-  --image-Right1: url('@/assets/images/vent/homeNew/right1.png');
-  --image-Right2: url('@/assets/images/vent/homeNew/right2.png');
-  --image-Right3: url('@/assets/images/vent/homeNew/right3.png');
-  --image-CenterBottom: url('@/assets/images/vent/homeNew/center-Bottom.png');
-  position: absolute;
-  width: 100%;
-  height: 100%;
-  z-index: 2;
-
-  .dane-title {
-    display: flex;
-    align-items: center;
-    justify-content: space-between;
-    width: 100%;
-    height: 40px;
-    padding: 0 40px 15px 20px;
-
-    .common-navL {
-      display: flex;
-      position: relative;
-      align-items: center;
-      color: #fff;
-      font-size: 14px;
+<script lang="ts" setup>
+  import Header from './header.vue';
+  import Content from '../components/content.vue';
+  import ModuleLeft from './moduleLeft-warn.vue';
+  import ModuleBottom from './moduleBottom-warn.vue';
+  import { computed, ref } from 'vue';
+  import { openWindow } from '/@/utils';
+  import { getFormattedText } from '../../hooks/helper';
+  import ModuleMiniWarn from './moduleMini-warn.vue';
+  // import { ModuleProps } from '../types';
+
+  const props = defineProps<{
+    /** 配置的详细模块信息 */
+    moduleData: any;
+    /** 配置的详细样式信息 */
+    showStyle: any;
+    /** 该模块配置中的设备标识符 */
+    deviceType: string;
+    /** api返回的数据 */
+    data: any;
+    moduleName: string;
+    visible: boolean;
+  }>();
+  defineEmits(['close', 'click']);
+
+  const { header } = props.moduleData;
+  const selectedData = ref();
+
+  const style = computed(() => {
+    const size = props.showStyle.size;
+    const position = props.showStyle.position;
+    return size + position;
+  });
+
+  // 根据配置里的定位判断应该使用哪个module组件
+  function getModuleComponent({ size, position }) {
+    const [__, width] = size.match(/width:([0-9]+)px/) || [];
+    const [___, height] = size.match(/height:([0-9]+)px/) || [];
+    if (position.includes('bottom') || parseInt(width) > 800) {
+      return ModuleBottom;
     }
-
-    .common-navR {
-      display: flex;
-      align-items: center;
-      justify-content: flex-end;
+    if (parseInt(height) > 400) {
+      return ModuleLeft;
     }
+    return ModuleMiniWarn;
   }
 
-  .dane-content {
-    height: calc(100% - 38px);
-    box-sizing: border-box;
-    border-top: none;
+  function redirectTo() {
+    const { to } = props.moduleData;
+    if (!to) return;
+    openWindow(getFormattedText(selectedData.value, to));
   }
-}
-.left-1 {
-  background: var(--image-Left1) no-repeat;
-  background-size: 100% 100%;
-  margin-left: 35px;
-}
-.left-2 {
-  background: var(--image-Left2) no-repeat;
-  background-size: 100% 100%;
-}
-.left-3 {
-  background: var(--image-Left3) no-repeat;
-  background-size: 100% 100%;
-}
-.right-1 {
-  background: var(--image-Right1) no-repeat;
-  background-size: 100% 100%;
-  margin-left: -32px;
-}
-.right-2 {
-  background: var(--image-Right2) no-repeat;
-  background-size: 100% 100%;
-}
-.right-3 {
-  background: var(--image-Right3) no-repeat;
-  background-size: 100% 100%;
-}
-
-.center-Bottom {
-  background: var(--image-CenterBottom) no-repeat;
-  background-size: 100% 100%;
-}
-:deep(.zxm-select-selector) {
-  height: 22px !important;
-  border: none !important;
-  // background-color: rgb(15 64 88) !important;
-  background-color: transparent !important;
-  color: #8087a1 !important;
-}
-
-:deep(.zxm-select-selection-placeholder) {
-  color: #8087a1 !important;
-}
-
-:deep(.zxm-select-arrow) {
-  color: #8087a1 !important;
-}
-
-:deep(.zxm-picker) {
-  border: none !important;
-  background-color: rgb(15 64 88) !important;
-  box-shadow: none;
-  color: #a1dff8 !important;
-}
-
-:deep(.zxm-picker-input > input) {
-  color: #a1dff8 !important;
-  text-align: center !important;
-}
-
-:deep(.zxm-picker-separator) {
-  color: #a1dff8 !important;
-}
-
-:deep(.zxm-picker-active-bar) {
-  display: none !important;
-}
-
-:deep(.zxm-picker-suffix) {
-  color: #a1dff8 !important;
-}
-
-:deep(.zxm-switch) {
-  min-width: 48px !important;
-}
-
-:deep(.zxm-switch-checked) {
-  background-color: rgb(15 64 89) !important;
-}
-
-:deep(.zxm-switch-handle::before) {
-  background-color: rgb(33 179 247) !important;
-}
-
-:deep(.zxm-select-selection-item) {
-  color: #fff !important;
-}
-</style>
+</script>

+ 185 - 185
src/views/vent/home/configurable/blue/components/ModuleFireNew.vue

@@ -8,7 +8,7 @@
     <div class="dane-content">
       <div class="common-navR">
         <!-- 下拉框 -->
-        <div class="common-navR-select" v-if="header.show && header.selector.show">
+        <div class="flex-grow-1" v-if="header.show && header.selector.show">
           <a-select
             style="width: 350px; font-size: 16px"
             size="small"
@@ -19,7 +19,7 @@
             @change="selectHandler"
           />
         </div>
-        <div v-if="header.show && header.slot.show">
+        <div class="flex-basis-100px flex-grow-1" v-if="header.show && header.slot.show">
           {{ getFormattedText(selectedDevice, header.slot.value) }}
         </div>
       </div>
@@ -31,196 +31,196 @@
 </template>
 
 <script setup lang="ts">
-import ContentFireNew from './content-FireNew.vue';
-import { defineProps, defineEmits, computed, watch } from 'vue';
-import { useInitModule } from '../../hooks/useInit';
-import { getFormattedText } from '../../hooks/helper';
-import { openWindow } from '/@/utils';
-// import { ModuleProps } from '../types';
-
-const props = defineProps<{
-  /** 配置的详细模块信息 */
-  moduleData: any;
-  /** 配置的详细样式信息 */
-  showStyle: any;
-  /** 该模块配置中的设备标识符 */
-  deviceType: string;
-  /** api返回的数据 */
-  data: any;
-  moduleName: string;
-  visible: boolean;
-}>();
-const emit = defineEmits(['close', 'select']);
-
-const { header } = props.moduleData;
-
-const { selectedDeviceID, selectedDevice, options, init } = useInitModule(props.deviceType, props.moduleData);
-
-const style = computed(() => {
-  const size = props.showStyle.size;
-  const position = props.showStyle.position;
-  return size + position;
-});
-
-// 根据配置里的定位判断应该使用哪个module组件
-const daneClass = computed(() => {
-  const position = props.showStyle.position;
-  const size = props.showStyle.size;
-  const [_, width] = size.match(/width:([0-9]+)px/) || [];
-  if (position.includes('bottom') || parseInt(width) > 800) {
-    return 'dane-w';
-  }
-  if (position.includes('left')) {
-    return 'dane-m';
-  }
-  if (position.includes('right')) {
-    return 'dane-m';
-  }
-  // return 'dane-m';
-  return 'dane-m'; // 默认返回顶部模块
-});
-//切换时间选项
-// function onChange(value, dateString) {
-//   console.log('Selected Time: ', value);
-//   console.log('Formatted Selected Time: ', dateString);
-// }
-// function onOk(val) {
-//   console.log('onOk: ', val);
-// }
-
-//下拉框选项切换
-function selectHandler(id) {
-  selectedDeviceID.value = id;
-  emit('select', selectedDevice);
-}
-
-function redirectTo() {
-  const { to } = props.moduleData;
-  if (!to) return;
-  openWindow(to);
-}
-
-watch(
-  () => props.data,
-  (d) => {
-    init(d);
-    selectedDeviceID.value = options.value[0]?.value;
-  },
-  {
-    immediate: true,
-  }
-);
+  import ContentFireNew from './content-FireNew.vue';
+  import { defineProps, defineEmits, computed, watch } from 'vue';
+  import { useInitModule } from '../../hooks/useInit';
+  import { getFormattedText } from '../../hooks/helper';
+  import { openWindow } from '/@/utils';
+  // import { ModuleProps } from '../types';
+
+  const props = defineProps<{
+    /** 配置的详细模块信息 */
+    moduleData: any;
+    /** 配置的详细样式信息 */
+    showStyle: any;
+    /** 该模块配置中的设备标识符 */
+    deviceType: string;
+    /** api返回的数据 */
+    data: any;
+    moduleName: string;
+    visible: boolean;
+  }>();
+  const emit = defineEmits(['close', 'select']);
+
+  const { header } = props.moduleData;
+
+  const { selectedDeviceID, selectedDevice, options, init } = useInitModule(props.deviceType, props.moduleData);
+
+  const style = computed(() => {
+    const size = props.showStyle.size;
+    const position = props.showStyle.position;
+    return size + position;
+  });
+
+  // 根据配置里的定位判断应该使用哪个module组件
+  const daneClass = computed(() => {
+    const position = props.showStyle.position;
+    const size = props.showStyle.size;
+    const [_, width] = size.match(/width:([0-9]+)px/) || [];
+    if (position.includes('bottom') || parseInt(width) > 800) {
+      return 'dane-w';
+    }
+    if (position.includes('left')) {
+      return 'dane-m';
+    }
+    if (position.includes('right')) {
+      return 'dane-m';
+    }
+    // return 'dane-m';
+    return 'dane-m'; // 默认返回顶部模块
+  });
+  //切换时间选项
+  // function onChange(value, dateString) {
+  //   console.log('Selected Time: ', value);
+  //   console.log('Formatted Selected Time: ', dateString);
+  // }
+  // function onOk(val) {
+  //   console.log('onOk: ', val);
+  // }
+
+  //下拉框选项切换
+  function selectHandler(id) {
+    selectedDeviceID.value = id;
+    emit('select', selectedDevice);
+  }
+
+  function redirectTo() {
+    const { to } = props.moduleData;
+    if (!to) return;
+    openWindow(to);
+  }
+
+  watch(
+    () => props.data,
+    (d) => {
+      init(d);
+      selectedDeviceID.value = options.value[0]?.value;
+    },
+    {
+      immediate: true,
+    }
+  );
 </script>
 
 <style scoped lang="less">
-@import '/@/design/theme.less';
-@font-face {
-  font-family: 'douyuFont';
-  src: url('/@/assets/font/douyuFont.otf');
-}
-@{theme-deepblue} {
-  .dane-bd {
-    --image-Content: url('@/assets/images/fireNew/4-3.png');
-    --image-Select: url('@/assets/images/fireNew/5.png');
+  @import '/@/design/theme.less';
+  @font-face {
+    font-family: 'douyuFont';
+    src: url('/@/assets/font/douyuFont.otf');
   }
-}
-
-.dane-bd {
-  --image-Select: url('@/assets/images/fireNew/5.png');
-  --image-Content: url('@/assets/images/fireNew/4-3.png');
-  position: absolute;
-  width: 100%;
-  height: 100%;
-  z-index: 2;
-
-  .dane-title {
-    width: 94%;
-    height: 40px;
-    text-align: center;
-    padding-top: 9px;
-
-    .common-navL {
-      position: relative;
-      align-items: center;
-      color: #fff;
-      font-size: 13px;
-      font-weight: bold;
-      font-family: 'douyuFont';
+  @{theme-deepblue} {
+    .dane-bd {
+      --image-Content: url('@/assets/images/fireNew/4-3.png');
+      --image-Select: url('@/assets/images/fireNew/5.png');
     }
   }
 
-  .dane-content {
-    height: calc(100% - 38px);
-    box-sizing: border-box;
-    border-top: none;
-    .common-navR {
-      display: flex;
-      align-items: center;
-      justify-content: center;
-      background: var(--image-Select) no-repeat;
-      background-size: 100% 100%;
-      width: 87%;
-      margin-left: 30px;
+  .dane-bd {
+    --image-Select: url('@/assets/images/fireNew/5.png');
+    --image-Content: url('@/assets/images/fireNew/4-3.png');
+    position: absolute;
+    width: 100%;
+    height: 100%;
+    z-index: 2;
+
+    .dane-title {
+      width: 94%;
+      height: 40px;
+      text-align: center;
+      padding-top: 9px;
+
+      .common-navL {
+        position: relative;
+        align-items: center;
+        color: #fff;
+        font-size: 13px;
+        font-weight: bold;
+        font-family: 'douyuFont';
+      }
+    }
+
+    .dane-content {
+      height: calc(100% - 38px);
+      box-sizing: border-box;
+      border-top: none;
+      .common-navR {
+        display: flex;
+        align-items: center;
+        justify-content: center;
+        background: var(--image-Select) no-repeat;
+        background-size: 100% 100%;
+        width: 87%;
+        margin-left: 30px;
+      }
     }
   }
-}
-.dane-m {
-  background: var(--image-Content) no-repeat;
-  background-size: 100% 100%;
-}
-:deep(.zxm-select-selector) {
-  height: 22px !important;
-  border: none !important;
-  // background-color: rgb(15 64 88) !important;
-  background-color: transparent !important;
-  color: #8087a1 !important;
-}
-
-:deep(.zxm-select-selection-placeholder) {
-  color: #8087a1 !important;
-}
-
-:deep(.zxm-select-arrow) {
-  color: #8087a1 !important;
-}
-
-:deep(.zxm-picker) {
-  border: none !important;
-  background-color: rgb(15 64 88) !important;
-  box-shadow: none;
-  color: #a1dff8 !important;
-}
-
-:deep(.zxm-picker-input > input) {
-  color: #a1dff8 !important;
-  text-align: center !important;
-}
-
-:deep(.zxm-picker-separator) {
-  color: #a1dff8 !important;
-}
-
-:deep(.zxm-picker-active-bar) {
-  display: none !important;
-}
-
-:deep(.zxm-picker-suffix) {
-  color: #a1dff8 !important;
-}
-
-:deep(.zxm-switch) {
-  min-width: 48px !important;
-}
-
-:deep(.zxm-switch-checked) {
-  background-color: rgb(15 64 89) !important;
-}
-
-:deep(.zxm-switch-handle::before) {
-  background-color: rgb(33 179 247) !important;
-}
-
-:deep(.zxm-select-selection-item) {
-  color: #fff !important;
-}
+  .dane-m {
+    background: var(--image-Content) no-repeat;
+    background-size: 100% 100%;
+  }
+  :deep(.zxm-select-selector) {
+    height: 22px !important;
+    border: none !important;
+    // background-color: rgb(15 64 88) !important;
+    background-color: transparent !important;
+    color: #8087a1 !important;
+  }
+
+  :deep(.zxm-select-selection-placeholder) {
+    color: #8087a1 !important;
+  }
+
+  :deep(.zxm-select-arrow) {
+    color: #8087a1 !important;
+  }
+
+  :deep(.zxm-picker) {
+    border: none !important;
+    background-color: rgb(15 64 88) !important;
+    box-shadow: none;
+    color: #a1dff8 !important;
+  }
+
+  :deep(.zxm-picker-input > input) {
+    color: #a1dff8 !important;
+    text-align: center !important;
+  }
+
+  :deep(.zxm-picker-separator) {
+    color: #a1dff8 !important;
+  }
+
+  :deep(.zxm-picker-active-bar) {
+    display: none !important;
+  }
+
+  :deep(.zxm-picker-suffix) {
+    color: #a1dff8 !important;
+  }
+
+  :deep(.zxm-switch) {
+    min-width: 48px !important;
+  }
+
+  :deep(.zxm-switch-checked) {
+    background-color: rgb(15 64 89) !important;
+  }
+
+  :deep(.zxm-switch-handle::before) {
+    background-color: rgb(33 179 247) !important;
+  }
+
+  :deep(.zxm-select-selection-item) {
+    color: #fff !important;
+  }
 </style>

+ 221 - 221
src/views/vent/home/configurable/blue/components/NewNavFire.vue

@@ -53,264 +53,264 @@
   </div>
 </template>
 <script lang="ts" setup>
-import { onMounted, onUnmounted, ref, watch, computed } from 'vue';
-import { useRouter, useRoute } from 'vue-router';
-let props = defineProps({
-  Title: {
-    type: String,
-    default: '',
-  },
-  disabled: {
-    type: Boolean,
-    default: false,
-  },
-});
+  import { onMounted, onUnmounted, ref, watch, computed } from 'vue';
+  import { useRouter, useRoute } from 'vue-router';
+  let props = defineProps({
+    Title: {
+      type: String,
+      default: '',
+    },
+    disabled: {
+      type: Boolean,
+      default: false,
+    },
+  });
 
-let menuList = ref<any[]>([
-  {
-    name: '智能通风',
-    targatUrl: '/micro-vent-3dModal/configurable/ventNew/ventS/home',
-  },
-  {
-    name: '火灾监控',
-    targatUrl: '/micro-vent-3dModal/configurable/fireNew/fireS/home',
-  },
-  {
-    name: '粉尘监控',
-    targatUrl: '/micro-vent-3dModal/configurable/dustNew/dustS/home',
-  },
-  {
-    name: '预警监测',
-    targatUrl: '/warnMonitor/configurable/home',
-  },
-]); //一级菜单列表
-let activeIndex = ref(0); //当前激活menu索引
-const router = useRouter();
-const route = useRoute();
-let isShowMenuItem = ref(false); //是否显示menuItem下拉选项菜单
-let menuItemActive = ref(0); //menuItem当前激活选项
-const leftMenus = computed(() => menuList.value.slice(0, 4));
-const rightMenus = computed(() => menuList.value.slice(4));
-function menuClick(data) {
-  activeIndex.value = data.index;
-  isShowMenuItem.value = !isShowMenuItem.value;
-  router.push({ path: data.item.targatUrl });
-}
-function menuItemClick(index) {
-  menuItemActive.value = index;
-  isShowMenuItem.value = false;
-}
-function updateActiveState(path: string) {
-  const currentPath = route.path;
-  menuList.value.forEach((menu, index) => {
-    // 处理有直接链接的菜单项
-    if (menu.targatUrl === currentPath) {
-      activeIndex.value = index;
-      isShowMenuItem.value = false;
-      return;
-    }
-    // 处理有子菜单的菜单项
-    if (menu.MenuItemList) {
-      const itemIndex = menu.MenuItemList.findIndex((item) => item.targatUrl === path);
-      if (itemIndex !== -1) {
+  let menuList = ref<any[]>([
+    {
+      name: '智能通风',
+      targatUrl: '/micro-vent-3dModal/configurable/ventNew/ventS/home',
+    },
+    {
+      name: '火灾监控',
+      targatUrl: '/micro-vent-3dModal/configurable/fireNew/fireS/home',
+    },
+    {
+      name: '粉尘监控',
+      targatUrl: '/micro-vent-3dModal/configurable/dustNew/dustS/home',
+    },
+    {
+      name: '预警监测',
+      targatUrl: '/warnMonitor/configurable/home',
+    },
+  ]); //一级菜单列表
+  let activeIndex = ref(0); //当前激活menu索引
+  const router = useRouter();
+  const route = useRoute();
+  let isShowMenuItem = ref(false); //是否显示menuItem下拉选项菜单
+  let menuItemActive = ref(0); //menuItem当前激活选项
+  const leftMenus = computed(() => menuList.value.slice(0, 4));
+  const rightMenus = computed(() => menuList.value.slice(4));
+  function menuClick(data) {
+    activeIndex.value = data.index;
+    isShowMenuItem.value = !isShowMenuItem.value;
+    router.push({ path: data.item.targatUrl });
+  }
+  function menuItemClick(index) {
+    menuItemActive.value = index;
+    isShowMenuItem.value = false;
+  }
+  function updateActiveState(path: string) {
+    const currentPath = route.path;
+    menuList.value.forEach((menu, index) => {
+      // 处理有直接链接的菜单项
+      if (menu.targatUrl === currentPath) {
         activeIndex.value = index;
-        menuItemActive.value = itemIndex;
-        isShowMenuItem.value = true;
+        isShowMenuItem.value = false;
+        return;
+      }
+      // 处理有子菜单的菜单项
+      if (menu.MenuItemList) {
+        const itemIndex = menu.MenuItemList.findIndex((item) => item.targatUrl === path);
+        if (itemIndex !== -1) {
+          activeIndex.value = index;
+          menuItemActive.value = itemIndex;
+          isShowMenuItem.value = true;
+        }
       }
+    });
+  }
+  watch(
+    () => route.path,
+    (newPath) => {
+      updateActiveState(newPath);
+    },
+    {
+      immediate: true,
     }
+  );
+  onMounted(() => {
+    updateActiveState(route.path);
   });
-}
-watch(
-  () => route.path,
-  (newPath) => {
-    updateActiveState(newPath);
-  },
-  {
-    immediate: true,
-  }
-);
-onMounted(() => {
-  updateActiveState(route.path);
-});
 </script>
 <style lang="less" scoped>
-@import '/@/design/theme.less';
-
-@font-face {
-  font-family: 'douyuFont';
-  src: url('/@/assets/font/douyuFont.otf');
-}
+  @import '/@/design/theme.less';
 
-.New-nav {
-  position: relative;
-  width: 100%;
-  height: 100%;
-
-  .main-title {
-    width: 518px;
-    height: 100%;
-    display: flex;
-    align-items: center;
+  @font-face {
     font-family: 'douyuFont';
-    font-size: 25px;
-    position: absolute;
-    left: 50%;
-    transform: translateX(-50%);
-    width: auto;
-    padding: 0;
-    color: #fff;
+    src: url('/@/assets/font/douyuFont.otf');
   }
 
-  .nav-menu {
-    position: absolute;
-    top: 0;
-    left: 675px;
+  .New-nav {
+    position: relative;
+    width: 100%;
     height: 100%;
-    display: flex;
-    position: static; // 移除绝对定位
-    display: flex;
-    width: auto;
-    .nav-menu-left {
-      display: flex;
-      flex-direction: row;
-      align-items: center;
-      float: left;
-      .nav-menu-active {
-        position: relative;
-        cursor: pointer;
-        width: 100px;
-        height: 40px;
-        margin-top: 10px;
-        margin-right: 40px;
-        line-height: 35px;
-        text-align: center;
-        font-size: 16px;
-        background: url(/src/assets/images/fireNew/2-1.png) no-repeat;
-        background-size: 100% 100%;
-      }
 
-      .nav-menu-unactive {
-        position: relative;
-        cursor: pointer;
-        width: 100px;
-        height: 40px;
-        margin-top: 10px;
-        margin-right: 40px;
-        line-height: 35px;
-        text-align: center;
-        font-size: 16px;
-        background: url(/src/assets/images/fireNew/2-2.png) no-repeat;
-        background-size: 100% 100%;
-      }
-    }
-    .nav-menu-right {
+    .main-title {
+      width: 518px;
+      height: 100%;
       display: flex;
-      flex-direction: row;
       align-items: center;
-      float: left;
-      margin-left: 42%;
-      .nav-menu-active {
-        position: relative;
-        cursor: pointer;
-        width: 100px;
-        height: 40px;
-        margin-top: 10px;
-        margin-right: 40px;
-        line-height: 35px;
-        text-align: center;
-        font-size: 16px;
-        background: url(/src/assets/images/fireNew/2-3.png) no-repeat;
-        background-size: 100% 100%;
-      }
-
-      .nav-menu-unactive {
-        position: relative;
-        cursor: pointer;
-        width: 100px;
-        height: 40px;
-        margin-top: 10px;
-        margin-right: 40px;
-        line-height: 35px;
-        text-align: center;
-        font-size: 16px;
-        background: url(/src/assets/images/fireNew/2-4.png) no-repeat;
-        background-size: 100% 100%;
-      }
+      font-family: 'douyuFont';
+      font-size: 25px;
+      position: absolute;
+      left: 50%;
+      transform: translateX(-50%);
+      width: auto;
+      padding: 0;
+      color: #fff;
     }
 
-    .nav-menu-item {
+    .nav-menu {
       position: absolute;
-      top: 23px;
-      width: 130px;
+      top: 0;
+      left: 675px;
+      height: 100%;
       display: flex;
-      flex-direction: column;
-      align-items: center;
-      box-sizing: border-box;
+      position: static; // 移除绝对定位
+      display: flex;
+      width: auto;
+      .nav-menu-left {
+        display: flex;
+        flex-direction: row;
+        align-items: center;
+        float: left;
+        .nav-menu-active {
+          position: relative;
+          cursor: pointer;
+          width: 100px;
+          height: 40px;
+          margin-top: 10px;
+          margin-right: 40px;
+          line-height: 35px;
+          text-align: center;
+          font-size: 16px;
+          background: url(/src/assets/images/fireNew/2-1.png) no-repeat;
+          background-size: 100% 100%;
+        }
 
-      .nav-menu-content {
-        width: 100%;
-        height: 100%;
-        overflow-y: auto;
-        margin-top: 25%;
-        .nav-menu-List {
-          background: url('@/assets/images/vent/homeNew/menuList.png') no-repeat;
+        .nav-menu-unactive {
+          position: relative;
+          cursor: pointer;
+          width: 100px;
+          height: 40px;
+          margin-top: 10px;
+          margin-right: 40px;
+          line-height: 35px;
+          text-align: center;
+          font-size: 16px;
+          background: url(/src/assets/images/fireNew/2-2.png) no-repeat;
           background-size: 100% 100%;
         }
-        .menu-item-active {
-          color: #ddd;
-          z-index: 999;
-          width: 100%;
-          height: 36px;
-          line-height: 36px;
-          font-size: 14px;
-          background: url('@/assets/images/fireNew/2-2.png') no-repeat;
+      }
+      .nav-menu-right {
+        display: flex;
+        flex-direction: row;
+        align-items: center;
+        float: left;
+        margin-left: 42%;
+        .nav-menu-active {
+          position: relative;
+          cursor: pointer;
+          width: 100px;
+          height: 40px;
+          margin-top: 10px;
+          margin-right: 40px;
+          line-height: 35px;
+          text-align: center;
+          font-size: 16px;
+          background: url(/src/assets/images/fireNew/2-3.png) no-repeat;
           background-size: 100% 100%;
         }
 
-        .menu-item-unactive {
-          color: #ddd;
-          width: 100%;
+        .nav-menu-unactive {
+          position: relative;
+          cursor: pointer;
+          width: 100px;
           height: 40px;
-          line-height: 40px;
-          font-size: 14px;
+          margin-top: 10px;
+          margin-right: 40px;
+          line-height: 35px;
+          text-align: center;
+          font-size: 16px;
+          background: url(/src/assets/images/fireNew/2-4.png) no-repeat;
+          background-size: 100% 100%;
         }
       }
-    }
 
-    @keyframes fadeIn {
-      from {
-        opacity: 0;
-      }
+      .nav-menu-item {
+        position: absolute;
+        top: 23px;
+        width: 130px;
+        display: flex;
+        flex-direction: column;
+        align-items: center;
+        box-sizing: border-box;
+
+        .nav-menu-content {
+          width: 100%;
+          height: 100%;
+          overflow-y: auto;
+          margin-top: 25%;
+          .nav-menu-List {
+            background: url('@/assets/images/vent/homeNew/menuList.png') no-repeat;
+            background-size: 100% 100%;
+          }
+          .menu-item-active {
+            color: #ddd;
+            z-index: 999;
+            width: 100%;
+            height: 36px;
+            line-height: 36px;
+            font-size: 14px;
+            background: url('@/assets/images/fireNew/2-2.png') no-repeat;
+            background-size: 100% 100%;
+          }
 
-      to {
-        opacity: 1;
+          .menu-item-unactive {
+            color: #ddd;
+            width: 100%;
+            height: 40px;
+            line-height: 40px;
+            font-size: 14px;
+          }
+        }
       }
-    }
 
-    /* 定义淡出动画 */
-    @keyframes fadeOut {
-      from {
-        opacity: 1;
+      @keyframes fadeIn {
+        from {
+          opacity: 0;
+        }
+
+        to {
+          opacity: 1;
+        }
       }
 
-      to {
-        opacity: 0;
+      /* 定义淡出动画 */
+      @keyframes fadeOut {
+        from {
+          opacity: 1;
+        }
+
+        to {
+          opacity: 0;
+        }
       }
     }
-  }
 
-  .userInfo {
-    width: 120px;
-    float: right;
-    background: url(/src/assets/images/vent/homeNew/user.png) no-repeat;
-    background-size: 100% 100%;
-    position: absolute;
-    top: 14px;
-    right: 0;
-    .userName {
-      margin-left: 40px;
-      font-size: 20px;
+    .userInfo {
+      width: 120px;
+      float: right;
+      background: url(/src/assets/images/vent/homeNew/user.png) no-repeat;
+      background-size: 100% 100%;
+      position: absolute;
+      top: 14px;
+      right: 0;
+      .userName {
+        margin-left: 40px;
+        font-size: 20px;
+      }
     }
   }
-}
 </style>

+ 310 - 309
src/views/vent/home/configurable/blue/components/content-FireNew.vue

@@ -108,357 +108,358 @@
   </div>
 </template>
 <script lang="ts" setup>
-import { computed } from 'vue';
-import {
-  CommonItem,
-  Config,
-  // ModuleDataBoard,
-  // ModuleDataChart,
-  // ModuleDataList,
-  // ModuleDataPreset,
-  // ModuleDataTable,
-} from '../../../../deviceManager/configurationTable/types';
-import MiniBoard from '../../components/detail/MiniBoard-FireNew.vue';
-import TimelineList from '../../components/detail/TimelineList.vue';
-import TimelineListNew from '../../components/detail/TimelineListNew.vue';
-import CustomList from '../../components/detail/CustomList-fire.vue';
-import ModuleTopFire from '../../components/originalNew/moduleTopFire.vue';
-import CustomGallery from '../../components/detail/CustomGallery.vue';
-import ComplexList from '../../components/detail/ComplexList-FireNew.vue';
-import GalleryList from '../../components/detail/GalleryList.vue';
-import CustomTable from '../../components/detail/CustomTable-fire.vue';
-import CustomChart from '../../components/detail/CustomChart.vue';
-import { clone } from 'lodash-es';
-import { getData, getFormattedText } from '../../hooks/helper';
-import BlastDelta from '../../../../monitorManager/deviceMonitor/components/device/modal/blastDelta.vue';
-import QHCurve from '../../components/preset/QHCurve.vue';
-import MeasureDetail from '../../components/preset/MeasureDetail.vue';
-import CustomTabs from '../../components/preset/CustomTabs.vue';
-import AIChat from '/@/components/AIChat/MiniChat.vue';
-import DeviceAlarm from '../../components/preset/DeviceAlarm.vue';
-import MiniBoardNew from '../../components/detail/MiniBoard-New.vue';
-// import FIreWarn from './preset/FIreWarn.vue';
-// import FIreControl from './preset/FIreControl.vue';
+  import { computed } from 'vue';
+  import {
+    CommonItem,
+    Config,
+    // ModuleDataBoard,
+    // ModuleDataChart,
+    // ModuleDataList,
+    // ModuleDataPreset,
+    // ModuleDataTable,
+  } from '../../../../deviceManager/configurationTable/types';
+  import MiniBoard from '../../components/detail/MiniBoard-FireNew.vue';
+  import TimelineList from '../../components/detail/TimelineList.vue';
+  import TimelineListNew from '../../components/detail/TimelineListNew.vue';
+  import CustomList from '../../components/detail/CustomList-fire.vue';
+  import ModuleTopFire from '../../components/originalNew/moduleTopFire.vue';
+  import CustomGallery from '../../components/detail/CustomGallery.vue';
+  import ComplexList from '../../components/detail/ComplexList-FireNew.vue';
+  import GalleryList from '../../components/detail/GalleryList.vue';
+  import CustomTable from '../../components/detail/CustomTable-fire.vue';
+  import CustomChart from '../../components/detail/CustomChart.vue';
+  import { clone } from 'lodash-es';
+  import { getData, getFormattedText } from '../../hooks/helper';
+  import BlastDelta from '../../../../monitorManager/deviceMonitor/components/device/modal/blastDelta.vue';
+  import QHCurve from '../../components/preset/QHCurve.vue';
+  import MeasureDetail from '../../components/preset/MeasureDetail.vue';
+  import CustomTabs from '../../components/preset/CustomTabs.vue';
+  import AIChat from '/@/components/AIChat/MiniChat.vue';
+  import DeviceAlarm from '../../components/preset/DeviceAlarm.vue';
+  import MiniBoardNew from '../../components/detail/MiniBoard-New.vue';
+  // import FIreWarn from './preset/FIreWarn.vue';
+  // import FIreControl from './preset/FIreControl.vue';
 
-const props = defineProps<{
-  data: any;
-  moduleData: Config['moduleData'];
-}>();
+  const props = defineProps<{
+    data: any;
+    moduleData: Config['moduleData'];
+  }>();
 
-const { background, layout } = props.moduleData;
+  const { background, layout } = props.moduleData;
 
-// 获取当原始配置带 items 项时的最终 items 配置
-function getItems(raw, items: CommonItem[]) {
-  return items.map((i) => {
-    return {
-      ...i,
-      label: getFormattedText(raw, i.label, i.trans),
-      value: getFormattedText(raw, i.value, i.trans),
-    };
-  });
-}
-
-// 获取当 List 组件配置带 items 项时的最终 items 配置
-function getListItems(raw: any, items: CommonItem[], mapFromData?: boolean) {
-  if (mapFromData && Array.isArray(raw)) {
-    return raw.map((data) => {
-      const item = items[0];
+  // 获取当原始配置带 items 项时的最终 items 配置
+  function getItems(raw, items: CommonItem[]) {
+    return items.map((i) => {
       return {
-        ...item,
-        label: getFormattedText(data, item.label, item.trans),
-        value: getFormattedText(data, item.value, item.trans),
+        ...i,
+        label: getFormattedText(raw, i.label, i.trans),
+        value: getFormattedText(raw, i.value, i.trans),
       };
     });
   }
-  return getItems(raw, items);
-}
-
-/** 根据配置里的layout将配置格式化为带 key 的具体配置,例如:[{ key: 'list', value: any, ...ModuleDataList }] */
-const layoutConfig = computed(() => {
-  const refData = props.data;
-  const board = clone(props.moduleData.board) || [];
-  const list = clone(props.moduleData.list) || [];
-  const gallery = clone(props.moduleData.gallery) || [];
-  const complex_list = clone(props.moduleData.complex_list) || [];
-  const gallery_list = clone(props.moduleData.gallery_list) || [];
-  const tabs = clone(props.moduleData.tabs) || [];
-  const chart = clone(props.moduleData.chart) || [];
-  const table = clone(props.moduleData.table) || [];
-  const preset = clone(props.moduleData.preset) || [];
-
-  return layout.items.reduce((arr: any[], item) => {
-    switch (item.name) {
-      case 'board': {
-        const cfg = board.shift();
-        if (!cfg) break;
-        const data = getData(refData, cfg.readFrom, cfg.parser);
 
-        arr.push({
-          overflow: true,
+  // 获取当 List 组件配置带 items 项时的最终 items 配置
+  function getListItems(raw: any, items: CommonItem[], mapFromData?: boolean) {
+    if (mapFromData && Array.isArray(raw)) {
+      return raw.map((data) => {
+        const item = items[0];
+        return {
           ...item,
-          ...cfg,
-          items: getItems(data, cfg.items),
-        });
-        break;
-      }
-      case 'list': {
-        const cfg = list.shift();
-        if (!cfg) break;
-        const data = getData(refData, cfg.readFrom, cfg.parser);
+          label: getFormattedText(data, item.label, item.trans),
+          value: getFormattedText(data, item.value, item.trans),
+        };
+      });
+    }
+    return getItems(raw, items);
+  }
 
-        arr.push({
-          overflow: true,
-          ...item,
-          ...cfg,
-          items: getListItems(data, cfg.items, cfg.mapFromData),
-        });
-        break;
-      }
-      case 'gallery': {
-        const cfg = gallery.shift();
-        if (!cfg) break;
-        const data = getData(refData, cfg.readFrom, cfg.parser);
+  /** 根据配置里的layout将配置格式化为带 key 的具体配置,例如:[{ key: 'list', value: any, ...ModuleDataList }] */
+  const layoutConfig = computed(() => {
+    const refData = props.data;
+    const board = clone(props.moduleData.board) || [];
+    const list = clone(props.moduleData.list) || [];
+    const gallery = clone(props.moduleData.gallery) || [];
+    const complex_list = clone(props.moduleData.complex_list) || [];
+    const gallery_list = clone(props.moduleData.gallery_list) || [];
+    const tabs = clone(props.moduleData.tabs) || [];
+    const chart = clone(props.moduleData.chart) || [];
+    const table = clone(props.moduleData.table) || [];
+    const preset = clone(props.moduleData.preset) || [];
 
-        arr.push({
-          overflow: true,
-          ...item,
-          ...cfg,
-          items: getItems(data, cfg.items),
-        });
-        break;
-      }
-      case 'complex_list': {
-        const cfg = complex_list.shift();
-        if (!cfg) break;
-        const data = getData(refData, cfg.readFrom, cfg.parser);
+    return layout.items.reduce((arr: any[], item) => {
+      switch (item.name) {
+        case 'board': {
+          const cfg = board.shift();
+          if (!cfg) break;
+          const data = getData(refData, cfg.readFrom, cfg.parser);
 
-        if (cfg.mapFromData) {
-          const firstListItem = cfg.items[0];
           arr.push({
             overflow: true,
             ...item,
             ...cfg,
-            items: (data || []).map((d) => {
-              return {
-                title: getFormattedText(d, firstListItem.title, firstListItem.trans),
-                contents: firstListItem.contents.map((e) => {
-                  return {
-                    ...e,
-                    label: getFormattedText(d, e.label, e.trans),
-                    value: getFormattedText(d, e.value, e.trans),
-                  };
-                }),
-              };
-            }),
+            items: getItems(data, cfg.items),
           });
-        } else {
+          break;
+        }
+        case 'list': {
+          const cfg = list.shift();
+          if (!cfg) break;
+          const data = getData(refData, cfg.readFrom, cfg.parser);
+
           arr.push({
             overflow: true,
             ...item,
             ...cfg,
-            items: cfg.items.map((i) => {
-              return {
-                title: getFormattedText(data, i.title, i.trans),
-                contents: i.contents.map((e) => {
-                  return {
-                    ...e,
-                    label: getFormattedText(data, e.label, e.trans),
-                    value: getFormattedText(data, e.value, e.trans),
-                  };
-                }),
-              };
-            }),
+            items: getListItems(data, cfg.items, cfg.mapFromData),
           });
+          break;
         }
-        break;
-      }
-      case 'gallery_list': {
-        const cfg = gallery_list.shift();
-        if (!cfg) break;
-        const data = getData(refData, cfg.readFrom, cfg.parser);
-
-        arr.push({
-          overflow: true,
-          ...item,
-          ...cfg,
-          items: getItems(data, cfg.items),
-          galleryItems: getItems(data, cfg.galleryItems),
-        });
-        break;
-      }
-      case 'tabs': {
-        const cfg = tabs.shift();
-        if (!cfg) break;
-        const data = getData(refData, cfg.readFrom, cfg.parser);
+        case 'gallery': {
+          const cfg = gallery.shift();
+          if (!cfg) break;
+          const data = getData(refData, cfg.readFrom, cfg.parser);
 
-        if (cfg.mapFromData) {
-          const firstListItem = cfg.items[0];
           arr.push({
             overflow: true,
             ...item,
             ...cfg,
-            items: (data || []).map((d) => {
-              return {
-                title: getFormattedText(d, firstListItem.title, firstListItem.trans),
-                contents: firstListItem.contents.map((e) => {
-                  return {
-                    ...e,
-                    label: getFormattedText(d, e.label, e.trans),
-                    value: getFormattedText(d, e.value, e.trans),
-                  };
-                }),
-              };
-            }),
+            items: getItems(data, cfg.items),
           });
-        } else {
+          break;
+        }
+        case 'complex_list': {
+          const cfg = complex_list.shift();
+          if (!cfg) break;
+          const data = getData(refData, cfg.readFrom, cfg.parser);
+
+          if (cfg.mapFromData) {
+            const firstListItem = cfg.items[0];
+            arr.push({
+              overflow: true,
+              ...item,
+              ...cfg,
+              items: (data || []).map((d) => {
+                return {
+                  title: getFormattedText(d, firstListItem.title, firstListItem.trans),
+                  contents: firstListItem.contents.map((e) => {
+                    return {
+                      ...e,
+                      label: getFormattedText(d, e.label, e.trans),
+                      value: getFormattedText(d, e.value, e.trans),
+                    };
+                  }),
+                };
+              }),
+            });
+          } else {
+            arr.push({
+              overflow: true,
+              ...item,
+              ...cfg,
+              items: cfg.items.map((i) => {
+                return {
+                  title: getFormattedText(data, i.title, i.trans),
+                  contents: i.contents.map((e) => {
+                    return {
+                      ...e,
+                      label: getFormattedText(data, e.label, e.trans),
+                      value: getFormattedText(data, e.value, e.trans),
+                    };
+                  }),
+                };
+              }),
+            });
+          }
+          break;
+        }
+        case 'gallery_list': {
+          const cfg = gallery_list.shift();
+          if (!cfg) break;
+          const data = getData(refData, cfg.readFrom, cfg.parser);
+
           arr.push({
             overflow: true,
             ...item,
             ...cfg,
-            items: cfg.items.map((i) => {
-              return {
-                title: getFormattedText(data, i.title, i.trans),
-                contents: i.contents.map((e) => {
-                  return {
-                    ...e,
-                    label: getFormattedText(data, e.label, e.trans),
-                    value: getFormattedText(data, e.value, e.trans),
-                  };
-                }),
-              };
-            }),
+            items: getItems(data, cfg.items),
+            galleryItems: getItems(data, cfg.galleryItems),
           });
+          break;
         }
-        break;
-      }
-      case 'chart': {
-        const cfg = chart.shift();
-        if (!cfg) break;
-        const data = getData(refData, cfg.readFrom, cfg.parser);
+        case 'tabs': {
+          const cfg = tabs.shift();
+          if (!cfg) break;
+          const data = getData(refData, cfg.readFrom, cfg.parser);
 
-        arr.push({
-          ...item,
-          config: cfg,
-          data,
-        });
-        break;
-      }
-      case 'table': {
-        const cfg = table.shift();
-        if (!cfg) break;
-        const data = getData(refData, cfg.readFrom, cfg.parser);
+          if (cfg.mapFromData) {
+            const firstListItem = cfg.items[0];
+            arr.push({
+              overflow: true,
+              ...item,
+              ...cfg,
+              items: (data || []).map((d) => {
+                return {
+                  title: getFormattedText(d, firstListItem.title, firstListItem.trans),
+                  contents: firstListItem.contents.map((e) => {
+                    return {
+                      ...e,
+                      label: getFormattedText(d, e.label, e.trans),
+                      value: getFormattedText(d, e.value, e.trans),
+                    };
+                  }),
+                };
+              }),
+            });
+          } else {
+            arr.push({
+              overflow: true,
+              ...item,
+              ...cfg,
+              items: cfg.items.map((i) => {
+                return {
+                  title: getFormattedText(data, i.title, i.trans),
+                  contents: i.contents.map((e) => {
+                    return {
+                      ...e,
+                      label: getFormattedText(data, e.label, e.trans),
+                      value: getFormattedText(data, e.value, e.trans),
+                    };
+                  }),
+                };
+              }),
+            });
+          }
+          break;
+        }
+        case 'chart': {
+          const cfg = chart.shift();
+          if (!cfg) break;
+          const data = getData(refData, cfg.readFrom, cfg.parser);
 
-        arr.push({
-          ...cfg,
-          ...item,
-          columns: cfg.columns,
-          data,
-        });
-        break;
-      }
-      default: {
-        const cfg = preset.shift();
-        if (!cfg) break;
-        const data = getData(refData, cfg.readFrom, cfg.parser);
+          arr.push({
+            ...item,
+            config: cfg,
+            data,
+          });
+          break;
+        }
+        case 'table': {
+          const cfg = table.shift();
+          if (!cfg) break;
+          const data = getData(refData, cfg.readFrom, cfg.parser);
 
-        arr.push({
-          ...item,
-          data,
-          config: cfg,
-        });
-        break;
+          arr.push({
+            ...cfg,
+            ...item,
+            columns: cfg.columns,
+            data,
+          });
+          break;
+        }
+        default: {
+          const cfg = preset.shift();
+          if (!cfg) break;
+          const data = getData(refData, cfg.readFrom, cfg.parser);
+
+          arr.push({
+            ...item,
+            data,
+            config: cfg,
+          });
+          break;
+        }
       }
-    }
-    return arr;
-  }, []);
-});
+      return arr;
+    }, []);
+  });
 </script>
 <style lang="less" scoped>
-@import '@/design/theme.less';
+  @import '@/design/theme.less';
 
-.content {
-  height: calc(100% - 30px);
-  position: relative;
-  // z-index: -2;
-  display: flex;
-  flex-direction: column;
-}
-.content__background {
-  width: 100%;
-  height: 100%;
-  position: absolute;
-  top: 0;
-  left: 0;
-  z-index: 0;
-  object-fit: fill;
-}
-.image__background {
-  width: 35%;
-  height: 61%;
-  left: 30%;
-}
-.content__module {
-  // margin-top: 5px;
-  // margin-bottom: 5px;
-  width: 100%;
-  height: 100%;
-}
-.content__module1 {
-  background: url('@/assets/images/vent/homeNew/databg/4.png');
-  background-repeat: no-repeat;
-  background-size: 100% 100%;
-  height: 129px;
-  margin-top: 20%;
-}
-.content__moduleFire {
-  width: 100%;
-  height: 100%;
-  margin-left: -24% !important;
-}
-.content__module_dust {
-  background: url('@/assets/images/vent/homeNew/bottomBg.png');
-  background-repeat: no-repeat;
-  background-size: 100% 100%;
-  width: 100%;
-  height: 100%;
-}
-// .content__module:first-of-type {
-//   margin-top: 0;
-// }
-// .content__module:last-of-type {
-//   margin-bottom: 0;
-// }
-::-webkit-scrollbar {
-  width: 5px !important;
-}
-::-webkit-scrollbar-thumb {
-  width: 5px !important;
-}
+  .content {
+    height: calc(100% - 30px);
+    position: relative;
+    // z-index: -2;
+    display: flex;
+    flex-direction: column;
+    overflow-x: hidden;
+  }
+  .content__background {
+    width: 100%;
+    height: 100%;
+    position: absolute;
+    top: 0;
+    left: 0;
+    z-index: 0;
+    object-fit: fill;
+  }
+  .image__background {
+    width: 35%;
+    height: 61%;
+    left: 30%;
+  }
+  .content__module {
+    // margin-top: 5px;
+    // margin-bottom: 5px;
+    width: 100%;
+    height: 100%;
+  }
+  .content__module1 {
+    background: url('@/assets/images/vent/homeNew/databg/4.png');
+    background-repeat: no-repeat;
+    background-size: 100% 100%;
+    height: 129px;
+    margin-top: 20%;
+  }
+  .content__moduleFire {
+    width: 100%;
+    height: 100%;
+    margin-left: -24% !important;
+  }
+  .content__module_dust {
+    background: url('@/assets/images/vent/homeNew/bottomBg.png');
+    background-repeat: no-repeat;
+    background-size: 100% 100%;
+    width: 100%;
+    height: 100%;
+  }
+  // .content__module:first-of-type {
+  //   margin-top: 0;
+  // }
+  // .content__module:last-of-type {
+  //   margin-bottom: 0;
+  // }
+  ::-webkit-scrollbar {
+    width: 5px !important;
+  }
+  ::-webkit-scrollbar-thumb {
+    width: 5px !important;
+  }
 
-:deep(.zxm-select:not(.zxm-select-customize-input) .zxm-select-selector) {
-  /* background-color: transparent; */
-  color: #fff;
-}
-:deep(.zxm-select-arrow) {
-  color: #fff;
-}
-:deep(.zxm-select-selection-item) {
-  color: #fff !important;
-}
-:deep(.zxm-select-selection-placeholder) {
-  color: #fff !important;
-}
-:deep(.dialog-overlay) {
-  width: 100%;
-  height: 100%;
-  position: unset;
-  box-shadow: unset;
-}
+  :deep(.zxm-select:not(.zxm-select-customize-input) .zxm-select-selector) {
+    /* background-color: transparent; */
+    color: #fff;
+  }
+  :deep(.zxm-select-arrow) {
+    color: #fff;
+  }
+  :deep(.zxm-select-selection-item) {
+    color: #fff !important;
+  }
+  :deep(.zxm-select-selection-placeholder) {
+    color: #fff !important;
+  }
+  :deep(.dialog-overlay) {
+    width: 100%;
+    height: 100%;
+    position: unset;
+    box-shadow: unset;
+  }
 
-::-webkit-scrollbar {
-  width: 5px !important;
-}
-::-webkit-scrollbar-thumb {
-  width: 5px !important;
-}
+  ::-webkit-scrollbar {
+    width: 5px !important;
+  }
+  ::-webkit-scrollbar-thumb {
+    width: 5px !important;
+  }
 </style>

+ 312 - 311
src/views/vent/home/configurable/blue/components/content-New.vue

@@ -141,359 +141,360 @@
   </div>
 </template>
 <script lang="ts" setup>
-import { computed } from 'vue';
-import {
-  CommonItem,
-  Config,
-  // ModuleDataBoard,
-  // ModuleDataChart,
-  // ModuleDataList,
-  // ModuleDataPreset,
-  // ModuleDataTable,
-} from '../../../../deviceManager/configurationTable/types';
-import MiniBoard from '../../components/detail/MiniBoard.vue';
-import TimelineList from '../../components/detail/TimelineList.vue';
-import TimelineListNew from '../../components/detail/TimelineListNew.vue';
-import CustomList from '../../components/detail/CustomList.vue';
-import CustomGallery from '../../components/detail/CustomGallery.vue';
-import ComplexList from '../../components/detail/ComplexList.vue';
-import ComplexListNew from '../../components/detail/ComplexList-New.vue';
-import GalleryList from '../../components/detail/GalleryList.vue';
-import CustomTable from '../../components/detail/CustomTable-New.vue';
-import CustomChart from '../../components/detail/CustomChart.vue';
-import { clone } from 'lodash-es';
-import { getData, getFormattedText } from '../../hooks/helper';
-import BlastDelta from '../../../../monitorManager/deviceMonitor/components/device/modal/blastDelta.vue';
-import QHCurve from '../../components/preset/QHCurve.vue';
-import MeasureDetail from '../../components/preset/MeasureDetail.vue';
-import CustomTabs from '../../components/preset/CustomTabs.vue';
-import AIChat from '/@/components/AIChat/MiniChat.vue';
-import DeviceAlarm from '../../components/preset/DeviceAlarm.vue';
-import MiniBoardNew from '../../components/detail/MiniBoard-New.vue';
-import CustomTableNew from '../../components/detail/CustomTable-New.vue';
-// import FIreWarn from './preset/FIreWarn.vue';
-// import FIreControl from './preset/FIreControl.vue';
+  import { computed } from 'vue';
+  import {
+    CommonItem,
+    Config,
+    // ModuleDataBoard,
+    // ModuleDataChart,
+    // ModuleDataList,
+    // ModuleDataPreset,
+    // ModuleDataTable,
+  } from '../../../../deviceManager/configurationTable/types';
+  import MiniBoard from '../../components/detail/MiniBoard.vue';
+  import TimelineList from '../../components/detail/TimelineList.vue';
+  import TimelineListNew from '../../components/detail/TimelineListNew.vue';
+  import CustomList from '../../components/detail/CustomList.vue';
+  import CustomGallery from '../../components/detail/CustomGallery.vue';
+  import ComplexList from '../../components/detail/ComplexList.vue';
+  import ComplexListNew from '../../components/detail/ComplexList-New.vue';
+  import GalleryList from '../../components/detail/GalleryList.vue';
+  import CustomTable from '../../components/detail/CustomTable-New.vue';
+  import CustomChart from '../../components/detail/CustomChart.vue';
+  import { clone } from 'lodash-es';
+  import { getData, getFormattedText } from '../../hooks/helper';
+  import BlastDelta from '../../../../monitorManager/deviceMonitor/components/device/modal/blastDelta.vue';
+  import QHCurve from '../../components/preset/QHCurve.vue';
+  import MeasureDetail from '../../components/preset/MeasureDetail.vue';
+  import CustomTabs from '../../components/preset/CustomTabs.vue';
+  import AIChat from '/@/components/AIChat/MiniChat.vue';
+  import DeviceAlarm from '../../components/preset/DeviceAlarm.vue';
+  import MiniBoardNew from '../../components/detail/MiniBoard-New.vue';
+  import CustomTableNew from '../../components/detail/CustomTable-New.vue';
+  // import FIreWarn from './preset/FIreWarn.vue';
+  // import FIreControl from './preset/FIreControl.vue';
 
-const props = defineProps<{
-  data: any;
-  moduleData: Config['moduleData'];
-}>();
+  const props = defineProps<{
+    data: any;
+    moduleData: Config['moduleData'];
+  }>();
 
-const { background, layout } = props.moduleData;
+  const { background, layout } = props.moduleData;
 
-// 获取当原始配置带 items 项时的最终 items 配置
-function getItems(raw, items: CommonItem[]) {
-  return items.map((i) => {
-    return {
-      ...i,
-      label: getFormattedText(raw, i.label, i.trans),
-      value: getFormattedText(raw, i.value, i.trans),
-    };
-  });
-}
-
-// 获取当 List 组件配置带 items 项时的最终 items 配置
-function getListItems(raw: any, items: CommonItem[], mapFromData?: boolean) {
-  if (mapFromData && Array.isArray(raw)) {
-    return raw.map((data) => {
-      const item = items[0];
+  // 获取当原始配置带 items 项时的最终 items 配置
+  function getItems(raw, items: CommonItem[]) {
+    return items.map((i) => {
       return {
-        ...item,
-        label: getFormattedText(data, item.label, item.trans),
-        value: getFormattedText(data, item.value, item.trans),
+        ...i,
+        label: getFormattedText(raw, i.label, i.trans),
+        value: getFormattedText(raw, i.value, i.trans),
       };
     });
   }
-  return getItems(raw, items);
-}
-
-/** 根据配置里的layout将配置格式化为带 key 的具体配置,例如:[{ key: 'list', value: any, ...ModuleDataList }] */
-const layoutConfig = computed(() => {
-  const refData = props.data;
-  const board = clone(props.moduleData.board) || [];
-  const list = clone(props.moduleData.list) || [];
-  const gallery = clone(props.moduleData.gallery) || [];
-  const complex_list = clone(props.moduleData.complex_list) || [];
-  const gallery_list = clone(props.moduleData.gallery_list) || [];
-  const tabs = clone(props.moduleData.tabs) || [];
-  const chart = clone(props.moduleData.chart) || [];
-  const table = clone(props.moduleData.table) || [];
-  const preset = clone(props.moduleData.preset) || [];
-
-  return layout.items.reduce((arr: any[], item) => {
-    switch (item.name) {
-      case 'board': {
-        const cfg = board.shift();
-        if (!cfg) break;
-        const data = getData(refData, cfg.readFrom, cfg.parser);
 
-        arr.push({
-          overflow: true,
+  // 获取当 List 组件配置带 items 项时的最终 items 配置
+  function getListItems(raw: any, items: CommonItem[], mapFromData?: boolean) {
+    if (mapFromData && Array.isArray(raw)) {
+      return raw.map((data) => {
+        const item = items[0];
+        return {
           ...item,
-          ...cfg,
-          items: getItems(data, cfg.items),
-        });
-        break;
-      }
-      case 'list': {
-        const cfg = list.shift();
-        if (!cfg) break;
-        const data = getData(refData, cfg.readFrom, cfg.parser);
+          label: getFormattedText(data, item.label, item.trans),
+          value: getFormattedText(data, item.value, item.trans),
+        };
+      });
+    }
+    return getItems(raw, items);
+  }
 
-        arr.push({
-          overflow: true,
-          ...item,
-          ...cfg,
-          items: getListItems(data, cfg.items, cfg.mapFromData),
-        });
-        break;
-      }
-      case 'gallery': {
-        const cfg = gallery.shift();
-        if (!cfg) break;
-        const data = getData(refData, cfg.readFrom, cfg.parser);
+  /** 根据配置里的layout将配置格式化为带 key 的具体配置,例如:[{ key: 'list', value: any, ...ModuleDataList }] */
+  const layoutConfig = computed(() => {
+    const refData = props.data;
+    const board = clone(props.moduleData.board) || [];
+    const list = clone(props.moduleData.list) || [];
+    const gallery = clone(props.moduleData.gallery) || [];
+    const complex_list = clone(props.moduleData.complex_list) || [];
+    const gallery_list = clone(props.moduleData.gallery_list) || [];
+    const tabs = clone(props.moduleData.tabs) || [];
+    const chart = clone(props.moduleData.chart) || [];
+    const table = clone(props.moduleData.table) || [];
+    const preset = clone(props.moduleData.preset) || [];
 
-        arr.push({
-          overflow: true,
-          ...item,
-          ...cfg,
-          items: getItems(data, cfg.items),
-        });
-        break;
-      }
-      case 'complex_list': {
-        const cfg = complex_list.shift();
-        if (!cfg) break;
-        const data = getData(refData, cfg.readFrom, cfg.parser);
+    return layout.items.reduce((arr: any[], item) => {
+      switch (item.name) {
+        case 'board': {
+          const cfg = board.shift();
+          if (!cfg) break;
+          const data = getData(refData, cfg.readFrom, cfg.parser);
 
-        if (cfg.mapFromData) {
-          const firstListItem = cfg.items[0];
           arr.push({
             overflow: true,
             ...item,
             ...cfg,
-            items: (data || []).map((d) => {
-              return {
-                title: getFormattedText(d, firstListItem.title, firstListItem.trans),
-                contents: firstListItem.contents.map((e) => {
-                  return {
-                    ...e,
-                    label: getFormattedText(d, e.label, e.trans),
-                    value: getFormattedText(d, e.value, e.trans),
-                  };
-                }),
-              };
-            }),
+            items: getItems(data, cfg.items),
           });
-        } else {
+          break;
+        }
+        case 'list': {
+          const cfg = list.shift();
+          if (!cfg) break;
+          const data = getData(refData, cfg.readFrom, cfg.parser);
+
           arr.push({
             overflow: true,
             ...item,
             ...cfg,
-            items: cfg.items.map((i) => {
-              return {
-                title: getFormattedText(data, i.title, i.trans),
-                contents: i.contents.map((e) => {
-                  return {
-                    ...e,
-                    label: getFormattedText(data, e.label, e.trans),
-                    value: getFormattedText(data, e.value, e.trans),
-                  };
-                }),
-              };
-            }),
+            items: getListItems(data, cfg.items, cfg.mapFromData),
           });
+          break;
         }
-        break;
-      }
-      case 'gallery_list': {
-        const cfg = gallery_list.shift();
-        if (!cfg) break;
-        const data = getData(refData, cfg.readFrom, cfg.parser);
-
-        arr.push({
-          overflow: true,
-          ...item,
-          ...cfg,
-          items: getItems(data, cfg.items),
-          galleryItems: getItems(data, cfg.galleryItems),
-        });
-        break;
-      }
-      case 'tabs': {
-        const cfg = tabs.shift();
-        if (!cfg) break;
-        const data = getData(refData, cfg.readFrom, cfg.parser);
+        case 'gallery': {
+          const cfg = gallery.shift();
+          if (!cfg) break;
+          const data = getData(refData, cfg.readFrom, cfg.parser);
 
-        if (cfg.mapFromData) {
-          const firstListItem = cfg.items[0];
           arr.push({
             overflow: true,
             ...item,
             ...cfg,
-            items: (data || []).map((d) => {
-              return {
-                title: getFormattedText(d, firstListItem.title, firstListItem.trans),
-                contents: firstListItem.contents.map((e) => {
-                  return {
-                    ...e,
-                    label: getFormattedText(d, e.label, e.trans),
-                    value: getFormattedText(d, e.value, e.trans),
-                  };
-                }),
-              };
-            }),
+            items: getItems(data, cfg.items),
           });
-        } else {
+          break;
+        }
+        case 'complex_list': {
+          const cfg = complex_list.shift();
+          if (!cfg) break;
+          const data = getData(refData, cfg.readFrom, cfg.parser);
+
+          if (cfg.mapFromData) {
+            const firstListItem = cfg.items[0];
+            arr.push({
+              overflow: true,
+              ...item,
+              ...cfg,
+              items: (data || []).map((d) => {
+                return {
+                  title: getFormattedText(d, firstListItem.title, firstListItem.trans),
+                  contents: firstListItem.contents.map((e) => {
+                    return {
+                      ...e,
+                      label: getFormattedText(d, e.label, e.trans),
+                      value: getFormattedText(d, e.value, e.trans),
+                    };
+                  }),
+                };
+              }),
+            });
+          } else {
+            arr.push({
+              overflow: true,
+              ...item,
+              ...cfg,
+              items: cfg.items.map((i) => {
+                return {
+                  title: getFormattedText(data, i.title, i.trans),
+                  contents: i.contents.map((e) => {
+                    return {
+                      ...e,
+                      label: getFormattedText(data, e.label, e.trans),
+                      value: getFormattedText(data, e.value, e.trans),
+                    };
+                  }),
+                };
+              }),
+            });
+          }
+          break;
+        }
+        case 'gallery_list': {
+          const cfg = gallery_list.shift();
+          if (!cfg) break;
+          const data = getData(refData, cfg.readFrom, cfg.parser);
+
           arr.push({
             overflow: true,
             ...item,
             ...cfg,
-            items: cfg.items.map((i) => {
-              return {
-                title: getFormattedText(data, i.title, i.trans),
-                contents: i.contents.map((e) => {
-                  return {
-                    ...e,
-                    label: getFormattedText(data, e.label, e.trans),
-                    value: getFormattedText(data, e.value, e.trans),
-                  };
-                }),
-              };
-            }),
+            items: getItems(data, cfg.items),
+            galleryItems: getItems(data, cfg.galleryItems),
           });
+          break;
         }
-        break;
-      }
-      case 'chart': {
-        const cfg = chart.shift();
-        if (!cfg) break;
-        const data = getData(refData, cfg.readFrom, cfg.parser);
+        case 'tabs': {
+          const cfg = tabs.shift();
+          if (!cfg) break;
+          const data = getData(refData, cfg.readFrom, cfg.parser);
 
-        arr.push({
-          ...item,
-          config: cfg,
-          data,
-        });
-        break;
-      }
-      case 'table': {
-        const cfg = table.shift();
-        if (!cfg) break;
-        const data = getData(refData, cfg.readFrom, cfg.parser);
+          if (cfg.mapFromData) {
+            const firstListItem = cfg.items[0];
+            arr.push({
+              overflow: true,
+              ...item,
+              ...cfg,
+              items: (data || []).map((d) => {
+                return {
+                  title: getFormattedText(d, firstListItem.title, firstListItem.trans),
+                  contents: firstListItem.contents.map((e) => {
+                    return {
+                      ...e,
+                      label: getFormattedText(d, e.label, e.trans),
+                      value: getFormattedText(d, e.value, e.trans),
+                    };
+                  }),
+                };
+              }),
+            });
+          } else {
+            arr.push({
+              overflow: true,
+              ...item,
+              ...cfg,
+              items: cfg.items.map((i) => {
+                return {
+                  title: getFormattedText(data, i.title, i.trans),
+                  contents: i.contents.map((e) => {
+                    return {
+                      ...e,
+                      label: getFormattedText(data, e.label, e.trans),
+                      value: getFormattedText(data, e.value, e.trans),
+                    };
+                  }),
+                };
+              }),
+            });
+          }
+          break;
+        }
+        case 'chart': {
+          const cfg = chart.shift();
+          if (!cfg) break;
+          const data = getData(refData, cfg.readFrom, cfg.parser);
 
-        arr.push({
-          ...cfg,
-          ...item,
-          columns: cfg.columns,
-          data,
-        });
-        break;
-      }
-      default: {
-        const cfg = preset.shift();
-        if (!cfg) break;
-        const data = getData(refData, cfg.readFrom, cfg.parser);
+          arr.push({
+            ...item,
+            config: cfg,
+            data,
+          });
+          break;
+        }
+        case 'table': {
+          const cfg = table.shift();
+          if (!cfg) break;
+          const data = getData(refData, cfg.readFrom, cfg.parser);
 
-        arr.push({
-          ...item,
-          data,
-          config: cfg,
-        });
-        break;
+          arr.push({
+            ...cfg,
+            ...item,
+            columns: cfg.columns,
+            data,
+          });
+          break;
+        }
+        default: {
+          const cfg = preset.shift();
+          if (!cfg) break;
+          const data = getData(refData, cfg.readFrom, cfg.parser);
+
+          arr.push({
+            ...item,
+            data,
+            config: cfg,
+          });
+          break;
+        }
       }
-    }
-    return arr;
-  }, []);
-});
+      return arr;
+    }, []);
+  });
 </script>
 <style lang="less" scoped>
-@import '@/design/theme.less';
+  @import '@/design/theme.less';
 
-.content {
-  height: calc(100% - 30px);
-  position: relative;
-  // z-index: -2;
-  display: flex;
-  flex-direction: column;
-}
-.content__background {
-  width: 100%;
-  height: 100%;
-  position: absolute;
-  top: 0;
-  left: 0;
-  z-index: 0;
-  object-fit: fill;
-}
-.image__background {
-  width: 35%;
-  height: 61%;
-  left: 30%;
-}
-.content__module {
-  // margin-top: 5px;
-  // margin-bottom: 5px;
-  width: 100%;
-  height: 100%;
-}
-.content__module1 {
-  background: url('@/assets/images/vent/homeNew/databg/4.png');
-  background-repeat: no-repeat;
-  background-size: 100% 100%;
-  height: 129px;
-  margin-top: 20%;
-}
-.content__moduleFire {
-  width: 100%;
-  height: 100%;
-  margin-left: -24% !important;
-}
-.content__module_dust {
-  background: url('@/assets/images/vent/homeNew/bottomBg.png');
-  background-repeat: no-repeat;
-  background-size: 100% 100%;
-  width: 100%;
-  height: 100%;
-  padding: 0 34px;
-}
-// .content__module:first-of-type {
-//   margin-top: 0;
-// }
-// .content__module:last-of-type {
-//   margin-bottom: 0;
-// }
-::-webkit-scrollbar {
-  width: 5px !important;
-}
-::-webkit-scrollbar-thumb {
-  width: 5px !important;
-}
+  .content {
+    height: calc(100% - 30px);
+    position: relative;
+    // z-index: -2;
+    display: flex;
+    flex-direction: column;
+    overflow-x: hidden;
+  }
+  .content__background {
+    width: 100%;
+    height: 100%;
+    position: absolute;
+    top: 0;
+    left: 0;
+    z-index: 0;
+    object-fit: fill;
+  }
+  .image__background {
+    width: 35%;
+    height: 61%;
+    left: 30%;
+  }
+  .content__module {
+    // margin-top: 5px;
+    // margin-bottom: 5px;
+    width: 100%;
+    height: 100%;
+  }
+  .content__module1 {
+    background: url('@/assets/images/vent/homeNew/databg/4.png');
+    background-repeat: no-repeat;
+    background-size: 100% 100%;
+    height: 129px;
+    margin-top: 20%;
+  }
+  .content__moduleFire {
+    width: 100%;
+    height: 100%;
+    margin-left: -24% !important;
+  }
+  .content__module_dust {
+    // background: url('@/assets/images/vent/homeNew/bottomBg.png');
+    // background-repeat: no-repeat;
+    // background-size: 100% 100%;
+    width: 100%;
+    height: 100%;
+    padding: 0 34px;
+  }
+  // .content__module:first-of-type {
+  //   margin-top: 0;
+  // }
+  // .content__module:last-of-type {
+  //   margin-bottom: 0;
+  // }
+  ::-webkit-scrollbar {
+    width: 5px !important;
+  }
+  ::-webkit-scrollbar-thumb {
+    width: 5px !important;
+  }
 
-:deep(.zxm-select:not(.zxm-select-customize-input) .zxm-select-selector) {
-  /* background-color: transparent; */
-  color: #fff;
-}
-:deep(.zxm-select-arrow) {
-  color: #fff;
-}
-:deep(.zxm-select-selection-item) {
-  color: #fff !important;
-}
-:deep(.zxm-select-selection-placeholder) {
-  color: #fff !important;
-}
-:deep(.dialog-overlay) {
-  width: 100%;
-  height: 100%;
-  position: unset;
-  box-shadow: unset;
-}
+  :deep(.zxm-select:not(.zxm-select-customize-input) .zxm-select-selector) {
+    /* background-color: transparent; */
+    color: #fff;
+  }
+  :deep(.zxm-select-arrow) {
+    color: #fff;
+  }
+  :deep(.zxm-select-selection-item) {
+    color: #fff !important;
+  }
+  :deep(.zxm-select-selection-placeholder) {
+    color: #fff !important;
+  }
+  :deep(.dialog-overlay) {
+    width: 100%;
+    height: 100%;
+    position: unset;
+    box-shadow: unset;
+  }
 
-::-webkit-scrollbar {
-  width: 5px !important;
-}
-::-webkit-scrollbar-thumb {
-  width: 5px !important;
-}
+  ::-webkit-scrollbar {
+    width: 5px !important;
+  }
+  ::-webkit-scrollbar-thumb {
+    width: 5px !important;
+  }
 </style>

+ 278 - 282
src/views/vent/home/configurable/blue/components/content-warn.vue

@@ -34,355 +34,351 @@
           </div>
         </template>
         <template v-if="config.name === 'dz_list'">
-          <DzList :deviceType="deviceType" :listOption="config.config.listOption" :listData="config.data"></DzList>
+          <DzList :deviceType="deviceType" :listOption="config.config.listOption" :listData="config.data" />
         </template>
         <template v-if="config.name === 'dz_card'">
-          <DzCard
-            :deviceType="deviceType"
-            :titleLeft="config.config.leftTitle"
-            :titleRight="config.config.rightTitle"
-            :paramData="config.data"
-          ></DzCard>
+          <DzCard :deviceType="deviceType" :titleLeft="config.config.leftTitle" :titleRight="config.config.rightTitle" :paramData="config.data" />
         </template>
         <!-- <template v-if="config.name === 'yj_risk'">
           <yjRisk :riskData="config.data"></yjRisk>
         </template> -->
         <template v-if="config.name === 'yj_chart'">
-          <yjChart :paramData="config.data"></yjChart>
+          <yjChart :paramData="config.data" />
         </template>
         <template v-if="config.name === 'yj_gas'">
-          <yjGas :type="config.config.type" :titleData="config.config.titleData" :gasData="config.data"></yjGas>
+          <yjGas :type="config.config.type" :titleData="config.config.titleData" :gasData="config.data" />
         </template>
         <template v-if="config.name === 'yj_ventWarn'">
-          <yjVentWarn :ventData="config.data"></yjVentWarn>
+          <yjVentWarn :ventData="config.data" />
         </template>
       </div>
     </div>
   </div>
 </template>
 <script lang="ts" setup>
-import { computed } from 'vue';
-import {
-  CommonItem,
-  Config,
-  ModuleDataBoard,
-  ModuleDataChart,
-  ModuleDataList,
-  ModuleDataPreset,
-  ModuleDataTable,
-} from '../../../../deviceManager/configurationTable/types';
-import DzList from '../../green/components/dz-list.vue';
-import DzCard from '../../green/components/dz-card.vue';
-import yjRisk from './yj_risk.vue';
-import yjChart from './yj_chart.vue';
-import yjGas from './yj_gasWarn.vue';
-import MiniBoard from './detail/MiniBoard-Warn.vue';
-import yjVentWarn from './yj_ventWarn.vue';
-import { clone } from 'lodash-es';
-import { getData, getFormattedText } from '../../hooks/helper';
+  import { computed } from 'vue';
+  import {
+    CommonItem,
+    Config,
+    ModuleDataBoard,
+    ModuleDataChart,
+    ModuleDataList,
+    ModuleDataPreset,
+    ModuleDataTable,
+  } from '../../../../deviceManager/configurationTable/types';
+  import DzList from '../../green/components/dz-list.vue';
+  import DzCard from '../../green/components/dz-card.vue';
+  import yjRisk from './yj_risk.vue';
+  import yjChart from './yj_chart.vue';
+  import yjGas from './yj_gasWarn.vue';
+  import MiniBoard from './detail/MiniBoard-Warn.vue';
+  import yjVentWarn from './yj_ventWarn.vue';
+  import { clone } from 'lodash-es';
+  import { getData, getFormattedText } from '../../hooks/helper';
 
-const props = defineProps<{
-  data: any;
-  moduleData: Config['moduleData'];
-  deviceType: string;
-}>();
+  const props = defineProps<{
+    data: any;
+    moduleData: Config['moduleData'];
+    deviceType: string;
+  }>();
 
-const { background, layout } = props.moduleData;
+  const { background, layout } = props.moduleData;
 
-// 获取当原始配置带 items 项时的最终 items 配置
-function getItems(raw, items: CommonItem[]) {
-  return items.map((i) => {
-    return {
-      ...i,
-      label: getFormattedText(raw, i.label, i.trans),
-      value: getFormattedText(raw, i.value, i.trans),
-    };
-  });
-}
-
-// 获取当 List 组件配置带 items 项时的最终 items 配置
-function getListItems(raw: any, items: CommonItem[], mapFromData?: boolean) {
-  if (mapFromData && Array.isArray(raw)) {
-    return raw.map((data) => {
-      const item = items[0];
+  // 获取当原始配置带 items 项时的最终 items 配置
+  function getItems(raw, items: CommonItem[]) {
+    return items.map((i) => {
       return {
-        ...item,
-        label: getFormattedText(data, item.label, item.trans),
-        value: getFormattedText(data, item.value, item.trans),
+        ...i,
+        label: getFormattedText(raw, i.label, i.trans),
+        value: getFormattedText(raw, i.value, i.trans),
       };
     });
   }
-  return getItems(raw, items);
-}
-
-/** 根据配置里的layout将配置格式化为带 key 的具体配置,例如:[{ key: 'list', value: any, ...ModuleDataList }] */
-const layoutConfig = computed(() => {
-  const refData = props.data;
-  const board = clone(props.moduleData.board) || [];
-  const list = clone(props.moduleData.list) || [];
-  const gallery = clone(props.moduleData.gallery) || [];
-  const complex_list = clone(props.moduleData.complex_list) || [];
-  const gallery_list = clone(props.moduleData.gallery_list) || [];
-  const tabs = clone(props.moduleData.tabs) || [];
-  const chart = clone(props.moduleData.chart) || [];
-  const table = clone(props.moduleData.table) || [];
-  const preset = clone(props.moduleData.preset) || [];
-
-  return layout.items.reduce((arr: any[], item) => {
-    switch (item.name) {
-      case 'board': {
-        const cfg = board.shift();
-        if (!cfg) break;
-        const data = getData(refData, cfg.readFrom, cfg.parser);
 
-        arr.push({
-          overflow: true,
+  // 获取当 List 组件配置带 items 项时的最终 items 配置
+  function getListItems(raw: any, items: CommonItem[], mapFromData?: boolean) {
+    if (mapFromData && Array.isArray(raw)) {
+      return raw.map((data) => {
+        const item = items[0];
+        return {
           ...item,
-          ...cfg,
-          items: getItems(data, cfg.items),
-        });
-        break;
-      }
-      case 'list': {
-        const cfg = list.shift();
-        if (!cfg) break;
-        const data = getData(refData, cfg.readFrom, cfg.parser);
+          label: getFormattedText(data, item.label, item.trans),
+          value: getFormattedText(data, item.value, item.trans),
+        };
+      });
+    }
+    return getItems(raw, items);
+  }
 
-        arr.push({
-          overflow: true,
-          ...item,
-          ...cfg,
-          items: getListItems(data, cfg.items, cfg.mapFromData),
-        });
-        break;
-      }
-      case 'gallery': {
-        const cfg = gallery.shift();
-        if (!cfg) break;
-        const data = getData(refData, cfg.readFrom, cfg.parser);
+  /** 根据配置里的layout将配置格式化为带 key 的具体配置,例如:[{ key: 'list', value: any, ...ModuleDataList }] */
+  const layoutConfig = computed(() => {
+    const refData = props.data;
+    const board = clone(props.moduleData.board) || [];
+    const list = clone(props.moduleData.list) || [];
+    const gallery = clone(props.moduleData.gallery) || [];
+    const complex_list = clone(props.moduleData.complex_list) || [];
+    const gallery_list = clone(props.moduleData.gallery_list) || [];
+    const tabs = clone(props.moduleData.tabs) || [];
+    const chart = clone(props.moduleData.chart) || [];
+    const table = clone(props.moduleData.table) || [];
+    const preset = clone(props.moduleData.preset) || [];
 
-        arr.push({
-          overflow: true,
-          ...item,
-          ...cfg,
-          items: getItems(data, cfg.items),
-        });
-        break;
-      }
-      case 'complex_list': {
-        const cfg = complex_list.shift();
-        if (!cfg) break;
-        const data = getData(refData, cfg.readFrom, cfg.parser);
+    return layout.items.reduce((arr: any[], item) => {
+      switch (item.name) {
+        case 'board': {
+          const cfg = board.shift();
+          if (!cfg) break;
+          const data = getData(refData, cfg.readFrom, cfg.parser);
 
-        if (cfg.mapFromData) {
-          const firstListItem = cfg.items[0];
           arr.push({
             overflow: true,
             ...item,
             ...cfg,
-            items: (data || []).map((d) => {
-              return {
-                title: getFormattedText(d, firstListItem.title, firstListItem.trans),
-                contents: firstListItem.contents.map((e) => {
-                  return {
-                    ...e,
-                    label: getFormattedText(d, e.label, e.trans),
-                    value: getFormattedText(d, e.value, e.trans),
-                  };
-                }),
-              };
-            }),
+            items: getItems(data, cfg.items),
           });
-        } else {
+          break;
+        }
+        case 'list': {
+          const cfg = list.shift();
+          if (!cfg) break;
+          const data = getData(refData, cfg.readFrom, cfg.parser);
+
           arr.push({
             overflow: true,
             ...item,
             ...cfg,
-            items: cfg.items.map((i) => {
-              return {
-                title: getFormattedText(data, i.title, i.trans),
-                contents: i.contents.map((e) => {
-                  return {
-                    ...e,
-                    label: getFormattedText(data, e.label, e.trans),
-                    value: getFormattedText(data, e.value, e.trans),
-                  };
-                }),
-              };
-            }),
+            items: getListItems(data, cfg.items, cfg.mapFromData),
           });
+          break;
         }
-        break;
-      }
-      case 'gallery_list': {
-        const cfg = gallery_list.shift();
-        if (!cfg) break;
-        const data = getData(refData, cfg.readFrom, cfg.parser);
+        case 'gallery': {
+          const cfg = gallery.shift();
+          if (!cfg) break;
+          const data = getData(refData, cfg.readFrom, cfg.parser);
 
-        arr.push({
-          overflow: true,
-          ...item,
-          ...cfg,
-          items: getItems(data, cfg.items),
-          galleryItems: getItems(data, cfg.galleryItems),
-        });
-        break;
-      }
-      case 'tabs': {
-        const cfg = tabs.shift();
-        if (!cfg) break;
-        const data = getData(refData, cfg.readFrom, cfg.parser);
-
-        if (cfg.mapFromData) {
-          const firstListItem = cfg.items[0];
           arr.push({
             overflow: true,
             ...item,
             ...cfg,
-            items: (data || []).map((d) => {
-              return {
-                title: getFormattedText(d, firstListItem.title, firstListItem.trans),
-                contents: firstListItem.contents.map((e) => {
-                  return {
-                    ...e,
-                    label: getFormattedText(d, e.label, e.trans),
-                    value: getFormattedText(d, e.value, e.trans),
-                  };
-                }),
-              };
-            }),
+            items: getItems(data, cfg.items),
           });
-        } else {
+          break;
+        }
+        case 'complex_list': {
+          const cfg = complex_list.shift();
+          if (!cfg) break;
+          const data = getData(refData, cfg.readFrom, cfg.parser);
+
+          if (cfg.mapFromData) {
+            const firstListItem = cfg.items[0];
+            arr.push({
+              overflow: true,
+              ...item,
+              ...cfg,
+              items: (data || []).map((d) => {
+                return {
+                  title: getFormattedText(d, firstListItem.title, firstListItem.trans),
+                  contents: firstListItem.contents.map((e) => {
+                    return {
+                      ...e,
+                      label: getFormattedText(d, e.label, e.trans),
+                      value: getFormattedText(d, e.value, e.trans),
+                    };
+                  }),
+                };
+              }),
+            });
+          } else {
+            arr.push({
+              overflow: true,
+              ...item,
+              ...cfg,
+              items: cfg.items.map((i) => {
+                return {
+                  title: getFormattedText(data, i.title, i.trans),
+                  contents: i.contents.map((e) => {
+                    return {
+                      ...e,
+                      label: getFormattedText(data, e.label, e.trans),
+                      value: getFormattedText(data, e.value, e.trans),
+                    };
+                  }),
+                };
+              }),
+            });
+          }
+          break;
+        }
+        case 'gallery_list': {
+          const cfg = gallery_list.shift();
+          if (!cfg) break;
+          const data = getData(refData, cfg.readFrom, cfg.parser);
+
           arr.push({
             overflow: true,
             ...item,
             ...cfg,
-            items: cfg.items.map((i) => {
-              return {
-                title: getFormattedText(data, i.title, i.trans),
-                contents: i.contents.map((e) => {
-                  return {
-                    ...e,
-                    label: getFormattedText(data, e.label, e.trans),
-                    value: getFormattedText(data, e.value, e.trans),
-                  };
-                }),
-              };
-            }),
+            items: getItems(data, cfg.items),
+            galleryItems: getItems(data, cfg.galleryItems),
           });
+          break;
         }
-        break;
-      }
-      case 'chart': {
-        const cfg = chart.shift();
-        if (!cfg) break;
-        const data = getData(refData, cfg.readFrom, cfg.parser);
+        case 'tabs': {
+          const cfg = tabs.shift();
+          if (!cfg) break;
+          const data = getData(refData, cfg.readFrom, cfg.parser);
 
-        arr.push({
-          ...item,
-          config: cfg,
-          data,
-        });
-        break;
-      }
-      case 'table': {
-        const cfg = table.shift();
-        if (!cfg) break;
-        const data = getData(refData, cfg.readFrom, cfg.parser);
+          if (cfg.mapFromData) {
+            const firstListItem = cfg.items[0];
+            arr.push({
+              overflow: true,
+              ...item,
+              ...cfg,
+              items: (data || []).map((d) => {
+                return {
+                  title: getFormattedText(d, firstListItem.title, firstListItem.trans),
+                  contents: firstListItem.contents.map((e) => {
+                    return {
+                      ...e,
+                      label: getFormattedText(d, e.label, e.trans),
+                      value: getFormattedText(d, e.value, e.trans),
+                    };
+                  }),
+                };
+              }),
+            });
+          } else {
+            arr.push({
+              overflow: true,
+              ...item,
+              ...cfg,
+              items: cfg.items.map((i) => {
+                return {
+                  title: getFormattedText(data, i.title, i.trans),
+                  contents: i.contents.map((e) => {
+                    return {
+                      ...e,
+                      label: getFormattedText(data, e.label, e.trans),
+                      value: getFormattedText(data, e.value, e.trans),
+                    };
+                  }),
+                };
+              }),
+            });
+          }
+          break;
+        }
+        case 'chart': {
+          const cfg = chart.shift();
+          if (!cfg) break;
+          const data = getData(refData, cfg.readFrom, cfg.parser);
 
-        arr.push({
-          ...cfg,
-          ...item,
-          columns: cfg.columns,
-          data,
-        });
-        break;
-      }
-      default: {
-        const cfg = preset.shift();
-        if (!cfg) break;
-        const data = getData(refData, cfg.readFrom, cfg.parser);
+          arr.push({
+            ...item,
+            config: cfg,
+            data,
+          });
+          break;
+        }
+        case 'table': {
+          const cfg = table.shift();
+          if (!cfg) break;
+          const data = getData(refData, cfg.readFrom, cfg.parser);
 
-        arr.push({
-          ...item,
-          data,
-          config: cfg,
-        });
-        break;
+          arr.push({
+            ...cfg,
+            ...item,
+            columns: cfg.columns,
+            data,
+          });
+          break;
+        }
+        default: {
+          const cfg = preset.shift();
+          if (!cfg) break;
+          const data = getData(refData, cfg.readFrom, cfg.parser);
+
+          arr.push({
+            ...item,
+            data,
+            config: cfg,
+          });
+          break;
+        }
       }
-    }
-    return arr;
-  }, []);
-});
+      return arr;
+    }, []);
+  });
 </script>
 <style lang="less" scoped>
-@import '@/design/theme.less';
+  @import '@/design/theme.less';
 
-.content {
-  height: calc(100% - 30px);
-  position: relative;
-  // z-index: -2;
-  display: flex;
-  flex-direction: column;
-}
+  .content {
+    height: calc(100% - 30px);
+    position: relative;
+    // z-index: -2;
+    display: flex;
+    flex-direction: column;
+    overflow-x: hidden;
+  }
 
-.content__background {
-  width: 100%;
-  height: 100%;
-  position: absolute;
-  top: 0;
-  left: 0;
-  z-index: 0;
-  object-fit: fill;
-}
+  .content__background {
+    width: 100%;
+    height: 100%;
+    position: absolute;
+    top: 0;
+    left: 0;
+    z-index: 0;
+    object-fit: fill;
+  }
 
-.content__module {
-  width: 100%;
-  height: 100%;
-}
-// .content__module:first-of-type {
-//   margin-top: 0;
-// }
-// .content__module:last-of-type {
-//   margin-bottom: 0;
-// }
-::-webkit-scrollbar {
-  width: 5px !important;
-}
+  .content__module {
+    width: 100%;
+    height: 100%;
+  }
+  // .content__module:first-of-type {
+  //   margin-top: 0;
+  // }
+  // .content__module:last-of-type {
+  //   margin-bottom: 0;
+  // }
+  ::-webkit-scrollbar {
+    width: 5px !important;
+  }
 
-::-webkit-scrollbar-thumb {
-  width: 5px !important;
-}
+  ::-webkit-scrollbar-thumb {
+    width: 5px !important;
+  }
 
-:deep(.zxm-select:not(.zxm-select-customize-input) .zxm-select-selector) {
-  /* background-color: transparent; */
-  color: #fff;
-}
+  :deep(.zxm-select:not(.zxm-select-customize-input) .zxm-select-selector) {
+    /* background-color: transparent; */
+    color: #fff;
+  }
 
-:deep(.zxm-select-arrow) {
-  color: #fff;
-}
+  :deep(.zxm-select-arrow) {
+    color: #fff;
+  }
 
-:deep(.zxm-select-selection-item) {
-  color: #fff !important;
-}
+  :deep(.zxm-select-selection-item) {
+    color: #fff !important;
+  }
 
-:deep(.zxm-select-selection-placeholder) {
-  color: #fff !important;
-}
+  :deep(.zxm-select-selection-placeholder) {
+    color: #fff !important;
+  }
 
-:deep(.dialog-overlay) {
-  width: 100%;
-  height: 100%;
-  position: unset;
-  box-shadow: unset;
-}
+  :deep(.dialog-overlay) {
+    width: 100%;
+    height: 100%;
+    position: unset;
+    box-shadow: unset;
+  }
 
-::-webkit-scrollbar {
-  width: 5px !important;
-}
+  ::-webkit-scrollbar {
+    width: 5px !important;
+  }
 
-::-webkit-scrollbar-thumb {
-  width: 5px !important;
-}
+  ::-webkit-scrollbar-thumb {
+    width: 5px !important;
+  }
 </style>

+ 330 - 329
src/views/vent/home/configurable/blue/components/content.vue

@@ -111,7 +111,7 @@
           <AIChat class="content__module" />
         </template>
         <template v-if="config.name === 'device_alarm'">
-          <DeviceAlarm class="content__module" :devicedata="config.data" />
+          <DeviceAlarm class="content__module" :devicedata="config.data" :config="config.config" />
         </template>
         <!-- lxh -->
         <template v-if="config.name === 'select_cs'">
@@ -149,389 +149,390 @@
   </div>
 </template>
 <script lang="ts" setup>
-import { computed } from 'vue';
-import {
-  CommonItem,
-  Config,
-  // ModuleDataBoard,
-  // ModuleDataChart,
-  // ModuleDataList,
-  // ModuleDataPreset,
-  // ModuleDataTable,
-} from '../../../deviceManager/configurationTable/types';
-import MiniBoard from '../../components/detail/MiniBoard.vue';
-import TimelineList from '../../components/detail/TimelineList.vue';
-import TimelineListNew from '../../components/detail/TimelineListNew.vue';
-import CustomList from '../../components/detail/CustomList.vue';
-import CustomGallery from '../../components/detail/CustomGallery.vue';
-import ComplexList from '../../components/detail/ComplexList.vue';
-import GalleryList from '../../components/detail/GalleryList.vue';
-import CustomTable from '../../components/detail/CustomTable.vue';
-import CustomChart from '../../components/detail/CustomChart.vue';
-import { clone } from 'lodash-es';
-import { getData, getFormattedText } from '../../hooks/helper';
-import BlastDelta from '../../../../monitorManager/deviceMonitor/components/device/modal/blastDelta.vue';
-import QHCurve from '../../components/preset/QHCurve.vue';
-import MeasureDetail from '../../components/preset/MeasureDetail.vue';
-import CustomTabs from '../../components/preset/CustomTabs.vue';
-import AIChat from '/@/components/AIChat/MiniChat.vue';
-import DeviceAlarm from '../../components/preset/DeviceAlarm.vue';
-import SelectCs from '../../components/preset/SelectCs.vue';
-import MiniBoardNew from '../../components/detail/MiniBoard-New.vue';
-import Partition from '../../components/preset/partition.vue';
-import SelectorDualChart from '../../components/preset/selectorDualChart.vue';
-import RadioLabel from '../../components/preset/radioLabel.vue';
-import ButtonList from '../../components/preset/buttonList.vue';
-// import FIreWarn from './preset/FIreWarn.vue';
-// import FIreControl from './preset/FIreControl.vue';
+  import { computed } from 'vue';
+  import {
+    CommonItem,
+    Config,
+    // ModuleDataBoard,
+    // ModuleDataChart,
+    // ModuleDataList,
+    // ModuleDataPreset,
+    // ModuleDataTable,
+  } from '../../../deviceManager/configurationTable/types';
+  import MiniBoard from '../../components/detail/MiniBoard.vue';
+  import TimelineList from '../../components/detail/TimelineList.vue';
+  import TimelineListNew from '../../components/detail/TimelineListNew.vue';
+  import CustomList from '../../components/detail/CustomList.vue';
+  import CustomGallery from '../../components/detail/CustomGallery.vue';
+  import ComplexList from '../../components/detail/ComplexList.vue';
+  import GalleryList from '../../components/detail/GalleryList.vue';
+  import CustomTable from '../../components/detail/CustomTable.vue';
+  import CustomChart from '../../components/detail/CustomChart.vue';
+  import { clone } from 'lodash-es';
+  import { getData, getFormattedText } from '../../hooks/helper';
+  import BlastDelta from '../../../../monitorManager/deviceMonitor/components/device/modal/blastDelta.vue';
+  import QHCurve from '../../components/preset/QHCurve.vue';
+  import MeasureDetail from '../../components/preset/MeasureDetail.vue';
+  import CustomTabs from '../../components/preset/CustomTabs.vue';
+  import AIChat from '/@/components/AIChat/MiniChat.vue';
+  import DeviceAlarm from '../../components/preset/DeviceAlarm.vue';
+  import SelectCs from '../../components/preset/SelectCs.vue';
+  import MiniBoardNew from '../../components/detail/MiniBoard-New.vue';
+  import Partition from '../../components/preset/partition.vue';
+  import SelectorDualChart from '../../components/preset/selectorDualChart.vue';
+  import RadioLabel from '../../components/preset/radioLabel.vue';
+  import ButtonList from '../../components/preset/buttonList.vue';
+  // import FIreWarn from './preset/FIreWarn.vue';
+  // import FIreControl from './preset/FIreControl.vue';
 
-const props = defineProps<{
-  data: any;
-  moduleData: Config['moduleData'];
-}>();
+  const props = defineProps<{
+    data: any;
+    moduleData: Config['moduleData'];
+  }>();
 
-const { background, layout } = props.moduleData;
+  const { background, layout } = props.moduleData;
 
-// 获取当原始配置带 items 项时的最终 items 配置
-function getItems(raw, items: CommonItem[]) {
-  return items.map((i) => {
-    return {
-      ...i,
-      label: getFormattedText(raw, i.label, i.trans),
-      value: getFormattedText(raw, i.value, i.trans),
-    };
-  });
-}
-
-// 获取当 List 组件配置带 items 项时的最终 items 配置
-function getListItems(raw: any, items: CommonItem[], mapFromData?: boolean) {
-  if (mapFromData && Array.isArray(raw)) {
-    return raw.map((data) => {
-      const item = items[0];
+  // 获取当原始配置带 items 项时的最终 items 配置
+  function getItems(raw, items: CommonItem[]) {
+    return items.map((i) => {
       return {
-        ...item,
-        label: getFormattedText(data, item.label, item.trans),
-        value: getFormattedText(data, item.value, item.trans),
+        ...i,
+        label: getFormattedText(raw, i.label, i.trans),
+        value: getFormattedText(raw, i.value, i.trans),
       };
     });
   }
-  return getItems(raw, items);
-}
-
-/** 根据配置里的layout将配置格式化为带 key 的具体配置,例如:[{ key: 'list', value: any, ...ModuleDataList }] */
-const layoutConfig = computed(() => {
-  const refData = props.data;
-  const board = clone(props.moduleData.board) || [];
-  const list = clone(props.moduleData.list) || [];
-  const gallery = clone(props.moduleData.gallery) || [];
-  const complex_list = clone(props.moduleData.complex_list) || [];
-  const gallery_list = clone(props.moduleData.gallery_list) || [];
-  const tabs = clone(props.moduleData.tabs) || [];
-  const chart = clone(props.moduleData.chart) || [];
-  const table = clone(props.moduleData.table) || [];
-  const preset = clone(props.moduleData.preset) || [];
-  const partition = clone(props.moduleData.partition) || [];
 
-  return layout.items.reduce((arr: any[], item) => {
-    switch (item.name) {
-      case 'board': {
-        const cfg = board.shift();
-        if (!cfg) break;
-        const data = getData(refData, cfg.readFrom, cfg.parser);
-
-        arr.push({
-          overflow: true,
+  // 获取当 List 组件配置带 items 项时的最终 items 配置
+  function getListItems(raw: any, items: CommonItem[], mapFromData?: boolean) {
+    if (mapFromData && Array.isArray(raw)) {
+      return raw.map((data) => {
+        const item = items[0];
+        return {
           ...item,
-          ...cfg,
-          items: getItems(data, cfg.items),
-        });
-        break;
-      }
-      case 'list': {
-        const cfg = list.shift();
-        if (!cfg) break;
-        const data = getData(refData, cfg.readFrom, cfg.parser);
+          label: getFormattedText(data, item.label, item.trans),
+          value: getFormattedText(data, item.value, item.trans),
+        };
+      });
+    }
+    return getItems(raw, items);
+  }
 
-        arr.push({
-          overflow: true,
-          ...item,
-          ...cfg,
-          items: getListItems(data, cfg.items, cfg.mapFromData),
-        });
-        break;
-      }
-      case 'gallery': {
-        const cfg = gallery.shift();
-        if (!cfg) break;
-        const data = getData(refData, cfg.readFrom, cfg.parser);
+  /** 根据配置里的layout将配置格式化为带 key 的具体配置,例如:[{ key: 'list', value: any, ...ModuleDataList }] */
+  const layoutConfig = computed(() => {
+    const refData = props.data;
+    const board = clone(props.moduleData.board) || [];
+    const list = clone(props.moduleData.list) || [];
+    const gallery = clone(props.moduleData.gallery) || [];
+    const complex_list = clone(props.moduleData.complex_list) || [];
+    const gallery_list = clone(props.moduleData.gallery_list) || [];
+    const tabs = clone(props.moduleData.tabs) || [];
+    const chart = clone(props.moduleData.chart) || [];
+    const table = clone(props.moduleData.table) || [];
+    const preset = clone(props.moduleData.preset) || [];
+    const partition = clone(props.moduleData.partition) || [];
 
-        arr.push({
-          overflow: true,
-          ...item,
-          ...cfg,
-          items: getItems(data, cfg.items),
-        });
-        break;
-      }
-      case 'complex_list': {
-        const cfg = complex_list.shift();
-        if (!cfg) break;
-        const data = getData(refData, cfg.readFrom, cfg.parser);
+    return layout.items.reduce((arr: any[], item) => {
+      switch (item.name) {
+        case 'board': {
+          const cfg = board.shift();
+          if (!cfg) break;
+          const data = getData(refData, cfg.readFrom, cfg.parser);
 
-        if (cfg.mapFromData) {
-          const firstListItem = cfg.items[0];
           arr.push({
             overflow: true,
             ...item,
             ...cfg,
-            items: (data || []).map((d) => {
-              return {
-                title: getFormattedText(d, firstListItem.title, firstListItem.trans),
-                contents: firstListItem.contents.map((e) => {
-                  return {
-                    ...e,
-                    label: getFormattedText(d, e.label, e.trans),
-                    value: getFormattedText(d, e.value, e.trans),
-                  };
-                }),
-              };
-            }),
+            items: getItems(data, cfg.items),
           });
-        } else {
+          break;
+        }
+        case 'list': {
+          const cfg = list.shift();
+          if (!cfg) break;
+          const data = getData(refData, cfg.readFrom, cfg.parser);
+
           arr.push({
             overflow: true,
             ...item,
             ...cfg,
-            items: cfg.items.map((i) => {
-              return {
-                title: getFormattedText(data, i.title, i.trans),
-                contents: i.contents.map((e) => {
-                  return {
-                    ...e,
-                    label: getFormattedText(data, e.label, e.trans),
-                    value: getFormattedText(data, e.value, e.trans),
-                  };
-                }),
-              };
-            }),
+            items: getListItems(data, cfg.items, cfg.mapFromData),
           });
+          break;
         }
-        break;
-      }
-      case 'gallery_list': {
-        const cfg = gallery_list.shift();
-        if (!cfg) break;
-        const data = getData(refData, cfg.readFrom, cfg.parser);
-
-        arr.push({
-          overflow: true,
-          ...item,
-          ...cfg,
-          items: getItems(data, cfg.items),
-          galleryItems: getItems(data, cfg.galleryItems),
-        });
-        break;
-      }
-      case 'tabs': {
-        const cfg = tabs.shift();
-        if (!cfg) break;
-        const data = getData(refData, cfg.readFrom, cfg.parser);
+        case 'gallery': {
+          const cfg = gallery.shift();
+          if (!cfg) break;
+          const data = getData(refData, cfg.readFrom, cfg.parser);
 
-        if (cfg.mapFromData) {
-          const firstListItem = cfg.items[0];
           arr.push({
             overflow: true,
             ...item,
             ...cfg,
-            items: (data || []).map((d) => {
-              return {
-                title: getFormattedText(d, firstListItem.title, firstListItem.trans),
-                contents: firstListItem.contents.map((e) => {
-                  return {
-                    ...e,
-                    label: getFormattedText(d, e.label, e.trans),
-                    value: getFormattedText(d, e.value, e.trans),
-                  };
-                }),
-              };
-            }),
+            items: getItems(data, cfg.items),
           });
-        } else {
+          break;
+        }
+        case 'complex_list': {
+          const cfg = complex_list.shift();
+          if (!cfg) break;
+          const data = getData(refData, cfg.readFrom, cfg.parser);
+
+          if (cfg.mapFromData) {
+            const firstListItem = cfg.items[0];
+            arr.push({
+              overflow: true,
+              ...item,
+              ...cfg,
+              items: (data || []).map((d) => {
+                return {
+                  title: getFormattedText(d, firstListItem.title, firstListItem.trans),
+                  contents: firstListItem.contents.map((e) => {
+                    return {
+                      ...e,
+                      label: getFormattedText(d, e.label, e.trans),
+                      value: getFormattedText(d, e.value, e.trans),
+                    };
+                  }),
+                };
+              }),
+            });
+          } else {
+            arr.push({
+              overflow: true,
+              ...item,
+              ...cfg,
+              items: cfg.items.map((i) => {
+                return {
+                  title: getFormattedText(data, i.title, i.trans),
+                  contents: i.contents.map((e) => {
+                    return {
+                      ...e,
+                      label: getFormattedText(data, e.label, e.trans),
+                      value: getFormattedText(data, e.value, e.trans),
+                    };
+                  }),
+                };
+              }),
+            });
+          }
+          break;
+        }
+        case 'gallery_list': {
+          const cfg = gallery_list.shift();
+          if (!cfg) break;
+          const data = getData(refData, cfg.readFrom, cfg.parser);
+
           arr.push({
             overflow: true,
             ...item,
             ...cfg,
-            items: cfg.items.map((i) => {
-              return {
-                title: getFormattedText(data, i.title, i.trans),
-                contents: i.contents.map((e) => {
-                  return {
-                    ...e,
-                    label: getFormattedText(data, e.label, e.trans),
-                    value: getFormattedText(data, e.value, e.trans),
-                  };
-                }),
-              };
-            }),
+            items: getItems(data, cfg.items),
+            galleryItems: getItems(data, cfg.galleryItems),
           });
+          break;
         }
-        break;
-      }
-      case 'chart': {
-        const cfg = chart.shift();
-        if (!cfg) break;
-        const data = getData(refData, cfg.readFrom, cfg.parser);
+        case 'tabs': {
+          const cfg = tabs.shift();
+          if (!cfg) break;
+          const data = getData(refData, cfg.readFrom, cfg.parser);
 
-        arr.push({
-          ...item,
-          config: cfg,
-          data,
-        });
-        break;
-      }
-      case 'table': {
-        const cfg = table.shift();
-        if (!cfg) break;
-        const data = getData(refData, cfg.readFrom, cfg.parser);
+          if (cfg.mapFromData) {
+            const firstListItem = cfg.items[0];
+            arr.push({
+              overflow: true,
+              ...item,
+              ...cfg,
+              items: (data || []).map((d) => {
+                return {
+                  title: getFormattedText(d, firstListItem.title, firstListItem.trans),
+                  contents: firstListItem.contents.map((e) => {
+                    return {
+                      ...e,
+                      label: getFormattedText(d, e.label, e.trans),
+                      value: getFormattedText(d, e.value, e.trans),
+                    };
+                  }),
+                };
+              }),
+            });
+          } else {
+            arr.push({
+              overflow: true,
+              ...item,
+              ...cfg,
+              items: cfg.items.map((i) => {
+                return {
+                  title: getFormattedText(data, i.title, i.trans),
+                  contents: i.contents.map((e) => {
+                    return {
+                      ...e,
+                      label: getFormattedText(data, e.label, e.trans),
+                      value: getFormattedText(data, e.value, e.trans),
+                    };
+                  }),
+                };
+              }),
+            });
+          }
+          break;
+        }
+        case 'chart': {
+          const cfg = chart.shift();
+          if (!cfg) break;
+          const data = getData(refData, cfg.readFrom, cfg.parser);
 
-        arr.push({
-          ...cfg,
-          ...item,
-          columns: cfg.columns,
-          data,
-        });
-        break;
-      }
-      case 'partition': {
-        const cfg = partition.shift();
-        if (!cfg) break;
-        const data = getData(refData, cfg.readFrom, cfg.parser);
-        arr.push({
-          overflow: true,
-          ...item,
-          data,
-          ...cfg,
-        });
-        break;
-      }
-      default: {
-        const cfg = preset.shift();
-        if (!cfg) break;
-        const data = getData(refData, cfg.readFrom, cfg.parser);
+          arr.push({
+            ...item,
+            config: cfg,
+            data,
+          });
+          break;
+        }
+        case 'table': {
+          const cfg = table.shift();
+          if (!cfg) break;
+          const data = getData(refData, cfg.readFrom, cfg.parser);
 
-        arr.push({
-          ...item,
-          data,
-          config: cfg,
-        });
-        break;
+          arr.push({
+            ...cfg,
+            ...item,
+            columns: cfg.columns,
+            data,
+          });
+          break;
+        }
+        case 'partition': {
+          const cfg = partition.shift();
+          if (!cfg) break;
+          const data = getData(refData, cfg.readFrom, cfg.parser);
+          arr.push({
+            overflow: true,
+            ...item,
+            data,
+            ...cfg,
+          });
+          break;
+        }
+        default: {
+          const cfg = preset.shift();
+          if (!cfg) break;
+          const data = getData(refData, cfg.readFrom, cfg.parser);
+
+          arr.push({
+            ...item,
+            data,
+            config: cfg,
+          });
+          break;
+        }
       }
-    }
-    // console.log(arr,'arr---')
-    return arr;
-  }, []);
-});
+      // console.log(arr,'arr---')
+      return arr;
+    }, []);
+  });
 </script>
 <style lang="less" scoped>
-@import '@/design/theme.less';
+  @import '@/design/theme.less';
 
-.content {
-  height: calc(100% - 30px);
-  position: relative;
-  // z-index: -2;
-  display: flex;
-  flex-direction: column;
-  overflow-y: auto; // 这里会导致样式无故添加滚动条
-}
+  .content {
+    height: calc(100% - 30px);
+    position: relative;
+    // z-index: -2;
+    display: flex;
+    flex-direction: column;
+    overflow-y: auto; // 这里会导致样式无故添加滚动条
+    overflow-x: hidden;
+  }
 
-.content__background {
-  width: 100%;
-  height: 100%;
-  position: absolute;
-  top: 0;
-  left: 0;
-  z-index: 0;
-  object-fit: fill;
-}
+  .content__background {
+    width: 100%;
+    height: 100%;
+    position: absolute;
+    top: 0;
+    left: 0;
+    z-index: 0;
+    object-fit: fill;
+  }
 
-.image__background {
-  width: 35%;
-  height: 61%;
-  left: 30%;
-}
+  .image__background {
+    width: 35%;
+    height: 61%;
+    left: 30%;
+  }
 
-.content__module {
-  // margin-top: 5px;
-  // margin-bottom: 5px;
-  width: 100%;
-  height: 100%;
-}
+  .content__module {
+    // margin-top: 5px;
+    // margin-bottom: 5px;
+    width: 100%;
+    height: 100%;
+  }
 
-.content__module1 {
-  background: url('@/assets/images/vent/homeNew/databg/4.png');
-  background-repeat: no-repeat;
-  background-size: 100% 100%;
-  height: 129px;
-  margin-top: 20%;
-}
+  .content__module1 {
+    background: url('@/assets/images/vent/homeNew/databg/4.png');
+    background-repeat: no-repeat;
+    background-size: 100% 100%;
+    height: 129px;
+    margin-top: 20%;
+  }
 
-.content__moduleFire {
-  width: 100%;
-  height: 100%;
-  margin-left: -24% !important;
-}
+  .content__moduleFire {
+    width: 100%;
+    height: 100%;
+    margin-left: -24% !important;
+  }
 
-.content__module_dust {
-  background: url('@/assets/images/vent/homeNew/bottomBg.png');
-  background-repeat: no-repeat;
-  background-size: 100% 100%;
-  width: 100%;
-  height: 100%;
-}
+  .content__module_dust {
+    // background: url('@/assets/images/vent/homeNew/bottomBg.png');
+    // background-repeat: no-repeat;
+    // background-size: 100% 100%;
+    width: 100%;
+    height: 100%;
+  }
 
-// .content__module:first-of-type {
-//   margin-top: 0;
-// }
-// .content__module:last-of-type {
-//   margin-bottom: 0;
-// }
-::-webkit-scrollbar {
-  width: 5px !important;
-}
+  // .content__module:first-of-type {
+  //   margin-top: 0;
+  // }
+  // .content__module:last-of-type {
+  //   margin-bottom: 0;
+  // }
+  ::-webkit-scrollbar {
+    width: 5px !important;
+  }
 
-::-webkit-scrollbar-thumb {
-  width: 5px !important;
-}
+  ::-webkit-scrollbar-thumb {
+    width: 5px !important;
+  }
 
-:deep(.zxm-select:not(.zxm-select-customize-input) .zxm-select-selector) {
-  /* background-color: transparent; */
-  color: #fff;
-}
+  :deep(.zxm-select:not(.zxm-select-customize-input) .zxm-select-selector) {
+    /* background-color: transparent; */
+    color: #fff;
+  }
 
-:deep(.zxm-select-arrow) {
-  color: #fff;
-}
+  :deep(.zxm-select-arrow) {
+    color: #fff;
+  }
 
-:deep(.zxm-select-selection-item) {
-  color: #fff !important;
-}
+  :deep(.zxm-select-selection-item) {
+    color: #fff !important;
+  }
 
-:deep(.zxm-select-selection-placeholder) {
-  color: #fff !important;
-}
+  :deep(.zxm-select-selection-placeholder) {
+    color: #fff !important;
+  }
 
-:deep(.dialog-overlay) {
-  width: 100%;
-  height: 100%;
-  position: unset;
-  box-shadow: unset;
-}
+  :deep(.dialog-overlay) {
+    width: 100%;
+    height: 100%;
+    position: unset;
+    box-shadow: unset;
+  }
 
-::-webkit-scrollbar {
-  width: 5px !important;
-}
+  ::-webkit-scrollbar {
+    width: 5px !important;
+  }
 
-::-webkit-scrollbar-thumb {
-  width: 5px !important;
-}
+  ::-webkit-scrollbar-thumb {
+    width: 5px !important;
+  }
 </style>

+ 65 - 59
src/views/vent/home/configurable/blue/components/header.vue

@@ -37,73 +37,79 @@
   </div>
 </template>
 <script lang="ts" setup>
-import { ref, watch } from 'vue';
-import { Config } from '../../../../deviceManager/configurationTable/types';
-import { useInitModule } from '../../hooks/useInit';
-import { MenuItem, Menu, Dropdown } from 'ant-design-vue';
-import { SwapOutlined, CaretUpOutlined, CaretDownOutlined } from '@ant-design/icons-vue';
+  import { ref, watch } from 'vue';
+  import { Config } from '../../../../deviceManager/configurationTable/types';
+  import { useInitModule } from '../../hooks/useInit';
+  import { MenuItem, Menu, Dropdown } from 'ant-design-vue';
+  import { SwapOutlined, CaretUpOutlined, CaretDownOutlined } from '@ant-design/icons-vue';
 
-const props = defineProps<{
-  moduleData: Config['moduleData'];
-  deviceType: Config['deviceType'];
-  data: any;
-}>();
+  const props = defineProps<{
+    moduleData: Config['moduleData'];
+    deviceType: Config['deviceType'];
+    data: any;
+  }>();
 
-const emit = defineEmits(['select']);
+  const emit = defineEmits(['select']);
 
-const visible = ref(false);
-const headerConfig = props.moduleData.header;
-const { selectedDeviceID, selectedDevice, selectedDeviceSlot, selectedDeviceLabel, options, init } = useInitModule(
-  props.deviceType,
-  props.moduleData
-);
+  const visible = ref(false);
+  const headerConfig = props.moduleData.header;
+  const { selectedDeviceID, selectedDevice, selectedDeviceSlot, selectedDeviceLabel, options, init } = useInitModule(
+    props.deviceType,
+    props.moduleData
+  );
 
-function selectHandler({ key }) {
-  selectedDeviceID.value = key;
-  emit('select', selectedDevice.value);
-}
-
-watch(
-  () => props.data,
-  (d) => {
-    init(d);
+  function selectHandler({ key }) {
+    selectedDeviceID.value = key;
     emit('select', selectedDevice.value);
-  },
-  {
-    immediate: true,
   }
-);
+
+  watch(
+    () => props.data,
+    (d) => {
+      init(d);
+      emit('select', selectedDevice.value);
+    },
+    {
+      immediate: true,
+    }
+  );
 </script>
 <style scoped>
-@import '/@/design/theme.less';
+  @import '/@/design/theme.less';
 
-.costume-header {
-  height: 30px;
-  background-image: linear-gradient(90deg, var(--vent-base-light-bg-opcity), transparent 20%, transparent 80%, var(--vent-base-light-bg-opcity));
-}
-.costume-header_left {
-  border-left: 3px solid;
-  border-right: 3px solid;
-  border-image-source: linear-gradient(to top, #00000033, var(--vent-base-light-bg), #00000033);
-  border-image-slice: 1;
-}
-.costume-header_right {
-  border-right: 3px solid;
-  border-image-source: linear-gradient(to top, #00000033, var(--vent-base-light-bg), #00000033);
-  border-image-slice: 1;
-}
+  .costume-header {
+    --image-Select: url('@/assets/images/fireNew/5.png');
+    height: 30px;
+    /* background-image: linear-gradient(90deg, var(--vent-base-light-bg-opcity), transparent 20%, transparent 80%, var(--vent-base-light-bg-opcity)); */
+    background-image: var(--image-Select);
+    background-repeat: no-repeat;
+    background-size: 96% 100%;
+    background-position: center;
+    padding: 0 2%;
+  }
+  .costume-header_left {
+    /* border-left: 3px solid; */
+    border-right: 3px solid;
+    border-image-source: linear-gradient(to top, #00000033, var(--vent-base-light-bg), #00000033);
+    border-image-slice: 1;
+  }
+  /* .costume-header_right {
+    border-right: 3px solid;
+    border-image-source: linear-gradient(to top, #00000033, var(--vent-base-light-bg), #00000033);
+    border-image-slice: 1;
+  } */
 
-::v-deep .zxm-select:not(.zxm-select-customize-input) .zxm-select-selector {
-  /* background-color: transparent; */
-  color: #fff;
-}
-::v-deep .zxm-select-arrow {
-  color: #fff;
-}
-::v-deep .zxm-select-selection-item {
-  color: #fff !important;
-}
-::v-deep .zxm-select-selection-placeholder {
-  color: #fff !important;
-}
+  ::v-deep .zxm-select:not(.zxm-select-customize-input) .zxm-select-selector {
+    /* background-color: transparent; */
+    color: #fff;
+  }
+  ::v-deep .zxm-select-arrow {
+    color: #fff;
+  }
+  ::v-deep .zxm-select-selection-item {
+    color: #fff !important;
+  }
+  ::v-deep .zxm-select-selection-placeholder {
+    color: #fff !important;
+  }
 </style>

+ 85 - 85
src/views/vent/home/configurable/blue/components/moduleLeft-warn.vue

@@ -10,101 +10,101 @@
   </div>
 </template>
 <script lang="ts" setup>
-const props = defineProps<{
-  deviceType: string;
-  title: string;
-  visible: boolean;
-}>();
-const emit = defineEmits(['close', 'click']);
-const deviceType = props.deviceType;
+  const props = defineProps<{
+    deviceType: string;
+    title: string;
+    visible: boolean;
+  }>();
+  const emit = defineEmits(['close', 'click']);
+  const deviceType = props.deviceType;
 
-function closeModel() {
-  emit('close');
-}
-function clickHandler() {
-  emit('click');
-}
+  function closeModel() {
+    emit('close');
+  }
+  function clickHandler() {
+    emit('click');
+  }
 </script>
 <style lang="less" scoped>
-@import '/@/design/theme.less';
+  @import '/@/design/theme.less';
 
-@{theme-deepblue} {
+  @{theme-deepblue} {
+    .module-content {
+      --image-model_original_title_bg: url('@/assets/images/themify/deepblue/home-container/configurable/model_original_title_bg.png');
+    }
+  }
+  .module-content1 {
+    --bg-height: 28px;
+    color: #fff;
+    box-sizing: border-box;
+    position: absolute;
+    width: 100%;
+    height: 100%;
+    z-index: 999;
+    padding: 15px 15px 0px 15px;
+  }
   .module-content {
-    --image-model_original_title_bg: url('@/assets/images/themify/deepblue/home-container/configurable/model_original_title_bg.png');
+    --bg-height: 28px;
+    color: #fff;
+    box-sizing: border-box;
+    position: absolute;
+    width: 100%;
+    height: 100%;
+    z-index: 999;
+    background: url('@/assets/images/home-warn/2-1.png') no-repeat;
+    background-size: 100% 100%;
+    padding: 15px 15px 0px 15px;
   }
-}
-.module-content1 {
-  --bg-height: 28px;
-  color: #fff;
-  box-sizing: border-box;
-  position: absolute;
-  width: 100%;
-  height: 100%;
-  z-index: 999;
-  padding: 15px 15px 0px 15px;
-}
-.module-content {
-  --bg-height: 28px;
-  color: #fff;
-  box-sizing: border-box;
-  position: absolute;
-  width: 100%;
-  height: 100%;
-  z-index: 999;
-  background: url('@/assets/images/home-warn/2-1.png') no-repeat;
-  background-size: 100% 100%;
-  padding: 15px 15px 0px 15px;
-}
 
-.module-content__title__expand {
-  width: 100%;
-  text-align: center;
-  font-weight: bold;
-  font-size: 16px;
-  line-height: 0px;
-}
+  .module-content__title__expand {
+    width: 100%;
+    text-align: center;
+    font-weight: bold;
+    font-size: 16px;
+    line-height: 0px;
+  }
 
-// .module-content__title {
-//   width: 50%;
-//   height: var(--bg-height);
-//   background: url('@/assets/images/home-container/configurable/model_left_title_bg.png') no-repeat;
-//   background-size: 100% 100%;
-//   position: relative;
-//   text-align: right;
-//   padding: 4px 10% 0 0;
-// }
+  // .module-content__title {
+  //   width: 50%;
+  //   height: var(--bg-height);
+  //   background: url('@/assets/images/home-container/configurable/model_left_title_bg.png') no-repeat;
+  //   background-size: 100% 100%;
+  //   position: relative;
+  //   text-align: right;
+  //   padding: 4px 10% 0 0;
+  // }
 
-// 固定在父容器右上角的按钮图标
-// .action-btn {
-//   width: 18px;
-//   height: 18px;
-//   background: url('@/assets/images/home-container/configurable/expand.svg') no-repeat center;
-//   position: absolute;
-//   right: 0;
-//   top: 0;
-// }
-// .close-btn {
-//   transform: rotate(-90deg);
-// }
+  // 固定在父容器右上角的按钮图标
+  // .action-btn {
+  //   width: 18px;
+  //   height: 18px;
+  //   background: url('@/assets/images/home-container/configurable/expand.svg') no-repeat center;
+  //   position: absolute;
+  //   right: 0;
+  //   top: 0;
+  // }
+  // .close-btn {
+  //   transform: rotate(-90deg);
+  // }
 
-.module-slot {
-  height: calc(100% - 46px);
-  width: 100%;
-  backdrop-filter: blur(5px);
-  margin-top: 26px;
-}
+  .module-slot {
+    height: calc(100% - 46px);
+    width: 100%;
+    backdrop-filter: blur(5px);
+    margin-top: 26px;
+  }
 
-// Transition动画相关
-.v-enter-active,
-.v-leave-active {
-  transition: all 0.3s ease;
-}
+  // Transition动画相关
+  .v-enter-active,
+  .v-leave-active {
+    transition: all 0.3s ease;
+  }
 
-.v-enter-from,
-.v-leave-to {
-  // opacity: 1;
-  transform: translateX(-100%);
-  // transform: scaleY(0);
-  // transform-origin: center top;
-}
+  .v-enter-from,
+  .v-leave-to {
+    // opacity: 1;
+    transform: translateX(-100%);
+    // transform: scaleY(0);
+    // transform-origin: center top;
+  }
 </style>

+ 111 - 0
src/views/vent/home/configurable/blue/components/moduleMini-warn.vue

@@ -0,0 +1,111 @@
+<template>
+  <div v-if="visible" :class="deviceType === 'warnInfo' ? 'module-content1' : 'module-content'">
+    <div v-if="title" class="module-content__title__expand">
+      <span class="action-btn close-btn" @click="closeModel"></span>
+      <span @click="clickHandler">{{ title }}</span>
+    </div>
+    <div class="module-slot">
+      <slot></slot>
+    </div>
+  </div>
+</template>
+<script lang="ts" setup>
+  const props = defineProps<{
+    deviceType: string;
+    title: string;
+    visible: boolean;
+  }>();
+  const emit = defineEmits(['close', 'click']);
+  const deviceType = props.deviceType;
+
+  function closeModel() {
+    emit('close');
+  }
+  function clickHandler() {
+    emit('click');
+  }
+</script>
+<style lang="less" scoped>
+  @import '/@/design/theme.less';
+
+  @{theme-deepblue} {
+    .module-content {
+      --image-model_original_title_bg: url('@/assets/images/themify/deepblue/home-container/configurable/model_original_title_bg.png');
+    }
+  }
+  .module-content1 {
+    --bg-height: 28px;
+    color: #fff;
+    box-sizing: border-box;
+    position: absolute;
+    width: 100%;
+    height: 100%;
+    z-index: 999;
+    padding: 15px 15px 0px 15px;
+  }
+  .module-content {
+    --image-Content: url('/src/assets/images/fireNew/4-3.png');
+    --bg-height: 28px;
+    color: #fff;
+    box-sizing: border-box;
+    position: absolute;
+    width: 100%;
+    height: 100%;
+    z-index: 999;
+    background: var(--image-Content) no-repeat;
+    background-size: 100% 100%;
+    padding: 15px 15px 0px 15px;
+  }
+
+  .module-content__title__expand {
+    width: 100%;
+    text-align: center;
+    font-weight: bold;
+    font-size: 16px;
+    line-height: 0px;
+  }
+
+  // .module-content__title {
+  //   width: 50%;
+  //   height: var(--bg-height);
+  //   background: url('@/assets/images/home-container/configurable/model_left_title_bg.png') no-repeat;
+  //   background-size: 100% 100%;
+  //   position: relative;
+  //   text-align: right;
+  //   padding: 4px 10% 0 0;
+  // }
+
+  // 固定在父容器右上角的按钮图标
+  // .action-btn {
+  //   width: 18px;
+  //   height: 18px;
+  //   background: url('@/assets/images/home-container/configurable/expand.svg') no-repeat center;
+  //   position: absolute;
+  //   right: 0;
+  //   top: 0;
+  // }
+  // .close-btn {
+  //   transform: rotate(-90deg);
+  // }
+
+  .module-slot {
+    height: calc(100% - 46px);
+    width: 100%;
+    backdrop-filter: blur(5px);
+    margin-top: 26px;
+  }
+
+  // Transition动画相关
+  .v-enter-active,
+  .v-leave-active {
+    transition: all 0.3s ease;
+  }
+
+  .v-enter-from,
+  .v-leave-to {
+    // opacity: 1;
+    transform: translateX(-100%);
+    // transform: scaleY(0);
+    // transform-origin: center top;
+  }
+</style>

+ 140 - 140
src/views/vent/home/configurable/blue/dustNew.vue

@@ -9,15 +9,14 @@
         style="width: 34px; height: 34px; position: absolute; right: 5px; bottom: 5px; z-index: 5"
         @click="redirectTo('/micro-vent-3dModal/dashboard/analysis?type=model3D&deviceType=model3D')"
       >
-        <EyeFilled />
+        <!-- <EyeFilled /> -->
       </a-button>
     </div>
     <div class="top-bg">
       <!-- <img style="width: 300px; height: 40px; position: fixed; left: 5px; top: 5px" src="./meeee.png" /> -->
       <NewNav :Title="mainTitle" />
     </div>
-    <div class="left-t"> </div>
-    <div class="right-t"> </div>
+    <!-- <ModuleDustNew -->
     <ModuleDustNew
       v-for="cfg in configs"
       :key="cfg.deviceType"
@@ -31,158 +30,159 @@
   </div>
 </template>
 <script lang="ts" setup>
-import { onMounted, onUnmounted } from 'vue';
-// import { CaretDownOutlined } from '@ant-design/icons-vue';
-import NewNav from './components/NewNavFire.vue';
-import { useInitConfigs, useInitPage } from '../hooks/useInit';
-import ModuleDustNew from './components/ModuleDustNew.vue';
-import VentModal from '/@/components/vent/micro/ventModal.vue';
-import { getDisHome } from '../configurable.api';
-import { EyeFilled } from '@ant-design/icons-vue';
-import { testConfigNewDust } from '../configurable.data.New';
-// const cfgs = computed(() =>
-//   configs.value.filter((_, index) => {
-//     return index !== 4 && index !== 3;
-//   })
-// );
-// const cfgA = computed<any>(() =>
-//   configs.value.find((_, index) => {
-//     return index === 3;
-//   })
-// );
-// const cfgB = computed<any>(() =>
-//   configs.value.find((_, index) => {
-//     return index === 4;
-//   })
-// );
-const { configs, devicesTypes, fetchConfigs } = useInitConfigs();
-const { mainTitle, data, updateData } = useInitPage('粉尘预警系统');
-let interval: number | undefined;
-onMounted(() => {
-  fetchConfigs('New_dust').then(() => {
-    configs.value = testConfigNewDust;
-    getDisHome({
-      dataList: devicesTypes.value.concat('dustAllMineWarn').join(','),
-    }).then(updateData);
+  import { onMounted, onUnmounted } from 'vue';
+  // import { CaretDownOutlined } from '@ant-design/icons-vue';
+  import ModuleDustNew from './components/ModuleDustNew.vue';
+  import NewNav from './components/NewNavFire.vue';
+  import { useInitConfigs, useInitPage } from '../hooks/useInit';
+  // import ModuleDustNew from './components/ModuleDustNew.vue';
+  import VentModal from '/@/components/vent/micro/ventModal.vue';
+  import { getDisHome } from '../configurable.api';
+  // import { EyeFilled } from '@ant-design/icons-vue';
+  import { testConfigNewDust } from '../configurable.data.New';
+  // const cfgs = computed(() =>
+  //   configs.value.filter((_, index) => {
+  //     return index !== 4 && index !== 3;
+  //   })
+  // );
+  // const cfgA = computed<any>(() =>
+  //   configs.value.find((_, index) => {
+  //     return index === 3;
+  //   })
+  // );
+  // const cfgB = computed<any>(() =>
+  //   configs.value.find((_, index) => {
+  //     return index === 4;
+  //   })
+  // );
+  const { configs, devicesTypes, fetchConfigs } = useInitConfigs();
+  const { mainTitle, data, updateData } = useInitPage('粉尘预警系统');
+  let interval: number | undefined;
+  onMounted(() => {
+    fetchConfigs('New_dust').then(() => {
+      configs.value = testConfigNewDust;
+      getDisHome({
+        dataList: devicesTypes.value.concat('dustAllMineWarn').join(','),
+      }).then(updateData);
+    });
+    setInterval(() => {
+      getDisHome({
+        dataList: devicesTypes.value.concat('dustAllMineWarn').join(','),
+      }).then(updateData);
+    }, 2000);
   });
-  setInterval(() => {
-    getDisHome({
-      dataList: devicesTypes.value.concat('dustAllMineWarn').join(','),
-    }).then(updateData);
-  }, 2000);
-});
 
-onUnmounted(() => {
-  clearInterval(interval);
-});
+  onUnmounted(() => {
+    clearInterval(interval);
+  });
 
-function redirectTo(url) {
-  window.open(url);
-}
+  function redirectTo(url) {
+    window.open(url);
+  }
 </script>
 <style lang="less" scoped>
-@import '/@/design/theme.less';
+  @import '/@/design/theme.less';
 
-@font-face {
-  font-family: 'douyuFont';
-  src: url('../../../../assets/font/douyuFont.otf');
-}
-
-@{theme-deepblue} {
-  .company-home {
-    --image-modal-top: url('@/assets/images/vent/homeNew/modaltop.png');
+  @font-face {
+    font-family: 'douyuFont';
+    src: url('../../../../assets/font/douyuFont.otf');
   }
-}
 
-.company-home {
-  --image-modal-top: url('@/assets/images/vent/homeNew/modaltop.png');
-  width: 100%;
-  height: 100%;
-  color: @white;
-  position: relative;
-  background: url('@/assets/images/vent/homeNew/bg.png') no-repeat center;
+  @{theme-deepblue} {
+    .company-home {
+      --image-modal-top: url('@/assets/images/vent/homeNew/modaltop.png');
+    }
+  }
 
-  .top-bg {
+  .company-home {
+    --image-modal-top: url('@/assets/images/vent/homeNew/modaltop.png');
     width: 100%;
-    height: 56px;
-    background: var(--image-modal-top) no-repeat center;
-    position: absolute;
-    z-index: 1;
-    .main-title {
+    height: 100%;
+    color: @white;
+    position: relative;
+    background: url('@/assets/images/vent/homeNew/bg.png') no-repeat center;
+
+    .top-bg {
+      width: 100%;
       height: 56px;
-      font-family: 'douyuFont';
-      font-size: 20px;
-      letter-spacing: 2px;
-      display: flex;
-      justify-content: center;
-      align-items: center;
+      background: var(--image-modal-top) no-repeat center;
+      position: absolute;
+      z-index: 1;
+      .main-title {
+        height: 56px;
+        font-family: 'douyuFont';
+        font-size: 20px;
+        letter-spacing: 2px;
+        display: flex;
+        justify-content: center;
+        align-items: center;
+      }
+      .top-nav {
+        position: absolute;
+        top: 0;
+        width: 880px;
+        height: 100%;
+        display: flex;
+        justify-content: flex-start;
+      }
     }
-    .top-nav {
+    .left-t {
       position: absolute;
-      top: 0;
-      width: 880px;
+      width: 28%;
       height: 100%;
-      display: flex;
-      justify-content: flex-start;
+      background: url('@/assets/images/vent/homeNew/leftContent.png') no-repeat center;
+      z-index: 0;
+    }
+    .right-t {
+      position: absolute;
+      width: 172%;
+      height: 100%;
+      background: url('@/assets/images/vent/homeNew/rightContent.png') no-repeat center;
+      z-index: 0;
+    }
+    // .module-left {
+    //   position: absolute;
+    //   width: 450px;
+    //   height: 280px;
+    //   left: 0;
+    // }
+    // .module-right {
+    //   position: absolute;
+    //   width: 450px;
+    //   height: 280px;
+    //   right: 0;
+    // }
+    // .module-bottom {
+    //   position: absolute;
+    //   width: 1000px;
+    //   height: 280px;
+    // }
+    .module-dropdown {
+      padding: 10px;
+      background-image: @vent-configurable-dropdown;
+      border-bottom: 2px solid @vent-configurable-home-light-border;
+      color: @vent-font-color;
+      position: absolute;
+      top: 70px;
+      right: 460px;
+    }
+    .module-dropdown-original {
+      padding: 10px;
+      background-image: @vent-configurable-dropdown;
+      border-bottom: 2px solid @vent-configurable-home-light-border;
+      color: @vent-font-color;
+      position: absolute;
+      top: 70px;
+      right: 460px;
+    }
+    .module-trigger-button {
+      color: @vent-font-color;
+      background-image: @vent-configurable-dropdown;
+      border: none;
+      border-bottom: 2px solid @vent-configurable-home-light-border;
     }
   }
-  .left-t {
-    position: absolute;
-    width: 28%;
-    height: 100%;
-    background: url('@/assets/images/vent/homeNew/leftContent.png') no-repeat center;
-    z-index: 0;
-  }
-  .right-t {
-    position: absolute;
-    width: 172%;
-    height: 100%;
-    background: url('@/assets/images/vent/homeNew/rightContent.png') no-repeat center;
-    z-index: 0;
-  }
-  // .module-left {
-  //   position: absolute;
-  //   width: 450px;
-  //   height: 280px;
-  //   left: 0;
-  // }
-  // .module-right {
-  //   position: absolute;
-  //   width: 450px;
-  //   height: 280px;
-  //   right: 0;
-  // }
-  // .module-bottom {
-  //   position: absolute;
-  //   width: 1000px;
-  //   height: 280px;
-  // }
-  .module-dropdown {
-    padding: 10px;
-    background-image: @vent-configurable-dropdown;
-    border-bottom: 2px solid @vent-configurable-home-light-border;
-    color: @vent-font-color;
-    position: absolute;
-    top: 70px;
-    right: 460px;
-  }
-  .module-dropdown-original {
-    padding: 10px;
-    background-image: @vent-configurable-dropdown;
-    border-bottom: 2px solid @vent-configurable-home-light-border;
-    color: @vent-font-color;
-    position: absolute;
-    top: 70px;
-    right: 460px;
-  }
-  .module-trigger-button {
-    color: @vent-font-color;
-    background-image: @vent-configurable-dropdown;
-    border: none;
-    border-bottom: 2px solid @vent-configurable-home-light-border;
+  :deep(.loading-box) {
+    position: unset;
   }
-}
-:deep(.loading-box) {
-  position: unset;
-}
 </style>

+ 152 - 152
src/views/vent/home/configurable/blue/fireNew.vue

@@ -51,173 +51,173 @@
   </div>
 </template>
 <script lang="ts" setup>
-import { computed, onMounted, onUnmounted } from 'vue';
-// import { CaretDownOutlined } from '@ant-design/icons-vue';
-import NewNav from './components/NewNavFire.vue';
-import { useInitConfigs, useInitPage } from '../hooks/useInit';
-import ModuleNew from './components/ModuleNew.vue';
-import ModuleFireNew from './components/ModuleFireNew.vue';
-import ModuleFireNewDual from './components/ModuleFireNewDual.vue';
-import VentModal from '/@/components/vent/micro/ventModal.vue';
-// import { BDFireMock } from './mock';
-import { getDisHome } from '../configurable.api';
-// import { EyeFilled } from '@ant-design/icons-vue';
-import { testConfigNewFire } from '../configurable.data.New';
-const cfgs = computed(() =>
-  configs.value.filter((_, index) => {
-    return index !== 4 && index !== 3 && index !== 5;
-  })
-);
-const cfgA = computed<any>(() =>
-  configs.value.find((_, index) => {
-    return index === 3;
-  })
-);
-const cfgB = computed<any>(() =>
-  configs.value.find((_, index) => {
-    return index === 4;
-  })
-);
-const cfgTop = computed<any>(() =>
-  configs.value.find((_, index) => {
-    return index === 5;
-  })
-);
-const { configs, devicesTypes, fetchConfigs } = useInitConfigs();
-const { mainTitle, data, updateData /** updateEnhancedConfigs */ } = useInitPage('火灾预警系统');
-let interval: number | undefined;
-onMounted(() => {
-  // fetchConfigs('New_fire').then(() => {
-  //   configs.value = testConfigNewFire;
-  //   Promise.resolve(BDFireMock).then(updateData);
-  // });
-  // setInterval(() => {
-  //   Promise.resolve(BDFireMock).then(updateData);
-  // }, 2000);
-  fetchConfigs('New_fire').then(() => {
-    configs.value = testConfigNewFire;
-    getDisHome({
-      dataList: devicesTypes.value.concat('fireAllMineWarn').join(','),
-    }).then(updateData);
+  import { computed, onMounted, onUnmounted } from 'vue';
+  // import { CaretDownOutlined } from '@ant-design/icons-vue';
+  import NewNav from './components/NewNavFire.vue';
+  import { useInitConfigs, useInitPage } from '../hooks/useInit';
+  import ModuleNew from './components/ModuleNew.vue';
+  import ModuleFireNew from './components/ModuleFireNew.vue';
+  import ModuleFireNewDual from './components/ModuleFireNewDual.vue';
+  import VentModal from '/@/components/vent/micro/ventModal.vue';
+  // import { BDFireMock } from './mock';
+  import { getDisHome } from '../configurable.api';
+  // import { EyeFilled } from '@ant-design/icons-vue';
+  import { testConfigNewFire } from '../configurable.data.New';
+  const cfgs = computed(() =>
+    configs.value.filter((_, index) => {
+      return index !== 4 && index !== 3 && index !== 5;
+    })
+  );
+  const cfgA = computed<any>(() =>
+    configs.value.find((_, index) => {
+      return index === 3;
+    })
+  );
+  const cfgB = computed<any>(() =>
+    configs.value.find((_, index) => {
+      return index === 4;
+    })
+  );
+  const cfgTop = computed<any>(() =>
+    configs.value.find((_, index) => {
+      return index === 5;
+    })
+  );
+  const { configs, devicesTypes, fetchConfigs } = useInitConfigs();
+  const { mainTitle, data, updateData /** updateEnhancedConfigs */ } = useInitPage('火灾预警系统');
+  let interval: number | undefined;
+  onMounted(() => {
+    // fetchConfigs('New_fire').then(() => {
+    //   configs.value = testConfigNewFire;
+    //   Promise.resolve(BDFireMock).then(updateData);
+    // });
+    // setInterval(() => {
+    //   Promise.resolve(BDFireMock).then(updateData);
+    // }, 2000);
+    fetchConfigs('New_fire').then(() => {
+      configs.value = testConfigNewFire;
+      getDisHome({
+        dataList: devicesTypes.value.concat('fireAllMineWarn').join(','),
+      }).then(updateData);
+    });
+    setInterval(() => {
+      getDisHome({
+        dataList: devicesTypes.value.concat('fireAllMineWarn').join(','),
+      }).then(updateData);
+    }, 2000);
   });
-  setInterval(() => {
-    getDisHome({
-      dataList: devicesTypes.value.concat('fireAllMineWarn').join(','),
-    }).then(updateData);
-  }, 2000);
-});
 
-onUnmounted(() => {
-  clearInterval(interval);
-});
+  onUnmounted(() => {
+    clearInterval(interval);
+  });
 
-function redirectTo(url) {
-  window.open(url);
-}
+  function redirectTo(url) {
+    window.open(url);
+  }
 </script>
 <style lang="less" scoped>
-@import '/@/design/theme.less';
+  @import '/@/design/theme.less';
 
-@font-face {
-  font-family: 'douyuFont';
-  src: url('../../../../assets/font/douyuFont.otf');
-}
-
-@{theme-deepblue} {
-  .company-home {
-    --image-modal-top: url('@/assets/images/fireNew/1.png');
+  @font-face {
+    font-family: 'douyuFont';
+    src: url('../../../../assets/font/douyuFont.otf');
   }
-}
 
-.company-home {
-  --image-modal-top: url('@/assets/images/fireNew/1.png');
-  width: 100%;
-  height: 100%;
-  color: @white;
-  position: relative;
-  background: url('@/assets/images/fireNew/FireBj.png') no-repeat center;
+  @{theme-deepblue} {
+    .company-home {
+      --image-modal-top: url('@/assets/images/fireNew/1.png');
+    }
+  }
 
-  .top-bg {
+  .company-home {
+    --image-modal-top: url('@/assets/images/fireNew/1.png');
     width: 100%;
-    height: 56px;
-    background: var(--image-modal-top) no-repeat center;
-    position: absolute;
-    z-index: 1;
-    .main-title {
+    height: 100%;
+    color: @white;
+    position: relative;
+    background: url('@/assets/images/fireNew/FireBj.png') no-repeat center;
+
+    .top-bg {
+      width: 100%;
       height: 56px;
-      font-family: 'douyuFont';
-      font-size: 20px;
-      letter-spacing: 2px;
-      display: flex;
-      justify-content: center;
-      align-items: center;
+      background: var(--image-modal-top) no-repeat center;
+      position: absolute;
+      z-index: 1;
+      .main-title {
+        height: 56px;
+        font-family: 'douyuFont';
+        font-size: 20px;
+        letter-spacing: 2px;
+        display: flex;
+        justify-content: center;
+        align-items: center;
+      }
+      .top-nav {
+        position: absolute;
+        top: 0;
+        width: 880px;
+        height: 100%;
+        display: flex;
+        justify-content: flex-start;
+      }
     }
-    .top-nav {
+    .left-t {
       position: absolute;
-      top: 0;
-      width: 880px;
+      width: 28%;
       height: 100%;
-      display: flex;
-      justify-content: flex-start;
+      background: url('@/assets/images/vent/homeNew/leftContent.png') no-repeat center;
+      z-index: 0;
+    }
+    .right-t {
+      position: absolute;
+      width: 172%;
+      height: 100%;
+      background: url('@/assets/images/vent/homeNew/rightContent.png') no-repeat center;
+      z-index: 0;
+    }
+    // .module-left {
+    //   position: absolute;
+    //   width: 450px;
+    //   height: 280px;
+    //   left: 0;
+    // }
+    // .module-right {
+    //   position: absolute;
+    //   width: 450px;
+    //   height: 280px;
+    //   right: 0;
+    // }
+    // .module-bottom {
+    //   position: absolute;
+    //   width: 1000px;
+    //   height: 280px;
+    // }
+    .module-dropdown {
+      padding: 10px;
+      background-image: @vent-configurable-dropdown;
+      border-bottom: 2px solid @vent-configurable-home-light-border;
+      color: @vent-font-color;
+      position: absolute;
+      top: 70px;
+      right: 460px;
+    }
+    .module-dropdown-original {
+      padding: 10px;
+      background-image: @vent-configurable-dropdown;
+      border-bottom: 2px solid @vent-configurable-home-light-border;
+      color: @vent-font-color;
+      position: absolute;
+      top: 70px;
+      right: 460px;
+    }
+    .module-trigger-button {
+      color: @vent-font-color;
+      background-image: @vent-configurable-dropdown;
+      border: none;
+      border-bottom: 2px solid @vent-configurable-home-light-border;
     }
   }
-  .left-t {
-    position: absolute;
-    width: 28%;
-    height: 100%;
-    background: url('@/assets/images/vent/homeNew/leftContent.png') no-repeat center;
-    z-index: 0;
-  }
-  .right-t {
-    position: absolute;
-    width: 172%;
-    height: 100%;
-    background: url('@/assets/images/vent/homeNew/rightContent.png') no-repeat center;
-    z-index: 0;
-  }
-  // .module-left {
-  //   position: absolute;
-  //   width: 450px;
-  //   height: 280px;
-  //   left: 0;
-  // }
-  // .module-right {
-  //   position: absolute;
-  //   width: 450px;
-  //   height: 280px;
-  //   right: 0;
-  // }
-  // .module-bottom {
-  //   position: absolute;
-  //   width: 1000px;
-  //   height: 280px;
-  // }
-  .module-dropdown {
-    padding: 10px;
-    background-image: @vent-configurable-dropdown;
-    border-bottom: 2px solid @vent-configurable-home-light-border;
-    color: @vent-font-color;
-    position: absolute;
-    top: 70px;
-    right: 460px;
-  }
-  .module-dropdown-original {
-    padding: 10px;
-    background-image: @vent-configurable-dropdown;
-    border-bottom: 2px solid @vent-configurable-home-light-border;
-    color: @vent-font-color;
-    position: absolute;
-    top: 70px;
-    right: 460px;
-  }
-  .module-trigger-button {
-    color: @vent-font-color;
-    background-image: @vent-configurable-dropdown;
-    border: none;
-    border-bottom: 2px solid @vent-configurable-home-light-border;
+  :deep(.loading-box) {
+    position: unset;
   }
-}
-:deep(.loading-box) {
-  position: unset;
-}
 </style>

+ 127 - 131
src/views/vent/home/configurable/blue/ventNew.vue

@@ -9,158 +9,154 @@
       <!-- <div class="main-title">{{ mainTitle }}</div> -->
       <NewNav :Title="mainTitle" />
     </div>
-    <div class="left-t"> </div>
-    <div class="right-t"> </div>
-    <template v-if="isNew">
-      <ModuleNew
-        v-for="cfg in configs"
-        :key="cfg.deviceType"
-        :show-style="cfg.showStyle"
-        :module-data="cfg.moduleData"
-        :module-name="cfg.moduleName"
-        :device-type="cfg.deviceType"
-        :data="data"
-        :visible="true"
-      />
-    </template>
+    <ModuleDustNew
+      v-for="cfg in configs"
+      :key="cfg.deviceType"
+      :show-style="cfg.showStyle"
+      :module-data="cfg.moduleData"
+      :module-name="cfg.moduleName"
+      :device-type="cfg.deviceType"
+      :data="data"
+      :visible="true"
+    />
   </div>
 </template>
 <script lang="ts" setup>
-import { onMounted, onUnmounted } from 'vue';
-// import { CaretDownOutlined } from '@ant-design/icons-vue';
-// import MonitorCenter from './components/MonitorCenter.vue';
-import NewNav from './components/NewNavFire.vue';
-import { useInitConfigs, useInitPage } from '../hooks/useInit';
-import ModuleNew from './components/ModuleNew.vue';
-// import { useRoute } from 'vue-router';
-import VentModal from '/@/components/vent/micro/ventModal.vue';
-import { getHomeData } from '../configurable.api';
-// import { useRoute } from 'vue-router';
-import { testConfigVentNew } from '../configurable.data';
-const { configs, isNew, fetchConfigs } = useInitConfigs();
-const { mainTitle, data, updateData, updateEnhancedConfigs } = useInitPage('一通三防智能管控平台');
-// const route = useRoute();
-let interval: number | undefined;
+  import { onMounted, onUnmounted } from 'vue';
+  // import { CaretDownOutlined } from '@ant-design/icons-vue';
+  // import MonitorCenter from './components/MonitorCenter.vue';
+  import NewNav from './components/NewNavFire.vue';
+  import { useInitConfigs, useInitPage } from '../hooks/useInit';
+  import ModuleDustNew from './components/ModuleDustNew.vue';
+  // import { useRoute } from 'vue-router';
+  import VentModal from '/@/components/vent/micro/ventModal.vue';
+  import { getHomeData } from '../configurable.api';
+  // import { useRoute } from 'vue-router';
+  import { testConfigVentNew } from '../configurable.data';
+  const { configs, fetchConfigs } = useInitConfigs();
+  const { mainTitle, data, updateData } = useInitPage('一通三防智能管控平台');
+  // const route = useRoute();
+  let interval: number | undefined;
 
-onMounted(() => {
-  fetchConfigs('vent').then(() => {
+  onMounted(() => {
+    // fetchConfigs('vent_new').then(() => {
     configs.value = testConfigVentNew;
-    updateEnhancedConfigs(configs.value);
+    // updateEnhancedConfigs(configs.value);
 
     getHomeData({}).then(updateData);
+    // });
+    setInterval(() => {
+      getHomeData({}).then(updateData);
+    }, 60000);
   });
-  setInterval(() => {
-    getHomeData({}).then(updateData);
-  }, 60000);
-});
 
-onUnmounted(() => {
-  clearInterval(interval);
-});
+  onUnmounted(() => {
+    clearInterval(interval);
+  });
 </script>
 <style lang="less" scoped>
-@import '/@/design/theme.less';
+  @import '/@/design/theme.less';
 
-@font-face {
-  font-family: 'douyuFont';
-  src: url('../../../../assets/font/douyuFont.otf');
-}
-
-@{theme-deepblue} {
-  .company-home {
-    --image-modal-top: url('@/assets/images/vent/homeNew/modaltop.png');
+  @font-face {
+    font-family: 'douyuFont';
+    src: url('../../../../assets/font/douyuFont.otf');
   }
-}
 
-.company-home {
-  --image-modal-top: url('@/assets/images/vent/homeNew/modaltop.png');
-  width: 100%;
-  height: 100%;
-  color: @white;
-  position: relative;
-  background: url('@/assets/images/vent/homeNew/bg.png') no-repeat center;
+  @{theme-deepblue} {
+    .company-home {
+      --image-modal-top: url('@/assets/images/vent/homeNew/modaltop.png');
+    }
+  }
 
-  .top-bg {
+  .company-home {
+    --image-modal-top: url('@/assets/images/vent/homeNew/modaltop.png');
     width: 100%;
-    height: 56px;
-    background: var(--image-modal-top) no-repeat center;
-    position: absolute;
-    z-index: 1;
-    .main-title {
+    height: 100%;
+    color: @white;
+    position: relative;
+    background: url('@/assets/images/vent/homeNew/bg.png') no-repeat center;
+
+    .top-bg {
+      width: 100%;
       height: 56px;
-      font-family: 'douyuFont';
-      font-size: 20px;
-      letter-spacing: 2px;
-      display: flex;
-      justify-content: center;
-      align-items: center;
+      background: var(--image-modal-top) no-repeat center;
+      position: absolute;
+      z-index: 1;
+      .main-title {
+        height: 56px;
+        font-family: 'douyuFont';
+        font-size: 20px;
+        letter-spacing: 2px;
+        display: flex;
+        justify-content: center;
+        align-items: center;
+      }
+      .top-nav {
+        position: absolute;
+        top: 0;
+        width: 880px;
+        height: 100%;
+        display: flex;
+        justify-content: flex-start;
+      }
     }
-    .top-nav {
+    .left-t {
       position: absolute;
-      top: 0;
-      width: 880px;
+      width: 28%;
       height: 100%;
-      display: flex;
-      justify-content: flex-start;
+      background: url('@/assets/images/vent/homeNew/leftContent.png') no-repeat center;
+      z-index: 0;
+    }
+    .right-t {
+      position: absolute;
+      width: 172%;
+      height: 100%;
+      background: url('@/assets/images/vent/homeNew/rightContent.png') no-repeat center;
+      z-index: 0;
+    }
+    // .module-left {
+    //   position: absolute;
+    //   width: 450px;
+    //   height: 280px;
+    //   left: 0;
+    // }
+    // .module-right {
+    //   position: absolute;
+    //   width: 450px;
+    //   height: 280px;
+    //   right: 0;
+    // }
+    // .module-bottom {
+    //   position: absolute;
+    //   width: 1000px;
+    //   height: 280px;
+    // }
+    .module-dropdown {
+      padding: 10px;
+      background-image: @vent-configurable-dropdown;
+      border-bottom: 2px solid @vent-configurable-home-light-border;
+      color: @vent-font-color;
+      position: absolute;
+      top: 70px;
+      right: 460px;
+    }
+    .module-dropdown-original {
+      padding: 10px;
+      background-image: @vent-configurable-dropdown;
+      border-bottom: 2px solid @vent-configurable-home-light-border;
+      color: @vent-font-color;
+      position: absolute;
+      top: 70px;
+      right: 460px;
+    }
+    .module-trigger-button {
+      color: @vent-font-color;
+      background-image: @vent-configurable-dropdown;
+      border: none;
+      border-bottom: 2px solid @vent-configurable-home-light-border;
     }
   }
-  .left-t {
-    position: absolute;
-    width: 28%;
-    height: 100%;
-    background: url('@/assets/images/vent/homeNew/leftContent.png') no-repeat center;
-    z-index: 0;
-  }
-  .right-t {
-    position: absolute;
-    width: 172%;
-    height: 100%;
-    background: url('@/assets/images/vent/homeNew/rightContent.png') no-repeat center;
-    z-index: 0;
-  }
-  // .module-left {
-  //   position: absolute;
-  //   width: 450px;
-  //   height: 280px;
-  //   left: 0;
-  // }
-  // .module-right {
-  //   position: absolute;
-  //   width: 450px;
-  //   height: 280px;
-  //   right: 0;
-  // }
-  // .module-bottom {
-  //   position: absolute;
-  //   width: 1000px;
-  //   height: 280px;
-  // }
-  .module-dropdown {
-    padding: 10px;
-    background-image: @vent-configurable-dropdown;
-    border-bottom: 2px solid @vent-configurable-home-light-border;
-    color: @vent-font-color;
-    position: absolute;
-    top: 70px;
-    right: 460px;
-  }
-  .module-dropdown-original {
-    padding: 10px;
-    background-image: @vent-configurable-dropdown;
-    border-bottom: 2px solid @vent-configurable-home-light-border;
-    color: @vent-font-color;
-    position: absolute;
-    top: 70px;
-    right: 460px;
-  }
-  .module-trigger-button {
-    color: @vent-font-color;
-    background-image: @vent-configurable-dropdown;
-    border: none;
-    border-bottom: 2px solid @vent-configurable-home-light-border;
+  :deep(.loading-box) {
+    position: unset;
   }
-}
-:deep(.loading-box) {
-  position: unset;
-}
 </style>

+ 2 - 3
src/views/vent/home/configurable/blue/warnMonitor.vue

@@ -5,7 +5,7 @@
     </div>
     <template v-if="!route.query.deviceType">
       <div class="main-container">
-        <ModuleOriginal
+        <ModuleDustNew
           v-for="(cfg, index) in configs"
           :key="cfg.deviceType + index"
           :show-style="cfg.showStyle"
@@ -26,7 +26,7 @@
 <script lang="ts" setup>
 import { onMounted, onUnmounted, reactive, ref } from 'vue';
 import { useInitConfigs, useInitPage } from '../hooks/useInit';
-import ModuleOriginal from './components/ModuleWarnMonitor.vue';
+import ModuleDustNew from './components/ModuleWarnMonitor.vue';
 import CenterAreaWarn from './components/center-area-warn.vue';
 import { useRoute } from 'vue-router';
 import { useGlobSetting } from '/@/hooks/setting';
@@ -182,4 +182,3 @@ onUnmounted(() => {
   position: unset;
 }
 </style>
-

+ 4 - 3
src/views/vent/home/configurable/components/content-New.vue

@@ -416,6 +416,7 @@
     // z-index: -2;
     display: flex;
     flex-direction: column;
+    overflow-x: hidden;
   }
   .content__background {
     width: 100%;
@@ -450,9 +451,9 @@
     margin-left: -24% !important;
   }
   .content__module_dust {
-    background: url('@/assets/images/vent/homeNew/bottomBg.png');
-    background-repeat: no-repeat;
-    background-size: 100% 100%;
+    // background: url('@/assets/images/vent/homeNew/bottomBg.png');
+    // background-repeat: no-repeat;
+    // background-size: 100% 100%;
     width: 100%;
     height: 100%;
     padding: 0 34px;

+ 1 - 0
src/views/vent/home/configurable/components/content.vue

@@ -442,6 +442,7 @@
     display: flex;
     flex-direction: column;
     overflow-y: auto; // 这里会导致样式无故添加滚动条
+    overflow-x: hidden;
   }
 
   .content__background {

+ 9 - 5
src/views/vent/home/configurable/components/detail/CustomChart.vue

@@ -368,7 +368,7 @@
         textStyle,
         grid: {
           top: 50,
-          bottom: dataZoom.length ? 70 : 50,
+          bottom: dataZoom.length ? 70 : 30,
         },
         legend: {
           textStyle,
@@ -605,7 +605,7 @@
           left: 50,
           top: 50,
           right: 50,
-          bottom: dataZoom.length ? 70 : 50,
+          bottom: dataZoom.length ? 70 : 30,
         },
         dataZoom: baseDataZoom,
         xAxis: xAxis.map((e) => {
@@ -613,6 +613,10 @@
             ...e,
             type: 'category',
             boundaryGap: false,
+            axisLabel: {
+              width: 100,
+              overflow: 'break',
+            },
           };
         }),
         yAxis: yAxis.map((e, i) => {
@@ -666,7 +670,7 @@
           left: 40,
           top: 50,
           right: 40,
-          bottom: dataZoom.length ? 70 : 10,
+          bottom: dataZoom.length ? 70 : 30,
           show: false,
         },
         dataZoom: baseDataZoom,
@@ -757,7 +761,7 @@
         textStyle,
         grid: {
           top: 40,
-          bottom: 50,
+          bottom: 30,
         },
         legend: {
           textStyle,
@@ -859,7 +863,7 @@
         textStyle,
         grid: {
           top: 40,
-          bottom: 50,
+          bottom: 30,
         },
         legend: {
           textStyle,

+ 1 - 0
src/views/vent/home/configurable/components/detail/MiniBoard.vue

@@ -520,6 +520,7 @@
     padding-top: 30%;
     background-repeat: no-repeat;
     background-position: center top;
+    white-space: normal;
   }
 
   .mini-board__value_F {

+ 6 - 4
src/views/vent/home/configurable/components/preset/DeviceAlarm.vue

@@ -237,8 +237,9 @@
   watch(
     () => props.devicedata,
     (val) => {
+      const { ignoreKeywords = [], ignoreWarning = false, ignoreClosed = false, ignoreCount = false } = props.config;
       Object.keys(iconsMonitor).forEach((el) => {
-        if (val && val[el] && !props.config.ignoreKeywords.includes(el)) {
+        if (val && val[el] && !ignoreKeywords.includes(el)) {
           iconsMonitor[el].level = val[el].maxLevel;
           iconsMonitor[el]['text'] = val[el].name;
           // iconsMonitor[el]['count'] = val[el].count;
@@ -246,13 +247,13 @@
           iconsMonitor[el].warnCount = val[el].count;
           iconsMonitor[el].closeCount = val[el].netstatus;
 
-          if (props.config.ignoreWarning) {
+          if (ignoreWarning) {
             iconsMonitor[el].warnCount = 0;
           }
-          if (props.config.ignoreClosed) {
+          if (ignoreClosed) {
             iconsMonitor[el].closeCount = 0;
           }
-          if (props.config.ignoreCount) {
+          if (ignoreCount) {
             iconsMonitor[el].allCount = 0;
           }
         }
@@ -260,6 +261,7 @@
     },
     {
       deep: true,
+      immediate: true,
     }
   );
 </script>

+ 1 - 0
src/views/vent/home/configurable/components/preset/QHCurve.vue

@@ -324,6 +324,7 @@
     .main {
       width: 100%;
       height: 100%;
+      overflow-x: hidden;
     }
   }
 </style>

+ 18 - 24
src/views/vent/home/configurable/configurable.data.New.ts

@@ -103,10 +103,9 @@ export const testConfigNewDust: Config[] = [
       preset: [],
     },
     showStyle: {
-      size: 'width:410px;height:493px;',
-      version: '保德',
-      position: 'top:65px;left:10px;',
-      headerPosition: 'leftTop',
+      size: 'width:450px;height:550px;',
+      version: '淡蓝色',
+      position: 'top:60px;left:0;',
     },
   },
   {
@@ -173,10 +172,9 @@ export const testConfigNewDust: Config[] = [
       preset: [],
     },
     showStyle: {
-      size: 'width:370px;height:360px;',
-      version: '保德',
-      position: 'bottom:40px;left:10px;',
-      headerPosition: 'leftBottom',
+      size: 'width:450px;height:280px;',
+      version: '淡蓝色',
+      position: 'top:620px;left:0;',
     },
   },
   {
@@ -237,10 +235,9 @@ export const testConfigNewDust: Config[] = [
       preset: [],
     },
     showStyle: {
-      size: 'width:1000px;height:280px;',
-      version: '保德',
-      position: 'bottom:8px;left:455px',
-      headerPosition: 'centerBottom',
+      size: 'width:980px;height:300px;',
+      version: '淡蓝色',
+      position: 'bottom:8px;left:470px',
     },
   },
   {
@@ -312,10 +309,9 @@ export const testConfigNewDust: Config[] = [
       to: 'http://10.248.210.154:8801',
     },
     showStyle: {
-      size: 'width:415px;height:300px;',
-      version: '保德',
-      position: 'top:60px;right:10px;',
-      headerPosition: 'rightTop',
+      size: 'width:450px;height: 280px;',
+      version: '淡蓝色',
+      position: 'top:60px;right:0;',
     },
   },
   {
@@ -379,10 +375,9 @@ export const testConfigNewDust: Config[] = [
       preset: [],
     },
     showStyle: {
-      size: 'width:378px;height:260px;',
-      version: '保德',
-      position: 'top:370px;right:10px;',
-      headerPosition: 'rightCenter',
+      size: 'width:450px;height:280px;',
+      version: '淡蓝色',
+      position: 'top:350px;right:0;',
     },
   },
   {
@@ -445,10 +440,9 @@ export const testConfigNewDust: Config[] = [
       preset: [],
     },
     showStyle: {
-      size: 'width:385px;height:280px;',
-      version: '保德',
-      position: 'bottom:20px;right:10px;',
-      headerPosition: 'rightBottom',
+      size: 'width:440px;height:280px;',
+      version: '淡蓝色',
+      position: 'top:640px;right:0;',
     },
   },
 ];

+ 89 - 92
src/views/vent/home/configurable/configurable.data.ts

@@ -282,7 +282,6 @@ export const testConfigVent: Config[] = [
       position: 'top:555px;left:15px;',
     },
   },
-
   {
     deviceType: 'sys_wind',
     moduleName: '风量监测',
@@ -3311,7 +3310,7 @@ export const testConfigVentNew: Config[] = [
   {
     deviceType: 'fanmain',
     moduleName: '主通风机系统',
-    pageType: 'vent',
+    pageType: 'vent_new',
     moduleData: {
       header: {
         show: true,
@@ -3322,7 +3321,7 @@ export const testConfigVentNew: Config[] = [
         },
         slot: {
           show: true,
-          value: '运行风机:${readData.Fan1StartStatus}',
+          value: '风机:${readData.Fan1StartStatus}',
           trans: {
             '1': '1#风机',
             '0': '2#风机',
@@ -3343,7 +3342,7 @@ export const testConfigVentNew: Config[] = [
           },
           {
             name: 'board',
-            basis: '30%',
+            basis: '33%',
           },
         ],
       },
@@ -3387,16 +3386,15 @@ export const testConfigVentNew: Config[] = [
       ],
     },
     showStyle: {
-      size: 'width:380px;height:280px;',
+      size: 'width:440px;height:280px;',
       version: '原版',
       position: 'top:60px;left:0;',
-      headerPosition: 'leftTop',
     },
   },
   {
     deviceType: '',
     moduleName: '通风设施远程控制',
-    pageType: 'vent',
+    pageType: 'vent_new',
     moduleData: {
       header: {
         show: false,
@@ -3411,7 +3409,7 @@ export const testConfigVentNew: Config[] = [
         },
       },
       background: {
-        show: true,
+        show: false,
         type: 'video',
         link: '/video/fanLocal.webm',
       },
@@ -3436,19 +3434,50 @@ export const testConfigVentNew: Config[] = [
           readFrom: 'device',
         },
       ],
+      mock: {
+        device: {
+          fanmain: {
+            maxLevel: 0,
+            name: '主扇',
+            totalCount: 0,
+            count: 0,
+            netstatus: 0,
+          },
+          fanlocal: {
+            maxLevel: 0,
+            name: '局扇',
+            totalCount: 0,
+            count: 0,
+            netstatus: 0,
+          },
+          gate: {
+            maxLevel: 0,
+            name: '风门',
+            totalCount: 0,
+            count: 0,
+            netstatus: 0,
+          },
+          window: {
+            maxLevel: 0,
+            name: '风窗',
+            totalCount: 0,
+            count: 0,
+            netstatus: 0,
+          },
+        },
+      },
       to: '/micro-vent-3dModal/dashboard/analysis?type=tunMonitor&deviceType=gate_xinJianFuXieJin',
     },
     showStyle: {
-      size: 'width:377px;height:280px;',
+      size: 'width:440px;height:280px;',
       version: '原版',
       position: 'top:350px;left:0;',
-      headerPosition: 'leftCenter',
     },
   },
   {
     deviceType: 'warn',
     moduleName: '预警监测',
-    pageType: 'vent_realtime',
+    pageType: 'vent_new',
     moduleData: {
       header: {
         show: true,
@@ -3518,16 +3547,15 @@ export const testConfigVentNew: Config[] = [
       to: '/monitorChannel/monitor-alarm-home',
     },
     showStyle: {
-      size: 'width:387px;height:280px;',
+      size: 'width:440px;height:280px;',
       version: '新版',
       position: 'top:640px;left:0;',
-      headerPosition: 'leftBottom',
     },
   },
   {
     deviceType: 'sys_wind',
-    moduleName: '',
-    pageType: 'vent',
+    moduleName: '风量监测',
+    pageType: 'vent_new',
     moduleData: {
       header: {
         show: false,
@@ -3550,8 +3578,8 @@ export const testConfigVentNew: Config[] = [
         direction: 'row',
         items: [
           {
-            name: 'tabs',
-            basis: '65%',
+            name: 'chart',
+            basis: '100%',
           },
         ],
       },
@@ -3562,68 +3590,40 @@ export const testConfigVentNew: Config[] = [
       gallery: [],
       complex_list: [],
       gallery_list: [],
-      chart: [],
-      to: '',
-    },
-    showStyle: {
-      size: 'width:1000px;height:120px;',
-      version: '新版',
-      position: 'top:85px;left:460px;',
-      headerPosition: 'centerTop',
-    },
-  },
-  {
-    deviceType: 'sys_wind',
-    moduleName: '',
-    pageType: 'vent',
-    moduleData: {
-      header: {
-        show: false,
-        readFrom: '',
-        selector: {
-          show: false,
-          value: '',
-        },
-        slot: {
-          show: false,
-          value: '',
+      chart: [
+        {
+          type: 'bar',
+          readFrom: '',
+          legend: { show: true },
+          xAxis: [{ show: true }],
+          yAxis: [
+            { show: true, name: '风量(m³/min)', position: 'left' },
+            { show: true, name: '风速(m/s)', position: 'right' },
+          ],
+          dataZoom: [
+            {
+              show: true,
+              end: 20,
+            },
+          ],
+          series: [
+            { readFrom: 'sys_wind', xprop: 'strinstallpos', yprop: 'readData.m3', label: '风量' },
+            { readFrom: 'sys_wind', xprop: 'strinstallpos', yprop: 'readData.va', label: '风速' },
+          ],
         },
-      },
-      background: {
-        show: false,
-        type: 'video',
-        link: '',
-      },
-      layout: {
-        direction: 'row',
-        items: [
-          {
-            name: 'tabs',
-            basis: '65%',
-          },
-        ],
-      },
-      board: [],
-      list: [],
-      table: [],
-      preset: [],
-      gallery: [],
-      complex_list: [],
-      gallery_list: [],
-      chart: [],
-      to: '',
+      ],
+      to: '/micro-vent-3dModal/dashboard/analysis?type=tunMonitor&deviceType=windrect',
     },
     showStyle: {
-      size: 'width:1000px;height:100px;',
-      version: '新版',
-      position: 'bottom:0;left:460px;',
-      headerPosition: 'centerBottom',
+      size: 'width:1000px;height:260px;',
+      version: '原版',
+      position: 'bottom:8px;left:460px;',
     },
   },
   {
     deviceType: 'fanlocal',
     moduleName: '局部通风机系统',
-    pageType: 'vent',
+    pageType: 'vent_new',
     moduleData: {
       header: {
         show: true,
@@ -3634,7 +3634,7 @@ export const testConfigVentNew: Config[] = [
         },
         slot: {
           show: true,
-          value: '运行风机:${readData.Fan1StartStatus}',
+          value: '风机:${readData.Fan1StartStatus}',
           trans: {
             '1': '1#风机',
             '0': '2#风机',
@@ -3649,13 +3649,13 @@ export const testConfigVentNew: Config[] = [
       layout: {
         direction: 'column',
         items: [
-          {
-            name: 'board',
-            basis: '25%',
-          },
+          // {
+          //   name: 'board',
+          //   basis: '25%',
+          // },
           {
             name: 'chart',
-            basis: '75%',
+            basis: '100%',
           },
         ],
       },
@@ -3699,16 +3699,15 @@ export const testConfigVentNew: Config[] = [
       to: '/micro-vent-3dModal/dashboard/analysis?type=tunMonitor&deviceType=fanlocal',
     },
     showStyle: {
-      size: 'width:390px;height:324px;',
+      size: 'width:440px;height:265px;',
       version: '原版',
       position: 'top:60px;right:0;',
-      headerPosition: 'rightTop',
     },
   },
   {
     deviceType: 'sys_majorpath',
     moduleName: '关键通风路线',
-    pageType: 'vent',
+    pageType: 'vent_new',
     moduleData: {
       header: {
         show: true,
@@ -3768,16 +3767,15 @@ export const testConfigVentNew: Config[] = [
       to: '/micro-vent-3dModal/dashboard/analysis?type=tunMonitor&deviceType=sys_majorpath&deviceid=${deviceID}',
     },
     showStyle: {
-      size: 'width:377px;height:280px;',
+      size: 'width:440px;height:310px;',
       version: '新版',
-      position: 'top:350px;right:0;',
-      headerPosition: 'rightCenter',
+      position: 'top:335px;right:0;',
     },
   },
   {
     deviceType: 'sys_surface_caimei',
     moduleName: '工作面智能监控',
-    pageType: 'vent',
+    pageType: 'vent_new',
     moduleData: {
       header: {
         show: true,
@@ -3801,12 +3799,12 @@ export const testConfigVentNew: Config[] = [
         items: [
           {
             name: 'chart',
-            basis: '75%',
-          },
-          {
-            name: 'board',
-            basis: '25%',
+            basis: '100%',
           },
+          // {
+          //   name: 'board',
+          //   basis: '25%',
+          // },
         ],
       },
       board: [
@@ -3848,10 +3846,9 @@ export const testConfigVentNew: Config[] = [
       to: '/micro-vent-3dModal/dashboard/analysis?type=tunMonitor&deviceType=sys_surface_caimei&deviceid=${deviceID}',
     },
     showStyle: {
-      size: 'width:377px;height:280px;',
+      size: 'width:440px;height:270px;',
       version: '新版',
-      position: 'top:640px;right:0;',
-      headerPosition: 'rightBottom',
+      position: 'top:650px;right:0;',
     },
   },
 ];

+ 1 - 1
src/views/vent/home/configurable/fireMine.vue

@@ -69,7 +69,7 @@ import { computed, onMounted, onUnmounted } from 'vue';
 import { useInitConfigs, useInitPage } from './hooks/useInit';
 import ModuleMine from './components/ModuleMine.vue';
 import ModuleBDDual from './components/ModuleBDDual.vue';
-import NewNav from './bule/components/NewNavFire.vue';
+import NewNav from './blue/components/NewNavFire.vue';
 import { getDisHome } from './configurable.api';
 import { testConfigMineFire } from './configurable.data.mine';
 import VentModal from '/@/components/vent/micro/ventModal.vue';

+ 3 - 4
src/views/vent/home/configurable/fireTS.vue

@@ -67,8 +67,7 @@
       :visible="true"
       :common-title="commonTitle"
     />
-    <!-- 运维反应首页卡顿先行注释掉,后续再调整 -->
-    <!-- <Three3D :modal-name="modalName" /> -->
+    <Three3D :modal-name="modalName" />
   </div>
 </template>
 <script lang="ts" setup>
@@ -78,9 +77,9 @@
   // import { testConfigTSFire } from './configurable.data.tashan';
   import ModuleCommon from './components/ModuleCommon.vue';
   import ModuleCommonDual from './components/ModuleCommonDual.vue';
-  // import Three3D from './components/three3D.vue';
+  import Three3D from './components/three3D.vue';
 
-  // const modalName = ref('workFace11');
+  const modalName = ref('workFace11');
   const cfgs = computed(() => configs.value.filter((_, index) => index !== 6 && index !== 7 && index !== 8));
   const cfgA = computed<any>(() => configs.value[6]);
   const cfgB = computed<any>(() => configs.value[7]);

+ 100 - 93
src/views/vent/home/configurable/green/common-green.vue

@@ -7,9 +7,16 @@
       </div>
       <div class="main-container">
         <!-- 采用定位方式以避免出现各个模块隐藏时其他模块下移的问题 -->
-        <ModuleOriginal v-for="cfg in configs" :key="cfg.deviceType" :show-style="cfg.showStyle"
-          :module-data="cfg.moduleData" :module-name="cfg.moduleName" :device-type="cfg.deviceType" :data="data"
-          :visible="true" />
+        <ModuleOriginal
+          v-for="cfg in configs"
+          :key="cfg.deviceType"
+          :show-style="cfg.showStyle"
+          :module-data="cfg.moduleData"
+          :module-name="cfg.moduleName"
+          :device-type="cfg.deviceType"
+          :data="data"
+          :visible="true"
+        />
         <div class="right-area">
           <greenRightTag />
         </div>
@@ -22,111 +29,111 @@
   </div>
 </template>
 <script lang="ts" setup>
-import { onMounted, onUnmounted, ref, watch, computed } from 'vue';
-import { useInitConfigs, useInitPage } from '../hooks/useInit';
-import greenNav from './components/green-nav.vue';
-import ModuleOriginal from './components/ModuleOriginal-green.vue';
-// import greenRightTag from './components/green-right-tag.vue';
-import { list } from '../configurable.api';
-import { useRoute, useRouter } from 'vue-router';
-import { useGlobSetting } from '/@/hooks/setting';
-import { testConfigVent, } from '../configurable.data';
-import VentModal from '/@/components/vent/micro/ventModal.vue';
+  import { onMounted, onUnmounted, ref, watch, computed } from 'vue';
+  import { useInitConfigs, useInitPage } from '../hooks/useInit';
+  import greenNav from './components/green-nav.vue';
+  import ModuleOriginal from './components/ModuleOriginal-green.vue';
+  // import greenRightTag from './components/green-right-tag.vue';
+  import { list } from '../configurable.api';
+  import { useRoute, useRouter } from 'vue-router';
+  import { useGlobSetting } from '/@/hooks/setting';
+  import { testConfigVent } from '../configurable.data';
+  import VentModal from '/@/components/vent/micro/ventModal.vue';
 
-const { title = '智能通风管控系统' } = useGlobSetting();
-//   const { configs, isOriginal, isCommon, fetchConfigs } = useInitConfigs();
-const { isOriginal, fetchConfigs } = useInitConfigs();
-const { mainTitle, data, updateData, updateEnhancedConfigs } = useInitPage(title);
-const route = useRoute();
-let activeIndex = ref(1)
-let interval: number | undefined;
-let configs = ref<any[]>([]);
-function refresh() {
-  fetchConfigs('vent').then(() => {
-    configs.value = testConfigVent;
-    updateEnhancedConfigs(configs.value);
-    list({
-      types: configs.value
-        .filter((e) => e.deviceType)
-        .map((e) => e.deviceType)
-        .join(','),
-    }).then(updateData);
-  });
-}
+  const { title = '智能通风管控系统' } = useGlobSetting();
+  //   const { configs, isOriginal, isCommon, fetchConfigs } = useInitConfigs();
+  const { isOriginal, fetchConfigs } = useInitConfigs();
+  const { mainTitle, data, updateData, updateEnhancedConfigs } = useInitPage(title);
+  const route = useRoute();
+  let activeIndex = ref(1);
+  let interval: number | undefined;
+  let configs = ref<any[]>([]);
+  function refresh() {
+    fetchConfigs('vent').then(() => {
+      configs.value = testConfigVent;
+      updateEnhancedConfigs(configs.value);
+      list({
+        types: configs.value
+          .filter((e) => e.deviceType)
+          .map((e) => e.deviceType)
+          .join(','),
+      }).then(updateData);
+    });
+  }
 
-function initInterval() {
-  setInterval(() => {
-    list({
-      types: configs.value
-        .filter((e) => e.deviceType)
-        .map((e) => e.deviceType)
-        .join(','),
-    }).then(updateData);
-  }, 60000);
-}
+  function initInterval() {
+    setInterval(() => {
+      list({
+        types: configs.value
+          .filter((e) => e.deviceType)
+          .map((e) => e.deviceType)
+          .join(','),
+      }).then(updateData);
+    }, 60000);
+  }
 
-watch(
-  () => route.query,
-  () => {
-    if (route.query.deviceType) {
-      // 仅需要展示子应用,模拟 unmounted
-      clearInterval(interval);
-    } else {
-      // 模拟 mounted
-      refresh();
-      initInterval();
+  watch(
+    () => route.query,
+    () => {
+      if (route.query.deviceType) {
+        // 仅需要展示子应用,模拟 unmounted
+        clearInterval(interval);
+      } else {
+        // 模拟 mounted
+        refresh();
+        initInterval();
+      }
     }
-  }
-);
+  );
 
-onMounted(() => {
-  refresh();
-  initInterval();
-});
+  onMounted(() => {
+    refresh();
+    initInterval();
+  });
 
-onUnmounted(() => {
-  clearInterval(interval);
-});
+  onUnmounted(() => {
+    clearInterval(interval);
+  });
 </script>
 <style lang="less" scoped>
-@import '/@/design/theme.less';
+  @import '/@/design/theme.less';
 
-@font-face {
-  font-family: 'douyuFont';
-  src: url('/@/assets/font/douyuFont.otf');
-}
-
-@{theme-deepblue} {
-  .vent-green {
-    --image-modal-top: url('/@/assets/images/themify/deepblue/vent/home/modal-top.png');
+  @font-face {
+    font-family: 'douyuFont';
+    src: url('/@/assets/font/douyuFont.otf');
   }
-}
 
-.vent-green {
-  --image-modal-top: url('/@/assets/images/vent/home/modal-top.png');
+  @{theme-deepblue} {
+    .vent-green {
+      --image-modal-top: url('/@/assets/images/themify/deepblue/vent/home/modal-top.png');
+    }
+  }
 
-  width: 100%;
-  height: 100%;
-  position: relative;
+  .vent-green {
+    --image-modal-top: url('/@/assets/images/vent/home/modal-top.png');
 
-  .top-bg {
     width: 100%;
-    height: 96px;
-    position: absolute;
-    z-index: 1;
-  }
+    height: 100%;
+    position: relative;
 
-  .main-container {
-    position: absolute;
-    top: 96px;
-    width: calc(100% - 30px);
-    height: calc(100% - 96px);
-    margin: 0px 15px;
-    box-sizing: border-box;
+    .top-bg {
+      width: 100%;
+      height: 96px;
+      position: absolute;
+      z-index: 1;
+    }
+
+    .main-container {
+      position: absolute;
+      top: 96px;
+      width: calc(100% - 30px);
+      height: calc(100% - 96px);
+      margin: 0px 15px;
+      box-sizing: border-box;
+    }
   }
-}
 
-:deep(.loading-box) {
-  position: unset;
-}
+  :deep(.loading-box) {
+    position: unset;
+  }
 </style>

+ 3 - 0
src/views/vent/monitorManager/deviceMonitor/components/device/device.api.ts

@@ -18,6 +18,7 @@ enum Api {
   queryReportData = '/safety/reportLocalData/queryReportData', //查询瓦斯日报列表
   getDeviceListBySubId = '/safety/ventanalyDeviceInfo/getDeviceListBySubId', //查询分站
   getDeviceHistoryData = '/safety/ventanalyMonitorData/getRealHistoryData', //查询设备历史数据
+  getRegulation = '/monitor/getDeviceRegulation',
 }
 //分站全部列表
 export const getListAll = () => defHttp.post({ url: Api.getDeviceListBySubId });
@@ -62,3 +63,5 @@ export const queryReportData = (params) => defHttp.post({ url: Api.queryReportDa
  * @param params
  */
 export const getDeviceHistoryData = (params) => defHttp.post({ url: Api.getDeviceHistoryData, data: params });
+
+export const getRegulation = (params) => defHttp.post({ url: Api.getRegulation, params });

+ 1343 - 1306
src/views/vent/monitorManager/deviceMonitor/components/device/index.vue

@@ -633,1503 +633,1540 @@
 </template>
 
 <script setup lang="ts">
-  import { ref, onMounted, onUnmounted, ComponentOptions, shallowRef, reactive, defineProps, watch } from 'vue';
-  import { SendOutlined, FullscreenExitOutlined, FullscreenOutlined } from '@ant-design/icons-vue';
-  import { list, getDeviceList, getDeviceTypeList, devPosition, getDepartmentInfo, getExportUrl } from './device.api';
-  import AlarmHistoryTable from '../../../comment/AlarmHistoryTable.vue';
-  import HistoryTable from '../../../comment/HistoryTable.vue';
-  import HistoryTableNew from '/@/views/vent/comment/history/HistoryTable.vue';
-  import HandlerHistoryTable from '../../../comment/HandlerHistoryTable.vue';
-  import MonitorTable from '../../../comment/MonitorTable.vue';
-  import GroupMonitorTable from '../../../comment/GroupMonitorTable.vue';
-  import stationTable from '../../../comment/stationTable.vue';
-  import gaspatrolTable from '../../../comment/gaspatrolTable.vue';
-  import gasReport from '../../../comment/gasReport.vue';
-  import gasReportCount from '../../../comment/gasReportCount.vue';
-  import dustMonitorTable from '../../../comment/dustMonitorTable.vue';
-  import bundleMonitorTable from '../../../comment/bundleMonitorTable.vue';
-  import gasInspectDialog from '../../../comment/gasInspectDialog.vue';
-  import DustingTable from '../../../comment/DustingTable.vue';
-  import bundleSpyMonitorTable from '../../../comment/bundleSpyMonitorTable.vue';
-  import GasPipeTable from '../../../comment/GasPipeTable.vue';
-  import HistoryTableMajorPath from './modal/HistoryTableMajorPath.vue';
-  import HistoryBall from './modal/history-ball.vue';
-  import { TreeProps, message, Progress, Input, Select } from 'ant-design-vue';
-  import { TableAction } from '/@/components/Table';
-  import { SvgIcon } from '/@/components/Icon';
-  import { getActions } from '/@/qiankun/state';
-  import { useRouter, useRoute } from 'vue-router';
-  import { setDivHeight } from '/@/utils/event';
-  import { render } from '/@/utils/common/renderUtils';
-  import {
-    majorColumns,
-    haveSysDetailArr,
-    haveDetailArr,
-    haveHandlerArr,
-    noWarningArr,
-    surfaceChartsColumns,
-    noHistoryArr,
-    getMonitorComponent,
-    vehicleFormConfig,
-    noLocationArr,
-    haveHistoryEcharts,
-  } from './device.data';
-  import mainPath from './modal/mainPath.vue';
-  import { formConfig } from '../../../safetyMonitor/safety.data';
-  import { getDictItemsByCode } from '/@/utils/dict';
-  import BarAndLine from '/@/components/chart/BarAndLine.vue';
-  import MTreeSelect from '/@/components/Form/src/jeecg/components/MTreeSelect.vue';
-  // import ApiSelect from '/@/components/Form/src/components/ApiSelect.vue';
-  import { nextTick } from 'vue';
-  import { useMethods } from '/@/hooks/system/useMethods';
-  import { useGo } from '/@/hooks/web/usePage';
-  import { useGlobSetting } from '/@/hooks/setting';
-  import { usePermission } from '/@/hooks/web/usePermission';
-
-  type DeviceType = { deviceType: string; deviceName: string; datalist: any[] };
-  const glob = useGlobSetting();
-  // import { BorderBox8 as DvBorderBox8 } from '@kjgl77/datav-vue3';
-
-  const { FiberModal, BundleModal, DustModal, BallvalveModal, AtomizingModal, GaspatrolModal, WisdomBallModal } = getMonitorComponent();
-
-  const props = defineProps({
-    pageData: {
-      type: Object,
-      default: () => {},
-    },
-  });
+import { ref, onMounted, onUnmounted, ComponentOptions, shallowRef, reactive, defineProps, watch } from 'vue';
+import { SendOutlined, FullscreenExitOutlined, FullscreenOutlined } from '@ant-design/icons-vue';
+import { list, getDeviceList, getDeviceTypeList, devPosition, getDepartmentInfo, getExportUrl, getRegulation } from './device.api';
+import AlarmHistoryTable from '../../../comment/AlarmHistoryTable.vue';
+import HistoryTable from '../../../comment/HistoryTable.vue';
+import HistoryTableNew from '/@/views/vent/comment/history/HistoryTable.vue';
+import HandlerHistoryTable from '../../../comment/HandlerHistoryTable.vue';
+import MonitorTable from '../../../comment/MonitorTable.vue';
+import GroupMonitorTable from '../../../comment/GroupMonitorTable.vue';
+import stationTable from '../../../comment/stationTable.vue';
+import gaspatrolTable from '../../../comment/gaspatrolTable.vue';
+import gasReport from '../../../comment/gasReport.vue';
+import gasReportCount from '../../../comment/gasReportCount.vue';
+import dustMonitorTable from '../../../comment/dustMonitorTable.vue';
+import bundleMonitorTable from '../../../comment/bundleMonitorTable.vue';
+import gasInspectDialog from '../../../comment/gasInspectDialog.vue';
+import DustingTable from '../../../comment/DustingTable.vue';
+import bundleSpyMonitorTable from '../../../comment/bundleSpyMonitorTable.vue';
+import GasPipeTable from '../../../comment/GasPipeTable.vue';
+import HistoryTableMajorPath from './modal/HistoryTableMajorPath.vue';
+import HistoryBall from './modal/history-ball.vue';
+import { TreeProps, message, Progress, Input, Select } from 'ant-design-vue';
+import { TableAction } from '/@/components/Table';
+import { SvgIcon } from '/@/components/Icon';
+import { getActions } from '/@/qiankun/state';
+import { useRouter, useRoute } from 'vue-router';
+import { setDivHeight } from '/@/utils/event';
+import { render } from '/@/utils/common/renderUtils';
+import {
+  majorColumns,
+  haveSysDetailArr,
+  haveDetailArr,
+  haveHandlerArr,
+  noWarningArr,
+  surfaceChartsColumns,
+  noHistoryArr,
+  getMonitorComponent,
+  vehicleFormConfig,
+  noLocationArr,
+  haveHistoryEcharts,
+} from './device.data';
+import mainPath from './modal/mainPath.vue';
+import { formConfig } from '../../../safetyMonitor/safety.data';
+import { getDictItemsByCode } from '/@/utils/dict';
+import BarAndLine from '/@/components/chart/BarAndLine.vue';
+import MTreeSelect from '/@/components/Form/src/jeecg/components/MTreeSelect.vue';
+// import ApiSelect from '/@/components/Form/src/components/ApiSelect.vue';
+import { nextTick } from 'vue';
+import { useMethods } from '/@/hooks/system/useMethods';
+import { useGo } from '/@/hooks/web/usePage';
+import { useGlobSetting } from '/@/hooks/setting';
+import { usePermission } from '/@/hooks/web/usePermission';
+
+type DeviceType = { deviceType: string; deviceName: string; datalist: any[] };
+const glob = useGlobSetting();
+// import { BorderBox8 as DvBorderBox8 } from '@kjgl77/datav-vue3';
+
+const { FiberModal, BundleModal, DustModal, BallvalveModal, AtomizingModal, GaspatrolModal, WisdomBallModal } = getMonitorComponent();
+
+const props = defineProps({
+  pageData: {
+    type: Object,
+    default: () => {},
+  },
+});
+
+const { hasPermission } = usePermission();
+const { handleExportXls } = useMethods();
+const go = useGo();
+const echatsOption = {
+  grid: {
+    top: '35',
+    left: '30',
+    right: '45',
+    bottom: '25',
+    containLabel: true,
+  },
+  toolbox: {
+    feature: {},
+  },
+};
+const router = useRouter();
+const route = useRoute();
+const actions = getActions();
+const locationForm = reactive({
+  strname: '',
+  department: '',
+  stationname: '',
+});
+const noLocationList = noLocationArr();
+const monitorTable = ref();
+const historyTable = ref();
+const alarmHistoryTable = ref();
+const handlerHistoryTable = ref();
+
+// const routerParam = ref('home') // 默认进来时首页
+const isRefresh = ref(true);
+// 模态框
+const currentModal = shallowRef<Nullable<ComponentOptions>>(null); //模态框
+const modalVisible = ref<Boolean>(false); // 模态框是否可见
+
+// const drawerHeight = ref(240) // 监测框最小高度
+const treeShow = ref(true); //是否显示树形菜单
+const tableShow = ref(true); //是否显示树形菜单
+const locationSettingShow = ref(false); //是否显示树形菜单
+const treeNodeTitle = ref(''); // 选中的树形标题
+
+const locationList = ref([]); //巷道定位图标显示列表
+const deviceList = ref<DeviceType[]>([]); //关联设备列表
+const deviceActive = ref('');
+const activeKey = ref('monitor'); // tab key
+const dataSource = shallowRef([]); // 实时监测数据
+const majorPathEchartsData = ref({}); // 关键路线echarts数据
+const surfaceEchartsData = ref<any[]>(); // 工作面历史记录,echarts数据
+const activeID = ref(''); // 打开详情modal时监测的设备id
+const deviceType = ref(''); // 监测设备类型
+const systemType = ref('');
+const systemID = ref(''); // 系统监测时,系统id
+const selectedKeys = ref<string[]>([]);
+const expandedKeys = ref<string[]>([]);
+const scroll = reactive({
+  y: 180,
+});
+const treeData = ref<TreeProps['treeData']>([]);
+let departmentInfo: Null | Object = null;
+let startMonitorTimer = 0;
+let gaspatrol = ref(null);
+let gasreport = ref(null);
+let gasreportcount = ref(null);
+let station = ref(null);
+let gasSearch = reactive({
+  address: '',
+  userName: '',
+  insType: '2',
+  class: 'night',
+});
+//树形菜单选择事件
+const onSelect: TreeProps['onSelect'] = (keys, e) => {
+  deviceType.value = '';
+  systemID.value = '';
+  deviceList.value = [];
+  const title = e.node.title; // 在
+  if (e.node.parent && e.node.parent.node.type.toString().startsWith('sys')) {
+    systemType.value = e.node.parent.node.type;
+    if (deviceType.value != e.node.parent.node.type) deviceType.value = e.node.parent.node.type;
+    systemID.value = e.node.type;
+    // 传递工作面id信息,用于定位
+    go(`/micro-vent-3dModal/dashboard/analysis?type=tunMonitor&deviceType=${deviceType.value}&deviceid=${systemID.value}`);
+  } else {
+    systemType.value = e.node.type;
+    if (deviceType.value != e.node.type) deviceType.value = e.node.type;
+    go(`/micro-vent-3dModal/dashboard/analysis?type=tunMonitor&deviceType=${deviceType.value}&deviceid=`);
+  }
+  clearTimeout(timer);
+  timer = undefined;
+  if (startMonitorTimer) {
+    clearTimeout(startMonitorTimer);
+  }
+  dataSource.value = [];
+  monitorTable.value.resetPagination();
+  if (!startMonitorTimer) {
+    startMonitorTimer = setTimeout(() => {
+      expandedKeys.value = keys;
+      selectedKeys.value = keys;
+      treeNodeTitle.value = e.node.title;
+
+      if (e.node.children?.length < 1 && timer) {
+        getMonitor(true);
+      }
+    }, 1000);
+  }
+  // activeKey.value = '1';
+};
+
+function tabChange(activeKeyVal) {
+  activeKey.value = activeKeyVal;
+  router.push({ path: route.path, query: { ...route.query, tabtype: activeKey.value } });
+}
+
+function showTree(flag, value) {
+  if (flag == 'treeShow') treeShow.value = value;
+  if (flag == 'location') locationSettingShow.value = value;
+}
+
+async function getDeviceType(sysType?) {
+  if (treeData.value?.length > 0) return;
+  const result = await getDeviceTypeList({});
+  if (result.length > 0) {
+    const dataSource = <TreeProps['treeData']>[];
+    let key = '0';
+    const getData = (resultList, dataSourceList, keyVal) => {
+      resultList.forEach((item, index) => {
+        if (item.deviceType != 'sys' && item.children && item.children.length > 0) {
+          const children = getData(item.children, [], `${keyVal}-${index}`);
+          // 判断关键阻力路线
+          if (item.itemValue.startsWith(sysType) && children[0]) {
+            systemID.value = item.children[0]['itemValue'];
+          }
 
-  const { hasPermission } = usePermission();
-  const { handleExportXls } = useMethods();
-  const go = useGo();
-  const echatsOption = {
-    grid: {
-      top: '35',
-      left: '30',
-      right: '45',
-      bottom: '25',
-      containLabel: true,
-    },
-    toolbox: {
-      feature: {},
-    },
-  };
-  const router = useRouter();
-  const route = useRoute();
-  const actions = getActions();
-  const locationForm = reactive({
-    strname: '',
-    department: '',
-    stationname: '',
-  });
-  const noLocationList = noLocationArr();
-  const monitorTable = ref();
-  const historyTable = ref();
-  const alarmHistoryTable = ref();
-  const handlerHistoryTable = ref();
-
-  // const routerParam = ref('home') // 默认进来时首页
-  const isRefresh = ref(true);
-  // 模态框
-  const currentModal = shallowRef<Nullable<ComponentOptions>>(null); //模态框
-  const modalVisible = ref<Boolean>(false); // 模态框是否可见
-
-  // const drawerHeight = ref(240) // 监测框最小高度
-  const treeShow = ref(true); //是否显示树形菜单
-  const tableShow = ref(true); //是否显示树形菜单
-  const locationSettingShow = ref(false); //是否显示树形菜单
-  const treeNodeTitle = ref(''); // 选中的树形标题
-
-  const locationList = ref([]); //巷道定位图标显示列表
-  const deviceList = ref<DeviceType[]>([]); //关联设备列表
-  const deviceActive = ref('');
-  const activeKey = ref('monitor'); // tab key
-  const dataSource = shallowRef([]); // 实时监测数据
-  const majorPathEchartsData = ref({}); // 关键路线echarts数据
-  const surfaceEchartsData = ref<any[]>(); // 工作面历史记录,echarts数据
-  const activeID = ref(''); // 打开详情modal时监测的设备id
-  const deviceType = ref(''); // 监测设备类型
-  const systemType = ref('');
-  const systemID = ref(''); // 系统监测时,系统id
-  const selectedKeys = ref<string[]>([]);
-  const expandedKeys = ref<string[]>([]);
-  const scroll = reactive({
-    y: 180,
-  });
-  const treeData = ref<TreeProps['treeData']>([]);
-  let departmentInfo: Null | Object = null;
-  let startMonitorTimer = 0;
-  let gaspatrol = ref(null);
-  let gasreport = ref(null);
-  let gasreportcount = ref(null);
-  let station = ref(null);
-  let gasSearch = reactive({
-    address: '',
-    userName: '',
-    insType: '2',
-    class: 'night',
-  });
-  //树形菜单选择事件
-  const onSelect: TreeProps['onSelect'] = (keys, e) => {
-    deviceType.value = '';
-    systemID.value = '';
-    deviceList.value = [];
-    const title = e.node.title; // 在
-    if (e.node.parent && e.node.parent.node.type.toString().startsWith('sys')) {
-      systemType.value = e.node.parent.node.type;
-      if (deviceType.value != e.node.parent.node.type) deviceType.value = e.node.parent.node.type;
-      systemID.value = e.node.type;
-      // 传递工作面id信息,用于定位
-      go(`/micro-vent-3dModal/dashboard/analysis?type=tunMonitor&deviceType=${deviceType.value}&deviceid=${systemID.value}`);
-    } else {
-      systemType.value = e.node.type;
-      if (deviceType.value != e.node.type) deviceType.value = e.node.type;
-      go(`/micro-vent-3dModal/dashboard/analysis?type=tunMonitor&deviceType=${deviceType.value}&deviceid=`);
-    }
-    clearTimeout(timer);
-    timer = undefined;
-    if (startMonitorTimer) {
-      clearTimeout(startMonitorTimer);
-    }
-    dataSource.value = [];
-    monitorTable.value.resetPagination();
-    if (!startMonitorTimer) {
-      startMonitorTimer = setTimeout(() => {
-        expandedKeys.value = keys;
-        selectedKeys.value = keys;
-        treeNodeTitle.value = e.node.title;
-
-        if (e.node.children?.length < 1 && timer) {
-          getMonitor(true);
+          dataSourceList.push({
+            children: children,
+            title: item.itemText,
+            key: `${keyVal}-${index}`,
+            type: item.itemValue,
+            parentKey: `${keyVal}`,
+          });
+        } else {
+          dataSourceList.push({
+            children: [],
+            title: item.itemText,
+            key: `${keyVal}-${index}`,
+            type: item.itemValue,
+            parentKey: `${keyVal}`,
+          });
         }
-      }, 1000);
-    }
-    // activeKey.value = '1';
-  };
-
-  function tabChange(activeKeyVal) {
-    activeKey.value = activeKeyVal;
-    router.push({ path: route.path, query: { ...route.query, tabtype: activeKey.value } });
-  }
-
-  function showTree(flag, value) {
-    if (flag == 'treeShow') treeShow.value = value;
-    if (flag == 'location') locationSettingShow.value = value;
-  }
-
-  async function getDeviceType(sysType?) {
-    if (treeData.value?.length > 0) return;
-    const result = await getDeviceTypeList({});
-    if (result.length > 0) {
-      const dataSource = <TreeProps['treeData']>[];
-      let key = '0';
-      const getData = (resultList, dataSourceList, keyVal) => {
-        resultList.forEach((item, index) => {
-          if (item.deviceType != 'sys' && item.children && item.children.length > 0) {
-            const children = getData(item.children, [], `${keyVal}-${index}`);
-            // 判断关键阻力路线
-            if (item.itemValue.startsWith(sysType) && children[0]) {
-              systemID.value = item.children[0]['itemValue'];
+      });
+      return dataSourceList;
+    };
+    treeData.value = getData(result, dataSource, key);
+  }
+}
+
+// https获取监测数据
+let timer: null | NodeJS.Timeout = undefined;
+function getMonitor(flag?) {
+  if (deviceType.value) {
+    if (timer) timer = null;
+    if (Object.prototype.toString.call(timer) === '[object Null]') {
+      timer = setTimeout(
+        async () => {
+          if (deviceType.value.startsWith('gasDay_normal') && gaspatrol.value) {
+            gaspatrol.value.queryNowGasInsInfoList(); //人工瓦斯巡检
+          } else if (deviceType.value.startsWith('gasDayReport')) {
+            if (glob.sysOrgCode == 'sdmtjtbetmk') {
+              gasreportcount.value.getSearchReport();
+            } else {
+              gasreport.value.getSearchReport(); //瓦斯日报
             }
-
-            dataSourceList.push({
-              children: children,
-              title: item.itemText,
-              key: `${keyVal}-${index}`,
-              type: item.itemValue,
-              parentKey: `${keyVal}`,
-            });
+          } else if (deviceType.value.startsWith('substation') && station.value) {
+            //分站
+            station.value.getStationList();
           } else {
-            dataSourceList.push({
-              children: [],
-              title: item.itemText,
-              key: `${keyVal}-${index}`,
-              type: item.itemValue,
-              parentKey: `${keyVal}`,
-            });
+            await getDataSource();
           }
-        });
-        return dataSourceList;
-      };
-      treeData.value = getData(result, dataSource, key);
+          if (timer) {
+            getMonitor();
+          }
+        },
+        flag ? 0 : 1000
+      );
     }
   }
+}
+
+async function getDataSource() {
+  if (deviceType.value && deviceType.value.startsWith('sys') && systemID.value) {
+    const res = await list({ devicetype: 'sys', systemID: systemID.value });
+    const result = res.msgTxt;
+    const deviceArr = <DeviceType[]>[];
+    result.forEach((item) => {
+      const data = item['datalist'].filter((data: any) => {
+        const readData = data.readData;
+        return Object.assign(data, readData);
+      });
+      if (item.type != 'sys') {
+        if (item.type === 'majorpath') {
+          deviceArr.unshift({ deviceType: item.type, deviceName: item['typeName'], datalist: item['datalist'][0]['paths'] });
+          majorPathEchartsData.value = item['datalist'][0];
+        } else if (item.type.startsWith('surface_history')) {
+          surfaceEchartsData.value = item['datalist'][0];
+          deviceArr.unshift({
+            deviceType: item.type,
+            deviceName: item['typeName'] ? item['typeName'] : item['datalist'][0]['typeName'],
+            datalist: data,
+          });
+        } else {
+          deviceArr.unshift({
+            deviceType: item.type,
+            deviceName: item['typeName'] ? item['typeName'] : item['datalist'][0]['typeName'],
+            datalist: data,
+          });
+        }
+      }
+    });
 
-  // https获取监测数据
-  let timer: null | NodeJS.Timeout = undefined;
-  function getMonitor(flag?) {
-    if (deviceType.value) {
-      if (timer) timer = null;
-      if (Object.prototype.toString.call(timer) === '[object Null]') {
-        timer = setTimeout(
-          async () => {
-            if (deviceType.value.startsWith('gasDay_normal') && gaspatrol.value) {
-              gaspatrol.value.queryNowGasInsInfoList(); //人工瓦斯巡检
-            } else if (deviceType.value.startsWith('gasDayReport')) {
-              if (glob.sysOrgCode == 'sdmtjtbetmk') {
-                gasreportcount.value.getSearchReport();
+    deviceList.value = deviceArr;
+    if (deviceArr.length > 0) {
+      // if (deviceArr[1]) {
+      //   deviceActive.value = deviceArr[1].deviceType
+      //   monitorChange(1)
+      // } else {
+      //   deviceActive.value = deviceArr[0].deviceType
+      //   monitorChange(0)
+      // }
+      deviceActive.value = deviceArr[0].deviceType;
+      monitorChange(0);
+    }
+  } else {
+    let res = null;
+    if (systemID.value) {
+      res = await list({ devicetype: 'sys', types: deviceType.value, systemID: systemID.value });
+      if (res && res.msgTxt) {
+        const result = res.msgTxt;
+        result.forEach((item) => {
+          const data = item['datalist'].filter((data: any) => {
+            const readData = data.readData;
+            return Object.assign(data, readData);
+          });
+          if (item.type != 'sys') {
+            if (item.type.startsWith('majorpath') && item.type == deviceType.value) {
+              dataSource.value = item['datalist'][0]['paths'];
+              majorPathEchartsData.value = item['datalist'][0];
+              return;
+            } else if (item.type == deviceType.value) {
+              if (item.type == 'surface_history') {
+                // 工作面图标数据
+                surfaceEchartsData.value = item['datalist'][0];
               } else {
-                gasreport.value.getSearchReport(); //瓦斯日报
+                dataSource.value = data;
               }
-            } else if (deviceType.value.startsWith('substation') && station.value) {
-              //分站
-              station.value.getStationList();
-            } else {
-              await getDataSource();
-            }
-            if (timer) {
-              getMonitor();
+              return;
             }
-          },
-          flag ? 0 : 1000
-        );
-      }
-    }
-  }
-
-  async function getDataSource() {
-    if (deviceType.value && deviceType.value.startsWith('sys') && systemID.value) {
-      const res = await list({ devicetype: 'sys', systemID: systemID.value });
-      const result = res.msgTxt;
-      const deviceArr = <DeviceType[]>[];
-      result.forEach((item) => {
-        const data = item['datalist'].filter((data: any) => {
-          const readData = data.readData;
-          return Object.assign(data, readData);
-        });
-        if (item.type != 'sys') {
-          if (item.type === 'majorpath') {
-            deviceArr.unshift({ deviceType: item.type, deviceName: item['typeName'], datalist: item['datalist'][0]['paths'] });
-            majorPathEchartsData.value = item['datalist'][0];
-          } else if (item.type.startsWith('surface_history')) {
-            surfaceEchartsData.value = item['datalist'][0];
-            deviceArr.unshift({
-              deviceType: item.type,
-              deviceName: item['typeName'] ? item['typeName'] : item['datalist'][0]['typeName'],
-              datalist: data,
-            });
-          } else {
-            deviceArr.unshift({
-              deviceType: item.type,
-              deviceName: item['typeName'] ? item['typeName'] : item['datalist'][0]['typeName'],
-              datalist: data,
-            });
           }
-        }
-      });
-
-      deviceList.value = deviceArr;
-      if (deviceArr.length > 0) {
-        // if (deviceArr[1]) {
-        //   deviceActive.value = deviceArr[1].deviceType
-        //   monitorChange(1)
-        // } else {
-        //   deviceActive.value = deviceArr[0].deviceType
-        //   monitorChange(0)
-        // }
-        deviceActive.value = deviceArr[0].deviceType;
-        monitorChange(0);
+        });
       }
     } else {
-      let res = null;
-      if (systemID.value) {
-        res = await list({ devicetype: 'sys', types: deviceType.value, systemID: systemID.value });
-        if (res && res.msgTxt) {
-          const result = res.msgTxt;
-          result.forEach((item) => {
-            const data = item['datalist'].filter((data: any) => {
-              const readData = data.readData;
-              return Object.assign(data, readData);
-            });
-            if (item.type != 'sys') {
-              if (item.type.startsWith('majorpath') && item.type == deviceType.value) {
-                dataSource.value = item['datalist'][0]['paths'];
-                majorPathEchartsData.value = item['datalist'][0];
-                return;
-              } else if (item.type == deviceType.value) {
-                if (item.type == 'surface_history') {
-                  // 工作面图标数据
-                  surfaceEchartsData.value = item['datalist'][0];
-                } else {
-                  dataSource.value = data;
-                  console.log('关联设备数据--------------->', data);
-                }
-                return;
+      let resultData, searchForm;
+      if (monitorTable.value) {
+        const formData = monitorTable.value.getForm();
+        searchForm = formData.getFieldsValue();
+      }
+
+      if (monitorTable.value) {
+        if (deviceType.value.startsWith('safetymonitor')) {
+          resultData = await list({ devicetype: deviceType.value, pagetype: 'normal', filterParams: { ...searchForm } });
+        } else if (deviceType.value.startsWith('location')) {
+          if (!departmentInfo) {
+            departmentInfo = await getDepartmentInfo({});
+          }
+          let department = null;
+          if (departmentInfo && locationForm && locationForm['department']) {
+            for (const key in departmentInfo) {
+              const item = departmentInfo[key];
+              if (item['id'] === locationForm['department']) {
+                department = item;
+                break;
               }
             }
+          }
+          resultData = await list({
+            devicetype: deviceType.value,
+            pagetype: 'normal',
+            filterParams: {
+              strinstallpos: locationForm['stationname'] ? locationForm['stationname'] : '',
+              userName: locationForm['strname'] ? locationForm['strname'] : '',
+              userJson: department && department['name'] ? department['name'] : '',
+            },
+          });
+        } else if (deviceType.value.startsWith('vehicle')) {
+          resultData = await list({
+            devicetype: deviceType.value,
+            pagetype: 'normal',
+            filterParams: {
+              strinstallpos: locationForm['stationname'] ? locationForm['stationname'] : '',
+              vehicleName: locationForm['strname'] ? locationForm['strname'] : '',
+            },
           });
+        } else {
+          resultData = await list({ devicetype: deviceType.value, pagetype: 'normal' });
         }
       } else {
-        let resultData, searchForm;
-        if (monitorTable.value) {
-          const formData = monitorTable.value.getForm();
-          searchForm = formData.getFieldsValue();
-        }
-
-        if (monitorTable.value) {
+        // 非安全监控
+        resultData = await list({ devicetype: deviceType.value, pagetype: 'normal' });
+      }
+      if (resultData && resultData.msgTxt) {
+        const result = resultData.msgTxt[0];
+        if (result) {
+          const data = result['datalist'].filter((data: any) => {
+            const readData = data.readData;
+            return Object.assign(data, readData);
+          });
           if (deviceType.value.startsWith('safetymonitor')) {
-            resultData = await list({ devicetype: deviceType.value, pagetype: 'normal', filterParams: { ...searchForm } });
-          } else if (deviceType.value.startsWith('location')) {
-            if (!departmentInfo) {
-              departmentInfo = await getDepartmentInfo({});
-            }
-            let department = null;
-            if (departmentInfo && locationForm && locationForm['department']) {
-              for (const key in departmentInfo) {
-                const item = departmentInfo[key];
-                if (item['id'] === locationForm['department']) {
-                  department = item;
-                  break;
-                }
+            const resultData = <any[]>[];
+            // 如果是安全监控的数据时需要过滤常见设备数据,根据设定的常用安全监控字典去匹配
+            const dictCodes = getDictItemsByCode('safetynormal');
+            if (searchForm && !searchForm['dataTypeName'] && dictCodes && dictCodes.length) {
+              for (let i = 0; i < dictCodes.length; i++) {
+                const dict = dictCodes[i];
+                data.forEach((item) => {
+                  if (dict['value'] == item['dataTypeName']) {
+                    resultData.push(item);
+                  }
+                });
               }
+              dataSource.value = resultData;
+            } else {
+              dataSource.value = data;
             }
-            resultData = await list({
-              devicetype: deviceType.value,
-              pagetype: 'normal',
-              filterParams: {
-                strinstallpos: locationForm['stationname'] ? locationForm['stationname'] : '',
-                userName: locationForm['strname'] ? locationForm['strname'] : '',
-                userJson: department && department['name'] ? department['name'] : '',
-              },
-            });
-          } else if (deviceType.value.startsWith('vehicle')) {
-            resultData = await list({
-              devicetype: deviceType.value,
-              pagetype: 'normal',
-              filterParams: {
-                strinstallpos: locationForm['stationname'] ? locationForm['stationname'] : '',
-                vehicleName: locationForm['strname'] ? locationForm['strname'] : '',
-              },
-            });
           } else {
-            resultData = await list({ devicetype: deviceType.value, pagetype: 'normal' });
-          }
-        } else {
-          // 非安全监控
-          resultData = await list({ devicetype: deviceType.value, pagetype: 'normal' });
-        }
-        if (resultData && resultData.msgTxt) {
-          const result = resultData.msgTxt[0];
-          if (result) {
-            const data = result['datalist'].filter((data: any) => {
-              const readData = data.readData;
-              return Object.assign(data, readData);
-            });
-            if (deviceType.value.startsWith('safetymonitor')) {
-              const resultData = <any[]>[];
-              // 如果是安全监控的数据时需要过滤常见设备数据,根据设定的常用安全监控字典去匹配
-              const dictCodes = getDictItemsByCode('safetynormal');
-              if (searchForm && !searchForm['dataTypeName'] && dictCodes && dictCodes.length) {
-                for (let i = 0; i < dictCodes.length; i++) {
-                  const dict = dictCodes[i];
-                  data.forEach((item) => {
-                    if (dict['value'] == item['dataTypeName']) {
-                      resultData.push(item);
-                    }
-                  });
-                }
-                dataSource.value = resultData;
+            let allRegulations: any[] | null = null;
+            let tableData: any[] = [];
+            let noNetData: any[] = [];
+            data.filter((el) => {
+              if (el.netStatus == 1) {
+                tableData.push(el);
               } else {
-                dataSource.value = data;
+                noNetData.push(el);
               }
-            } else {
-              let tableData: any[] = [];
-              let noNetData: any[] = [];
-              data.filter((el) => {
-                if (el.netStatus == 1) {
-                  tableData.push(el);
-                } else {
-                  noNetData.push(el);
-                }
+            });
+            const rawData = [...tableData, ...noNetData] || [];
+            const processedData = [...rawData];
+
+            // 首次请求获取去所有regulation数据
+            if (allRegulations === null) {
+              const regulationRes = await getRegulation({
+                deviceKind: deviceType.value,
               });
-              dataSource.value = [...tableData, ...noNetData];
+              allRegulations = regulationRes || [];
+            }
+            // 根据id创建一个映射表
+            const regulationMap = new Map();
+            allRegulations.forEach((reg) => {
+              regulationMap.set(reg.id, reg);
+            });
+            // 对regulation字段进行替换
+            processedData.forEach((data) => {
+              if (data.regulation) {
+                const reg = regulationMap.get(data.regulation);
+                if (reg) {
+                  data.regulation = reg; // 替换为完整对象
+                  data.fmin = reg.fmin;
+                  data.fmax = reg.fmax;
+                }
+              }
+            });
+            dataSource.value = processedData;
+            if (dataSource.value.length > 0) {
+              await processReadData(processedData);
             }
-          } else {
-            dataSource.value = [];
           }
         } else {
           dataSource.value = [];
         }
+      } else {
+        dataSource.value = [];
       }
     }
   }
+}
 
-  //设备分站详情跳转
-  function stationDetail() {
-    const newPage = router.resolve({ path: '/safety/list/detail/home' });
-    window.open(newPage.href, '_blank');
-  }
-
-  function goLocation(record) {
-    // debugger;
-    if (record['deviceType'] == 'person_bd' || record['deviceType'] == 'car_bd') {
-      actions.setGlobalState({ locationId: record.devNum, locationObj: null, pageObj: null, type: record['deviceType'].split('_')[0] });
-    } else if (deviceType.value == 'bundleSpyDayReport' || deviceType.value == 'dustDayReport' || deviceType.value == 'bundleDayReport') {
-      actions.setGlobalState({ locationName: record.jcdd, locationObj: null, pageObj: null, type: record['deviceType'] });
-    } else if (deviceType.value.startsWith('gasDay')) {
-      actions.setGlobalState({ locationName: record.strInstallPos, locationObj: null, pageObj: null, type: record['deviceType'] });
-    } else if (deviceType.value == 'gasDayReport') {
-      actions.setGlobalState({ locationName: record.jcdd, locationObj: null, pageObj: null, type: record['deviceType'] });
-    } else if (deviceType.value.startsWith('substation')) {
-      actions.setGlobalState({ locationId: record.id, locationObj: null, pageObj: null, type: record['deviceType'] });
+async function processReadData(data: any[]) {
+  const promises = data
+    .filter((item) => item.readData)
+    .map(async (item) => {
+      item.readData && Object.assign(item, item.readData);
+    });
+  await Promise.all(promises);
+}
+//设备分站详情跳转
+function stationDetail() {
+  const newPage = router.resolve({ path: '/safety/list/detail/home' });
+  window.open(newPage.href, '_blank');
+}
+
+function goLocation(record) {
+  // debugger;
+  if (record['deviceType'] == 'person_bd' || record['deviceType'] == 'car_bd') {
+    actions.setGlobalState({ locationId: record.devNum, locationObj: null, pageObj: null, type: record['deviceType'].split('_')[0] });
+  } else if (deviceType.value == 'bundleSpyDayReport' || deviceType.value == 'dustDayReport' || deviceType.value == 'bundleDayReport') {
+    actions.setGlobalState({ locationName: record.jcdd, locationObj: null, pageObj: null, type: record['deviceType'] });
+  } else if (deviceType.value.startsWith('gasDay')) {
+    actions.setGlobalState({ locationName: record.strInstallPos, locationObj: null, pageObj: null, type: record['deviceType'] });
+  } else if (deviceType.value == 'gasDayReport') {
+    actions.setGlobalState({ locationName: record.jcdd, locationObj: null, pageObj: null, type: record['deviceType'] });
+  } else if (deviceType.value.startsWith('substation')) {
+    actions.setGlobalState({ locationId: record.id, locationObj: null, pageObj: null, type: record['deviceType'] });
+  } else {
+    if (deviceType.value.startsWith('location')) {
+      actions.setGlobalState({ locationId: record.deviceID, locationObj: null, pageObj: null, type: 'person' });
+    } else if (deviceType.value.startsWith('vehicle')) {
+      actions.setGlobalState({ locationId: record.deviceID, locationObj: null, pageObj: null, type: 'car' });
     } else {
-      if (deviceType.value.startsWith('location')) {
-        actions.setGlobalState({ locationId: record.deviceID, locationObj: null, pageObj: null, type: 'person' });
-      } else if (deviceType.value.startsWith('vehicle')) {
-        actions.setGlobalState({ locationId: record.deviceID, locationObj: null, pageObj: null, type: 'car' });
-      } else {
-        actions.setGlobalState({ locationId: record.deviceID, locationObj: null, pageObj: null });
-      }
+      actions.setGlobalState({ locationId: record.deviceID, locationObj: null, pageObj: null });
     }
   }
-  function getSearch(param) {
-    (gasSearch.address = param.address), (gasSearch.userName = param.userName), (gasSearch.insType = param.insType), (gasSearch.class = param.class);
-  }
-  // 详情跳转
-  function goDetail(record?) {
-    if (record) {
-      activeID.value = record.deviceID;
-      if (deviceType.value.startsWith('fiber')) {
-        currentModal.value = FiberModal;
-        modalVisible.value = true;
-      } else if (deviceType.value.startsWith('dusting')) {
-        currentModal.value = DustModal;
-        modalVisible.value = true;
-      } else if (deviceType.value.startsWith('bundletube')) {
-        currentModal.value = BundleModal;
-        modalVisible.value = true;
-      } else if (deviceType.value.startsWith('firemon_normal')) {
-        // currentModal.value = BundleModal;
-        currentModal.value = WisdomBallModal;
-        modalVisible.value = true;
-      } else if (deviceType.value.startsWith('ballvalve')) {
-        currentModal.value = BallvalveModal;
-        modalVisible.value = true;
-      } else if (deviceType.value.startsWith('atomizing')) {
-        currentModal.value = AtomizingModal;
-        modalVisible.value = true;
-      } else if (deviceType.value.startsWith('gaspatrol')) {
-        currentModal.value = GaspatrolModal;
-        modalVisible.value = true;
-      } else if (deviceType.value.startsWith('door')) {
-        const newPage = router.resolve({ path: '/monitorChannel/monitor-firedoor', query: { id: activeID.value, deviceType: deviceType.value } });
-        window.open(newPage.href, '_blank');
-      } else if (deviceType.value.indexOf('gate') != -1) {
-        const newPage = router.resolve({ path: '/monitorChannel/monitor-gate', query: { id: activeID.value, deviceType: deviceType.value } });
-        window.open(newPage.href, '_blank');
-      } else if (deviceType.value.indexOf('window') != -1) {
-        const newPage = router.resolve({ path: '/monitorChannel/monitor-window', query: { id: activeID.value, deviceType: deviceType.value } });
-        window.open(newPage.href, '_blank');
-      } else if (deviceType.value.indexOf('windrect') != -1) {
-        const newPage = router.resolve({ path: '/monitorChannel/monitor-windrect', query: { id: activeID.value, deviceType: deviceType.value } });
-        window.open(newPage.href, '_blank');
-      } else if (deviceType.value.indexOf('fanmain') != -1) {
-        const newPage = router.resolve({ path: '/monitorChannel/monitor-fanmain', query: { id: activeID.value, deviceType: deviceType.value } });
-        window.open(newPage.href, '_blank');
-      } else if (deviceType.value.indexOf('fanlocal') != -1 && glob.sysOrgCode !== 'ymdnymdn') {
-        const newPage = router.resolve({ path: '/monitorChannel/monitor-fanlocal', query: { id: activeID.value, deviceType: deviceType.value } });
-        window.open(newPage.href, '_blank');
-      } else if (deviceType.value.indexOf('fanlocal') != -1 && glob.sysOrgCode == 'ymdnymdn') {
-        const newPage = router.resolve({ path: '/monitorChannel/monitor-fanlocal1', query: { id: activeID.value, deviceType: record.deviceType } });
-        window.open(newPage.href, '_blank');
-      } else if (deviceType.value.indexOf('pulping') != -1) {
-        // const newPage = router.resolve({ path: '/grout-home', query: { id: activeID.value } });
-        const newPage = router.resolve({ path: '/grout-home' });
-        window.open(newPage.href, '_blank');
-      } else if (deviceType.value.indexOf('pressurefan') != -1) {
-        const newPage = router.resolve({ path: '/nitrogen/home', query: { id: activeID.value } });
-        window.open(newPage.href, '_blank');
-      } else if (deviceType.value.indexOf('chamber') != -1) {
-        const newPage = router.resolve({ path: '/chamber-home', query: { id: activeID.value } });
-        window.open(newPage.href, '_blank');
-      } else if (deviceType.value.indexOf('safetymonitor') != -1) {
-        const newPage = router.resolve({ path: '/monitorChannel/device-monitor/safetymonitor', query: { id: activeID.value } });
-        window.open(newPage.href, '_blank');
-      } else if (deviceType.value.indexOf('pump') != -1) {
-        const newPage = router.resolve({ path: '/monitorChannel/gasPump-home', query: { id: activeID.value } });
-        window.open(newPage.href, '_blank');
-      } else if (systemType.value.indexOf('nitrogen') != -1) {
-        const newPage = router.resolve({ path: '/nitrogen-home', query: { id: systemID.value } });
-        window.open(newPage.href, '_blank');
-      } else if (deviceType.value.indexOf('forcFan') != -1) {
-        const newPage = router.resolve({ path: '/forcFan/home', query: { id: activeID.value } });
-        window.open(newPage.href, '_blank');
-      } else if (deviceType.value.indexOf('pulping') != -1) {
-        // const newPage = router.resolve({ path: '/grout-home', query: { id: activeID.value } });
-        const newPage = router.resolve({ path: '/grout-home' });
-        window.open(newPage.href, '_blank');
-      } else if (deviceType.value.indexOf('gasmonitor') != -1) {
-        const newPage = router.resolve({ path: '/gas/warn/home' });
-        window.open(newPage.href, '_blank');
-      } else {
-        message.info('待开发。。。');
-      }
+}
+function getSearch(param) {
+  (gasSearch.address = param.address), (gasSearch.userName = param.userName), (gasSearch.insType = param.insType), (gasSearch.class = param.class);
+}
+// 详情跳转
+function goDetail(record?) {
+  if (record) {
+    activeID.value = record.deviceID;
+    if (deviceType.value.startsWith('fiber')) {
+      currentModal.value = FiberModal;
+      modalVisible.value = true;
+    } else if (deviceType.value.startsWith('dusting')) {
+      currentModal.value = DustModal;
+      modalVisible.value = true;
+    } else if (deviceType.value.startsWith('bundletube')) {
+      currentModal.value = BundleModal;
+      modalVisible.value = true;
+    } else if (deviceType.value.startsWith('firemon_normal')) {
+      // currentModal.value = BundleModal;
+      currentModal.value = WisdomBallModal;
+      modalVisible.value = true;
+    } else if (deviceType.value.startsWith('ballvalve')) {
+      currentModal.value = BallvalveModal;
+      modalVisible.value = true;
+    } else if (deviceType.value.startsWith('atomizing')) {
+      currentModal.value = AtomizingModal;
+      modalVisible.value = true;
+    } else if (deviceType.value.startsWith('gaspatrol')) {
+      currentModal.value = GaspatrolModal;
+      modalVisible.value = true;
+    } else if (deviceType.value.startsWith('door')) {
+      const newPage = router.resolve({ path: '/monitorChannel/monitor-firedoor', query: { id: activeID.value, deviceType: deviceType.value } });
+      window.open(newPage.href, '_blank');
+    } else if (deviceType.value.indexOf('gate') != -1) {
+      const newPage = router.resolve({ path: '/monitorChannel/monitor-gate', query: { id: activeID.value, deviceType: deviceType.value } });
+      window.open(newPage.href, '_blank');
+    } else if (deviceType.value.indexOf('window') != -1) {
+      const newPage = router.resolve({ path: '/monitorChannel/monitor-window', query: { id: activeID.value, deviceType: deviceType.value } });
+      window.open(newPage.href, '_blank');
+    } else if (deviceType.value.indexOf('windrect') != -1) {
+      const newPage = router.resolve({ path: '/monitorChannel/monitor-windrect', query: { id: activeID.value, deviceType: deviceType.value } });
+      window.open(newPage.href, '_blank');
+    } else if (deviceType.value.indexOf('fanmain') != -1) {
+      const newPage = router.resolve({ path: '/monitorChannel/monitor-fanmain', query: { id: activeID.value, deviceType: deviceType.value } });
+      window.open(newPage.href, '_blank');
+    } else if (deviceType.value.indexOf('fanlocal') != -1 && glob.sysOrgCode !== 'ymdnymdn') {
+      const newPage = router.resolve({ path: '/monitorChannel/monitor-fanlocal', query: { id: activeID.value, deviceType: deviceType.value } });
+      window.open(newPage.href, '_blank');
+    } else if (deviceType.value.indexOf('fanlocal') != -1 && glob.sysOrgCode == 'ymdnymdn') {
+      const newPage = router.resolve({ path: '/monitorChannel/monitor-fanlocal1', query: { id: activeID.value, deviceType: record.deviceType } });
+      window.open(newPage.href, '_blank');
+    } else if (deviceType.value.indexOf('pulping') != -1) {
+      // const newPage = router.resolve({ path: '/grout-home', query: { id: activeID.value } });
+      const newPage = router.resolve({ path: '/grout-home' });
+      window.open(newPage.href, '_blank');
+    } else if (deviceType.value.indexOf('pressurefan') != -1) {
+      const newPage = router.resolve({ path: '/nitrogen/home', query: { id: activeID.value } });
+      window.open(newPage.href, '_blank');
+    } else if (deviceType.value.indexOf('chamber') != -1) {
+      const newPage = router.resolve({ path: '/chamber-home', query: { id: activeID.value } });
+      window.open(newPage.href, '_blank');
+    } else if (deviceType.value.indexOf('safetymonitor') != -1) {
+      const newPage = router.resolve({ path: '/monitorChannel/device-monitor/safetymonitor', query: { id: activeID.value } });
+      window.open(newPage.href, '_blank');
+    } else if (deviceType.value.indexOf('pump') != -1) {
+      const newPage = router.resolve({ path: '/monitorChannel/gasPump-home', query: { id: activeID.value } });
+      window.open(newPage.href, '_blank');
+    } else if (systemType.value.indexOf('nitrogen') != -1) {
+      const newPage = router.resolve({ path: '/nitrogen-home', query: { id: systemID.value } });
+      window.open(newPage.href, '_blank');
+    } else if (deviceType.value.indexOf('forcFan') != -1) {
+      const newPage = router.resolve({ path: '/forcFan/home', query: { id: activeID.value } });
+      window.open(newPage.href, '_blank');
+    } else if (deviceType.value.indexOf('pulping') != -1) {
+      // const newPage = router.resolve({ path: '/grout-home', query: { id: activeID.value } });
+      const newPage = router.resolve({ path: '/grout-home' });
+      window.open(newPage.href, '_blank');
+    } else if (deviceType.value.indexOf('gasmonitor') != -1) {
+      const newPage = router.resolve({ path: '/gas/warn/home' });
+      window.open(newPage.href, '_blank');
     } else {
-      if (systemType.value.indexOf('sys_dongshi') != -1) {
-        const newPage = router.resolve({ path: '/chamber-home', query: { id: systemID.value } });
-        window.open(newPage.href, '_blank');
-      } else if (systemType.value.indexOf('sys_obfurage') != -1) {
-        const newPage = router.resolve({ path: '/monitorChannel/obfurage-home', query: { id: systemID.value } });
-        window.open(newPage.href, '_blank');
-      } else if (systemType.value.indexOf('sys_surface_caimei') != -1) {
-        const newPage = router.resolve({ path: '/monitorChannel/wokerFace-home', query: { id: systemID.value } });
-        window.open(newPage.href, '_blank');
-      } else if (systemType.value.indexOf('sys_surface_juejin') != -1) {
-        const newPage = router.resolve({ path: '/monitorChannel/tunFace-home', query: { id: systemID.value } });
-        window.open(newPage.href, '_blank');
-      } else if (systemType.value.indexOf('sys_maintunnel_leather') != -1) {
-        const newPage = router.resolve({ path: '/monitorChannel/beltTun-home', query: { id: systemID.value } });
-        window.open(newPage.href, '_blank');
-      } else if (systemType.value.indexOf('sys_surface_junya') != -1) {
-        const newPage = router.resolve({ path: '/monitorChannel/balancePress-home', query: { id: systemID.value } });
-        window.open(newPage.href, '_blank');
-      } else if (systemType.value.indexOf('sys_nitrogen') != -1) {
-        const newPage = router.resolve({ path: '/nitrogen-home', query: { id: systemID.value } });
-        window.open(newPage.href, '_blank');
-      } else if (deviceType.value.indexOf('forcFan') != -1) {
-        const newPage = router.resolve({ path: '/forcFan/home', query: { id: activeID.value } });
-        window.open(newPage.href, '_blank');
-      } else if (deviceType.value.indexOf('pulping') != -1) {
-        // const newPage = router.resolve({ path: '/grout-home', query: { id: systemID.value } });
-        const newPage = router.resolve({ path: '/grout-home' });
-        window.open(newPage.href, '_blank');
-      } else if (deviceType.value.indexOf('gasDay_normal') != -1) {
-        const newPage = router.resolve({ path: '/gas/gas-report-inspect/home' });
-        window.open(newPage.href, '_blank');
-      } else if (deviceType.value.indexOf('gasDayReport') != -1) {
-        const newPage = router.resolve({ path: '/gas/gasDayReport/home' });
-        window.open(newPage.href, '_blank');
-      } else if (deviceType.value.indexOf('dustDayReport') != -1) {
-        const newPage = router.resolve({ path: '/dustDayReport/home' });
-        window.open(newPage.href, '_blank');
-      } else if (deviceType.value.indexOf('bundleDayReport') != -1) {
-        const newPage = router.resolve({ path: '/bundleDayReport/home' });
-        window.open(newPage.href, '_blank');
-      } else if (deviceType.value.indexOf('bundleSpyDayReport') != -1) {
-        const newPage = router.resolve({ path: '/bundleSpyDayReport/home' });
-        window.open(newPage.href, '_blank');
-      } else {
-        message.info('待开发。。。');
-      }
+      message.info('待开发。。。');
+    }
+  } else {
+    if (systemType.value.indexOf('sys_dongshi') != -1) {
+      const newPage = router.resolve({ path: '/chamber-home', query: { id: systemID.value } });
+      window.open(newPage.href, '_blank');
+    } else if (systemType.value.indexOf('sys_obfurage') != -1) {
+      const newPage = router.resolve({ path: '/monitorChannel/obfurage-home', query: { id: systemID.value } });
+      window.open(newPage.href, '_blank');
+    } else if (systemType.value.indexOf('sys_surface_caimei') != -1) {
+      const newPage = router.resolve({ path: '/monitorChannel/wokerFace-home', query: { id: systemID.value } });
+      window.open(newPage.href, '_blank');
+    } else if (systemType.value.indexOf('sys_surface_juejin') != -1) {
+      const newPage = router.resolve({ path: '/monitorChannel/tunFace-home', query: { id: systemID.value } });
+      window.open(newPage.href, '_blank');
+    } else if (systemType.value.indexOf('sys_maintunnel_leather') != -1) {
+      const newPage = router.resolve({ path: '/monitorChannel/beltTun-home', query: { id: systemID.value } });
+      window.open(newPage.href, '_blank');
+    } else if (systemType.value.indexOf('sys_surface_junya') != -1) {
+      const newPage = router.resolve({ path: '/monitorChannel/balancePress-home', query: { id: systemID.value } });
+      window.open(newPage.href, '_blank');
+    } else if (systemType.value.indexOf('sys_nitrogen') != -1) {
+      const newPage = router.resolve({ path: '/nitrogen-home', query: { id: systemID.value } });
+      window.open(newPage.href, '_blank');
+    } else if (deviceType.value.indexOf('forcFan') != -1) {
+      const newPage = router.resolve({ path: '/forcFan/home', query: { id: activeID.value } });
+      window.open(newPage.href, '_blank');
+    } else if (deviceType.value.indexOf('pulping') != -1) {
+      // const newPage = router.resolve({ path: '/grout-home', query: { id: systemID.value } });
+      const newPage = router.resolve({ path: '/grout-home' });
+      window.open(newPage.href, '_blank');
+    } else if (deviceType.value.indexOf('gasDay_normal') != -1) {
+      const newPage = router.resolve({ path: '/gas/gas-report-inspect/home' });
+      window.open(newPage.href, '_blank');
+    } else if (deviceType.value.indexOf('gasDayReport') != -1) {
+      const newPage = router.resolve({ path: '/gas/gasDayReport/home' });
+      window.open(newPage.href, '_blank');
+    } else if (deviceType.value.indexOf('dustDayReport') != -1) {
+      const newPage = router.resolve({ path: '/dustDayReport/home' });
+      window.open(newPage.href, '_blank');
+    } else if (deviceType.value.indexOf('bundleDayReport') != -1) {
+      const newPage = router.resolve({ path: '/bundleDayReport/home' });
+      window.open(newPage.href, '_blank');
+    } else if (deviceType.value.indexOf('bundleSpyDayReport') != -1) {
+      const newPage = router.resolve({ path: '/bundleSpyDayReport/home' });
+      window.open(newPage.href, '_blank');
+    } else {
+      message.info('待开发。。。');
     }
   }
-  function exportXls() {
-    handleExportXls('瓦斯巡检记录', getExportUrl, { devicetype: deviceType.value });
-  }
-
-  function toHome() {
-    deviceList.value = [];
-    if (timer) clearTimeout(timer);
-    timer = undefined;
-    deviceType.value = '';
-    go(glob.homePath);
-  }
+}
+function exportXls() {
+  handleExportXls('瓦斯巡检记录', getExportUrl, { devicetype: deviceType.value });
+}
+
+function toHome() {
+  deviceList.value = [];
+  if (timer) clearTimeout(timer);
+  timer = undefined;
+  deviceType.value = '';
+  go(glob.homePath);
+}
+
+function toHide() {
+  tableShow.value = !tableShow.value;
+  document.getElementById('monitorBox').addEventListener('animationend', () => {
+    if (!tableShow.value) {
+      document.getElementById('monitorBox').style.height = '0px';
+    } else {
+      document.getElementById('monitorBox').style.height = '290';
+    }
+  });
+}
 
-  function toHide() {
-    tableShow.value = !tableShow.value;
-    document.getElementById('monitorBox').addEventListener('animationend', () => {
-      if (!tableShow.value) {
-        document.getElementById('monitorBox').style.height = '0px';
-      } else {
-        document.getElementById('monitorBox').style.height = '290';
+async function findTreeDataValue(obj) {
+  const findDeviceType = (data: any[], obj, flag = true) => {
+    return data.find((item: any) => {
+      if (item.children.length > 0) {
+        findDeviceType(item.children, obj);
       }
-    });
-  }
-
-  async function findTreeDataValue(obj) {
-    const findDeviceType = (data: any[], obj, flag = true) => {
-      return data.find((item: any) => {
-        if (item.children.length > 0) {
-          findDeviceType(item.children, obj);
-        }
+      // debugger;
+      if (obj.deviceType && obj.deviceType.startsWith('sys_')) {
         // debugger;
-        if (obj.deviceType && obj.deviceType.startsWith('sys_')) {
-          // debugger;
-          if (item.type == obj.deviceid) {
-            deviceType.value = 'sys';
-            systemID.value = obj.deviceid;
+        if (item.type == obj.deviceid) {
+          deviceType.value = 'sys';
+          systemID.value = obj.deviceid;
+          selectedKeys.value = [item.key];
+          expandedKeys.value = [item.key];
+          treeNodeTitle.value = item.title;
+        }
+      } else {
+        if (!flag) {
+          if (obj.deviceType && item.type.startsWith(obj.deviceType)) {
+            deviceType.value = item.type;
             selectedKeys.value = [item.key];
             expandedKeys.value = [item.key];
             treeNodeTitle.value = item.title;
+            return true;
           }
+          return false;
         } else {
-          if (!flag) {
-            if (obj.deviceType && item.type.startsWith(obj.deviceType)) {
-              deviceType.value = item.type;
-              selectedKeys.value = [item.key];
-              expandedKeys.value = [item.key];
-              treeNodeTitle.value = item.title;
-              return true;
-            }
-            return false;
-          } else {
-            if (obj.deviceType && item.type == obj.deviceType) {
-              deviceType.value = item.type;
-              selectedKeys.value = [item.key];
-              expandedKeys.value = [item.key];
-              treeNodeTitle.value = item.title;
-              return true;
-            }
-            return false;
+          if (obj.deviceType && item.type == obj.deviceType) {
+            deviceType.value = item.type;
+            selectedKeys.value = [item.key];
+            expandedKeys.value = [item.key];
+            treeNodeTitle.value = item.title;
+            return true;
           }
+          return false;
         }
-        return false;
-      });
-    };
-    const flag = findDeviceType(treeData.value, obj);
-    if (!flag) {
-      findDeviceType(treeData.value, obj, false);
-    }
-    // 无类型时
-    if (!treeNodeTitle.value && treeData.value && treeData.value[0] && treeData.value[0]['children']) {
-      const defaultData = treeData.value[0]['children'][0];
-      if (deviceType.value !== defaultData.type) deviceType.value = defaultData.type;
-      selectedKeys.value = [defaultData.key as string];
-      expandedKeys.value = [defaultData.key as string];
-      treeNodeTitle.value = defaultData.title;
-    }
-
-    if (timer === undefined) {
-      timer = null;
-      await getDataSource();
-      getMonitor(true);
-    }
+      }
+      return false;
+    });
+  };
+  const flag = findDeviceType(treeData.value, obj);
+  if (!flag) {
+    findDeviceType(treeData.value, obj, false);
+  }
+  // 无类型时
+  if (!treeNodeTitle.value && treeData.value && treeData.value[0] && treeData.value[0]['children']) {
+    const defaultData = treeData.value[0]['children'][0];
+    if (deviceType.value !== defaultData.type) deviceType.value = defaultData.type;
+    selectedKeys.value = [defaultData.key as string];
+    expandedKeys.value = [defaultData.key as string];
+    treeNodeTitle.value = defaultData.title;
   }
 
-  function monitorChange(index) {
-    dataSource.value = [];
-    deviceActive.value = deviceList.value[index].deviceType;
-    if (deviceType.value != deviceActive.value) deviceType.value = deviceActive.value;
-    if (activeKey.value == 'monitor' && monitorTable.value) {
-      monitorTable.value.setLoading(true);
-      dataSource.value = deviceList.value[index].datalist;
-    }
-    if (activeKey.value == 'history' && historyTable.value) {
-      historyTable.value.setLoading(true);
-    }
-    if (activeKey.value == 'alarm' && alarmHistoryTable.value) {
-      alarmHistoryTable.value.setLoading(true);
+  if (timer === undefined) {
+    timer = null;
+    await getDataSource();
+    getMonitor(true);
+  }
+}
+
+function monitorChange(index) {
+  dataSource.value = [];
+  deviceActive.value = deviceList.value[index].deviceType;
+  if (deviceType.value != deviceActive.value) deviceType.value = deviceActive.value;
+  if (activeKey.value == 'monitor' && monitorTable.value) {
+    monitorTable.value.setLoading(true);
+    dataSource.value = deviceList.value[index].datalist;
+  }
+  if (activeKey.value == 'history' && historyTable.value) {
+    historyTable.value.setLoading(true);
+  }
+  if (activeKey.value == 'alarm' && alarmHistoryTable.value) {
+    alarmHistoryTable.value.setLoading(true);
+  }
+  if (activeKey.value == '4' && handlerHistoryTable.value) {
+    handlerHistoryTable.value.setLoading(true);
+  }
+}
+/**
+ * 设置巷道设备定位图标的显示与隐藏
+ */
+function setLocation() {
+  let locationStr = '';
+  locationList.value.forEach((item: any) => {
+    if (item.Visible) {
+      locationStr = locationStr ? locationStr + ',' + item.value : item.value;
     }
-    if (activeKey.value == '4' && handlerHistoryTable.value) {
-      handlerHistoryTable.value.setLoading(true);
+  });
+  actions.setGlobalState({ locationId: null, locationObj: null, pageObj: null, locationPlane: locationStr });
+  setTimeout(() => {
+    message.success('设置成功');
+  }, 600);
+}
+watch(
+  () => props.pageData,
+  async (pageObj) => {
+    isRefresh.value = false;
+    if (!treeData.value || treeData.value?.length < 1) {
+      await getDeviceType();
     }
-  }
-  /**
-   * 设置巷道设备定位图标的显示与隐藏
-   */
-  function setLocation() {
-    let locationStr = '';
-    locationList.value.forEach((item: any) => {
-      if (item.Visible) {
-        locationStr = locationStr ? locationStr + ',' + item.value : item.value;
-      }
+    nextTick(() => {
+      isRefresh.value = true;
+      // if (pageObj && pageObj.pageType && pageObj.pageType.startsWith('sys_')) {
+      //   findTreeDataValue({ deviceid: systemID.value });
+      // } else {
+      //   findTreeDataValue({ deviceType: pageObj.pageType });
+      // }
+      findTreeDataValue(pageObj);
     });
-    actions.setGlobalState({ locationId: null, locationObj: null, pageObj: null, locationPlane: locationStr });
-    setTimeout(() => {
-      message.success('设置成功');
-    }, 600);
-  }
-  watch(
-    () => props.pageData,
-    async (pageObj) => {
-      isRefresh.value = false;
-      if (!treeData.value || treeData.value?.length < 1) {
-        await getDeviceType();
-      }
-      nextTick(() => {
-        isRefresh.value = true;
-        // if (pageObj && pageObj.pageType && pageObj.pageType.startsWith('sys_')) {
-        //   findTreeDataValue({ deviceid: systemID.value });
-        // } else {
-        //   findTreeDataValue({ deviceType: pageObj.pageType });
-        // }
-        findTreeDataValue(pageObj);
-      });
-    },
-    { immediate: true }
-  );
-
-  onMounted(async () => {
-    const pageObj = props.pageData;
-    if (!pageObj) return;
-    if (pageObj && pageObj.pageType) {
-      if (pageObj.pageType.startsWith('sys_')) {
-        await getDeviceType(pageObj.pageType);
-        findTreeDataValue({ deviceType: pageObj.pageType, deviceid: pageObj.deviceid });
-      } else {
-        await getDeviceType();
-        findTreeDataValue({ deviceType: pageObj.pageType });
-      }
+  },
+  { immediate: true }
+);
+
+onMounted(async () => {
+  const pageObj = props.pageData;
+  if (!pageObj) return;
+  if (pageObj && pageObj.pageType) {
+    if (pageObj.pageType.startsWith('sys_')) {
+      await getDeviceType(pageObj.pageType);
+      findTreeDataValue({ deviceType: pageObj.pageType, deviceid: pageObj.deviceid });
     } else {
       await getDeviceType();
-      findTreeDataValue({ deviceid: pageObj.deviceid });
-    }
-    // 定位
-    const posShowData = pageObj.locationPlane;
-    if (posShowData) {
-      locationList.value = posShowData;
-    } else {
-      locationList.value = await devPosition({});
+      findTreeDataValue({ deviceType: pageObj.pageType });
     }
+  } else {
+    await getDeviceType();
+    findTreeDataValue({ deviceid: pageObj.deviceid });
+  }
+  // 定位
+  const posShowData = pageObj.locationPlane;
+  if (posShowData) {
+    locationList.value = posShowData;
+  } else {
+    locationList.value = await devPosition({});
+  }
 
-    router.push({ path: route.path, query: { ...route.query, tabtype: activeKey.value } });
-    // safetyOption.value = await safetyDeviceList(null, { devicetype: 'safetymonitor', code: 'dataTypeName' })
-  });
+  router.push({ path: route.path, query: { ...route.query, tabtype: activeKey.value } });
+  // safetyOption.value = await safetyDeviceList(null, { devicetype: 'safetymonitor', code: 'dataTypeName' })
+});
 
-  onUnmounted(() => {
-    if (timer) {
-      clearTimeout(timer);
-    }
-    timer = undefined;
-  });
+onUnmounted(() => {
+  if (timer) {
+    clearTimeout(timer);
+  }
+  timer = undefined;
+});
 </script>
 
 <style lang="less" scoped>
-  @import '/@/design/theme.less';
-  @import '/@/design/vent/modal.less';
-  @ventSpace: zxm;
-
-  @{theme-deepblue} {
-    .scene-box {
-      // --image-modal-top: url('/@/assets/images/themify/deepblue/vent/home/modal-top.png');
-      // --image-tree-icon-bg: url('/@/assets/images/themify/deepblue/vent/home/tree-icon-bg.png');
-      // --image-tree-icon-hover-bg: url('/@/assets/images/themify/deepblue/vent/home/tree-icon-hover-bg.png');
-      // --image-tree-bg: url('/@/assets/images/themify/deepblue/vent/home/tree-bg.png');
-      // --image-tree-expansion-bg: url('/@/assets/images/themify/deepblue/vent/home/tree-expansion-bg.png');
-      // --image-tree-expansion-hover-bg: url('/@/assets/images/themify/deepblue/vent/home/tree-expansion-hover-bg.png');
-      // --image-location-bg: url('/@/assets/images/themify/deepblue/vent/home/location-bg.png');
-      // --image-location-hover-bg: url('/@/assets/images/themify/deepblue/vent/home/location-hover-bg.png');
-      // --image-tree-bg: url('/@/assets/images/themify/deepblue/vent/home/tree-bg.png');
-      // --image-turn-location-top-bg: url('/@/assets/images/themify/deepblue/vent/home/turn-location-top-bg.png');
-      // --image-tree-icon-cover-bg: url('/@/assets/images/themify/deepblue/vent/home/tree-icon-cover-bg.png');
-      // --image-tree-icon-cover-hover-bg: url('/@/assets/images/themify/deepblue/vent/home/tree-icon-cover-hover-bg.png');
-      // --image-tohome: url('/@/assets/images/themify/deepblue/vent/home/tohome.png');
-      // --tree-node-select: #0963c1;
-      // --tree-node-hover: #0f376ccc;
-      // --location-bottom-bg: #21324855;
-      // --location-bottom-border: #aed1ff4d;
-    }
-  }
+@import '/@/design/theme.less';
+@import '/@/design/vent/modal.less';
+@ventSpace: zxm;
 
+@{theme-deepblue} {
   .scene-box {
-    --image-modal-top: url('/@/assets/images/vent/home/modal-top.png');
-    --image-tree-icon-bg: url('/@/assets/images/vent/home/tree-icon-bg.png');
-    --image-tree-icon-hover-bg: url('/@/assets/images/vent/home/tree-icon-hover-bg.png');
-    --image-tree-bg: url('/@/assets/images/vent/home/tree-bg.png');
-    --image-tree-expansion-bg: url('/@/assets/images/vent/home/tree-expansion-bg.png');
-    --image-tree-expansion-hover-bg: url('/@/assets/images/vent/home/tree-expansion-hover-bg.png');
-    --image-location-bg: url('/@/assets/images/vent/home/location-bg.png');
-    --image-location-hover-bg: url('/@/assets/images/vent/home/location-hover-bg.png');
-    --image-turn-location-top-bg: url('/@/assets/images/vent/home/turn-location-top-bg.png');
-    --image-tree-icon-cover-bg: url('/@/assets/images/vent/home/tree-icon-cover-bg.png');
-    --image-tree-icon-cover-hover-bg: url('/@/assets/images/vent/home/tree-icon-cover-hover-bg.png');
-    --image-tohome: url('/@/assets/images/vent/home/tohome.png');
-    --tree-node-select: #00b1c8;
-    --tree-node-hover: #00b1c855;
-    --location-bottom-bg: #00709955;
-    --location-bottom-border: #aef3ff4d;
-  }
-
-  .top-header {
-    position: fixed;
-    width: 100%;
-    height: 56px;
-    background: var(--image-modal-top);
-    text-align: center;
-    line-height: 56px;
-    font-size: 28px;
-    color: #ffffffdd;
-    font-weight: 600;
-    z-index: 1;
-    letter-spacing: 2px;
-    font-size: 30px;
-  }
-
-  .select-node {
-    position: fixed;
-    top: 100px;
-    left: 10px;
-    color: var(--vent-font-color);
-    display: flex;
-    justify-content: center;
-    font-size: 22px;
-
-    .title {
-      margin-left: 10px;
-    }
+    // --image-modal-top: url('/@/assets/images/themify/deepblue/vent/home/modal-top.png');
+    // --image-tree-icon-bg: url('/@/assets/images/themify/deepblue/vent/home/tree-icon-bg.png');
+    // --image-tree-icon-hover-bg: url('/@/assets/images/themify/deepblue/vent/home/tree-icon-hover-bg.png');
+    // --image-tree-bg: url('/@/assets/images/themify/deepblue/vent/home/tree-bg.png');
+    // --image-tree-expansion-bg: url('/@/assets/images/themify/deepblue/vent/home/tree-expansion-bg.png');
+    // --image-tree-expansion-hover-bg: url('/@/assets/images/themify/deepblue/vent/home/tree-expansion-hover-bg.png');
+    // --image-location-bg: url('/@/assets/images/themify/deepblue/vent/home/location-bg.png');
+    // --image-location-hover-bg: url('/@/assets/images/themify/deepblue/vent/home/location-hover-bg.png');
+    // --image-tree-bg: url('/@/assets/images/themify/deepblue/vent/home/tree-bg.png');
+    // --image-turn-location-top-bg: url('/@/assets/images/themify/deepblue/vent/home/turn-location-top-bg.png');
+    // --image-tree-icon-cover-bg: url('/@/assets/images/themify/deepblue/vent/home/tree-icon-cover-bg.png');
+    // --image-tree-icon-cover-hover-bg: url('/@/assets/images/themify/deepblue/vent/home/tree-icon-cover-hover-bg.png');
+    // --image-tohome: url('/@/assets/images/themify/deepblue/vent/home/tohome.png');
+    // --tree-node-select: #0963c1;
+    // --tree-node-hover: #0f376ccc;
+    // --location-bottom-bg: #21324855;
+    // --location-bottom-border: #aed1ff4d;
   }
-
-  .expansion-icon {
-    background: var(--image-tree-icon-bg) no-repeat;
-    background-size: contain;
-    position: absolute;
-    left: 190px;
-    top: 25px;
-
-    &:hover {
-      background: var(--image-tree-icon-hover-bg) no-repeat;
-      background-size: contain;
-    }
-  }
-
-  .device-select {
-    width: 250px;
-    height: 500px;
-    background: var(--image-tree-bg) no-repeat;
-    position: fixed;
-    top: 100px;
-    left: 10px;
-    background-size: contain;
-    pointer-events: auto;
-    padding: 20px 10px 30px 10px;
+}
+
+.scene-box {
+  --image-modal-top: url('/@/assets/images/vent/home/modal-top.png');
+  --image-tree-icon-bg: url('/@/assets/images/vent/home/tree-icon-bg.png');
+  --image-tree-icon-hover-bg: url('/@/assets/images/vent/home/tree-icon-hover-bg.png');
+  --image-tree-bg: url('/@/assets/images/vent/home/tree-bg.png');
+  --image-tree-expansion-bg: url('/@/assets/images/vent/home/tree-expansion-bg.png');
+  --image-tree-expansion-hover-bg: url('/@/assets/images/vent/home/tree-expansion-hover-bg.png');
+  --image-location-bg: url('/@/assets/images/vent/home/location-bg.png');
+  --image-location-hover-bg: url('/@/assets/images/vent/home/location-hover-bg.png');
+  --image-turn-location-top-bg: url('/@/assets/images/vent/home/turn-location-top-bg.png');
+  --image-tree-icon-cover-bg: url('/@/assets/images/vent/home/tree-icon-cover-bg.png');
+  --image-tree-icon-cover-hover-bg: url('/@/assets/images/vent/home/tree-icon-cover-hover-bg.png');
+  --image-tohome: url('/@/assets/images/vent/home/tohome.png');
+  --tree-node-select: #00b1c8;
+  --tree-node-hover: #00b1c855;
+  --location-bottom-bg: #00709955;
+  --location-bottom-border: #aef3ff4d;
+}
+
+.top-header {
+  position: fixed;
+  width: 100%;
+  height: 56px;
+  background: var(--image-modal-top);
+  text-align: center;
+  line-height: 56px;
+  font-size: 28px;
+  color: #ffffffdd;
+  font-weight: 600;
+  z-index: 1;
+  letter-spacing: 2px;
+  font-size: 30px;
+}
+
+.select-node {
+  position: fixed;
+  top: 100px;
+  left: 10px;
+  color: var(--vent-font-color);
+  display: flex;
+  justify-content: center;
+  font-size: 22px;
+
+  .title {
+    margin-left: 10px;
   }
+}
 
-  .inspect-info-xj {
-    position: fixed;
-    top: 100px;
-    left: 250px;
-    width: 320px;
-    height: 272px;
-    padding: 20px;
-    background: url('@/assets/images/inspect-bg.png') no-repeat center;
-    background-size: 100% 100%;
-    box-sizing: border-box;
-  }
+.expansion-icon {
+  background: var(--image-tree-icon-bg) no-repeat;
+  background-size: contain;
+  position: absolute;
+  left: 190px;
+  top: 25px;
 
-  .is-expansion-icon {
-    padding: 5px;
-    pointer-events: auto;
-    z-index: 999;
+  &:hover {
+    background: var(--image-tree-icon-hover-bg) no-repeat;
+    background-size: contain;
   }
-
-  .device-select-show {
-    left: 10px;
-    animation-name: treeShow;
-    /* 持续时间 */
-    animation-duration: 1s;
-    transition: all 1s cubic-bezier(0.165, 0.84, 0.44, 1) 0.5s;
+}
+
+.device-select {
+  width: 250px;
+  height: 500px;
+  background: var(--image-tree-bg) no-repeat;
+  position: fixed;
+  top: 100px;
+  left: 10px;
+  background-size: contain;
+  pointer-events: auto;
+  padding: 20px 10px 30px 10px;
+}
+
+.inspect-info-xj {
+  position: fixed;
+  top: 100px;
+  left: 250px;
+  width: 320px;
+  height: 272px;
+  padding: 20px;
+  background: url('@/assets/images/inspect-bg.png') no-repeat center;
+  background-size: 100% 100%;
+  box-sizing: border-box;
+}
+
+.is-expansion-icon {
+  padding: 5px;
+  pointer-events: auto;
+  z-index: 999;
+}
+
+.device-select-show {
+  left: 10px;
+  animation-name: treeShow;
+  /* 持续时间 */
+  animation-duration: 1s;
+  transition: all 1s cubic-bezier(0.165, 0.84, 0.44, 1) 0.5s;
+}
+
+.device-select-hide {
+  left: -250px;
+  animation-name: treeHide;
+  /* 持续时间 */
+  animation-duration: 1s;
+  transition: all 1s cubic-bezier(0.165, 0.84, 0.44, 1) 0.5s;
+}
+
+.node-select-show {
+  width: 276px;
+  height: 44px;
+  background: var(--image-tree-expansion-bg) no-repeat;
+  left: 10px;
+  animation-name: treeShow;
+  /* 持续时间 */
+  animation-duration: 1s;
+  transition: all 1s cubic-bezier(0.165, 0.84, 0.44, 1) 0.5s;
+  display: flex;
+  align-items: center;
+  margin-left: 0;
+  justify-content: flex-start;
+  pointer-events: auto;
+
+  &:hover {
+    background: var(--image-tree-expansion-hover-bg) no-repeat;
   }
 
-  .device-select-hide {
-    left: -250px;
-    animation-name: treeHide;
-    /* 持续时间 */
-    animation-duration: 1s;
-    transition: all 1s cubic-bezier(0.165, 0.84, 0.44, 1) 0.5s;
+  .put-away-icon {
+    position: relative;
+    display: inline-block;
+    left: 4px;
   }
+}
+
+.node-select-hide {
+  left: -400px;
+  animation-name: treeHide;
+  /* 持续时间 */
+  animation-duration: 1s;
+  transition: all 1s cubic-bezier(0.165, 0.84, 0.44, 1) 0.5s;
+}
+
+.device-select-box {
+  width: 208px;
+  height: 450px;
+  overflow-y: auto;
+  color: var(--vent-font-color);
+
+  :deep(.zxm-tree) {
+    background: transparent !important;
+    color: var(--vent-font-color) !important;
+
+    .zxm-tree-switcher {
+      background: transparent !important;
+    }
 
-  .node-select-show {
-    width: 276px;
-    height: 44px;
-    background: var(--image-tree-expansion-bg) no-repeat;
-    left: 10px;
-    animation-name: treeShow;
-    /* 持续时间 */
-    animation-duration: 1s;
-    transition: all 1s cubic-bezier(0.165, 0.84, 0.44, 1) 0.5s;
-    display: flex;
-    align-items: center;
-    margin-left: 0;
-    justify-content: flex-start;
-    pointer-events: auto;
+    .zxm-tree-node-content-wrapper.zxm-tree-node-selected {
+      background-color: var(--tree-node-select);
+    }
 
-    &:hover {
-      background: var(--image-tree-expansion-hover-bg) no-repeat;
+    .zxm-tree-node-content-wrapper:hover {
+      background-color: var(--tree-node-hover);
     }
 
-    .put-away-icon {
-      position: relative;
-      display: inline-block;
-      left: 4px;
+    input {
+      height: 0px !important;
     }
   }
 
-  .node-select-hide {
-    left: -400px;
-    animation-name: treeHide;
-    /* 持续时间 */
-    animation-duration: 1s;
-    transition: all 1s cubic-bezier(0.165, 0.84, 0.44, 1) 0.5s;
+  &::-webkit-scrollbar-track {
+    -webkit-box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2);
+    border-radius: 10px;
+    background: #ededed22;
+    height: 100px;
   }
 
-  .device-select-box {
-    width: 208px;
-    height: 450px;
-    overflow-y: auto;
-    color: var(--vent-font-color);
-
-    :deep(.zxm-tree) {
-      background: transparent !important;
-      color: var(--vent-font-color) !important;
-
-      .zxm-tree-switcher {
-        background: transparent !important;
-      }
-
-      .zxm-tree-node-content-wrapper.zxm-tree-node-selected {
-        background-color: var(--tree-node-select);
-      }
+  &::-webkit-scrollbar-thumb {
+    -webkit-box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2);
+    background: #4288a444;
+  }
+}
+
+.location-icon {
+  width: 46px;
+  height: 178px;
+  position: absolute;
+  top: 100px;
+  background: var(--image-location-bg) no-repeat;
+  background-size: contain;
+  writing-mode: vertical-lr;
+  line-height: 46px;
+  color: var(--vent-font-color);
+  padding-top: 10px;
+  pointer-events: auto;
+  cursor: pointer;
+
+  &:hover {
+    background: var(--image-location-hover-bg) no-repeat;
+  }
 
-      .zxm-tree-node-content-wrapper:hover {
-        background-color: var(--tree-node-hover);
-      }
+  .location-text {
+    padding-top: 20px;
+    letter-spacing: 3px;
+    font-size: 16px;
+  }
+}
 
-      input {
-        height: 0px !important;
-      }
-    }
+.location-select {
+  position: fixed;
+  top: 100px;
+  pointer-events: auto;
 
-    &::-webkit-scrollbar-track {
-      -webkit-box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2);
-      border-radius: 10px;
-      background: #ededed22;
-      height: 100px;
-    }
+  .location-select-box {
+    width: 100%;
+    height: 100%;
+    position: relative;
 
-    &::-webkit-scrollbar-thumb {
-      -webkit-box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2);
-      background: #4288a444;
+    &::before {
+      content: '';
+      position: absolute;
+      width: 230px;
+      height: 500px;
+      top: 0;
+      left: 0;
+      background: var(--image-tree-bg) no-repeat;
+      background-size: contain;
+      transform: rotateY(180deg);
+      z-index: -1;
     }
-  }
-
-  .location-icon {
-    width: 46px;
-    height: 178px;
-    position: absolute;
-    top: 100px;
-    background: var(--image-location-bg) no-repeat;
-    background-size: contain;
-    writing-mode: vertical-lr;
-    line-height: 46px;
-    color: var(--vent-font-color);
-    padding-top: 10px;
-    pointer-events: auto;
-    cursor: pointer;
 
-    &:hover {
-      background: var(--image-location-hover-bg) no-repeat;
-    }
+    .location-top-title {
+      color: var(--vent-font-color);
+      position: absolute;
+      width: 225px;
+      height: 68px;
+      background: var(--image-turn-location-top-bg) no-repeat;
+      background-size: contain;
+      top: 5px;
+      left: 5px;
+      display: flex;
+      flex-direction: row;
+      justify-content: space-between;
+      align-items: flex-end;
 
-    .location-text {
-      padding-top: 20px;
-      letter-spacing: 3px;
-      font-size: 16px;
+      .title {
+        font-size: 18px;
+        position: relative;
+        top: -14px;
+        right: 15px;
+      }
     }
-  }
-
-  .location-select {
-    position: fixed;
-    top: 100px;
-    pointer-events: auto;
 
-    .location-select-box {
-      width: 100%;
-      height: 100%;
+    .location-expansion-icon {
+      background: var(--image-tree-icon-cover-bg) no-repeat;
+      background-size: contain;
       position: relative;
+      left: 10px;
+      top: -15px;
+      padding: 5px;
 
-      &::before {
-        content: '';
-        position: absolute;
-        width: 230px;
-        height: 500px;
-        top: 0;
-        left: 0;
-        background: var(--image-tree-bg) no-repeat;
-        background-size: contain;
-        transform: rotateY(180deg);
-        z-index: -1;
-      }
-
-      .location-top-title {
-        color: var(--vent-font-color);
-        position: absolute;
-        width: 225px;
-        height: 68px;
-        background: var(--image-turn-location-top-bg) no-repeat;
+      &:hover {
+        background: var(--image-tree-icon-cover-hover-bg) no-repeat;
         background-size: contain;
-        top: 5px;
-        left: 5px;
-        display: flex;
-        flex-direction: row;
-        justify-content: space-between;
-        align-items: flex-end;
-
-        .title {
-          font-size: 18px;
-          position: relative;
-          top: -14px;
-          right: 15px;
-        }
       }
+    }
+  }
 
-      .location-expansion-icon {
-        background: var(--image-tree-icon-cover-bg) no-repeat;
-        background-size: contain;
-        position: relative;
-        left: 10px;
-        top: -15px;
-        padding: 5px;
+  .location-container {
+    width: 200px;
+    height: 390px;
+    position: absolute;
+    display: flex;
+    flex-direction: column;
+    top: 80px;
+    left: 18px;
+    overflow-y: auto;
 
-        &:hover {
-          background: var(--image-tree-icon-cover-hover-bg) no-repeat;
-          background-size: contain;
-        }
+    .location-item {
+      color: var(--vent-font-color);
+      line-height: 30px;
+      display: flex;
+      justify-content: space-between;
+      // background-image: var(--vent-gas-list-item-bg-img);
+      background-image: linear-gradient(to left, #39f5ff05, #39f5ff10);
+      margin: 3px 0;
+
+      .item-title {
+        width: 80px;
+        text-align: right;
+        color: var(--vent-table-action-link);
       }
     }
 
-    .location-container {
-      width: 200px;
-      height: 390px;
-      position: absolute;
+    .location-bottom-btn {
+      width: 100%;
+      color: var(--vent-font-color);
       display: flex;
-      flex-direction: column;
-      top: 80px;
-      left: 18px;
-      overflow-y: auto;
-
-      .location-item {
-        color: var(--vent-font-color);
-        line-height: 30px;
-        display: flex;
-        justify-content: space-between;
-        // background-image: var(--vent-gas-list-item-bg-img);
-        background-image: linear-gradient(to left, #39f5ff05, #39f5ff10);
-        margin: 3px 0;
-
-        .item-title {
-          width: 80px;
-          text-align: right;
-          color: var(--vent-table-action-link);
-        }
-      }
+      justify-content: flex-end;
+      margin-top: 20px;
 
-      .location-bottom-btn {
+      span {
+        display: inline-block;
         width: 100%;
-        color: var(--vent-font-color);
-        display: flex;
-        justify-content: flex-end;
-        margin-top: 20px;
-
-        span {
-          display: inline-block;
-          width: 100%;
-          background: var(--location-bottom-bg);
-          border-radius: 3px;
-          border: 1px solid var(--location-bottom-border);
-          text-align: center;
-          padding: 2px 0;
-          cursor: pointer;
-
-          &:hover {
-            background: #00557422;
-          }
+        background: var(--location-bottom-bg);
+        border-radius: 3px;
+        border: 1px solid var(--location-bottom-border);
+        text-align: center;
+        padding: 2px 0;
+        cursor: pointer;
+
+        &:hover {
+          background: #00557422;
         }
       }
     }
   }
-
-  .location-select-show {
-    right: 240px;
-    animation-name: locationShow;
-    /* 持续时间 */
-    animation-duration: 1s;
-    transition: all 1s cubic-bezier(0.165, 0.84, 0.44, 1) 0.5s;
-  }
-
-  .location-select-hide {
-    right: -2px;
-    animation-name: locationHide;
-    /* 持续时间 */
-    animation-duration: 1s;
-    transition: all 1s cubic-bezier(0.165, 0.84, 0.44, 1) 0.5s;
-  }
-
-  .location-btn-show {
-    right: -0px;
-    animation-name: locationBtnShow;
-    /* 持续时间 */
-    animation-duration: 1s;
-    transition: all 1s cubic-bezier(0.165, 0.84, 0.44, 1) 0.5s;
-  }
-
-  .location-btn-hide {
-    right: -240px;
-    animation-name: locationBtnHide;
-    /* 持续时间 */
-    animation-duration: 1s;
-    transition: all 1s cubic-bezier(0.165, 0.84, 0.44, 1) 0.5s;
-  }
+}
+
+.location-select-show {
+  right: 240px;
+  animation-name: locationShow;
+  /* 持续时间 */
+  animation-duration: 1s;
+  transition: all 1s cubic-bezier(0.165, 0.84, 0.44, 1) 0.5s;
+}
+
+.location-select-hide {
+  right: -2px;
+  animation-name: locationHide;
+  /* 持续时间 */
+  animation-duration: 1s;
+  transition: all 1s cubic-bezier(0.165, 0.84, 0.44, 1) 0.5s;
+}
+
+.location-btn-show {
+  right: -0px;
+  animation-name: locationBtnShow;
+  /* 持续时间 */
+  animation-duration: 1s;
+  transition: all 1s cubic-bezier(0.165, 0.84, 0.44, 1) 0.5s;
+}
+
+.location-btn-hide {
+  right: -240px;
+  animation-name: locationBtnHide;
+  /* 持续时间 */
+  animation-duration: 1s;
+  transition: all 1s cubic-bezier(0.165, 0.84, 0.44, 1) 0.5s;
+}
+
+.tabs-box {
+  height: 290px;
+}
+
+.bottom-tabs-box {
+  position: relative;
 
   .tabs-box {
-    height: 290px;
+    width: calc(100% - 12px) !important;
+    bottom: 3px !important;
+    background-color: red;
   }
 
-  .bottom-tabs-box {
-    position: relative;
-
-    .tabs-box {
-      width: calc(100% - 12px) !important;
-      bottom: 3px !important;
-      background-color: red;
-    }
-
-    .to-small {
-      position: absolute;
-      top: -65px;
-      right: 36px;
-      display: flex;
-      align-items: center;
-      justify-content: center;
-
-      .to-home {
-        width: 60px;
-        height: 60px;
-        background: var(--image-tohome) no-repeat center;
-        background-size: auto;
-        padding: 8px;
-
-        &:hover {
-          background-color: rgba(79, 104, 134, 0.418);
-        }
-      }
-
-      .table-show-icon {
-        width: 30px;
-        height: 30px;
-        font-size: 30px;
-        color: var(--vent-font-color);
-        margin-left: 10px;
-      }
-    }
-
-    .device-button-group {
-      position: absolute;
-      top: -30px;
-      display: flex;
-      width: 100%;
+  .to-small {
+    position: absolute;
+    top: -65px;
+    right: 36px;
+    display: flex;
+    align-items: center;
+    justify-content: center;
 
-      .device-active {
-        background: linear-gradient(45deg, #04e6fb, #0c5cab);
+    .to-home {
+      width: 60px;
+      height: 60px;
+      background: var(--image-tohome) no-repeat center;
+      background-size: auto;
+      padding: 8px;
 
-        &::before {
-          border-color: #0efcff;
-          box-shadow: 1px 1px 3px 1px #0efcff inset;
-        }
+      &:hover {
+        background-color: rgba(79, 104, 134, 0.418);
       }
     }
 
-    .table-hide-icon {
+    .table-show-icon {
+      width: 30px;
+      height: 30px;
+      font-size: 30px;
       color: var(--vent-font-color);
-      cursor: pointer;
-      position: absolute;
-      right: 20px;
-      top: 10px;
-      z-index: 9999;
+      margin-left: 10px;
     }
+  }
 
-    .enter-detail {
-      color: var(--vent-font-color);
-      cursor: pointer;
-      position: absolute;
-      right: 35px;
-      top: 35px;
-      padding: 5px;
-      border-radius: 5px;
-      margin-left: 8px;
-      margin-right: 8px;
-      width: auto;
-      height: 33px !important;
-      display: flex;
-      align-items: center;
-      justify-content: center;
-      color: var(--vent-font-color);
-      padding: 5px 15px 5px 15px;
-      z-index: 999;
-      cursor: pointer;
+  .device-button-group {
+    position: absolute;
+    top: -30px;
+    display: flex;
+    width: 100%;
 
-      &:hover {
-        background: var(--vent-device-manager-control-btn-hover);
-      }
+    .device-active {
+      background: linear-gradient(45deg, #04e6fb, #0c5cab);
 
       &::before {
-        width: calc(100% - 6px);
-        height: 27px;
-        content: '';
-        position: absolute;
-        top: 3px;
-        right: 0;
-        left: 3px;
-        bottom: 0;
-        z-index: -1;
-        border-radius: inherit;
-        /*important*/
-        background: var(--vent-device-manager-control-btn);
+        border-color: #0efcff;
+        box-shadow: 1px 1px 3px 1px #0efcff inset;
       }
     }
   }
 
-  .table-hide {
-    height: 0px;
-    animation-name: tableHide;
-    /* 持续时间 */
-    animation-duration: 1s;
-    transition: all 1s;
-  }
-
-  .table-show {
-    height: 290px;
-    animation-name: tableShow;
-    /* 持续时间 */
-    animation-duration: 1s;
-    transition: all 1s;
+  .table-hide-icon {
+    color: var(--vent-font-color);
+    cursor: pointer;
+    position: absolute;
+    right: 20px;
+    top: 10px;
+    z-index: 9999;
   }
 
-  .location-form {
+  .enter-detail {
+    color: var(--vent-font-color);
+    cursor: pointer;
+    position: absolute;
+    right: 35px;
+    top: 35px;
+    padding: 5px;
+    border-radius: 5px;
+    margin-left: 8px;
+    margin-right: 8px;
+    width: auto;
+    height: 33px !important;
     display: flex;
-    margin: 8px;
-
-    .location-form-item {
-      width: 400px;
-
-      .location-form-label {
-        width: 100px;
-        display: inline-block;
-        color: var(--vent-font-color);
-      }
+    align-items: center;
+    justify-content: center;
+    color: var(--vent-font-color);
+    padding: 5px 15px 5px 15px;
+    z-index: 999;
+    cursor: pointer;
 
-      input {
-        background: transparent !important;
-        color: var(--vent-font-color);
-        border: 1px solid var(--vent-form-item-border) !important;
-      }
+    &:hover {
+      background: var(--vent-device-manager-control-btn-hover);
     }
 
-    .zxm-select-selector {
-      width: 200px !important;
+    &::before {
+      width: calc(100% - 6px);
+      height: 27px;
+      content: '';
+      position: absolute;
+      top: 3px;
+      right: 0;
+      left: 3px;
+      bottom: 0;
+      z-index: -1;
+      border-radius: inherit;
+      /*important*/
+      background: var(--vent-device-manager-control-btn);
     }
   }
-
-  @keyframes tableShow {
-    0% {
-      height: 0px;
-      opacity: 0;
+}
+
+.table-hide {
+  height: 0px;
+  animation-name: tableHide;
+  /* 持续时间 */
+  animation-duration: 1s;
+  transition: all 1s;
+}
+
+.table-show {
+  height: 290px;
+  animation-name: tableShow;
+  /* 持续时间 */
+  animation-duration: 1s;
+  transition: all 1s;
+}
+
+.location-form {
+  display: flex;
+  margin: 8px;
+
+  .location-form-item {
+    width: 400px;
+
+    .location-form-label {
+      width: 100px;
+      display: inline-block;
+      color: var(--vent-font-color);
     }
 
-    100% {
-      height: 290px;
-      opacity: 1;
+    input {
+      background: transparent !important;
+      color: var(--vent-font-color);
+      border: 1px solid var(--vent-form-item-border) !important;
     }
   }
 
-  @keyframes tableHide {
-    0% {
-      opacity: 1;
-    }
-
-    100% {
-      height: 0px;
-      opacity: 0;
-    }
+  .zxm-select-selector {
+    width: 200px !important;
   }
+}
 
-  @keyframes treeShow {
-    0% {
-      left: -400px;
-      opacity: 0;
-    }
+@keyframes tableShow {
+  0% {
+    height: 0px;
+    opacity: 0;
+  }
 
-    100% {
-      left: 10px;
-      opacity: 1;
-    }
+  100% {
+    height: 290px;
+    opacity: 1;
   }
+}
 
-  @keyframes treeHide {
-    0% {
-      left: 10px;
-      opacity: 1;
-    }
+@keyframes tableHide {
+  0% {
+    opacity: 1;
+  }
 
-    100% {
-      left: -400px;
-      opacity: 0;
-    }
+  100% {
+    height: 0px;
+    opacity: 0;
   }
+}
 
-  @keyframes locationShow {
-    0% {
-      right: 0px;
-      opacity: 0;
-    }
+@keyframes treeShow {
+  0% {
+    left: -400px;
+    opacity: 0;
+  }
 
-    100% {
-      right: 240px;
-      opacity: 1;
-    }
+  100% {
+    left: 10px;
+    opacity: 1;
   }
+}
 
-  @keyframes locationHide {
-    0% {
-      right: 240px;
-      opacity: 1;
-    }
+@keyframes treeHide {
+  0% {
+    left: 10px;
+    opacity: 1;
+  }
 
-    100% {
-      right: 0;
-      opacity: 0;
-    }
+  100% {
+    left: -400px;
+    opacity: 0;
   }
+}
 
-  @keyframes locationBtnShow {
-    0% {
-      right: -240px;
-      opacity: 0;
-    }
+@keyframes locationShow {
+  0% {
+    right: 0px;
+    opacity: 0;
+  }
 
-    100% {
-      right: -2px;
-      opacity: 1;
-    }
+  100% {
+    right: 240px;
+    opacity: 1;
   }
+}
 
-  @keyframes locationBtnHide {
-    0% {
-      right: -2px;
-      opacity: 1;
-    }
+@keyframes locationHide {
+  0% {
+    right: 240px;
+    opacity: 1;
+  }
 
-    100% {
-      right: -240px;
-      opacity: 0;
-    }
+  100% {
+    right: 0;
+    opacity: 0;
   }
+}
 
-  :deep(.@{ventSpace}-picker-datetime-panel) {
-    height: 200px !important;
-    overflow-y: auto !important;
+@keyframes locationBtnShow {
+  0% {
+    right: -240px;
+    opacity: 0;
   }
 
-  :deep(.@{ventSpace}-tabs-tabpane-active) {
-    // overflow: auto;
-    height: 100%;
+  100% {
+    right: -2px;
+    opacity: 1;
   }
+}
 
-  :deep(.zxm-select-dropdown) {
-    left: 0 !important;
-    color: #000000 !important;
+@keyframes locationBtnHide {
+  0% {
+    right: -2px;
+    opacity: 1;
   }
 
-  :deep(.zxm-select-selector) {
-    height: 34px !important;
-    line-height: 34px !important;
+  100% {
+    right: -240px;
+    opacity: 0;
   }
+}
 
-  :deep(.zxm-input) {
-    height: 32px !important;
-    line-height: 32px !important;
+:deep(.@{ventSpace}-picker-datetime-panel) {
+  height: 200px !important;
+  overflow-y: auto !important;
+}
 
-    .zxm-select-selection-item {
-      line-height: 32px !important;
-    }
-  }
+:deep(.@{ventSpace}-tabs-tabpane-active) {
+  // overflow: auto;
+  height: 100%;
+}
 
-  .device-button {
-    height: 26px;
-    display: flex;
-    justify-content: center;
-    align-items: center;
-    color: var(--vent-font-color);
-    position: relative;
-    cursor: pointer;
-    padding: 0 20px;
-    background: linear-gradient(45deg, #04e6fb55, #0c5cab55);
-    clip-path: polygon(10px 0, 0 50%, 10px 100%, 100% 100%, calc(100% - 10px) 50%, 100% 0);
+:deep(.zxm-select-dropdown) {
+  left: 0 !important;
+  color: #000000 !important;
+}
 
-    &:nth-child(1) {
-      left: calc(-6px * 1);
-    }
+:deep(.zxm-select-selector) {
+  height: 34px !important;
+  line-height: 34px !important;
+}
 
-    &:nth-child(2) {
-      left: calc(-6px * 2);
-    }
+:deep(.zxm-input) {
+  height: 32px !important;
+  line-height: 32px !important;
 
-    &:nth-child(3) {
-      left: calc(-6px * 3);
-    }
+  .zxm-select-selection-item {
+    line-height: 32px !important;
+  }
+}
+
+.device-button {
+  height: 26px;
+  display: flex;
+  justify-content: center;
+  align-items: center;
+  color: var(--vent-font-color);
+  position: relative;
+  cursor: pointer;
+  padding: 0 20px;
+  background: linear-gradient(45deg, #04e6fb55, #0c5cab55);
+  clip-path: polygon(10px 0, 0 50%, 10px 100%, 100% 100%, calc(100% - 10px) 50%, 100% 0);
+
+  &:nth-child(1) {
+    left: calc(-6px * 1);
+  }
 
-    &:nth-child(4) {
-      left: calc(-6px * 4);
-    }
+  &:nth-child(2) {
+    left: calc(-6px * 2);
+  }
 
-    &:nth-child(5) {
-      left: calc(-6px * 5);
-    }
+  &:nth-child(3) {
+    left: calc(-6px * 3);
+  }
 
-    &:nth-child(6) {
-      left: calc(-6px * 6);
-    }
+  &:nth-child(4) {
+    left: calc(-6px * 4);
+  }
 
-    &:nth-child(7) {
-      left: calc(-6px * 7);
-    }
+  &:nth-child(5) {
+    left: calc(-6px * 5);
+  }
 
-    &:nth-child(8) {
-      left: calc(-6px * 8);
-    }
+  &:nth-child(6) {
+    left: calc(-6px * 6);
+  }
 
-    &:nth-child(9) {
-      left: calc(-6px * 9);
-    }
+  &:nth-child(7) {
+    left: calc(-6px * 7);
+  }
 
-    &:nth-child(10) {
-      left: calc(-6px * 10);
-    }
+  &:nth-child(8) {
+    left: calc(-6px * 8);
+  }
 
-    &:nth-child(11) {
-      left: calc(-6px * 11);
-    }
+  &:nth-child(9) {
+    left: calc(-6px * 9);
+  }
 
-    &:nth-child(12) {
-      left: calc(-6px * 12);
-    }
+  &:nth-child(10) {
+    left: calc(-6px * 10);
+  }
 
-    &:nth-child(13) {
-      left: calc(-6px * 13);
-    }
+  &:nth-child(11) {
+    left: calc(-6px * 11);
+  }
 
-    &:nth-child(14) {
-      left: calc(-6px * 14);
-    }
+  &:nth-child(12) {
+    left: calc(-6px * 12);
+  }
 
-    &:nth-child(15) {
-      left: calc(-6px * 15);
-    }
+  &:nth-child(13) {
+    left: calc(-6px * 13);
+  }
 
-    &:nth-child(16) {
-      left: calc(-6px * 16);
-    }
+  &:nth-child(14) {
+    left: calc(-6px * 14);
+  }
 
-    &:nth-child(17) {
-      left: calc(-6px * 17);
-    }
+  &:nth-child(15) {
+    left: calc(-6px * 15);
+  }
 
-    &:nth-child(18) {
-      left: calc(-6px * 18);
-    }
+  &:nth-child(16) {
+    left: calc(-6px * 16);
+  }
 
-    &:nth-child(19) {
-      left: calc(-6px * 19);
-    }
+  &:nth-child(17) {
+    left: calc(-6px * 17);
+  }
+
+  &:nth-child(18) {
+    left: calc(-6px * 18);
+  }
 
-    // &:first-child {
-    //   clip-path: polygon(0 0, 10px 50%, 0 100%, 100% 100%, calc(100% - 10px) 50%, 100% 0);
-    // }
+  &:nth-child(19) {
+    left: calc(-6px * 19);
   }
 
-  // :deep(.@{ventSpace}-pagination){
-  //   margin-right: 20px !important;
-  //   margin-top: 5px !important;
-  //   display: flex;
-  //   align-items: center;
+  // &:first-child {
+  //   clip-path: polygon(0 0, 10px 50%, 0 100%, 100% 100%, calc(100% - 10px) 50%, 100% 0);
   // }
+}
+
+// :deep(.@{ventSpace}-pagination){
+//   margin-right: 20px !important;
+//   margin-top: 5px !important;
+//   display: flex;
+//   align-items: center;
+// }
 </style>

+ 2 - 2
src/views/vent/monitorManager/windowMonitor/components/windowSVG.vue

@@ -1633,10 +1633,10 @@
   });
 
   /** 根据SVG的使用场景播放动画 */
-  function animate(data: any, maxarea) {
+  function animate(data: any, maxarea = 90) {
     // 在SVG图片中,找到需要动起来的元素(类似<use xlink:href="#RE_L_0_Layer0_0_FILL"></use>),并填入id即可控制该元素的动画(如有)
     // 当前面积 / 最大面积 = 风窗开度 = 动画进度
-    const progress = _.round(Math.max(parseFloat(data.forntArea) / parseFloat(maxarea), 1), 2);
+    const progress = _.round(parseFloat(data.frontArea) / parseFloat(maxarea), 2);
     if (progress > 0) {
       triggerAnimation(['Chuang1_shanye_0_Layer0_0_FILL'], false, 3000, progress);
     } else {

+ 13 - 8
src/views/vent/monitorManager/windowMonitor/index.vue

@@ -207,7 +207,7 @@
 <script setup lang="ts">
   import { message } from 'ant-design-vue';
   import DeviceEcharts from '../comment/DeviceEcharts.vue';
-  import { onBeforeMount, ref, onMounted, onUnmounted, reactive, toRaw, watch, nextTick, inject, unref } from 'vue';
+  import { onBeforeMount, ref, onMounted, onUnmounted, reactive, toRaw, shallowRef, nextTick, inject, unref } from 'vue';
   import MonitorTable from '../comment/MonitorTable.vue';
   import HistoryTable from '../comment/HistoryTable.vue';
   import AlarmHistoryTable from '../comment/AlarmHistoryTable.vue';
@@ -239,7 +239,7 @@
 
   const modelRef = ref();
   /** 模型对应的组件,根据实际情况分为二维三维 */
-  const modelComponent = getModelComponent(globalConfig.is2DModel, sysOrgCode);
+  const modelComponent = shallowRef(getModelComponent(globalConfig.is2DModel));
 
   const { currentRoute } = useRouter();
 
@@ -377,20 +377,25 @@
 
     const type = selectData.value.windowModal ? selectData.value.windowModal : selectData.value.nwindownum == 1 ? 'ddFc5' : 'sdFc1';
 
-    setModelType(type).then(() => {
-      addMonitorText(selectData.value);
-      playAnimation(selectRow, selectData.value.maxarea, true);
-      loading.value = false;
-    });
+    await setSVGModelType(type);
+    await setModelType(type);
+    addMonitorText(selectData.value);
+    playAnimation(selectRow, selectData.value.maxarea, true);
+    loading.value = false;
     await getCamera(selectRow.deviceID, playerRef.value);
   };
 
   // 判断前后窗的面积是否发生改变,如果改变则开启动画
   const playAnimation = (data, maxarea = 90, isFirst = false) => {
-    modelRef.value?.animate?.(data);
+    modelRef.value?.animate?.(data, maxarea);
     computePlay(data, maxarea, isFirst);
   };
 
+  function setSVGModelType(type) {
+    modelComponent.value = getModelComponent(globalConfig.is2DModel, type);
+    return nextTick();
+  }
+
   // 设置风窗面积
   const setArea = (flag) => {
     modalType.value = flag + '';

+ 41 - 7
src/views/vent/monitorManager/windowMonitor/window.data.ts

@@ -304,17 +304,51 @@ export const chartsColumns = [
   },
 ];
 
-export function getModelComponent(is2DModel: boolean = false, sysOrgCode?: string) {
+const componentsCaches = new Map<string, any>();
+export function getModelComponent(is2DModel: boolean = false, type: string = '') {
   // @ts-ignore
   return defineAsyncComponent(() => {
     if (!is2DModel) return import('./components/entryThree.vue');
-    switch (sysOrgCode) {
-      // case '000000':
-      //   return import('./components/000000.vue');
-      // return import('./components/windowDualSVG.vue');
+
+    // 为了支持SVG组件切换时不闪烁,先行下载并缓存
+    if (!componentsCaches.has('windowSVG')) componentsCaches.set('windowSVG', import('./components/windowSVG.vue'));
+    if (!componentsCaches.has('windowDualSVG')) componentsCaches.set('windowDualSVG', import('./components/windowDualSVG.vue'));
+
+    switch (type) {
+      case 'sdFc1':
+        return componentsCaches.get('windowDualSVG');
+      case 'ddFc5':
+        return componentsCaches.get('windowSVG');
+      case 'ddFc6':
+        return componentsCaches.get('windowSVG');
+      case 'ddFc7':
+        return componentsCaches.get('windowSVG');
+      case 'ddFc8':
+        return componentsCaches.get('windowSVG');
+      case 'ddFc1':
+        return componentsCaches.get('windowSVG');
+      case 'ddFc2':
+        return componentsCaches.get('windowSVG');
+      case 'ddFc4':
+        return componentsCaches.get('windowSVG');
+      case 'sdFc3':
+        return componentsCaches.get('windowDualSVG');
+      case 'sdFc4':
+        return componentsCaches.get('windowDualSVG');
+      case 'sdFc2':
+        return componentsCaches.get('windowDualSVG');
+      case 'sdFc5':
+        return componentsCaches.get('windowDualSVG');
+      case 'threeFc8':
+        // 暂不支持,用单道的先
+        return componentsCaches.get('windowSVG');
+      case 'singleXkWindow':
+        return componentsCaches.get('windowSVG');
+      case 'sdFcZhq':
+        return componentsCaches.get('windowDualSVG');
       default:
-        return import('./components/windowDualSVG.vue');
-      // return import('./components/windowSVG.vue');
+        // return componentsCaches.get('windowSVG');
+        return componentsCaches.get('windowSVG');
     }
   });
 }

+ 17 - 7
src/views/vent/monitorManager/windrectMonitor/components/scanSVG.vue

@@ -1335,7 +1335,7 @@
       transform="matrix( 0.770660400390625, 0, 0, 0.770660400390625, 860.35,522.9) "
       id="Anim_SaoMiaoCeFeng_All"
       data-anim-id="Anim_SaoMiaoCeFeng_All"
-      :class="{ 'animate-scan': isAnimating }"
+      :class="{ 'animate-scan-down': animateDrection === 'down', 'animate-scan-up': animateDrection === 'up' }"
     >
       <g transform="matrix( 1, 0, 0, 1, -139.2,5.95) " class="animate-blink">
         <g transform="matrix( 1, 0, 0, 1, 0,0) ">
@@ -1454,7 +1454,8 @@
 <script setup lang="ts">
   import { onMounted, defineExpose, ref } from 'vue';
   import { useSvgAnimation } from '/@/hooks/vent/useSvgAnimation';
-  const isAnimating = ref(false);
+  const isAnimating = ref(false); // 动画是否在进行中
+  const animateDrection = ref<'' | 'down' | 'up'>(''); // 动画方向
   // 动画持续时间(秒)
   const ANIMATION_DURATION = 3;
   // 元素信息(常量数据,使用Map)
@@ -1487,12 +1488,13 @@
   // const scanSvg = ref<SVGSVGElement | null>(null);
 
   /** 根据SVG的使用场景播放动画 */
-  function animate() {
+  function animate(data?: any) {
     // 在SVG图片中,找到需要动起来的元素(类似<use xlink:href="#RE_L_0_Layer0_0_FILL"></use>),并填入id即可控制该元素的动画(如有)
     // triggerAnimation(['anim_saomiaocefeng_all'], false);
     if (isAnimating.value) return; // 防止未挂载或重复触发
 
     isAnimating.value = true;
+    animateDrection.value = data;
     // 设置定时器,在动画结束后重置状态
     setTimeout(() => {
       isAnimating.value = false;
@@ -1533,11 +1535,16 @@
     }
   }
 
-  @keyframes scan {
+  @keyframes scanDown {
     0% {
       transform: matrix(0.770660400390625, 0, 0, 0.770660400390625, 860.35, 522.9);
     }
-    50% {
+    100% {
+      transform: matrix(0.770660400390625, 0, 0, 0.770660400390625, 860.35, 662.9);
+    }
+  }
+  @keyframes scanUp {
+    0% {
       transform: matrix(0.770660400390625, 0, 0, 0.770660400390625, 860.35, 662.9);
     }
     100% {
@@ -1547,7 +1554,10 @@
   .animate-blink {
     animation: blink 3s infinite linear;
   }
-  .animate-scan {
-    animation: scan 3s infinite forwards;
+  .animate-scan-down {
+    animation: scanDown 10s forwards;
+  }
+  .animate-scan-up {
+    animation: scanUp 2s forwards;
   }
 </style>

+ 8 - 3
src/views/vent/monitorManager/windrectMonitor/index.vue

@@ -183,7 +183,7 @@
   const { currentRoute } = useRouter();
   const modelRef = ref();
   /** 模型对应的组件,根据实际情况分为二维三维 */
-  const modelComponent = getModelComponent(true, sysOrgCode);
+  let modelComponent = getModelComponent(true, sysOrgCode);
 
   const MonitorDataTable = ref();
   const scroll = reactive({
@@ -614,16 +614,16 @@
     }
 
     if (selectData.deviceType == 'windrect_ds') {
-      // 添加svg动画
-      modelRef.value?.animate?.();
       if (selectData['apparatusRun'] == 1 && selectData['sign'] == 2) {
         if (!deviceRunState) {
           deviceRunState = 'start';
           play('down');
+          modelRef.value?.animate?.('down');
         }
       } else if (selectData['apparatusRun'] == 0 && selectData['sign'] == 0 && deviceRunState == 'start') {
         deviceRunState = '';
         play('up');
+        modelRef.value?.animate?.('up');
       }
     }
   }
@@ -719,6 +719,11 @@
       }
 
       // const type = selectRowIndex.value >= 1 ? 'lmWindRect' : selectRowIndex.value <= 3 ? 'zdWindRect' : 'dsWindRect';
+      /**
+       * 模型对应的组件,根据实际情况分为二维三维
+       * 这里传入类型type而不是sysOrgCode进行判断展示哪个装置
+       * */
+      modelComponent = getModelComponent(true, type);
       await setModelType(type);
       loading.value = false;
       deviceRunState = '';

+ 4 - 4
src/views/vent/monitorManager/windrectMonitor/windrect.data.ts

@@ -433,11 +433,11 @@ export function getModelComponent(is2DModel: boolean = false, sysOrgCode?: strin
   return defineAsyncComponent(() => {
     if (!is2DModel) return import('./components/entryThree.vue');
     switch (sysOrgCode) {
-      // case '000000':
-      // return import('./components/scanSVG.vue');
-      default:
-        // return import('./components/fixedSVG.vue');
+      // 这里配置测风装置类型,也可通过sysOrgCode来进行判断
+      case 'dsWindRect_move':
         return import('./components/scanSVG.vue');
+      default:
+        return import('./components/fixedSVG.vue');
     }
   });
 }