Browse Source

[Mod 0000] 修改接口网关;解决补连塔压风管控系统部分监测数据不显示问题

hongrunxia 1 month ago
parent
commit
7419b10e38

+ 8 - 1
src/api/vent/index.ts

@@ -1,4 +1,6 @@
 import { defHttp } from '/@/utils/http/axios';
+import { AesEncryption } from '/@/utils/cipher';
+import { loginCipher } from '/@/settings/encryptionSetting';
 
 enum Api {
   DEVICE_CONTROL = '/safety/ventanalyMonitorData/devicecontrol', // 开关控制
@@ -6,4 +8,9 @@ enum Api {
 
 // Get personal center-basic settings
 
-export const deviceControlApi = (data) => defHttp.put({ url: Api.DEVICE_CONTROL, data });
+export const deviceControlApi = (data) => {
+  // 加密password
+  const encryption = new AesEncryption({ key: loginCipher.key, iv: loginCipher.iv });
+  data.password = encryption.encryptByAES(data.password);
+  return defHttp.put({ url: Api.DEVICE_CONTROL, data });
+};

+ 3 - 3
src/views/vent/bundle/bundleMonitorTable/bundle-table.api.ts

@@ -1,9 +1,9 @@
 import { defHttp } from '/@/utils/http/axios';
 
 enum Api {
-  getBundleInfo = '/ventanaly-device/safety/reportLocalData/queryReportData',
-  getFileList = '/ventanaly-device/safety/reportLocalData/list',
-  getFileListById = '/ventanaly-device/safety/reportLocalData/queryById',
+  getBundleInfo = '/safety/reportLocalData/queryReportData',
+  getFileList = '/safety/reportLocalData/list',
+  getFileListById = '/safety/reportLocalData/queryById',
 }
 /**
  *

+ 3 - 3
src/views/vent/bundleSpy/bundleSpyTable/bundleSpy-table.api.ts

@@ -1,9 +1,9 @@
 import { defHttp } from '/@/utils/http/axios';
 
 enum Api {
-  getbunudleSpyInfo = '/ventanaly-device/safety/reportLocalData/queryReportData',
-  getFileList = '/ventanaly-device/safety/reportLocalData/list',
-  getFileListById = '/ventanaly-device/safety/reportLocalData/queryById',
+  getbunudleSpyInfo = '/safety/reportLocalData/queryReportData',
+  getFileList = '/safety/reportLocalData/list',
+  getFileListById = '/safety/reportLocalData/queryById',
 }
 /**
  *

+ 6 - 6
src/views/vent/deviceManager/comment/warningTabel/warning.api.ts

@@ -39,12 +39,12 @@ enum Api {
   backWindControlDevicePointDelete = '/safety/managesysAuto/delete',
   backWindControlDevicePointEdit = '/safety/managesysAuto/edit',
 
-  modelAlarmAutoList = '/ventanaly-device/safety/modelAlarmAuto/list',
-  modelAlarmAutoEdit = '/ventanaly-device/safety/modelAlarmAuto/edit',
-  modelAlarmAutoDelete = '/ventanaly-device/safety/modelAlarmAuto/delete',
-  modelAlarmAutoAdd = '/ventanaly-device/safety/modelAlarmAuto/add',
-  modelAlarmAutoDeleteBatch = '/ventanaly-device/safety/modelAlarmAuto/deleteBatch',
-  modelAlarmAutoAddBatch = '/ventanaly-device/safety/modelAlarmAuto/addBatch',
+  modelAlarmAutoList = '/safety/modelAlarmAuto/list',
+  modelAlarmAutoEdit = '/safety/modelAlarmAuto/edit',
+  modelAlarmAutoDelete = '/safety/modelAlarmAuto/delete',
+  modelAlarmAutoAdd = '/safety/modelAlarmAuto/add',
+  modelAlarmAutoDeleteBatch = '/safety/modelAlarmAuto/deleteBatch',
+  modelAlarmAutoAddBatch = '/safety/modelAlarmAuto/addBatch',
 }
 /**
  * 导出api

+ 3 - 3
src/views/vent/dust/dustMonitorTable/dsut-table.api.ts

@@ -1,9 +1,9 @@
 import { defHttp } from '/@/utils/http/axios';
 
 enum Api {
-  getDustInfo = '/ventanaly-device/safety/reportLocalData/queryReportData',
-  getFileList = '/ventanaly-device/safety/reportLocalData/list',
-  getFileListById = '/ventanaly-device/safety/reportLocalData/queryById',
+  getDustInfo = '/safety/reportLocalData/queryReportData',
+  getFileList = '/safety/reportLocalData/list',
+  getFileListById = '/safety/reportLocalData/queryById',
 }
 /**
  * 获取粉尘监测结果报表

+ 1 - 1
src/views/vent/gas/gasHome/gasHome.api.ts

@@ -2,7 +2,7 @@ import { defHttp } from '/@/utils/http/axios';
 
 enum Api {
   list = '/monitor/system',
-  gasSystem = '/ventanaly-device/monitor/gasSystem',
+  gasSystem = '/monitor/gasSystem',
 }
 /**
  * 列表接口

+ 3 - 3
src/views/vent/home/configurable/configurable.api.ts

@@ -5,9 +5,9 @@ import { get } from '../billboard/utils';
 enum Api {
   list = '/safety/ventanalyDevice/homedata2',
   getHomeData = '/safety/ventanalyDevice/homedata',
-  getDisHome = '/ventanaly-device/monitor/disaster/getDisHome',
-  getBDDustData = '/ventanaly-device/monitor/disaster/getDisDustHome',
-  getBDFireData = '/ventanaly-device/monitor/disaster/getDisFireHome',
+  getDisHome = '/monitor/disaster/getDisHome',
+  getBDDustData = '/monitor/disaster/getDisDustHome',
+  getBDFireData = '/monitor/disaster/getDisFireHome',
 }
 
 // 搞这个缓存是由于:目前代码上的设计是多个模块发出多次请求,每个模块自己负责消费前者的响应。

+ 3 - 3
src/views/vent/monitorManager/alarmMonitor/alarm.api.ts

@@ -3,14 +3,14 @@ import { defHttp } from '/@/utils/http/axios';
 enum Api {
   modalParam = '/ventanaly-model/Vmodel/modelParamPub/list',
 
-  list = '/ventanaly-device/monitor/device',
+  list = '/monitor/device',
   baseList = '/safety/ventanalyWindow/list',
   warningList = '/safety/ventanalyAlarmLog/now_alarmlist',
   warningHistoryList = '/safety/ventanalyAlarmLog/list',
   totalList = '/safety/ventanalyAlarmLog/total',
 
-  sysTypeWarnList = '/ventanaly-device/safety/ventanalyAlarmLog/sysTypeWarn',
-  sysWarn = '/ventanaly-device/safety/ventanalyAlarmLog/sysWarn',
+  sysTypeWarnList = '/safety/ventanalyAlarmLog/sysTypeWarn',
+  sysWarn = '/safety/ventanalyAlarmLog/sysWarn',
   getReferenceValue = '/safety/managesysDevice/getReferenceValue',
   realTimeNetCal = '/ventanaly-model/Vmodel/VentanalyAirthmeticJson/windTimenetcal',
   getModel = '/ventanaly-model/Vmodel/ventanalyModel/getModel',

+ 3 - 3
src/views/vent/monitorManager/alarmMonitor/common.api.ts

@@ -1,9 +1,9 @@
 import { defHttp } from '/@/utils/http/axios';
 
 enum Api {
-  sysTypeWarnList = '/ventanaly-device/safety/ventanalyAlarmLog/sysTypeWarn',
-  sysWarn = '/ventanaly-device/safety/ventanalyAlarmLog/sysWarn',
-  getDevice = '/ventanaly-device/monitor/device',
+  sysTypeWarnList = '/safety/ventanalyAlarmLog/sysTypeWarn',
+  sysWarn = '/safety/ventanalyAlarmLog/sysWarn',
+  getDevice = '/monitor/device',
 }
 
 /**

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

@@ -65,7 +65,7 @@
     },
   });
 
-  const getDeviceListApi = (params) => defHttp.post({ url: '/ventanaly-device/monitor/device', params });
+  const getDeviceListApi = (params) => defHttp.post({ url: '/monitor/device', params });
   const globalConfig = inject('globalConfig');
   const alarmHistory = ref();
   const columns = ref([]);

+ 2 - 2
src/views/vent/monitorManager/comment/comment.api.ts

@@ -6,8 +6,8 @@ enum Api {
   input = '/safety/ventanalyDeviceInfo/input',
   sysList = '/safety/ventanalyManageSystem/list',
   sysInput = '/safety/ventanalyManageSystem/input',
-  getInfo = '/ventanaly-device/safety/reportLocalData/queryReportData',
-  getFileList = '/ventanaly-device/safety/reportLocalData/list',
+  getInfo = '/safety/reportLocalData/queryReportData',
+  getFileList = '/safety/reportLocalData/list',
 }
 
 /**

+ 1 - 1
src/views/vent/monitorManager/comment/components/LinkControlDesModal.vue

@@ -7,7 +7,7 @@
   import { onMounted, ref, defineEmits, onUnmounted, computed } from 'vue';
   import { defHttp } from '/@/utils/http/axios';
 
-  const getLinkAlarmInfo = (params?) => defHttp.post({ url: '/ventanaly-device/safety/ventanalyDeviceInfo/getLinkAlarmInfo', params });
+  const getLinkAlarmInfo = (params?) => defHttp.post({ url: '/safety/ventanalyDeviceInfo/getLinkAlarmInfo', params });
 
   const emit = defineEmits(['close']);
   const props = withDefaults(

+ 22 - 16
src/views/vent/monitorManager/compressor/components/nitrogenHome_blt.vue

@@ -9,7 +9,12 @@
     <a-spin :spinning="loading" />
     <div v-for="groupNum in monitorDataGroupNum" :key="groupNum" class="modal-monitor">
       <fourBorderBg :class="`kyj${groupNum}`" :id="`nitrogenMonitor${groupNum}`">
-        <div class="title">{{ monitorData[groupNum - 1]['strname'] }} </div>
+        <div class="title">
+          {{ monitorData[groupNum - 1]['strname'] }}
+          <span :style="{ color: monitorData[groupNum - 1]['AirCompressor_Status'] == '1' ? '#67fc00' : '#e9170b' }">
+            {{ monitorData[groupNum - 1]['AirCompressor_Status'] == '1' ? '(运行)' : '(停止)' }}
+          </span>
+        </div>
         <template v-for="(preMonitor, preMonitorIndex) in preMonitorList" :key="preMonitorIndex">
           <div v-if="preMonitor.code !== 'signal'" class="monitor-item">
             <span class="monitor-title">{{ preMonitor.title }}:</span>
@@ -247,11 +252,12 @@
     if (res) {
       const result = res;
       if (!result || result.msgTxt.length < 1) return;
+      monitorData.value = [];
       result.msgTxt.forEach((item) => {
         if (item.type && item.type.startsWith('nitrogen')) {
           airCompressorState.length = 0;
           let netStatus = 0;
-          monitorData.value = item['datalist'].filter((data) => {
+          const dataList: any[] = item['datalist'].filter((data) => {
             const readData = data.readData;
             if (data['netStatus'] == 1) {
               netStatus = 1;
@@ -264,23 +270,23 @@
             });
             return Object.assign(data, readData);
           });
+          monitorData.value.push(...dataList);
           monitorNetStatus.value = netStatus;
-          console.log(monitorData, 'monitorData.value---===');
-          const airCompressor = { readTime: monitorData.value[0]['readTime'].substring(11) };
-          const dataArr = lodash.cloneDeep(echartData.value);
-          //图表数据
-          if (dataArr.length <= 5) {
-            monitorData.value.forEach((el, index) => {
-              airCompressor[`InputFlux${index + 1}`] = el['InputFlux'] || 0;
-            });
-            dataArr.push(airCompressor);
-          } else {
-            dataArr.shift();
-            dataArr.push(airCompressor);
-          }
-          echartData.value = dataArr;
         }
       });
+      const airCompressor = { readTime: monitorData.value[0]['readTime'].substring(11) };
+      const dataArr = lodash.cloneDeep(echartData.value);
+      //图表数据
+      if (dataArr.length <= 5) {
+        monitorData.value.forEach((el, index) => {
+          airCompressor[`InputFlux${index + 1}`] = el['InputFlux'] || 0;
+        });
+        dataArr.push(airCompressor);
+      } else {
+        dataArr.shift();
+        dataArr.push(airCompressor);
+      }
+      echartData.value = dataArr;
       if (flag) monitorDataGroupNum.value = monitorData.value.length;
       refresh.value = true;
       nextTick(() => {

+ 1 - 1
src/views/vent/monitorManager/compressor/nitrogen.data.ts

@@ -214,7 +214,7 @@ export const zhudanOption = reactive({
 
 export function getMonitorComponent() {
   const { sysOrgCode } = useGlobSetting();
-  // const sysOrgCode = 'sdmtjtbdmk';
+  // const sysOrgCode = 'sdmtjtbltmk';
   let nitrogenHome;
   switch (sysOrgCode) {
     case 'sdmtjtdltmk': //dltj sdmtjtdltmk

+ 1 - 1
src/views/vent/monitorManager/deviceMonitorWarn/deviceMonitorWarn.api.ts

@@ -3,7 +3,7 @@ import { defHttp } from '/@/utils/http/axios';
 enum Api {
   // totalList = '/safety/ventanalyAlarmLog/total',
   totalList = '/safety/ventanalyDevice/homedata2',
-  getAlarmLogList = '/ventanaly-device/monitor/groupCompany/getAlarmLogList', //获取各矿预警统计信息
+  getAlarmLogList = '/monitor/groupCompany/getAlarmLogList', //获取各矿预警统计信息
 }
 
 

+ 1 - 1
src/views/vent/monitorManager/handlerMonitor/index.vue

@@ -31,7 +31,7 @@
     },
     list: {
       type: Function,
-      default: (params) => defHttp.get({ url: '/ventanaly-device/safety/ventanalyDevicesetLog/list', params }),
+      default: (params) => defHttp.get({ url: '/safety/ventanalyDevicesetLog/list', params }),
     },
   });
 

+ 1 - 1
src/views/vent/monitorManager/mainFanMonitor/main.api.ts

@@ -11,7 +11,7 @@ enum Api {
   lineList = '/Vmodel/ventanalyModelFanChart/list',
   lineAdd = '/Vmodel/ventanalyModelFanChart/add',
   lineEdit = '/Vmodel/ventanalyModelFanChart/edit',
-  pointMonitor = '/ventanaly-device/monitor/onedevice',
+  pointMonitor = '/monitor/onedevice',
 }
 /**
  * 导出api

+ 2 - 2
src/views/vent/monitorManager/nitrogen/components/nitrogenHomeBLT.vue

@@ -31,8 +31,8 @@
                 <span
                   :class="{
                     'signal-round': true,
-                    'signal-round-run': signal.isWaring && monitorData[signal.code.replace(prefix[0], `${prefix[0]}${groupNum}`)] == '1',
-                    'signal-round-warning': !signal.isWaring && monitorData[signal.code.replace(prefix[0], `${prefix[0]}${groupNum}`)] == '1',
+                    'signal-round-run': !signal.isWaring && monitorData[signal.code.replace(prefix[0], `${prefix[0]}${groupNum}`)] == '1',
+                    'signal-round-warning': signal.isWaring && monitorData[signal.code.replace(prefix[0], `${prefix[0]}${groupNum}`)] == '1',
                     'signal-round-gry': monitorData[signal.code.replace(prefix[0], `${prefix[0]}${groupNum}`)] != '1',
                   }"
                 ></span>

+ 1 - 1
src/views/vent/monitorManager/nitrogen/nitrogen.data.1.ts

@@ -2,7 +2,7 @@ import { ref, defineAsyncComponent } from 'vue';
 import { useGlobSetting } from '/@/hooks/setting';
 export function getNitrogenHome() {
   const { sysOrgCode } = useGlobSetting();
-  // const sysOrgCode = 'yjmdhswmk';
+  // const sysOrgCode = 'sdmtjtbltmk';
   let nitrogenHome;
   switch (sysOrgCode) {
     case 'sdmtjtbltmk': //补连塔

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

@@ -9,7 +9,7 @@ enum Api {
   safetyList = '/monitor/history/getAlarmHistoryData',
   export = '/safety/reportInfo/expComReport?tempName=aqjk',
   subStationList = '/safety/ventanalySubStation/alllist',
-  initSubStation = '/ventanaly-device/monitor/initKafkaDeviceInfo',
+  initSubStation = '/monitor/initKafkaDeviceInfo',
 }
 /**
  * 列表接口

+ 3 - 3
src/views/vent/monitorManager/warningMonitor/warning.api.ts

@@ -4,9 +4,9 @@ enum Api {
   // list = '/safety/ventanalyAlarmLog/list',
   list = '/ventanaly-company/company/index/getEachMineWarnLogList',//获取公司端列表
   getEachMineWarnCountInfo = '/ventanaly-company/company/index/getEachMineWarnCountInfo',//获取公司端信息
-  getWarnCountInfo = '/ventanaly-device/monitor/groupCompany/getWarnCountInfo', // 获取矿端信息
-  getAlarmLogList = '/ventanaly-device/monitor/groupCompany/getAlarmLogList', //获取各矿预警统计信息
-  getManageAutoLogList = '/ventanaly-device/monitor/groupCompany/getManageAutoLogList', //获取各矿工作面智能管控预警信息
+  getWarnCountInfo = '/monitor/groupCompany/getWarnCountInfo', // 获取矿端信息
+  getAlarmLogList = '/monitor/groupCompany/getAlarmLogList', //获取各矿预警统计信息
+  getManageAutoLogList = '/monitor/groupCompany/getManageAutoLogList', //获取各矿工作面智能管控预警信息
 }
 /**
  * 列表接口