ソースを参照

1. 新增瓦斯泵监测页面
2. 传感器监测历史接口调整
3. CAD接口地址调整

hongrunxia 11 ヶ月 前
コミット
45aeccfe5f

+ 25 - 9
src/layouts/default/header/index.vue

@@ -1,11 +1,23 @@
 <template>
-  <Header v-if="((!getShowFullHeader && !currentRoute.path.endsWith('home')) || (currentRoute.path.startsWith('/micro-vent-3dModal/modelchannel/'))) && !noHeadeLink.includes(currentRoute.path)" 
-    :class="[...getHeaderClass, { 'vent-header': currentRoute.path.startsWith('/monitorChannel/monitor-'), 'normal-header': !currentRoute.path.startsWith('/monitorChannel/monitor-'), 'no-header': currentRoute.path.endsWith('home') }]">
+  <Header
+    v-if="
+      ((!getShowFullHeader && !currentRoute.path.endsWith('home')) || currentRoute.path.startsWith('/micro-vent-3dModal/modelchannel/')) &&
+      !noHeadeLink.includes(currentRoute.path)
+    "
+    :class="[
+      ...getHeaderClass,
+      {
+        'vent-header': currentRoute.path.startsWith('/monitorChannel/monitor-'),
+        'normal-header': !currentRoute.path.startsWith('/monitorChannel/monitor-'),
+        'no-header': currentRoute.path.endsWith('home'),
+      },
+    ]"
+  >
     <!-- left start -->
     <div :class="`${prefixCls}-left`">
       <!-- logo -->
       <!-- <AppLogo v-if="getShowHeaderLogo || getIsMobile" :class="`${prefixCls}-logo`" :theme="getHeaderTheme" :style="getLogoWidth" /> -->
-      <AppLogo  :class="`${prefixCls}-logo`" :theme="getHeaderTheme" :style="getLogoWidth" />
+      <AppLogo :class="`${prefixCls}-logo`" :theme="getHeaderTheme" :style="getLogoWidth" />
       <div v-if="!currentRoute.path.startsWith('/monitorChannel/monitor-')" style="margin-top: 5px; color: #aaa; margin-left: 10px; font-weight: 600"
         >/{{ currentRoute.meta.title }}</div
       >
@@ -38,7 +50,11 @@
       </div>
     </div>
   </Header>
-  <div v-else-if="currentRoute.path.endsWith('home') || currentRoute.path.startsWith('/micro')" :class="`${prefixCls}-action`"  style="position: fixed; top: 30px; right: 20px; z-index: 999;">
+  <div
+    v-else-if="currentRoute.path.endsWith('home') || currentRoute.path.startsWith('/micro')"
+    :class="`${prefixCls}-action`"
+    style="position: fixed; top: 30px; right: 20px; z-index: 999"
+  >
     <div class="right-position">
       <UserDropDown :theme="getHeaderTheme" />
     </div>
@@ -76,7 +92,7 @@
   import { useUserStore } from '/@/store/modules/user';
   import { useRouter } from 'vue-router';
 
-  import { noHeadeLink } from '../layout.data'
+  import { noHeadeLink } from '../layout.data';
 
   export default defineComponent({
     name: 'LayoutHeader',
@@ -226,7 +242,7 @@
         currentRoute,
         title,
         getShowFullHeader,
-        noHeadeLink
+        noHeadeLink,
       };
     },
   });
@@ -271,7 +287,7 @@
   //   border-bottom: 1px solid #81aabf01;
   //   padding-bottom: 2px;
   //   box-shadow: 0 0 20px #44caff55 inset;
