Browse Source

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

hongrunxia 8 months ago
parent
commit
ebd4129386

+ 31 - 85
src/views/vent/gas/gasPumpSetting/components/unitTable.vue

@@ -7,89 +7,8 @@
   import { BasicTable } from '/@/components/Table';
   import { useListPage } from '/@/hooks/system/useListPage';
   import { UnitTableColumns } from '../gasPumpSetting.data';
-
-  const tableData = [
-    {
-      key: '1',
-      name: '胡歌',
-      age: 32,
-      dep: '朝阳区林萃路1号',
-      ret: '朝阳区林萃路1号',
-      oba: '朝阳区林萃路1号',
-    },
-    {
-      key: '1',
-      name: '胡歌',
-      age: 32,
-      dep: '朝阳区林萃路1号',
-      ret: '朝阳区林萃路1号',
-      oba: '朝阳区林萃路1号',
-    },
-    {
-      key: '1',
-      name: '胡歌',
-      age: 32,
-      dep: '朝阳区林萃路1号',
-      ret: '朝阳区林萃路1号',
-      oba: '朝阳区林萃路1号',
-    },
-    {
-      key: '1',
-      name: '胡歌',
-      age: 32,
-      dep: '朝阳区林萃路1号',
-      ret: '朝阳区林萃路1号',
-      oba: '朝阳区林萃路1号',
-    },
-    {
-      key: '1',
-      name: '胡歌',
-      age: 32,
-      dep: '朝阳区林萃路1号',
-      ret: '朝阳区林萃路1号',
-      oba: '朝阳区林萃路1号',
-    },
-    {
-      key: '1',
-      name: '胡歌',
-      age: 32,
-      dep: '朝阳区林萃路1号',
-      ret: '朝阳区林萃路1号',
-      oba: '朝阳区林萃路1号',
-    },
-    {
-      key: '1',
-      name: '胡歌',
-      age: 32,
-      dep: '朝阳区林萃路1号',
-      ret: '朝阳区林萃路1号',
-      oba: '朝阳区林萃路1号',
-    },
-    {
-      key: '1',
-      name: '胡歌',
-      age: 32,
-      dep: '朝阳区林萃路1号',
-      ret: '朝阳区林萃路1号',
-      oba: '朝阳区林萃路1号',
-    },
-    {
-      key: '1',
-      name: '胡歌',
-      age: 32,
-      dep: '朝阳区林萃路1号',
-      ret: '朝阳区林萃路1号',
-      oba: '朝阳区林萃路1号',
-    },
-    {
-      key: '1',
-      name: '胡歌',
-      age: 32,
-      dep: '朝阳区林萃路1号',
-      ret: '朝阳区林萃路1号',
-      oba: '朝阳区林萃路1号',
-    },
-  ];
+  import { getEvaluationUnitList } from '../gasPumpSetting.api';
+  import { onMounted, onUnmounted } from 'vue';
 
   const { tableContext } = useListPage({
     designScope: 'basic-table-demo',
@@ -97,11 +16,38 @@
       columns: UnitTableColumns,
       size: 'small',
       useSearchForm: false,
-      api: () => Promise.resolve(tableData),
       showActionColumn: false,
       showTableSetting: false,
     },
   });
   // BasicTable绑定注册
-  const [registerTable] = tableContext;
+  const [registerTable, { setPagination, setLoading, setTableData }] = tableContext;
+
+  function fetchTableData() {
+    setLoading(true);
+    return getEvaluationUnitList({})
+      .then(({ current, total, records }) => {
+        setPagination({
+          current,
+          total,
+        });
+        setTableData(records);
+      })
+      .finally(() => {
+        setLoading(false);
+      });
+  }
+
+  let timer: any = null;
+
+  onMounted(() => {
+    timer = setInterval(() => {
+      fetchTableData();
+    }, 10000);
+    fetchTableData();
+  });
+
+  onUnmounted(() => {
+    timer = clearInterval(timer);
+  });
 </script>

+ 10 - 10
src/views/vent/gas/gasPumpSetting/gasPumpSetting.data.ts

