Browse Source

1. 局部风机页面调整
2. 风窗添加角度控制

hongrunxia 6 months ago
parent
commit
fe45e7a15d

+ 1 - 1
src/design/vent/modal.less

@@ -210,7 +210,7 @@
   width: 100%;
   height: 100%;
   position: absolute;
-  z-index: 999;
+  z-index: 2;
   left: 0;
   top: 0;
   pointer-events: none;

+ 121 - 9
src/layouts/default/header/components/VoiceBroadcast.vue

@@ -5,30 +5,72 @@
       <a href="#" class="head-example"></a>
     </a-badge> -->
     <a-badge dot>
-      <notification-outlined />
+      <BellOutlined style="font-size: 20px" />
     </a-badge>
   </div>
   <div v-if="isShowWarningBroad" class="broadcast">
-    <div class="title">消息通知</div>
-    <div class="context"> </div>
+    <div class="title">
+      <div class="message-title">消息通知</div>
+      <div class="badge-box">
+        <SoundOutlined style="font-size: 20px; color: #000" />
+      </div>
+    </div>
+    <div class="broadcast-context">
+      <div class="context-tab">
+        <div class="context-tab-item" :class="{ 'context-tab-item-active': activeKey == 0 }" @click="toSelectList(0)">全部</div>
+        <div class="context-tab-item" :class="{ 'context-tab-item-active': activeKey == 1 }" @click="toSelectList(1)">未解决</div>
+        <div class="context-tab-item" :class="{ 'context-tab-item-active': activeKey == 2 }" @click="toSelectList(2)">已解决</div>
+      </div>
+      <div class="context-box">
+        <div v-if="broadcastList.length == 0" class="no-context">暂无内容</div>
+        <div class="context-detail" v-else v-for="(item, index) in broadcastList" :key="index" :style="{ color: item['isok'] == 0 ? 'red' : '#000' }">
+          <div>{{ item['createTime'] }}</div>
+          <div>{{ item['devicekind_dictText'] }}</div>
+          <div>{{ item['wardescrip'] || item['nwartype_dictText'] }}</div>
+          <div>{{ item['isok'] ? '已解决' : '未解决' }}</div>
+        </div>
+        <div class="more" @click="toMore">更多</div>
+      </div>
+    </div>
   </div>
 </template>
 <script lang="ts">
   import { Tooltip, Badge } from 'ant-design-vue';
-  import { NotificationOutlined } from '@ant-design/icons-vue';
+  import { SoundOutlined, BellOutlined } from '@ant-design/icons-vue';
   import Icon from '/@/components/Icon';
   import { defineComponent, ref } from 'vue';
+  import { defHttp } from '/@/utils/http/axios';
+  import { useRouter } from 'vue-router';
 
   export default defineComponent({
     name: 'VoiceBroadcast',
-    components: { Icon, Tooltip, Badge, NotificationOutlined },
+    components: { Icon, Tooltip, Badge, SoundOutlined, BellOutlined },
 
     setup() {
+      const router = useRouter();
+      const list = (params) => defHttp.get({ url: '/safety/ventanalyAlarmLog/list', params });
+      const activeKey = ref(0);
       const isShowWarningBroad = ref(false);
+      const broadcastList = ref([]);
       function showWarningBroad() {
         isShowWarningBroad.value = !isShowWarningBroad.value;
+        if (isShowWarningBroad.value) {
+          toSelectList(0);
+        }
       }
-      return { showWarningBroad, isShowWarningBroad };
+
+      async function toSelectList(key) {
+        activeKey.value = key;
+        const res = await list({ pageSize: 20, devicetype: '', isok: key == 1 ? 0 : key == 2 ? 1 : null });
+        broadcastList.value = res['records'];
+      }
+
+      async function toMore() {
+        await router.push({ path: '/monitorChannel/device-monitor/warningHistory' });
+        showWarningBroad();
+      }
+
+      return { showWarningBroad, isShowWarningBroad, activeKey, toSelectList, broadcastList, toMore };
     },
   });
 </script>
@@ -42,11 +84,81 @@
   .broadcast {
     width: 400px;
     height: 250px;
-    padding: 10px;
     position: fixed;
     top: 42px;
     right: 20px;
-    background-color: aqua;
-    z-index: 999;
+    background-color: rgb(255, 255, 255);
+    z-index: 9999999;
+    color: #000;
+    .title {
+      height: 48px;
+      padding: 0 20px;
+      box-shadow: 2px 2px 2px 1px rgba(0, 0, 0, 0.2);
+      :deep(.ant-badge:not(.ant-badge-status)) {
+        margin-right: 40px !important;
+      }
+      display: flex;
+      align-items: center;
+      justify-content: space-between;
+      margin-bottom: 5px;
+      .message-title {
+        font-size: 20px;
+        // font-weight: 600;
+      }
+      .badge-box {
+        display: flex;
+        align-items: center;
+        .badge-title {
+          display: inline-block;
+          width: 62px;
+          line-height: 24px;
+          background-color: #2174f0;
+          border-radius: 26px;
+          text-align: center;
+          color: #fff;
+          padding-bottom: 2px;
+        }
+      }
+    }
+    .broadcast-context {
+      .context-tab {
+        display: flex;
+        .context-tab-item {
+          line-height: 30px;
+          background-color: #6b6b6b;
+          border-radius: 26px;
+          text-align: center;
+          padding: 0 10px;
+          color: #fff;
+          margin: 5px;
+          cursor: pointer;
+        }
+        .context-tab-item-active {
+          background-color: #2174f0;
+        }
+      }
+      .context-box {
+        flex: 1;
+        padding: 0 10px;
+        height: 150px;
+        overflow-y: auto;
+        .no-context {
+          display: flex;
+          justify-content: center;
+          padding-top: 30px;
+          font-size: 16px;
+        }
+        .context-detail {
+          display: flex;
+          div {
+            padding: 0 3px;
+            line-height: 24px;
+          }
+        }
+        .more {
+          cursor: pointer;
+        }
+      }
+    }
   }
 </style>

