zhuzhuanzhuan
2024-03-20 7036cc397adccb4907b80a30143f7751b4e68db8
src/components/page/GlobalLayout.vue
@@ -69,7 +69,8 @@
      />
      <!-- layout content -->
      <a-layout-content :style="{ height: '100%', paddingTop: fixedHeader ? '59px' : '0' }">
      <a-layout-content
        :style="{ height: '100%', paddingTop: fixedHeader ? '59px' : '0' ,background: $route.meta.title=='首页'?'#0F103A':''}">
        <slot></slot>
      </a-layout-content>
@@ -102,7 +103,7 @@
    components: {
      SideMenu,
      GlobalHeader,
      GlobalFooter,
      GlobalFooter
      // update-start---- author:os_chengtgen -- date:20190830 --  for:issues/463 -编译主题颜色已生效,但还一直转圈,显示主题 正在编译 ------
      // // SettingDrawer
      // 注释这个因为在个人设置模块已经加载了SettingDrawer页面
@@ -113,7 +114,7 @@
    data() {
      return {
        collapsed: false,
        activeMenu:{},
        activeMenu: {},
        menus: []
      }
    },
@@ -136,7 +137,7 @@
      this.menus = this.permissionMenuList
      //--update-begin----author:liusq---date:20210223------for:关于测边菜单遮挡内容问题详细说明 #2255
      this.collapsed=!this.sidebarOpened;
      this.collapsed = !this.sidebarOpened
      //--update-begin----author:liusq---date:20210223------for:关于测边菜单遮挡内容问题详细说明 #2255
      // 根据后台配置菜单,重新排序加载路由信息
@@ -159,17 +160,17 @@
        }
      },
      //update-begin-author:taoyan date:20190430 for:动态路由title显示配置的菜单title而不是其对应路由的title
      myMenuSelect(value){
      myMenuSelect(value) {
        //此处触发动态路由被点击事件
        this.findMenuBykey(this.menus,value.key)
        this.$emit("dynamicRouterShow",value.key,this.activeMenu.meta.title)
        this.findMenuBykey(this.menus, value.key)
        this.$emit('dynamicRouterShow', value.key, this.activeMenu.meta.title)
      },
      findMenuBykey(menus,key){
        for(let i of menus){
          if(i.path==key){
            this.activeMenu = {...i}
          }else if(i.children && i.children.length>0){
            this.findMenuBykey(i.children,key)
      findMenuBykey(menus, key) {
        for (let i of menus) {
          if (i.path == key) {
            this.activeMenu = { ...i }
          } else if (i.children && i.children.length > 0) {
            this.findMenuBykey(i.children, key)
          }
        }
      },
@@ -180,7 +181,7 @@
        this.findMenuBykey(this.menus, value.path)
        this.activeMenu.meta.title = value.meta.title
        this.$emit('dynamicRouterShow', value.path, this.activeMenu.meta.title)
      },
      }
      // update-end-author:sunjianlei date:20210409 for: 修复动态功能测试菜单、带参数菜单标题错误、展开错误的问题
    }