Procházet zdrojové kódy

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

hongrunxia před 1 týdnem
rodič
revize
4d96bb48ca

+ 4 - 4
.env.development

@@ -6,8 +6,8 @@ VITE_PUBLIC_PATH = /
 
 # 跨域代理,您可以配置多个 ,请注意,没有换行符
 #VITE_PROXY = [["/jeecgboot","http://localhost:8080/jeecg-boot"],["/upload","http://localhost:3300/upload"]]
-VITE_PROXY = [["/jeecgsystem","http://182.92.126.35:9999"],["/upload","http://182.92.126.35:9999/upload"],["/documents", "http://182.92.126.35:9050"],["/modelreq", "http://182.92.126.35:9999"],["/webRtc", "http://182.92.126.35:8051"], ["/python", "http://127.0.0.1:8008"], ["/tun2D", "http://127.0.0.1:8088/tun2D"]]
-# VITE_PROXY = [["/jeecgsystem","http://192.168.183.88:9999"],["/upload","http://192.168.183.88:9999/upload"],["/documents", "http://192.168.183.88:9050"],["/modelreq", "http://192.168.183.88:9999"],["/webRtc", "http://192.168.183.88:8051"]]
+# VITE_PROXY = [["/jeecgsystem","http://182.92.126.35:9999"],["/upload","http://182.92.126.35:9999/upload"],["/documents", "http://182.92.126.35:9050"],["/modelreq", "http://182.92.126.35:9999"],["/webRtc", "http://182.92.126.35:8051"], ["/python", "http://127.0.0.1:8008"], ["/tun2D", "http://127.0.0.1:8088/micro-vent-2dModal/tun2D"]]
+VITE_PROXY = [["/jeecgsystem","http://192.168.183.88:9999"],["/upload","http://192.168.183.88:9999/upload"],["/documents", "http://192.168.183.88:9050"],["/modelreq", "http://192.168.183.88:9999"],["/webRtc", "http://192.168.183.88:8051"]]
 # VITE_PROXY = [["/jeecgsystem","http://10.10.150.72:9999"],["/upload","http://localhost:3300/upload"],["/documents", "http://10.10.150.72:9050"],["/modelreq", "http://10.10.150.72:9999"],["/webRtc", "http://192.168.183.216:8051"]]
 #VITE_PROXY = [["/jeecgsystem","http://192.168.1.8:9999"],["/upload","http://localhost:3300/upload"]]
 
@@ -29,7 +29,7 @@ VITE_GLOB_API_URL_PREFIX=
 
 #微前端qiankun应用,命名必须以VITE_APP_SUB_开头,jeecg-app-1为子应用的项目名称,也是子应用的路由父路径
 #VITE_APP_SUB_APP = [["micro-need-air", "//10.10.150.72:8099/"], ["micro-vent-3dModal", "//localhost:8091/"], ["micro-fire-front", "//localhost:8090/"]]
-# VITE_APP_SUB_APP = [["micro-vent-3dModal", "//192.168.183.88:8091/", "micro-vent-3dModal"], ["micro-need-air", "//192.168.183.88:8093/", "micro-need-air"], ["micro-fire-front", "//localhost:8097/", "fire-Micro"]]
+VITE_APP_SUB_APP = [["micro-vent-3dModal", "//192.168.183.88:8091/", "micro-vent-3dModal"], ["micro-need-air", "//192.168.183.88:8093/", "micro-need-air"], ["micro-fire-front", "//localhost:8097/", "fire-Micro"]]
 # VITE_APP_SUB_APP = [["micro-vent-3dModal", "//192.168.183.154:8091/", "micro-vent-3dModal"], ["micro-need-air", "//192.168.183.88:8093/", "micro-need-air"], ["micro-fire-front", "//localhost:8097/", "fire-Micro"]]
-VITE_APP_SUB_APP = [["micro-vent-3dModal", "//182.92.126.35:8091/", "micro-vent-3dModal"],["micro-vent-2dModal", "//localhost:8088/", "micro-vent-2dModal"], ["micro-need-air", "//182.92.126.35:8099/", "micro-need-air"], ["micro-fire-front", "//182.92.126.35:8097/", "fire-Micro"]]
+# VITE_APP_SUB_APP = [["micro-vent-3dModal", "//182.92.126.35:8091/", "micro-vent-3dModal"],["micro-vent-2dModal", "//localhost:8088/", "micro-vent-2dModal"], ["micro-need-air", "//182.92.126.35:8099/", "micro-need-air"], ["micro-fire-front", "//182.92.126.35:8097/", "fire-Micro"]]
 # VITE_APP_SUB_APP = [["micro-vent-3dModal", "//localhost:8091/"], ["micro-need-air", "//localhost:8099/"], ["micro-fire-front", "//localhost:8090/"]]

binární
src/assets/images/choice-N.png


binární
src/assets/images/choice-Y.png


+ 324 - 325
src/views/vent/monitorManager/alarmMonitor/warn/fireWarn.vue

@@ -1,23 +1,18 @@
 <template>
   <customHeader :options="options" @change="getSelectRow" :optionValue="optionValue"> 火灾监测预警 </customHeader>
   <div class="fireWarn">
-    <a-button
-      v-if="!hasPermission('fireWarn:return')"
-      preIcon="ant-design:rollback-outlined"
-      type="text"
-      size="small"
-      style="position: absolute; left: 15px; top: 15px; color: var(--vent-font-color)"
-      @click="getBack"
-      >返回</a-button
-    >
+    <a-button v-if="!hasPermission('fireWarn:return')" preIcon="ant-design:rollback-outlined" type="text" size="small"
+      style="position: absolute; left: 15px; top: 15px; color: var(--vent-font-color)" @click="getBack">返回</a-button>
     <div class="alarm-menu">
       <div class="type-btn">
