Browse Source

fix: change door

DESKTOP-USV654P\pc 2 months ago
parent
commit
f034892e75
3 changed files with 31 additions and 26 deletions
  1. 1 1
      Makefile
  2. 15 10
      src/views/sys/door/components/serviceCenter/index.vue
  3. 15 15
      src/views/sys/door/index.vue

+ 1 - 1
Makefile

@@ -12,7 +12,7 @@ build:
 
 commit:
 	git add . && \
-	git commit --no-verify -m "fix: change examineManager quantizationExamine"
+	git commit --no-verify -m "fix: change door"
 
 checkPre:
 	git checkout pre

+ 15 - 10
src/views/sys/door/components/serviceCenter/index.vue

@@ -8,13 +8,14 @@
   import Pinyin from 'js-pinyin';
   import { Icon, SvgIcon } from '/@/components/Icon';
   import { cloneDeep, groupBy } from 'lodash-es';
-  import { isEmpty } from '/@/utils/is';
+  import { isEmpty, isUrl } from '/@/utils/is';
   import { requestMagicApi } from '/@/api/magicApi';
   import {
     deleteSystemSystemMenuCommonlyUsed,
     getSystemMenuCommonlyUsedNopage,
     postSystemSystemMenuCommonlyUsed,
   } from '/@/services/apis/SystemMenuCommonlyUsedController';
+  import { openWindow } from '/@/utils';
 
   Pinyin.setOptions({ charCase: 1 });
 
@@ -78,7 +79,7 @@
 
   const getDeptData = async () => {
     state.deptList.push('全部');
-    const data = await requestMagicApi({ url: 'baseData/department/option' });
+    const data = await requestMagicApi({ url: 'baseData/department/option' } as any);
     data &&
       data.forEach((item) => {
         state.deptList.push(item.label);
@@ -141,14 +142,18 @@
   const router = useRouter();
   const handleGotoSystem = (item) => {
     if (item.authorized === 1) {
-      permissionStore.setSubSystem(item.systemId);
-      // 写入localStorage
-      sessionStorage.setItem('subSystem', item.systemId);
-      // 新窗口打开
-      const routerData = router.resolve({
-        path: item.path,
-      });
-      window.open(routerData.href, '_blank');
+      if (isUrl(item.path)) {
+        openWindow(item.path, { target: '_blank' });
+      } else {
+        permissionStore.setSubSystem(item.systemId);
+        // 写入localStorage
+        sessionStorage.setItem('subSystem', item.systemId);
+        // 新窗口打开
+        const routerData = router.resolve({
+          path: item.path,
+        });
+        window.open(routerData.href, '_blank');
+      }
     }
   };
 

+ 15 - 15
src/views/sys/door/index.vue

@@ -11,6 +11,8 @@
   import homeNume2 from '/@/assets/images/home-nume-2.png';
   import homeNume3 from '/@/assets/images/home-nume-3.png';
   import homeNume4 from '/@/assets/images/home-nume-4.png';
+  import { openWindow } from '/@/utils';
+  import { isUrl } from '/@/utils/is';
 
   const { getHeaderTheme } = useHeaderSetting();
   const go = useGo();
@@ -28,7 +30,11 @@
   });
 
   function handleMenuClick(path: string) {
-    go(path);
+    if (isUrl(path)) {
+      openWindow(path, { target: '_blank' });
+    } else {
+      go(path);
+    }
   }
 
   const MenuList = ref<any[]>([
@@ -79,7 +85,7 @@
   <div class="door-home">
     <div class="door-home-header fullwidth">
       <div class="door-home-header-logo">
-        <img src="../../../assets/images/login-logo.png" style="object-fit: contain;" alt="" />
+        <img src="../../../assets/images/login-logo.png" style="object-fit: contain" alt="" />
       </div>
       <div class="door-home-header-body">
         <SystemMessage />
@@ -88,22 +94,20 @@
     </div>
     <div class="door-home-root">
       <div class="flex items-center fullwidth justify-between h-full">
-        <div class="door-home-root-header">
-          您好!欢迎使用铜梁职业教育中心智慧校园平台~
-        </div>
+        <div class="door-home-root-header"> 您好!欢迎使用铜梁职业教育中心智慧校园平台~ </div>
         <div class="door-home-root-menu">
           <div class="door-home-root-menu-item" v-for="item in MenuList" :key="item.key">
             <div v-if="currentPath.startsWith(item.path)" class="door-home-root-menu-item-active">
             </div>
             <div class="door-home-root-menu-item-body" @click="handleMenuClick(item.path)">
-              <img :src="item.icon" style="width: 20px; height: 20px;" />
-              <div style="margin-left: 8px;"> {{ item.title }}</div>
+              <img :src="item.icon" style="width: 20px; height: 20px" />
+              <div style="margin-left: 8px"> {{ item.title }}</div>
             </div>
           </div>
         </div>
       </div>
     </div>
-    <div class="door-home-body mb-4" style="min-height: 700px;">
+    <div class="door-home-body mb-4" style="min-height: 700px">
       <div class="fullwidth">
         <RouterView />
       </div>
@@ -111,7 +115,7 @@
     <div class="door-home-footer">
       <div class="flex items-center flex-1 justify-center">
         <span>主办单位:重庆市铜梁职业教育中心</span>
-        <span style="margin-left: 12px;">
+        <span style="margin-left: 12px">
           技术支持:中国电信股份有限公司铜梁分公司 重庆瑞研信息科技有限公司
         </span>
       </div>
@@ -128,9 +132,7 @@
         <template v-if="widgetsType === 1">
           <div class="fixed-widgets-item-active-header">扫码关注</div>
           <div class="fixed-widgets-item-active-body">
-            <div class="fixed-widgets-item-active-body-header">
-              微信公众号
-            </div>
+            <div class="fixed-widgets-item-active-body-header"> 微信公众号 </div>
             <div class="fixed-widgets-item-active-body-body">
               <img src="../../../assets/images/qrcode.jpg" />
             </div>
@@ -152,9 +154,7 @@
         <template v-if="widgetsType === 2">
           <div class="fixed-widgets-item-active-header">扫码使用</div>
           <div class="fixed-widgets-item-active-body">
-            <div class="fixed-widgets-item-active-body-header">
-              微信小程序
-            </div>
+            <div class="fixed-widgets-item-active-body-header"> 微信小程序 </div>
             <div class="fixed-widgets-item-active-body-body">
               <img src="../../../assets/images/gh_qrcode.jpg" />
             </div>