Browse Source

[Feat 0000] 可配置首页保德的复杂列表样式更新及自动登录落实

houzekong 6 months ago
parent
commit
1b8af338d6

+ 7 - 1
src/router/guard/permissionGuard.ts

@@ -15,7 +15,7 @@ import { OAUTH2_THIRD_LOGIN_TENANT_ID } from '/@/enums/cacheEnum';
 import { useGlobSetting } from '/@/hooks/setting';
 
 import _ from 'lodash';
-import { AUTO_LOGIN_URL_QUERY, SKIP_SSO_URL_QUERY } from '../constant';
+import { MOCK_LOGIN_URL_QUERY, SKIP_SSO_URL_QUERY } from '../constant';
 import { useSso } from '/@/hooks/web/useSso';
 import { useAutoLogin } from '/@/hooks/vent/useAutoLogin';
 
@@ -67,6 +67,12 @@ export function createPermissionGuard(router: Router) {
       // 自动登录后会动态添加路由,此处应当重定向到fullPath,否则会加载404页面内容
       return next({ path: to.fullPath, replace: true, query: to.query });
     }
+    // 如果指定了需要模拟登录则执行模拟登录,覆盖原有的登录信息
+    if (to.query[MOCK_LOGIN_URL_QUERY.key] === MOCK_LOGIN_URL_QUERY.val) {
+      await userStore.mockLogin({ goHome: false });
+      delete to.query[MOCK_LOGIN_URL_QUERY.key];
+      return next({ path: to.fullPath, replace: true, query: to.query });
+    }
 
     const token = userStore.getToken;
 

+ 1 - 0
src/views/vent/home/configurable/components/ModuleBD.vue

@@ -110,6 +110,7 @@
     background-repeat: no-repeat;
     background-position: center top;
     background-size: 100% auto;
+    z-index: 2;
 
     .dane-title {
       display: flex;

+ 23 - 4
src/views/vent/home/configurable/components/detail/ComplexList.vue

@@ -136,14 +136,16 @@
   .list-item_B {
     // height: 155px;
     background-repeat: no-repeat;
-    background-size: 100% auto;
+    // background-size: 100% 100%;
+    // background-size: auto 100%;
+    background-size: 87% auto;
     background-position: center;
-    background-image: url(/@/assets/images/home-container/configurable/firehome/fiber-jc.png);
+    background-image: url(/@/assets/images/home-container/configurable/firehome/img-7.png);
     display: flex;
     align-items: center;
     justify-content: space-between;
     text-align: center;
-    padding-right: 50px;
+    padding: 0 10%;
     margin-top: 15px;
     height: 40px;
 
@@ -160,12 +162,29 @@
       align-items: center;
     }
     .list-item__title_B {
-      flex-basis: 24%;
+      width: 40px;
+      text-align: center;
+      // height: 30px;
+      // background-size: auto 80%;
+      // background-position: center;
+      // background-repeat: no-repeat;
     }
     .list-item__info {
       display: none;
     }
   }
+  // .list-item__title_B_O2 {
+  //   background-image: url(/@/assets/images/home-container/configurable/firehome/O₂.png);
+  // }
+  // .list-item__title_B_CH4 {
+  //   background-image: url(/@/assets/images/home-container/configurable/firehome/CH₄.png);
+  // }
+  // .list-item__title_B_CO {
+  //   background-image: url(/@/assets/images/home-container/configurable/firehome/CO.png);
+  // }
+  // .list-item__title_B_CO2 {
+  //   background-image: url(/@/assets/images/home-container/configurable/firehome/CO₂.png);
+  // }
 
   // .list-item__label {
   //   flex-basis: 55%;

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

@@ -1906,25 +1906,25 @@ const BDfireMock = {
   fiber: {
     contents: [
       {
-        name: '氧气',
+        name: 'O₂',
         max: '20',
         pos: '81202综采工作面隅角',
         time: '2024-08-13 12:00:00',
       },
       {
-        name: '一氧化碳',
+        name: 'CH₄',
         max: '20',
         pos: '81202综采工作面隅角',
         time: '2024-08-13 12:00:00',
       },
       {
-        name: '甲烷',
+        name: 'CO',
         max: '20',
         pos: '81202综采工作面隅角',
         time: '2024-08-13 12:00:00',
       },
       {
-        name: '二氧化碳',
+        name: 'CO₂',
         max: '20',
         pos: '81202综采工作面隅角',
         time: '2024-08-13 12:00:00',