Browse Source

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

bobo04052021@163.com 2 weeks ago
parent
commit
8e427043bb
23 changed files with 863 additions and 1057 deletions
  1. BIN
      src/assets/images/home-green/db-green.png
  2. BIN
      src/assets/images/home-green/sz-green.png
  3. BIN
      src/assets/images/themify/deepblue/home-container/configurable/db-green.png
  4. BIN
      src/assets/images/themify/deepblue/home-container/configurable/sz-green.png
  5. 8 23
      src/views/vent/home/colliery/components/wind-monitor.vue
  6. 2 10
      src/views/vent/home/configurable/configurable.api.ts
  7. 2 53
      src/views/vent/home/configurable/configurable.data.ts
  8. 111 58
      src/views/vent/home/configurable/green/components/center-area-green.vue
  9. 0 3
      src/views/vent/home/configurable/green/components/content-green.vue
  10. 0 1
      src/views/vent/home/configurable/green/components/dz-card.vue
  11. 7 15
      src/views/vent/home/configurable/green/components/dz-chart.vue
  12. 21 2
      src/views/vent/home/configurable/green/components/dz-dust.vue
  13. 18 17
      src/views/vent/home/configurable/green/components/dz-gas.vue
  14. 25 28
      src/views/vent/home/configurable/green/components/dz-risk.vue
  15. 55 236
      src/views/vent/home/configurable/green/dust-green.vue
  16. 0 76
      src/views/vent/home/configurable/green/fire-green.vue
  17. 14 48
      src/views/vent/home/configurable/green/fusion-warn-green.vue
  18. 0 37
      src/views/vent/home/configurable/green/vent-Green.vue
  19. 266 266
      src/views/vent/monitorManager/AllDeviceMonitor/index.vue
  20. 282 138
      src/views/vent/monitorManager/safetyMonitor/HistoryTable.vue
  21. 33 26
      src/views/vent/monitorManager/safetyMonitor/index.vue
  22. 1 1
      src/views/vent/monitorManager/safetyMonitor/safety.data.ts
  23. 18 19
      src/views/vent/monitorManager/windowMonitor/dandaoFcBd1.threejs.ts

BIN
src/assets/images/home-green/db-green.png


BIN
src/assets/images/home-green/sz-green.png


BIN
src/assets/images/themify/deepblue/home-container/configurable/db-green.png


BIN
src/assets/images/themify/deepblue/home-container/configurable/sz-green.png


+ 8 - 23
src/views/vent/home/colliery/components/wind-monitor.vue

@@ -1,6 +1,6 @@
 <template>
   <div class="windMonitor">
-    <div class="title-top" @click="getDetail">风量监测</div>
+    <div class="title-top" @click="getDetail">风量监测111</div>
     <div class="wind-contents">
       <div class="wind-bar" ref="windBar"></div>
     </div>
@@ -10,7 +10,7 @@
 <script lang="ts" setup>
 import { ref, reactive, nextTick, onMounted, defineProps, watch } from 'vue';
 import * as echarts from 'echarts';
