sunlupeng 1 年之前
父節點
當前提交
0a4380a515
共有 3 個文件被更改,包括 11 次插入3 次删除
  1. 4 1
      src/components/AppList/index.vue
  2. 4 1
      src/layout/components/Homebar.vue
  3. 3 1
      src/layout/components/Navbar.vue

+ 4 - 1
src/components/AppList/index.vue

@@ -10,7 +10,7 @@
         <el-tabs v-model="activeName" @tab-click="handleClick">
         <el-tabs v-model="activeName" @tab-click="handleClick">
           <el-tab-pane v-for="item, index in appList" :label="item.name" :name="item.name" :key="index">
           <el-tab-pane v-for="item, index in appList" :label="item.name" :name="item.name" :key="index">
             <div class="app-item" v-for="(childItem, index) in item.children" :key="index" @click="handleSelect(childItem)"
             <div class="app-item" v-for="(childItem, index) in item.children" :key="index" @click="handleSelect(childItem)"
-              @mouseover="showContent = index" @mouseleave="showContent = null">
+              @mouseover="showContent = index" @mouseleave="showContent = null" v-loading.fullscreen.lock="fullscreenLoading">
               <svg-icon :icon-class="childItem.icon" style="width: 40px;height: 40px" />
               <svg-icon :icon-class="childItem.icon" style="width: 40px;height: 40px" />
               {{ childItem.name }}
               {{ childItem.name }}
               <div v-if="showContent == index" class="app-item-tools">
               <div v-if="showContent == index" class="app-item-tools">
@@ -31,6 +31,7 @@ import store from '@/store'
 export default {
 export default {
   data() {
   data() {
     return {
     return {
+      fullscreenLoading:false,
       activeName: 'OA',
       activeName: 'OA',
       showContent: null,
       showContent: null,
       appList: [
       appList: [
@@ -132,6 +133,7 @@ export default {
       }else if(item.path.indexOf('oa') > -1){
       }else if(item.path.indexOf('oa') > -1){
         this.$router.push({ path: key });
         this.$router.push({ path: key });
       }else{
       }else{
+        this.fullscreenLoading = true;
         getListByMenuId(item.id).then(response => {
         getListByMenuId(item.id).then(response => {
           let menuList =response.data;
           let menuList =response.data;
           localStorage.setItem("parentId", item.parentId)
           localStorage.setItem("parentId", item.parentId)
@@ -142,6 +144,7 @@ export default {
               router.addRoutes(accessRoutes) // 动态添加可访问路由表
               router.addRoutes(accessRoutes) // 动态添加可访问路由表
             })
             })
             setTimeout(() => {
             setTimeout(() => {
+              this.fullscreenLoading = false;
               this.$router.push({ path: item.component });
               this.$router.push({ path: item.component });
             }, 200);
             }, 200);
         });
         });

+ 4 - 1
src/layout/components/Homebar.vue

@@ -47,7 +47,7 @@
           <router-link to="/user/profile">
           <router-link to="/user/profile">
             <el-dropdown-item>个人中心</el-dropdown-item>
             <el-dropdown-item>个人中心</el-dropdown-item>
           </router-link>
           </router-link>
-          <el-dropdown-item @click.native="companySetting()">
+          <el-dropdown-item @click.native="companySetting()" v-loading.fullscreen.lock="fullscreenLoading">
             <span>企业管理</span>
             <span>企业管理</span>
           </el-dropdown-item>
           </el-dropdown-item>
           <el-dropdown-item divided @click.native="logout">
           <el-dropdown-item divided @click.native="logout">
@@ -79,6 +79,7 @@ import {getListByMenuId} from "@/api/home";
 export default {
 export default {
   data() {
   data() {
     return {
     return {
+      fullscreenLoading:false,
       logo: logoImg
       logo: logoImg
     }
     }
   },
   },
@@ -134,6 +135,7 @@ export default {
         parentId: 5,
         parentId: 5,
         path: "/system/companyInfo",
         path: "/system/companyInfo",
       }
       }
+      this.fullscreenLoading = true;
       getListByMenuId(item.id).then(response => {
       getListByMenuId(item.id).then(response => {
         let menuList = response.data;
         let menuList = response.data;
         const menus = [
         const menus = [
@@ -239,6 +241,7 @@ export default {
           router.addRoutes(accessRoutes) // 动态添加可访问路由表
           router.addRoutes(accessRoutes) // 动态添加可访问路由表
         })
         })
         setTimeout(() => {
         setTimeout(() => {
+          this.fullscreenLoading = false;
           this.$router.push({ path: item.path });
           this.$router.push({ path: item.path });
         }, 200);
         }, 200);
       });
       });

+ 3 - 1
src/layout/components/Navbar.vue

@@ -49,7 +49,7 @@
           <router-link to="/user/profile">
           <router-link to="/user/profile">
             <el-dropdown-item>个人中心</el-dropdown-item>
             <el-dropdown-item>个人中心</el-dropdown-item>
           </router-link>
           </router-link>
-          <el-dropdown-item @click.native="companySetting()">
+          <el-dropdown-item @click.native="companySetting()" v-loading.fullscreen.lock="fullscreenLoading">
             <span>企业管理</span>
             <span>企业管理</span>
           </el-dropdown-item>
           </el-dropdown-item>
           <el-dropdown-item divided @click.native="logout">
           <el-dropdown-item divided @click.native="logout">
@@ -127,6 +127,7 @@ export default {
         parentId: 5,
         parentId: 5,
         path: "/system/companyInfo",
         path: "/system/companyInfo",
       }
       }
+      this.fullscreenLoading = true;
       getListByMenuId(item.id).then(response => {
       getListByMenuId(item.id).then(response => {
         let menuList = response.data;
         let menuList = response.data;
         const menus = [
         const menus = [
@@ -232,6 +233,7 @@ export default {
           router.addRoutes(accessRoutes) // 动态添加可访问路由表
           router.addRoutes(accessRoutes) // 动态添加可访问路由表
         })
         })
         setTimeout(() => {
         setTimeout(() => {
+          this.fullscreenLoading = false;
           this.$router.push({ path: item.path });
           this.$router.push({ path: item.path });
         }, 200);
         }, 200);
       });
       });