Просмотр исходного кода

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

lxh 6 дней назад
Родитель
Сommit
9262c83562

BIN
src/assets/images/home-container/configurable/list_bg_r_icon1.png


BIN
src/assets/images/home-container/configurable/list_bg_r_icon2.png


BIN
src/assets/images/home-container/configurable/tashanhome/partition-bg-a.png


BIN
src/assets/images/home-container/configurable/tashanhome/partition-icon-1.png


BIN
src/assets/images/home-container/configurable/tashanhome/partition-icon-2.png


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

@@ -47,6 +47,13 @@ export const levelColumns: BasicColumn[] = [
     editComponent: 'Input',
   },
   {
+    title: '报警类型',
+    width: 180,
+    editRow: true,
+    dataIndex: 'alarmType',
+    editComponent: 'Input',
+  },
+  {
     title: '是否语音播报',
     width: 110,
     editRow: true,

+ 16 - 2
src/views/vent/deviceManager/configurationTable/types.ts

@@ -90,10 +90,12 @@ export interface ModuleData {
         | 'tabs'
         | 'blast_delta'
         | 'measure_detail'
-          | 'select_cs'
+        | 'select_cs'
         | 'qh_curve'
         | 'ai_chat'
-        | 'device_alarm';
+        | 'device_alarm'
+        | 'partition'
+        | 'selector_dual_chart';
       /** 分区大小 */
       basis: string;
       overflow?: boolean;
@@ -109,6 +111,7 @@ export interface ModuleData {
   tabs?: ModuleDataTabs[];
   preset?: ModuleDataPreset[];
   complex_list?: ModuleDataComplexList[];
+  partition?: ModuleDataPartition[];
   /** 如果目前没有数据可以对接,可使用模拟数据先行展示 */
   mock?: any;
   /** 如果模块需要跳转,可以在这里配置,部分类型的模块(保德)不支持 formatter 格式 */
@@ -331,3 +334,14 @@ export interface ModuleDataTabs extends ReadFrom {
     >;
   }[];
 }
+
+export interface ModuleDataPartition extends ReadFrom {
+  /** 展示分隔条的背景类型 */
+  type: 'A';
+  /** 展示分隔条布局,决定是 label 部分在前方或是 icon 在前方 */
+  layout: 'icon-pre' | 'label-pre';
+  /** 展示牌说明内容,formatter 格式 */
+  label: string;
+  /** 展示牌值内容,formatter 格式 */
+  icon: string;
+}

+ 28 - 5
src/views/vent/home/configurable/components/ModuleCommonDual.vue

@@ -3,8 +3,9 @@
     <template #title>
       <div class="dual-title">
         <div class="title-left">
-          <div :class="{ deactived: index === 1, 'cursor-pointer': !!moduleDataA.to }" @click="index = 0">{{ moduleNameA }}</div>
-          <div :class="{ deactived: index === 0, 'cursor-pointer': !!moduleDataB.to }" @click="index = 1">{{ moduleNameB }}</div>
+          <div :class="{ deactived: index === 0, 'cursor-pointer': !!moduleDataA.to }" @click="index = 0">{{ moduleNameA }}</div>
+          <div :class="{ deactived: index === 1, 'cursor-pointer': !!moduleDataB.to }" @click="index = 1">{{ moduleNameB }}</div>
+          <div :class="{ deactived: index === 2, 'cursor-pointer': !!moduleDataC.to }" @click="index = 2">{{ moduleNameC }}</div>
         </div>
         <div class="title-center">{{ commonTitle }}</div>
       </div>
@@ -25,6 +26,13 @@
           :data="data"
           @select="selectedDataB = $event"
         />
+        <Header
+          v-if="index === 2"
+          :deviceType="deviceTypeC"
+          :moduleData="moduleDataC"
+          :data="data"
+          @select="selectedDataC = $event"
+        />
         <Content
           v-if="index === 0"
           :style="{ height: moduleDataA.header?.show ? 'calc(100% - 30px)' : '100%' }"
@@ -37,6 +45,12 @@
           :moduleData="moduleDataB"
           :data="selectedDataB"
         />
+        <Content
+          v-if="index === 2"
+          :style="{ height: moduleDataC.header?.show ? 'calc(100% - 30px)' : '100%' }"
+          :moduleData="moduleDataC"
+          :data="selectedDataC"
+        />
       </slot>
     </template>
   </ventBox1>
@@ -57,6 +71,9 @@ const props = defineProps<{
   moduleDataB: any;
   moduleNameB: string;
   deviceTypeB: string;
+  moduleDataC: any;
+  moduleNameC: string;
+  deviceTypeC: string;
   showStyle: any;
   visible: boolean;
   data: any;
@@ -68,6 +85,7 @@ const index = ref(0);
 
 const selectedDataA = ref();
 const selectedDataB = ref();
+const selectedDataC = ref();
 
 const style = computed(() => {
   const size = props.showStyle.size;
@@ -96,6 +114,11 @@ function redirectToB() {
   if (!to) return;
   openWindow(getFormattedText(selectedDataB.value, to));
 }
+function redirectToC() {
+  const { to } = props.moduleDataC;
+  if (!to) return;
+  openWindow(getFormattedText(selectedDataC.value, to));
+}
 </script>
 
 <style lang="less" scoped>
@@ -135,13 +158,13 @@ function redirectToB() {
       height: 100%;
       cursor: pointer;
       padding: 0 12px;
-      background: linear-gradient(to top, #2bafc6 0%, rgba(44, 255, 221, 0.1) 50%,rgba(44, 255, 221, 0) 90%);
+      color: #8087a1;
     }
   }
 
   .deactived {
-    background: none !important;
-    color: #8087a1;
+    color: #fff !important;
+    background: linear-gradient(to top, #2bafc6 0%, rgba(44, 255, 221, 0.1) 50%,rgba(44, 255, 221, 0) 90%);
   }
 }
 // @{theme-deepblue} {

+ 29 - 2
src/views/vent/home/configurable/components/content.vue

@@ -97,6 +97,16 @@
           <MeasureDetail class="content__module" :show-title="false" :composite-data="config.data"
             :topconfig="config.config.topconfig" :btnconfig="config.config.btnconfig" />
         </template>
+        <template v-if="config.name === 'partition'">
+          <Partition class="content__module" :type="config.type" :label="config.label" :icon="config.icon" />
+        </template>
+        <template v-if="config.name === 'selector_dual_chart'">
+          <SelectorDualChart
+            :data="config.data"
+            :moduleData="props.moduleData"
+            :config="config"
+          />
+        </template>
         <!-- <template v-if="config.key === 'fire_control'">
         <FIreControl class="content__module" />
       </template>
@@ -137,6 +147,8 @@ import AIChat from '/@/components/AIChat/MiniChat.vue';
 import DeviceAlarm from './preset/DeviceAlarm.vue';
 import SelectCs from './preset/SelectCs.vue';
 import MiniBoardNew from './detail/MiniBoard-New.vue';
+import Partition from './detail/partition.vue';
+import SelectorDualChart from './preset/selectorDualChart.vue';
 // import FIreWarn from './preset/FIreWarn.vue';
 // import FIreControl from './preset/FIreControl.vue';
 
@@ -185,9 +197,10 @@ const layoutConfig = computed(() => {
   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) => {
-    console.log(item.name,'name---')
+    // console.log(item.name,'name---')
     switch (item.name) {
       case 'board': {
         const cfg = board.shift();
@@ -357,6 +370,19 @@ const layoutConfig = computed(() => {
         });
         break;
       }
+      case 'partition': {
+        const cfg = partition.shift();
+        if (!cfg) break;
+        const data = getData(refData, cfg.readFrom, cfg.parser);
+        // console.log(data, 'partition data-----------------------------------------------------------')
+        arr.push({
+          overflow: true,
+          ...item,
+          data,
+          ...cfg,
+        });
+        break;
+      }
       default: {
         const cfg = preset.shift();
         if (!cfg) break;
@@ -370,7 +396,7 @@ const layoutConfig = computed(() => {
         break;
       }
     }
-    console.log(arr,'arr---')
+    // console.log(arr,'arr---')
     return arr;
   }, []);
 });
@@ -384,6 +410,7 @@ const layoutConfig = computed(() => {
   // z-index: -2;
   display: flex;
   flex-direction: column;
+  overflow-y: auto;
 }
 
 .content__background {

+ 52 - 10
src/views/vent/home/configurable/components/detail/CustomList.vue

@@ -70,11 +70,13 @@ withDefaults(
   --image-list_bg_c: url(/@/assets/images/home-container/configurable/list_bg_c.png);
   --image-list_bg_defflip: url(/@/assets/images/home-container/configurable/list_bg_defflip.png);
   --image-list_bg_d: url(/@/assets/images/home-container/configurable/list_bg_d.png);
-    --image-list_bg_s: url(/@/assets/images/home-container/configurable/list_bg_s.png);
+  --image-list_bg_s: url(/@/assets/images/home-container/configurable/list_bg_s.png);
   --image-list_bg_e: url(/@/assets/images/home-container/configurable/list_bg_e.png);
   --image-list: url(/@/assets/images/home-container/configurable/firehome/list.png);
   --image-list_bg_h: url(/@/assets/images/home-container/configurable/list_bg_h.png);
-    --image-list_bg_r: url(/@/assets/images/home-container/configurable/list_bg_r.png);
+  --image-list_bg_r: url(/@/assets/images/home-container/configurable/list_bg_r.png);
+  --image-list_bg_r_icon1: url(/@/assets/images/home-container/configurable/list_bg_r_icon1.png);
+  --image-list_bg_r_icon2: url(/@/assets/images/home-container/configurable/list_bg_r_icon2.png);
   --image-list_bg_i: url('/@/assets/images/home-container/configurable/list_bg_i.png');
   --image-list_bg_j: url('/@/assets/images/home-container/configurable/list_bg_j.png');
   --image-linear-gradient-3: linear-gradient(to right, #39deff15, #3977e500);
@@ -181,15 +183,32 @@ withDefaults(
 .list-item__value_D {
   font-weight: bold;
 }
+
+.list_S {
+  background: none;
+}
+.list__wrapper_S {
+  display: grid;
+  grid-template-columns: repeat(2, 1fr); /* 2列均等 */
+  gap: 10px;
+}
 .list-item_S {
-  flex-basis: 25%;
-  height: 60px;
+  height: 45px;
   background-repeat: no-repeat;
   background-position: center;
-  background-size: auto 100%;
+  background-size: 100% 100%;
   background-image: var(--image-list_bg_s);
   text-align: center;
-  margin-bottom: 10px;
+  padding: 0 7px;
+}
+.list-item__content_S {
+  display: flex;
+}
+.list-item__value_S {
+  font-family: 'douyuFont';
+  font-size: 13px;
+  color: @vent-gas-primary-text;
+  padding-top: 3px;
 }
 .list_E {
   background-image: var(--image-list_bg_defflip);
@@ -309,16 +328,39 @@ withDefaults(
   flex-basis: 33.3%;
 }
 
+.list-item__icon_R {
+  width: 24px;
+  height: 25px;
+  background-image: var(--image-list_bg_r_icon1);
+  background-repeat: no-repeat;
+  background-position: center;
+  background-size: contain;
+  margin-bottom: 5px;
+  position: absolute;
+  left: 35px;
+}
+.list-item_R:last-of-type .list-item__icon_R{
+  background-image: var(--image-list_bg_r_icon2);
+}
 .list-item__content_R {
-  height: 50px;
+  height: 52px;
   background-repeat: no-repeat;
-  padding: 20px 50px 0 50px;
+  padding:0 30px;
   display: flex;
   background-position: bottom;
-  background-size: 100% auto;
+  background-size: 100% 100%;
   background-image: var(--image-list_bg_r);
-  margin-bottom: 10px;
   text-align: center;
+  align-items: center;
+  .list-item__label {
+    font-size: 15px;
+  }
+  .list-item__value_R {
+    font-family: 'douyuFont';
+    font-size: 15px;
+    padding-top: 5px;
+    color: #00bfff;
+  }
 }
 .list-item__content_R > div {
   flex-basis: 33.3%;

+ 40 - 5
src/views/vent/home/configurable/components/detail/MiniBoard.vue

@@ -241,6 +241,20 @@ defineEmits(['click']);
   height: 90px;
   background-image: var(--image-areaR);
   background-size: 100% 100%;
+  position: relative;
+  .mini-board__value_R {
+    position: absolute;
+    left: 30%;
+    top: 30%;
+    font-family: 'douyuFont';
+    color: @vent-gas-primary-text;
+  }
+  .mini-board__label_R {
+    position: absolute;
+    right: 0;
+    bottom: 20px;
+    font-size: 15px;
+  }
 }
 .mini-board_S {
   width: 131px;
@@ -252,10 +266,20 @@ defineEmits(['click']);
 }
 .mini-board_T {
   width: 120px;
-  height: 60px;
+  height: 80px;
   background-image: var(--image-areaT);
   background-size: 100% 100%;
 }
+.mini-board__label_T {
+  margin-top: 15px;
+}
+.mini-board__value_T {
+  font-family: 'douyuFont';
+  color: @vent-gas-primary-text;
+  font-size: 12px;
+  height: 30px;
+  line-height: 30px;
+}
 
 .mini-board_C {
   width: 121px;
@@ -356,11 +380,12 @@ defineEmits(['click']);
 
 .mini-board_N {
   width: 200px;
-  height: 59px;
+  height: 68px;
   display: flex;
   justify-content: space-between;
   align-items: center;
   padding: 0 25px 0 20px;
+  margin-top: -15px;
   background-image: var(--image-board-bg-nl1);
   background-size: 100% 100%;
 }
@@ -368,16 +393,20 @@ defineEmits(['click']);
   background-image: var(--image-board-bg-nr1);
 }
 .mini-board_N:nth-child(3) {
-  margin-top: -15px;
   background-image: var(--image-board-bg-nl2);
 }
 .mini-board_N:nth-child(4) {
-  margin-top: -15px;
   background-image: var(--image-board-bg-nr2);
 }
+.mini-board_N:nth-child(5) {
+  background-image: var(--image-board-bg-nl1);
+}
+.mini-board_N:nth-child(6) {
+  background-image: var(--image-board-bg-nr1);
+}
 
 .mini-board_O {
-  width: 130px;
+  width: 110px;
   height: 50px;
   background-image: var(--image-board-bg-o);
   background-size: 100% 100%;
@@ -561,6 +590,12 @@ defineEmits(['click']);
   color: #218a89;
 }
 
+.mini-board__value_O {
+  font-family: 'douyuFont';
+  font-size: 11px;
+  color:@vent-gas-primary-text
+}
+
 .mini-board_E:nth-child(1) {
   .mini-board__label_E {
     background-image: var(--image-hycd);

+ 70 - 0
src/views/vent/home/configurable/components/detail/partition.vue

@@ -0,0 +1,70 @@
+<!-- eslint-disable vue/multi-word-component-names -->
+<template>
+  <div class="partition-block" :class="`partition-block_${type}`">
+      <slot name="icon">
+        <div class="partition-block__icon" :class="`partition-block__icon_${type}`" 
+        :style="{ backgroundImage: iconUrl ? `url(${icon})`: '' }">
+        </div>
+      </slot>
+      <slot name="label">
+        <div class="partition-block__label" :class="`partition-block__label_${type}`">
+          {{ label }}
+        </div>
+      </slot>
+  </div>
+</template>
+<script lang="ts" setup>
+import { computed, defineEmits, defineProps, withDefaults } from 'vue';
+const props = withDefaults(
+  defineProps<{
+    // 分隔条类型,类型为:'A' | 'B' 
+    type?: string;
+    // 分隔条内容
+    label: string;
+    // 分隔条图标
+    icon: string;
+  }>(),
+  {
+    type: 'A',
+    label: '分隔条',
+    icon: ''
+  }
+);
+// 处理 icon 路径,兼容静态资源
+const iconUrl = computed(() => {
+  if (!props.icon) return '';
+  if (props.icon.startsWith('/')) {
+    return props.icon;
+  }
+  return '/' + props.icon;
+});
+
+defineEmits(['click']);
+</script>
+<style lang="less" scoped>
+@import '/@/design/theme.less';
+@import '/@/design/theme.less';
+
+.partition-block {
+  --image-partition-bg: url('/@/assets/images/home-container/configurable/tashanhome/partition-bg-a.png');
+  display: flex;
+  background: var(--image-partition-bg);
+  background-size: 100% 100%;
+  position: relative;
+  .partition-block__icon {
+    width: 14px;
+    height: 14px;
+    background-size: 100% 100%;
+    background-repeat: no-repeat;
+    margin:3px 5px;
+  }
+}
+.partition-block_A {
+  height: 30px !important;
+  width: calc(100% - 30px)!important;
+  margin:5px 0 10px 20px;
+}
+
+
+
+</style>

+ 237 - 0
src/views/vent/home/configurable/components/preset/selectorDualChart.vue

@@ -0,0 +1,237 @@
+<!-- eslint-disable vue/multi-word-component-names -->
+<template>
+  <div class="selector-dual-chart">
+    <!-- 双下拉框头部 -->
+    <div class="w-100% flex costume-header">
+      <!-- 第一个下拉框 -->
+      <Dropdown
+        class="flex-grow-1 costume-header_left"
+        :trigger="['click']"
+        :bordered="false"
+        @open-change="visible1 = $event"
+      >
+        <div class="flex-basis-100% flex flex-items-center" @click.prevent>
+          <component :is="getIcon(selectorConfig1.icon)" class="w-30px" />
+          <div class="w-100px flex-grow-1 overflow-hidden whitespace-nowrap text-ellipsis">
+            {{ selectedLabel1 }}
+          </div>
+          <CaretUpOutlined class="w-30px" v-if="visible1" />
+          <CaretDownOutlined class="w-30px" v-else />
+        </div>
+        <template #overlay>
+          <Menu :selected-keys="[selectorConfig1.options]" @click="handleSelect1">
+            <MenuItem v-for="item in selectorConfig1.options" :key="item.value" :title="item.label">
+              {{ item.label }}
+            </MenuItem>
+          </Menu>
+        </template>
+      </Dropdown>
+
+      <!-- 第二个下拉框 -->
+      <Dropdown
+        class="flex-grow-1 costume-header_left"
+        :trigger="['click']"
+        :bordered="false"
+        @open-change="visible2 = $event"
+      >
+        <div class="flex-basis-100% flex flex-items-center" @click.prevent>
+          <component :is="getIcon(selectorConfig2.icon)" class="w-30px" />
+          <div class="w-100px flex-grow-1 overflow-hidden whitespace-nowrap text-ellipsis">
+            {{ selectedLabel2 }}
+          </div>
+          <CaretUpOutlined class="w-30px" v-if="visible2" />
+          <CaretDownOutlined class="w-30px" v-else />
+        </div>
+        <template #overlay>
+          <Menu :selected-keys="[selectorConfig2.options]" @click="handleSelect2">
+            <MenuItem v-for="item in selectorConfig2.options" :key="item.value" :title="item.label">
+              {{ item.label }}
+            </MenuItem>
+          </Menu>
+        </template>
+      </Dropdown>
+    </div>
+
+    <!-- 图表内容区域 -->
+    <div class="chart-container h-calc(100% - 30px)">
+      <CustomChart 
+        class="content__module" 
+        :chart-config="config.chartConfig" 
+        :chart-data="filteredChartData" 
+      />
+    </div>
+  </div>
+</template>
+
+<script lang="ts" setup>
+import { ref, computed, watch, defineAsyncComponent } from 'vue';
+import { MenuItem, Menu, Dropdown } from 'ant-design-vue';
+import { 
+  SwapOutlined, 
+  CaretUpOutlined, 
+  CaretDownOutlined,
+  BarChartOutlined,
+  LineChartOutlined,
+  PieChartOutlined
+} from '@ant-design/icons-vue';
+import { getData, getFormattedText } from '../../hooks/helper';
+
+// 异步导入图表组件,优化加载性能
+const CustomChart = defineAsyncComponent(() => import('../detail/CustomChart.vue'));
+
+// 定义组件属性
+const props = defineProps<{
+  moduleData: any;
+  data: any;
+  config: any;
+}>();
+
+console.log('SelectorDualChart props:', props);
+
+// 状态管理
+const visible1 = ref(false);
+const visible2 = ref(false);
+const selectedValue1 = ref('');
+const selectedValue2 = ref('');
+const selectedLabel1 = ref('请选择');
+const selectedLabel2 = ref('请选择');
+
+// 从配置中获取选择器配置
+const { selectorConfig1, selectorConfig2 } = props.config.config;
+
+// 初始化选项数据
+const options1 = ref<any[]>([]);
+const options2 = ref<any[]>([]);
+
+// 处理图标渲染
+const getIcon = (iconName: string) => {
+  const iconMap: Record<string, any> = {
+    'swap': SwapOutlined,
+    'bar-chart': BarChartOutlined,
+    'line-chart': LineChartOutlined,
+    'pie-chart': PieChartOutlined,
+    // 可以添加更多图标映射
+  };
+  return iconMap[iconName] || SwapOutlined;
+};
+
+// 获取图表配置
+const chartConfig = computed(() => {
+  // 从模块数据中找到图表配置
+  return props.moduleData.chart?.[0] || {};
+});
+
+// 初始化数据
+const initData = (data: any) => {
+  console.log('Initializing data with:', data);
+  // 从数据中获取第一个选择器的选项
+  // const rawOptions1 = getData(data, selectorConfig1.readFrom) || [];
+  options1.value = Array.isArray(selectorConfig1) ? selectorConfig1 : [selectorConfig1];
+  
+  // 从数据中获取第二个选择器的选项
+  // const rawOptions2 = getData(data, selectorConfig2.readFrom) || [];
+  options2.value = Array.isArray(selectorConfig2) ? selectorConfig2 : [selectorConfig2];
+  
+  // 设置默认选中项
+  if (options1.value.length > 0) {
+    selectedValue1.value = options1.value[0].value;
+    selectedLabel1.value = options1.value[0].label;
+  }
+  
+  if (options2.value.length > 0) {
+    selectedValue2.value = options2.value[0].value;
+    selectedLabel2.value = options2.value[0].label;
+  }
+};
+
+// 处理第一个下拉框选择
+const handleSelect1 = (info: { key: string | number }) => {
+  const key = String(info.key);
+  selectedValue1.value = key;
+  const selectedItem = options1.value.find(item => item.value === key);
+  if (selectedItem) {
+    selectedLabel1.value = selectedItem.label;
+  }
+};
+
+// 处理第二个下拉框选择
+const handleSelect2 = (info: { key: string | number }) => {
+  const key = String(info.key);
+  selectedValue2.value = key;
+  const selectedItem = options2.value.find(item => item.value === key);
+  if (selectedItem) {
+    selectedLabel2.value = selectedItem.label;
+  }
+};
+
+// 根据两个选择器的值过滤图表数据
+const filteredChartData = computed(() => {
+  if (!props.data) return [];
+  
+  // 示例:同时满足两个选择器的筛选条件
+  // return props.data.filter((item: any) => {
+  //   return item[selectorConfig1.basis] === selectedValue1.value &&
+  //          item[selectorConfig2.basis] === selectedValue2.value;
+  // });
+});
+
+// 监听数据变化,重新初始化
+watch(
+  () => props.data,
+  (newData) => {
+    initData(newData);
+  },
+  { immediate: true }
+);
+
+// 监听选择变化,更新图表数据
+watch(
+  [() => selectedValue1.value, () => selectedValue2.value],
+  () => {
+    // emit('update:chartData', filteredChartData.value);
+  }
+);
+</script>
+
+<style scoped>
+@import '/@/design/theme.less';
+
+.selector-dual-chart {
+  height: 100%;
+  display: flex;
+  flex-direction: column;
+}
+
+.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;
+}
+
+.chart-container {
+  width: 100%;
+  overflow: hidden;
+}
+
+::v-deep .zxm-select:not(.zxm-select-customize-input) .zxm-select-selector {
+  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>

+ 17 - 0
src/views/vent/home/configurable/configurable.api.ts

@@ -8,6 +8,7 @@ enum Api {
   getDisHome = '/monitor/disaster/getDisHome',
   getBDDustData = '/monitor/disaster/getDisDustHome',
   getBDFireData = '/monitor/disaster/getDisFireHome',
+  getDeviceSys = '/ventanaly-device/monitor/system',
 }
 
 // 搞这个缓存是由于:目前代码上的设计是多个模块发出多次请求,每个模块自己负责消费前者的响应。
@@ -214,6 +215,22 @@ export const getBDFireData = (params) => {
     return res;
   });
 };
+// ceshi
+export const getDeviceSys = (params) => {
+  const key = `${Api.getDeviceSys}?${JSON.stringify(params)}`;
+  if (!cache.has(key)) {
+    cache.set(
+      key,
+      defHttp.post({ url: Api.getDeviceSys, params }).finally(() => {
+        cache.delete(key);
+      })
+    );
+  }
+  return (cache.get(key) as Promise<any>).then((res) => {
+    console.log('getDeviceSys', res);
+    return res;
+  });
+}
 
 export const getDisHome = (params) => {
   const key = `${Api.getDisHome}?${JSON.stringify(params)}`;

+ 898 - 516
src/views/vent/home/configurable/configurable.data.tashan.ts

@@ -2,521 +2,903 @@ import type { Config } from '../../deviceManager/configurationTable/types';
 
 export const testConfigTSFire: Config[] = [
 
-// 1. 采空区基本信息(左上)
-{
-deviceType: 'goafsInfo',
-moduleName: '采空区基本信息',
-pageType: 'ts_fire',
-moduleData: {
-header: {
-show: false,
-readFrom: '',
-selector: { show: false, value: '' },
-slot: { show: false, value: '' },
-},
-background: { show: false, type: 'video', link: '' },
-layout: {
-direction: 'row',
-items: [{ name: 'board', basis: '100%' }],
-},
-list: [],
-board: [
-{
-type: 'L',
-readFrom: '',
-layout: 'label-top',
-items: [
-{
-label: '所属煤层',
-value: '6煤',
-},
-{
-label: '煤层厚度',
-value: '2.62m',
-},
-{
-label: '煤层角度',
-value: '0°~10°',
-},
-{
-label: '最短发火期',
-value: '33天',
-},
-{
-label: '工作面长度',
-value: '303.69m',
-},
-{
-label: '采空区管理',
-value: '全部垮落',
-},
-],
-},
-],
-chart: [],
-gallery: [],
-gallery_list: [],
-table: [],
-complex_list: [],
-preset: [],
-},
-showStyle: {
-size: 'width:440px;height:250px;',
-version: '原版',
-position: 'top:70px;left:10px;',
-headerPosition: 'centerBottom',
-},
-},
-// 2. 矿用自动喷洒系统(左中)
-{
-deviceType: 'autoSpraySystem',
-moduleName: '矿用自动喷洒系统',
-pageType: 'ts_fire',
-moduleData: {
-header: {
-show: false,
-readFrom: '',
-selector: {
-show: false,
-value: '',
-},
-slot: {
-show: false,
-value: '',
-},
-},
-background: {
-show: false,
-type: 'video',
-link: '',
-},
-layout: {
-direction: 'column',
-items: [
-{
-name: 'select_cs',
-basis: '40%',
-},
-{
-name: 'board',
-basis: '60%'
-}
-],
-},
-board: [
-{
-type: 'M',
-readFrom: '',
-layout: 'val-top',
-items: [
-{
-label: '流量传感器#1',
-value: 'xxxxxx',
-},
-{
-label: '流量传感器#2',
-value: 'xxxxxx',
-},
-{
-label: '压力传感器',
-value: 'xxxxxx',
-},
-{
-label: '液位计',
-value: '液位超限',
-}
-],
-},],
-chart: [],
-gallery: [],
-gallery_list: [],
-table: [],
-list: [],
-complex_list: [],
-preset: [
-{
-readFrom: 'select_cs',
-setLabelConfig :{
-selectL:'请选择...',
-switchL:['开启','关闭'],
-switchL1:'进料泵',
-switchL2:'注浆泵'
-}
-},
-],
-mock: {},
-},
-showStyle: {
-size: 'width:440px;height:290px;',
-version: '原版',
-position: 'top:325px;left:10px;',
-},
-},
-// 3. 光纤测温系统(左下)
-{
-deviceType: 'pdArray',
-moduleName: '光纤测温系统',
-pageType: 'ts_fire',
-moduleData: {
-header: {
-show: true,
-readFrom: '',
-selector: {
-show: true,
-value: '${systemname}',
-},
-slot: {
-show: false,
-value: '',
-},
-},
-background: {
-show: false,
-type: 'video',
-link: '',
-},
-layout: {
-direction: 'column',
-items: [
-{
-name: 'chart',
-basis: '100%',
-},
-],
-},
-chart: [
-{
-type: 'line_smooth',
-readFrom: 'arrayFiber',
-legend: { show: false },
-xAxis: [{ show: true }],
-yAxis: [{ show: true, name: '温度(℃)', position: 'left' }],
-series: [
-{
-label: '${strinstallpos}',
-readFrom: 'fibreTemperatureArr',
-xprop: 'pos',
-yprop: 'value',
-},
-],
-},
-],
-gallery: [],
-gallery_list: [],
-table: [],
-list: [],
-complex_list: [],
-preset: [],
-},
-showStyle: {
-size: 'width:440px;height:270px;',
-version: '原版',
-position: 'bottom:8px;left:10px;',
-headerPosition: 'centerBottom',
-},
-},
-// 4. 可采煤层煤自燃特性(右上)
-{
-deviceType: 'coalFireFeature',
-moduleName: '开采煤层自燃发火特性',
-pageType: 'ts_fire',
-moduleData: {
-header: {
-show: false,
-readFrom: '',
-selector: {
-show: false,
-value: '',
-},
-slot: {
-show: false,
-value: '',
-},
-},
-background: {
-show: false,
-type: 'video',
-link: '',
-},
-layout: {
-direction: 'row',
-items: [
-{
-name: 'table',
-basis: '100%',
-},
-],
-},
-board: [],
-chart: [],
-gallery: [],
-gallery_list: [],
-table: [
-{
-type: 'A',
-readFrom: 'mockTable',
-columns: [
-{
-name: '煤层',
-prop: 'a',
-},
-{
-name: '自燃倾向性',
-prop: 'b',
-},
-{
-name: '最短发火期',
-prop: 'c',
-},
-{
-name: '煤层爆炸指数',
-prop: 'd',
-},
-],
-},
-],
-list: [],
-complex_list: [],
-preset: [],
-mock: {
-mockTable: [
-{
-a: '1煤',
-b: '自燃',
-c: '123天',
-d: '0%',
-},
-{
-a: '2煤',
-b: '自燃',
-c: '123天',
-d: '0%',
-},
-{
-a: '3煤',
-b: '自燃',
-c: '123天',
-d: '0%',
-},
-{
-a: '4煤',
-b: '自燃',
-c: '123天',
-d: '0%',
-},
-{
-a: '5煤',
-b: '自燃',
-c: '123天',
-d: '0%',
-},
-{
-a: '6煤',
-b: '自燃',
-c: '123天',
-d: '0%',
-},
-{
-a: '7煤',
-b: '自燃',
-c: '123天',
-d: '0%',
-},
-],
-},
-},
-showStyle: {
-size: 'width:440px;height:200px;',
-version: '原版',
-position: 'top:75px;right:10px;',
-},
-},
-// 5. 注氮系统(右中)
-{
-deviceType: 'NitrogenMonitor',
-moduleName: '注氮系统',
-pageType: 'ts_fire',
-moduleData: {
-header: { show: false, readFrom: '', selector: { show: false, value: '' }, slot: { show: false, value: '' } },
-background: { show: false, type: 'video', link: '' },
-layout: {
-direction: 'column',
-items: [
-{
-name: 'board',
-basis: '40%',
-},
-{
-name: 'board',
-basis: '30%'
-},
-{
-name: 'board',
-basis: '30%'
-},
-{
-name: 'board',
-basis: '30%'
-}],
-},
-table: [],
-board: [
-{
-type: 'N',
-readFrom: '',
-layout: 'label-top',
-items: [
-{
-label: '流量',
-value: '2663',
-},
-{
-label: '管道温度',
-value: '40.1',
-},
-{
-label: '氮气压力',
-value: '0.86',
-},
-{
-label: '氮含量',
-value: '97.3',
-}
-],
-},
-{
-type: 'O',
-readFrom: '',
-layout: 'val-top',
-items: [
-{
-label: '排气压力',
-value: '0.97',
-},
-{
-label: '排气温度',
-value: '84.4',
-},
-{
-label: '油压',
-value: '0.99',
-}
-],
-},
-{
-type: 'O',
-readFrom: '',
-layout: 'val-top',
-items: [
-{
-label: '排气压力',
-value: '0.97',
-},
-{
-label: '排气温度',
-value: '84.4',
-},
-{
-label: '油压',
-value: '0.99',
-}
-],
-},
-{
-type: 'O',
-readFrom: '',
-layout: 'val-top',
-items: [
-{
-label: '排气压力',
-value: '0.97',
-},
-{
-label: '排气温度',
-value: '84.4',
-},
-{
-label: '油压',
-value: '0.99',
-}
-],
-}
-],
-chart: [],
-gallery: [],
-gallery_list: [],
-list: [],
-complex_list: [],
-preset: [],
-mock: {},
-},
-showStyle: {
-size: 'width:440px;height:290px;',
-version: '原版',
-position: 'top:280px;right:10px;',
-},
-},
-// 6. 采空区密闭监测系统(右下)
-{
-deviceType: 'pdArray',
-moduleName: '采空区密闭监测系统',
-pageType: 'ts_fire',
-moduleData: {
-header: {
-show: true,
-readFrom: '',
-selector: {
-show: true,
-value: '${systemname}',
-},
-slot: {
-show: false,
-value: '',
-},
-},
-background: {
-show: false,
-type: 'video',
-link: '',
-},
-layout: {
-direction: 'column',
-items: [
-{
-name: 'chart',
-basis: '100%',
-},
-],
-},
-chart: [
-{
-type: 'line_smooth',
-readFrom: 'arrayFiber',
-legend: { show: false },
-xAxis: [{ show: true }],
-yAxis: [{ show: true, name: '温度(℃)', position: 'left' }],
-series: [
-{
-label: '${strinstallpos}',
-readFrom: 'fibreTemperatureArr',
-xprop: 'pos',
-yprop: 'value',
-},
-],
-},
-],
-gallery: [],
-gallery_list: [],
-table: [],
-list: [],
-complex_list: [],
-preset: [],
-},
-showStyle: {
-size: 'width:440px;height:280px;',
-version: '原版',
-position: 'bottom:8px;right:10px;',
-},
-},
+  // 1. 采空区基本信息(左上)
+  {
+    deviceType: 'goafsInfo',
+    moduleName: '采空区基本信息',
+    pageType: 'ts_fire',
+    moduleData: {
+      header: {
+        show: false,
+        readFrom: '',
+        selector: { show: false, value: '' },
+        slot: { show: false, value: '' },
+      },
+      background: { show: false, type: 'video', link: '' },
+      layout: {
+        direction: 'row',
+        items: [{ name: 'board', basis: '100%' }],
+      },
+      list: [],
+      board: [
+        {
+          type: 'L',
+          readFrom: 'sysInfo',
+          layout: 'label-top',
+          items: [
+            {
+              label: '所属煤层',
+              value: '${coalseam}',
+            },
+            {
+              label: '煤层厚度',
+              value: '${coalSeamThick}',
+            },
+            {
+              label: '煤层角度',
+              value: '${coalSeamAngle}',
+            },
+            {
+              label: '最短发火期',
+              value: '${minFirePeriod}',
+            },
+            {
+              label: '工作面长度',
+              value: '${faceLen}',
+            },
+            {
+              label: '采空区管理',
+              value: '${goafManage}',
+            }
+          ],
+        },
+      ],
+      chart: [],
+      gallery: [],
+      gallery_list: [],
+      table: [],
+      complex_list: [],
+      preset: [],
+    },
+    showStyle: {
+    size: 'width:440px;height:250px;',
+    version: '原版',
+    position: 'top:70px;left:10px;',
+    headerPosition: 'centerBottom',
+    },
+  },
+  // 2. 矿用自动喷洒系统(左中)
+  {
+    deviceType: 'spray_auto',
+    moduleName: '矿用自动喷洒系统',
+    pageType: 'ts_fire',
+    moduleData: {
+      header: {
+        show: false,
+        readFrom: '',
+        selector: {
+          show: false,
+          value: '',
+        },
+        slot: {
+          show: false,
+          value: '',
+        },
+      },
+      background: {
+        show: false,
+        type: 'video',
+        link: '',
+      },
+      layout: {
+        direction: 'column',
+        items: [
+          {
+            name: 'select_cs',
+            basis: '40%',
+          },
+          {
+            name: 'board',
+            basis: '60%'
+          }
+        ],
+      },
+      board: [
+        {
+          type: 'M',
+          readFrom: '',
+          layout: 'val-top',
+          items: [
+            {
+              label: '流量传感器#1',
+              value: '${deviceInfo.spray.warnInfo.alarmNum}',
+            },
+            {
+              label: '流量传感器#2',
+              value: 'xxxxxx',
+            },
+            {
+              label: '压力传感器',
+              value: 'xxxxxx',
+            },
+            {
+              label: '液位计',
+              value: '液位超限',
+            }
+          ],
+        },
+      ],
+      chart: [],
+      gallery: [],
+      gallery_list: [],
+      table: [],
+      list: [],
+      complex_list: [],
+      preset: [
+        {
+          readFrom: 'select_cs',
+          setLabelConfig :{
+            selectL:'请选择...',
+            switchL:['开启','关闭'],
+            switchL1:'进料泵',
+            switchL2:'注浆泵'
+          }
+        },
+      ],
+      mock: {},
+    },
+    showStyle: {
+      size: 'width:440px;height:310px;',
+      version: '原版',
+      position: 'top:325px;left:10px;',
+    },
+  },
+  // 3. 光纤测温系统(左下)
+  {
+    deviceType: 'fiber',
+    moduleName: '光纤测温系统',
+    pageType: 'ts_fire',
+    moduleData: {
+      header: {
+        show: true,
+        readFrom: 'deviceInfo.fiber',
+        selector: {
+          show: true,
+          value: '${strname}',
+        },
+        slot: {
+          show: false,
+          value: '',
+        },
+      },
+      background: {
+        show: false,
+        type: 'video',
+        link: '',
+      },
+      layout: {
+        direction: 'column',
+        items: [
+        {
+        name: 'chart',
+        basis: '100%',
+        },
+        ],
+      },
+      chart: [
+        {
+          type: 'line_smooth',
+          readFrom: 'arrayFiber',
+          legend: { show: false },
+          xAxis: [{ show: true }],
+          yAxis: [{ show: true, name: '温度(℃)', position: 'left' }],
+          series: [
+            {
+              label: '${strinstallpos}',
+              readFrom: 'fibreTemperatureArr',
+              xprop: 'pos',
+              yprop: 'value',
+            },
+          ],
+        },
+      ],
+      gallery: [],
+      gallery_list: [],
+      table: [],
+      list: [],
+      complex_list: [],
+      preset: [],
+    },
+    showStyle: {
+      size: 'width:440px;height:270px;',
+      version: '原版',
+      position: 'bottom:8px;left:10px;',
+      headerPosition: 'centerBottom',
+    },
+  },
+  // 4. 可采煤层煤自燃特性(右上)
+  {
+    deviceType: 'coalFireFeature',
+    moduleName: '开采煤层自燃发火特性',
+    pageType: 'ts_fire',
+    moduleData: {
+      header: {
+        show: false,
+        readFrom: '',
+        selector: {
+          show: false,
+          value: '',
+        },
+        slot: {
+          show: false,
+          value: '',
+        },
+      },
+      background: {
+        show: false,
+        type: 'video',
+        link: '',
+      },
+      layout: {
+        direction: 'row',
+        items: [
+          {
+          name: 'table',
+          basis: '100%',
+          },
+        ],
+      },
+      board: [],
+      chart: [],
+      gallery: [],
+      gallery_list: [],
+      table: [
+        {
+          type: 'A',
+          readFrom: 'sysInfo.coalSpoCha',
+          columns: [
+            {
+              name: '煤层',
+              prop: '${mc}',
+            },
+            {
+              name: '自燃倾向性',
+              prop: '${zrqxx}',
+            },
+            {
+              name: '最短发火期',
+              prop: '${zdfhq}',
+            },
+            {
+              name: '自燃倾向等级',
+              prop: '${zrqxxdj}',
+            }
+          ],
+        },
+      ],
+      list: [],
+      complex_list: [],
+      preset: [],
+      mock: {
+      },
+    },
+    showStyle: {
+      size: 'width:440px;height:200px;',
+      version: '原版',
+      position: 'top:75px;right:10px;',
+    },
+  },
+  // 5. 注氮系统(右中)
+  {
+    deviceType: 'NitrogenMonitor',
+    moduleName: '注氮系统',
+    pageType: 'ts_fire',
+    moduleData: {
+      header: { show: false, readFrom: '', selector: { show: false, value: '' }, slot: { show: false, value: '' } },
+      background: { show: false, type: 'video', link: '' },
+      layout: {
+        direction: 'column',
+        items: [
+          { 
+            name: 'partition', 
+            basis: 'auto' ,
+            overflow: false,
+          },
+          {
+            name: 'board',
+            basis: 'auto',
+            overflow: false,
+          },
+          { 
+            name: 'partition', 
+            basis: 'auto' ,
+            overflow: false,
+          },
+          { 
+            name: 'board', 
+            basis: 'auto' ,
+            overflow: false,
+          },
+          { 
+            name: 'partition', 
+            basis: 'auto' ,
+            overflow: false,
+          },
+          { 
+            name: 'board', 
+            basis: 'auto',
+            overflow: false,
+          },
+          { 
+            name: 'partition', 
+            basis: 'auto',
+            overflow: false,
+          },
+          { 
+            name: 'board', 
+            basis: 'auto',
+            overflow: false,
+          }
+        ],
+      },
+      table: [],
+      board: [
+        {
+          type: 'N',
+          readFrom: '',
+          layout: 'label-top',
+            items: [
+            {
+              label: '流量',
+              value: '${cumulativeFlow}',
+            },
+            {
+              label: '管道温度',
+              value: '${heaterTemperature}',
+            },
+            {
+              label: '氮气压力',
+              value: '${nitrogen}',
+            },
+            {
+              label: '氮含量',
+              value: '${nitrogenContent}',
+            }
+          ],
+        },
+        {
+          type: 'O',
+          readFrom: '',
+          layout: 'val-top',
+          items: [
+            {
+              label: '排气压力',
+              value: '0.97',
+            },
+            {
+              label: '排气温度',
+              value: '84.4',
+            },
+            {
+              label: '油压',
+              value: '0.99',
+            }
+          ],
+        },
+        {
+          type: 'O',
+          readFrom: '',
+          layout: 'val-top',
+          items: [
+            {
+              label: '排气压力',
+              value: '0.97',
+            },
+            {
+              label: '排气温度',
+              value: '84.4',
+            },
+            {
+              label: '油压',
+              value: '0.99',
+            }
+          ],
+        },
+        {
+          type: 'O',
+          readFrom: '',
+          layout: 'val-top',
+          items: [
+            {
+              label: '排气压力',
+              value: '0.97',
+            },
+            {
+              label: '排气温度',
+              value: '84.4',
+            },
+            {
+              label: '油压',
+              value: '0.99',
+            }
+          ],
+        }
+      ],
+      chart: [],
+      gallery: [],
+      gallery_list: [],
+      list: [],
+      complex_list: [],
+      preset: [],
+      partition: [
+        {
+          type: 'A',
+          readFrom: '',
+          layout: 'icon-pre',
+          label: '制氮机',
+          icon:'/src/assets/images/home-container/configurable/tashanhome/partition-icon-1.png'
+        },
+        {
+          type: 'A',
+          readFrom: '',
+          layout: 'icon-pre',
+          label: '风压机#1',
+          icon:'/src/assets/images/home-container/configurable/tashanhome/partition-icon-2.png'
+        },
+        {
+          type: 'A',
+          readFrom: '',
+          layout: 'icon-pre',
+          label: '风压机#2',
+          icon:'/src/assets/images/home-container/configurable/tashanhome/partition-icon-2.png'
+        },
+        {
+          type: 'A',
+          readFrom: '',
+          layout: 'icon-pre',
+          label: '风压机#3',
+          icon:'/src/assets/images/home-container/configurable/tashanhome/partition-icon-2.png'
+        },
+      ],
+      mock: {},
+    },
+    showStyle: {
+      size: 'width:440px;height:355px;',
+      version: '原版',
+      position: 'top:280px;right:10px;',
+    },
+  },
+  // 6. 采空区密闭监测系统(右下)
+  {
+    deviceType: 'pdArray',
+    moduleName: '采空区密闭监测系统',
+    pageType: 'ts_fire',
+    moduleData: {
+      header: {
+      show: false,
+      readFrom: '',
+      selector: {
+        show: true,
+        value: '${systemname}',
+      },
+      slot: {
+        show: false,
+        value: '',
+      },
+      },
+      background: {
+        show: false,
+        type: 'video',
+        link: '',
+      },
+      layout: {
+        direction: 'column',
+        items: [
+          {
+            name: 'selector_dual_chart',
+            basis: '100%',
+          },
+        ],
+      },
+      chart: [
+        {
+          type: 'line_smooth',
+          readFrom: 'mockChart',
+          legend: { show: false },
+          xAxis: [{ show: true }],
+          yAxis: [{ show: true, name: '温度(℃)', position: 'left' }],
+          series: [
+            {
+              label: '',
+              readFrom: 'seriesData',
+              xprop: 'pos',
+              yprop: 'value',
+            },
+          ],
+        },
+      ],
+      gallery: [],
+      gallery_list: [],
+      table: [],
+      list: [],
+      complex_list: [],
+      preset: [
+        // {
+        //   readFrom: '',
+        //   selectorConfig1: {
+        //     options:[
+        //       {
+        //         value: 'o2',
+        //         label: '氧气',
+        //       },
+        //       {
+        //         value: 'co',
+        //         label: '一氧化碳',
+        //       }
+        //     ]
 
+        //   },
+        //   selectorConfig2: {
+        //     options:[
+        //       {
+        //         value: '1',
+        //         label: '工作面1',
+        //       },
+        //       {
+        //         value: '1',
+        //         label: '工作面2',
+        //       }
+        //     ],
+        //   }
+        // },
+      ],
+      mock:{
+        // mockChart:[
+        //   {
+        //     deviceType:'o2',
+        //     deviceId:'1',
+        //     seriesData:[
+        //       { pos: '0', value: 10 },
+        //       { pos: '10', value: 12 },
+        //       { pos: '20', value: 11 },
+        //       { pos: '30', value: 13 },
+        //       { pos: '40', value: 14 },
+        //       { pos: '50', value: 16 },
+        //       { pos: '60', value: 15 },
+        //       { pos: '70', value: 17 },
+        //       { pos: '80', value: 18 },
+        //       { pos: '90', value: 19 },
+        //     ]
+        //   },
+        //   {
+        //     deviceType:'co',
+        //     deviceId:'2',
+        //     seriesData:[
+        //       { pos: '0', value: 30 },
+        //       { pos: '10', value: 32 },
+        //       { pos: '20', value: 31 },
+        //       { pos: '30', value: 33 },
+        //       { pos: '40', value: 34 },
+        //       { pos: '50', value: 36 },
+        //       { pos: '60', value: 35 },
+        //       { pos: '70', value: 37 },
+        //       { pos: '80', value: 38 },
+        //       { pos: '90', value: 39 },
+        //     ]
+        //   },
+        //   {
+        //     deviceType:'o2',
+        //     deviceId:'1',
+        //     seriesData:[
+        //       { pos: '0', value: 40 },
+        //       { pos: '10', value: 42 },
+        //       { pos: '20', value: 41 },
+        //       { pos: '30', value: 43 },
+        //       { pos: '40', value: 44 },
+        //       { pos: '50', value: 46 },
+        //       { pos: '60', value: 45 },
+        //       { pos: '70', value: 47 },
+        //       { pos: '80', value: 48 },
+        //       { pos: '90', value: 49 },
+        //     ]
+        //   },
+        //   {
+        //     deviceType:'co',
+        //     deviceId:'2',
+        //     seriesData:[
+        //       { pos: '0', value: 60 },
+        //       { pos: '10', value: 62 },
+        //       { pos: '20', value: 61 },
+        //       { pos: '30', value: 63 },
+        //       { pos: '40', value: 64 },
+        //       { pos: '50', value: 66 },
+        //       { pos: '60', value: 65 },
+        //       { pos: '70', value: 67 },
+        //       { pos: '80', value: 68 },
+        //       { pos: '90', value: 69 },
+        //     ]
+        //   }
+
+        // ]
+      },
+    },
+    showStyle: {
+      size: 'width:440px;height:270px;',
+      version: '原版',
+      position: 'bottom:8px;right:10px;',
+    },
+  },
+  // 7. 进风侧设备监测(中下1)
+  {
+    deviceType: 'RealtimeMonitor',
+    moduleName: '进风侧设备监测',
+    pageType: 'ts_fire',
+    moduleData: {
+      header: {
+        show: false,
+        readFrom: '',
+        selector: {
+          show: false,
+          value: '',
+        },
+        slot: {
+          show: false,
+          value: '',
+        },
+      },
+      background: {
+        show: false,
+        type: 'video',
+        link: '',
+      },
+      layout: {
+        direction: 'row',
+        items: [
+          {
+            name: 'table',
+            basis: '100%',
+          },
+
+        ],
+      },
+      board: [],
+      chart: [],
+      gallery: [],
+      gallery_list: [],
+      table: [
+        {
+          type: 'A',
+          readFrom: 'mockTable',
+          columns: [
+            { name: '序号', prop: 'serialVal' },
+            { name: '监测点', prop: 'MonitorPoint' },
+            { name: '报警等级', prop: 'warnLevel' },
+            { name: '类型', prop: 'warnType' },
+            { name: '值', prop: 'nowVal' },
+          ],
+        },],
+      list: [],
+      complex_list: [],
+      preset: [],
+      mock: {
+        mockTable: [
+          {
+            serialVal: '1',
+            MonitorPoint: '130608工作面采空区1',
+            warnLevel: '低风险',
+            warnType: '乙烷',
+            nowVal: '0ppm',
+          },
+          {
+            serialVal: '2',
+            MonitorPoint: '130608工作面采空区1',
+            warnLevel: '低风险',
+            warnType: '乙烷',
+            nowVal: '0ppm',
+          },
+          {
+            serialVal: '3',
+            MonitorPoint: '130608工作面采空区1',
+            warnLevel: '低风险',
+            warnType: '乙烷',
+            nowVal: '0ppm',
+          },
+          {
+            serialVal: '4',
+            MonitorPoint: '130608工作面采空区1',
+            warnLevel: '低风险',
+            warnType: '乙烷',
+            nowVal: '0ppm',
+          }
+        ],
+      },
+    },
+    showStyle: {
+      size: 'width:980px;height:270px;',
+      version: '原版',
+      position: 'bottom:8px;left:470px',
+    },
+  },
+  // 8. 进风侧设备监测(中下2)
+  {
+    deviceType: 'RealtimeMonitor',
+    moduleName: '进风侧设备监测',
+    pageType: 'ts_fire',
+    moduleData: {
+      header: {
+        show: false,
+        readFrom: '',
+        selector: {
+          show: false,
+          value: '',
+        },
+        slot: {
+          show: false,
+          value: '',
+        },
+      },
+      background: {
+        show: false,
+        type: 'video',
+        link: '',
+      },
+      layout: {
+        direction: 'row',
+        items: [
+          {
+            name: 'table',
+            basis: '100%',
+          },
+
+        ],
+      },
+      board: [],
+      chart: [],
+      gallery: [],
+      gallery_list: [],
+      table: [
+        {
+          type: 'A',
+          readFrom: 'mockTable',
+          columns: [
+            { name: '序号', prop: 'serialVal' },
+            { name: '监测点', prop: 'MonitorPoint' },
+            { name: '报警等级', prop: 'warnLevel' },
+            { name: '类型', prop: 'warnType' },
+            { name: '值', prop: 'nowVal' },
+          ],
+        },],
+      list: [],
+      complex_list: [],
+      preset: [],
+      mock: {
+        mockTable: [
+          {
+            serialVal: '1',
+            MonitorPoint: '130608工作面采空区2',
+            warnLevel: '低风险',
+            warnType: '乙烷',
+            nowVal: '0ppm',
+          },
+          {
+            serialVal: '2',
+            MonitorPoint: '130608工作面采空区2',
+            warnLevel: '低风险',
+            warnType: '乙烷',
+            nowVal: '0ppm',
+          },
+          {
+            serialVal: '3',
+            MonitorPoint: '130608工作面采空区2',
+            warnLevel: '低风险',
+            warnType: '乙烷',
+            nowVal: '0ppm',
+          },
+          {
+            serialVal: '4',
+            MonitorPoint: '130608工作面采空区2',
+            warnLevel: '低风险',
+            warnType: '乙烷',
+            nowVal: '0ppm',
+          }
+        ],
+      },
+    },
+    showStyle: {
+      size: 'width:980px;height:270px;',
+      version: '原版',
+      position: 'bottom:8px;left:470px',
+    },
+  },
+  // 9. 预警记录(中下3)
+  {
+    deviceType: 'RealtimeMonitor',
+    moduleName: '预警记录',
+    pageType: 'ts_fire',
+    moduleData: {
+      header: {
+        show: false,
+        readFrom: '',
+        selector: {
+          show: false,
+          value: '',
+        },
+        slot: {
+          show: false,
+          value: '',
+        },
+      },
+      background: {
+        show: false,
+        type: 'video',
+        link: '',
+      },
+      layout: {
+        direction: 'row',
+        items: [
+          {
+            name: 'table',
+            basis: '100%',
+          },
+
+        ],
+      },
+      board: [],
+      chart: [],
+      gallery: [],
+      gallery_list: [],
+      table: [
+        {
+          type: 'A',
+          readFrom: 'mockTable',
+          columns: [
+            { name: '序号', prop: 'serialVal' },
+            { name: '监测点', prop: 'MonitorPoint' },
+            { name: '报警等级', prop: 'warnLevel' },
+            { name: '类型', prop: 'warnType' },
+            { name: '值', prop: 'nowVal' },
+          ],
+        },],
+      list: [],
+      complex_list: [],
+      preset: [],
+      mock: {
+        mockTable: [
+          {
+            serialVal: '1',
+            MonitorPoint: '130608工作面采空区3',
+            warnLevel: '低风险',
+            warnType: '乙烷',
+            nowVal: '0ppm',
+          },
+          {
+            serialVal: '2',
+            MonitorPoint: '130608工作面采空区3',
+            warnLevel: '低风险',
+            warnType: '乙烷',
+            nowVal: '0ppm',
+          },
+          {
+            serialVal: '3',
+            MonitorPoint: '130608工作面采空区3',
+            warnLevel: '低风险',
+            warnType: '乙烷',
+            nowVal: '0ppm',
+          },
+          {
+            serialVal: '4',
+            MonitorPoint: '130608工作面采空区3',
+            warnLevel: '低风险',
+            warnType: '乙烷',
+            nowVal: '0ppm',
+          }
+        ],
+      },
+    },
+    showStyle: {
+      size: 'width:980px;height:270px;',
+      version: '原版',
+      position: 'bottom:8px;left:470px',
+    },
+  }
 ];

+ 49 - 20
src/views/vent/home/configurable/fireTS.vue

@@ -9,33 +9,33 @@
     <div class="center-info-bar">
       <div class="left-info-content">
         <div class="left-block block1">
-          <div class="info-value"></div>
+          <div class="info-value">{{fireSgWarnInfo.sgCoTbAlarmAddress}}</div>
           <div class="info-label">突变预警</div>
         </div>
         <div class="left-block block2">
-          <div class="info-value">无自燃隐患</div>
+          <div class="info-value">{{fireSgWarnInfo.nyAlarmLevelStr}}</div>
           <div class="info-label">煤自燃氧化阶段</div>
         </div>
         <div class="left-block block3">
-          <div class="info-value">-</div>
+          <div class="info-value">{{fireSgWarnInfo.sgMaxTemp}}</div>
           <div class="info-label">最高温度</div>
         </div>
       </div>
       <div class="center-info-content">
-        <div class="info-value">正常</div>
+        <div class="info-value">{{fireSgWarnInfo.aqfxLevelStr}}</div>
         <div class="info-label">火灾安全等级</div>
       </div>
       <div class="right-info-content">
         <div class="right-block block1">
-          <div class="info-value">0</div>
+          <div class="info-value">{{fireSgWarnInfo.sgZbAlarmNum}}</div>
           <div class="info-label">指标预警</div>
         </div>
         <div class="right-block block2">
-          <div class="info-value"></div>
+          <div class="info-value">{{fireSgWarnInfo.yjjbLevelStr}}</div>
           <div class="info-label">预警等级</div>
         </div>
         <div class="right-block block3">
-          <div class="info-value"></div>
+          <div class="info-value">{{fireSgWarnInfo.sgSwAlarmAddress}}</div>
           <div class="info-label">升温预警</div>
         </div>
       </div>
@@ -59,6 +59,9 @@
       :module-data-b="cfgB.moduleData"
       :module-name-b="cfgB.moduleName"
       :device-type-b="cfgB.deviceType"
+      :module-data-c="cfgC.moduleData"
+      :module-name-c="cfgC.moduleName"
+      :device-type-c="cfgC.deviceType"
       :data="data"
       :visible="true"
       :common-title="commonTitle"
@@ -66,16 +69,15 @@
   </div>
 </template>
 <script lang="ts" setup>
-import { computed, onMounted, onUnmounted } from 'vue';
+import { computed, onMounted, onUnmounted, ref } from 'vue';
 import { useInitConfigs, useInitPage } from './hooks/useInit';
-import ModuleBDDual from './components/ModuleBDDual.vue';
-import { getDisHome } from './configurable.api';
+import { getDisHome,getDeviceSys } from './configurable.api';
 import { testConfigTSFire } from './configurable.data.tashan';
 import ModuleCommon from './components/ModuleCommon.vue';
 import ModuleCommonDual from './components/ModuleCommonDual.vue';
 
 const cfgs = computed(() =>
-  configs.value.filter((_, index) => index !== 6 && index !== 7)
+  configs.value.filter((_, index) => index !== 6 && index !== 7 && index !== 8)
 );
 const cfgA = computed<any>(() =>
   configs.value[6]
@@ -83,30 +85,57 @@ const cfgA = computed<any>(() =>
 const cfgB = computed<any>(() =>
   configs.value[7]
 );
+const cfgC = computed<any>(() =>
+  configs.value[8]
+);
 const { configs, devicesTypes, fetchConfigs } = useInitConfigs();
 const { mainTitle, data, updateData } = useInitPage('回采工作面智能管控');
 let interval: ReturnType<typeof setInterval> | undefined;
 const commonTitle = "实时监测与预警"
+const fireSgWarnInfo = ref ({
+  aqfxLevelStr: "-",
+  nyAlarmLevel: 0,
+  nyAlarmLevelStr: "-",
+  sgCoTbAlarmAddress: "-",
+  sgMaxTemp: '-',
+  sgSwAlarmAddress: "-",
+  sgZbAlarmNum: 0,
+  yjjbLevelStr: "-"
+});
 onMounted(() => {
   fetchConfigs('ts_fire').then(() => {
     configs.value = testConfigTSFire;
-    getDisHome({
-      dataList: devicesTypes.value.concat('fireAllMineWarn').join(','),
-    }).then(updateData);
+    getDeviceSys({
+      devicetype: 'sys',
+      systemID: '1955807282207465474',
+      type: 'all'
+    }).then((res)=>{
+      const processedRes = handleData(res);
+      updateData(processedRes)
+    });;
   });
   interval = setInterval(() => {
-    getDisHome({
-      dataList: devicesTypes.value.concat('fireAllMineWarn').join(','),
-    }).then(updateData);
+    getDeviceSys({
+      devicetype: 'sys',
+      systemID: '1955807282207465474',
+      type: 'all'
+    }).then((res)=>{
+      const processedRes = handleData(res);
+      updateData(processedRes)
+    });
   }, 2000);
 });
 
+const handleData = (res: any) => {
+  const processedData = { ...res };
+  fireSgWarnInfo.value = res?.fireSgWarnInfo || {};;
+  processedData.sysInfo.coalSpoCha = JSON.parse(`${res.sysInfo.coalSpoCha}` || '[]');
+  return processedData;
+};
+
 onUnmounted(() => {
   clearInterval(interval);
 });
-function redirectTo(url) {
-  window.open(url);
-}
 </script>
 <style lang="less" scoped>
 @import '/@/design/theme.less';

+ 30 - 57
src/views/vent/monitorManager/comment/HistoryTableChart.vue

@@ -11,12 +11,17 @@
         @submit.prevent="getDataSource"
       >
         <a-form-item label="查询设备">
-          <a-select v-model:value="historyParams.selectedDeviceId" style="width: 200px">
-            <a-select-option v-for="d in deviceOptions" :key="d.label" :value="d.value">{{ d.label }}</a-select-option>
-          </a-select>
+          <a-select
+            v-model:value="historyParams.selectedDeviceId"
+            :options="deviceOptions"
+            @change="handleDeviceChange"
+            style="width: 200px"
+            show-search
+            option-filter-prop="label"
+          />
         </a-form-item>
         <a-form-item label="间隔时间">
-          <a-select v-model:value="historyParams.interval" style="width: 200px">
+          <a-select v-model:value="historyParams.skip" style="width: 200px">
             <a-select-option v-for="[key, value] in Array.from(intervalMap)" :key="key" :value="key">
               {{ value }}
             </a-select-option>
@@ -84,6 +89,7 @@ import { defHttp } from '/@/utils/http/axios';
 import { Pagination } from 'ant-design-vue';
 import dayjs from 'dayjs';
 import BarAndLine from '/@/components/chart/BarAndLine.vue';
+import { getTableHeaderColumns } from '/@/hooks/web/useWebColumns';
 import { getDictItemsByCode } from '/@/utils/dict';
 import { get } from 'lodash-es';
 
@@ -157,6 +163,7 @@ const historyParams = reactive({
   skip: '8',
   interval: '1小时',
   selectedDeviceId: '',
+  strType: '',
 });
 const emit = defineEmits(['change']);
 
@@ -166,44 +173,7 @@ let deviceOptions = ref([]);
 const deviceTypeStr = ref('');
 const deviceTypeName = ref('');
 const deviceType = ref('');
-const chartsColumns = ref([
-  // {
-  //   legend: '压差',
-  //   seriesName: '(Pa)',
-  //   ymax: 100,
-  //   yname: 'Pa',
-  //   linetype: 'bar',
-  //   yaxispos: 'left',
-  //   color: '#37BCF2',
-  //   sort: 1,
-  //   xRotate: 0,
-  //   dataIndex: 'frontRearDP',
-  // },
-  {
-    legend: '前门推力',
-    seriesName: '',
-    ymax: 100,
-    yname: '前门推力',
-    linetype: 'line',
-    yaxispos: 'left',
-    color: '#37BCF2',
-    sort: 1,
-    xRotate: 0,
-    dataIndex: '1zdqfktl',
-  },
-  {
-    legend: '后门推力',
-    seriesName: '-',
-    ymax: 100,
-    yname: '后门推力',
-    linetype: 'line',
-    yaxispos: 'right',
-    color: '#FC4327',
-    sort: 2,
-    xRotate: 0,
-    dataIndex: '2zdqfktl',
-  },
-]);
+const chartsColumns = ref([]);
 loading.value = true;
 const pagination = {
   current: 1,
@@ -221,7 +191,10 @@ const selectedOption = computed<Record<string, any> | undefined>(() => {
     return e.value === idval;
   });
 });
-
+const handleDeviceChange = (value) => {
+  const selected = deviceOptions.value.find((item) => item.value === value);
+  historyParams.strType = selected?.strtype || '';
+};
 watch(
   () => {
     return props.columnsType;
@@ -300,7 +273,6 @@ function calcShowCurveValue() {
 //   if (props.scroll.y) return { y: props.scroll.y - 100 };
 //   return {};
 // });
-
 watch(
   () => props.deviceId,
   async () => {
@@ -368,7 +340,7 @@ async function getDeviceList() {
     /** 此处使用nextTick是由于可能表单暂未更新,而下面的方法依赖表单项 */
     nextTick(() => {
       showCurve.value = calcShowCurveValue();
-      // initHistoryCurveColumns();
+      initHistoryCurveColumns();
     });
   }
   if (VENT_PARAM.historyIsMultiple) {
@@ -405,14 +377,10 @@ function resetFormParam() {
   formData['ttime_begin'] = historyParams.startTime;
   formData['ttime_end'] = historyParams.endTime;
   formData['column'] = 'createTime';
-  formData['gdeviceids'] = props.deviceId ? props.deviceId : deviceOptions.value[0] ? deviceOptions.value[0]['value'] : '';
-
+  formData['gdeviceids'] = historyParams.selectedDeviceId;
+  formData['skip'] = historyParams.skip;
   if (stationType.value !== 'redis' && deviceOptions.value[0]) {
-    formData['strtype'] = deviceTypeStr.value
-      ? deviceTypeStr.value
-      : deviceOptions.value[0]['strtype']
-      ? deviceOptions.value[0]['strtype']
-      : props.deviceType + '*';
+    formData['strtype'] = historyParams.strType;
     if (props.sysId) {
       formData['sysId'] = props.sysId;
     }
@@ -425,9 +393,9 @@ function resetFormParam() {
       startTime: formData['ttime_begin'],
       endTime: formData['ttime_end'],
       deviceId: formData['gdeviceids'],
-      strtype: props.deviceType + '*',
+      strtype: formData['strtype'],
       sysId: props.sysId,
-      interval: intervalMap.get(formData['skip']) ? intervalMap.get(formData['skip']) : '1h',
+      skip: formData['skip'],
       isEmployee: props.deviceType.startsWith('vehicle') ? false : true,
     };
     return params;
@@ -454,6 +422,11 @@ async function getDataSource() {
   }
 }
 
+function initHistoryCurveColumns() {
+  // if (!props.showHistoryCurve) return;
+  const arr = historyType.value.split('_');
+  chartsColumns.value = getTableHeaderColumns(arr[0] + '_chart');
+}
 watchEffect(() => {
   if (historyTable.value && dataSource) {
     const data = dataSource.value || [];
@@ -481,6 +454,9 @@ onMounted(async () => {
 :deep(.zxm-picker) {
   height: 30px !important;
 }
+::v-deep(.zxm-form-item-label > label) {
+  color: #fff !important;
+}
 .history-table {
   width: 100%;
   :deep(.jeecg-basic-table-form-container) {
@@ -583,9 +559,6 @@ onMounted(async () => {
     color: #000 !important;
   }
 }
-.zxm-form-inline .zxm-form-item > .zxm-form-item-label > label {
-  color: #fff !important;
-}
 .page-info {
   width: 100%;
   height: 100%;

+ 762 - 782
src/views/vent/monitorManager/gateMonitor/index.vue

@@ -340,868 +340,848 @@
 </template>
 
 <script setup lang="ts">
-  import { onBeforeUnmount, onUnmounted, onMounted, ref, reactive, nextTick, inject, unref } from 'vue';
-  import MonitorTable from '../comment/MonitorTable.vue';
-  import HistoryTable from '../comment/HistoryTable.vue';
-  import AlarmHistoryTable from '../comment/AlarmHistoryTable.vue';
-  import HandlerHistoryTable from '../comment/HandlerHistoryTable.vue';
-  import AlarmHistoryTableHj from './components/AlarmHistoryTableHj.vue';
-  import HandleModal from './modal.vue';
-  import DeviceBaseInfo from '../comment/components/DeviceBaseInfo.vue';
-  import { mountedThree, addMonitorText, play, destroy, setModelType, computePlay } from './gate.threejs';
-  import { deviceControlApi } from '/@/api/vent/index';
-  import { message } from 'ant-design-vue';
-  import { list, getTableList, cameraList, cameraAddrList } from './gate.api';
-  import { chartsColumns } from './gate.data';
-  import lodash from 'lodash';
-  import { setDivHeight } from '/@/utils/event';
-  import { BorderBox8 as DvBorderBox8 } from '@kjgl77/datav-vue3';
-  import { useRouter } from 'vue-router';
-  import LivePlayer from '@liveqing/liveplayer-v3';
-  import { useModal } from '/@/components/Modal';
-  import { useCamera } from '/@/hooks/system/useCamera';
-  import { usePermission } from '/@/hooks/web/usePermission';
-  import { getDictItems } from '/@/api/common/api';
-  import { render } from '/@/utils/common/renderUtils';
-  import { useGlobSetting } from '/@/hooks/setting';
-  import { getDictItemsByCode } from '/@/utils/dict';
-  import { defHttp } from '/@/utils/http/axios';
-  import BarAndLine from '/@/components/chart/BarAndLine.vue';
-  import HistoryTableChart from '../comment/HistoryTableChart.vue';
-  const { hasPermission } = usePermission();
-  const { sysOrgCode } = useGlobSetting();
-  const globalConfig = inject('globalConfig');
+import { onBeforeUnmount, onUnmounted, onMounted, ref, reactive, nextTick, inject, unref } from 'vue';
+import MonitorTable from '../comment/MonitorTable.vue';
+import HistoryTable from '../comment/HistoryTable.vue';
+import AlarmHistoryTable from '../comment/AlarmHistoryTable.vue';
+import HandlerHistoryTable from '../comment/HandlerHistoryTable.vue';
+import AlarmHistoryTableHj from './components/AlarmHistoryTableHj.vue';
+import HandleModal from './modal.vue';
+import DeviceBaseInfo from '../comment/components/DeviceBaseInfo.vue';
+import { mountedThree, addMonitorText, play, destroy, setModelType, computePlay } from './gate.threejs';
+import { deviceControlApi } from '/@/api/vent/index';
+import { message } from 'ant-design-vue';
+import { list, getTableList, cameraList, cameraAddrList } from './gate.api';
+import { chartsColumns } from './gate.data';
+import lodash from 'lodash';
+import { setDivHeight } from '/@/utils/event';
+import { BorderBox8 as DvBorderBox8 } from '@kjgl77/datav-vue3';
+import { useRouter } from 'vue-router';
+import LivePlayer from '@liveqing/liveplayer-v3';
+import { useModal } from '/@/components/Modal';
+import { useCamera } from '/@/hooks/system/useCamera';
+import { usePermission } from '/@/hooks/web/usePermission';
+import { getDictItems } from '/@/api/common/api';
+import { render } from '/@/utils/common/renderUtils';
+import { useGlobSetting } from '/@/hooks/setting';
+import { getDictItemsByCode } from '/@/utils/dict';
+import { defHttp } from '/@/utils/http/axios';
+import BarAndLine from '/@/components/chart/BarAndLine.vue';
+import HistoryTableChart from '../comment/HistoryTableChart.vue';
+const { hasPermission } = usePermission();
+const { sysOrgCode } = useGlobSetting();
+const globalConfig = inject('globalConfig');
 
-  const { currentRoute } = useRouter();
-  const MonitorDataTable = ref();
-  let contrlValue = '';
-  const playerRef = ref();
-  const deviceType = ref('gate');
-  const activeKey = ref('1'); // tab
-  const loading = ref(false);
-  const stationType = ref('plc1');
-  const scroll = reactive({
-    y: 230,
-  });
-  const modelList = ref<{ text: string; value: string }[]>([]);
-  const frontDoorIsOpen = ref(false); //前门是否开启
-  const backDoorIsOpen = ref(false); //后门是否开启
-  const midDoorIsOpen = ref(false); //中间门是否开启
+const { currentRoute } = useRouter();
+const MonitorDataTable = ref();
+let contrlValue = '';
+const playerRef = ref();
+const deviceType = ref('gate');
+const activeKey = ref('1'); // tab
+const loading = ref(false);
+const stationType = ref('plc1');
+const scroll = reactive({
+  y: 230,
+});
+const modelList = ref<{ text: string; value: string }[]>([]);
+const frontDoorIsOpen = ref(false); //前门是否开启
+const backDoorIsOpen = ref(false); //后门是否开启
+const midDoorIsOpen = ref(false); //中间门是否开启
 
-  const modalIsShow = ref<boolean>(false); // 是否显示模态框
-  const modalTitle = ref(''); // 模态框标题显示内容,根据设备操作类型决定
-  const modalType = ref(''); // 模态框内容显示类型,设备操作类型
+const modalIsShow = ref<boolean>(false); // 是否显示模态框
+const modalTitle = ref(''); // 模态框标题显示内容,根据设备操作类型决定
+const modalType = ref(''); // 模态框内容显示类型,设备操作类型
 
-  const selectRowIndex = ref(-1); // 选中行
-  const dataSource = ref([]);
-  const sharedData = ref([]);
-  const deviceBaseList = ref([]); // 设备基本信息
-  const updateSharedData = (data) => {
-    sharedData.value = data;
-  };
-  const Option = {
-    grid: {
-      top: '20%',
-      left: '5%',
-      right: '5%',
-      bottom: '3%',
-      containLabel: true,
-    },
-    toolbox: {
-      feature: null,
-    },
-  };
-  const [registerModal, { openModal, closeModal }] = useModal();
+const selectRowIndex = ref(-1); // 选中行
+const dataSource = ref([]);
+const sharedData = ref([]);
+const deviceBaseList = ref([]); // 设备基本信息
+const updateSharedData = (data) => {
+  sharedData.value = data;
+};
+const Option = {
+  grid: {
+    top: '20%',
+    left: '5%',
+    right: '5%',
+    bottom: '3%',
+    containLabel: true,
+  },
+  toolbox: {
+    feature: null,
+  },
+};
+const [registerModal, { openModal, closeModal }] = useModal();
 
-  const { getCamera, removeCamera } = useCamera();
+const { getCamera, removeCamera } = useCamera();
 
-  const tabChange = (activeKeyVal) => {
-    activeKey.value = activeKeyVal;
-    if (activeKeyVal == 1) {
-      nextTick(() => {
-        if (MonitorDataTable.value) MonitorDataTable.value.setSelectedRowKeys([selectData.deviceID]);
-      });
-    }
-  };
+const tabChange = (activeKeyVal) => {
+  activeKey.value = activeKeyVal;
+  if (activeKeyVal == 1) {
+    nextTick(() => {
+      if (MonitorDataTable.value) MonitorDataTable.value.setSelectedRowKeys([selectData.deviceID]);
+    });
+  }
+};
 
-  const initData = {
-    deviceID: '',
-    deviceType: '',
-    strname: '',
-    frontRearDP: '-', //压差
-    // sourcePressure: '-', //气源压力
-    runRoRecondition: null,
-    autoRoManual: null,
-    netStatus: '0', //通信状态
-    frontGateOpen: '0',
-    frontGateClose: '1',
-    rearGateOpen: '0',
-    rearGateClose: '1',
-    midGateOpen: '0',
-    midGateClose: '1',
-    fault: '气源压力超限',
-    masterComputer: 0,
-    frontGateOpenCtrl: false,
-    rearGateOpenCtrl: false,
-    cameras: [],
-  };
+const initData = {
+  deviceID: '',
+  deviceType: '',
+  strname: '',
+  frontRearDP: '-', //压差
+  // sourcePressure: '-', //气源压力
+  runRoRecondition: null,
+  autoRoManual: null,
+  netStatus: '0', //通信状态
+  frontGateOpen: '0',
+  frontGateClose: '1',
+  rearGateOpen: '0',
+  rearGateClose: '1',
+  midGateOpen: '0',
+  midGateClose: '1',
+  fault: '气源压力超限',
+  masterComputer: 0,
+  frontGateOpenCtrl: false,
+  rearGateOpenCtrl: false,
+  cameras: [],
+};
 
-  // 监测数据
-  const selectData = reactive(lodash.cloneDeep(initData));
+// 监测数据
+const selectData = reactive(lodash.cloneDeep(initData));
 
-  const flvURL1 = () => {
-    // return ''
-    return `/video/gate.mp4`;
-  };
+const flvURL1 = () => {
+  // return ''
+  return `/video/gate.mp4`;
+};
 
-  function deviceEdit(e: Event, type: string, record) {
-    e.stopPropagation();
-    openModal(true, {
-      type,
-      deviceId: record['deviceID'],
-    });
-  }
-  // 获取设备基本信息列表
-  function getDeviceBaseList() {
-    getTableList({ pageSize: 1000 }).then((res) => {
-      deviceBaseList.value = res.records;
-    });
-  }
+function deviceEdit(e: Event, type: string, record) {
+  e.stopPropagation();
+  openModal(true, {
+    type,
+    deviceId: record['deviceID'],
+  });
+}
+// 获取设备基本信息列表
+function getDeviceBaseList() {
+  getTableList({ pageSize: 1000 }).then((res) => {
+    deviceBaseList.value = res.records;
+  });
+}
 
-  // https获取监测数据
-  let timer: null | NodeJS.Timeout = null;
-  async function getMonitor(flag?) {
-    if (Object.prototype.toString.call(timer) === '[object Null]') {
-      timer = await setTimeout(
-        async () => {
-          const res = await list({ devicetype: deviceType.value, pagetype: 'normal' });
-          if (res.msgTxt && res.msgTxt[0]) {
-            dataSource.value = res.msgTxt[0].datalist || [];
-            dataSource.value.forEach((data: any) => {
-              const readData = data.readData;
-              data = Object.assign(data, readData);
-            });
-            if (dataSource.value.length > 0 && selectRowIndex.value == -1 && MonitorDataTable.value) {
-              // 初始打开页面
-              if (currentRoute.value && currentRoute.value['query'] && currentRoute.value['query']['id']) {
-                MonitorDataTable.value.setSelectedRowKeys([currentRoute.value['query']['id']]);
-              } else {
-                MonitorDataTable.value.setSelectedRowKeys([dataSource.value[0]['deviceID']]);
-              }
-            }
-            Object.assign(selectData, dataSource.value[selectRowIndex.value]);
-            if (selectData.contrlMod == 'jnjhCtrl') {
-              selectData['autoRoManual'] = selectData['autoRoManual'] == 1 ? true : false;
-              selectData['autoRoManual1'] = selectData['autoRoManual1'] == 1 ? true : false;
-              selectData['autoRoManual2'] = selectData['autoRoManual2'] == 1 ? true : false;
-            }
-            addMonitorText(selectData);
-            monitorAnimation(selectData);
-            if (timer) {
-              timer = null;
+// https获取监测数据
+let timer: null | NodeJS.Timeout = null;
+async function getMonitor(flag?) {
+  if (Object.prototype.toString.call(timer) === '[object Null]') {
+    timer = await setTimeout(
+      async () => {
+        const res = await list({ devicetype: deviceType.value, pagetype: 'normal' });
+        if (res.msgTxt && res.msgTxt[0]) {
+          dataSource.value = res.msgTxt[0].datalist || [];
+          dataSource.value.forEach((data: any) => {
+            const readData = data.readData;
+            data = Object.assign(data, readData);
+          });
+          if (dataSource.value.length > 0 && selectRowIndex.value == -1 && MonitorDataTable.value) {
+            // 初始打开页面
+            if (currentRoute.value && currentRoute.value['query'] && currentRoute.value['query']['id']) {
+              MonitorDataTable.value.setSelectedRowKeys([currentRoute.value['query']['id']]);
+            } else {
+              MonitorDataTable.value.setSelectedRowKeys([dataSource.value[0]['deviceID']]);
             }
-            getMonitor();
           }
-        },
-        flag ? 0 : 1000
-      );
-    }
+          Object.assign(selectData, dataSource.value[selectRowIndex.value]);
+          if (selectData.contrlMod == 'jnjhCtrl') {
+            selectData['autoRoManual'] = selectData['autoRoManual'] == 1 ? true : false;
+            selectData['autoRoManual1'] = selectData['autoRoManual1'] == 1 ? true : false;
+            selectData['autoRoManual2'] = selectData['autoRoManual2'] == 1 ? true : false;
+          }
+          addMonitorText(selectData);
+          monitorAnimation(selectData);
+          if (timer) {
+            timer = null;
+          }
+          getMonitor();
+        }
+      },
+      flag ? 0 : 1000
+    );
   }
+}
 
-  // 切换检测数据
-  async function getSelectRow(selectRow, index) {
-    if (!selectRow) return;
-    loading.value = true;
-    selectRowIndex.value = index;
+// 切换检测数据
+async function getSelectRow(selectRow, index) {
+  if (!selectRow) return;
+  loading.value = true;
+  selectRowIndex.value = index;
 
-    const baseData: any = deviceBaseList.value.find((baseData: any) => baseData.id === selectRow.deviceID);
-    Object.assign(selectData, initData, selectRow, baseData);
-    isFrontOpenRunning = false; //开关门动作是否在进行
-    isRearOpenRunning = false; //开关门动作是否在进行
-    isMidOpenRunning = false; //开关门动作是否在进行
-    frontDeviceState = 0; //记录设备状态,为了与下一次监测数据做比较
-    rearDeviceState = 0; //记录设备状态,为了与下一次监测数据做比较
-    midDeviceState = 0; //记录设备状态,为了与下一次监测数据做比较
+  const baseData: any = deviceBaseList.value.find((baseData: any) => baseData.id === selectRow.deviceID);
+  Object.assign(selectData, initData, selectRow, baseData);
+  isFrontOpenRunning = false; //开关门动作是否在进行
+  isRearOpenRunning = false; //开关门动作是否在进行
+  isMidOpenRunning = false; //开关门动作是否在进行
+  frontDeviceState = 0; //记录设备状态,为了与下一次监测数据做比较
+  rearDeviceState = 0; //记录设备状态,为了与下一次监测数据做比较
+  midDeviceState = 0; //记录设备状态,为了与下一次监测数据做比较
 
-    let type;
-    const dictCodes = getDictItemsByCode('gateStyle');
-    if (selectData && dictCodes && dictCodes.length > 0) {
-      const gateStyle = selectData['gateStyle'];
-      switch (gateStyle) {
-        case 'gate_qd':
-          type = 'fm3';
-          break;
-        case 'fmtl3':
-          type = 'fmThreeTl';
-          break;
-        case 'fmSs':
-          type = 'fmTwoSs';
-          break;
-        case 'fm_fc':
-          type = 'fmWindow';
-          break;
-        case 'fmXr':
-          type = 'fmXr';
-          break;
-        case 'fmYy':
-          type = 'fm1';
-          break;
-        case 'fmSs3':
-          type = 'fm2';
-          break;
-        case 'fm_fc_hjg':
-          type = 'fmWindowHjg';
-          break;
-        case 'fm_fc_zhq':
-          type = 'fmWindowZhq';
-          break;
-        case 'fmHsw3':
-          type = 'fmHsw3';
-          break;
-        case 'fmYjXr':
-          type = 'fmYjXr';
-          break;
-        case 'fmYj':
-          type = 'fmYj';
-          break;
-      }
-    } else {
-      type = selectData.nwindownum == 1 ? 'singleWindow' : 'doubleWindow';
-      if (selectData['doorUse'] == 2) {
-        type = 'fmXr';
-      } else if (selectData.ndoorcount == '3' || selectData.deviceType == 'gate_nomal3') {
+  let type;
+  const dictCodes = getDictItemsByCode('gateStyle');
+  if (selectData && dictCodes && dictCodes.length > 0) {
+    const gateStyle = selectData['gateStyle'];
+    switch (gateStyle) {
+      case 'gate_qd':
+        type = 'fm3';
+        break;
+      case 'fmtl3':
         type = 'fmThreeTl';
-      } else {
-        if (selectData.deviceType == 'gate_ss') {
-          type = 'fm2';
-          // type = 'fmWindow';
-        } else if (selectData.deviceType == 'gate_qd' || selectData.deviceType == 'gate_normal') {
-          type = 'fm3';
-        } else if (selectData.deviceType == 'gate_ss_two' || selectData.deviceType == 'gate_ss_two1') {
-          type = 'fmTwoSs';
-        } else if (selectData.deviceType == 'gate_tj') {
-          type = 'fmWindow';
-        } else {
-          type = 'fm1'; // 液压
-        }
-      }
-    }
-
-    debugger;
-    setModelType(type).then(async () => {
-      addMonitorText(selectData);
-      loading.value = false;
-    });
-    await getCamera(selectRow.deviceID, playerRef.value);
-  }
-
-  // 播放动画
-  function playAnimation(handlerState, data: any = null) {
-    const value = data;
-    switch (handlerState) {
-      case 1: // 打开前门
-        if (selectData.frontGateOpen == '0' && selectData.frontGateClose == '1') {
-          modalTitle.value = '打开前门';
-          modalType.value = '1';
-          modalIsShow.value = true;
-        } else {
-          // message.warning('前门已经打开或正在打开,请勿重新操作');
-          message.warning('没有监测到前门关到位,无法进行指令下发操作');
-        }
         break;
-      case 2: // 关闭前门
-        if (selectData.frontGateOpen == '1' && selectData.frontGateClose == '0') {
-          modalTitle.value = '关闭前门';
-          modalType.value = '2';
-          modalIsShow.value = true;
-        } else {
-          // message.warning('前门已经关闭或正在关闭,请勿重新操作');
-          message.warning('没有监测到前门开到位,无法进行指令下发操作');
-        }
+      case 'fmSs':
+        type = 'fmTwoSs';
         break;
-      case 3: // 打开后门
-        if (selectData.rearGateOpen == '0' && selectData.rearGateClose == '1') {
-          modalTitle.value = '打开后门';
-          modalType.value = '3';
-          modalIsShow.value = true;
-        } else {
-          // message.warning('后门已经打开或正在打开,请勿重新操作');
-          message.warning('没有监测到后门关到位,无法进行指令下发操作');
-        }
+      case 'fm_fc':
+        type = 'fmWindow';
         break;
-      case 4: // 关闭后门
-        if (selectData.rearGateOpen == '1' && selectData.rearGateClose == '0') {
-          modalTitle.value = '关闭后门';
-          modalType.value = '4';
-          modalIsShow.value = true;
-        } else {
-          // message.warning('后门已经关闭或正在关闭,请勿重新操作');
-          message.warning('没有监测到后门开到位,无法进行指令下发操作');
-        }
+      case 'fmXr':
+        type = 'fmXr';
         break;
-      case 8: // 打开中间门
-        if (selectData.midGateOpen == '0' && selectData.midGateClose == '1') {
-          modalTitle.value = '打开中间门';
-          modalType.value = '8';
-          modalIsShow.value = true;
-        } else {
-          // message.warning('后门已经打开或正在打开,请勿重新操作');
-          message.warning('没有监测到中间门关到位,无法进行指令下发操作');
-        }
+      case 'fmYy':
+        type = 'fm1';
         break;
-      case 9: // 关闭中间门
-        if (selectData.midGateOpen == '1' && selectData.midGateClose == '0') {
-          modalTitle.value = '关闭中间门';
-          modalType.value = '9';
-          modalIsShow.value = true;
-        } else {
-          // message.warning('后门已经关闭或正在关闭,请勿重新操作');
-          message.warning('没有监测到中间门开到位,无法进行指令下发操作');
-        }
+      case 'fmSs3':
+        type = 'fm2';
         break;
-      case 5: // 打开前后门
-        if (
-          selectData.frontGateOpen == '0' &&
-          selectData.frontGateClose == '1' &&
-          selectData.rearGateOpen == '0' &&
-          selectData.rearGateClose == '1'
-        ) {
-          modalTitle.value = '打开前后门';
-          modalType.value = '5';
-          modalIsShow.value = true;
-        } else {
-          // message.warning('前后门已经打开或正在打开,请勿重新操作');
-          message.warning('没有监测到前门、后门关到位,无法进行指令下发操作');
-        }
+      case 'fm_fc_hjg':
+        type = 'fmWindowHjg';
         break;
-      case 6: // 关闭前后门
-        if (
-          selectData.frontGateOpen == '1' &&
-          selectData.frontGateClose == '0' &&
-          selectData.rearGateOpen == '1' &&
-          selectData.rearGateClose == '0'
-        ) {
-          modalTitle.value = '关闭前后门';
-          modalType.value = '6';
-          modalIsShow.value = true;
-        } else {
-          // message.warning('前后门已经关闭或正在关闭,请勿重新操作');
-          message.warning('没有监测到前门、后门开到位,无法进行指令下发操作');
-        }
+      case 'fm_fc_zhq':
+        type = 'fmWindowZhq';
         break;
-
-      case 7: // 控制模式切换
-        modalTitle.value = '控制模式切换';
-        modalType.value = '7';
-        modalIsShow.value = true;
+      case 'fmHsw3':
+        type = 'fmHsw3';
         break;
-
-      case 10: // 风窗控制
-        modalTitle.value = 'A窗控制';
-        modalType.value = '10';
-        modalIsShow.value = true;
+      case 'fmYjXr':
+        type = 'fmYjXr';
+        break;
+      case 'fmYj':
+        type = 'fmYj';
         break;
+    }
+  } else {
+    type = selectData.nwindownum == 1 ? 'singleWindow' : 'doubleWindow';
+    if (selectData['doorUse'] == 2) {
+      type = 'fmXr';
+    } else if (selectData.ndoorcount == '3' || selectData.deviceType == 'gate_nomal3') {
+      type = 'fmThreeTl';
+    } else {
+      if (selectData.deviceType == 'gate_ss') {
+        type = 'fm2';
+        // type = 'fmWindow';
+      } else if (selectData.deviceType == 'gate_qd' || selectData.deviceType == 'gate_normal') {
+        type = 'fm3';
+      } else if (selectData.deviceType == 'gate_ss_two' || selectData.deviceType == 'gate_ss_two1') {
+        type = 'fmTwoSs';
+      } else if (selectData.deviceType == 'gate_tj') {
+        type = 'fmWindow';
+      } else {
+        type = 'fm1'; // 液压
+      }
+    }
+  }
+
+  debugger;
+  setModelType(type).then(async () => {
+    addMonitorText(selectData);
+    loading.value = false;
+  });
+  await getCamera(selectRow.deviceID, playerRef.value);
+}
 
-      case 11: // 风窗控制
-        modalTitle.value = 'B窗控制';
-        modalType.value = '11';
+// 播放动画
+function playAnimation(handlerState, data: any = null) {
+  const value = data;
+  switch (handlerState) {
+    case 1: // 打开前门
+      if (selectData.frontGateOpen == '0' && selectData.frontGateClose == '1') {
+        modalTitle.value = '打开前门';
+        modalType.value = '1';
         modalIsShow.value = true;
-        break;
-      case 12: // 风窗控制
-        modalTitle.value = 'C窗控制';
-        modalType.value = '12';
+      } else {
+        // message.warning('前门已经打开或正在打开,请勿重新操作');
+        message.warning('没有监测到前门关到位,无法进行指令下发操作');
+      }
+      break;
+    case 2: // 关闭前门
+      if (selectData.frontGateOpen == '1' && selectData.frontGateClose == '0') {
+        modalTitle.value = '关闭前门';
+        modalType.value = '2';
         modalIsShow.value = true;
-        break;
-      case 13: // 风窗控制
-        modalTitle.value = 'D窗控制';
-        modalType.value = '13';
+      } else {
+        // message.warning('前门已经关闭或正在关闭,请勿重新操作');
+        message.warning('没有监测到前门开到位,无法进行指令下发操作');
+      }
+      break;
+    case 3: // 打开后门
+      if (selectData.rearGateOpen == '0' && selectData.rearGateClose == '1') {
+        modalTitle.value = '打开后门';
+        modalType.value = '3';
         modalIsShow.value = true;
-        break;
-    }
+      } else {
+        // message.warning('后门已经打开或正在打开,请勿重新操作');
+        message.warning('没有监测到后门关到位,无法进行指令下发操作');
+      }
+      break;
+    case 4: // 关闭后门
+      if (selectData.rearGateOpen == '1' && selectData.rearGateClose == '0') {
+        modalTitle.value = '关闭后门';
+        modalType.value = '4';
+        modalIsShow.value = true;
+      } else {
+        // message.warning('后门已经关闭或正在关闭,请勿重新操作');
+        message.warning('没有监测到后门开到位,无法进行指令下发操作');
+      }
+      break;
+    case 8: // 打开中间门
+      if (selectData.midGateOpen == '0' && selectData.midGateClose == '1') {
+        modalTitle.value = '打开中间门';
+        modalType.value = '8';
+        modalIsShow.value = true;
+      } else {
+        // message.warning('后门已经打开或正在打开,请勿重新操作');
+        message.warning('没有监测到中间门关到位,无法进行指令下发操作');
+      }
+      break;
+    case 9: // 关闭中间门
+      if (selectData.midGateOpen == '1' && selectData.midGateClose == '0') {
+        modalTitle.value = '关闭中间门';
+        modalType.value = '9';
+        modalIsShow.value = true;
+      } else {
+        // message.warning('后门已经关闭或正在关闭,请勿重新操作');
+        message.warning('没有监测到中间门开到位,无法进行指令下发操作');
+      }
+      break;
+    case 5: // 打开前后门
+      if (selectData.frontGateOpen == '0' && selectData.frontGateClose == '1' && selectData.rearGateOpen == '0' && selectData.rearGateClose == '1') {
+        modalTitle.value = '打开前后门';
+        modalType.value = '5';
+        modalIsShow.value = true;
+      } else {
+        // message.warning('前后门已经打开或正在打开,请勿重新操作');
+        message.warning('没有监测到前门、后门关到位,无法进行指令下发操作');
+      }
+      break;
+    case 6: // 关闭前后门
+      if (selectData.frontGateOpen == '1' && selectData.frontGateClose == '0' && selectData.rearGateOpen == '1' && selectData.rearGateClose == '0') {
+        modalTitle.value = '关闭前后门';
+        modalType.value = '6';
+        modalIsShow.value = true;
+      } else {
+        // message.warning('前后门已经关闭或正在关闭,请勿重新操作');
+        message.warning('没有监测到前门、后门开到位,无法进行指令下发操作');
+      }
+      break;
 
-    if (globalConfig?.simulatedPassword) {
-      handleOK('', handlerState + '');
-    }
-    contrlValue = value;
+    case 7: // 控制模式切换
+      modalTitle.value = '控制模式切换';
+      modalType.value = '7';
+      modalIsShow.value = true;
+      break;
+
+    case 10: // 风窗控制
+      modalTitle.value = 'A窗控制';
+      modalType.value = '10';
+      modalIsShow.value = true;
+      break;
+
+    case 11: // 风窗控制
+      modalTitle.value = 'B窗控制';
+      modalType.value = '11';
+      modalIsShow.value = true;
+      break;
+    case 12: // 风窗控制
+      modalTitle.value = 'C窗控制';
+      modalType.value = '12';
+      modalIsShow.value = true;
+      break;
+    case 13: // 风窗控制
+      modalTitle.value = 'D窗控制';
+      modalType.value = '13';
+      modalIsShow.value = true;
+      break;
   }
-  // 保德缺打开状态
 
-  // function playAnimation(handlerState, data: any = null) {
-  //   const value = data;
-  //   switch (handlerState) {
-  //     case 1: // 打开前门
-  //       modalTitle.value = '打开前门';
-  //       modalType.value = '1';
-  //       modalIsShow.value = true;
-  //       break;
-  //     case 2: // 关闭前门
-  //       modalTitle.value = '关闭前门';
-  //       modalType.value = '2';
-  //       modalIsShow.value = true;
-  //       break;
-  //     case 3: // 打开后门
-  //       modalTitle.value = '打开后门';
-  //       modalType.value = '3';
-  //       modalIsShow.value = true;
-  //       break;
-  //     case 4: // 关闭后门
-  //       modalTitle.value = '关闭后门';
-  //       modalType.value = '4';
-  //       modalIsShow.value = true;
-  //       break;
-  //     case 8: // 打开中间门
-  //       modalTitle.value = '打开中间门';
-  //       modalType.value = '8';
-  //       modalIsShow.value = true;
-  //       break;
-  //     case 9: // 关闭中间门
-  //       modalTitle.value = '关闭中间门';
-  //       modalType.value = '9';
-  //       modalIsShow.value = true;
-  //       break;
-  //     case 5: // 打开前后门
-  //       modalTitle.value = '打开前后门';
-  //       modalType.value = '5';
-  //       modalIsShow.value = true;
-  //       break;
-  //     case 6: // 关闭前后门
-  //       modalTitle.value = '关闭前后门';
-  //       modalType.value = '6';
-  //       modalIsShow.value = true;
-  //       break;
+  if (globalConfig?.simulatedPassword) {
+    handleOK('', handlerState + '');
+  }
+  contrlValue = value;
+}
+// 保德缺打开状态
 
-  //     case 7: // 控制模式切换
-  //       modalTitle.value = '控制模式切换';
-  //       modalType.value = '7';
-  //       modalIsShow.value = true;
-  //       break;
-  //     case 10: // 风窗控制
-  //       modalTitle.value = '风窗控制';
-  //       modalType.value = '10';
-  //       modalIsShow.value = true;
-  //       break;
-  //   }
+// function playAnimation(handlerState, data: any = null) {
+//   const value = data;
+//   switch (handlerState) {
+//     case 1: // 打开前门
+//       modalTitle.value = '打开前门';
+//       modalType.value = '1';
+//       modalIsShow.value = true;
+//       break;
+//     case 2: // 关闭前门
+//       modalTitle.value = '关闭前门';
+//       modalType.value = '2';
+//       modalIsShow.value = true;
+//       break;
+//     case 3: // 打开后门
+//       modalTitle.value = '打开后门';
+//       modalType.value = '3';
+//       modalIsShow.value = true;
+//       break;
+//     case 4: // 关闭后门
+//       modalTitle.value = '关闭后门';
+//       modalType.value = '4';
+//       modalIsShow.value = true;
+//       break;
+//     case 8: // 打开中间门
+//       modalTitle.value = '打开中间门';
+//       modalType.value = '8';
+//       modalIsShow.value = true;
+//       break;
+//     case 9: // 关闭中间门
+//       modalTitle.value = '关闭中间门';
+//       modalType.value = '9';
+//       modalIsShow.value = true;
+//       break;
+//     case 5: // 打开前后门
+//       modalTitle.value = '打开前后门';
+//       modalType.value = '5';
+//       modalIsShow.value = true;
+//       break;
+//     case 6: // 关闭前后门
+//       modalTitle.value = '关闭前后门';
+//       modalType.value = '6';
+//       modalIsShow.value = true;
+//       break;
 
-  //   if (globalConfig?.simulatedPassword) {
-  //     handleOK('', handlerState + '');
-  //   }
-  //   contrlValue = value;
-  // }
+//     case 7: // 控制模式切换
+//       modalTitle.value = '控制模式切换';
+//       modalType.value = '7';
+//       modalIsShow.value = true;
+//       break;
+//     case 10: // 风窗控制
+//       modalTitle.value = '风窗控制';
+//       modalType.value = '10';
+//       modalIsShow.value = true;
+//       break;
+//   }
 
-  function handleOK(passWord, handlerState, value?) {
-    if (!passWord && !globalConfig?.simulatedPassword) {
-      message.warning('请输入密码');
-      return;
-    }
-    if (isOpenRunning) {
-      message.warning('风门正在运行。。。');
-      modalIsShow.value = false;
-      return;
-    }
-    const data = {
-      deviceid: selectData.deviceID,
-      devicetype: selectData.deviceType,
-      paramcode: '',
-      value: contrlValue,
-      password: passWord || globalConfig?.simulatedPassword,
-      masterComputer: selectData.masterComputer,
-    };
-    let handler = () => {};
-    debugger;
+//   if (globalConfig?.simulatedPassword) {
+//     handleOK('', handlerState + '');
+//   }
+//   contrlValue = value;
+// }
 
-    switch (handlerState) {
-      case '1': // 打开前门
-        if (selectData.frontGateOpen == '0' && selectData.frontGateClose == '1') {
-          handler = () => {
-            frontDoorIsOpen.value = true;
-          };
-          data.paramcode = 'frontGateOpen_S';
-        } else {
-          message.warning('前门已打开。。。');
-          modalIsShow.value = false;
-        }
-        break;
-      case '2': // 关闭前门
-        if (selectData.frontGateOpen == '1' && selectData.frontGateClose == '0') {
-          handler = () => {
-            frontDoorIsOpen.value = false;
-          };
-          data.paramcode = 'frontGateClose_S';
-        } else {
-          message.warning('前门已关闭。。。');
-          modalIsShow.value = false;
-        }
-        break;
-      case '3': // 打开后门
-        if (selectData.rearGateOpen == '0' && selectData.rearGateClose == '1') {
-          handler = () => {
-            backDoorIsOpen.value = true;
-          };
-          data.paramcode = 'rearGateOpen_S';
-        } else {
-          message.warning('后门已打开。。。');
-          modalIsShow.value = false;
-        }
-        break;
-      case '4': // 关闭后门
-        if (selectData.rearGateOpen == '1' && selectData.rearGateClose == '0') {
-          handler = () => {
-            backDoorIsOpen.value = false;
-          };
-          data.paramcode = 'rearGateClose_S';
-        } else {
-          message.warning('后门已关闭。。。');
-          modalIsShow.value = false;
-        }
-        break;
-      case '8': // 打开中间门
-        if (selectData.midGateOpen == '0' && selectData.midGateClose == '1') {
-          handler = () => {
-            midDoorIsOpen.value = true;
-          };
-          data.paramcode = 'midGateOpen_S';
-        } else {
-          message.warning('中间风门已打开。。。');
-          modalIsShow.value = false;
-        }
-        break;
-      case '9': // 关闭中间门
-        if (selectData.midGateOpen == '1' && selectData.midGateClose == '0') {
-          handler = () => {
-            midDoorIsOpen.value = false;
-          };
-          data.paramcode = 'midGateClose_S';
-        } else {
-          message.warning('中间风门已关闭。。。');
-          modalIsShow.value = false;
-        }
-        break;
-      case '5': // 打开前后门
-        if (
-          selectData.frontGateOpen == '0' &&
-          selectData.frontGateClose == '1' &&
-          selectData.rearGateOpen == '0' &&
-          selectData.rearGateClose == '1'
-        ) {
-          handler = () => {
-            frontDoorIsOpen.value = true;
-            backDoorIsOpen.value = true;
-          };
-          data.paramcode = 'sameTimeOpen';
-        }
-        break;
-      case '6': // 关闭前后门
-        if (
-          selectData.frontGateOpen == '1' &&
-          selectData.frontGateClose == '0' &&
-          selectData.rearGateOpen == '1' &&
-          selectData.rearGateClose == '0'
-        ) {
-          handler = () => {
-            frontDoorIsOpen.value = false;
-            backDoorIsOpen.value = false;
-          };
-          data.paramcode = 'sameTimeClose';
-        }
-        break;
-      case '7': // 远程与就地
-        if (selectData.contrlMod == 'codeCtrl') {
-          if (contrlValue == '1') {
-            data.paramcode = 'autoRoManualControl1';
-          } else if (contrlValue == '0') {
-            data.paramcode = 'autoRoManualControl2';
-          } else {
-            data.paramcode = 'autoRoManualControl0';
-          }
-          data.value = '';
-          selectData.autoRoManual = null;
-        } else if (selectData.contrlMod == 'loopCtrl' || selectData.contrlMod == 'jnjhCtrl') {
-          data.paramcode = 'autoRoManualControl';
-          data.value = '';
-          selectData.autoRoManual = null;
+function handleOK(passWord, handlerState, value?) {
+  if (!passWord && !globalConfig?.simulatedPassword) {
+    message.warning('请输入密码');
+    return;
+  }
+  if (isOpenRunning) {
+    message.warning('风门正在运行。。。');
+    modalIsShow.value = false;
+    return;
+  }
+  const data = {
+    deviceid: selectData.deviceID,
+    devicetype: selectData.deviceType,
+    paramcode: '',
+    value: contrlValue,
+    password: passWord || globalConfig?.simulatedPassword,
+    masterComputer: selectData.masterComputer,
+  };
+  let handler = () => {};
+  debugger;
+
+  switch (handlerState) {
+    case '1': // 打开前门
+      if (selectData.frontGateOpen == '0' && selectData.frontGateClose == '1') {
+        handler = () => {
+          frontDoorIsOpen.value = true;
+        };
+        data.paramcode = 'frontGateOpen_S';
+      } else {
+        message.warning('前门已打开。。。');
+        modalIsShow.value = false;
+      }
+      break;
+    case '2': // 关闭前门
+      if (selectData.frontGateOpen == '1' && selectData.frontGateClose == '0') {
+        handler = () => {
+          frontDoorIsOpen.value = false;
+        };
+        data.paramcode = 'frontGateClose_S';
+      } else {
+        message.warning('前门已关闭。。。');
+        modalIsShow.value = false;
+      }
+      break;
+    case '3': // 打开后门
+      if (selectData.rearGateOpen == '0' && selectData.rearGateClose == '1') {
+        handler = () => {
+          backDoorIsOpen.value = true;
+        };
+        data.paramcode = 'rearGateOpen_S';
+      } else {
+        message.warning('后门已打开。。。');
+        modalIsShow.value = false;
+      }
+      break;
+    case '4': // 关闭后门
+      if (selectData.rearGateOpen == '1' && selectData.rearGateClose == '0') {
+        handler = () => {
+          backDoorIsOpen.value = false;
+        };
+        data.paramcode = 'rearGateClose_S';
+      } else {
+        message.warning('后门已关闭。。。');
+        modalIsShow.value = false;
+      }
+      break;
+    case '8': // 打开中间门
+      if (selectData.midGateOpen == '0' && selectData.midGateClose == '1') {
+        handler = () => {
+          midDoorIsOpen.value = true;
+        };
+        data.paramcode = 'midGateOpen_S';
+      } else {
+        message.warning('中间风门已打开。。。');
+        modalIsShow.value = false;
+      }
+      break;
+    case '9': // 关闭中间门
+      if (selectData.midGateOpen == '1' && selectData.midGateClose == '0') {
+        handler = () => {
+          midDoorIsOpen.value = false;
+        };
+        data.paramcode = 'midGateClose_S';
+      } else {
+        message.warning('中间风门已关闭。。。');
+        modalIsShow.value = false;
+      }
+      break;
+    case '5': // 打开前后门
+      if (selectData.frontGateOpen == '0' && selectData.frontGateClose == '1' && selectData.rearGateOpen == '0' && selectData.rearGateClose == '1') {
+        handler = () => {
+          frontDoorIsOpen.value = true;
+          backDoorIsOpen.value = true;
+        };
+        data.paramcode = 'sameTimeOpen';
+      }
+      break;
+    case '6': // 关闭前后门
+      if (selectData.frontGateOpen == '1' && selectData.frontGateClose == '0' && selectData.rearGateOpen == '1' && selectData.rearGateClose == '0') {
+        handler = () => {
+          frontDoorIsOpen.value = false;
+          backDoorIsOpen.value = false;
+        };
+        data.paramcode = 'sameTimeClose';
+      }
+      break;
+    case '7': // 远程与就地
+      if (selectData.contrlMod == 'codeCtrl') {
+        if (contrlValue == '1') {
+          data.paramcode = 'autoRoManualControl1';
+        } else if (contrlValue == '0') {
+          data.paramcode = 'autoRoManualControl2';
         } else {
-          data.paramcode = 'autoRoManualControl';
-          data.value = contrlValue;
-          selectData.autoRoManual = null;
+          data.paramcode = 'autoRoManualControl0';
         }
-        break;
-      case '10': // 前(A)窗控制
-        data.paramcode = 'frontSetValue1';
-        data.value = value;
-        break;
-      case '11': // 后(B)窗控制
-        data.paramcode = 'frontSetValue2';
-        data.value = value;
-        break;
-      case '12': // 后(B)窗控制
-        data.paramcode = 'rearSetValue1';
-        data.value = value;
-        break;
-      case '13': // 后(B)窗控制
-        data.paramcode = 'rearSetValue2';
-        data.value = value;
-        break;
-    }
+        data.value = '';
+        selectData.autoRoManual = null;
+      } else if (selectData.contrlMod == 'loopCtrl' || selectData.contrlMod == 'jnjhCtrl') {
+        data.paramcode = 'autoRoManualControl';
+        data.value = '';
+        selectData.autoRoManual = null;
+      } else {
+        data.paramcode = 'autoRoManualControl';
+        data.value = contrlValue;
+        selectData.autoRoManual = null;
+      }
+      break;
+    case '10': // 前(A)窗控制
+      data.paramcode = 'frontSetValue1';
+      data.value = value;
+      break;
+    case '11': // 后(B)窗控制
+      data.paramcode = 'frontSetValue2';
+      data.value = value;
+      break;
+    case '12': // 后(B)窗控制
+      data.paramcode = 'rearSetValue1';
+      data.value = value;
+      break;
+    case '13': // 后(B)窗控制
+      data.paramcode = 'rearSetValue2';
+      data.value = value;
+      break;
+  }
 
-    if (data.paramcode) {
-      deviceControlApi(data).then((res) => {
-        // 模拟时开启
-        if (res.success) {
-          modalIsShow.value = false;
-          if (globalConfig.History_Type == 'remote') {
-            message.success('指令已下发至生产管控平台成功!');
-          } else {
-            message.success('指令已下发成功!');
-          }
+  if (data.paramcode) {
+    deviceControlApi(data).then((res) => {
+      // 模拟时开启
+      if (res.success) {
+        modalIsShow.value = false;
+        if (globalConfig.History_Type == 'remote') {
+          message.success('指令已下发至生产管控平台成功!');
         } else {
-          message.error(res.message);
+          message.success('指令已下发成功!');
         }
-      });
-    }
+      } else {
+        message.error(res.message);
+      }
+    });
   }
-  let isOpenRunning = false; //开关门动作是否在进行
-  /** 开关门动画调用 */
-  let isFrontOpenRunning = false; //开关门动作是否在进行
-  // let isFrontCloseRunning = false; //开关门动作是否在进行
-  let isRearOpenRunning = false; //开关门动作是否在进行
-  // let isRearCloseRunning = false; //开关门动作是否在进行
-  let isMidOpenRunning = false; //中间门动作是否在进行
-  // let isMidCloseRunning = false; //中间门动作是否在进行
-  // 0 关闭 1 正在打开 2 打开 3正在关闭
-  let frontDeviceState = 0; //记录设备状态,为了与下一次监测数据做比较
-  let rearDeviceState = 0; //记录设备状态,为了与下一次监测数据做比较
-  let midDeviceState = 0; //记录设备状态,为了与下一次监测数据做比较
-  function monitorAnimation(selectData) {
-    const timeScale = 0.005;
-    // 带风窗 风窗动画
-    if (selectData['gateStyle'] && selectData['gateStyle'].includes('fm_fc')) playWindowAnimation(selectData);
+}
+let isOpenRunning = false; //开关门动作是否在进行
+/** 开关门动画调用 */
+let isFrontOpenRunning = false; //开关门动作是否在进行
+// let isFrontCloseRunning = false; //开关门动作是否在进行
+let isRearOpenRunning = false; //开关门动作是否在进行
+// let isRearCloseRunning = false; //开关门动作是否在进行
+let isMidOpenRunning = false; //中间门动作是否在进行
+// let isMidCloseRunning = false; //中间门动作是否在进行
+// 0 关闭 1 正在打开 2 打开 3正在关闭
+let frontDeviceState = 0; //记录设备状态,为了与下一次监测数据做比较
+let rearDeviceState = 0; //记录设备状态,为了与下一次监测数据做比较
+let midDeviceState = 0; //记录设备状态,为了与下一次监测数据做比较
+function monitorAnimation(selectData) {
+  const timeScale = 0.005;
+  // 带风窗 风窗动画
+  if (selectData['gateStyle'] && selectData['gateStyle'].includes('fm_fc')) playWindowAnimation(selectData);
 
-    if (selectData.frontGateOpen == '1' && selectData.frontGateClose == '0' && !isFrontOpenRunning) {
-      isFrontOpenRunning = true;
-      if (frontDeviceState != 1) {
-        // import.meta.env.VITE_GLOB_IS_SIMULATE ? play(1, timeScale) : play(1);
-        play(1, timeScale);
-        frontDeviceState = 1;
-        frontDoorIsOpen.value = false;
-        backDoorIsOpen.value = true;
-      }
+  if (selectData.frontGateOpen == '1' && selectData.frontGateClose == '0' && !isFrontOpenRunning) {
+    isFrontOpenRunning = true;
+    if (frontDeviceState != 1) {
+      // import.meta.env.VITE_GLOB_IS_SIMULATE ? play(1, timeScale) : play(1);
+      play(1, timeScale);
+      frontDeviceState = 1;
+      frontDoorIsOpen.value = false;
+      backDoorIsOpen.value = true;
     }
+  }
 
-    if (selectData.frontGateOpen == '0' && selectData.frontGateClose == '0' && !isFrontOpenRunning) {
-      isFrontOpenRunning = true;
-      if (frontDeviceState != 1) {
-        // import.meta.env.VITE_GLOB_IS_SIMULATE ? play(1, timeScale) : play(1);
-        play(1, timeScale);
-        frontDeviceState = 1;
-        frontDoorIsOpen.value = false;
-        backDoorIsOpen.value = true;
-      }
+  if (selectData.frontGateOpen == '0' && selectData.frontGateClose == '0' && !isFrontOpenRunning) {
+    isFrontOpenRunning = true;
+    if (frontDeviceState != 1) {
+      // import.meta.env.VITE_GLOB_IS_SIMULATE ? play(1, timeScale) : play(1);
+      play(1, timeScale);
+      frontDeviceState = 1;
+      frontDoorIsOpen.value = false;
+      backDoorIsOpen.value = true;
     }
+  }
 
-    if (selectData.frontGateClose == '1' && selectData.frontGateOpen == '0' && isFrontOpenRunning) {
-      isFrontOpenRunning = false;
-      if (frontDeviceState != 0) {
-        // import.meta.env.VITE_GLOB_IS_SIMULATE ? play(2, timeScale) : play(2);
-        play(2, timeScale);
-        frontDeviceState = 0;
-        frontDoorIsOpen.value = false;
-        // backDoorIsOpen.value = false
-      }
+  if (selectData.frontGateClose == '1' && selectData.frontGateOpen == '0' && isFrontOpenRunning) {
+    isFrontOpenRunning = false;
+    if (frontDeviceState != 0) {
+      // import.meta.env.VITE_GLOB_IS_SIMULATE ? play(2, timeScale) : play(2);
+      play(2, timeScale);
+      frontDeviceState = 0;
+      frontDoorIsOpen.value = false;
+      // backDoorIsOpen.value = false
     }
-    if (selectData.rearGateOpen == '1' && selectData.rearGateClose == '0' && !isRearOpenRunning) {
-      isRearOpenRunning = true;
+  }
+  if (selectData.rearGateOpen == '1' && selectData.rearGateClose == '0' && !isRearOpenRunning) {
+    isRearOpenRunning = true;
 
-      if (rearDeviceState != 1) {
-        rearDeviceState = 1;
-        // import.meta.env.VITE_GLOB_IS_SIMULATE ? play(3, timeScale) : play(3);
-        play(3, timeScale);
-        backDoorIsOpen.value = false;
-        frontDoorIsOpen.value = true;
-      }
+    if (rearDeviceState != 1) {
+      rearDeviceState = 1;
+      // import.meta.env.VITE_GLOB_IS_SIMULATE ? play(3, timeScale) : play(3);
+      play(3, timeScale);
+      backDoorIsOpen.value = false;
+      frontDoorIsOpen.value = true;
     }
-    if (selectData.rearGateOpen == '0' && selectData.rearGateClose == '0' && !isRearOpenRunning) {
-      isRearOpenRunning = true;
+  }
+  if (selectData.rearGateOpen == '0' && selectData.rearGateClose == '0' && !isRearOpenRunning) {
+    isRearOpenRunning = true;
 
-      if (rearDeviceState != 1) {
-        rearDeviceState = 1;
-        // import.meta.env.VITE_GLOB_IS_SIMULATE ? play(3, timeScale) : play(3);
-        play(3, timeScale);
-        backDoorIsOpen.value = false;
-        frontDoorIsOpen.value = true;
-      }
+    if (rearDeviceState != 1) {
+      rearDeviceState = 1;
+      // import.meta.env.VITE_GLOB_IS_SIMULATE ? play(3, timeScale) : play(3);
+      play(3, timeScale);
+      backDoorIsOpen.value = false;
+      frontDoorIsOpen.value = true;
     }
+  }
 
-    if (selectData.rearGateClose == '1' && selectData.rearGateOpen == '0' && isRearOpenRunning) {
-      isRearOpenRunning = false;
-      if (rearDeviceState != 0) {
-        rearDeviceState = 0;
-        // import.meta.env.VITE_GLOB_IS_SIMULATE ? play(4, timeScale) : play(4);
-        play(4, timeScale);
-        backDoorIsOpen.value = false;
-      }
+  if (selectData.rearGateClose == '1' && selectData.rearGateOpen == '0' && isRearOpenRunning) {
+    isRearOpenRunning = false;
+    if (rearDeviceState != 0) {
+      rearDeviceState = 0;
+      // import.meta.env.VITE_GLOB_IS_SIMULATE ? play(4, timeScale) : play(4);
+      play(4, timeScale);
+      backDoorIsOpen.value = false;
     }
+  }
 
-    if (selectData.midGateOpen == '1' && selectData.midGateClose == '0' && !isMidOpenRunning) {
-      isMidOpenRunning = true;
+  if (selectData.midGateOpen == '1' && selectData.midGateClose == '0' && !isMidOpenRunning) {
+    isMidOpenRunning = true;
 
-      if (midDeviceState != 1) {
-        midDeviceState = 1;
-        // import.meta.env.VITE_GLOB_IS_SIMULATE ? play(3, timeScale) : play(3);
-        play(8, timeScale);
-        backDoorIsOpen.value = false;
-        frontDoorIsOpen.value = true;
-      }
+    if (midDeviceState != 1) {
+      midDeviceState = 1;
+      // import.meta.env.VITE_GLOB_IS_SIMULATE ? play(3, timeScale) : play(3);
+      play(8, timeScale);
+      backDoorIsOpen.value = false;
+      frontDoorIsOpen.value = true;
     }
+  }
 
-    if (selectData.midGateOpen == '0' && selectData.midGateClose == '0' && !isMidOpenRunning) {
-      isMidOpenRunning = true;
+  if (selectData.midGateOpen == '0' && selectData.midGateClose == '0' && !isMidOpenRunning) {
+    isMidOpenRunning = true;
 
-      if (midDeviceState != 1) {
-        midDeviceState = 1;
-        // import.meta.env.VITE_GLOB_IS_SIMULATE ? play(3, timeScale) : play(3);
-        play(8, timeScale);
-        backDoorIsOpen.value = false;
-        frontDoorIsOpen.value = true;
-      }
+    if (midDeviceState != 1) {
+      midDeviceState = 1;
+      // import.meta.env.VITE_GLOB_IS_SIMULATE ? play(3, timeScale) : play(3);
+      play(8, timeScale);
+      backDoorIsOpen.value = false;
+      frontDoorIsOpen.value = true;
     }
+  }
 
-    if (selectData.midGateClose == '1' && selectData.midGateOpen == '0' && isMidOpenRunning) {
-      isMidOpenRunning = false;
-      if (midDeviceState != 0) {
-        midDeviceState = 0;
-        // import.meta.env.VITE_GLOB_IS_SIMULATE ? play(4, timeScale) : play(4);
-        play(9, timeScale);
-        backDoorIsOpen.value = false;
-      }
+  if (selectData.midGateClose == '1' && selectData.midGateOpen == '0' && isMidOpenRunning) {
+    isMidOpenRunning = false;
+    if (midDeviceState != 0) {
+      midDeviceState = 0;
+      // import.meta.env.VITE_GLOB_IS_SIMULATE ? play(4, timeScale) : play(4);
+      play(9, timeScale);
+      backDoorIsOpen.value = false;
     }
   }
+}
 
-  function playWindowAnimation(data, maxarea = 90, isFirst = false) {
-    computePlay(data, maxarea, isFirst);
-  }
+function playWindowAnimation(data, maxarea = 90, isFirst = false) {
+  computePlay(data, maxarea, isFirst);
+}
 
-  function handleCancel() {
-    modalIsShow.value = false;
-    modalTitle.value = '';
-    modalType.value = '';
-  }
+function handleCancel() {
+  modalIsShow.value = false;
+  modalTitle.value = '';
+  modalType.value = '';
+}
 
-  // // 远程、就地切换
-  // function changeType() {
-  //   const data = {
-  //     deviceid: selectData.deviceID,
-  //     devicetype: selectData.deviceType,
-  //     paramcode: 'autoRoManualControl',
-  //     value: selectData.autoRoManual,
-  //   };
-  //   deviceControlApi(data).then(() => {
-  //     if (globalConfig.History_Type == 'remote') {
-  //       message.success('指令已下发至生产管控平台成功!');
-  //     } else {
-  //       message.success('指令已下发成功!');
-  //     }
-  //   });
-  // }
+// // 远程、就地切换
+// function changeType() {
+//   const data = {
+//     deviceid: selectData.deviceID,
+//     devicetype: selectData.deviceType,
+//     paramcode: 'autoRoManualControl',
+//     value: selectData.autoRoManual,
+//   };
+//   deviceControlApi(data).then(() => {
+//     if (globalConfig.History_Type == 'remote') {
+//       message.success('指令已下发至生产管控平台成功!');
+//     } else {
+//       message.success('指令已下发成功!');
+//     }
+//   });
+// }
 
-  // async function getDataSource() {
-  //   dataSource.value = [];
-  //   const params = await resetFormParam();
-  //   if (stationType.value !== 'redis') {
-  //     const result = await defHttp.get({ url: '/safety/ventanalyMonitorData/listdays', params: params });
-  //     if (result['datalist']['records'].length > 0) {
-  //       dataSource.value = result['datalist']['records'].map((item: any) => {
-  //         return Object.assign(item, item['readData']);
-  //       });
-  //     } else {
-  //       dataSource.value = [];
-  //     }
-  //   } else {
-  //     const result = await defHttp.post({ url: '/monitor/history/getHistoryData', params: params });
-  //     dataSource.value = result['records'] || [];
-  //   }
-  // }
-  onMounted(async () => {
-    const { query } = unref(currentRoute);
-    if (query['deviceType']) deviceType.value = query['deviceType'] as string;
-    modelList.value = await getDictItems('gateModel');
-    loading.value = true;
-    const playerDom = document.getElementById('fm-player1')?.getElementsByClassName('vjs-tech')[0];
-    debugger;
-    mountedThree(playerDom)
-      .then(async () => {
-        if (sysOrgCode != 'zmhjhzmy') {
-          await getMonitor(true);
+// async function getDataSource() {
+//   dataSource.value = [];
+//   const params = await resetFormParam();
+//   if (stationType.value !== 'redis') {
+//     const result = await defHttp.get({ url: '/safety/ventanalyMonitorData/listdays', params: params });
+//     if (result['datalist']['records'].length > 0) {
+//       dataSource.value = result['datalist']['records'].map((item: any) => {
+//         return Object.assign(item, item['readData']);
+//       });
+//     } else {
+//       dataSource.value = [];
+//     }
+//   } else {
+//     const result = await defHttp.post({ url: '/monitor/history/getHistoryData', params: params });
+//     dataSource.value = result['records'] || [];
+//   }
+// }
+onMounted(async () => {
+  const { query } = unref(currentRoute);
+  if (query['deviceType']) deviceType.value = query['deviceType'] as string;
+  modelList.value = await getDictItems('gateModel');
+  loading.value = true;
+  const playerDom = document.getElementById('fm-player1')?.getElementsByClassName('vjs-tech')[0];
+  debugger;
+  mountedThree(playerDom)
+    .then(async () => {
+      if (sysOrgCode != 'zmhjhzmy') {
+        await getMonitor(true);
+        loading.value = false;
+      } else {
+        // 韩咀无风门设备,只有报警历史数据,无其他数据
+        setModelType('fm1').then(async () => {
           loading.value = false;
-        } else {
-          // 韩咀无风门设备,只有报警历史数据,无其他数据
-          setModelType('fm1').then(async () => {
-            loading.value = false;
-            dataSource.value = [];
-            addMonitorText(selectData);
-          });
-        }
-      })
-      .catch(() => {
-        debugger;
-      });
-  });
+          dataSource.value = [];
+          addMonitorText(selectData);
+        });
+      }
+    })
+    .catch(() => {
+      debugger;
+    });
+});
 
-  onBeforeUnmount(() => {
-    getDeviceBaseList();
-  });
+onBeforeUnmount(() => {
+  getDeviceBaseList();
+});
 
-  onUnmounted(() => {
-    removeCamera();
-    if (timer) {
-      clearTimeout(timer);
-      timer = undefined;
-    }
-    destroy();
-  });
+onUnmounted(() => {
+  removeCamera();
+  if (timer) {
+    clearTimeout(timer);
+    timer = undefined;
+  }
+  destroy();
+});
 </script>
 ,
 <style lang="less" scoped>
-  @import '/@/design/theme.less';
-  @import '/@/design/vent/modal.less';
-  .scene-box {
-    .bottom-tabs-box {
-      height: 350px;
-    }
+@import '/@/design/theme.less';
+@import '/@/design/vent/modal.less';
+.scene-box {
+  .bottom-tabs-box {
+    height: 350px;
   }
-  .button-box {
-    border: none !important;
-    height: 34px !important;
-
-    &:hover {
-      background: var(--vent-device-manager-control-btn-hover) !important;
-    }
-
-    &::before {
-      height: 27px !important;
-      background: var(--vent-device-manager-control-btn) !important;
-    }
+}
+.button-box {
+  border: none !important;
+  height: 34px !important;
 
-    &::after {
-      top: 35px !important;
-    }
+  &:hover {
+    background: var(--vent-device-manager-control-btn-hover) !important;
   }
 
-  :deep(.@{ventSpace}-tabs-tabpane-active) {
-    height: 100%;
+  &::before {
+    height: 27px !important;
+    background: var(--vent-device-manager-control-btn) !important;
   }
 
-  ::-webkit-scrollbar-thumb {
-    -webkit-box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2);
-    background: #4288a444;
-  }
-  :deep(.zxm-radio-disabled + span) {
-    color: var(--vent-font-color) !important;
-  }
-  :deep(.zxm-radio-disabled .zxm-radio-inner::after) {
-    background-color: #127cb5 !important;
-  }
-  :deep(.@{ventSpace}-picker-datetime-panel) {
-    height: 200px !important;
-    overflow-y: auto !important;
+  &::after {
+    top: 35px !important;
   }
+}
+
+:deep(.@{ventSpace}-tabs-tabpane-active) {
+  height: 100%;
+}
+
+::-webkit-scrollbar-thumb {
+  -webkit-box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2);
+  background: #4288a444;
+}
+:deep(.zxm-radio-disabled + span) {
+  color: var(--vent-font-color) !important;
+}
+:deep(.zxm-radio-disabled .zxm-radio-inner::after) {
+  background-color: #127cb5 !important;
+}
+:deep(.@{ventSpace}-picker-datetime-panel) {
+  height: 200px !important;
+  overflow-y: auto !important;
+}
 </style>