+ 19 - 1
src/views/vent/monitorManager/comment/AlarmHistoryTable.vue

@@ -51,7 +51,7 @@
     },
   });
 
-  const getDeviceListApi = (params) => defHttp.post({ url: '/monitor/device', params });
+  const getDeviceListApi = (params) => defHttp.post({ url: '/ventanaly-device/monitor/device', params });
   const globalConfig = inject('globalConfig');
   const alarmHistory = ref();
   const columns = ref([]);
@@ -220,6 +220,24 @@
               span: 4,
             },
           },
+          {
+            label: '是否解决',
+            field: 'isok',
+            component: 'Select',
+            componentProps: {
+              options: [
+                {
+                  label: '未解决',
+                  value: '0',
+                },
+                {
+                  label: '已解决',
+                  value: '1',
+                },
+              ],
+            },
+            colProps: { span: 4 },
+          },
         ],
         // fieldMapToTime: [['createTime', ['createTime_begin', 'createTime_end'], '']],
       },

+ 1 - 1
src/views/vent/monitorManager/deviceMonitor/components/device/modal/bundle.modal.vue

@@ -164,7 +164,7 @@
           containLabel: true,
         },
         toolbox: {
-          feature: {},
+          feature: null,
         },
       };
 

+ 2 - 0
src/views/vent/monitorManager/fanLocalMonitor/fanLocal.api.ts

