|
|
@@ -9,7 +9,7 @@
|
|
|
</div>
|
|
|
<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">
|
|
|
- <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" v-if="childItem.name!='企业管理' && childItem.name!='审批中心'" @click="handleSelect(childItem)"
|
|
|
@mouseover="showContent = index" @mouseleave="showContent = null" v-loading.fullscreen.lock="fullscreenLoading">
|
|
|
<svg-icon :icon-class="childItem.icon" style="width: 40px;height: 40px" />
|
|
|
{{ childItem.name }}
|
|
|
@@ -140,66 +140,11 @@ export default {
|
|
|
this.$router.push({ path: key });
|
|
|
}else{
|
|
|
this.fullscreenLoading = true;
|
|
|
- // getListByMenuId(item.id).then(response => {
|
|
|
- // let menuList =response.data;
|
|
|
- const menu = [
|
|
|
- {
|
|
|
- "id": 1,
|
|
|
- "parentId": 0,
|
|
|
- "name": "会议室管理",
|
|
|
- "path": "/meeting",
|
|
|
- "component": null,
|
|
|
- "componentName": null,
|
|
|
- "icon": "ep:tools",
|
|
|
- "visible": true,
|
|
|
- "keepAlive": true,
|
|
|
- "alwaysShow": true,
|
|
|
- "children": [
|
|
|
- {
|
|
|
- "id": 109,
|
|
|
- "parentId": 1,
|
|
|
- "name": "会议室列表",
|
|
|
- "path": "list",
|
|
|
- "component": "meeting/list/index",
|
|
|
- "componentName": "MeetingList",
|
|
|
- "icon": "ep:document-copy",
|
|
|
- "visible": true,
|
|
|
- "keepAlive": true,
|
|
|
- "alwaysShow": true,
|
|
|
- "children": null
|
|
|
- },
|
|
|
- {
|
|
|
- "id": 108,
|
|
|
- "parentId": 1,
|
|
|
- "name": "预定列表",
|
|
|
- "path": "reserveList",
|
|
|
- "component": "meeting/reserveList/index",
|
|
|
- "componentName": "MeetingReserveList",
|
|
|
- "icon": "ep:document-copy",
|
|
|
- "visible": true,
|
|
|
- "keepAlive": true,
|
|
|
- "alwaysShow": true,
|
|
|
- "children": null
|
|
|
- },
|
|
|
- {
|
|
|
- "id": 108,
|
|
|
- "parentId": 1,
|
|
|
- "name": "预定情况",
|
|
|
- "path": "reserve",
|
|
|
- "component": "meeting/reserve/index",
|
|
|
- "componentName": "MeetingReserve",
|
|
|
- "icon": "ep:document-copy",
|
|
|
- "visible": true,
|
|
|
- "keepAlive": true,
|
|
|
- "alwaysShow": true,
|
|
|
- "children": null
|
|
|
- },
|
|
|
- ]
|
|
|
- }
|
|
|
- ]
|
|
|
- localStorage.setItem("parentId", 0)
|
|
|
- localStorage.setItem("menus", JSON.stringify(menu))
|
|
|
- store.dispatch('GenerateRoutes', menu).then(accessRoutes => {
|
|
|
+ getListByMenuId(item.id).then(response => {
|
|
|
+ let menuList =response.data;
|
|
|
+ localStorage.setItem("parentId", item.parentId)
|
|
|
+ localStorage.setItem("menus", JSON.stringify(menuList))
|
|
|
+ store.dispatch('GenerateRoutes', menuList).then(accessRoutes => {
|
|
|
console.log(accessRoutes);
|
|
|
// 根据 roles 权限生成可访问的路由表
|
|
|
router.addRoutes(accessRoutes) // 动态添加可访问路由表
|
|
|
@@ -208,7 +153,7 @@ export default {
|
|
|
this.fullscreenLoading = false;
|
|
|
this.$router.push({ path: item.component });
|
|
|
}, 200);
|
|
|
- // });
|
|
|
+ });
|
|
|
}
|
|
|
|
|
|
},
|