module-menu-vue 0.0.61 → 0.0.63
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -101,7 +101,14 @@ export default {
|
|
|
101
101
|
if (rsp.data.data) {
|
|
102
102
|
const pathList = routesList.map(item => {
|
|
103
103
|
if (item.path.indexOf('appSystem') !== -1) {
|
|
104
|
-
|
|
104
|
+
let appSysMenuList = []
|
|
105
|
+
let appSysNameList = []
|
|
106
|
+
item.routes.forEach(obj => {
|
|
107
|
+
appSysMenuList.push(obj.path.indexOf('/') === -1 ? '/' + obj.path : obj.path)
|
|
108
|
+
appSysNameList.push(obj.name)
|
|
109
|
+
}) || []
|
|
110
|
+
localStorage.setItem('appSysMenuList', JSON.stringify(appSysMenuList))
|
|
111
|
+
localStorage.setItem('appSysNameList', JSON.stringify(appSysNameList))
|
|
105
112
|
}
|
|
106
113
|
return {
|
|
107
114
|
...item,
|
|
@@ -32,6 +32,7 @@ import Axios from '../Util/axios.js'
|
|
|
32
32
|
import { userMenuIcon } from './constant.js'
|
|
33
33
|
import { getUserName } from './../Util/userInfo.js'
|
|
34
34
|
import { integrationLogout } from './service.js'
|
|
35
|
+
import {getMenuList} from '../Menu/service.js'
|
|
35
36
|
export default {
|
|
36
37
|
name: 'UserInfo',
|
|
37
38
|
data () {
|
|
@@ -42,6 +43,7 @@ export default {
|
|
|
42
43
|
SystemManageSrc: userMenuIcon.SystemManageSrc,
|
|
43
44
|
appSystemSrc: userMenuIcon.appSystemSrc,
|
|
44
45
|
LogoutSrc: userMenuIcon.LogoutSrc,
|
|
46
|
+
isShowApp: false
|
|
45
47
|
}
|
|
46
48
|
},
|
|
47
49
|
computed: {
|
|
@@ -49,10 +51,6 @@ export default {
|
|
|
49
51
|
isShowSys () {
|
|
50
52
|
return this.stash === "integration" ? true : this.sysName !== 'admin' && this.isHaveSystemManagementPermission
|
|
51
53
|
},
|
|
52
|
-
isShowApp() {
|
|
53
|
-
const flag = localStorage.getItem('isShowApp') === 'true'
|
|
54
|
-
return this.stash === 'integration' ? flag : false
|
|
55
|
-
},
|
|
56
54
|
},
|
|
57
55
|
props: {
|
|
58
56
|
sysName: {
|
|
@@ -64,7 +62,26 @@ export default {
|
|
|
64
62
|
default: ''
|
|
65
63
|
}
|
|
66
64
|
},
|
|
65
|
+
created() {
|
|
66
|
+
if (this.stash === 'integration') {
|
|
67
|
+
this.isShowAppFunc()
|
|
68
|
+
}
|
|
69
|
+
},
|
|
67
70
|
methods: {
|
|
71
|
+
async isShowAppFunc() {
|
|
72
|
+
const rsp = await getMenuList()
|
|
73
|
+
const rspData = rsp.data.data
|
|
74
|
+
if (rspData && rspData.length > 0) {
|
|
75
|
+
const routesList = rspData[0].routes
|
|
76
|
+
if (routesList) {
|
|
77
|
+
routesList.forEach(item => {
|
|
78
|
+
if (item.path.indexOf('appSystem') !== -1) {
|
|
79
|
+
this.isShowApp = true
|
|
80
|
+
}
|
|
81
|
+
})
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
},
|
|
68
85
|
handleClickmenu (flag){
|
|
69
86
|
let url = ''
|
|
70
87
|
if (flag === 'single') {
|