-        <div :class="activeIndex == index ? 'btn1' : 'btn'" v-for="(item, index) in typeMenuList" :key="index" @click="fireMenuToggle(index)">
+        <div :class="activeIndex == index ? 'btn1' : 'btn'" v-for="(item, index) in typeMenuList" :key="index"
+          @click="fireMenuToggle(index)">
           {{ item.name }}
         </div>
       </div>
       <div class="card-btn">
-        <div :class="activeIndex1 == ind ? 'btn1' : 'btn'" v-for="(item, ind) in menuList" :key="ind" @click="cardClick(ind, item)">
+        <div :class="activeIndex1 == ind ? 'btn1' : 'btn'" v-for="(item, ind) in menuList" :key="ind"
+          @click="cardClick(ind, item)">
           <div class="text">{{ item.name }}</div>
           <div class="warn">{{ item.warn }}</div>
         </div>
@@ -32,113 +27,115 @@
 </template>
 
 <script setup lang="ts">
-  import { ref, reactive, onMounted, onUnmounted, defineAsyncComponent } from 'vue';
-  import { typeMenuList, componentName } from '../common.data';
-  import { sysTypeWarnList, sysWarn } from '../common.api';
-  import { useSystemSelect } from '/@/hooks/vent/useSystemSelect';
-  import { useGlobSetting } from '/@/hooks/setting';
-  import { useRouter } from 'vue-router';
-  import CustomHeader from '/@/components/vent/customHeader.vue';
-  import { usePermission } from '/@/hooks/web/usePermission';
+import { ref, reactive, onMounted, onUnmounted, defineAsyncComponent } from 'vue';
+import { typeMenuList, componentName } from '../common.data';
+import { sysTypeWarnList, sysWarn } from '../common.api';
+import { useSystemSelect } from '/@/hooks/vent/useSystemSelect';
+import { useGlobSetting } from '/@/hooks/setting';
+import { useRouter } from 'vue-router';
+import CustomHeader from '/@/components/vent/customHeader.vue';
+import { usePermission } from '/@/hooks/web/usePermission';
 
-  let loading = ref(false); //加载状态
-  const { hasPermission } = usePermission();
-  const { options, optionValue, getSelectRow, getSysDataSource } = useSystemSelect('sys_surface_caimei'); // 参数为场景类型(设备类型管理中可以查询到)
-  //当前加载组件
-  let currentLoad = ref('');
-  //内外因火灾激活索引
-  let activeIndex = ref(0);
-  //当前激活菜单的索引
-  let activeIndex1 = ref(0);
-  let menuList = reactive<any[]>([]); //左侧菜单列表
-  let menuList1 = reactive({
-    external: [],
-    internal: [],
-    info: [],
-  });
-  //详情数据
-  let listData = reactive({
-    common: {},
-    bundletube: [],
-    fiber: [],
-    fire: [],
-    co: [],
-    smoke: [],
-    spray: [],
-    temperature: [],
-  }); //详情数据
-  let strType = ref(''); //火灾外因-区别工作面和煤层
-  let router = useRouter();
-  let tableLists = ref<any[]>([]);
+let loading = ref(false); //加载状态
+const { hasPermission } = usePermission();
+const { options, optionValue, getSelectRow, getSysDataSource } = useSystemSelect('sys_surface_caimei'); // 参数为场景类型(设备类型管理中可以查询到)
+//当前加载组件
+let currentLoad = ref('');
+//内外因火灾激活索引
+let activeIndex = ref(0);
+//当前激活菜单的索引
+let activeIndex1 = ref(0);
+let menuList = ref<any[]>([]); //左侧菜单列表
+let menuList1 = reactive({
+  external: [],
+  internal: [],
+  info: [],
+});
+//详情数据
+let listData = reactive({
+  common: {},
+  bundletube: [],
+  fiber: [],
+  fire: [],
+  co: [],
+  smoke: [],
+  spray: [],
+  temperature: [],
+}); //详情数据
+let strType = ref(''); //火灾外因-区别工作面和煤层
+let router = useRouter();
+let tableLists = ref<any[]>([]);
 
-  // https获取监测数据
-  let timer: null | NodeJS.Timeout = null;
-  function getMonitor(flag?) {
-    timer = setTimeout(
-      async () => {
-        await getMenuList();
-        if (timer) {
-          timer = null;
-        }
-        getMonitor(false);
-      },
-      flag ? 0 : 1000
-    );
-  }
+// https获取监测数据
+let timer: null | NodeJS.Timeout = null;
+function getMonitor(flag?) {
+  timer = setTimeout(
+    async () => {
+      await getMenuList();
+      if (timer) {
+        timer = null;
+      }
+      getMonitor(false);
+    },
+    flag ? 0 : 1000
+  );
+}
 
-  //返回首页
-  function getBack() {
-    router.push('/monitorChannel/monitor-alarm-home');
-  }
+//返回首页
+function getBack() {
+  router.push('/monitorChannel/monitor-alarm-home');
+}
 