@@ -461,8 +461,8 @@ export const ManualSettingHeaderConfig = {
 export const UnitTableColumns: BasicColumn[] = [
   {
     title: '评价单元',
-    dataIndex: 'name',
-    key: 'name',
+    dataIndex: 'deviceInfoName',
+    key: 'deviceInfoName',
     rowSpan: 4,
     customCell: (_, index = 0) => {
       // 每4行合并为一列
@@ -475,22 +475,22 @@ export const UnitTableColumns: BasicColumn[] = [
   },
   {
     title: '取样位置',
-    dataIndex: 'age',
-    key: 'age',
+    dataIndex: 'samplingLocation',
+    key: 'samplingLocation',
   },
   {
     title: '采样深度(m)',
-    dataIndex: 'dep',
-    key: 'dep',
+    dataIndex: 'samplingDepth',
+    key: 'samplingDepth',
   },
   {
     title: '残余瓦斯含量',
-    dataIndex: 'ret',
-    key: 'ret',
+    dataIndex: 'residualGasContent',
+    key: 'residualGasContent',
   },
   {
     title: '可解吸瓦斯含量',
-    dataIndex: 'oba',
-    key: 'oba',
+    dataIndex: 'desorbableGasContent',
+    key: 'desorbableGasContent',
   },
 ];

+ 1 - 1
src/views/vent/monitorManager/alarmMonitor/common/warnTargetFire.vue

@@ -27,7 +27,7 @@ let coordDw = ref<any[]>([15, 36, 70, 116, 176, 212,])
 let widthCanvas = ref(1508)
 let heightCanvas = ref(256)
 let tableData = ref<any[]>([
-    { yjdj: '绿色预警', zrjd: '氧化阶段', zb: 'CO,O₂', tj: '当O₂浓度为8%~15%时CO<200ppm;当O₂浓度为15%~18%时,CO<100ppm;当O₂浓度为时,CO<50ppm',wd:'T0⊂(30,50)', ckz: '' },
+    { yjdj: '绿色预警', zrjd: '氧化阶段', zb: 'CO,O₂', tj: '(1)当c(O₂)值在8%~15%时,c(CO)<200ppm;  (2)当c(O₂)值在15%~18%时,c(CO)<100ppm;  (3)当c(O₂)值在18%~21%时,c(CO)<50ppm;',wd:'T0⊂(30,50)', ckz: '' },
     { yjdj: '蓝色预警', zrjd: '自热阶段', zb: 'CO,O₂,(CO*100)/△O₂', tj: '超过氧化阶段条件',wd:'T0⊂(50,70)', ckz: '0.2~0.5' },
     { yjdj: '黄色预警', zrjd: '临界阶段', zb: 'CO,O₂,(CO*100)/△O₂', tj: '超过自热阶段条件',wd:'T0⊂(70,100)', ckz: '0.5-0.6' },
     { yjdj: '橙色预警', zrjd: '热解阶段', zb: '(CO*100)/△O₂,C₂H₄', tj: '超过临界阶段条件',wd:'T0⊂(100,150)', ckz: '>0.6>0' },

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

@@ -490,7 +490,7 @@ async function getList() {
       ? res.info.sysInfo.fireS.summaryInfo.external.coval.value
       : '';
 
-  if (res.bundletubeInfo.msgTxt.length!=0 && res.bundletubeInfo.msgTxt[0].datalist.length != 0) {
+  if (res.bundletubeInfo && res.bundletubeInfo.msgTxt.length!=0 && res.bundletubeInfo.msgTxt[0].datalist.length != 0) {
     res.bundletubeInfo.msgTxt[0].datalist.forEach((el, ind) => {
       fireMonitor1.push({
         value: el.readData.internalFireWarnLevel,

+ 14 - 7
src/views/vent/monitorManager/camera/index.vue

@@ -115,13 +115,15 @@ async function onClick(node) {
   selected.isFolder = node.isFolder;
   if (node.pid != 'root') {
     if (node.isFolder) {
-      let types
+      let types, devicetype
       if (node.itemValue.indexOf('&') != -1) {
         types = node.itemValue.substring(node.itemValue.indexOf('&') + 1)
+        devicetype = node.itemValue.substring(0, node.itemValue.indexOf('&'))
       } else {
         types = ''
+        devicetype = ''
       }
-      let res = await getDevice({ devicetype: types })
+      let res = await getDevice({ ids: types, devicetype: devicetype })
       if (res.msgTxt.length != 0) {
         res.msgTxt[0].datalist.forEach(el => {
           el.pid = node.id
@@ -138,21 +140,25 @@ async function onClick(node) {
       searchParam.devKind = node.itemValue
       searchParam.strType = ''
       await getVideoAddrs()
+      getVideo()
     } else {
-      getVideoAddrsSon(node.deviceID)
+      await getVideoAddrsSon(node.deviceID)
+      getVideo()
     }
 
   } else {
     searchParam.devKind = ''
     searchParam.strType = ''
     await getVideoAddrs()
+    getVideo()
   }
-  getVideo()
+
 };
 
 //点击详情跳转
 function onDetail(node) {
-  let type = listArr[0].children.filter(v => v.id == node.pid)[0].itemValue
+  let str = listArr[0].children.filter(v => v.id == node.pid)[0].itemValue
+  let type = str.indexOf('&') != -1 ? str.substring(0, str.indexOf('&')) : ''
   console.log(type, 'type--------')
   switch (type) {
     case 'pulping'://注浆
@@ -162,7 +168,7 @@ function onDetail(node) {
       router.push('/monitorChannel/monitor-window?id=' + node.deviceID)
       break;
     case 'gate'://自动风门
-      router.push('/monitorChannel/monitor-gate?id=' + node.deviceID)
+      router.push('/monitorChannel/monitor-gate?id=' + node.deviceID + '&deviceType=' + node.deviceType)
       break;
     case 'fanlocal'://局部风机
       router.push('/monitorChannel/monitor-fanlocal?id=' + node.deviceID + '&deviceType=fanlocal')
@@ -186,7 +192,8 @@ function onDetail(node) {
 async function getVideoAddrs() {
   clearCamera();
   playerList.value = []
-  let res = await list({ ...searchParam, pageSize: pageSize.value, pageNo: current.value })
+  let paramKind = searchParam.devKind.substring(0, searchParam.devKind.indexOf('&'))
+  let res = await list({ devKind: paramKind, strType: searchParam.strType, pageSize: pageSize.value, pageNo: current.value })
   total.value = res['total'] || 0
   if (res.records.length != 0) {
     const cameraList = <{ name: string, addr: string }[]>[]

+ 6 - 6
src/views/vent/performance/fileDetail/fileDetail.api.ts

@@ -13,7 +13,7 @@ enum Api {
   commit = '/safety/actBusiness/commit',
   getNowUserAgencyData = '/safety/approvalBusiness/getNowUserAgencyData',
   getNowUserApprovedData = '/safety/approvalBusiness/getNowUserApprovedData',
-  // sumVentReport='/ventanaly-company/company/reportData/sumVentReport',
+  sumVentReport='/ventanaly-company/company/reportData/sumVentReport',
   zipdownload='/ventanaly-sharefile/fileServer/zipdownload',
   queryVentMonReportJd='/ventanaly-company/company/reportData/queryVentMonReportJd'
 }
@@ -23,11 +23,11 @@ enum Api {
  * @param params
  */
 export const zipdownload = (params) => defHttp.post({ url: Api.zipdownload, params, responseType: 'blob' },{ joinParamsToUrl: true });
-// /**
-//  * 汇总集团通风报表
-//  * @param params
-//  */
-// export const sumVentReport = () => defHttp.post({ url: Api.sumVentReport, });
+/**
+ * 汇总集团通风报表
+ * @param params
+ */
+export const sumVentReport = () => defHttp.post({ url: Api.sumVentReport, });
 /**
  * 汇总集团通风报表
  * @param params

+ 11 - 4
src/views/vent/performance/fileDetail/index.vue

@@ -97,7 +97,7 @@
       </a-form>
     </a-modal>
     <!-- 汇总报表弹窗 -->
-    <a-modal v-model:visible="visiblehHz" centered :width="600" title="报表汇总" :footer="null">
+    <a-modal v-model:visible="visiblehHz" centered :width="600" title="报表汇总" :footer="null" @cancel="handleCancelHz">
       <div
         style="height:240px;overflow-y: auto;display: flex;flex-direction: column;align-items: center; padding: 10px;box-sizing: border-box">
         <vue3-seamless-scroll hover-stop="true" :list="reportHzList" :hover="true" :step="0.06" class="seamless-warp1">
@@ -125,7 +125,7 @@ import { useMessage } from '/@/hooks/web/useMessage';
 import { SvgIcon } from '/@/components/Icon';
 import { ref, onMounted, reactive, nextTick, watch,onUnmounted } from 'vue';
 import { columns } from './fileDetail.data';
-import { getTree, createFile, editMenu, delMenu, uploadApi, downLoad, deleteById, listData, getNowUserAgencyData, queryVentMonReportJd, zipdownload } from './fileDetail.api';
+import { getTree, createFile, editMenu, delMenu, uploadApi, downLoad, deleteById, listData, getNowUserAgencyData,sumVentReport, queryVentMonReportJd, zipdownload } from './fileDetail.api';
 
 let visiblehHz = ref(false)
 let reportHzList = ref<any[]>([])
@@ -212,8 +212,9 @@ function downFilePublic(content, fileName) {
   }
 }
 //汇总报表
-function reportSum() {
+ function reportSum() {
   visiblehHz.value = true
+  sumVentReport()
   timer = setInterval(async () => {
     let res = await queryVentMonReportJd()
     reportHzList.value = res.jdList
@@ -226,7 +227,13 @@ function reportSum() {
       visiblehHz.value = true
     }
   }, 3000)
-
+}
+//关闭汇总弹窗
+function handleCancelHz(){
+  reportHzList.value.length=0
+  visiblehHz.value = false
+  clearTimeout(timer);
+  alive.value = new Date().getTime();
 }
 //上传文件
 let openModal = (val) => {