浏览代码

顶部导航按需加载

jbb 2 年之前
父节点
当前提交
09c74e7ec1
共有 2 个文件被更改,包括 12 次插入5 次删除
  1. 7 3
      src/components/page/GlobalHeader.vue
  2. 5 2
      src/components/tools/UserMenu.vue

+ 7 - 3
src/components/page/GlobalHeader.vue

@@ -24,8 +24,8 @@
         <!-- Jeecg-Boot -->
         <!-- Jeecg-Boot -->
       </span>
       </span>
 
 
-      <user-menu :theme="theme" />
-      <a href="http://220.191.168.86:18002/dashboard/analysis"  target="_top" style="color:white;float: right;">切换单证系统</a>
+      <user-menu :theme="theme" :showSwitch='showSwitch'/>
+      <a href="http://220.191.168.86:18002/dashboard/analysis"  target="_top" style="color:white;float: right;" v-if="showSwitch =='森语'">切换单证系统</a>
 
 
     </div>
     </div>
     <!-- 顶部导航栏模式 -->
     <!-- 顶部导航栏模式 -->
@@ -49,7 +49,7 @@
 import UserMenu from '../tools/UserMenu'
 import UserMenu from '../tools/UserMenu'
 import SMenu from '../menu/'
 import SMenu from '../menu/'
 import Logo from '../tools/Logo'
 import Logo from '../tools/Logo'
-
+import {getProjctName}from '../../../url.config'
 import { mixin } from '@/utils/mixin.js'
 import { mixin } from '@/utils/mixin.js'
 
 
 export default {
 export default {
@@ -89,6 +89,7 @@ export default {
     data () {
     data () {
         return {
         return {
             headerBarFixed: false,
             headerBarFixed: false,
+            showSwitch:'森语',
             // update-begin--author:sunjianlei---date:20190508------for: 顶部导航栏过长时显示更多按钮-----
             // update-begin--author:sunjianlei---date:20190508------for: 顶部导航栏过长时显示更多按钮-----
             topMenuStyle: {
             topMenuStyle: {
                 headerIndexLeft: {},
                 headerIndexLeft: {},
@@ -119,6 +120,9 @@ export default {
         if (this.mode === 'topmenu') {
         if (this.mode === 'topmenu') {
             this.buildTopMenuStyle()
             this.buildTopMenuStyle()
         }
         }
+        if(getProjctName() =='技能博物馆'){
+          this.showSwitch='技能'
+        }
     // update-end--author:sunjianlei---date:20190508------for: 顶部导航栏过长时显示更多按钮-----
     // update-end--author:sunjianlei---date:20190508------for: 顶部导航栏过长时显示更多按钮-----
     },
     },
     methods: {
     methods: {

+ 5 - 2
src/components/tools/UserMenu.vue

@@ -2,7 +2,7 @@
   <div class="user-wrapper" :class="theme">
   <div class="user-wrapper" :class="theme">
     <!-- update_begin author:zhaoxin date:20191129 for: 做头部菜单栏导航 -->
     <!-- update_begin author:zhaoxin date:20191129 for: 做头部菜单栏导航 -->
     <!-- update-begin author:sunjianlei date:20191@20 for: 解决全局样式冲突的问题 -->
     <!-- update-begin author:sunjianlei date:20191@20 for: 解决全局样式冲突的问题 -->
-    <span class="action" @click="showClick">
+    <span class="action" @click="showClick" v-if="showSwitch=='森语'">
       <a-icon type="search"></a-icon>
       <a-icon type="search"></a-icon>
     </span>
     </span>
     <!-- update-begin author:sunjianlei date:20200219 for: 菜单搜索改为动态组件,在手机端呈现出弹出框 -->
     <!-- update-begin author:sunjianlei date:20200219 for: 菜单搜索改为动态组件,在手机端呈现出弹出框 -->
@@ -31,7 +31,7 @@
         <a-icon type="question-circle-o"></a-icon>
         <a-icon type="question-circle-o"></a-icon>
       </a>
       </a>
     </span>-->
     </span>-->
-    <header-notice class="action"/>
+    <header-notice class="action" v-if="showSwitch=='森语'"/>
     <a-dropdown>
     <a-dropdown>
       <span class="action action-full ant-dropdown-link user-dropdown-menu">
       <span class="action action-full ant-dropdown-link user-dropdown-menu">
         <a-avatar class="avatar" size="small" :src="getAvatar()"/>
         <a-avatar class="avatar" size="small" :src="getAvatar()"/>
@@ -118,6 +118,9 @@
         type: String,
         type: String,
         required: false,
         required: false,
         default: 'dark'
         default: 'dark'
+      },
+      showSwitch: {
+        type: String,
       }
       }
     },
     },
     /* update_begin author:zhaoxin date:20191129 for: 做头部菜单栏导航*/
     /* update_begin author:zhaoxin date:20191129 for: 做头部菜单栏导航*/