Przeglądaj źródła

[Feat 0000] 新增 ignoreOverflow 配置项

houzekong 6 miesięcy temu
rodzic
commit
61215066d5

+ 2 - 0
src/views/vent/deviceManager/configurationTable/types.ts

@@ -62,6 +62,8 @@ export interface ModuleData {
     direction: 'column' | 'row';
     /** 分区大小,该数组的数量应该和 layout 数量一致 */
     basis: string[];
+    /** 是否允许溢出自滚动 */
+    ignoreOverflow?: boolean;
   };
   preset: ModuleDataPreset[];
   board: ModuleDataBoard[];

+ 5 - 1
src/views/vent/home/configurable/components/content.vue

@@ -16,7 +16,11 @@
       Not Supportted Link Or Browser
     </video>
     <div class="flex w-full h-full" :style="{ flexDirection: slice.direction }">
-      <div v-for="(config, i) in layoutConfig" :key="config.key" :style="{ flexBasis: slice.basis[i], overflow: 'auto' }">
+      <div
+        v-for="(config, i) in layoutConfig"
+        :key="config.key"
+        :style="{ flexBasis: slice.basis[i], overflow: slice.ignoreOverflow ? 'none' : 'auto' }"
+      >
         <!-- 告示板部分 -->
         <template v-if="config.key === 'board'">
           <div class="content__module flex flex-justify-around pt-10px pb-10px">

+ 1 - 0
src/views/vent/home/configurable/configurable.data.ts

@@ -2618,6 +2618,7 @@ export const testConfigBDFire: Config[] = [
       },
       slice: {
         direction: 'column',
+        ignoreOverflow: true,
         basis: ['35%', '65%'],
       },
       layout: ['board', 'chart'],

+ 55 - 28
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('https://bing.cn')">
+    <div class="right-t">
+      <div class="tcontent-l" @click="redirectTo('/grout-home')">
         <div>智能</div>
-        <div>浆系统</div>
+        <div>浆系统</div>
       </div>
-      <div class="tcontent-r" @click="redirectTo('https://bing.cn')">
+      <div class="tcontent-r" @click="redirectTo('/nitrogen-home')">
         <div>智能</div>
-        <div>注系统</div>
+        <div>注系统</div>
       </div>
-    </div> -->
+    </div>
     <ModuleBD
       v-for="cfg in configs"
       :key="cfg.deviceType"
@@ -53,6 +53,17 @@
       :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 />
     </div>
@@ -64,30 +75,46 @@
   // import MonitorCenter from './components/MonitorCenter.vue';
   // import { useInitConfigs } from './hooks/useInit';
   import ModuleBD from './components/ModuleBD.vue';
-  import { testConfigBDDust } from './configurable.data';
+  import ModuleBDDual from './components/ModuleBDDual.vue';
+  import { testConfigBDFire } from './configurable.data';
   import VentModal from '/@/components/vent/micro/ventModal.vue';
-  import { getBDDustData } from './configurable.api';
+  import { getBDFireData } from './configurable.api';
 
-  const mainTitle = ref('保德煤矿粉尘灾害预警系统');
-  const pageType = 'BD_dust';
+  const mainTitle = ref('保德煤矿火灾预警系统');
+  const pageType = 'BD_fire';
 
   // const moduleCodes = ['fanlocal', 'fanmain' /** 'vc', 'ar', 'va', 'ws', 'dw' */];
 
-  const configs = ref(testConfigBDDust);
+  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, fetchConfigs } = useInitConfigs();
+
   const homedata = ref<any>({});
 
   onMounted(() => {
     // configs.value = testConfigB;
-    getBDDustData({}).then((r) => {
+    getBDFireData({}).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 {
@@ -224,7 +251,8 @@
   }
   .right-t {
     position: absolute;
-    height: 160px;
+    // height: 160px;
+    height: 115px;
     right: 0;
     top: 40px;
     width: 450px;
@@ -236,11 +264,12 @@
     display: flex;
     align-items: center;
     justify-content: space-around;
+    z-index: 1;
 
     .tcontent-l {
       flex: 1;
-      height: 70%;
-      font-size: 20px;
+      height: 100%;
+      font-size: 16px;
       font-weight: bold;
       background-image: url(/@/assets/images/home-container/configurable/firehome/img-5.png),
         url(/@/assets/images/home-container/configurable/firehome/ggxt.png);
@@ -252,14 +281,13 @@
         center,
         center top;
       text-align: center;
-      padding-top: 40px;
-      line-height: 50px;
-      cursor: pointer;
+      padding-top: 35px;
+      line-height: 40px;
     }
     .tcontent-r {
       flex: 1;
-      height: 70%;
-      font-size: 20px;
+      height: 100%;
+      font-size: 16px;
       font-weight: bold;
       background-image: url(/@/assets/images/home-container/configurable/firehome/img-5.png),
         url(/@/assets/images/home-container/configurable/firehome/zjxt.png);
@@ -271,9 +299,8 @@
         center,
         center top;
       text-align: center;
-      padding-top: 40px;
-      line-height: 50px;
-      cursor: pointer;
+      padding-top: 35px;
+      line-height: 40px;
     }
   }