-  .normal-header{
+  .normal-header {
     height: 52px !important;
     line-height: 52px !important;
     background: var(--vent-header-bg-color) !important;
@@ -281,11 +297,11 @@
     box-shadow: 0 0 20px #44caff55 inset !important;
     padding: 0 8px !important;
   }
-  .no-header{
+  .no-header {
     height: 0px !important;
     display: none !important;
   }
-  .header-nav-title{
+  .header-nav-title {
     background-image: linear-gradient(#ffffff 50%, #60f4ff);
     -webkit-background-clip: text;
     color: transparent;

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

@@ -261,7 +261,6 @@ function getVideo() {
 
 function setNoRtspVideo(id, videoAddr) {
   const fileExtension = videoAddr.split('.').pop();
-  // const plugins = fileExtension === 'flv' ? [ FlvPlugin ] : [ HlsPlugin ];
   if (fileExtension === 'flv') {
     const player = new Player({
       lang: 'zh',
@@ -387,6 +386,7 @@ function clearCamera() {
     const player = playerList.value[i]
     if (player.destroy) player.destroy()
   }
+  playerList.value = []
 }
 
 onMounted(async () => {

+ 77 - 65
src/views/vent/monitorManager/comment/components/reportInfo.vue

@@ -1,87 +1,99 @@
 <template>
-    <BasicModal @register="registerModal" :defaultFullscreen="true" title="报表导出" width="1000px" v-bind="$attrs"
-        :footer="null" :showCancelBtn="false" :showOkBtn="false" destroyOnClose :mask-closable="false">
-        <div id="fileEdit"></div>
-    </BasicModal>
+  <BasicModal
+    @register="registerModal"
+    :defaultFullscreen="true"
+    title="报表导出"
+    width="1000px"
+    v-bind="$attrs"
+    :footer="null"
+    :showCancelBtn="false"
+    :showOkBtn="false"
+    destroyOnClose
+    :mask-closable="false"
+  >
+    <div id="fileEdit"></div>
+  </BasicModal>
 </template>
 
 <script lang="ts" setup>
-import { computed, unref, inject, reactive, ref, watch, defineProps } from 'vue';
-import { BasicModal, useModalInner } from '/@/components/Modal';
-import { useUserStore } from '/@/store/modules/user';
+  import { computed, unref, inject, reactive, ref, watch, defineProps } from 'vue';
+  import { BasicModal, useModalInner } from '/@/components/Modal';
+  import { useUserStore } from '/@/store/modules/user';
 
-let props = defineProps({
+  let props = defineProps({
     editID: {
-        type: String,
-        default: () => {
-            return ''
-        }
+      type: String,
+      default: () => {
+        return '';
+      },
     },
     fileType: {
-        type: String,
-        default: () => {
-            return ''
-        }
-    }
-})
+      type: String,
+      default: () => {
+        return '';
+      },
+    },
+  });
 
-const remoteUrl = import.meta.env.DEV ? 'http://182.92.126.35' : 'http://' + window.location.hostname;
-const userStore = useUserStore(); //获取用户信息
-let userId = unref(userStore.getUserInfo).id;
-let userName = unref(userStore.getUserInfo).username;
-// const emit = defineEmits(['register']);
+  const remoteUrl = import.meta.env.DEV ? 'http://182.92.126.35' : 'http://' + window.location.hostname;
+  const userStore = useUserStore(); //获取用户信息
+  let userId = unref(userStore.getUserInfo).id;
+  let userName = unref(userStore.getUserInfo).username;
+  // const emit = defineEmits(['register']);
 
-let [registerModal, { setModalProps, closeModal }] = useModalInner(async (data) => {
+  let [registerModal, { setModalProps, closeModal }] = useModalInner(async (data) => {
     //重置表单
     setModalProps({ confirmLoading: false });
     // Object.assign(deviceData, data.record);
-});
+  });
 
-watch(() => props.editID, (newV, oldV) => {
-    console.log(newV,'newV----------')
-    new DocsAPI.DocEditor(
+  watch(
+    () => props.editID,
+    (newV, oldV) => {
+      console.log(newV, 'newV----------');
+      new DocsAPI.DocEditor(
         'fileEdit', // 元素id
         {
-            type: 'desktop',
-            width: '100%',
-            height: '860px',
-            document: {
-                title: '文档管理',
-                url: remoteUrl + ':9999/ventanaly-device/safety/reportInfo/onlyOffice/read?id=' + props.editID + '&type=' + '', //id表示文件id,后端接口用这个id来加载文件
-                fileType: props.fileType == 'doc' ? 'docx' : props.fileType == 'xls' ? 'xlsx' : props.fileType == 'ppt' ? 'pptx' : props.fileType, //当文件类型为doc、xls、ppt时,对应用docx、xlsx、pptx否则会保存异常。
-                key: '',
-                lang: 'zh-CN',
-                permissions: {
-                    download: true, //是否可下载
-                    edit: true,
-                    fillForms: true,
-                    print: true, //是否可打印
-                },
+          type: 'desktop',
+          width: '100%',
+          height: '860px',
+          document: {
+            title: '文档管理',
+            url: remoteUrl + ':9999/ventanaly-device/safety/reportInfo/onlyOffice/read?id=' + props.editID + '&type=' + '', //id表示文件id,后端接口用这个id来加载文件
+            fileType: props.fileType == 'doc' ? 'docx' : props.fileType == 'xls' ? 'xlsx' : props.fileType == 'ppt' ? 'pptx' : props.fileType, //当文件类型为doc、xls、ppt时,对应用docx、xlsx、pptx否则会保存异常。
+            key: '',
+            lang: 'zh-CN',
+            permissions: {
+              download: true, //是否可下载
+              edit: true,
+              fillForms: true,
+              print: true, //是否可打印
             },
-            editorConfig: {
-                lang: 'zh-CN',
-                mode: 'view', //view:只读且可复制内容,edit:可编辑
-                callbackUrl: remoteUrl + ':9999/ventanaly-device/safety/reportInfo/onlyOffice/save?id=' + props.editID + '&type=' + '', //id表示文件id,后端接口用这个id来加载文件
-                coEditing: {
-                    mode: 'fast',
-                    change: true,
-                },
-                customization: {
-                    toolbarNoTabs: true,
-                    autosave: false, //是否自动保存
-                    forcesave: true, //定义保存按钮是否显示
-                    hideRightMenu: true,
-                },
-                //用户信息
-                user: {
-                    id: userId, //用户ID
-                    name: userName, //用户名称
-                },
+          },
+          editorConfig: {
+            lang: 'zh-CN',
+            mode: 'view', //view:只读且可复制内容,edit:可编辑
+            callbackUrl: remoteUrl + ':9999/ventanaly-device/safety/reportInfo/onlyOffice/save?id=' + props.editID + '&type=' + '', //id表示文件id,后端接口用这个id来加载文件
+            coEditing: {
+              mode: 'fast',
+              change: true,
             },
+            customization: {
+              toolbarNoTabs: true,
+              autosave: false, //是否自动保存
+              forcesave: true, //定义保存按钮是否显示
+              hideRightMenu: true,
+            },
+            //用户信息
+            user: {
+              id: userId, //用户ID
+              name: userName, //用户名称
+            },
+          },
         }
-    );
-})
-
+      );
+    }
+  );
 </script>
 
 <style lang="less" scoped></style>

+ 2 - 2
src/views/vent/monitorManager/deviceMonitor/components/device/index.vue

@@ -564,9 +564,9 @@ async function getDataSource() {
         if(deviceType.value.startsWith('safetymonitor')){
           resultData = await list({ devicetype: deviceType.value, pagetype: 'normal', filterParams: { ...searchForm } })
         }else if(deviceType.value.startsWith('location')) {
-          resultData = await list({ devicetype: deviceType.value, pagetype: 'normal', filterParams: {strinstallpos: '*'+searchForm['stationname']+'*', userName: '*'+searchForm['strname']+'*' }, ...searchForm,})
+          resultData = await list({ devicetype: deviceType.value, pagetype: 'normal', filterParams: {strinstallpos: searchForm['stationname'], userName: searchForm['strname'] }, ...searchForm,})
         }else if(deviceType.value.startsWith('vehicle')) {
-          resultData = await list({ devicetype: deviceType.value, pagetype: 'normal', filterParams: {strinstallpos: '*'+searchForm['stationname']+'*', vehicleName: '*'+searchForm['strname']+'*' ,...searchForm,}})
+          resultData = await list({ devicetype: deviceType.value, pagetype: 'normal', filterParams: {strinstallpos: searchForm['stationname'], vehicleName: searchForm['strname'] ,...searchForm,}})
         }else{
           resultData = await list({ devicetype: deviceType.value, pagetype: 'normal'})
         }

+ 1 - 4
src/views/vent/monitorManager/groutMonitor/grout.data.ts

@@ -4,7 +4,6 @@ import { useGlobSetting } from '/@/hooks/setting';
 
 //lxh
 export const deviceMonitorListLt = [
-
   {
     title: '排污泵',
     dataList: [
@@ -290,8 +289,6 @@ export const preFanMonitorData = [
     code: 'A50',
     unit: 'signal',
   },
-
-
 ];
 //lxh
 export const groutFanMonitorData = [
@@ -654,7 +651,7 @@ export function getMonitorComponent() {
     case 'sdmtjtdltmkhjtj': // 活鸡兔井
       groutHome = defineAsyncComponent(() => import('./components/groutHomeHjt.vue'));
       return groutHome;
-    case 'sdmtjtltmk'://柳塔
+    case 'sdmtjtltmk': //柳塔
       groutHome = defineAsyncComponent(() => import('./components/groutHomelt.vue'));
       break;
     default:

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

@@ -70,6 +70,8 @@ export async function getMonitorData() {
       return await import('./nitrogen.dataLT');
     case 'sdmtjtcctmk': // 寸草1
       return await import('./nitrogen.dataCc');
+    case 'sdmtjtcctrk': // 寸草2
+      return await import('./nitrogen.dataCc');
     default: //默认
       return await import('./nitrogen.dataBet');
   }

+ 192 - 0
src/views/vent/monitorManager/nitrogen/nitrogen.dataCc_2.ts

@@ -0,0 +1,192 @@
+export const monitorDataGroupArr = [[1, 2, 3]];
+export const prefix = ['PRE', 'PRE', 'PRE'];
+export type State = {
+  isRun: boolean;
+  fault: boolean;
+};
+export const preMonitorList = [
+  {
+    title: '加载压力',
+    code: 'PRE_CPR_LoadPre',
+    unit: 'MPa',
+  },
+  {
+    title: '卸载压力',
+    code: 'PRE_CPR_UnLoadPre',
+    unit: 'MPa',
+    child: [],
+  },
+  {
+    title: `机头温度`,
+    code: `PRE_CPR_HeadTemp`,
+    unit: '℃',
+    child: [],
+  },
+  {
+    title: `冷却温度`,
+    code: `PRE_CPR_CoolantTemp`,
+    unit: '℃',
+    child: [],
+  },
+  {
+    title: `排气温度`,
+    code: `PRE_CPR_ExhaustTemp`,
+    unit: '℃',
+    child: [],
+  },
+  {
+    title: '加载时间',
+    code: 'PRE_CPR_LoadTime',
+    unit: 'h',
+    child: [],
+  },
+  {
+    title: '排气压力',
+    code: 'PRE_CPR_ExhaustPre',
+    unit: 'MPa',
+    child: [],
+  },
+
+  {
+    code: 'signal',
+    child: [
+      {
+        title: `加载卸载`,
+        code: `PRE_CPR_LoadorUnload`,
+        isWaring: false,
+      },
+    ],
+  },
+];
+export const cqgMonitorList = [];
+
+export const preFanMonitorData = [
+  {
+    title: `上位启动`,
+    code: `PRE_HMIStart`,
+    unit: 'signal',
+  },
+  {
+    title: `上位停止`,
+    code: `PRE2_HMIStop`,
+    unit: 'signal',
+  },
+  {
+    title: `报警信号`,
+    code: `PRE_AlamSignal`,
+    unit: 'warning',
+  },
+  {
+    title: `故障信号`,
+    code: `PRE_FaultSignal`,
+    unit: 'warning',
+  },
+  {
+    title: `主机本机`,
+    code: `PRE_HostorLoc`,
+    unit: 'signal',
+  },
+  {
+    title: '总运行时间',
+    code: 'PRE_MOT_TotalRunTime',
+    unit: 'h',
+  },
+  {
+    title: 'A相绕组温度',
+    code: 'PRE_MOT_PhaseATemp',
+    unit: '℃',
+  },
+  {
+    title: 'B相绕组温度',
+    code: 'PRE_MOT_PhaseBTemp',
+    unit: '℃',
+  },
+  {
+    title: 'C相绕组温度',
+    code: 'PRE_MOT_PhaseCTemp',
+    unit: '℃',
+  },
+  {
+    title: `A相绕组超温`,
+    code: `PRE_MOT_PhaseATempAlarm`,
+    unit: 'warning',
+  },
+  {
+    title: `B相绕组超温`,
+    code: `PRE_MOT_PhaseBTempAlarm`,
+    unit: 'warning',
+  },
+  {
+    title: `C相绕组超温`,
+    code: `PRE1_MOT_PhaseCTempAlarm`,
+    unit: 'warning',
+  },
+  {
+    title: '电机启动失败',
+    code: 'PRE_MOT_StartFail',
+    unit: 'warning',
+  },
+  {
+    title: '电机停止失败',
+    code: 'PRE_MOT_StopFail',
+    unit: 'warning',
+  },
+  {
+    title: '电机运行返回',
+    code: 'PRE_MOT_RunReturn',
+    unit: 'warning',
+  },
+];
+export const totalData = [
+  {
+    title: '总进风管流量',
+    code: 'TotalInPipeFlow',
+    unit: 'm³/h',
+  },
+  {
+    title: '总出风管压力',
+    code: 'TotalOutPipePre',
+    unit: 'bar',
+  },
+];
+export const btnSet = [
+  {
+    title: '上位启动',
+    code: 'PRE_HMIStart',
+    type: 'btn',
+  },
+  {
+    title: '上位复位',
+    code: 'PRE_HMIReset',
+    type: 'btn',
+  },
+  {
+    title: '上位停止',
+    code: 'PRE_HMIStop',
+    type: 'btn',
+  },
+];
+
+export function getSysState(monitorData) {
+  const stateArr = <State[]>[];
+  monitorDataGroupArr.forEach((group) => {
+    const stateObj = { isRun: false, fault: false };
+    group.forEach((item) => {
+      if (monitorData['PRE_CPR_LoadorUnload'.replace('PRE', 'PRE' + item)]) {
+        stateObj.isRun = monitorData['PRE_CPR_LoadorUnload'.replace('PRE', 'PRE' + item)] == '1';
+      }
+
+      if (
+        monitorData['PRE_FaultSignal'.replace('PRE', 'PRE' + item)] ||
+        monitorData['PRE_FaultSignal1'.replace('PRE', 'PRE' + item)] ||
+        monitorData['PRE_MOT_PhaseAOverTemp'.replace('PRE', 'PRE' + item)] ||
+        monitorData['PRE_MOT_PhaseBOverTemp'.replace('PRE', 'PRE' + item)] ||
+        monitorData['PRE_MOT_PhaseCOverTemp'.replace('PRE', 'PRE' + item)]
+      ) {
+        stateObj.fault = true;
+      }
+    });
+    stateArr.push(stateObj);
+  });
+  return stateArr;
+}

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

@@ -55,7 +55,7 @@
             <HistoryTable
               :columns-type="deviceKind"
               :device-type="deviceKind"
-              :device-list-api="baseList"
+              :device-list-api="baseList.bind(null, { strtype: selectData.deviceType })"
               @change="historyDataSourceChange"
               designScope="modelsensor-history"
             />

+ 2 - 1
src/views/vent/performance/comment/CADModal.vue

@@ -43,7 +43,8 @@
       fileid.value = record.id;
       filename.value = record.fileName;
     } else {
-      const origin = import.meta.env.PROD ? 'http://182.92.126.35:8092' : window.location.origin;
+      // const origin = import.meta.env.PROD ? 'http://182.92.126.35:8092' : window.location.origin;
+      const origin = import.meta.env.DEV ? 'http://182.92.126.35:8092' : window.location.origin;
       iframesrc.value = `${origin}/fileManager/cad-viewer?${AUTO_LOGIN_URL_QUERY.key}=${AUTO_LOGIN_URL_QUERY.val}&id=${record.id}&filename=${record.fileName}`;
     }
   });