Browse Source

[Feat 0000] 更新保德配置

houzekong 4 months ago
parent
commit
ae3cf24ed6

+ 7 - 7
src/views/vent/home/configurable/configurable.data.ts

@@ -970,9 +970,9 @@ export const testConfigBDDust: Config[] = [
       // mock: BDdustMock,
     },
     showStyle: {
-      size: 'width:450px;height:760px;',
+      size: 'width:450px;height:750px;',
       version: '保德',
-      position: 'top:160px;left:0;',
+      position: 'top:170px;left:0;',
     },
   },
   {
@@ -1970,7 +1970,7 @@ export const testConfigBDFire: Config[] = [
       },
       slice: {
         direction: 'column',
-        basis: ['40%', '60%'],
+        basis: ['50%', '50%'],
       },
       layout: ['board', 'complex_list'],
       board: [
@@ -2025,9 +2025,9 @@ export const testConfigBDFire: Config[] = [
       // mock: BDfireMock,
     },
     showStyle: {
-      size: 'width:450px;height:320px;',
+      size: 'width:450px;height:310px;',
       version: '保德',
-      position: 'top:160px;left:0;',
+      position: 'top:170px;left:0;',
     },
   },
   {
@@ -2421,9 +2421,9 @@ export const testConfigBDFire: Config[] = [
       // mock: BDfireMock,
     },
     showStyle: {
-      size: 'width:450px;height:240px;',
+      size: 'width:450px;height:230px;',
       version: '保德',
-      position: 'top:160px;right:0;',
+      position: 'top:170px;right:0;',
     },
   },
   {

+ 2 - 2
src/views/vent/home/configurable/dustBD.vue

@@ -173,7 +173,7 @@
   .left-t {
     position: absolute;
     height: 115px;
-    top: 30px;
+    top: 50px;
     width: 450px;
     background-image: url('/@/assets/images/home-container/configurable/firehome/qkjaq.png');
     background-color: #000723;
@@ -234,7 +234,7 @@
     position: absolute;
     height: 160px;
     right: 0;
-    top: 40px;
+    top: 50px;
     width: 450px;
     background-image: url('/@/assets/images/home-container/configurable/firehome/common-border2.png');
     background-color: #000723;

+ 4 - 4
src/views/vent/home/configurable/fireBD.vue

@@ -64,9 +64,9 @@
       :visible="true"
       :page-type="pageType"
     />
-    <div style="width: 1000px; height: 570px; position: absolute; left: calc(50% - 500px); top: 60px">
+    <div style="width: 1000px; height: 550px; position: absolute; left: calc(50% - 500px); top: 60px">
       <!-- <VentModal /> -->
-      <iframe style="width: 1000px; height: 570px" :src="iframeUrl" ref="frameRef" @load="hideLoading"></iframe>
+      <iframe style="width: 1000px; height: 550px" :src="iframeUrl" ref="frameRef" @load="hideLoading"></iframe>
     </div>
   </div>
 </template>
@@ -203,7 +203,7 @@
   .left-t {
     position: absolute;
     height: 115px;
-    top: 30px;
+    top: 40px;
     width: 450px;
     background-image: url('/@/assets/images/home-container/configurable/firehome/qkjaq.png');
     background-color: #000723;
@@ -265,7 +265,7 @@
     // height: 160px;
     height: 115px;
     right: 0;
-    top: 40px;
+    top: 50px;
     width: 450px;
     background-image: url('/@/assets/images/home-container/configurable/firehome/common-border2.png');
     background-color: #000723;

+ 41 - 60
src/views/vent/home/configurable/index.vue

@@ -25,24 +25,24 @@
           <div style="margin-bottom: 15px; color: #009bff; font-size: 24px; font-weight: bolder; letter-spacing: 10px">
             {{ homedata.allMineWarn }}
           </div>
-          <div style="color: #fff; font-size: 12px">自燃倾向性等级 : 自燃</div>
+          <!-- <div style="color: #fff; font-size: 12px">自燃倾向性等级 : 容易自燃</div> -->
         </div>
         <div class="tcontent-r">
-          <div>火灾</div>
+          <div>粉尘</div>
           <div>风险</div>
         </div>
       </div>
     </div>
-    <div class="right-t">
-      <div class="tcontent-l" @click="redirectTo('/grout-home')">
+    <!-- <div class="right-t">
+      <div class="tcontent-l" @click="redirectTo('https://bing.cn')">
         <div>智能</div>
-        <div>浆系统</div>
+        <div>浆系统</div>
       </div>
-      <div class="tcontent-r" @click="redirectTo('/nitrogen-home')">
+      <div class="tcontent-r" @click="redirectTo('https://bing.cn')">
         <div>智能</div>
-        <div>注系统</div>
+        <div>注系统</div>
       </div>
-    </div>
+    </div> -->
     <ModuleBD
       v-for="cfg in configs"
       :key="cfg.deviceType"
@@ -53,19 +53,9 @@
       :visible="true"
       :page-type="pageType"
     />
-    <ModuleBDDual
-      :show-style="configA.showStyle"
-      :module-data-a="configA.moduleData"
-      :module-name-a="configA.moduleName"
-      :device-type-a="configA.deviceType"
-      :module-data-b="configB.moduleData"
-      :module-name-b="configB.moduleName"
-      :device-type-b="configB.deviceType"
-      :visible="true"
-      :page-type="pageType"
-    />
     <div style="width: 1000px; height: 570px; position: absolute; left: calc(50% - 500px); top: 60px">
-      <VentModal />
+      <!-- <VentModal /> -->
+      <iframe style="width: 1000px; height: 570px" :src="iframeUrl" ref="frameRef" @load="hideLoading"></iframe>
     </div>
   </div>
 </template>
@@ -75,46 +65,37 @@
   // import MonitorCenter from './components/MonitorCenter.vue';
   // import { useInitConfigs } from './hooks/useInit';
   import ModuleBD from './components/ModuleBD.vue';
-  import ModuleBDDual from './components/ModuleBDDual.vue';
-  import { testConfigBDFire } from './configurable.data';
-  import VentModal from '/@/components/vent/micro/ventModal.vue';
-  import { getBDFireData } from './configurable.api';
+  import { testConfigBDDust } from './configurable.data';
+  // import VentModal from '/@/components/vent/micro/ventModal.vue';
+  import { getBDDustData } from './configurable.api';
+  import { getToken } from '/@/utils/auth';
 
-  const mainTitle = ref('保德煤矿火灾预警系统');
-  const pageType = 'BD_fire';
+  const iframeUrl = ref(
+    `${location.protocol}//${location.hostname}:8091/dashboard/analysis?type=empty&deviceType=empty&showid=1&token=${getToken()}`
+  );
+  const loading = ref(true);
+  const mainTitle = ref('保德煤矿粉尘灾害预警系统');
+  const pageType = 'BD_dust';
 
   // const moduleCodes = ['fanlocal', 'fanmain' /** 'vc', 'ar', 'va', 'ws', 'dw' */];
 
-  const configs = ref(
-    testConfigBDFire.filter(({ moduleName }) => {
-      return moduleName !== '工作面光纤监测' && moduleName !== '工作面束管监测';
-    })
-  );
-  const configA = ref<any>(
-    testConfigBDFire.find(({ moduleName }) => {
-      return moduleName === '工作面束管监测';
-    })
-  );
-  const configB = ref<any>(
-    testConfigBDFire.find(({ moduleName }) => {
-      return moduleName === '工作面光纤监测';
-    })
-  );
+  const configs = ref(testConfigBDDust);
   // const { configs, fetchConfigs } = useInitConfigs();
-
   const homedata = ref<any>({});
-
+  function hideLoading() {
+    loading.value = false;
+  }
   onMounted(() => {
     // configs.value = testConfigB;
-    getBDFireData({}).then((r) => {
+    getBDDustData({}).then((r) => {
       homedata.value = r;
     });
     // fetchConfigs(pageType);
   });
 
-  function redirectTo(url) {
-    window.open(url);
-  }
+  // function redirectTo(url) {
+  //   window.open(url);
+  // }
 </script>
 <style lang="less" scoped>
   @font-face {
@@ -192,7 +173,7 @@
   .left-t {
     position: absolute;
     height: 115px;
-    top: 30px;
+    top: 50px;
     width: 450px;
     background-image: url('/@/assets/images/home-container/configurable/firehome/qkjaq.png');
     background-color: #000723;
@@ -251,10 +232,9 @@
   }
   .right-t {
     position: absolute;
-    // height: 160px;
-    height: 115px;
+    height: 160px;
     right: 0;
-    top: 40px;
+    top: 50px;
     width: 450px;
     background-image: url('/@/assets/images/home-container/configurable/firehome/common-border2.png');
     background-color: #000723;
@@ -264,12 +244,11 @@
     display: flex;
     align-items: center;
     justify-content: space-around;
-    z-index: 1;
 
     .tcontent-l {
       flex: 1;
-      height: 100%;
-      font-size: 16px;
+      height: 70%;
+      font-size: 20px;
       font-weight: bold;
       background-image: url(/@/assets/images/home-container/configurable/firehome/img-5.png),
         url(/@/assets/images/home-container/configurable/firehome/ggxt.png);
@@ -281,13 +260,14 @@
         center,
         center top;
       text-align: center;
-      padding-top: 35px;
-      line-height: 40px;
+      padding-top: 40px;
+      line-height: 50px;
+      cursor: pointer;
     }
     .tcontent-r {
       flex: 1;
-      height: 100%;
-      font-size: 16px;
+      height: 70%;
+      font-size: 20px;
       font-weight: bold;
       background-image: url(/@/assets/images/home-container/configurable/firehome/img-5.png),
         url(/@/assets/images/home-container/configurable/firehome/zjxt.png);
@@ -299,8 +279,9 @@
         center,
         center top;
       text-align: center;
-      padding-top: 35px;
-      line-height: 40px;
+      padding-top: 40px;
+      line-height: 50px;
+      cursor: pointer;
     }
   }