-  //获取左侧菜单列表
-  async function getMenuList() {
-    let res = await sysTypeWarnList({ type: 'fire' });
-    if (res.length != 0) {
-      menuList.length = 0;
-      menuList1.external = res.external.filter((v) => v.strtype != 'sys_surface_caimei');
-      menuList1.internal = res.internal;
-      menuList1.info = res.info;
-      if (!activeIndex.value && menuList1.internal && menuList1.internal.length > 0) {
-        menuList1.internal.forEach((el: any) => {
-          menuList.push({
-            name: el.systemname,
-            warn: el.warnDes,
-            type: 'on',
-            deviceID: el.id,
-            strtype: el.strtype,
-            detail: el.detail,
-          });
-        });
-        getDetailList(menuList[activeIndex1.value].detail);
-      } else if (activeIndex.value == 1 && menuList1.external && menuList1.external.length > 0) {
-        menuList1.external.forEach((el: any) => {
-          menuList.push({
-            name: el.systemname,
-            warn: el.warnDes,
-            type: 'out',
-            deviceID: el.id,
-            strtype: el.strtype,
-            detail: el.detail,
-          });
-        });
-        strType.value = menuList[activeIndex1.value].strtype;
-        getDetailList(menuList[activeIndex1.value].detail);
-      } else {
-        menuList1.info.forEach((el) => {
-          menuList.push({
-            name: el.sysname,
-            // warn: '正常',
-            deviceID: el.sysid,
-            strtype: '',
-          });
-        });
-        tableLists.value = menuList1.info[activeIndex1.value].list;
-      }
+//获取左侧菜单列表
+async function getMenuList() {
+  let res = await sysTypeWarnList({ type: 'fire' });
+  if (res.length != 0) {
+    menuList1.external = res.external.filter((v) => v.strtype != 'sys_surface_caimei');
+    menuList1.internal = res.internal;
+    menuList1.info = res.info;
+    if (!activeIndex.value && menuList1.internal && menuList1.internal.length > 0) {
+      menuList.value = menuList1.internal.map((el: any) => {
+        return {
+          name: el.systemname,
+          warn: el.warnDes,
+          type: 'on',
+          deviceID: el.id,
+          strtype: el.strtype,
+          detail: el.detail,
+        }
+      });
+      getDetailList(menuList.value[activeIndex1.value].detail);
+    } else if (activeIndex.value == 1 && menuList1.external && menuList1.external.length > 0) {
+      menuList.value = menuList1.external.map((el: any) => {
+        return {
+          name: el.systemname,
+          warn: el.warnDes,
+          type: 'out',
+          deviceID: el.id,
+          strtype: el.strtype,
+          detail: el.detail,
+        }
+      });
+      strType.value = menuList.value[activeIndex1.value].strtype;
+      getDetailList(menuList.value[activeIndex1.value].detail);
+    } else {
+      menuList.value = menuList1.info.map((el: any) => {
+        return {
+          name: el.sysname,
+          // warn: '正常',
+          deviceID: el.sysid,
+          strtype: '',
+          detail: el.list,
+        }
+      });
+      getDetailList(menuList.value[activeIndex1.value].detail);
+     
     }
   }
-  //获取右侧详情弹窗数据
-  function getDetailList(param) {
+}
+//获取右侧详情弹窗数据
+function getDetailList(param) {
+  if (activeIndex.value != 2) {
     listData.bundletube = param.bundletube;
     listData.fiber = param.fiber;
     listData.fire = param.fire;
@@ -147,269 +144,271 @@
     listData.spray = param.spray;
     listData.temperature = param.temperature;
     loadZj();
+  } else {
+    tableLists.value = param;
+    loadZb();
   }
-  //内外因火灾、预警指标选项切换
-  function fireMenuToggle(ind) {
-    activeIndex.value = ind;
-    switch (ind) {
-      case 0:
-        loading.value = true;
-        setTimeout(() => {
-          clearTimeout(timer);
-          activeIndex1.value = 0;
-          currentLoad.value = '';
-          getClearList();
-          getMonitor(true);
-          loading.value = false;
-        }, 1000);
-        break;
-      case 1:
-        loading.value = true;
-        setTimeout(() => {
-          clearTimeout(timer);
-          activeIndex1.value = 0;
-          currentLoad.value = '';
-          getClearList();
-          getMonitor(true);
-          loading.value = false;
-        }, 1000);
-        break;
-      case 2:
-        loading.value = true;
-        setTimeout(() => {
-          clearTimeout(timer);
-          activeIndex1.value = 0;
-          currentLoad.value = '';
-          loadZb();
-          getMonitor(true);
-          loading.value = false;
-        }, 1000);
-
-        break;
-    }
-  }
-  //加载预警指标组件
-  function loadZb() {
-    const { sysOrgCode } = useGlobSetting();
-    switch (sysOrgCode) {
-      case 'sdmtjtbdmk': // 宝德
-        currentLoad.value = 'warnFireBd';
-        return currentLoad.value;
-      case 'sdmtjtbetmk': // 布尔台
-        currentLoad.value = 'warnFireBrt';
-        return currentLoad.value;
-      default:
-        currentLoad.value = 'warnFireBrt';
-        return currentLoad.value;
-    }
-  }
-  //菜单选项切换
-  function cardClick(ind, item) {
-    if (activeIndex.value != 2) {
+}
+//内外因火灾、预警指标选项切换
+function fireMenuToggle(ind) {
+  activeIndex.value = ind;
+  switch (ind) {
+    case 0:
       loading.value = true;
       setTimeout(() => {
         clearTimeout(timer);
-        activeIndex1.value = ind;
+        activeIndex1.value = 0;
+        currentLoad.value = '';
         getClearList();
-        strType.value = item.strtype;
+        getMonitor(true);
+        loading.value = false;
+      }, 1000);
+      break;
+    case 1:
+      loading.value = true;
+      setTimeout(() => {
+        clearTimeout(timer);
+        activeIndex1.value = 0;
         currentLoad.value = '';
+        getClearList();
         getMonitor(true);
         loading.value = false;
       }, 1000);
-    } else {
+      break;
+    case 2:
       loading.value = true;
       setTimeout(() => {
         clearTimeout(timer);
-        activeIndex1.value = ind;
+        activeIndex1.value = 0;
+        currentLoad.value = '';
         getMonitor(true);
         loading.value = false;
       }, 1000);
-    }
+      break;
   }
-  //加载组件
-  function loadZj() {
-    if (!activeIndex.value && listData.fiber.length != 0 && listData.bundletube.length != 0) {
-      currentLoad.value = 'fireWork';
-    } else if (!activeIndex.value && listData.bundletube.length != 0) {
-      currentLoad.value = 'closeWall';
-    } else if (activeIndex.value && activeIndex.value != 2) {
-      currentLoad.value = 'mainWell';
-    } else {
+}
+//加载预警指标组件
+function loadZb() {
+  const { sysOrgCode } = useGlobSetting();
+  switch (sysOrgCode) {
+    case 'sdmtjtbdmk': // 宝德
+      currentLoad.value = 'warnFireBd';
+      return currentLoad.value;
+    case 'sdmtjtbetmk': // 布尔台
+      currentLoad.value = 'warnFireBrt';
+      return currentLoad.value;
+    default:
+      currentLoad.value = 'warnFireBrt';
+      return currentLoad.value;
+  }
+}
+//菜单选项切换
+function cardClick(ind, item) {
+  if (activeIndex.value != 2) {
+    loading.value = true;
+    setTimeout(() => {
+      clearTimeout(timer);
+      activeIndex1.value = ind;
+      getClearList();
+      strType.value = item.strtype;
       currentLoad.value = '';
-    }
+      getMonitor(true);
+      loading.value = false;
+    }, 1000);
+  } else {
+    loading.value = true;
+    setTimeout(() => {
+      clearTimeout(timer);
+      activeIndex1.value = ind;
+      getMonitor(true);
+      loading.value = false;
+    }, 1000);
   }
-  //清空数据
-  function getClearList() {
-    listData.common = {};
-    listData.bundletube.length = 0;
-    listData.fiber.length = 0;
-    listData.fire.length = 0;
-    listData.co.length = 0;
-    listData.smoke.length = 0;
-    listData.spray.length = 0;
-    listData.temperature.length = 0;
+}
+//加载组件
+function loadZj() {
+  if (!activeIndex.value && listData.fiber.length != 0 && listData.bundletube.length != 0) {
+    currentLoad.value = 'fireWork';
+  } else if (!activeIndex.value && listData.bundletube.length != 0) {
+    currentLoad.value = 'closeWall';
+  } else if (activeIndex.value && activeIndex.value != 2) {
+    currentLoad.value = 'mainWell';
+  } else {
+    currentLoad.value = '';
   }
+}
+//清空数据
+function getClearList() {
+  listData.common = {};
+  listData.bundletube.length = 0;
+  listData.fiber.length = 0;
+  listData.fire.length = 0;
+  listData.co.length = 0;
+  listData.smoke.length = 0;
+  listData.spray.length = 0;
+  listData.temperature.length = 0;
+}
 
-  onMounted(() => {
-    getMenuList();
-    getMonitor(true);
-  });
-  onUnmounted(() => {
-    if (timer) {
-      clearTimeout(timer);
-      timer = undefined;
-    }
-  });
+onMounted(() => {
+  getMenuList();
+  getMonitor(true);
+});
+onUnmounted(() => {
+  if (timer) {
+    clearTimeout(timer);
+    timer = undefined;
+  }
+});
 </script>
 
 <style lang="less" scoped>
-  @import '/@/design/theme.less';
+@import '/@/design/theme.less';
 
-  @{theme-deepblue} {
-    .fireWarn {
-      --image-no-choice: url('/@/assets/images/themify/deepblue/fire/no-choice.png');
-      --image-choice: url('/@/assets/images/themify/deepblue/fire/choice.png');
-      --image-border: url('/@/assets/images/themify/deepblue/fire/border.png');
-    }
+@{theme-deepblue} {
+  .fireWarn {
+    --image-no-choice: url('/@/assets/images/themify/deepblue/fire/no-choice.png');
+    --image-choice: url('/@/assets/images/themify/deepblue/fire/choice.png');
+    --image-border: url('/@/assets/images/themify/deepblue/fire/border.png');
   }
+}
 
-  .fireWarn {
-    --image-no-choice: url('/@/assets/images/fire/no-choice.png');
-    --image-choice: url('/@/assets/images/fire/choice.png');
-    --image-border: url('/@/assets/images/fire/border.png');
-    width: 100%;
+.fireWarn {
+  --image-no-choice: url('/@/assets/images/fire/no-choice.png');
+  --image-choice: url('/@/assets/images/fire/choice.png');
+  --image-border: url('/@/assets/images/fire/border.png');
+  width: 100%;
+  height: 100%;
+  padding: 80px 10px 15px 10px;
+  box-sizing: border-box;
+  display: flex;
+  justify-content: space-between;
+
+  .alarm-menu {
     height: 100%;
-    padding: 80px 10px 15px 10px;
-    box-sizing: border-box;
-    display: flex;
-    justify-content: space-between;
+    width: 15%;
 
-    .alarm-menu {
-      height: 100%;
-      width: 15%;
+    .type-btn {
+      width: 100%;
+      height: 28px;
+      line-height: 28px;
+      background-color: var(--vent-warn-tab-bg);
+      border: 2px solid var(--vent-warn-tab-border);
+      margin-bottom: 20px;
+      border-radius: 5px;
+      box-sizing: border-box;
+      display: flex;
+      justify-content: space-between;
 
-      .type-btn {
-        width: 100%;
-        height: 28px;
-        line-height: 28px;
-        background-color: var(--vent-warn-tab-bg);
-        border: 2px solid var(--vent-warn-tab-border);
-        margin-bottom: 20px;
-        border-radius: 5px;
-        box-sizing: border-box;
-        display: flex;
-        justify-content: space-between;
+      .btn {
+        width: 33%;
+        height: 24px;
+        line-height: 24px;
+        font-size: 14px;
+        text-align: center;
+        color: var(--vent-font-color);
+        cursor: pointer;
+      }
 
-        .btn {
-          width: 33%;
-          height: 24px;
-          line-height: 24px;
-          font-size: 14px;
+      .btn1 {
+        width: 33%;
+        height: 24px;
+        line-height: 24px;
+        font-size: 14px;
+        color: var(--vent-font-color);
+        text-align: center;
+        border-radius: 2px;
+        background: var(--vent-warn-tab-bg-actived);
+        cursor: pointer;
+      }
+    }
+
+    .card-btn {
+      width: 100%;
+      height: calc(100% - 48px);
+      overflow-y: auto;
+
+      .btn {
+        position: relative;
+        width: 81%;
+        height: 14%;
+        margin-bottom: 10%;
+        font-family: 'douyuFont';
+        background: var(--image-no-choice) no-repeat;
+        background-size: 100% 100%;
+        cursor: pointer;
+
+        .text {
+          width: 80%;
+          position: absolute;
+          left: 50%;
+          top: 28px;
+          font-size: 16px;
+          color: var(--vent-table-action-link);
           text-align: center;
-          color: var(--vent-font-color);
-          cursor: pointer;
+          transform: translate(-50%, 0);
         }
 
-        .btn1 {
-          width: 33%;
-          height: 24px;
-          line-height: 24px;
+        .warn {
+          width: 100%;
+          position: absolute;
+          left: 50%;
+          bottom: 14px;
           font-size: 14px;
           color: var(--vent-font-color);
           text-align: center;
-          border-radius: 2px;
-          background: var(--vent-warn-tab-bg-actived);
-          cursor: pointer;
+          transform: translate(-50%, 0);
         }
       }
 
-      .card-btn {
+      .btn1 {
+        position: relative;
         width: 100%;
-        height: calc(100% - 48px);
-        overflow-y: auto;
-
-        .btn {
-          position: relative;
-          width: 81%;
-          height: 14%;
-          margin-bottom: 10%;
-          font-family: 'douyuFont';
-          background: var(--image-no-choice) no-repeat;
-          background-size: 100% 100%;
-          cursor: pointer;
-
-          .text {
-            width: 80%;
-            position: absolute;
-            left: 50%;
-            top: 28px;
-            font-size: 16px;
-            color: var(--vent-table-action-link);
-            text-align: center;
-            transform: translate(-50%, 0);
-          }
+        height: 14%;
+        margin-bottom: 10%;
+        font-family: 'douyuFont';
+        background: var(--image-choice) no-repeat;
+        background-size: 100% 100%;
+        cursor: pointer;
 
-          .warn {
-            width: 100%;
-            position: absolute;
-            left: 50%;
-            bottom: 14px;
-            font-size: 14px;
-            color: var(--vent-font-color);
-            text-align: center;
-            transform: translate(-50%, 0);
-          }
+        .text {
+          width: 80%;
+          position: absolute;
+          left: 50%;
+          top: 28px;
+          font-size: 16px;
+          color: var(--vent-table-action-link);
+          text-align: center;
+          transform: translate(-62%, 0);
         }
 
-        .btn1 {
-          position: relative;
+        .warn {
           width: 100%;
-          height: 14%;
-          margin-bottom: 10%;
-          font-family: 'douyuFont';
-          background: var(--image-choice) no-repeat;
-          background-size: 100% 100%;
-          cursor: pointer;
-
-          .text {
-            width: 80%;
-            position: absolute;
-            left: 50%;
-            top: 28px;
-            font-size: 16px;
-            color: var(--vent-table-action-link);
-            text-align: center;
-            transform: translate(-62%, 0);
-          }
-
-          .warn {
-            width: 100%;
-            position: absolute;
-            left: 50%;
-            bottom: 14px;
-            font-size: 14px;
-            color: var(--vent-font-color);
-            text-align: center;
-            transform: translate(-60%, 0);
-          }
+          position: absolute;
+          left: 50%;
+          bottom: 14px;
+          font-size: 14px;
+          color: var(--vent-font-color);
+          text-align: center;
+          transform: translate(-60%, 0);
         }
       }
     }
-
-    .fire-content {
-      width: calc(85% - 10px);
-      height: 100%;
-      margin-left: 10px;
-      background: var(--image-border) no-repeat;
-      background-size: 100% 100%;
-    }
   }
 
-  ::v-deep .zxm-spin-nested-loading {
+  .fire-content {
+    width: calc(85% - 10px);
     height: 100%;
+    margin-left: 10px;
+    background: var(--image-border) no-repeat;
+    background-size: 100% 100%;
   }
+}
 
-  ::v-deep .zxm-spin-container {
-    height: 100%;
-  }
+::v-deep .zxm-spin-nested-loading {
+  height: 100%;
+}
+
+::v-deep .zxm-spin-container {
+  height: 100%;
+}
 </style>

+ 66 - 59
src/views/vent/monitorManager/alarmMonitor/warn/ventilateWarn.vue

@@ -99,23 +99,35 @@ const echartDataFc1 = reactive<any>({
 let cardListTf = ref<any[]>([]);
 const chartListTf = ref<any[]>([]);
 let showToggle = ref('report');
-//通风选项切换
-function btnClick(ind) {
-  activeIndex.value = ind;
-  switch (ind) {
-    case 0:
-      if (timer1) clearTimeout(timer1);
-      activeIndex1.value = 0;
-      getMenuList();
-      break;
-    case 1:
-      if (timer) clearTimeout(timer);
-      activeIndex1.value = 0;
-      menuList.length = 0;
-      getRealTimeNetData();
-      getMonitor1();
-      break;
-  }
+
+// https获取监测数据
+let timer: null | NodeJS.Timeout = null;
+function getMonitor(flag?) {
+  timer = setTimeout(
+    async () => {
+      //获取左侧菜单数据
+      await getMenuList();
+      await getWindDeviceList();
+      getMonitor(false);
+    },
+    flag ? 0 : 1000
+  );
+}
+//获取巷道阻力分析数据
+let timer1: null | NodeJS.Timeout = null;
+function getMonitor1(flag?) {
+  timer1 = setTimeout(
+    async () => {
+      await getRealTimeNetData();
+      getMonitor1(false);
+    },
+    flag ? 0 : 30000
+  );
+}
+
+//返回首页
+function getBack() {
+  router.push('/monitorChannel/monitor-alarm-home');
 }
 //点击切换实时\报表数据
 let handlerToggle = () => {
@@ -150,34 +162,6 @@ function getData(){
     });
   }
 }
-// https获取监测数据
-let timer: null | NodeJS.Timeout = null;
-function getMonitor(flag?) {
-  timer = setTimeout(
-    async () => {
-      //获取左侧菜单数据
-      await getMenuList();
-      await getWindDeviceList();
-      getMonitor(false);
-    },
-    flag ? 0 : 1000
-  );
-}
-//获取巷道阻力分析数据
-let timer1: null | NodeJS.Timeout = null;
-function getMonitor1(flag?) {
-  timer1 = setTimeout(
-    async () => {
-      await getRealTimeNetData();
-      getMonitor1(false);
-    },
-    flag ? 0 : 30000
-  );
-}
-//返回首页
-function getBack() {
-  router.push('/monitorChannel/monitor-alarm-home');
-}
 //获取左侧数据列表
 async function getMenuList() {
   let res = await sysTypeWarnList({ type: 'vent' });
@@ -196,20 +180,7 @@ async function getMenuList() {
     getDetailList(menuList[activeIndex1.value].detail)
   }
 }
-//菜单选项切换
-function cardClick(ind, item) {
-  if (!activeIndex.value) {
-    clearTimeout(timer);
-    activeIndex1.value = ind;
-    loading.value = true;
-    setTimeout(() => {
-      getMonitor(true);
-      loading.value = false;
-    }, 1000);
-  } else {
-    return;
-  }
-}
+
 //获取右侧详情数据
 function getDetailList(param) {
   echartDataFc1.maxData.data.length = 0;
@@ -253,6 +224,42 @@ function getDetailList(param) {
     minY.value = getMinY(echartD)
   }
 }
+
+
+//通风选项切换
+function btnClick(ind) {
+  activeIndex.value = ind;
+  switch (ind) {
+    case 0:
+      if (timer1) clearTimeout(timer1);
+      activeIndex1.value = 0;
+      getMenuList();
+      break;
+    case 1:
+      if (timer) clearTimeout(timer);
+      activeIndex1.value = 0;
+      menuList.length = 0;
+      getRealTimeNetData();
+      getMonitor1();
+      break;
+  }
+}
+
+//菜单选项切换
+function cardClick(ind, item) {
+  if (!activeIndex.value) {
+    clearTimeout(timer);
+    activeIndex1.value = ind;
+    loading.value = true;
+    setTimeout(() => {
+      getMonitor(true);
+      loading.value = false;
+    }, 1000);
+  } else {
+    return;
+  }
+}
+
 //获取通风监控测点信息
 async function getWindDeviceList() {
   const cardTfList: any[] = [];

+ 2 - 2
src/views/vent/monitorManager/balancePressMonitor/balancePress.data.ts

@@ -170,7 +170,7 @@ export const settingParam3 = [
     title: 'CO浓度不高于',
     code: 'coEnd',
     value: '',
-    unit: '',
+    unit: '%',
   },
   {
     title: 'CO最高限值持续时间',
@@ -182,7 +182,7 @@ export const settingParam3 = [
     title: 'O2浓度不低于',
     code: 'o2End',
     value: '',
-    unit: '',
+    unit: '%',
   },
   {
     title: 'O2最低限值持续时间',

+ 19 - 88
src/views/vent/monitorManager/comment/comment.data.ts

@@ -10,106 +10,37 @@ export const analysisColumns: BasicColumn[] = [
   },
   {
     title: '地点',
-    dataIndex: 'strInstallPos',
-    key: 'strInstallPos',
+    dataIndex: 'sensorPosition',
+    key: 'sensorPosition',
     align: 'center',
   },
   {
-    title: '第一次',
-    children: [
-      {
-        title: 'CH4(%)',
-        dataIndex: 'ch4One',
-        key: 'ch4One',
-        align: 'center',
-      },
-      {
-        title: 'CO2(%)',
-        dataIndex: 'co2One',
-        key: 'co2One',
-        align: 'center',
-      },
-      {
-        title: 'CO(ppm)',
-        dataIndex: 'coOne',
-        key: 'coOne',
-        align: 'center',
-      },
-      {
-        title: 'O2(%)',
-        dataIndex: 'o2One',
-        key: 'o2One',
-        align: 'center',
-      },
-      {
-        title: '温度(°C)',
-        dataIndex: 'tOne',
-        key: 'tOne',
-        align: 'center',
-      },
-      {
-        title: '时间',
-        dataIndex: 'timeOne',
-        key: 'timeOne',
-        align: 'center',
-      },
-    ],
+    title: '设备类型',
+    dataIndex: 'exceptionType_str',
+    key: 'exceptionType_str',
+    align: 'center',
   },
+  
   {
-    title: '第二次',
-    children: [
-      {
-        title: 'CH4(%)',
-        dataIndex: 'ch4Two',
-        key: 'ch4Two',
-        align: 'center',
-      },
-      {
-        title: 'CO2(%)',
-        dataIndex: 'co2Two',
-        key: 'co2Two',
-        align: 'center',
-      },
-      {
-        title: 'CO(ppm)',
-        dataIndex: 'coTwo',
-        key: 'coTwo',
-        align: 'center',
-      },
-      {
-        title: 'O2(%)',
-        dataIndex: 'o2Two',
-        key: 'o2Two',
-        align: 'center',
-      },
-      {
-        title: '温度(°C)',
-        dataIndex: 'tTwo',
-        key: 'tTwo',
-        align: 'center',
-      },
-      {
-        title: '时间',
-        dataIndex: 'timeTwo',
-        key: 'timeTwo',
-        align: 'center',
-      },
-    ],
+    title: '报警类型',
+    dataIndex: 'sensorType',
+    key: 'sensorType',
+    align: 'center',
   },
   {
-    title: '瓦检员',
-    dataIndex: 'checkPerson',
-    key: 'checkPerson',
+    title: '开始时间',
+    dataIndex: 'exceptionStartTime',
+    key: 'exceptionStartTime',
     align: 'center',
   },
-
   {
-    title: '操作',
-    dataIndex: 'action',
-    width: 120,
+    title: '结束时间',
+    dataIndex: 'exceptionEndTime',
+    key: 'exceptionEndTime',
     align: 'center',
-    slots: { customRender: 'action' },
   },
+
+  
 ];
 
 export const gaspatrolColumnsTwo: BasicColumn[] = [

+ 176 - 21
src/views/vent/monitorManager/comment/warnAnalysis.vue

@@ -1,11 +1,40 @@
 <template>
     <div class="warnAnalysis">
-        <div class="warn-tag">
-            <a-tag color="pink" v-for="(item, index) in tagList" :key="index">{{ item.title }}</a-tag>
+        <div class="warn-search">
+            <a-row>
+                <a-col :span="4">
+                    <span class="search-label">查询设备:</span>
+                    <a-select v-model:value="dataTypeName" style="width: 220px" placeholder="请选择查询设备">
+                        <a-select-option v-for="item in deviceOptions" :key="item" :value="item.value">{{ item.label
+                            }}</a-select-option>
+                    </a-select>
+                </a-col>
+                <a-col :span="4">
+                    <span class="search-label">开始时间:</span>
+                    <a-date-picker show-time valueFormat="YYYY-MM-DD HH:mm:ss" placeholder="开始时间"
+                        v-model:value="startTime" style="width: 220px" />
+                </a-col>
+                <a-col :span="4">
+                    <span class="search-label">结束时间:</span>
+                    <a-date-picker show-time valueFormat="YYYY-MM-DD HH:mm:ss" placeholder="结束时间"
+                        v-model:value="endTime" style="width: 220px" />
+                </a-col>
+                <a-col :span="4">
+                    <a-button type="primary" preIcon="ant-design:search-outlined" style="margin-left:15px"
+                        @click="getSearch">查询</a-button>
+                </a-col>
+            </a-row>
+        </div>
+        <div class="warn-tag" v-if="typeList.length!=0">
+            <div :class="activeIndex == index ? 'tag-item-Y' : 'tag-item-N'" v-for="(item, index) in typeList"
+                :key="index" @click="typeClick(index)">
+                <div class="item-value">{{ item.label }}</div>
+                <div class="item-label">{{ item.value }}</div>
+            </div>
         </div>
         <div class="warn-content">
-            <a-table :columns="analysisColumns" :data-source="tableData" size="small" :scroll="{ y: 500 }" class="tableW"
-                :pagination="pagination" >
+            <a-table :columns="analysisColumns" :data-source="tableData" size="small" :scroll="{ y: 500 }"
+                class="tableW" :pagination="pagination" @change="changePaper">
                 <template #bodyCell="{ column, text }"></template>
 
             </a-table>
@@ -14,17 +43,27 @@
 </template>
 
 <script setup lang="ts">
-import { ref, reactive } from 'vue'
-import {analysisColumns} from './comment.data'
-
-let tagList = ref([
-    { title: '测试1' },
-    { title: '测试2' },
-    { title: '测试3' },
-    { title: '测试4' },
-    { title: '测试5' },
-    { title: '测试6' },
-])
+import { ref, reactive, onMounted } from 'vue'
+import { analysisColumns } from './comment.data'
+import { defHttp } from '/@/utils/http/axios';
+import dayjs from 'dayjs';
+import { message } from 'ant-design-vue';
+
+let props = defineProps({
+    deviceType: {
+        type: String,
+        required: true,
+    },
+})
+const getAlarmHistoryDataCount = (params) => defHttp.post({ url: '/ventanaly-device/monitor/history/getAlarmHistoryDataCount', params })
+const getDeviceListApi = (params) => defHttp.post({ url: '/monitor/device', params });
+let dataTypeName = ref('')
+let startTime = ref(dayjs().add(-1, 'day').format('YYYY-MM-DD HH:mm:ss'))
+let endTime = ref(dayjs().format('YYYY-MM-DD HH:mm:ss'))
+//设备下拉选项列表
+let deviceOptions = ref<any[]>([])
+let typeList = ref<any[]>([])
+let activeIndex = ref(0)
 let pagination = reactive({
     current: 1, // 当前页码
     pageSize: 10, // 每页显示条数
@@ -32,8 +71,70 @@ let pagination = reactive({
     // showTotal: (total, range) => `${range[0]}-${range[1]} 条,总共 ${total} 条`, // 分页右下角显示信息
     showSizeChanger: true, // 是否可改变每页显示条数
     pageSizeOptions: ['10', '20', '50'], // 可选的每页显示条数
-  });
-let tableData=ref<any[]>([])
+});
+let tableData = ref<any[]>([])
+
+//查询
+async function getSearch() {
+    if (dataTypeName.value) {
+        let res = await getAlarmHistoryDataCount({
+            "pageNo": pagination.current,
+            "pageSize": pagination.pageSize,
+            "startTime": startTime.value,
+            "endTime": endTime.value,
+            "dataTypeName": dataTypeName.value
+        })
+        let data = res.result
+        typeList.value = Object.keys(data.exceptionType).map(el => {
+            return {
+                label: el,
+                value: data.exceptionType[el].count || 0
+            }
+        })
+        tableData.value = data.exceptionType[typeList.value[activeIndex.value].label]['records']
+        pagination.total = typeList.value[activeIndex.value].value
+    } else {
+        message.warning('请选择设备类型!')
+    }
+}
+//选项切换
+function typeClick(index) {
+    activeIndex.value = index
+    pagination.current = 1
+    getSearch()
+}
+//分页切换
+function changePaper(val) {
+    pagination.current = val.current
+    pagination.pageSize = val.pageSize
+    getSearch()
+}
+async function getDeviceList() {
+    if (props.deviceType.split('_')[1] && props.deviceType.split('_')[1] === 'history') return;
+    let result
+    const res = await getDeviceListApi({ devicetype: props.deviceType, pageSize: 10000 });
+    if (res['records'] && res['records'].length > 0) {
+        result = res['records'];
+    } else if (res['msgTxt'] && res['msgTxt'][0] && res['msgTxt'][0]['datalist']) {
+        result = res['msgTxt'][0]['datalist'];
+    }
+    if (result) {
+
+        deviceOptions.value = result.map((item) => {
+            return {
+                label: item['strinstallpos'],
+                value: item['id'] || item['deviceID'],
+            };
+
+        });
+    }
+
+}
+
+onMounted(() => {
+    getDeviceList()
+    // getSearch()
+})
 </script>
 
 <style lang="less" scoped>
@@ -42,14 +143,68 @@ let tableData=ref<any[]>([])
     width: 100%;
     height: 100%;
 
-    .warn-tag {
+    .warn-search {
+        display: flex;
+        align-items: center;
         height: 30px;
-        margin: 10px;
-        text-align: center;
+        margin: 15px;
+
+        .search-label {
+            width: 75px;
+            font-size: 14px;
+            color: #fff;
+        }
+    }
+
+    .warn-tag {
+        height: 130px;
+        margin: 15px;
+        display: flex;
+        justify-content: space-between;
+        align-items: center;
+
+        .tag-item-N {
+            position: relative;
+            width: 215px;
+            height: 128px;
+            background: url('../../../../assets/images/choice-N.png') no-repeat center;
+            background-size: 100%;
+        }
+
+        .tag-item-Y {
+            position: relative;
+            width: 215px;
+            height: 128px;
+            background: url('../../../../assets/images/choice-Y.png') no-repeat center;
+            background-size: 100%;
+        }
+
+        .item-label {
+            position: absolute;
+            left: 50%;
+            transform: translate(-50%, 0);
+            top: 80px;
+            color: #3df6ff;
+            // font-size: 18px;
+            font-family: 'douyuFont';
+        }
+
+        .item-value {
+            position: absolute;
+            left: 50%;
+            transform: translate(-50%, 0%);
+            top: 25px;
+            font-size: 18px;
+            color: #fff;
+        }
     }
 
     .warn-content {
-        margin: 10px;
+        margin: 15px;
+    }
+
+    .zxm-row {
+        width: 100%;
     }
 }
 

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

@@ -85,9 +85,9 @@
             <AlarmHistoryTable columns-type="alarm" device-type="modelsensor" designScope="alarm-history" />
           </div>
         </a-tab-pane>
-        <a-tab-pane key="4" tab="警分析">
+        <a-tab-pane key="4" tab="警分析">
           <div class="tab-item box-bg" v-if="activeKey == '4'">
-           <warnAnalysis></warnAnalysis>
+           <warnAnalysis  device-type="modelsensor"></warnAnalysis>
           </div>
         </a-tab-pane>
         <!-- <a-tab-pane key="4" tab="操作历史">
@@ -397,7 +397,7 @@
     }
     .@{ventSpace}-picker,
     .@{ventSpace}-select-selector {
-      width: 100% !important;
+      width: 100% ;
       background: #00000017 !important;
       border: 1px solid @vent-form-item-border !important;
       input,