@@ -10,6 +10,7 @@ enum Api {
   deleteBatch = '/sys/user/deleteBatch',
   importExcel = '/sys/user/importExcel',
   exportXls = '/sys/user/exportXls',
+  autoAdjust = '/safety/ventanalyFan/updateFanlocalAutoAdjustStatus',
 }
 /**
  * 导出api
@@ -27,6 +28,7 @@ export const getImportUrl = Api.importExcel;
 export const list = (params) => defHttp.post({ url: Api.list, params });
 
 export const getTableList = (params) => defHttp.get({ url: Api.baseList, params });
+export const autoAdjust = (params) => defHttp.post({ url: Api.autoAdjust, params });
 
 /**
  * 删除用户

+ 6 - 32
src/views/vent/monitorManager/fanLocalMonitor/fanLocal.data.ts

@@ -298,11 +298,11 @@ export const chartsColumns1 = [
     seriesName: 'm³/min',
     ymax: 1000,
     yname: '',
-    linetype: 'bar',
+    linetype: 'line',
     yaxispos: 'left',
     color: '#755cf8',
     sort: 1,
-    dataIndex: '',
+    dataIndex: 'windQuantity2',
     xRotate: 0,
   },
 ];
@@ -3570,44 +3570,18 @@ export const option = reactive<EChartsOption>({
   series: [],
 });
 export const echatsOption = {
-  // tooltip: {
-  //   show: true,
-  //   formatter: function (datas: []) {
-  //     return datas.map((item) => {
-  //       item['data'] = item['data'].toFixed(2);
-  //       return item;
-  //     });
-  //   },
-  // },
-  legend: {
-    top: -10,
-  },
   grid: {
     top: '15%',
     left: '20',
-    right: '25',
+    right: '45',
     bottom: '0',
     containLabel: true,
   },
   toolbox: {
-    feature: {
-      saveAsImage: {
-        show: false,
-      },
-    },
-  },
-  xAxis: {
-    type: 'category',
-    axisLabel: {
-      margin: 10,
-      color: '#f1f1f199',
-    },
-    name: 'm³/min',
+    feature: null,
   },
-  yAxis: {
-    axisLabel: {
-      color: '#0071A5',
-    },
+  legend: {
+    top: -10,
   },
 };
 

+ 225 - 62
src/views/vent/monitorManager/fanLocalMonitor/index.vue

@@ -263,27 +263,112 @@
             >
           </div>
           <div class="container-group container-group-l">
-            <template v-if="!loading">
-              <div class="container-item" v-for="(data, index) in rightColumns" :key="index">
-                <div class="item-icon">
-                  <!-- <SvgIcon class="icon-style" size="18" name="temperature" /> -->
-                  <!-- <StarOutlined  /> -->
-                  <CaretRightOutlined class="icon-style" />
-                </div>
-                <div class="item-name">{{ data.title }}</div>
-                <div v-if="data.dataIndex.startsWith('Fan')">
-                  <div class="item-value" v-if="dataMonitorRowIndex == 0">{{
-                    selectData[data.dataIndex.replace('Fan', 'Fan1')] ? selectData[data.dataIndex.replace('Fan', 'Fan1')] : '-'
-                  }}</div>
-                  <div class="item-value" v-if="dataMonitorRowIndex == 1">{{
-                    selectData[data.dataIndex.replace('Fan', 'Fan2')] ? selectData[data.dataIndex.replace('Fan', 'Fan2')] : '-'
-                  }}</div>
-                </div>
-                <div v-else>
-                  <div class="item-value">{{ selectData[data.dataIndex] ? selectData[data.dataIndex] : '-' }}</div>
-                </div>
+            <!-- <div class="warning-header">
+              <div class="header-item">
+                <div class="header-title"> 未处理数</div>
+                <div class="header-value">{{ selectData['warnLogNotOkCount'] }} </div>
               </div>
-            </template>
+            </div> -->
+
+            <div class="warning-group">
+              <template v-if="deviceType">
+                <div v-for="(state, index) in rightColumns" :key="index">
+                  <template
+                    v-if="selectData[state.dataIndex.replace('Fan', 'Fan1')] == 0.0 || selectData[state.dataIndex.replace('Fan', 'Fan1')] > 1"
+                  >
+                    <div class="container-item">
+                      <div class="item-icon">
+                        <CaretRightOutlined class="icon-style" />
+                      </div>
+                      <div class="item-name">{{ state.title }}</div>
+                      <div v-if="state.dataIndex.startsWith('Fan')">
+                        <div class="item-value" v-if="dataMonitorRowIndex == 0">{{
+                          selectData[state.dataIndex.replace('Fan', 'Fan1')] ? selectData[state.dataIndex.replace('Fan', 'Fan1')] : '-'
+                        }}</div>
+                        <div class="item-value" v-if="dataMonitorRowIndex == 1">{{
+                          selectData[state.dataIndex.replace('Fan', 'Fan2')] ? selectData[state.dataIndex.replace('Fan', 'Fan2')] : '-'
+                        }}</div>
+                      </div>
+                      <div v-else>
+                        <div class="item-value">{{ selectData[state.dataIndex] ? selectData[state.dataIndex] : '-' }}</div>
+                      </div>
+                    </div>
+                  </template>
+                  <template v-else>
+                    <div class="warning-item">
+                      <div class="item-name"> <div class="icon"></div> {{ state.title }} </div>
+                      <div v-if="state.dataIndex.startsWith('Fan')">
+                        <div class="signal-item" v-if="warningMonitorRowIndex == 0">
+                          <template v-if="selectData['Fan1StartStatus'] == '0' && globalConfig?.simulatedPassword">
+                            <div class="signal-round signal-round-gry"></div>
+                            <div class="vent-margin-l-8">无状态</div>
+                          </template>
+                          <template v-else>
+                            <div
+                              class="signal-round"
+                              :class="{
+                                'signal-round-run': selectData[state.dataIndex.replace('Fan', 'Fan1')] == '0',
+                                'signal-round-warning':
+                                  selectData[state.dataIndex.replace('Fan', 'Fan1')] !== undefined &&
+                                  selectData[state.dataIndex.replace('Fan', 'Fan1')] == '1',
+                                'signal-round-gry': selectData[state.dataIndex.replace('Fan', 'Fan1')] === undefined,
+                              }"
+                            ></div>
+                            <div class="vent-margin-l-8">{{
+                              selectData[state.dataIndex.replace('Fan', 'Fan1')] === undefined
+                                ? '无状态'
+                                : selectData[state.dataIndex.replace('Fan', 'Fan1')] == '0'
+                                ? '正常'
+                                : '异常'
+                            }}</div>
+                          </template>
+                        </div>
+                        <div class="signal-item" v-if="warningMonitorRowIndex == 1">
+                          <template v-if="selectData['Fan2StartStatus'] == '0' && globalConfig?.simulatedPassword">
+                            <div class="signal-round signal-round-gry"></div>
+                            <div class="vent-margin-l-8">无状态</div>
+                          </template>
+                          <template v-else>
+                            <div
+                              class="signal-round"
+                              :class="{
+                                'signal-round-run': selectData[state.dataIndex.replace('Fan', 'Fan2')] == '0',
+                                'signal-round-warning':
+                                  selectData[state.dataIndex.replace('Fan', 'Fan2')] != undefined &&
+                                  selectData[state.dataIndex.replace('Fan', 'Fan2')] == '1',
+                                'signal-round-gry': selectData[state.dataIndex.replace('Fan', 'Fan2')] == undefined,
+                              }"
+                            ></div>
+                            <div class="vent-margin-l-8">{{
+                              selectData[state.dataIndex.replace('Fan', 'Fan2')] == undefined
+                                ? '无状态'
+                                : selectData[state.dataIndex.replace('Fan', 'Fan2')] == '0'
+                                ? '正常'
+                                : '异常'
+                            }}</div>
+                          </template>
+                        </div>
+                      </div>
+                      <div v-else>
+                        <div class="signal-item">
+                          <div
+                            class="signal-round vent-margin-l-8"
+                            :class="{
+                              'signal-round-run': selectData[state.dataIndex] == '0',
+                              'signal-round-warning': selectData[state.dataIndex] !== undefined && selectData[state.dataIndex] == '1',
+                              'signal-round-gry': selectData[state.dataIndex] === undefined,
+                            }"
+                          ></div>
+                          <div class="vent-margin-l-8">{{
+                            selectData[state.dataIndex] === undefined ? '无状态' : selectData[state.dataIndex] == '0' ? '正常' : '异常'
+                          }}</div>
+                        </div>
+                      </div>
+                    </div>
+                  </template>
+                </div>
+              </template>
+            </div>
           </div>
         </div>
       </div>
@@ -310,30 +395,6 @@
               </template>
             </GroupMonitorTable>
           </a-tab-pane>
-          <a-tab-pane key="2" tab="实时曲线图" force-render v-if="hasPermission('echart:show')">
-            <div class="tab-item" v-if="activeKey === '2'">
-              <div class="vent-flex-row-between" style="height: 100%">
-                <BarSingle
-                  :xAxisData="xAxisDataGas"
-                  :dataSource="dataSource[selectRowIndex]"
-                  height="100%"
-                  :chartsColumns="chartsColumns"
-                  style="flex: 3"
-                />
-                <BarSingle
-                  v-if="globalConfig?.simulatedPassword"
-                  :xAxisData="[
-                    { key: 'F1', valueKey: 'windQuantity1' },
-                    { key: 'F2', valueKey: 'windQuantity2' },
-                  ]"
-                  :dataSource="dataSource[selectRowIndex]"
-                  height="100%"
-                  :chartsColumns="chartsColumns1"
-                  style="flex: 2"
-                />
-              </div>
-            </div>
-          </a-tab-pane>
           <a-tab-pane key="3" tab="历史数据">
             <div class="tab-item" v-if="activeKey === '3'">
               <template v-if="globalConfig.History_Type == 'remote'">
@@ -365,6 +426,43 @@
               />
             </div>
           </a-tab-pane>
+          <a-tab-pane key="2" tab="风量实时曲线图" force-render v-if="hasPermission('echart:show')">
+            <!-- <a-tab-pane key="2" tab="风量实时曲线图" force-render> -->
+            <div class="tab-item" v-if="activeKey === '2'">
+              <!-- <div class="vent-flex-row-between" style="height: 100%">
+                <BarSingle
+                  :xAxisData="xAxisDataGas"
+                  :dataSource="dataSource[selectRowIndex]"
+                  height="100%"
+                  :chartsColumns="chartsColumns"
+                  style="flex: 3"
+                />
+                <BarSingle
+                  v-if="globalConfig?.simulatedPassword"
+                  :xAxisData="[
+                    { key: 'F1', valueKey: 'windQuantity1' },
+                    { key: 'F2', valueKey: 'windQuantity2' },
+                  ]"
+                  :dataSource="dataSource[selectRowIndex]"
+                  height="100%"
+                  :chartsColumns="chartsColumns1"
+                  style="flex: 2"
+                />
+              </div> -->
+              <div class="vent-flex-row-between" style="height: 100%">
+                <BarAndLine
+                  class="echarts-line"
+                  xAxisPropType="time"
+                  :dataSource="historyList"
+                  height="90%"
+                  width="100%"
+                  :chartsColumns="chartsColumns"
+                  :option="echatsOption"
+                  chartsType="listMonitor"
+                />
+              </div>
+            </div>
+          </a-tab-pane>
         </a-tabs>
         <a-button
           v-if="hasPermission('btn:reportDown')"
@@ -442,10 +540,7 @@
         <div class="label">风机运行频率(Hz):</div>
         <a-input-number size="small" v-model:value="fan1FrequencyVal" :min="20" :max="50" :step="0.1" />
       </div>
-      <div class="vent-flex-row input-box" v-if="controlType == 'needAir'">
-        <div class="label">需风量(单位):</div>
-        <a-input-number size="small" v-model:value="frequencyVal" :min="30" :max="50" :step="0.1" />
-      </div>
+
       <div class="vent-flex-row input-box" v-if="controlType == 'disAirAlarm'">
         <div class="label">漏风率(%):</div>
         <a-input-number size="small" v-model:value="frequencyVal" :min="0" :max="50" :step="0.1" />
@@ -492,6 +587,16 @@
           <a-input-number size="small" v-model:value="modalTypeArr.rightBtnArr[3].max" :min="0" :max="50" :step="0.1" />
         </div>
       </div>
+      <div class="vent-flex-row input-box" v-if="controlType == 'zhlk'">
+        <div class="label">目标风量(m³/min):</div>
+        <a-input-number size="small" v-model:value="targetVolume" />
+      </div>
+      <div v-if="controlType == 'gasOverSet'">
+        <div class="vent-flex-row input-box">
+          <div class="label">设置瓦斯超限浓度:</div>
+          <a-input-number size="small" v-model:value="gasWarningVal" :min="0" :max="1" :step="0.01" />
+        </div>
+      </div>
       <!-- 启动或停止 -->
       <div class="" v-if="controlType == 'startSmoke'"> </div>
       <div v-if="!globalConfig?.simulatedPassword" class="vent-flex-row input-box">
@@ -508,16 +613,17 @@
 <script setup lang="ts">
   import { ExclamationCircleFilled, ArrowRightOutlined } from '@ant-design/icons-vue';
   import { onBeforeMount, ref, watch, onMounted, nextTick, defineAsyncComponent, reactive, onUnmounted, inject, unref } from 'vue';
-  import BarSingle from '../../../../components/chart/BarSingle.vue';
+  // import BarSingle from '../../../../components/chart/BarSingle.vue';
+  import BarAndLine from '../../../../components/chart/BarAndLine.vue';
   import GroupMonitorTable from '../comment/GroupMonitorTable.vue';
   import AlarmHistoryTable from '../comment/AlarmHistoryTable.vue';
   import HandlerHistoryTable from '../comment/HandlerHistoryTable.vue';
   import DeviceBaseInfo from '../comment/components/DeviceBaseInfo.vue';
   import { mountedThree, setModelType, destroy, addCssText, addText, playSmoke } from './fanLocal.three';
   import lodash from 'lodash';
-  import { getTableList, list } from '/@/views/vent/monitorManager/fanLocalMonitor/fanLocal.api';
+  import { getTableList, list, autoAdjust } from '/@/views/vent/monitorManager/fanLocalMonitor/fanLocal.api';
   import { list as baseList } from '../../deviceManager/fanTabel/fan.api';
-  import { chartsColumns, chartsColumns1 } from './fanLocal.data';
+  import { chartsColumns1, echatsOption } from './fanLocal.data';
   import { deviceControlApi } from '/@/api/vent/index';
   import { setDivHeight } from '/@/utils/event';
   import { BorderBox8 as DvBorderBox8 } from '@kjgl77/datav-vue3';
@@ -622,6 +728,11 @@
         permission: 'fanLocal:gasAlarmSet',
       },
       {
+        key: 'gasOverSet', //
+        value: '瓦斯限值设定',
+        permission: 'fanLocal:gasOverSet',
+      },
+      {
         key: 'kkjc',
         value: '工况辅助决策',
         permission: 'fanLocal:kkjc',
@@ -713,6 +824,10 @@
   const mainWindIsShow1 = ref('open'); // 主机默认启动leftColumns
   const mainWindIsShow2 = ref('stop'); // 备机默认不启动
   const fanControl = ref('');
+  const targetVolume = ref(600);
+  const historyList = ref([]);
+  const remoteChartsColumns = getTableHeaderColumns('fanlocal_chart');
+  const chartsColumns = remoteChartsColumns && remoteChartsColumns.length > 0 ? remoteChartsColumns : chartsColumns1;
 
   const passWord = ref('');
   // 默认初始是第一行
@@ -848,12 +963,35 @@
           if (data['Fan2StartStatus'] && data['Fan2StartStatus'] === '1.0') data['Fan2StartStatus'] = '1';
           if (data['Fan1StartStatus'] && data['Fan1StartStatus'] === '0.0') data['Fan1StartStatus'] = '0';
           if (data['Fan2StartStatus'] && data['Fan2StartStatus'] === '0.0') data['Fan2StartStatus'] = '0';
-
+          data['windQuantity2'] =
+            data['windQuantity2'] ||
+            data['m3'] ||
+            data['ductOutletAirVolume_merge'] ||
+            data['windOutSpeed_merge'] ||
+            data['windOutSpeed1'] ||
+            data['windOutSpeed2'] ||
+            data['windOutSpeed_merge'];
           // if (globSetting.sysOrgCode === 'sdmtjtbetmk') {
           //   if (data['m3']) data['ductOutletAirVolume_merge'] = data['m3'];
           //   if (data['m3']) data['inletAirVolume_merge'] = (Number(data['m3']) * 1.08).toFixed(2);
           // }
           dataSource.value.push(data);
+          if (selectRowIndex.value > -1) {
+            let echartsData = dataArr[selectRowIndex.value]['history'] || [];
+            echartsData = echartsData.filter((item) => {
+              item['FanfHz'] = data['Fan1StartStatus'] == '1' ? item['Fan1fHz'] : data['Fan2StartStatus'] == '1' ? item['Fan2fHz'] : 0;
+              item['windQuantity2'] =
+                item['windQuantity2'] ||
+                item['m3'] ||
+                item['ductOutletAirVolume_merge'] ||
+                item['windOutSpeed_merge'] ||
+                item['windOutSpeed1'] ||
+                item['windOutSpeed2'] ||
+                item['windOutSpeed_merge'];
+              return true;
+            });
+            historyList.value = echartsData;
+          }
         });
       } else {
         return (dataSource.value = []);
@@ -1274,7 +1412,29 @@
         }
         modalTitle.value = '';
         modalIsShow.value = false;
+      } else if (handType === 'zhlk' || handType === 'gasOverSet') {
+        if (targetVolume.value) {
+          const params =
+            handType === 'zhlk'
+              ? { auto: 1, fanlocalId: selectData.deviceID, xufengliang: targetVolume.value }
+              : { auto: 1, fanlocalId: selectData.deviceID, gasMax: gasWarningVal.value };
+          autoAdjust(params).then(() => {
+            if (res.success) {
+              if (globalConfig.History_Type == 'remote') {
+                message.success('指令已下发至生产管控平台成功!');
+              } else {
+                message.success('指令已下发成功!');
+              }
+              modalTitle.value = '';
+              modalIsShow.value = false;
+            } else {
+              message.error(res.message);
+            }
+          });
+        }
       }
+
+      //targetVolume
     };
   }
 
@@ -1489,22 +1649,14 @@
               display: flex;
               justify-content: center;
               align-items: center;
-              background: url('/@/assets/images/vent/count-header-bg.png') no-repeat;
+              // background: url('/@/assets/images/vent/count-header-bg.png') no-repeat;
             }
           }
         }
         .warning-group {
           padding: 0 10px;
           position: relative;
-          // &::before {
-          //   content: '';
-          //   display: block;
-          //   width: 1px;
-          //   height: 100%;
-          //   position: absolute;
-          //   left: 12px;
-          //   background-color: #00f5fe;
-          // }
+
           .warning-item {
             display: flex;
             flex-direction: row;
@@ -1535,6 +1687,17 @@
             }
           }
         }
+        .warning-group-r {
+          &::before {
+            content: '';
+            display: block;
+            width: 1px;
+            height: 100%;
+            position: absolute;
+            left: 12px;
+            background-color: #00f5fe;
+          }
+        }
       }
     }
   }

+ 28 - 71
src/views/vent/monitorManager/warningMonitor/index.vue

@@ -17,14 +17,9 @@
   import { defHttp } from '/@/utils/http/axios';
   import dayjs from 'dayjs';
   import { getAutoScrollContainer } from '/@/utils/common/compUtils';
-  import { safetyDeviceList, safetyList } from './safety.api';
+  import { list } from './warning.api';
 
   const props = defineProps({
-    columns: {
-      type: Array,
-      // required: true,
-      default: () => [],
-    },
     deviceListApi: {
       type: Function,
     },
@@ -34,10 +29,6 @@
     sysId: {
       type: String,
     },
-    scroll: {
-      type: Object,
-      default: { y: 0 },
-    },
     list: {
       type: Function,
       default: (params) => defHttp.get({ url: '/safety/ventanalyAlarmLog/list', params }),
@@ -47,13 +38,11 @@
   const getDeviceListApi = (params) => defHttp.post({ url: '/monitor/device', params });
   const globalConfig = inject('globalConfig');
   const alarmHistory = ref();
-  const columns = getTableHeaderColumns('warnig_history');
+  const columns = getTableHeaderColumns('alarm_history');
   const deviceOptions = ref([]);
   const dataTypeName = ref('');
   const deviceType = ref('');
 
-  const tableScroll = props.scroll.y ? ref({ y: props.scroll.y - 100 }) : ref({});
-
   async function getDeviceList() {
     let result;
     const res = await getDeviceListApi({ devicetype: deviceType.value, filterParams: { dataTypeName: dataTypeName.value }, pageSize: 10000 });
@@ -81,56 +70,16 @@
     await getForm().setFieldsValue({ deviceId: deviceOptions.value[0] ? deviceOptions.value[0]['value'] : '' });
   }
 
-  // watch(
-  //   () => {
-  //     return deviceType.value;
-  //   },
-  //   async (newVal) => {
-  //     if (!newVal) return;
-
-  //     const column = getTableHeaderColumns(newVal + '_history');
-  //     if (column && column.length < 1) {
-  //       const arr = newVal.split('_');
-  //       const columnKey = arr.reduce((prev, cur, index) => {
-  //         if (index !== arr.length - 2) {
-  //           return prev + '_' + cur;
-  //         } else {
-  //           return prev;
-  //         }
-  //       });
-  //       columns.value = getTableHeaderColumns(arr[0] + '_history');
-  //     } else {
-  //       columns.value = column;
-  //     }
-  //     if (alarmHistory.value) reload();
-  //   },
-  //   {
-  //     immediate: true,
-  //   }
-  // );
-
-  watch(
-    () => props.scroll.y,
-    (newVal) => {
-      if (newVal) {
-        tableScroll.value = { y: newVal - 100 };
-      } else {
-        tableScroll.value = {};
-      }
-    }
-  );
-
   // 列表页面公共参数、方法
   const { tableContext, onExportXls } = useListPage({
     tableProps: {
-      api: safetyList,
-      columns: props.columnsType ? columns : (props.columns as any[]),
+      api: list,
+      columns: columns,
       canResize: true,
       showTableSetting: false,
       showActionColumn: false,
       bordered: false,
       size: 'small',
-      scroll: tableScroll,
       formConfig: {
         labelAlign: 'left',
         showAdvancedButton: false,
@@ -142,29 +91,31 @@
             component: 'MTreeSelect',
             componentProps: {
               virtual: false,
-              onChange: async (e: any) => {
-                if (alarmHistory.value) getForm().resetFields();
-                deviceType.value = e;
-                await getDeviceList();
-              },
+              // onChange: async (e: any) => {
+              //   if (alarmHistory.value) getForm().resetFields();
+              //   deviceType.value = e;
+              //   await getDeviceList();
+              // },
             },
             colProps: { span: 6 },
           },
           {
-            label: '查询设备',
-            field: 'deviceId',
+            label: '是否解决',
+            field: 'isok',
             component: 'Select',
-            defaultValue: deviceOptions.value[0] ? deviceOptions.value[0]['value'] : '',
             componentProps: {
-              showSearch: true,
-              filterOption: (input: string, option: any) => {
-                return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0;
-              },
-              options: deviceOptions,
-            },
-            colProps: {
-              span: 4,
+              options: [
+                {
+                  label: '未解决',
+                  value: '0',
+                },
+                {
+                  label: '已解决',
+                  value: '1',
+                },
+              ],
             },
+            colProps: { span: 4 },
           },
           {
             field: 'startTime',
@@ -206,6 +157,12 @@
         pageSize: 10,
         pageSizeOptions: ['10', '30', '50', '100'],
       },
+      beforeFetch(params) {
+        params.devicetype = params.devicetype ? params.devicetype + '*' : '';
+        if (props.sysId) {
+          params.sysId = props.sysId;
+        }
+      },
     },
     exportConfig: {
       name: '预警历史列表',

+ 0 - 39
src/views/vent/monitorManager/warningMonitor/safety.api.ts

@@ -1,39 +0,0 @@
-import { defHttp } from '/@/utils/http/axios';
-
-enum Api {
-  list = '/monitor/device',
-  baseList = '/safety/ventanalyDeviceInfo/list',
-  deviceTypeList = '/safety/ventanalyDeviceInfo/DeviceKind/queryBySystem',
-  itemList = '/sys/dictItem/list',
-  safetyDeviceList = '/monitor/codeDict',
-  safetyList = '/history/getAlarmHistoryData',
-  export = '/safety/reportInfo/expComReport?tempName=aqjk',
-  subStationList = '/safety/ventanalySubStation/alllist',
-  initSubStation = '/monitor/initSafetyMonitorDeviceInfo',
-}
-/**
- * 列表接口
- * @param params
- */
-export const list = (params) => defHttp.post({ url: Api.list, params });
-
-// 分站查询接口
-export const subStationList = (params) => defHttp.get({ url: Api.subStationList, params });
-// 同步分站
-export const initSubStation = (params) => defHttp.post({ url: Api.initSubStation, params });
-
-export const safetyList = (params) => defHttp.post({ url: Api.safetyList, params });
-
-export const safetyDeviceList = (params) => defHttp.post({ url: Api.safetyDeviceList, params });
-
-/**
- * 保存或者更新用户
- * @param params
- */
-export const getDeviceList = (params) => defHttp.get({ url: Api.baseList, params });
-
-export const getDeviceTypeList = (params) => defHttp.get({ url: Api.deviceTypeList, params });
-
-export const itemList = (params) => defHttp.get({ url: Api.itemList, params });
-
-export const getExportUrl = Api.export;

