module-menu-vue 0.2.2 → 0.2.3-dev-hubjt.2

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.
Files changed (64) hide show
  1. package/README.md +24 -24
  2. package/babel.config.js +5 -5
  3. package/index.js +4 -4
  4. package/jsconfig.json +19 -19
  5. package/package.json +48 -48
  6. package/public/index.html +14 -14
  7. package/src/App.vue +29 -29
  8. package/src/assets/admin_logo.svg +48 -48
  9. package/src/assets/admin_slogo.svg +48 -48
  10. package/src/assets/alert_logo.svg +26 -26
  11. package/src/assets/alert_slogo.svg +26 -26
  12. package/src/assets/childIcon.svg +10 -10
  13. package/src/assets/dataManager_logo.svg +42 -42
  14. package/src/assets/dataanalytic_logo.svg +44 -44
  15. package/src/assets/dataanalytic_slogo.svg +47 -47
  16. package/src/assets/dataasset_logo.svg +52 -52
  17. package/src/assets/dataasset_slogo.svg +52 -52
  18. package/src/assets/datacollection_logo.svg +70 -70
  19. package/src/assets/datacollection_slogo.svg +70 -70
  20. package/src/assets/datadev_logo.svg +26 -26
  21. package/src/assets/datadev_slogo.svg +26 -26
  22. package/src/assets/datalabel_logo.svg +26 -26
  23. package/src/assets/datalabel_slogo.svg +26 -26
  24. package/src/assets/datamanager_slogo.svg +42 -42
  25. package/src/assets/dataservice_logo.svg +209 -209
  26. package/src/assets/dataservice_slogo.svg +209 -209
  27. package/src/assets/datasharing_logo.svg +28 -28
  28. package/src/assets/datasharing_slogo.svg +28 -28
  29. package/src/assets/exchange_portal_logo.svg +9 -9
  30. package/src/assets/home.svg +12 -12
  31. package/src/assets/ic_gonggongmokuai_m.svg +5 -5
  32. package/src/assets/ic_shujuhuiju_m.svg +5 -5
  33. package/src/assets/ic_shujukaifa_m.svg +15 -15
  34. package/src/assets/ic_shujukaifang_m.svg +5 -5
  35. package/src/assets/ic_shujuyingyong_m.svg +5 -5
  36. package/src/assets/ic_shujuzhili_m.svg +5 -5
  37. package/src/assets/metadata_logo.svg +25 -25
  38. package/src/assets/metadata_slogo.svg +25 -25
  39. package/src/assets/module.svg +12 -12
  40. package/src/assets/operate_logo.svg +63 -63
  41. package/src/assets/operate_slogo.svg +63 -63
  42. package/src/assets/personalCenter.svg +15 -15
  43. package/src/assets/quality_logo.svg +26 -26
  44. package/src/assets/quality_slogo.svg +26 -26
  45. package/src/assets/systemManage.svg +15 -15
  46. package/src/assets/wordorder_logo.svg +57 -57
  47. package/src/assets/workorder_slogo.svg +54 -54
  48. package/src/components/Menu/ModuleMenu.vue +322 -321
  49. package/src/components/Menu/constant copy.js +536 -0
  50. package/src/components/Menu/constant.js +553 -536
  51. package/src/components/Menu/menu.css +106 -106
  52. package/src/components/Menu/service.js +25 -25
  53. package/src/components/Portal/PortalBtn.vue +30 -30
  54. package/src/components/Tenant/TenantList.vue +74 -74
  55. package/src/components/Tenant/service.js +17 -17
  56. package/src/components/User/UserInfo.vue +213 -213
  57. package/src/components/User/constant.js +11 -11
  58. package/src/components/User/service.js +14 -14
  59. package/src/components/Util/axios.js +89 -89
  60. package/src/components/Util/config.js +13 -13
  61. package/src/components/Util/permessionUtils.js +25 -25
  62. package/src/components/Util/userInfo.js +96 -96
  63. package/src/main.js +11 -11
  64. package/vue.config.js +34 -34