-import {getMaxY,getMinY} from '../clique.data'
+import { getMaxY, getMinY } from '../clique.data'
 const emit = defineEmits(['goDetail']);
 
 let props = defineProps({
@@ -21,7 +21,7 @@ let props = defineProps({
 let windBar = ref<any>();
 //坐标轴最大值
 let maxY = ref<any>(0);
-let minY=ref<any>(0)
+let minY = ref<any>(0)
 //echart数据
 let echartData = reactive<any>({ ydata: [], xdata: [] });
 //跳转详情
@@ -258,28 +258,13 @@ watch(
       if (el.readData.m3) {
         echartData.xdata.push(el.strinstallpos);
         echartData.ydata.push(el.readData.m3);
+      } else {
+        echartData.xdata.push('0');
+        echartData.ydata.push('0');
       }
     });
-    maxY.value = getMaxY( echartData.ydata)
-    minY.value = getMinY( echartData.ydata)
-    // maxY.value = echartData.ydata.reduce((acr, cur) => {
-    //   return parseFloat(acr) > parseFloat(cur) ? parseFloat(acr) : parseFloat(cur);
-    // });
-    // maxY.value =
-    //   maxY.value.toString().indexOf('.') == -1 ? maxY.value.toString() : maxY.value.toString().substring(0, maxY.value.toString().indexOf('.'));
-    // if (maxY.value.length < 2 && Number(maxY.value) < 1) {
-    //   maxY.value = 1
-    // } else if (maxY.value.length < 2 && Number(maxY.value) >= 1) {
-    //   maxY.value = 10
-    // } else if (maxY.value.length < 3) {
-    //   maxY.value = (Number(maxY.value[0]) + 1) * 10
-    // } else if (maxY.value.length < 4) {
-    //   maxY.value = (Number(maxY.value[0]) + 1) * 100
-    // } else if (maxY.value.length < 5) {
-    //   maxY.value = (Number(maxY.value[0]) + 1) * 1000
-    // } else if (maxY.value.length < 6) {
-    //   maxY.value = (Number(maxY.value[0]) + 1) * 10000
-    // }
+    maxY.value = getMaxY(echartData.ydata)
+    minY.value = getMinY(echartData.ydata)
     getOption();
   },
   {

+ 2 - 10
src/views/vent/home/configurable/configurable.api.ts

@@ -518,14 +518,7 @@ export const getTotal = (params) => {
         value1: el.pumpNumber
       }
     })
-    //风险权重比例数据
-    let risk = await getDisasterProportion({})
-    res.riskData = [
-      { name: '通风', value: risk.vent },
-      { name: '火灾', value: risk.fire },
-      { name: '瓦斯', value: risk.gas },
-      { name: '粉尘', value: risk.dust },
-    ]
+   
     //火灾监测预警数据
     res.fireInfos = reactive({})
     res.fireInfos.dataOn = []
@@ -567,7 +560,6 @@ export const getTotal = (params) => {
         ? res.info.sysInfo.fireS.summaryInfo.external.coval.value
         : '-'
       : '';
-      console.log( res.fireInfos,'000-')
     //粉尘监测预警数据
      res.dustInfo = [
           {
@@ -591,7 +583,7 @@ export const getTotal = (params) => {
             value: dataVent.dust ? dataVent.dust : res.info.sysInfo.dustS.levels.blue
           },
         ];
-    console.log(res.dustInfo,'dustdev')
+   
 
     return res;
   });

+ 2 - 53
src/views/vent/home/configurable/configurable.data.ts

@@ -3347,7 +3347,7 @@ export const testConfigFusionGreen: Config[] = [
         link: '',
       },
       layout: {
-        direction: 'column',
+        direction: 'row',
         items: [
           {
             name: 'dz_gas',
@@ -3387,62 +3387,11 @@ export const testConfigFusionGreen: Config[] = [
       // mock: BDfireMock,
     },
     showStyle: {
-      size: 'width:614px;height:240px;',
+      size: 'width:990px;height:170px;',
       version: '原版',
       position: 'bottom:15px;left:450px',
     },
   },
-  {
-    deviceType: 'fusionManageInfo',
-    moduleName: '风险权重比例',
-    pageType: 'riskData',
-    moduleData: {
-      header: {
-        show: false,
-        readFrom: '',
-        selector: {
-          show: false,
-          value: '',
-        },
-        slot: {
-          show: false,
-          value: '',
-        },
-      },
-      background: {
-        show: false,
-        type: 'video',
-        link: '',
-      },
-      layout: {
-        direction: 'column',
-        items: [
-          {
-            name: 'dz_risk',
-            basis: '100%',
-          },
-        ],
-      },
-      board: [],
-      chart: [],
-      gallery: [],
-      gallery_list: [],
-      table: [],
-      list: [],
-      complex_list: [],
-      preset: [
-        {
-          readFrom: 'riskData',
-        },
-      ],
-      // mock: BDfireMock,
-    },
-    showStyle: {
-      size: 'width:360px;height:240px;',
-      version: '原版',
-      position: 'bottom:15px;right:450px',
-    },
-  },
 ];
 
 export const testConfigVentNew: Config[] = [

+ 111 - 58
src/views/vent/home/configurable/green/components/center-area-green.vue

@@ -3,46 +3,46 @@
         <div class="container">
             <div class="risk-score">
                 <div class="item-label">风险得分</div>
-                <div class="item-val">{{ paramData.riskLevel !== undefined && paramData.riskLevel !== null ?
-                    paramData.riskLevel
+                <div class="item-val">{{ paramDatas.riskLevel !== undefined && paramDatas.riskLevel !== null ?
+                    paramDatas.riskLevel
                     : '-' }}</div>
             </div>
             <div class="dust-warn">
                 <div class="dust-icon"></div>
                 <div class="item-content">
                     <div class="ite-label">粉尘监测预警</div>
-                    <div class="ite-val">{{ paramData.fc == 0
+                    <div class="ite-val">{{ paramDatas.fc == 0
                         ? '低风险'
-                        : paramData.fc == 101
+                        : paramDatas.fc == 101
                             ? '低风险'
-                            : paramData.fc == 102
+                            : paramDatas.fc == 102
                                 ? '一般风险'
-                                : paramData.fc == 103
+                                : paramDatas.fc == 103
                                     ? '较大风险'
-                                    : paramData.fc == 104
+                                    : paramDatas.fc == 104
                                         ? '重大风险'
-                                        : paramData.fc == 201
+                                        : paramDatas.fc == 201
                                             ? '报警'
-                                            : paramData.fc }}</div>
+                                            : paramDatas.fc }}</div>
                 </div>
             </div>
             <div class="vent-warn">
                 <div class="vent-icon"></div>
                 <div class="item-content">
                     <div class="ite-label">通风监测预警</div>
-                    <div class="ite-val">{{ paramData.tf == 0
+                    <div class="ite-val">{{ paramDatas.tf == 0
                         ? '低风险'
-                        : paramData.tf == 101
+                        : paramDatas.tf == 101
                             ? '低风险'
-                            : paramData.tf == 102
+                            : paramDatas.tf == 102
                                 ? '一般风险'
-                                : paramData.tf == 103
+                                : paramDatas.tf == 103
                                     ? '较大风险'
-                                    : paramData.tf == 104
+                                    : paramDatas.tf == 104
                                         ? '重大风险'
-                                        : paramData.tf == 201
+                                        : paramDatas.tf == 201
                                             ? '报警'
-                                            : paramData.tf }}</div>
+                                            : paramDatas.tf }}</div>
                 </div>
             </div>
             <div class="gas-warn">
@@ -50,19 +50,19 @@
                 <div class="item-content1">
                     <div class="ite-content">
                         <div class="ite-label">瓦斯监测预警</div>
-                        <div class="ite-val">{{ paramData.ws == 0
+                        <div class="ite-val">{{ paramDatas.ws == 0
                             ? '低风险'
-                            : paramData.ws == 101
+                            : paramDatas.ws == 101
                                 ? '低风险'
-                                : paramData.ws == 102
+                                : paramDatas.ws == 102
                                     ? '一般风险'
-                                    : paramData.ws == 103
+                                    : paramDatas.ws == 103
                                         ? '较大风险'
-                                        : paramData.ws == 104
+                                        : paramDatas.ws == 104
                                             ? '重大风险'
-                                            : paramData.ws == 201
+                                            : paramDatas.ws == 201
                                                 ? '报警'
-                                                : paramData.ws }}</div>
+                                                : paramDatas.ws }}</div>
                     </div>
                     <div class="ite-content">
                         <div class="ite-label">矿井瓦斯等级鉴定</div>
@@ -74,46 +74,65 @@
                 <div class="device-icon"></div>
                 <div class="item-content">
                     <div class="ite-label">设备监测预警</div>
-                    <div class="ite-val">{{ paramData.sb == 0
+                    <div class="ite-val">{{ paramDatas.sb == 0
                         ? '低风险'
-                        : paramData.sb == 101
+                        : paramDatas.sb == 101
                             ? '低风险'
-                            : paramData.sb == 102
+                            : paramDatas.sb == 102
                                 ? '一般风险'
-                                : paramData.sb == 103
+                                : paramDatas.sb == 103
                                     ? '较大风险'
-                                    : paramData.sb == 104
+                                    : paramDatas.sb == 104
                                         ? '重大风险'
-                                        : paramData.sb == 201
+                                        : paramDatas.sb == 201
                                             ? '报警'
-                                            : paramData.sb }}</div>
+                                            : paramDatas.sb }}</div>
                 </div>
             </div>
             <div class="fire-warn">
                 <div class="fire-icon"></div>
                 <div class="item-content">
                     <div class="ite-label">火灾监测预警</div>
-                    <div class="ite-val">{{ paramData.fire == 0
+                    <div class="ite-val">{{ paramDatas.fire == 0
                         ? '低风险'
-                        : paramData.fire == 101
+                        : paramDatas.fire == 101
                             ? '低风险'
-                            : paramData.fire == 102
+                            : paramDatas.fire == 102
                                 ? '一般风险'
-                                : paramData.fire == 103
+                                : paramDatas.fire == 103
                                     ? '较大风险'
-                                    : paramData.fire == 104
+                                    : paramDatas.fire == 104
                                         ? '重大风险'
-                                        : paramData.fire == 201
+                                        : paramDatas.fire == 201
                                             ? '报警'
-                                            : paramData.fire }}</div>
+                                            : paramDatas.fire }}</div>
                 </div>
             </div>
+            <div class="db-warn">
+                <div class="db-icon"></div>
+                <div class="item-content">
+                    <div class="ite-label">顶板</div>
+                    <div class="ite-val">低风险</div>
+                </div>
+            </div>
+            <div class="sz-warn">
+                <div class="sz-icon"></div>
+                <div class="item-content">
+                    <div class="ite-label">水灾</div>
+                    <div class="ite-val">低风险</div>
+                </div>
+            </div>
+            <div class="risk-echartbox">
+                <RiskWarnLevel :echartData="paramDatas.riskData"></RiskWarnLevel>
+            </div>
         </div>
     </div>
 </template>
 
 <script lang="ts" setup>
+import { reactive, watch } from 'vue'
 import { useGlobSetting } from '/@/hooks/setting';
+import RiskWarnLevel from './dz-risk.vue'
 let props = defineProps({
     paramData: {
         type: Object,
@@ -122,8 +141,12 @@ let props = defineProps({
         }
     }
 })
+let paramDatas = reactive<any>({})
 const { sysOrgCode, sysDataType } = useGlobSetting();
 
+watch(() => props.paramData, (newV, oldV) => {
+    paramDatas =newV
+}, { immediate: true,deep:true })
 </script>
 
 <style lang="less" scoped>
@@ -138,6 +161,8 @@ const { sysOrgCode, sysDataType } = useGlobSetting();
         --image-model_gas_warn: url('@/assets/images/themify/deepblue/home-container/configurable/1-3.png');
         --image-model_device_warn: url('@/assets/images/themify/deepblue/home-container/configurable/1-6.png');
         --image-model_fire_warn: url('@/assets/images/themify/deepblue/home-container/configurable/1-4.png');
+        --image-model_db_warn: url('@/assets/images/themify/deepblue/home-container/configurable/db-green.png');
+        --image-model_sz_warn: url('@/assets/images/themify/deepblue/home-container/configurable/sz-green.png');
         --image-model_item_content: url('@/assets/images/themify/deepblue/home-container/configurable/1-8.png');
         --image-model_item_content1: url('@/assets/images/themify/deepblue/home-container/configurable/1-9.png');
     }
@@ -151,6 +176,8 @@ const { sysOrgCode, sysDataType } = useGlobSetting();
     --image-model_gas_warn: url('@/assets/images/home-green/1-3.png');
     --image-model_device_warn: url('@/assets/images/home-green/1-6.png');
     --image-model_fire_warn: url('@/assets/images/home-green/1-4.png');
+    --image-model_db_warn: url('@/assets/images/home-green/db-green.png');
+    --image-model_sz_warn: url('@/assets/images/home-green/sz-green.png');
     --image-model_item_content: url('@/assets/images/home-green/1-8.png');
     --image-model_item_content1: url('@/assets/images/home-green/1-9.png');
     height: 100%;
@@ -161,9 +188,15 @@ const { sysOrgCode, sysDataType } = useGlobSetting();
         height: calc(100% - 25px);
         margin-top: 25px;
         background: var(--image-model_container_img) no-repeat center;
-        background-size: 95% 100%;
+        background-size: 100% 100%;
     }
-
+.risk-echartbox{
+       position: absolute;
+    left: 18px;
+    top: -52px;
+    width: 220px;
+    height: 170px;
+}
     .risk-score {
         position: absolute;
         left: 50%;
@@ -190,54 +223,74 @@ const { sysOrgCode, sysDataType } = useGlobSetting();
 
     .dust-warn {
         position: absolute;
-        left: 220px;
+        left: 242px;
         top: 52px;
-        width: 120px;
-        height: 106px;
+        width: 132px;
+        height: 108px;
         background: var(--image-model_dust_warn) no-repeat;
         background-size: 100% 100%;
     }
 
     .vent-warn {
         position: absolute;
-        left: 134px;
-        top: 232px;
-        width: 120px;
-        height: 106px;
+        left: 200px;
+        top: 334px;
+        width: 132px;
+        height: 108px;
         background: var(--image-model_vent_warn) no-repeat;
         background-size: 100% 100%;
     }
 
     .gas-warn {
         position: absolute;
-        left: 434px;
-        top: 368px;
-        width: 120px;
-        height: 106px;
+        left: 414px;
+        top: 416px;
+        width: 132px;
+        height: 108px;
         background: var(--image-model_gas_warn) no-repeat;
         background-size: 100% 100%;
     }
 
     .device-warn {
         position: absolute;
-        right: 130px;
-        top: 222px;
-        width: 120px;
-        height: 106px;
+        right: 196px;
+        top: 340px;
+        width: 132px;
+        height: 108px;
         background: var(--image-model_device_warn) no-repeat;
         background-size: 100% 100%;
     }
 
     .fire-warn {
         position: absolute;
-        right: 121px;
-        top: 52px;
-        width: 120px;
-        height: 106px;
+        right: 142px;
+        top: 58px;
+        width: 132px;
+        height: 108px;
         background: var(--image-model_fire_warn) no-repeat;
         background-size: 100% 100%;
     }
 
+    .db-warn {
+        position: absolute;
+        left: 42px;
+        top: 182px;
+        width: 132px;
+        height: 108px;
+        background: var(--image-model_db_warn) no-repeat;
+        background-size: 100% 100%;
+    }
+
+    .sz-warn {
+        position: absolute;
+        right: -2px;
+        top: 136px;
+        width: 132px;
+        height: 108px;
+        background: var(--image-model_sz_warn) no-repeat;
+        background-size: 100% 100%;
+    }
+
     .item-content {
         position: absolute;
         left: -4px;

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

@@ -88,9 +88,6 @@
         <template v-if="config.name === 'dz_dust'">
           <DzDust :echartOption="config.config" :paramData="config.data"></DzDust>
         </template>
-        <template v-if="config.name === 'dz_risk'">
-          <DzRisk :riskData="config.data"></DzRisk>
-        </template>
         <template v-if="config.name === 'dz_gas'">
           <DzGas :type="config.config.type" :titleData="config.config.titleData" :gasData="config.data"></DzGas>
         </template>

+ 0 - 1
src/views/vent/home/configurable/green/components/dz-card.vue

@@ -76,7 +76,6 @@ let props = defineProps({
 let infoData = reactive({})
 
 watch(() => props.paramData, (newV, oldV) => {
-    console.log(newV, '火灾---')
     infoData = Object.assign({}, newV)
 }, { immediate: true })
 </script>

+ 7 - 15
src/views/vent/home/configurable/green/components/dz-chart.vue

@@ -190,17 +190,17 @@ function getOption() {
                         formatter: (params) => {
                             let text;
                             if (params.dataIndex == 0) {
-                                text = '{a| ' + params.data + '}';
+                                text = '{a| ' + params.data + '}';
                             } else if (params.dataIndex == 1) {
-                                text = '{b| ' + params.data + '}';
+                                text = '{b| ' + params.data + '}';
                             } else if (params.dataIndex == 2) {
-                                text = '{c| ' + params.data + '}';
+                                text = '{c| ' + params.data + '}';
                             } else if (params.dataIndex == 3) {
-                                text = '{d| ' + params.data + '}';
+                                text = '{d| ' + params.data + '}';
                             } else if (params.dataIndex == 4) {
-                                text = '{e| ' + params.data + '}';
+                                text = '{e| ' + params.data + '}';
                             } else {
-                                text = '{f| ' + params.data + '}';
+                                text = '{f| ' + params.data + '}';
                             }
 
                             return text;
@@ -225,7 +225,7 @@ function getOption() {
                                 color: "#fff"
                             },
                         },
-                        position: [330, -12],
+                        position: [350, -12],
                         show: true
                     }
                 },
@@ -277,18 +277,10 @@ function getOption() {
 
 }
 
-
-
-
-
-
-
 watch(() => props.echartData, (newV, oldV) => {
-  console.log(newV,'99900')
   if(newV.length){
     category.value=newV
     echartY.value=newV.map((el:any)=>el.value)
-    console.log(echartY.value,'900')
     getOption()
   }
 }, { immediate: true,  })

+ 21 - 2
src/views/vent/home/configurable/green/components/dz-dust.vue

@@ -94,7 +94,7 @@ function getOption() {
                 trigger: 'item',
             },
             grid: {
-                top: "8%",
+                top: "12%",
                 left: "5%",
                 right: "5%",
                 bottom: "5%",
@@ -236,6 +236,26 @@ function getOption() {
                     },
                     data: yData.value,
                 },
+                {
+                    type: "bar",
+                    label: {
+                        normal: {
+                            show: true,
+                            position: "top",
+                            formatter: (e) => {
+                                return e.value + "次";
+                            },
+                            fontSize: 12,
+                           color:'#fff',
+                            offset: [0, -6],
+                        },
+                    },
+                    itemStyle: {
+                        color: "transparent",
+                    },
+                    tooltip: {},
+                    data: yData.value,
+                },
             ],
         };
         myChart.setOption(option);
@@ -246,7 +266,6 @@ function getOption() {
 }
 
 watch(() => props.paramData, (newV, oldV) => {
-    console.log(newV, '粉尘---')
     xData.value = newV.map((el: any) => el.name)
     yData.value = newV.map((el: any) => el.value)
     getOption()

+ 18 - 17
src/views/vent/home/configurable/green/components/dz-gas.vue

@@ -53,21 +53,22 @@ let props = defineProps({
     --image-model_fire-container_A: url('@/assets/images/home-green/1300.png');
     --image-model_fire-container_B: url('@/assets/images/home-green/1200.png');
     height: 100%;
-    padding: 10px 25px 0px 25px;
+    padding-top: 20px;
+    margin: 0px 10px;
     box-sizing: border-box;
 
-    .fire-container_A {
+    .fire-container {
         position: relative;
         width: 100%;
-        height: 85px;
+        height: 96px;
+    }
+
+    .fire-container_A {
         background: var(--image-model_fire-container_A) no-repeat;
         background-size: 100% 100%;
     }
 
     .fire-container_B {
-        position: relative;
-        width: 100%;
-        height: 85px;
         background: var(--image-model_fire-container_B) no-repeat;
         background-size: 100% 100%;
     }
@@ -77,7 +78,7 @@ let props = defineProps({
         justify-content: space-between;
         align-items: center;
         position: absolute;
-        left: 122px;
+        left: 102px;
         top: 0;
     }
 
@@ -86,8 +87,8 @@ let props = defineProps({
         justify-content: space-between;
         align-items: center;
         position: absolute;
-        left: 122px;
-        top: 32px;
+        left: 102px;
+        top: 36px;
     }
 
     .content-box-item {
@@ -106,13 +107,13 @@ let props = defineProps({
 
 
     .title-box_A {
-        width: 398px;
-        height: 32px;
+        width: 342px;
+        height: 36px;
     }
 
     .title-box_B {
-        width: 398px;
-        height: 32px;
+        width: 342px;
+        height: 36px;
     }
 
     .title-box-label_A {
@@ -135,14 +136,14 @@ let props = defineProps({
 
     .content-box_A {
         display: flex;
-        width: 398px;
-        height: 42px;
+        width: 342px;
+        height: calc(100% - 36px);
     }
 
     .content-box_B {
         display: flex;
-        width: 398px;
-        height: 42px;
+        width: 342px;
+        height: calc(100% - 36px);
     }
 
 

+ 25 - 28
src/views/vent/home/configurable/green/components/dz-risk.vue

@@ -12,7 +12,7 @@ import { ref, nextTick, onMounted, watch } from 'vue'
 import * as echarts from 'echarts';
 
 let props = defineProps({
-    riskData: {
+    echartData: {
         type: Array,
         default: () => {
             return []
@@ -21,7 +21,7 @@ let props = defineProps({
 })
 
 let riskPie = ref(null)
-let echartData = ref<any[]>([])
+let echartDatas = ref<any[]>([])
 
 function getOption() {
     nextTick(() => {
@@ -76,20 +76,16 @@ function getOption() {
             series: [{
                 type: 'pie',
                 center: ['50%', '50%'],
-                radius: ['48%', '70%'],
-                // clockwise: false,
-                // avoidLabelOverlap: true,
+                radius: ['30%', '50%'],
                 emphasis: {
                     label: {
                         show: true
                     },
-                    itemStyle: {
-                        color: function (params) {
-                            return colorList[params.dataIndex]
-                        }
+                    opacity:1,
+                    color: function (params) {
+                        return colorList[params.dataIndex]
                     }
                 },
-                // hoverOffset: 0,
                 itemStyle: {
                     normal: {
                         color: function (params) {
@@ -102,17 +98,17 @@ function getOption() {
                     position: 'outside',
                     textStyle: {
                         color: "#fff",
-                        fontSize: 12
+                        fontSize: 10
                     },
-                    formatter: '{a|{b}:{d}%}\n{hr|}',
+                    formatter: '{b}:{c}',
                     rich: {
-                        hr: {
-                            backgroundColor: 't',
-                            borderRadius: 3,
-                            width: 3,
-                            height: 3,
-                            padding: [3, 3, 0, -12]
-                        },
+                        // hr: {
+                        //     backgroundColor: 't',
+                        //     borderRadius: 3,
+                        //     width: 3,
+                        //     height: 3,
+                        //     padding: [3, 3, 0, -12]
+                        // },
                         a: {
                             padding: [-10, 5, -15, 5]
                         }
@@ -122,14 +118,14 @@ function getOption() {
 
                 labelLine: {
                     normal: {
-                        length: 20,
-                        length2: 20,
+                        length: 10,
+                        length2: 5,
                         lineStyle: {
                             width: 1
                         }
                     }
                 },
-                data: echartData.value,
+                data: echartDatas.value,
             }]
         };
         myChart.setOption(option);
@@ -139,8 +135,8 @@ function getOption() {
     });
 }
 
-watch(() => props.riskData, (newV, oldV) => {
-    echartData.value = newV
+watch(() => props.echartData, (newV, oldV) => {
+    echartDatas.value = newV
     getOption()
 }, { immediate: true })
 
@@ -148,6 +144,7 @@ watch(() => props.riskData, (newV, oldV) => {
 
 <style lang="less" scoped>
 @import '/@/design/theme.less';
+
 @{theme-deepblue} {
     .dz-risk {
         --image-model_risk-container: url('@/assets/images/themify/deepblue/home-container/configurable/1400.png');
@@ -159,13 +156,13 @@ watch(() => props.riskData, (newV, oldV) => {
     --image-model_risk-container: url('@/assets/images/home-green/1400.png');
     --image-model_risk-center: url('@/assets/images/home-green/1500.png');
     height: 100%;
+
     .risk-container {
         position: relative;
         height: 100%;
         width: 100%;
-        height: 210px;
         background: var(--image-model_risk-container) no-repeat center;
-        background-size: auto 100%;
+        background-size: 55% 72%;
 
         .risk-center {
             position: absolute;
@@ -173,8 +170,8 @@ watch(() => props.riskData, (newV, oldV) => {
             top: 50%;
             transform: translate(-50%, -50%);
             width: 100%;
-            height: 80px;
-            background: var( --image-model_risk-center) no-repeat center;
+            height: 40px;
+            background: var(--image-model_risk-center) no-repeat center;
             background-size: auto 100%;
         }
 

+ 55 - 236
src/views/vent/home/configurable/green/dust-green.vue

@@ -3,19 +3,9 @@
     <!-- 如果是有 deviceType、type 等 query,认为是详情页,不需要展示普通模块,只需要模型 -->
     <template v-if="!route.query.deviceType">
       <div class="main-container">
-        <ModuleOriginal
-          v-for="cfg in configs"
-          :key="cfg.deviceType"
-          :show-style="cfg.showStyle"
-          :module-data="cfg.moduleData"
-          :module-name="cfg.moduleName"
-          :device-type="cfg.deviceType"
-          :data="data"
-          :visible="true"
-        />
-        <div class="left-area"></div>
-        <div class="right-area"></div>
-        <div class="bottom-area"></div>
+        <ModuleOriginal v-for="cfg in configs" :key="cfg.deviceType" :show-style="cfg.showStyle"
+          :module-data="cfg.moduleData" :module-name="cfg.moduleName" :device-type="cfg.deviceType" :data="data"
+          :visible="true" />
       </div>
     </template>
     <div style="width: 1020px; height: 530px; position: absolute; left: 436px; top: 0">
@@ -24,240 +14,69 @@
   </div>
 </template>
 <script lang="ts" setup>
-  import { onMounted, onUnmounted } from 'vue';
-  import { useInitConfigs, useInitPage } from '../hooks/useInit';
-  import ModuleOriginal from './components/ModuleOriginal-green.vue';
-  import VentModal from '/@/components/vent/micro/ventModal.vue';
-  // import { list } from './configurable.api';
-  import { useRoute } from 'vue-router';
-  import { useGlobSetting } from '/@/hooks/setting';
-  import { BDDustMock } from '../mock';
-  import { testConfigDustGreen } from '../configurable.data';
-
-  const { title = '智能通风管控系统' } = useGlobSetting();
-  const { configs, fetchConfigs } = useInitConfigs();
-  const { data, updateData, updateEnhancedConfigs } = useInitPage(title);
-  const route = useRoute();
-  let interval: number | undefined;
-  // let configs = ref<any[]>([]);
-
-  // let configsLeft = computed(() => {
-  //   return configs.value.filter((v) => v.showStyle.position.includes('top') && v.showStyle.position.includes('left'));
-  // });
-  // let configsBottom = computed(() => {
-  //   return configs.value.filter((v) => v.showStyle.position.includes('bottom'));
-  // });
-  // let configsRight = computed(() => {
-  //   return configs.value.filter((v) => v.showStyle.position.includes('right'));
-  // });
-  // function refresh() {
-  //   fetchConfigs('dust-green').then(() => {
-  //     console.log('debug r.', configs.value, configsBottom.value, isOriginal)
-  //     // configs.value = testConfigDustGreen
-  //     // updateEnhancedConfigs(configs.value);
-
-  //     // 测风装置	windrect
-  //     // 自动风窗	window
-  //     // 自动风门	gate
-  //     // 传感器	modelsensor
-  //     // 局部通风机	fanlocal
-  //     // 主通风机	fanmain
-  //     // 密闭	obfurage
-  //     // 安全监控	safetymonitor
-  //     // 光纤测温	fiber
-  //     // 束管监测	bundletube
-  //     // 制氮	nitrogen
-  //     // 制浆	pulping
-  //     // 喷淋	spray
-  //     // 喷粉	dustdev
-  //     // 喷雾设备	atomizing
-  //     // 除尘风机	dedustefan
-  //     // 粉尘传感器	dustsensor
-  //     // 转载点	transferpoint
-  //     // 瓦斯抽采泵	pump
-  //     // 粉尘	dusting
-  //     // 瓦斯监测	gasmonitor
-  //     // 球阀	ballvalve
-  //     // 压风机	forcFan
-  //     // 瓦斯巡检	gaspatrol
-  //     // 防火门	firedoor
-  //     // 隔爆设施	explosionProof
-  //     // 瓦斯管道阀门	gasvalve
-  //     list({
-  //       types: configs.value
-  //         .filter((e) => e.deviceType)
-  //         .map((e) => e.deviceType)
-  //         .join(','),
-  //     }).then(updateData);
-  //   });
-  // }
-
-  // function initInterval() {
-  //   setInterval(() => {
-  //     list({
-  //       types: configs.value
-  //         .filter((e) => e.deviceType)
-  //         .map((e) => e.deviceType)
-  //         .join(','),
-  //     }).then(updateData);
-  //   }, 60000);
-  // }
-
-  // watch(
-  //   () => route.query,
-  //   () => {
-  //     if (route.query.deviceType) {
-  //       // 仅需要展示子应用,模拟 unmounted
-  //       clearInterval(interval);
-  //     } else {
-  //       // 模拟 mounted
-  //       refresh();
-  //       initInterval();
-  //     }
-  //   }
-  // );
-
-  onMounted(() => {
-    fetchConfigs('dust-green').then(() => {
-      configs.value = testConfigDustGreen;
-      updateEnhancedConfigs(configs.value);
-      Promise.resolve(BDDustMock).then(updateData);
-      // getHomeData({}).then(updateData);
-    });
-    // setInterval(() => {
-    //   getHomeData({}).then(updateData);
-    // }, 60000);
-  });
-
-  onUnmounted(() => {
-    clearInterval(interval);
+import { onMounted, onUnmounted } from 'vue';
+import { useInitConfigs, useInitPage } from '../hooks/useInit';
+import ModuleOriginal from './components/ModuleOriginal-green.vue';
+import VentModal from '/@/components/vent/micro/ventModal.vue';
+// import { list } from './configurable.api';
+import { useRoute } from 'vue-router';
+import { useGlobSetting } from '/@/hooks/setting';
+import { BDDustMock } from '../mock';
+import { testConfigDustGreen } from '../configurable.data';
+
+const { title = '智能通风管控系统' } = useGlobSetting();
+const { configs, fetchConfigs } = useInitConfigs();
+const { data, updateData, updateEnhancedConfigs } = useInitPage(title);
+const route = useRoute();
+let interval: number | undefined;
+
+onMounted(() => {
+  fetchConfigs('dust-green').then(() => {
+    configs.value = testConfigDustGreen;
+    updateEnhancedConfigs(configs.value);
+    Promise.resolve(BDDustMock).then(updateData);
+    // getHomeData({}).then(updateData);
   });
+  // setInterval(() => {
+  //   getHomeData({}).then(updateData);
+  // }, 60000);
+});
+
+onUnmounted(() => {
+  clearInterval(interval);
+});
 </script>
 <style lang="less" scoped>
-  @import '/@/design/theme.less';
+@import '/@/design/theme.less';
 
-  @font-face {
-    font-family: 'douyuFont';
-    src: url('/@/assets/font/douyuFont.otf');
-  }
+@font-face {
+  font-family: 'douyuFont';
+  src: url('/@/assets/font/douyuFont.otf');
+}
 
-  @{theme-deepblue} {
-    .dust-green{
-      --image-modal-top: url('/@/assets/images/themify/deepblue/vent/home/modal-top.png');
-    }
+@{theme-deepblue} {
+  .dust-green {
+    --image-modal-top: url('/@/assets/images/themify/deepblue/vent/home/modal-top.png');
   }
+}
 
-  .dust-green {
-    --image-modal-top: url('/@/assets/images/vent/home/modal-top.png');
-    --image-monitor-realtime: url('/@/assets/images/company/monitor-realtime.png');
-    --image-monitor-doc: url('/@/assets/images/company/monitor-doc.png');
-    --image-monitor-goto: url('/@/assets/images/company/monitor-goto.png');
+.dust-green {
+  --image-modal-top: url('/@/assets/images/vent/home/modal-top.png');
+  --image-monitor-realtime: url('/@/assets/images/company/monitor-realtime.png');
+  --image-monitor-doc: url('/@/assets/images/company/monitor-doc.png');
+  --image-monitor-goto: url('/@/assets/images/company/monitor-goto.png');
 
-     width: 100%;
+  width: 100%;
   height: 100%;
   position: relative;
 
-    .main-container {
-      width: 100%;
-      height: 100%;
-   
-      .left-area {
-        position: absolute;
-        left: 0;
-        top: 0;
-        width: 420px;
-        height: 100%;
-        padding: 15px;
-        background: url('../../../../assets/images/home-green/green-bd-left.png') no-repeat;
-        background-size: 100% 100%;
-        box-sizing: border-box;
-        overflow-y: auto;
-      }
-
-      .bottom-area {
-        position: absolute;
-        left: 435px;
-        bottom: 0;
-        width: calc(100% - 435px);
-        height: 290px;
-        padding: 15px;
-        background: url('../../../../assets/images/home-green/green-bd-bottom.png') no-repeat;
-        background-size: 100% 100%;
-        box-sizing: border-box;
-      }
-
-      .right-area {
-        position: absolute;
-        right: 0px;
-        top: 0px;
-        width: 420px;
-        height: calc(100% - 305px);
-        padding: 15px 15px 0px 15px;
-        background: url('../../../../assets/images/home-green/green-bd-left.png') no-repeat;
-        background-size: 100% 100%;
-        box-sizing: border-box;
-        overflow-y: auto;
-      }
-    }
-
-    // .module-left {
-    //   position: absolute;
-    //   width: 450px;
-    //   height: 280px;
-    //   left: 0;
-    // }
-    // .module-right {
-    //   position: absolute;
-    //   width: 450px;
-    //   height: 280px;
-    //   right: 0;
-    // }
-    // .module-bottom {
-    //   position: absolute;
-    //   width: 1000px;
-    //   height: 280px;
-    // }
-    .module-dropdown {
-      padding: 5px;
-      background-image: @vent-configurable-dropdown;
-      border-bottom: 2px solid @vent-configurable-home-light-border;
-      color: @vent-font-color;
-      position: absolute;
-      top: 60px;
-      right: 480px;
-    }
-
-    .module-dropdown-original {
-      padding: 10px;
-      background-image: @vent-configurable-dropdown;
-      border-bottom: 2px solid @vent-configurable-home-light-border;
-      color: @vent-font-color;
-      position: absolute;
-      top: 70px;
-      right: 460px;
-    }
-
-    .module-trigger-button {
-      color: @vent-font-color;
-      background-image: @vent-configurable-dropdown;
-      border: none;
-      border-bottom: 2px solid @vent-configurable-home-light-border;
-    }
-
-    .realtime-mode {
-      background-image: var(--image-monitor-realtime);
-    }
-
-    .module-monitor-bar {
-      position: absolute;
-      top: 100px;
-      width: 1000px;
-      height: 200px;
-      left: calc(50% - 500px);
-    }
+  .main-container {
+    width: 100%;
+    height: 100%;
   }
+}
 
-  :deep(.loading-box) {
-    position: unset;
-  }
+:deep(.loading-box) {
+  position: unset;
+}
 </style>

+ 0 - 76
src/views/vent/home/configurable/green/fire-green.vue

@@ -66,82 +66,6 @@ onUnmounted(() => {
   .main-container {
     width: 100%;
     height: 100%;
-
-
-    .left-area {
-      position: absolute;
-      left: 0;
-      top: 0;
-      width: 420px;
-      height: 100%;
-      padding: 15px;
-      background: var(--image-model_left-area) no-repeat;
-      background-size: 100% 100%;
-      box-sizing: border-box;
-      overflow-y: auto;
-    }
-
-    .bottom-area {
-      position: absolute;
-      left: 435px;
-      bottom: 0;
-      width: calc(100% - 435px);
-      height: 290px;
-      padding: 15px;
-      background: var(--image-model_bottom-area) no-repeat;
-      background-size: 100% 100%;
-      box-sizing: border-box;
-    }
-
-    .right-area {
-      position: absolute;
-      right: 0px;
-      top: 0px;
-      width: 420px;
-      height: calc(100% - 305px);
-      padding: 15px 15px 0px 15px;
-      background: var(--image-model_left-area) no-repeat;
-      background-size: 100% 100%;
-      box-sizing: border-box;
-      overflow-y: auto;
-    }
-  }
-
-  .module-dropdown {
-    padding: 5px;
-    background-image: @vent-configurable-dropdown;
-    border-bottom: 2px solid @vent-configurable-home-light-border;
-    color: @vent-font-color;
-    position: absolute;
-    top: 60px;
-    right: 480px;
-  }
-
-  .module-dropdown-original {
-    padding: 10px;
-    background-image: @vent-configurable-dropdown;
-    border-bottom: 2px solid @vent-configurable-home-light-border;
-    color: @vent-font-color;
-    position: absolute;
-    top: 70px;
-    right: 460px;
-  }
-
-  .module-trigger-button {
-    color: @vent-font-color;
-    background-image: @vent-configurable-dropdown;
-    border: none;
-    border-bottom: 2px solid @vent-configurable-home-light-border;
-  }
-
-
-
-  .module-monitor-bar {
-    position: absolute;
-    top: 100px;
-    width: 1000px;
-    height: 200px;
-    left: calc(50% - 500px);
   }
 }
 

+ 14 - 48
src/views/vent/home/configurable/green/fusion-warn-green.vue

@@ -15,7 +15,7 @@
   </div>
 </template>
 <script lang="ts" setup>
-import { reactive, onMounted, onUnmounted } from 'vue';
+import { ref, reactive, onMounted, onUnmounted } from 'vue';
 import { useInitConfigs, useInitPage } from '../hooks/useInit';
 import ModuleOriginal from './components/ModuleOriginal-green.vue';
 import CenterAreaGreen from './components/center-area-green.vue';
@@ -45,7 +45,6 @@ function getMonitor(flag = false) {
 }
 async function getCenterList() {
   let res = await getTotal({})
-  console.log(res, '中间')
   paramData.fire = res.info.sysInfo.fireS.maxLevel;
   paramData.tf = res.info.sysInfo.ventS.maxLevel;
   paramData.ws = res.info.sysInfo.gasS.maxLevel;
@@ -63,6 +62,12 @@ async function getCenterList() {
           : Levels.level > 3 && Levels.level <= 4
             ? 104
             : 0;
+  paramData.riskData = [
+    { name: '通风', value: Levels.vent },
+    { name: '火灾', value: Levels.fire },
+    { name: '瓦斯', value: Levels.gas },
+    { name: '粉尘', value: Levels.dust },
+  ]
 }
 onMounted(() => {
   fetchConfigs('fusion-warn-green').then(() => {
@@ -81,15 +86,15 @@ onUnmounted(() => {
 @import '/@/design/theme.less';
 
 @{theme-deepblue} {
-   .fusion-home {
-        --image-model_left-area: url('@/assets/images/themify/deepblue/home-container/configurable/green-bd-left.png');
-        --image-model_bottom-area: url('@/assets/images/themify/deepblue/home-container/configurable/green-bd-bottom.png');
-    }
+  .fusion-home {
+    --image-model_left-area: url('@/assets/images/themify/deepblue/home-container/configurable/green-bd-left.png');
+    --image-model_bottom-area: url('@/assets/images/themify/deepblue/home-container/configurable/green-bd-bottom.png');
+  }
 }
 
 .fusion-home {
-     --image-model_left-area: url('@/assets/images/home-green/green-bd-left.png');
-     --image-model_bottom-area: url('@/assets/images/home-green/green-bd-bottom.png');
+  --image-model_left-area: url('@/assets/images/home-green/green-bd-left.png');
+  --image-model_bottom-area: url('@/assets/images/home-green/green-bd-bottom.png');
   width: 100%;
   height: 100%;
   position: relative;
@@ -97,44 +102,6 @@ onUnmounted(() => {
   .main-container {
     width: 100%;
     height: 100%;
-
-    .left-area {
-      position: absolute;
-      left: 0;
-      top: 0;
-      width: 420px;
-      height: 100%;
-      padding: 15px;
-      background: var( --image-model_left-area) no-repeat;
-      background-size: 100% 100%;
-      box-sizing: border-box;
-      overflow-y: auto;
-    }
-
-    .bottom-area {
-      position: absolute;
-      left: 435px;
-      bottom: 0;
-      width: calc(100% - 435px);
-      height: 290px;
-      padding: 15px;
-      background: var(--image-model_bottom-area) no-repeat;
-      background-size: 100% 100%;
-      box-sizing: border-box;
-    }
-
-    .right-area {
-      position: absolute;
-      right: 0px;
-      top: 0px;
-      width: 420px;
-      height: calc(100% - 305px);
-      padding: 15px 15px 0px 15px;
-      background: var( --image-model_left-area) no-repeat;
-      background-size: 100% 100%;
-      box-sizing: border-box;
-      overflow-y: auto;
-    }
   }
 
   .center-area {
@@ -142,8 +109,7 @@ onUnmounted(() => {
     left: 450px;
     top: 0;
     width: calc(100% - 900px);
-    height: calc(100% - 270px);
-    border: 1px solid #000;
+    height: calc(100% - 200px);
   }
 }
 

+ 0 - 37
src/views/vent/home/configurable/green/vent-Green.vue

@@ -97,43 +97,6 @@ onUnmounted(() => { });
     margin: 0px 15px;
     box-sizing: border-box;
   }
-
-  .module-dropdown {
-    padding: 5px;
-    background-image: @vent-configurable-dropdown;
-    border-bottom: 2px solid @vent-configurable-home-light-border;
-    color: @vent-font-color;
-    position: absolute;
-    top: 60px;
-    right: 480px;
-  }
-
-  .module-dropdown-original {
-    padding: 10px;
-    background-image: @vent-configurable-dropdown;
-    border-bottom: 2px solid @vent-configurable-home-light-border;
-    color: @vent-font-color;
-    position: absolute;
-    top: 70px;
-    right: 460px;
-  }
-
-  .module-trigger-button {
-    color: @vent-font-color;
-    background-image: @vent-configurable-dropdown;
-    border: none;
-    border-bottom: 2px solid @vent-configurable-home-light-border;
-  }
-
-  
-
-  .module-monitor-bar {
-    position: absolute;
-    top: 100px;
-    width: 1000px;
-    height: 200px;
-    left: calc(50% - 500px);
-  }
 }
 
 :deep(.loading-box) {

+ 266 - 266
src/views/vent/monitorManager/AllDeviceMonitor/index.vue

@@ -172,310 +172,310 @@
 </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 HandleModal from './modal.vue';
-import DeviceBaseInfo from '../comment/components/DeviceBaseInfo.vue';
-import { deviceControlApi } from '/@/api/vent/index';
-import { message } from 'ant-design-vue';
-import { list, getTableList } from './deviceMonitor.api';
-import lodash from 'lodash';
-import { setDivHeight } from '/@/utils/event';
-import { BorderBox8 as DvBorderBox8 } from '@kjgl77/datav-vue3';
-import { useRouter } from 'vue-router';
-import { useModal } from '/@/components/Modal';
-import { useCamera } from '/@/hooks/system/useCamera';
-import { usePermission } from '/@/hooks/web/usePermission';
-import { getDictItems } from '/@/api/common/api';
+  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 HandleModal from './modal.vue';
+  import DeviceBaseInfo from '../comment/components/DeviceBaseInfo.vue';
+  import { deviceControlApi } from '/@/api/vent/index';
+  import { message } from 'ant-design-vue';
+  import { list, getTableList } from './deviceMonitor.api';
+  import lodash from 'lodash';
+  import { setDivHeight } from '/@/utils/event';
+  import { BorderBox8 as DvBorderBox8 } from '@kjgl77/datav-vue3';
+  import { useRouter } from 'vue-router';
+  import { useModal } from '/@/components/Modal';
+  import { useCamera } from '/@/hooks/system/useCamera';
+  import { usePermission } from '/@/hooks/web/usePermission';
+  import { getDictItems } from '/@/api/common/api';
 
-const { hasPermission } = usePermission();
+  const { hasPermission } = usePermission();
 
-const globalConfig = inject('globalConfig');
+  const globalConfig = inject('globalConfig');
 
-const { currentRoute } = useRouter();
-const MonitorDataTable = ref();
-let contrlValue = '';
-const playerRef = ref();
-const deviceType = ref('door');
-// const deviceType = ref('firedoor');
-const activeKey = ref('1'); // tab
+  const { currentRoute } = useRouter();
+  const MonitorDataTable = ref();
+  let contrlValue = '';
+  const playerRef = ref();
+  const deviceType = ref('door');
+  // const deviceType = ref('firedoor');
+  const activeKey = ref('1'); // tab
 
-const scroll = reactive({
-  y: 230,
-});
-const modelList = ref<{ text: string; value: string }[]>([]);
-const doorIsOpen = ref(false); //前门是否开启
-const modalIsShow = ref<boolean>(false); // 是否显示模态框
-const modalTitle = ref(''); // 模态框标题显示内容,根据设备操作类型决定
-const modalType = ref(''); // 模态框内容显示类型,设备操作类型
+  const scroll = reactive({
+    y: 230,
+  });
+  const modelList = ref<{ text: string; value: string }[]>([]);
+  const doorIsOpen = ref(false); //前门是否开启
+  const modalIsShow = ref<boolean>(false); // 是否显示模态框
+  const modalTitle = ref(''); // 模态框标题显示内容,根据设备操作类型决定
+  const modalType = ref(''); // 模态框内容显示类型,设备操作类型
 
-const selectRowIndex = ref(-1); // 选中行
-const dataSource = ref([]);
+  const selectRowIndex = ref(-1); // 选中行
+  const dataSource = ref([]);
 
-const deviceBaseList = ref([]); // 设备基本信息
-const [registerModal, { openModal, closeModal }] = useModal();
+  const deviceBaseList = ref([]); // 设备基本信息
+  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));
-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;
-  });
-}
+  // 监测数据
+  const selectData = reactive(lodash.cloneDeep(initData));
+  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']]);
+  // 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]);
+            monitorAnimation(selectData);
+            if (timer) {
+              timer = null;
+            }
+            getMonitor();
           }
-          Object.assign(selectData, dataSource.value[selectRowIndex.value]);
-          monitorAnimation(selectData);
-          if (timer) {
-            timer = null;
-          }
-          getMonitor();
-        }
-      },
-      flag ? 0 : 1000
-    );
+        },
+        flag ? 0 : 1000
+      );
+    }
   }
-}
 
-// 切换检测数据
-async function getSelectRow(selectRow, index) {
-  if (!selectRow) return;
-  selectRowIndex.value = index;
-  const baseData: any = deviceBaseList.value.find((baseData: any) => baseData.id === selectRow.deviceID);
-  Object.assign(selectData, initData, selectRow, baseData);
-  doorDeviceState = 1; //记录设备状态,为了与下一次监测数据做比较
-  isdoorOpenRunning = true; //开关门动作是否在进行
-  await getCamera(selectRow.deviceID, playerRef.value);
-}
-
-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 7: // 控制模式切换
-      modalTitle.value = '控制模式切换';
-      modalType.value = '7';
-      modalIsShow.value = true;
-      break;
+  // 切换检测数据
+  async function getSelectRow(selectRow, index) {
+    if (!selectRow) return;
+    selectRowIndex.value = index;
+    const baseData: any = deviceBaseList.value.find((baseData: any) => baseData.id === selectRow.deviceID);
+    Object.assign(selectData, initData, selectRow, baseData);
+    doorDeviceState = 1; //记录设备状态,为了与下一次监测数据做比较
+    isdoorOpenRunning = true; //开关门动作是否在进行
+    await getCamera(selectRow.deviceID, playerRef.value);
   }
 
-  if (globalConfig?.simulatedPassword) {
-    handleOK('', handlerState + '');
-  }
-  contrlValue = value;
-}
+  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 7: // 控制模式切换
+        modalTitle.value = '控制模式切换';
+        modalType.value = '7';
+        modalIsShow.value = true;
+        break;
+    }
 
-function handleOK(passWord, handlerState) {
-  if (!passWord && !globalConfig?.simulatedPassword) {
-    message.warning('请输入密码');
-    return;
-  }
-  if (isOpenRunning) {
-    return;
-  }
-  const data = {
-    deviceid: selectData.deviceID,
-    devicetype: selectData.deviceType,
-    paramcode: '',
-    value: contrlValue,
-    password: passWord || globalConfig?.simulatedPassword,
-    masterComputer: selectData.masterComputer,
-  };
-  switch (handlerState) {
-    case '1': // 打开前门
-      if (selectData.doorOpen == '0' && selectData.doorClose == '1') {
-        data.paramcode = 'frontGateOpen_S';
-      }
-      break;
-    case '2': // 关闭前门
-      if (selectData.doorOpen == '1' && selectData.doorClose == '0') {
-        data.paramcode = 'frontGateClose_S';
-      }
-      break;
-    case '7': // 远程与就地
-      data.paramcode = 'autoRoManualControl';
-      data.value = selectData.contrlMod != 'loopCtrl' ? contrlValue : '';
-      selectData.autoRoManual = null;
+    if (globalConfig?.simulatedPassword) {
+      handleOK('', handlerState + '');
+    }
+    contrlValue = value;
   }
 
-  if (data.paramcode) {
-    deviceControlApi(data).then((res) => {
-      // 模拟时开启
-      if (res.success) {
-        modalIsShow.value = false;
-        if (globalConfig.History_Type == 'remote') {
-          message.success('指令已下发至生产管控平台成功!');
+  function handleOK(passWord, handlerState) {
+    if (!passWord && !globalConfig?.simulatedPassword) {
+      message.warning('请输入密码');
+      return;
+    }
+    if (isOpenRunning) {
+      return;
+    }
+    const data = {
+      deviceid: selectData.deviceID,
+      devicetype: selectData.deviceType,
+      paramcode: '',
+      value: contrlValue,
+      password: passWord || globalConfig?.simulatedPassword,
+      masterComputer: selectData.masterComputer,
+    };
+    switch (handlerState) {
+      case '1': // 打开前门
+        if (selectData.doorOpen == '0' && selectData.doorClose == '1') {
+          data.paramcode = 'frontGateOpen_S';
+        }
+        break;
+      case '2': // 关闭前门
+        if (selectData.doorOpen == '1' && selectData.doorClose == '0') {
+          data.paramcode = 'frontGateClose_S';
+        }
+        break;
+      case '7': // 远程与就地
+        data.paramcode = 'autoRoManualControl';
+        data.value = selectData.contrlMod != 'loopCtrl' ? contrlValue : '';
+        selectData.autoRoManual = null;
+    }
+
+    if (data.paramcode) {
+      deviceControlApi(data).then((res) => {
+        // 模拟时开启
+        if (res.success) {
+          modalIsShow.value = false;
+          if (globalConfig.History_Type == 'remote') {
+            message.success('指令已下发至生产管控平台成功!');
+          } else {
+            message.success('指令已下发成功!');
+          }
         } else {
-          message.success('指令已下发成功!');
+          message.error(res.message);
         }
-      } else {
-        message.error(res.message);
-      }
-    });
-  }
-}
-let isOpenRunning = false; //开关门动作是否在进行
-/** 开关门动画调用 */
-let isdoorOpenRunning = false; //开关门动作是否在进行
-// let isMidCloseRunning = false; //中间门动作是否在进行
-// 0 关闭 1 正在打开 2 打开 3正在关闭
-let doorDeviceState = 1; //记录设备状态,为了与下一次监测数据做比较
-function monitorAnimation(selectData) {
-  const timeScale = 0.005;
-  // 打开
-  if (selectData.frontGateOpen == '1' && !isdoorOpenRunning) {
-    isdoorOpenRunning = true;
-    if (doorDeviceState != 1) {
-      doorDeviceState = 1;
-      doorIsOpen.value = true;
+      });
     }
   }
-  // 关闭
-  if (selectData.frontGateOpen == '0' && isdoorOpenRunning) {
-    isdoorOpenRunning = false;
-    if (doorDeviceState != 0) {
-      doorDeviceState = 0;
-      doorIsOpen.value = false;
+  let isOpenRunning = false; //开关门动作是否在进行
+  /** 开关门动画调用 */
+  let isdoorOpenRunning = false; //开关门动作是否在进行
+  // let isMidCloseRunning = false; //中间门动作是否在进行
+  // 0 关闭 1 正在打开 2 打开 3正在关闭
+  let doorDeviceState = 1; //记录设备状态,为了与下一次监测数据做比较
+  function monitorAnimation(selectData) {
+    const timeScale = 0.005;
+    // 打开
+    if (selectData.frontGateOpen == '1' && !isdoorOpenRunning) {
+      isdoorOpenRunning = true;
+      if (doorDeviceState != 1) {
+        doorDeviceState = 1;
+        doorIsOpen.value = true;
+      }
+    }
+    // 关闭
+    if (selectData.frontGateOpen == '0' && isdoorOpenRunning) {
+      isdoorOpenRunning = false;
+      if (doorDeviceState != 0) {
+        doorDeviceState = 0;
+        doorIsOpen.value = false;
+      }
     }
   }
-}
 
-function handleCancel() {
-  modalIsShow.value = false;
-  modalTitle.value = '';
-  modalType.value = '';
-  selectData.autoRoManual = null;
-}
+  function handleCancel() {
+    modalIsShow.value = false;
+    modalTitle.value = '';
+    modalType.value = '';
+    selectData.autoRoManual = null;
+  }
 
-onMounted(async () => {
-  const { query } = unref(currentRoute);
-  if (query['deviceType']) deviceType.value = query['deviceType'] as string;
-  modelList.value = await getDictItems('fireDoorModel');
-});
+  onMounted(async () => {
+    const { query } = unref(currentRoute);
+    if (query['deviceType']) deviceType.value = query['deviceType'] as string;
+    modelList.value = await getDictItems('fireDoorModel');
+  });
 
-onBeforeUnmount(() => {
-  getDeviceBaseList();
-});
+  onBeforeUnmount(() => {
+    getDeviceBaseList();
+  });
 
-onUnmounted(() => {
-  removeCamera();
-  if (timer) {
-    clearTimeout(timer);
-    timer = undefined;
-  }
-});
+  onUnmounted(() => {
+    removeCamera();
+    if (timer) {
+      clearTimeout(timer);
+      timer = undefined;
+    }
+  });
 </script>
 ,
 <style lang="less" scoped>
-@import '/@/design/vent/modal.less';
-.scene-box {
-  .bottom-tabs-box {
-    height: 300px;
+  @import '/@/design/vent/modal.less';
+  .scene-box {
+    .bottom-tabs-box {
+      height: 300px;
+    }
   }
-}
-.button-box {
-  border: none !important;
-  height: 34px !important;
+  .button-box {
+    border: none !important;
+    height: 34px !important;
 
-  &:hover {
-    background: linear-gradient(#2cd1ff55, #1eb0ff55) !important;
-  }
+    &:hover {
+      background: linear-gradient(#2cd1ff55, #1eb0ff55) !important;
+    }
 
-  &::before {
-    height: 27px !important;
-    background: linear-gradient(#1fa6cb, #127cb5) !important;
-  }
+    &::before {
+      height: 27px !important;
+      background: linear-gradient(#1fa6cb, #127cb5) !important;
+    }
 
-  &::after {
-    top: 35px !important;
+    &::after {
+      top: 35px !important;
+    }
   }
-}
 
-:deep(.@{ventSpace}-tabs-tabpane-active) {
-  height: 100%;
-}
+  :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: #fff !important;
-}
-:deep(.zxm-radio-disabled .zxm-radio-inner::after) {
-  background-color: #127cb5 !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: #fff !important;
+  }
+  :deep(.zxm-radio-disabled .zxm-radio-inner::after) {
+    background-color: #127cb5 !important;
+  }
 </style>

+ 282 - 138
src/views/vent/monitorManager/safetyMonitor/HistoryTable.vue

@@ -238,165 +238,309 @@
   }
 
   // 列表页面公共参数、方法
-  const { tableContext, onExportXls } = useListPage({
-    tableProps: {
-      // api: list,
-      columns: props.columnsType ? columns : (props.columns as any[]),
-      canResize: true,
-      showTableSetting: false,
-      showActionColumn: false,
-      bordered: false,
-      size: 'small',
-      scroll: tableScroll,
-      showIndexColumn: true,
-      tableLayout: 'auto',
-      formConfig: {
-        labelAlign: 'left',
-        showAdvancedButton: false,
-        showSubmitButton: false,
-        showResetButton: false,
-        baseColProps: {
-          xs: 24,
-          sm: 24,
-          md: 24,
-          lg: 9,
-          xl: 7,
-          xxl: 4,
-        },
-        schemas: [
-          {
-            field: 'ttime_begin',
-            label: '开始时间',
-            component: 'DatePicker',
-            defaultValue: dayjs().startOf('date'),
-            required: true,
-            componentProps: {
-              showTime: true,
-              valueFormat: 'YYYY-MM-DD HH:mm:ss',
-              getPopupContainer: getAutoScrollContainer,
-            },
-            colProps: {
-              span: 4,
-            },
-          },
-          {
-            field: 'ttime_end',
-            label: '结束时间',
-            component: 'DatePicker',
-            defaultValue: dayjs(),
-            required: true,
-            componentProps: {
-              showTime: true,
-              valueFormat: 'YYYY-MM-DD HH:mm:ss',
-              getPopupContainer: getAutoScrollContainer,
-            },
-            colProps: {
-              span: 4,
-            },
-          },
-          {
-            label: '设备类型',
-            field: 'dataTypeName',
-            component: 'ApiSelect',
-            componentProps: {
-              api: safetyDeviceList.bind(null, { devicetype: 'safetymonitor', code: 'dataTypeName' }),
-              labelField: 'name',
-              valueField: 'code',
-              onChange: async (e, option) => {
-                console.log('1111', e, option);
-                dataTypeName.value = e;
-                await getDeviceList();
+  const { tableContext, onExportXls } = useListPage(
+    props.columnsType == 'safetymonitor'
+      ? {
+          tableProps: {
+            // api: list,
+            columns: props.columnsType ? columns : (props.columns as any[]),
+            canResize: true,
+            showTableSetting: false,
+            showActionColumn: false,
+            bordered: false,
+            size: 'small',
+            scroll: tableScroll,
+            showIndexColumn: true,
+            tableLayout: 'auto',
+            formConfig: {
+              labelAlign: 'left',
+              showAdvancedButton: false,
+              showSubmitButton: false,
+              showResetButton: false,
+              baseColProps: {
+                xs: 24,
+                sm: 24,
+                md: 24,
+                lg: 9,
+                xl: 7,
+                xxl: 4,
               },
-            },
-            colProps: {
-              span: 4,
-            },
-          },
-          {
-            label: '查询设备',
-            field: 'gdeviceid',
-            component: 'Select',
-            defaultValue: deviceOptions.value[0] ? deviceOptions.value[0]['value'] : '',
-            required: true,
-            componentProps: {
-              showSearch: true,
-              filterOption: (input: string, option: any) => {
-                return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0;
-              },
-              options: deviceOptions,
-              onChange: (e, option) => {
-                if (option && (option['strinstallpos'] || option['strtype'] || option['devicekind']))
-                  historyType.value = option['strtype'] || option['devicekind'];
-                if (option['strtype']) deviceTypeStr.value = option['strtype'];
-                stationType.value = option['stationtype'];
-                nextTick(async () => {
-                  await getDataSource();
-                });
-              },
-            },
-            colProps: {
-              span: 4,
-            },
-          },
-          {
-            label: '间隔时间',
-            field: 'skip',
-            component: 'Select',
-            defaultValue: '8',
-            componentProps: {
-              options: [
+              schemas: [
                 {
-                  label: '1秒',
-                  value: '1',
+                  field: 'ttime_begin',
+                  label: '开始时间',
+                  component: 'DatePicker',
+                  defaultValue: dayjs().startOf('date'),
+                  required: true,
+                  componentProps: {
+                    showTime: true,
+                    valueFormat: 'YYYY-MM-DD HH:mm:ss',
+                    getPopupContainer: getAutoScrollContainer,
+                  },
+                  colProps: {
+                    span: 4,
+                  },
                 },
                 {
-                  label: '5秒',
-                  value: '2',
+                  field: 'ttime_end',
+                  label: '结束时间',
+                  component: 'DatePicker',
+                  defaultValue: dayjs(),
+                  required: true,
+                  componentProps: {
+                    showTime: true,
+                    valueFormat: 'YYYY-MM-DD HH:mm:ss',
+                    getPopupContainer: getAutoScrollContainer,
+                  },
+                  colProps: {
+                    span: 4,
+                  },
                 },
                 {
-                  label: '10秒',
-                  value: '3',
+                  label: '设备类型',
+                  field: 'dataTypeName',
+                  component: 'ApiSelect',
+                  componentProps: {
+                    api: safetyDeviceList.bind(null, { devicetype: 'safetymonitor', code: 'dataTypeName' }),
+                    labelField: 'name',
+                    valueField: 'code',
+                    onChange: async (e, option) => {
+                      console.log('1111', e, option);
+                      dataTypeName.value = e;
+                      await getDeviceList();
+                    },
+                  },
+                  colProps: {
+                    span: 4,
+                  },
                 },
                 {
-                  label: '30秒',
-                  value: '4',
+                  label: '查询设备',
+                  field: 'gdeviceid',
+                  component: 'Select',
+                  defaultValue: deviceOptions.value[0] ? deviceOptions.value[0]['value'] : '',
+                  required: true,
+                  componentProps: {
+                    showSearch: true,
+                    filterOption: (input: string, option: any) => {
+                      return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0;
+                    },
+                    options: deviceOptions,
+                    onChange: (e, option) => {
+                      if (option && (option['strinstallpos'] || option['strtype'] || option['devicekind']))
+                        historyType.value = option['strtype'] || option['devicekind'];
+                      if (option['strtype']) deviceTypeStr.value = option['strtype'];
+                      stationType.value = option['stationtype'];
+                      nextTick(async () => {
+                        await getDataSource();
+                      });
+                    },
+                  },
+                  colProps: {
+                    span: 4,
+                  },
                 },
                 {
-                  label: '1分钟',
-                  value: '5',
+                  label: '间隔时间',
+                  field: 'skip',
+                  component: 'Select',
+                  defaultValue: '8',
+                  componentProps: {
+                    options: [
+                      {
+                        label: '1秒',
+                        value: '1',
+                      },
+                      {
+                        label: '5秒',
+                        value: '2',
+                      },
+                      {
+                        label: '10秒',
+                        value: '3',
+                      },
+                      {
+                        label: '30秒',
+                        value: '4',
+                      },
+                      {
+                        label: '1分钟',
+                        value: '5',
+                      },
+                      {
+                        label: '10分钟',
+                        value: '6',
+                      },
+                      {
+                        label: '30分钟',
+                        value: '7',
+                      },
+                      {
+                        label: '1小时',
+                        value: '8',
+                      },
+                    ],
+                  },
+                  colProps: {
+                    span: 4,
+                  },
+                },
+              ],
+            },
+            pagination: {
+              current: 1,
+              pageSize: 10,
+              pageSizeOptions: ['10', '30', '50', '100'],
+              showQuickJumper: false,
+            },
+          },
+          exportConfig: {
+            name: '历史列表',
+            url: getExportXlsUrl(),
+          },
+        }
+      : {
+          tableProps: {
+            // api: list,
+            columns: props.columnsType ? columns : (props.columns as any[]),
+            canResize: true,
+            showTableSetting: false,
+            showActionColumn: false,
+            bordered: false,
+            size: 'small',
+            scroll: tableScroll,
+            showIndexColumn: true,
+            tableLayout: 'auto',
+            formConfig: {
+              labelAlign: 'left',
+              showAdvancedButton: false,
+              showSubmitButton: false,
+              showResetButton: false,
+              baseColProps: {
+                xs: 24,
+                sm: 24,
+                md: 24,
+                lg: 9,
+                xl: 7,
+                xxl: 4,
+              },
+              schemas: [
+                {
+                  field: 'ttime_begin',
+                  label: '开始时间',
+                  component: 'DatePicker',
+                  defaultValue: dayjs().startOf('date'),
+                  required: true,
+                  componentProps: {
+                    showTime: true,
+                    valueFormat: 'YYYY-MM-DD HH:mm:ss',
+                    getPopupContainer: getAutoScrollContainer,
+                  },
+                  colProps: {
+                    span: 4,
+                  },
                 },
                 {
-                  label: '10分钟',
-                  value: '6',
+                  field: 'ttime_end',
+                  label: '结束时间',
+                  component: 'DatePicker',
+                  defaultValue: dayjs(),
+                  required: true,
+                  componentProps: {
+                    showTime: true,
+                    valueFormat: 'YYYY-MM-DD HH:mm:ss',
+                    getPopupContainer: getAutoScrollContainer,
+                  },
+                  colProps: {
+                    span: 4,
+                  },
                 },
                 {
-                  label: '30分钟',
-                  value: '7',
+                  label: '查询设备',
+                  field: 'gdeviceid',
+                  component: 'Select',
+                  defaultValue: deviceOptions.value[0] ? deviceOptions.value[0]['value'] : '',
+                  required: true,
+                  componentProps: {
+                    showSearch: true,
+                    filterOption: (input: string, option: any) => {
+                      return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0;
+                    },
+                    options: deviceOptions,
+                    onChange: (e, option) => {
+                      if (option && (option['strinstallpos'] || option['strtype'] || option['devicekind']))
+                        historyType.value = option['strtype'] || option['devicekind'];
+                      if (option['strtype']) deviceTypeStr.value = option['strtype'];
+                      stationType.value = option['stationtype'];
+                      nextTick(async () => {
+                        await getDataSource();
+                      });
+                    },
+                  },
+                  colProps: {
+                    span: 4,
+                  },
                 },
                 {
-                  label: '1小时',
-                  value: '8',
+                  label: '间隔时间',
+                  field: 'skip',
+                  component: 'Select',
+                  defaultValue: '8',
+                  componentProps: {
+                    options: [
+                      {
+                        label: '1秒',
+                        value: '1',
+                      },
+                      {
+                        label: '5秒',
+                        value: '2',
+                      },
+                      {
+                        label: '10秒',
+                        value: '3',
+                      },
+                      {
+                        label: '30秒',
+                        value: '4',
+                      },
+                      {
+                        label: '1分钟',
+                        value: '5',
+                      },
+                      {
+                        label: '10分钟',
+                        value: '6',
+                      },
+                      {
+                        label: '30分钟',
+                        value: '7',
+                      },
+                      {
+                        label: '1小时',
+                        value: '8',
+                      },
+                    ],
+                  },
+                  colProps: {
+                    span: 4,
+                  },
                 },
               ],
             },
-            colProps: {
-              span: 4,
+            pagination: {
+              current: 1,
+              pageSize: 10,
+              pageSizeOptions: ['10', '30', '50', '100'],
+              showQuickJumper: false,
             },
           },
-        ],
-      },
-      pagination: {
-        current: 1,
-        pageSize: 10,
-        pageSizeOptions: ['10', '30', '50', '100'],
-        showQuickJumper: false,
-      },
-    },
-    exportConfig: {
-      name: '历史列表',
-      url: getExportXlsUrl(),
-    },
-  });
+          exportConfig: {
+            name: '历史列表',
+            url: getExportXlsUrl(),
+          },
+        }
+  );
 
   //注册table数据
   const [registerTable, { reload, setLoading, getForm, setColumns, getPaginationRef, setPagination }] = tableContext;

+ 33 - 26
src/views/vent/monitorManager/safetyMonitor/index.vue

@@ -13,7 +13,7 @@
               :dataSource="dataSource"
               design-scope="device_monitor"
               :isShowPagination="false"
-              :isShowActionColumn="isHaveNoAction.includes(deviceType.split('_')[0]) ? false : true"
+              :isShowActionColumn="false"
               :is-show-select="false"
               :form-config="deviceType == 'safetymonitor' && sysOrgCode != 'zjtzqctmk' ? formConfig : undefined"
               title="设备监测"
@@ -49,10 +49,9 @@
               :dataSource="dataSource"
               design-scope="device_monitor"
               :isShowPagination="false"
-              :isShowActionColumn="isHaveNoAction.includes(deviceType.split('_')[0]) ? false : true"
+              :isShowActionColumn="false"
               :is-show-select="false"
               title="设备监测"
-              :form-config="deviceType == 'safetymonitor' && sysOrgCode != 'zjtzqctmk' ? formConfig : undefined"
               :scroll="{ y: 650 }"
               :defSort="defSort"
               sortDataIndex="strinstallpos"
@@ -138,28 +137,35 @@
             :chartsColumns="chartsColumnsreal" chartsType="" :option="echartsOption" />
         </div> -->
       </a-tab-pane>
+      <template v-if="!hasPermission('safety:hideWarning')">
+        <a-tab-pane key="3" tab="报警历史">
+          <div class="tab-item">
+            <AlarmHistoryTable
+              ref="alarmHistoryTable"
+              v-if="activeKey == '3' && deviceType == 'safetymonitor'"
+              columns-type="alarm"
+              :list="safetyList"
+              :device-type="deviceType"
+              :device-list-api="getDeviceList.bind(null, { devicekind: deviceType, pageSize: 10000 })"
+              designScope="alarm-history"
+            />
+          </div>
+        </a-tab-pane>
+      </template>
+      <template v-else>
+        <a-tab-pane key="3" tab="报警历史">
+          <div class="tab-item">
+            <AlarmHistoryCommentTable
+              v-if="activeKey == '3' && deviceType != 'safetymonitor'"
+              columns-type="alarm"
+              :device-type="deviceType"
+              :device-list-api="getDeviceList.bind(null, { devicekind: deviceType, pageSize: 10000 })"
+              designScope="alarm-history"
+            />
+          </div>
+        </a-tab-pane>
+      </template>
 
-      <a-tab-pane key="3" tab="报警历史" v-if="!hasPermission('safety:hideWarning')">
-        <div class="tab-item">
-          <AlarmHistoryTable
-            ref="alarmHistoryTable"
-            v-if="activeKey == '3'"
-            columns-type="alarm"
-            :list="safetyList"
-            :device-type="deviceType"
-            :device-list-api="getDeviceList.bind(null, { devicekind: deviceType, pageSize: 10000 })"
-            designScope="alarm-history"
-          />
-          <!-- <AlarmHistoryCommentTable
-            ref="alarmHistoryTable"
-            v-else-if="activeKey == '3'"
-            columns-type="alarm"
-            :device-type="deviceType"
-            :device-list-api="getDeviceList.bind(null, { devicekind: deviceType, pageSize: 10000 })"
-            designScope="alarm-history"
-          /> -->
-        </div>
-      </a-tab-pane>
       <a-tab-pane key="4" tab="操作历史" v-if="deviceType !== 'safetymonitor' && deviceType !== 'wasichoufang'">
         <div class="tab-item">
           <HandlerHistoryTable
@@ -172,7 +178,7 @@
           />
         </div>
       </a-tab-pane>
-      <a-tab-pane key="5" tab="报警分析" v-if="!hasPermission('safety:hideWarning')">
+      <a-tab-pane key="5" tab="报警分析" v-if="!hasPermission('safety:hideWarning') && deviceType == 'safetymonitor'">
         <div class="tab-item">
           <safetyWarnAnalysis :device-type="deviceType" />
         </div>
@@ -202,7 +208,7 @@
 <script setup lang="ts">
   import { ref, onMounted, onUnmounted, shallowRef, defineProps, watch, inject, unref } from 'vue';
   import { list, getDeviceList, safetyList, getExportUrl, subStationList, initSubStation } from './safety.api';
-  // import AlarmHistoryCommentTable from '../comment/AlarmHistoryTable.vue';
+  import AlarmHistoryCommentTable from '../comment/AlarmHistoryTable.vue';
   import safetyWarnAnalysis from '../comment/safetyWarnAnalysis.vue';
   import AlarmHistoryTable from './AlarmHistoryTable.vue';
   import HistoryTable from './HistoryTable.vue';
@@ -217,6 +223,7 @@
   import { useMethods } from '/@/hooks/system/useMethods';
   import { message } from 'ant-design-vue';
   import { SendOutlined } from '@ant-design/icons-vue';
+  import { template } from 'lodash-es';
 
   const { sysOrgCode } = useGlobSetting();
   const { hasPermission } = usePermission();

+ 1 - 1
src/views/vent/monitorManager/safetyMonitor/safety.data.ts

@@ -223,4 +223,4 @@ export const chartsColumnsreal = [
     dataIndex: 'sourcePressure',
   },
 ];
-export const isHaveNoAction = ['safetymonitor', 'wasichoufang', 'atomizing'];
+export const isHaveNoAction = ['safetymonitor', 'wasichoufang', 'atomizing', ''];

+ 18 - 19
src/views/vent/monitorManager/windowMonitor/dandaoFcBd1.threejs.ts

@@ -48,7 +48,6 @@ class ddFc_4 {
     this.group?.scale.set(22, 22, 22);
     this.group?.position.set(-35, 25, 15);
   }
-
   addMonitorText(selectData) {
     if (!this.group) {
       return;
@@ -70,7 +69,7 @@ class ddFc_4 {
         y: 95,
       },
       {
-        text: `${selectData.OpenDegree ? '开度值(°)' : selectData.forntArea ? '过风面积(㎡)' : '过风面积(㎡)'}:`,
+        text: `最大面积(㎡):`,
         font: 'normal 30px Arial',
         color: '#009900',
         strokeStyle: '#002200',
@@ -78,11 +77,7 @@ class ddFc_4 {
         y: 145,
       },
       {
-        text: selectData.OpenDegree
-          ? Number(`${selectData.OpenDegree}`).toFixed(2)
-          : selectData.forntArea
-          ? Number(`${selectData.forntArea}`).toFixed(2)
-          : '-',
+        text: selectData.maxarea ? Number(`${selectData.maxarea}`).toFixed(2) : '-',
         font: 'normal 30px Arial',
         color: '#009900',
         strokeStyle: '#002200',
@@ -90,7 +85,7 @@ class ddFc_4 {
         y: 145,
       },
       {
-        text: `${selectData.frontRearDP ? '风窗压差(Pa)' : selectData.windSpeed ? '风速(m/s)' : '通信状态:'}:`,
+        text: `${selectData.OpenDegree ? '开度值(°)' : selectData.forntArea ? '过风面积(㎡)' : '过风面积(㎡)'}:`,
         font: 'normal 30px Arial',
         color: '#009900',
         strokeStyle: '#002200',
@@ -98,15 +93,11 @@ class ddFc_4 {
         y: 200,
       },
       {
-        text: `${
-          selectData.frontRearDP
-            ? selectData.frontRearDP
-            : selectData.windSpeed
-            ? selectData.windSpeed
-            : selectData.netStatus == '0'
-            ? '断开'
-            : '连接'
-        }`,
+        text: selectData.OpenDegree
+          ? Number(`${selectData.OpenDegree}`).toFixed(2)
+          : selectData.forntArea
+          ? Number(`${selectData.forntArea}`).toFixed(2)
+          : '-',
         font: 'normal 30px Arial',
         color: '#009900',
         strokeStyle: '#002200',
@@ -114,7 +105,7 @@ class ddFc_4 {
         y: 200,
       },
       {
-        text: `${selectData.fWindowM3 ? '过风量(m³/min)' : '风窗道数'}: `,
+        text: `${selectData.frontRearDP ? '风窗压差(Pa)' : selectData.windSpeed ? '风速(m/s)' : '通信状态:'}:`,
         font: 'normal 30px Arial',
         color: '#009900',
         strokeStyle: '#002200',
@@ -122,7 +113,15 @@ class ddFc_4 {
         y: 250,
       },
       {
-        text: `${selectData.fWindowM3 ? selectData.fWindowM3 : selectData.nwindownum}`,
+        text: `${
+          selectData.frontRearDP
+            ? selectData.frontRearDP
+            : selectData.windSpeed
+            ? selectData.windSpeed
+            : selectData.netStatus == '0'
+            ? '断开'
+            : '连接'
+        }`,
         font: 'normal 30px Arial',
         color: '#009900',
         strokeStyle: '#002200',