+ 0 - 225
src/views/vent/monitorManager/warningMonitor/safety.data.ts

@@ -1,225 +0,0 @@
-import { safetyDeviceList } from './safety.api';
-
-export const chartsColumns = (deviceType) => {
-  if (deviceType === '') {
-    return [];
-  }
-};
-
-export const formConfig = {
-  labelAlign: 'left',
-  showAdvancedButton: false,
-  showResetButton: false,
-  schemas: [
-    {
-      label: '设备类型',
-      field: 'dataTypeName',
-      component: 'ApiSelect',
-      componentProps: {
-        api: safetyDeviceList.bind(null, { devicetype: 'safetymonitor', code: 'dataTypeName' }),
-        labelField: 'name',
-        valueField: 'code',
-      },
-    },
-    {
-      label: '设备安装地点',
-      field: 'strinstallpos',
-      component: 'Input',
-    },
-  ],
-};
-
-//测风装置
-export const chartsColumnsRect = [
-  {
-    legend: '风量',
-    seriesName: '(m³/min)',
-    ymax: 10000,
-    yname: 'm³/min',
-    linetype: 'bar',
-    yaxispos: 'left',
-    color: '#37BCF2',
-    sort: 1,
-    xRotate: 0,
-    dataIndex: 'm³',
-  },
-  {
-    legend: '气源压力',
-    seriesName: '(MPa)',
-    ymax: 50,
-    yname: 'MPa',
-    linetype: 'line',
-    yaxispos: 'right',
-    color: '#FC4327',
-    sort: 2,
-    xRotate: 0,
-    dataIndex: 'sourcePressure',
-  },
-];
-
-//局部风机
-export const chartsColumnsFan = [
-  {
-    legend: '风筒风量1',
-    seriesName: '(m³/min)',
-    ymax: 1000,
-    yname: 'm³/min',
-    linetype: 'bar',
-    yaxispos: 'left',
-    color: '#37BCF2',
-    sort: 1,
-    xRotate: 0,
-    dataIndex: 'windQuantity1',
-  },
-  {
-    legend: '风筒风量2',
-    seriesName: '(m³/min)',
-    ymax: 1000,
-    yname: 'm³/min',
-    linetype: 'line',
-    yaxispos: 'right',
-    color: '#FC4327',
-    sort: 2,
-    xRotate: 0,
-    dataIndex: 'windQuantity2',
-  },
-];
-
-//主风
-export const chartsColumnsMain = [
-  {
-    legend: '风量',
-    seriesName: '(m³/min)',
-    ymax: 1000,
-    yname: 'm³/min',
-    linetype: 'bar',
-    yaxispos: 'left',
-    color: '#37BCF2',
-    sort: 1,
-    xRotate: 0,
-    dataIndex: 'windQuantity1',
-  },
-  {
-    legend: '频率',
-    seriesName: '(Hz)',
-    ymax: 1000,
-    yname: 'Hz',
-    linetype: 'line',
-    yaxispos: 'right',
-    color: '#FC4327',
-    sort: 2,
-    xRotate: 0,
-    dataIndex: 'windQuantity2',
-  },
-];
-//光钎测温
-export const chartsColumnsFiber = [
-  {
-    legend: '最高温度',
-    seriesName: '(°C)',
-    ymax: 100,
-    yname: '°C',
-    linetype: 'bar',
-    yaxispos: 'left',
-    color: '#37BCF2',
-    sort: 1,
-    xRotate: 0,
-    dataIndex: 'fmax',
-  },
-  {
-    legend: '平均温度',
-    seriesName: '(°C)',
-    ymax: 100,
-    yname: '°C',
-    linetype: 'line',
-    yaxispos: 'right',
-    color: '#FC4327',
-    sort: 2,
-    xRotate: 0,
-    dataIndex: 'favg',
-  },
-];
-//密闭
-export const chartsColumnsObf = [
-  {
-    legend: '温度',
-    seriesName: '(°C)',
-    ymax: 100,
-    yname: '°C',
-    linetype: 'bar',
-    yaxispos: 'left',
-    color: '#37BCF2',
-    sort: 1,
-    xRotate: 0,
-    dataIndex: 'temperature',
-  },
-  {
-    legend: 'O2浓度',
-    seriesName: '(%)',
-    ymax: 100,
-    yname: '%',
-    linetype: 'line',
-    yaxispos: 'right',
-    color: '#FC4327',
-    sort: 2,
-    xRotate: 0,
-    dataIndex: 'o2val',
-  },
-];
-
-//束管
-
-export const chartsColumnsBun = [
-  {
-    legend: 'CO浓度',
-    seriesName: '(%)',
-    ymax: 100,
-    yname: '%',
-    linetype: 'bar',
-    yaxispos: 'left',
-    color: '#37BCF2',
-    sort: 1,
-    xRotate: 0,
-    dataIndex: 'coval',
-  },
-  {
-    legend: 'CO2浓度',
-    seriesName: '(%)',
-    ymax: 100,
-    yname: '%',
-    linetype: 'line',
-    yaxispos: 'right',
-    color: '#FC4327',
-    sort: 2,
-    xRotate: 0,
-    dataIndex: 'co2val',
-  },
-];
-
-export const chartsColumnsreal = [
-  {
-    legend: '压差',
-    seriesName: '(Pa)',
-    ymax: 100,
-    yname: 'Pa',
-    linetype: 'bar',
-    yaxispos: 'left',
-    color: '#37BCF2',
-    sort: 1,
-    xRotate: 0,
-    dataIndex: 'frontRearDP',
-  },
-  {
-    legend: '气源压力',
-    seriesName: '(MPa)',
-    ymax: 50,
-    yname: 'MPa',
-    linetype: 'line',
-    yaxispos: 'right',
-    color: '#FC4327',
-    sort: 2,
-    xRotate: 0,
-    dataIndex: 'sourcePressure',
-  },
-];
-export const isHaveNoAction = ['safetymonitor', 'wasichoufang'];

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