@@ -1,214 +1,214 @@
1
- <template>
2
- <div className="right">
3
- <el-dropdown v-show="getName()" @command="handleClickmenu">
4
- <span class="el-dropdown-link">
5
- <img src="../../assets/userLogo.svg" style="vertical-align:middle;padding-right:10px"/>
6
- <span :style="{color: stash === 'LNRD' || stash === 'HBJK' ? '#fff' : '#000000d9'}">{{getName()}}</span>
7
- <i :style="{color: stash === 'HBJK' ? '#fff' : '#000000d9'}" class="el-icon-arrow-down el-icon--right"></i>
8
- </span>
9
- <el-dropdown-menu slot="dropdown">
10
- <el-dropdown-item command="single">
11
- <img :src="PersonalCenterSrc" alt="" class="menuItem" />
12
- <span>{{["integration", 'LNRD', 'HBJK'].includes(stash) ? '用户中心' : '个人中心'}}</span>
13
- </el-dropdown-item>
14
- <el-dropdown-item v-show="isShowSys" command="systerm">
15
- <img :src="SystemManageSrc" alt="" class="menuItem" />
16
- <span>系统管理</span>
17
- </el-dropdown-item>
18
- <el-dropdown-item v-show="isShowApp" command="app">
19
- <img :src="appSystemSrc" alt="" class="menuItem" />
20
- <span>应用系统配置</span>
21
- </el-dropdown-item>
22
- <el-dropdown-item command="logout">
23
- <img :src="LogoutSrc" alt="" class="menuItem" />
24
- <span>退出登录</span>
25
- </el-dropdown-item>
26
- </el-dropdown-menu>
27
- </el-dropdown>
28
- </div>
29
- </template>
30
- <script>
31
- import Axios from '../Util/axios.js'
32
- import { userMenuIcon } from './constant.js'
33
- import { getUserName, getIsHaveSystemManagementPermissionFlag } from './../Util/userInfo.js'
34
- import { integrationLogout, getSysUrl } from './service.js'
35
- import {getMenuList} from '../Menu/service.js'
36
- export default {
37
- name: 'UserInfo',
38
- data () {
39
- return {
40
- isHaveSystemManagementPermission: getIsHaveSystemManagementPermissionFlag(),
41
- PersonalCenterSrc: userMenuIcon.PersonalCenterSrc,
42
- MessageCenterSrc: userMenuIcon.MessageCenterSrc,
43
- SystemManageSrc: userMenuIcon.SystemManageSrc,
44
- appSystemSrc: userMenuIcon.appSystemSrc,
45
- LogoutSrc: userMenuIcon.LogoutSrc,
46
- isShowApp: false
47
- }
48
- },
49
- computed: {
50
- // 是否显示系统管理菜单项
51
- isShowSys () {
52
- return ["integration", 'LNRD', 'HBJK'].includes(this.stash) ? true : this.sysName !== 'admin' && this.isHaveSystemManagementPermission
53
- },
54
- },
55
- props: {
56
- sysName: {
57
- type: String,
58
- default: 'admin'
59
- },
60
- stash: {
61
- type: String,
62
- default: ''
63
- }
64
- },
65
- created() {
66
- if (["integration", 'LNRD', 'HBJK'].includes(this.stash)) {
67
- this.isShowAppFunc()
68
- }
69
- if (this.stash === 'GZW') {
70
- sessionStorage.setItem('stash', 'GZW')
71
- } else if (this.stash === 'PANWEI') {
72
- sessionStorage.setItem('stash', 'PANWEI')
73
- } else {
74
- sessionStorage.removeItem('stash')
75
- }
76
- },
77
- methods: {
78
- async isShowAppFunc() {
79
- const rsp = await getMenuList()
80
- const rspData = rsp.data.data
81
- if (rspData && rspData.length > 0) {
82
- const routesList = rspData[0].routes
83
- if (routesList) {
84
- routesList.forEach(item => {
85
- if (item.path.indexOf('appSystem') !== -1) {
86
- this.isShowApp = true
87
- }
88
- })
89
- }
90
- }
91
- },
92
- handleClickmenu (flag){
93
- let url = ''
94
- if (flag === 'single') {
95
- if (["integration", 'LNRD', 'HBJK'].includes(this.stash)) {
96
- url = '/admin-ui/data-share-portal/personal/info'
97
- } else if (this.stash === "GZW") {
98
- url = '/data-platform/#/info/index'
99
- } else if (this.stash === "PANWEI") {
100
- url = '/bigdata-portal/#/info/index'
101
- } else {
102
- url = '/#/info/index'
103
- }
104
- location.href = url;
105
- } else if (flag === 'systerm') {
106
- if (["integration", 'LNRD', 'HBJK'].includes(this.stash)) {
107
- // 查询 系统管理 需要跳转的页面
108
- getSysUrl().then(rsp => {
109
- const data = rsp.data.data
110
- if (data) {
111
- location.href = '/admin-ui' + data.path
112
- }
113
- }).catch(e => {
114
- console.error('getSysUrl 接口异常: ', e)
115
- })
116
- } else {
117
- const menuObj = JSON.parse(sessionStorage.getItem('bigdata-menu'));
118
- let systemPath = ''
119
- if (menuObj) {
120
- menuObj.content.forEach(obj => {
121
- if (obj.name === '权限管理' && obj.children.length > 0) {
122
- systemPath = obj.children[0].path
123
- }
124
- })
125
- }
126
- if (this.sysName === 'admin') {
127
- let url = ''
128
- if (this.stash === "GZW") {
129
- url = `/data-platform/#${systemPath}`
130
- } else if (this.stash === 'PANWEI') {
131
- url = `/bigdata-portal/#${systemPath}`
132
- } else {
133
- url = `/#${systemPath}`
134
- }
135
- location.href = url
136
- }
137
- }
138
- } else if (flag === 'app') {
139
- url = '/dataadmin/#/appSystem/index'
140
- location.href = url;
141
- } else if (flag === 'logout') {
142
- this.logoutFunc()
143
- }
144
- },
145
- async logoutFunc () {
146
- console.log('开始调用退出接口...')
147
- if (["integration", 'LNRD', 'HBJK'].includes(this.stash)) {
148
- await integrationLogout();
149
- this.logoutUrl()
150
- } else {
151
- let url = ''
152
- if (["integration", 'LNRD', 'HBJK'].includes(this.stash)) {
153
- url = '/admin-ui/system/auth/logout'
154
- } else if (this.stash === 'GZW') {
155
- url = '/data-platform/auth/token/logout'
156
- } else {
157
- url = '/auth/token/logout'
158
- }
159
- const method = ["integration", 'LNRD', 'HBJK'].includes(this.stash) ? 'post' : 'delete'
160
- Axios(url, method).then(() => {
161
- this.logoutUrl();
162
- })
163
- .catch((err) => {
164
- console.log('err: ', err)
165
- });
166
- }
167
- },
168
- logoutUrl() {
169
- localStorage.clear();
170
- sessionStorage.clear();
171
- let url = ''
172
- if (["integration", 'LNRD', 'HBJK'].includes(this.stash)) {
173
- url = '/admin-ui/login'
174
- } else if (this.stash === 'GZW') {
175
- url = '/data-platform/#/login'
176
- } else if (this.stash === 'PANWEI') {
177
- url = '/bigdata-portal/#/login'
178
- } else {
179
- url = '/#/login'
180
- }
181
- location.href = url
182
- },
183
- getName () {
184
- return getUserName()
185
- },
186
- }
187
- }
188
- </script>
189
-
190
- <style scoped>
191
- .menuItem {
192
- margin-right: 10px;
193
- margin-top: 10px;
194
- vertical-align: sub;
195
- }
196
- .el-dropdown-menu{
197
- width: 145px;
198
- height: auto;
199
- padding: 3px 0;
200
- }
201
- .el-dropdown-menu__item, .el-menu-item {
202
- font-size: 13px;
203
- }
204
- .el-dropdown-menu__item img {
205
- width: 13px;
206
- }
207
- .el-dropdown-link{
208
- font-weight: 600;
209
- color: rgba(0, 0, 0, 0.85);
210
- }
211
- .el-popper{
212
- margin-top: -2px !important;
213
- }
1
+ <template>
2
+ <div className="right">
3
+ <el-dropdown v-show="getName()" @command="handleClickmenu">
4
+ <span class="el-dropdown-link">
5
+ <img src="../../assets/userLogo.svg" style="vertical-align:middle;padding-right:10px"/>
6
+ <span :style="{color: stash === 'LNRD' || stash === 'HBJK' ? '#fff' : '#000000d9'}">{{getName()}}</span>
7
+ <i :style="{color: stash === 'HBJK' ? '#fff' : '#000000d9'}" class="el-icon-arrow-down el-icon--right"></i>
8
+ </span>
9
+ <el-dropdown-menu slot="dropdown">
10
+ <el-dropdown-item command="single">
11
+ <img :src="PersonalCenterSrc" alt="" class="menuItem" />
12
+ <span>{{["integration", 'LNRD', 'HBJK'].includes(stash) ? '用户中心' : '个人中心'}}</span>
13
+ </el-dropdown-item>
14
+ <el-dropdown-item v-show="isShowSys" command="systerm">
15
+ <img :src="SystemManageSrc" alt="" class="menuItem" />
16
+ <span>系统管理</span>
17
+ </el-dropdown-item>
18
+ <el-dropdown-item v-show="isShowApp" command="app">
19
+ <img :src="appSystemSrc" alt="" class="menuItem" />
20
+ <span>应用系统配置</span>
21
+ </el-dropdown-item>
22
+ <el-dropdown-item command="logout">
23
+ <img :src="LogoutSrc" alt="" class="menuItem" />
24
+ <span>退出登录</span>
25
+ </el-dropdown-item>
26
+ </el-dropdown-menu>
27
+ </el-dropdown>
28
+ </div>
29
+ </template>
30
+ <script>
31
+ import Axios from '../Util/axios.js'
32
+ import { userMenuIcon } from './constant.js'
33
+ import { getUserName, getIsHaveSystemManagementPermissionFlag } from './../Util/userInfo.js'
34
+ import { integrationLogout, getSysUrl } from './service.js'
35
+ import {getMenuList} from '../Menu/service.js'
36
+ export default {
37
+ name: 'UserInfo',
38
+ data () {
39
+ return {
40
+ isHaveSystemManagementPermission: getIsHaveSystemManagementPermissionFlag(),
41
+ PersonalCenterSrc: userMenuIcon.PersonalCenterSrc,
42
+ MessageCenterSrc: userMenuIcon.MessageCenterSrc,
43
+ SystemManageSrc: userMenuIcon.SystemManageSrc,
44
+ appSystemSrc: userMenuIcon.appSystemSrc,
45
+ LogoutSrc: userMenuIcon.LogoutSrc,
46
+ isShowApp: false
47
+ }
48
+ },
49
+ computed: {
50
+ // 是否显示系统管理菜单项
51
+ isShowSys () {
52
+ return ["integration", 'LNRD', 'HBJK'].includes(this.stash) ? true : this.sysName !== 'admin' && this.isHaveSystemManagementPermission
53
+ },
54
+ },
55
+ props: {
56
+ sysName: {
57
+ type: String,
58
+ default: 'admin'
59
+ },
60
+ stash: {
61
+ type: String,
62
+ default: ''
63
+ }
64
+ },
65
+ created() {
66
+ if (["integration", 'LNRD', 'HBJK'].includes(this.stash)) {
67
+ this.isShowAppFunc()
68
+ }
69
+ if (this.stash === 'GZW') {
70
+ sessionStorage.setItem('stash', 'GZW')
71
+ } else if (this.stash === 'PANWEI') {
72
+ sessionStorage.setItem('stash', 'PANWEI')
73
+ } else {
74
+ sessionStorage.removeItem('stash')
75
+ }
76
+ },
77
+ methods: {
78
+ async isShowAppFunc() {
79
+ const rsp = await getMenuList()
80
+ const rspData = rsp.data.data
81
+ if (rspData && rspData.length > 0) {
82
+ const routesList = rspData[0].routes
83
+ if (routesList) {
84
+ routesList.forEach(item => {
85
+ if (item.path.indexOf('appSystem') !== -1) {
86
+ this.isShowApp = true
87
+ }
88
+ })
89
+ }
90
+ }
91
+ },
92
+ handleClickmenu (flag){
93
+ let url = ''
94
+ if (flag === 'single') {
95
+ if (["integration", 'LNRD', 'HBJK'].includes(this.stash)) {
96
+ url = '/admin-ui/data-share-portal/personal/info'
97
+ } else if (this.stash === "GZW") {
98
+ url = '/data-platform/#/info/index'
99
+ } else if (this.stash === "PANWEI") {
100
+ url = '/bigdata-portal/#/info/index'
101
+ } else {
102
+ url = '/#/info/index'
103
+ }
104
+ location.href = url;
105
+ } else if (flag === 'systerm') {
106
+ if (["integration", 'LNRD', 'HBJK'].includes(this.stash)) {
107
+ // 查询 系统管理 需要跳转的页面
108
+ getSysUrl().then(rsp => {
109
+ const data = rsp.data.data
110
+ if (data) {
111
+ location.href = '/admin-ui' + data.path
112
+ }
113
+ }).catch(e => {
114
+ console.error('getSysUrl 接口异常: ', e)
115
+ })
116
+ } else {
117
+ const menuObj = JSON.parse(sessionStorage.getItem('bigdata-menu'));
118
+ let systemPath = ''
119
+ if (menuObj) {
120
+ menuObj.content.forEach(obj => {
121
+ if (obj.name === '权限管理' && obj.children.length > 0) {
122
+ systemPath = obj.children[0].path
123
+ }
124
+ })
125
+ }
126
+ if (this.sysName === 'admin') {
127
+ let url = ''
128
+ if (this.stash === "GZW") {
129
+ url = `/data-platform/#${systemPath}`
130
+ } else if (this.stash === 'PANWEI') {
131
+ url = `/bigdata-portal/#${systemPath}`
132
+ } else {
133
+ url = `/#${systemPath}`
134
+ }
135
+ location.href = url
136
+ }
137
+ }
138
+ } else if (flag === 'app') {
139
+ url = '/dataadmin/#/appSystem/index'
140
+ location.href = url;
141
+ } else if (flag === 'logout') {
142
+ this.logoutFunc()
143
+ }
144
+ },
145
+ async logoutFunc () {
146
+ console.log('开始调用退出接口...')
147
+ if (["integration", 'LNRD', 'HBJK'].includes(this.stash)) {
148
+ await integrationLogout();
149
+ this.logoutUrl()
150
+ } else {
151
+ let url = ''
152
+ if (["integration", 'LNRD', 'HBJK'].includes(this.stash)) {
153
+ url = '/admin-ui/system/auth/logout'
154
+ } else if (this.stash === 'GZW') {
155
+ url = '/data-platform/auth/token/logout'
156
+ } else {
157
+ url = '/auth/token/logout'
158
+ }
159
+ const method = ["integration", 'LNRD', 'HBJK'].includes(this.stash) ? 'post' : 'delete'
160
+ Axios(url, method).then(() => {
161
+ this.logoutUrl();
162
+ })
163
+ .catch((err) => {
164
+ console.log('err: ', err)
165
+ });
166
+ }
167
+ },
168
+ logoutUrl() {
169
+ localStorage.clear();
170
+ sessionStorage.clear();
171
+ let url = ''
172
+ if (["integration", 'LNRD', 'HBJK'].includes(this.stash)) {
173
+ url = '/admin-ui/login'
174
+ } else if (this.stash === 'GZW') {
175
+ url = '/data-platform/#/login'
176
+ } else if (this.stash === 'PANWEI') {
177
+ url = '/bigdata-portal/#/login'
178
+ } else {
179
+ url = '/#/login'
180
+ }
181
+ location.href = url
182
+ },
183
+ getName () {
184
+ return getUserName()
185
+ },
186
+ }
187
+ }
188
+ </script>
189
+
190
+ <style scoped>
191
+ .menuItem {
192
+ margin-right: 10px;
193
+ margin-top: 10px;
194
+ vertical-align: sub;
195
+ }
196
+ .el-dropdown-menu{
197
+ width: 145px;
198
+ height: auto;
199
+ padding: 3px 0;
200
+ }
201
+ .el-dropdown-menu__item, .el-menu-item {
202
+ font-size: 13px;
203
+ }
204
+ .el-dropdown-menu__item img {
205
+ width: 13px;
206
+ }
207
+ .el-dropdown-link{
208
+ font-weight: 600;
209
+ color: rgba(0, 0, 0, 0.85);
210
+ }
211
+ .el-popper{
212
+ margin-top: -2px !important;
213
+ }
214
214
  </style>
