Преглед изворни кода

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

lxh пре 1 година
родитељ
комит
5b3fb6258d
2 измењених фајлова са 33 додато и 24 уклоњено
  1. 25 17
      src/store/modules/user.ts
  2. 8 7
      src/views/vent/monitorManager/fanLocalMonitor/index.vue

+ 25 - 17
src/store/modules/user.ts

@@ -192,9 +192,9 @@ export const useUserStore = defineStore({
         // 判断是否有 redirect 重定向地址
         //update-begin---author:wangshuai ---date:20230424  for:【QQYUN-5195】登录之后直接刷新页面导致没有进入创建组织页面------------
         if (redirect && goHome) {
-        //update-end---author:wangshuai ---date:20230424  for:【QQYUN-5195】登录之后直接刷新页面导致没有进入创建组织页面------------
+          //update-end---author:wangshuai ---date:20230424  for:【QQYUN-5195】登录之后直接刷新页面导致没有进入创建组织页面------------
           // 当前页面打开
-          window.open(redirect, '_self')
+          window.open(redirect, '_self');
           return data;
         }
         // update-end-author:sunjianlei date:20230306 for: 修复登录成功后,没有正确重定向的问题
@@ -293,22 +293,30 @@ export const useUserStore = defineStore({
       }
       //update-begin---author:wangshuai ---date:20230224  for:[QQYUN-3440]新建企业微信和钉钉配置表,通过租户模式隔离------------
       //退出登录的时候需要用的应用id
-      if(isOAuth2AppEnv()){
-        let tenantId = getAuthCache(OAUTH2_THIRD_LOGIN_TENANT_ID);
-        removeAuthCache(OAUTH2_THIRD_LOGIN_TENANT_ID);
-        goLogin && await router.push({ name:"Login",query:{ tenantId:tenantId }})
-      }else{
-        // update-begin-author:sunjianlei date:20230306 for: 修复登录成功后,没有正确重定向的问题
-        goLogin && (await router.push({
-          path: PageEnum.BASE_LOGIN,
-          query: {
-            // 传入当前的路由,登录成功后跳转到当前路由
-            redirect: router.currentRoute.value.fullPath,
-          }
-        }));
-        // update-end-author:sunjianlei date:20230306 for: 修复登录成功后,没有正确重定向的问题
+      // if(isOAuth2AppEnv()){
+      //   let tenantId = getAuthCache(OAUTH2_THIRD_LOGIN_TENANT_ID);
+      //   removeAuthCache(OAUTH2_THIRD_LOGIN_TENANT_ID);
+      //   goLogin && await router.push({ name:"Login",query:{ tenantId:tenantId }})
+      // }else{
+      //   // update-begin-author:sunjianlei date:20230306 for: 修复登录成功后,没有正确重定向的问题
+      //   goLogin && (await router.push({
+      //     path: PageEnum.BASE_LOGIN,
+      //     query: {
+      //       // 传入当前的路由,登录成功后跳转到当前路由
+      //       redirect: router.currentRoute.value.fullPath,
+      //     }
+      //   }));
+      //   // update-end-author:sunjianlei date:20230306 for: 修复登录成功后,没有正确重定向的问题
 
-      }
+      // }
+      goLogin &&
+      (await router.push({
+        path: PageEnum.BASE_LOGIN,
+        query: {
+          // 传入当前的路由,登录成功后跳转到当前路由
+          redirect: router.currentRoute.value.fullPath,
+        },
+      }));
       //update-end---author:wangshuai ---date:20230224  for:[QQYUN-3440]新建企业微信和钉钉配置表,通过租户模式隔离------------
     },
     /**

+ 8 - 7
src/views/vent/monitorManager/fanLocalMonitor/index.vue

@@ -40,11 +40,10 @@
   <div class="scene-box">
     <div class="top-box" v-if="!loading">
       <div class="top-center row">
-        <div class="vent-flex-row" id="fanLocalSelectDom">
+        <div class="vent-flex-row" id="fanLocalSelectDom" v-if="getDictItemsByCode('fanlocaltype')">
           <span style="color: #00f5fe; margin-left: 5px;">风机类型:</span>
           <JDictSelectTag v-model:value="devicekide" placeholder="请选择性别" dictCode="fanlocaltype" :getPopupContainer="getPopupContainer" @change="changeDeviceKind" />
         </div>
-
         <div class="button-box" v-for="(item, index) in modalTypeArr.leftBtnArr" :key="index" @click="showModal(item)">{{ item.value }}</div>
       </div>
       <div class="top-right row">
@@ -212,17 +211,17 @@
           </a-tab-pane>
           <a-tab-pane key="3" tab="历史数据">
             <div class="tab-item" v-if="activeKey === '3'">
-              <HistoryTable columns-type="fanlocal" device-type="fanlocal" :device-list-api="baseList" designScope="fanlocal-history" :scroll="scroll" />
+              <HistoryTable :columns-type="`${selectData.deviceType}`" :device-type="`${devicekide}`" :device-list-api="baseList" designScope="fanlocal-history" :scroll="scroll" />
             </div>
           </a-tab-pane>
           <a-tab-pane key="4" tab="报警历史">
             <div class="tab-item" v-if="activeKey === '4'">
-              <AlarmHistoryTable columns-type="alarm" device-type="fanlocal" :device-list-api="baseList" designScope="alarm-history" :scroll="scroll" />
+              <AlarmHistoryTable columns-type="alarm" :device-type="`${devicekide}`" :device-list-api="baseList" designScope="alarm-history" :scroll="scroll" />
             </div>
           </a-tab-pane>
           <a-tab-pane key="5" tab="操作历史">
             <div class="tab-item" v-if="activeKey === '5'">
-              <HandlerHistoryTable columns-type="operator_history" device-type="fanlocal" :device-list-api="baseList" designScope="alarm-history" :scroll="scroll" />
+              <HandlerHistoryTable columns-type="operator_history" :device-type="`${devicekide}`" :device-list-api="baseList" designScope="alarm-history" :scroll="scroll" />
             </div>
           </a-tab-pane>
         </a-tabs>
@@ -343,6 +342,7 @@
   import type { BasicColumn } from '/@/components/Table/src/types/table';
   import JDictSelectTag from '/@/components/Form/src/jeecg/components/JDictSelectTag.vue';
   import { getPopupContainer } from '/@/utils';
+  import { getDictItemsByCode } from '/@/utils/dict';
 
   const globalConfig = inject('globalConfig');
 
@@ -507,6 +507,7 @@
     devicekide.value = e
     loading.value = true
     nextTick( () => {
+      selectRowIndex.value = 0
       Object.assign(selectData, {})
       loading.value = false
     })
@@ -814,7 +815,7 @@
     padding: 10px 5px;
     color: #ffffff;
     z-index: 999;
-    top: 70px;
+    top: 60px;
     .data-item {
       pointer-events: auto;
       .item-header {
@@ -868,7 +869,7 @@
           padding: 10px 0;
           min-height: 432px;
           background: linear-gradient(to right, #00deff22, #2081ff05);
-          max-height: 450px;
+          max-height: 440px;
           overflow-y: auto;
         }
         .container-group-l {