Quellcode durchsuchen

灾害基金项目修改-提交

lxh vor 3 Tagen
Ursprung
Commit
6ef1a8cd84

+ 1 - 1
.env.development

@@ -7,7 +7,7 @@ VITE_PUBLIC_PATH = /
 # Basic interface address SPA
 #VITE_GLOB_API_URL=http://182.92.126.35:9999
 # VITE_GLOB_API_URL=http://182.92.126.35:8070/prevention
-VITE_GLOB_API_URL=http://192.168.131.6:8070/prevention
+VITE_GLOB_API_URL=http://192.168.131.19:8070/prevention
 # File upload address, optional
 VITE_GLOB_UPLOAD_URL=/upload
 

+ 2 - 1
src/api/sys/monitor.ts

@@ -87,8 +87,9 @@ export function getMonitorSite(params: MonitorSiteParams, mode: ErrorMessageMode
 }
 
 /** 测点操作内嵌的iframe地址 */
+export const monitorSiteOperationUrl = 'http://172.18.252.31:8092/micro-vent-3dModal/dashboard/analysis?mock-login=1&type=empty';
 // export const monitorSiteOperationUrl = 'http://172.16.253.23:91/valkyrja/?type=tf';
-export const monitorSiteOperationUrl = 'http://82.157.13.146:18224/valkyrja/';
+// export const monitorSiteOperationUrl = 'http://82.157.13.146:18224/valkyrja/';
 
 /** 发送测点操作指令 */
 export function postMonitorOperation(el: Window, params: MonitorSiteOperationParams) {

+ 2 - 1
src/views/vent/dust/dustHome/index.vue

@@ -46,8 +46,9 @@
               <InfoCircleOutlined class="scalc-icon" />
             </div>
           </div>
+          <iframe src="http://172.18.252.31:8092/micro-vent-3dModal/dashboard/analysis?mock-login=1&type=empty" width="100%" height="100%" frameborder="0"></iframe>
           <!-- <iframe src="http://172.16.253.23:91/valkyrja/?type=tf" width="100%" height="100%" frameborder="0"></iframe> -->
-          <iframe src="http://82.157.13.146:18224/valkyrja/" width="100%" height="100%" frameborder="0"></iframe>
+          <!-- <iframe src="http://82.157.13.146:18224/valkyrja/" width="100%" height="100%" frameborder="0"></iframe> -->
         </div>
         <transition name="fade" mode="out-in">
           <div class="center-b" v-if="isShow">

+ 45 - 52
src/views/vent/fire/fireHome/components/outFireJc.vue

@@ -1,21 +1,21 @@
 <template>
-  <div class="outFireJc">
-    <vue3-seamless-scroll hover-stop="true" :list="outFireList" :hover="true" :step="0.1"  class="seamless-warp">
-      <div class="outFire-box" v-for="(item, index) in outFireList" :key="index">
-        <div class="outFire-title">{{ item.title }}</div>
-        <div class="outFire-label">{{ item.label }}</div>
-        <div class="outFire-val">{{ `${item.val}${item.dw}` || '--' }}</div>
-      </div>
-    </vue3-seamless-scroll>
+  <div class="substationJc">
+    <div class="substation-box" v-for="(item, index) in substationList" :key="index">
+      <div class="substation-title">{{ item.title }}</div>
+      <div class="substation-label">{{ item.label }}</div>
+      <div class="substation-val">{{ `${item.val}${item.dw}` || '--' }}</div>
+      <div class="substation-val">{{ item.warn=='1' ? '报警' : '正常' }}</div>
+      <div class="substation-val">{{ item.levels==1 ? '低风险' : item.levels==2 ? '一般风险' : item.levels==3 ? '较大风险' : item.levels==4 ? '重大风险' : '--'  }}</div>
+    </div>
+
   </div>
 </template>
 
 <script setup lang="ts">
 import { ref, reactive, defineProps, watch } from 'vue';
-import { Vue3SeamlessScroll } from 'vue3-seamless-scroll'
 
 let props = defineProps({
-  outFireData: {
+  substationData: {
     type: Array,
     default: () => {
       return []
@@ -23,18 +23,18 @@ let props = defineProps({
   }
 })
 
-let outFireList = ref<any[]>([]);
+let substationList = ref<any[]>([]);
 
-watch(() => props.outFireData, (newO, oldO) => {
-  console.log(newO, 'newO--------')
-  if (newO.length != 0) {
-    outFireList.value = newO
+watch(() => props.substationData, (newS, oldS) => {
+  console.log(newS, 'newS--------')
+  if (newS.length != 0) {
+    substationList.value = newS
   }
 }, { immediate: true, deep: true })
 </script>
 
 <style lang="less" scoped>
-.outFireJc {
+.substationJc {
   display: flex;
   position: relative;
   flex-direction: column;
@@ -42,48 +42,41 @@ watch(() => props.outFireData, (newO, oldO) => {
   justify-content: center;
   width: 100%;
   height: 100%;
-  overflow: hidden;
 
-  .seamless-warp {
-    width: 100%;
+  .substation-box {
+    display: flex;
+    box-sizing: border-box;
+    width: 90%;
+    height: 145px;
+    padding-top: 30px;
+    background: url('../../../../../assets/images/fire/firehome/list.png') no-repeat bottom;
+    background-size: 100% 100%;
+    color: #fff;
+    font-size: 14px;
 
-    .outFire-box {
+    .substation-title {
       display: flex;
-      box-sizing: border-box;
-      width: 90%;
-      height: 42px;
-      padding-top: 10px;
-      background: url('../../../../../assets/images/fire/firehome/list.png') no-repeat bottom;
-      background-size: 100% 100%;
-      color: #fff;
-      font-size: 14px;
-
-      .outFire-title {
-        display: flex;
-        flex: 1;
-        justify-content: center;
-        height: 100%;
-        font-size: 12px;
-      }
+      flex: 1;
+      justify-content: center;
+      height: 100%;
+      font-size: 12px;
+    }
 
-      .outFire-label {
-        display: flex;
-        flex: 1;
-        justify-content: center;
-        height: 100%;
-        font-size: 12px;
-      }
+    .substation-label {
+      display: flex;
+      flex: 1;
+      justify-content: center;
+      height: 100%;
+      font-size: 12px;
+    }
 
-      .outFire-val {
-        display: flex;
-        flex: 1;
-        justify-content: center;
-        height: 100%;
-        color: #089dff;
-      }
+    .substation-val {
+      display: flex;
+      flex: 1;
+      justify-content: center;
+      height: 100%;
+      color: #089dff;
     }
   }
-
-
 }
 </style>

+ 4 - 2
src/views/vent/fire/fireHome/components/substationJc.vue

@@ -1,10 +1,12 @@
 <template>
   <div class="substationJc">
-    <!-- <div class="substation-box" v-for="(item, index) in substationList" :key="index">
+    <div class="substation-box" v-for="(item, index) in substationList" :key="index">
       <div class="substation-title">{{ item.title }}</div>
       <div class="substation-label">{{ item.label }}</div>
       <div class="substation-val">{{ `${item.val}${item.dw}` || '--' }}</div>
-    </div> -->
+      <div class="substation-val">{{ item.warn=='1' ? '报警' : '正常' }}</div>
+      <div class="substation-val">{{ item.levels==1 ? '低风险' : item.levels==2 ? '一般风险' : item.levels==3 ? '较大风险' : item.levels==4 ? '重大风险' : '--'  }}</div>
+    </div>
 
   </div>
 </template>

+ 6 - 0
src/views/vent/fire/fireHome/firehome.api.ts

@@ -12,8 +12,14 @@ enum Api {
   getHeadingFace = '/fire/fireDisasterApi/getHeadingFace',
   getMainTrafficYw = '/fire/fireDisasterApi/getMainTrafficYw',
   getDsWd = '/fire/fireDisasterApi/getDsWd',
+  getBdsRealCnt='/fire/fireDisasterApi/getBdsRealCnt'
 }
 /**
+ * 变电硐室防灭火监控系统
+ * @param params
+ */
+export const getBdsRealCnt = (params) => defHttp.get({ url: Api.getBdsRealCnt, params });
+/**
  * 工作面风险监测图表数据
  * @param params
  */

+ 92 - 74
src/views/vent/fire/fireHome/index.vue

@@ -53,8 +53,9 @@
               <InfoCircleOutlined class="scalc-icon" />
             </div>
           </div>
+          <iframe src="http://172.18.252.31:8092/micro-vent-3dModal/dashboard/analysis?mock-login=1&type=empty" width="100%" height="100%" frameborder="0"></iframe>
           <!-- <iframe src="http://172.16.253.23:91/valkyrja/?type=tf" width="100%" height="100%" frameborder="0"></iframe> -->
-          <iframe src="http://82.157.13.146:18224/valkyrja/" width="100%" height="100%" frameborder="0"></iframe>
+          <!-- <iframe src="http://82.157.13.146:18224/valkyrja/" width="100%" height="100%" frameborder="0"></iframe> -->
         </div>
         <transition>
           <div class="center-b" v-if="isShow">
@@ -79,7 +80,8 @@
           <div class="right-c">
             <DanelBd :moduleName="'带式输送机防灭火监控系统'" :contentStyle="{ contentH: '228px' }" commonTitle="selected"
               :selectList="selectListDs" :selectValue="dsCode" @change-select="changeSelect" :bgSize="'middle'">
-              <outFireJc :outFireData="outFireData" />
+              <!-- <outFireJc :outFireData="outFireData" /> -->
+              <outFireJc :substationData="outFireData" />
             </DanelBd>
           </div>
           <!-- 右下区域 -->
@@ -125,7 +127,8 @@ import {
   getHeadingFace,
   getMainTrafficYw,
   getDsWd,
-  getFireWarningCntByType
+  getFireWarningCntByType,
+  getBdsRealCnt
 } from './firehome.api';
 
 //GIs按钮切换显示与隐藏
@@ -201,9 +204,11 @@ function getMonitor() {
     //带式
     await getFireAreaInfoListDs();
     //变电硐室
-    await getFireAreaInfoListBd();
+    // await getFireAreaInfoListBd();
+    await getBdsRealCntList()
     //安全监控
     await getTableList();
+    
     if (timer) {
       timer = null;
     }
@@ -228,7 +233,7 @@ function changeSelect(data) {
       break;
     case '变电硐室防灭火监控系统':
       pointCodeBd.value = data.value;
-      getGxcwHistoryDataByPointCodeList();
+      // getGxcwHistoryDataByPointCodeList();
       break;
     case '安全监控系统':
       pointCodeAq.value = data.value;
@@ -337,89 +342,83 @@ async function getFireAreaInfoListDs() {
   const res = await getFireAreaInfo({});
   if (res.length != 0) {
     selectListDs.length = 0;
-    outFireData.length = 0;
-    substationData.length = 0
+    // outFireData.length = 0;
+    // substationData.length = 0
     let dataDs = res.filter((m) => m.areaType == 4);
     dataDs.forEach((el) => {
       selectListDs.push({ label: el.areaName, value: el.areaName });
     });
 
     dsCode.value = dsCode.value ? dsCode.value : selectListDs[0].value;
-    let dataName = dataDs.filter((v) => v.areaName == dsCode.value)[0];
+    getBdsRealCntList1()
+
+    // let dataName = dataDs.filter((v) => v.areaName == dsCode.value)[0];
     //带式输送机
-    outFireData.push(
-      { title: '光纤预警', val: dataName.infoTypeTwo.maxTemperature, dw: '℃', label: '最高温度' },
-      {
-        title: '一氧化碳预警',
-        val: dataName.infoTypeTwo.returnAirCornerCO,
-        dw: 'ppm',
-        label: '最高浓度',
-      },
-      // { title: '烟雾预警', val: dataName.infoTypeTwo.hazard, dw: '', label: '状态' },
-      { title: '烟雾预警', val: '无烟雾', dw: '', label: '状态' },
-      { title: '火焰预警', val: '无火焰', dw: '', label: '状态' },
-      { title: '喷淋阀门', val: '关闭', dw: '', label: '状态' },
-    );
+    // outFireData.push(
+    //   { title: '光纤预警', val: dataName.infoTypeTwo.maxTemperature, dw: '℃', label: '最高温度' },
+    //   {
+    //     title: '一氧化碳预警',
+    //     val: dataName.infoTypeTwo.returnAirCornerCO,
+    //     dw: 'ppm',
+    //     label: '最高浓度',
+    //   },
+    //   { title: '烟雾预警', val: '无烟雾', dw: '', label: '状态' },
+    //   { title: '火焰预警', val: '无火焰', dw: '', label: '状态' },
+    //   { title: '喷淋阀门', val: '关闭', dw: '', label: '状态' },
+    // );
     //变电硐室
-    substationData.push(
-      // { title: '光纤预警', val: dataName.infoTypeTwo.maxTemperature, dw: '℃', label: '最高温度' },
-      // {
-      //   title: '一氧化碳预警',
-      //   val: dataName.infoTypeTwo.returnAirCornerCO,
-      //   dw: 'ppm',
-      //   label: '最高浓度',
-      // },
-      { title: '烟雾预警', val: 10, dw: '', label: '数量' },
-      { title: '火焰预警', val: 10, dw: '', label: '数量' },
-      { title: '电磁阀', val: 10, dw: '', label: '数量' },
-    )
+    // substationData.push(
+    //   { title: '烟雾预警', val: 10, dw: '', label: '数量' },
+    //   { title: '火焰预警', val: 10, dw: '', label: '数量' },
+    //   { title: '电磁阀', val: 10, dw: '', label: '数量' },
+    // )
 
   }
 }
 
 //变电硐室防灭火监控系统
-async function getFireAreaInfoListBd() {
-  const res = await getFireAreaInfo({});
-  if (res.length != 0) {
-    let dataBd = res.filter((m) => m.areaType == 5);
-    areaCodeBd.value = dataBd[0].areaCode;
-    //获取光纤条数及测点编号
-    getInfosByAreaCodeList();
-  }
-}
+// async function getFireAreaInfoListBd() {
+//   const res = await getFireAreaInfo({});
+//   if (res.length != 0) {
+//     let dataBd = res.filter((m) => m.areaType == 5);
+//     areaCodeBd.value = dataBd[0].areaCode;
+//     //获取光纤条数及测点编号
+//     getInfosByAreaCodeList();
+//   }
+// }
 //获取光纤条数及测点编号
-async function getInfosByAreaCodeList() {
-  let res = await getInfosByAreaCode({ areaCode: areaCodeBd.value });
-  if (res.length != 0) {
-    selectListBd.length = 0;
-    res.forEach((el) => {
-      selectListBd.push({
-        label: el.pointName,
-        value: el.pointCode,
-      });
-    });
-    pointCodeBd.value = pointCodeBd.value ? pointCodeBd.value : selectListBd[0].value;
-    //获取光纤测温图表数据
-    getGxcwHistoryDataByPointCodeList();
-  }
-}
+// async function getInfosByAreaCodeList() {
+//   let res = await getInfosByAreaCode({ areaCode: areaCodeBd.value });
+//   if (res.length != 0) {
+//     selectListBd.length = 0;
+//     res.forEach((el) => {
+//       selectListBd.push({
+//         label: el.pointName,
+//         value: el.pointCode,
+//       });
+//     });
+//     pointCodeBd.value = pointCodeBd.value ? pointCodeBd.value : selectListBd[0].value;
+//     //获取光纤测温图表数据
+//     getGxcwHistoryDataByPointCodeList();
+//   }
+// }
 
 //获取光纤测温图表数据
-async function getGxcwHistoryDataByPointCodeList() {
-  let res = await getGxcwHistoryDataByPointCode({ pointCode: pointCodeBd.value });
-  echartDatas.xData.length = 0;
-  echartDatas.yData.length = 0;
-  echartDatas.yData1.length = 0;
-  res.time.forEach((el) => {
-    echartDatas.xData.push(el);
-  });
-  res.maxValue.forEach((el) => {
-    echartDatas.yData.push(el);
-  });
-  res.minValue.forEach((el) => {
-    echartDatas.yData1.push(el);
-  });
-}
+// async function getGxcwHistoryDataByPointCodeList() {
+//   let res = await getGxcwHistoryDataByPointCode({ pointCode: pointCodeBd.value });
+//   echartDatas.xData.length = 0;
+//   echartDatas.yData.length = 0;
+//   echartDatas.yData1.length = 0;
+//   res.time.forEach((el) => {
+//     echartDatas.xData.push(el);
+//   });
+//   res.maxValue.forEach((el) => {
+//     echartDatas.yData.push(el);
+//   });
+//   res.minValue.forEach((el) => {
+//     echartDatas.yData1.push(el);
+//   });
+// }
 
 //获取安全监控列表数据
 function getTableList() {
@@ -534,6 +533,24 @@ async function getDsWdList() {
     });
   }
 }
+async function getBdsRealCntList(){
+  let res=await getBdsRealCnt({areaType:5})
+  substationData.length=0
+  res.forEach(el=>{
+    substationData.push({
+      title: el.name, val: el.cnt, dw: '', label: '数量' ,warn:el.isWarn,levels:el.warningLevel
+    })
+  })
+}
+async function getBdsRealCntList1(){
+  let res=await getBdsRealCnt({areaType:4})
+  outFireData.length=0
+  res.forEach(el=>{
+    outFireData.push({
+      title: el.name, val: el.cnt, dw: '', label: '数量' ,warn:el.isWarn,levels:el.warningLevel
+    })
+  })
+}
 
 onMounted(() => {
   //工作面
@@ -544,9 +561,10 @@ onMounted(() => {
   //带式
   getFireAreaInfoListDs();
   //变电硐室
-  getFireAreaInfoListBd();
+  // getFireAreaInfoListBd();
+  getBdsRealCntList()
   //安全监控
-  getTableList();
+  getTableList(); 
   getMonitor();
 });