@@ -1,12 +1,12 @@
1
- // 图标位置
2
- export const userMenuIcon = {
3
- PersonalCenterSrc:require('../../assets/personalCenter.svg'),
4
- MessageCenterSrc:require('../../assets/messageCenter.svg'),
5
- SystemManageSrc:require('../../assets/systemManage.svg'),
6
- appSystemSrc:require('../../assets/appSystem.svg'),
7
- LogoutSrc:require('../../assets/logout.png'),
8
- }
9
- export const PersonalCenterSrc = require('../../assets/personalCenter.svg');
10
- export const MessageCenterSrc = require('../../assets/messageCenter.svg');
11
- export const SystemManageSrc = require('../../assets/systemManage.svg');
1
+ // 图标位置
2
+ export const userMenuIcon = {
3
+ PersonalCenterSrc:require('../../assets/personalCenter.svg'),
4
+ MessageCenterSrc:require('../../assets/messageCenter.svg'),
5
+ SystemManageSrc:require('../../assets/systemManage.svg'),
6
+ appSystemSrc:require('../../assets/appSystem.svg'),
7
+ LogoutSrc:require('../../assets/logout.png'),
8
+ }
9
+ export const PersonalCenterSrc = require('../../assets/personalCenter.svg');
10
+ export const MessageCenterSrc = require('../../assets/messageCenter.svg');
11
+ export const SystemManageSrc = require('../../assets/systemManage.svg');
12
12
  export const LogoutSrc = require('../../assets/logout.png');
@@ -1,14 +1,14 @@
1
- import request from 'axios'
2
- // 一体化退出登录
3
- export const integrationLogout = () => {
4
- return request('/admin-api/system/auth/logout', {
5
- method: 'post'
6
- })
7
- }
8
-
9
- // 获取到要跳转的系统管理路径
10
- export const getSysUrl = () => {
11
- return request('/admin-api/system/auth/homePage', {
12
- method: 'get'
13
- })
14
- }
1
+ import request from 'axios'
2
+ // 一体化退出登录
3
+ export const integrationLogout = () => {
4
+ return request('/admin-api/system/auth/logout', {
5
+ method: 'post'
6
+ })
7
+ }
8
+
9
+ // 获取到要跳转的系统管理路径
10
+ export const getSysUrl = () => {
11
+ return request('/admin-api/system/auth/homePage', {
12
+ method: 'get'
13
+ })
14
+ }