@@ -22,25 +22,25 @@
           <span class="input-title">风窗面积:</span>
           <a-input-number size="small" placeholder="0" :min="0" :max="90" :step="1" v-model:value="windowAngle" />
         </div> -->
-        <template v-if="hasPermission('window:showAngle')">
+        <template>
           <div class="row" v-if="selectData.nwindownum > 1">
-            <div v-if="hasPermission('window:control')" class="button-box" @click="setAngle(1)">设定前窗角度</div>
-            <div v-if="hasPermission('window:control')" class="button-box" @click="setAngle(2)">设定后窗角度</div>
+            <div v-if="hasPermission('window:control')" class="button-box" @click="setArea(1)">设定前窗面积</div>
+            <div v-if="hasPermission('window:control')" class="button-box" @click="setArea(2)">设定后窗面积</div>
             <div v-if="hasPermission('window:ldkz')" class="button-box" @click="setArea(3)">自主联动控制</div>
           </div>
           <div class="row" v-if="selectData.nwindownum == 1">
-            <div v-if="hasPermission('window:control')" class="button-box" @click="setAngle(1)">设定风窗角度</div>
+            <div v-if="hasPermission('window:control')" class="button-box" @click="setArea(1)">设定风窗面积</div>
             <div v-if="hasPermission('window:ldkz')" class="button-box" @click="setArea(3)">自主联动控制</div>
           </div>
         </template>
-        <template v-else>
+        <template v-if="hasPermission('window:showAngle')">
           <div class="row" v-if="selectData.nwindownum > 1">
-            <div v-if="hasPermission('window:control')" class="button-box" @click="setArea(1)">设定前窗面积</div>
-            <div v-if="hasPermission('window:control')" class="button-box" @click="setArea(2)">设定后窗面积</div>
+            <div v-if="hasPermission('window:control')" class="button-box" @click="setAngle(1)">设定前窗角度</div>
+            <div v-if="hasPermission('window:control')" class="button-box" @click="setAngle(2)">设定后窗角度</div>
             <div v-if="hasPermission('window:ldkz')" class="button-box" @click="setArea(3)">自主联动控制</div>
           </div>
           <div class="row" v-if="selectData.nwindownum == 1">
-            <div v-if="hasPermission('window:control')" class="button-box" @click="setArea(1)">设定风窗面积</div>
+            <div v-if="hasPermission('window:control')" class="button-box" @click="setAngle(1)">设定风窗角度</div>
             <div v-if="hasPermission('window:ldkz')" class="button-box" @click="setArea(3)">自主联动控制</div>
           </div>
         </template>