module-menu-vue 0.3.12 → 0.3.13

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_biaoqianfenxi.png +0 -0
  32. package/src/assets/ic_gonggongmokuai_m.svg +5 -5
  33. package/src/assets/ic_shujuhuiju_m.svg +5 -5
  34. package/src/assets/ic_shujukaifa_m.svg +15 -15
  35. package/src/assets/ic_shujukaifang_m.svg +5 -5
  36. package/src/assets/ic_shujuyingyong_m.svg +5 -5
  37. package/src/assets/ic_shujuzhili_m.svg +5 -5
  38. package/src/assets/metadata_logo.svg +25 -25
  39. package/src/assets/metadata_slogo.svg +25 -25
  40. package/src/assets/module.svg +12 -12
  41. package/src/assets/operate_logo.svg +63 -63
  42. package/src/assets/operate_slogo.svg +63 -63
  43. package/src/assets/personalCenter.svg +15 -15
  44. package/src/assets/quality_logo.svg +26 -26
  45. package/src/assets/quality_slogo.svg +26 -26
  46. package/src/assets/systemManage.svg +15 -15
  47. package/src/assets/wordorder_logo.svg +57 -57
  48. package/src/assets/workorder_slogo.svg +54 -54
  49. package/src/components/Menu/ModuleMenu.vue +344 -341
  50. package/src/components/Menu/constant.js +560 -545
  51. package/src/components/Menu/menu.css +122 -122
  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 +227 -227
  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 +46 -46
  62. package/src/components/Util/userInfo.js +96 -96
  63. package/src/main.js +11 -11
  64. package/vue.config.js +34 -34
@@ -1,228 +1,228 @@
1
- <template>
2
- <div className="right">
3
- <el-dropdown v-show="getName()" @command="handleClickmenu">
4
- <span class="el-dropdown-link">
5
- <img :src="stash === 'HBJK' ? require('../../assets/userLogo1.png') : require('../../assets/userLogo.svg')" style="vertical-align:middle;padding-right:10px; width: 40px"/>
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
- import { getLoginUrl } from '../Util/permessionUtils.js';
37
-
38
- export default {
39
- name: 'UserInfo',
40
- data () {
41
- return {
42
- isHaveSystemManagementPermission: getIsHaveSystemManagementPermissionFlag(),
43
- PersonalCenterSrc: userMenuIcon.PersonalCenterSrc,
44
- MessageCenterSrc: userMenuIcon.MessageCenterSrc,
45
- SystemManageSrc: userMenuIcon.SystemManageSrc,
46
- appSystemSrc: userMenuIcon.appSystemSrc,
47
- LogoutSrc: userMenuIcon.LogoutSrc,
48
- isShowApp: false
49
- }
50
- },
51
- computed: {
52
- // 是否显示系统管理菜单项
53
- isShowSys () {
54
- return ["integration", 'LNRD', 'HBJK'].includes(this.stash) ? true : this.sysName !== 'admin' && this.isHaveSystemManagementPermission
55
- },
56
- },
57
- props: {
58
- sysName: {
59
- type: String,
60
- default: 'admin'
61
- },
62
- stash: {
63
- type: String,
64
- default: ''
65
- }
66
- },
67
- created() {
68
- if (["integration", 'LNRD', 'HBJK'].includes(this.stash)) {
69
- this.isShowAppFunc()
70
- }
71
- if (this.stash === 'GZW') {
72
- sessionStorage.setItem('stash', 'GZW')
73
- } else if (this.stash === 'PANWEI') {
74
- sessionStorage.setItem('stash', 'PANWEI')
75
- } else {
76
- sessionStorage.removeItem('stash')
77
- }
78
- },
79
- methods: {
80
- async isShowAppFunc() {
81
- const rsp = await getMenuList()
82
- const rspData = rsp.data.data
83
- if (rspData && rspData.length > 0) {
84
- const routesList = rspData[0].routes
85
- if (routesList) {
86
- routesList.forEach(item => {
87
- if (item.path.indexOf('appSystem') !== -1) {
88
- this.isShowApp = true
89
- }
90
- })
91
- }
92
- }
93
- },
94
- handleClickmenu (flag){
95
- let url = ''
96
- if (flag === 'single') {
97
- if (["integration", 'LNRD', 'HBJK'].includes(this.stash)) {
98
- url = '/admin-ui/data-share-portal/personal/info'
99
- } else if (this.stash === "GZW") {
100
- url = '/data-platform/#/info/index'
101
- } else if (this.stash === "PANWEI") {
102
- url = '/bigdata-portal/#/info/index'
103
- } else {
104
- url = '/#/info/index'
105
- }
106
- location.href = url;
107
- } else if (flag === 'systerm') {
108
- if (["integration", 'LNRD', 'HBJK'].includes(this.stash)) {
109
- // 查询 系统管理 需要跳转的页面
110
- getSysUrl().then(rsp => {
111
- const data = rsp.data.data
112
- if (data) {
113
- location.href = '/admin-ui' + data.path
114
- }
115
- }).catch(e => {
116
- console.error('getSysUrl 接口异常: ', e)
117
- })
118
- } else {
119
- const menuObj = JSON.parse(sessionStorage.getItem('bigdata-menu'));
120
- let systemPath = ''
121
- if (menuObj) {
122
- menuObj.content.forEach(obj => {
123
- if (obj.name === '权限管理' && obj.children.length > 0) {
124
- systemPath = obj.children[0].path
125
- }
126
- })
127
- }
128
- // if (this.sysName === 'admin') {
129
- let url = ''
130
- if (this.stash === "GZW") {
131
- url = `/data-platform/#${systemPath}`
132
- } else if (this.stash === 'PANWEI') {
133
- url = `/bigdata-portal/#${systemPath}`
134
- } else {
135
- url = `/#${systemPath}`
136
- }
137
- location.href = url
138
- // }
139
- }
140
- } else if (flag === 'app') {
141
- url = '/dataadmin/#/appSystem/index'
142
- location.href = url;
143
- } else if (flag === 'logout') {
144
- this.logoutFunc()
145
- }
146
- },
147
- async logoutFunc () {
148
- console.log('开始调用退出接口...')
149
- if (["integration", 'LNRD', 'HBJK'].includes(this.stash)) {
150
- await integrationLogout();
151
- await this.logoutUrl()
152
- } else {
153
- let url = ''
154
- if (["integration", 'LNRD', 'HBJK'].includes(this.stash)) {
155
- url = '/admin-ui/system/auth/logout'
156
- } else if (this.stash === 'GZW') {
157
- url = '/data-platform/auth/token/logout'
158
- } else {
159
- url = '/auth/token/logout'
160
- }
161
- const method = ["integration", 'LNRD', 'HBJK'].includes(this.stash) ? 'post' : 'delete'
162
- Axios(url, method).then(async () => {
163
- await this.logoutUrl();
164
- })
165
- .catch((err) => {
166
- console.log('err: ', err)
167
- });
168
- }
169
- },
170
- async logoutUrl() {
171
- localStorage.clear();
172
- sessionStorage.clear();
173
- if (["integration", 'LNRD', 'HBJK'].includes(this.stash)) {
174
- await getLoginUrl()
175
- .then((res) => {
176
- if (res && res.data && res.data.data && res.data.data.loginoutUrl) {
177
- console.log('Login URL found:', res.data.data.loginoutUrl);
178
- window.location.href = res.data.data.loginoutUrl;
179
- } else {
180
- console.log('No login URL found, redirect to default login page.');
181
- window.location.href = res.data.data.loginoutUrl;
182
- }
183
- })
184
- .catch((e) => {
185
- console.log('GetLoginUrl error: ', e);
186
- window.location.href = '/admin-ui/login';
187
- });
188
- return;
189
- } else if (this.stash === 'GZW') {
190
- location.href = '/data-platform/#/login'
191
- } else if (this.stash === 'PANWEI') {
192
- location.href = '/bigdata-portal/#/login'
193
- } else {
194
- location.href = '/#/login'
195
- }
196
- },
197
- getName () {
198
- return getUserName()
199
- },
200
- }
201
- }
202
- </script>
203
-
204
- <style scoped>
205
- .menuItem {
206
- margin-right: 10px;
207
- margin-top: 10px;
208
- vertical-align: sub;
209
- }
210
- .el-dropdown-menu{
211
- width: 145px;
212
- height: auto;
213
- padding: 3px 0;
214
- }
215
- .el-dropdown-menu__item, .el-menu-item {
216
- font-size: 13px;
217
- }
218
- .el-dropdown-menu__item img {
219
- width: 13px;
220
- }
221
- .el-dropdown-link{
222
- font-weight: 600;
223
- color: rgba(0, 0, 0, 0.85);
224
- }
225
- .el-popper{
226
- margin-top: -2px !important;
227
- }
1
+ <template>
2
+ <div className="right">
3
+ <el-dropdown v-show="getName()" @command="handleClickmenu">
4
+ <span class="el-dropdown-link">
5
+ <img :src="stash === 'HBJK' ? require('../../assets/userLogo1.png') : require('../../assets/userLogo.svg')" style="vertical-align:middle;padding-right:10px; width: 40px"/>
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
+ import { getLoginUrl } from '../Util/permessionUtils.js';
37
+
38
+ export default {
39
+ name: 'UserInfo',
40
+ data () {
41
+ return {
42
+ isHaveSystemManagementPermission: getIsHaveSystemManagementPermissionFlag(),
43
+ PersonalCenterSrc: userMenuIcon.PersonalCenterSrc,
44
+ MessageCenterSrc: userMenuIcon.MessageCenterSrc,
45
+ SystemManageSrc: userMenuIcon.SystemManageSrc,
46
+ appSystemSrc: userMenuIcon.appSystemSrc,
47
+ LogoutSrc: userMenuIcon.LogoutSrc,
48
+ isShowApp: false
49
+ }
50
+ },
51
+ computed: {
52
+ // 是否显示系统管理菜单项
53
+ isShowSys () {
54
+ return ["integration", 'LNRD', 'HBJK'].includes(this.stash) ? true : this.sysName !== 'admin' && this.isHaveSystemManagementPermission
55
+ },
56
+ },
57
+ props: {
58
+ sysName: {
59
+ type: String,
60
+ default: 'admin'
61
+ },
62
+ stash: {
63
+ type: String,
64
+ default: ''
65
+ }
66
+ },
67
+ created() {
68
+ if (["integration", 'LNRD', 'HBJK'].includes(this.stash)) {
69
+ this.isShowAppFunc()
70
+ }
71
+ if (this.stash === 'GZW') {
72
+ sessionStorage.setItem('stash', 'GZW')
73
+ } else if (this.stash === 'PANWEI') {
74
+ sessionStorage.setItem('stash', 'PANWEI')
75
+ } else {
76
+ sessionStorage.removeItem('stash')
77
+ }
78
+ },
79
+ methods: {
80
+ async isShowAppFunc() {
81
+ const rsp = await getMenuList()
82
+ const rspData = rsp.data.data
83
+ if (rspData && rspData.length > 0) {
84
+ const routesList = rspData[0].routes
85
+ if (routesList) {
86
+ routesList.forEach(item => {
87
+ if (item.path.indexOf('appSystem') !== -1) {
88
+ this.isShowApp = true
89
+ }
90
+ })
91
+ }
92
+ }
93
+ },
94
+ handleClickmenu (flag){
95
+ let url = ''
96
+ if (flag === 'single') {
97
+ if (["integration", 'LNRD', 'HBJK'].includes(this.stash)) {
98
+ url = '/admin-ui/data-share-portal/personal/info'
99
+ } else if (this.stash === "GZW") {
100
+ url = '/data-platform/#/info/index'
101
+ } else if (this.stash === "PANWEI") {
102
+ url = '/bigdata-portal/#/info/index'
103
+ } else {
104
+ url = '/#/info/index'
105
+ }
106
+ location.href = url;
107
+ } else if (flag === 'systerm') {
108
+ if (["integration", 'LNRD', 'HBJK'].includes(this.stash)) {
109
+ // 查询 系统管理 需要跳转的页面
110
+ getSysUrl().then(rsp => {
111
+ const data = rsp.data.data
112
+ if (data) {
113
+ location.href = '/admin-ui' + data.path
114
+ }
115
+ }).catch(e => {
116
+ console.error('getSysUrl 接口异常: ', e)
117
+ })
118
+ } else {
119
+ const menuObj = JSON.parse(sessionStorage.getItem('bigdata-menu'));
120
+ let systemPath = ''
121
+ if (menuObj) {
122
+ menuObj.content.forEach(obj => {
123
+ if (obj.name === '权限管理' && obj.children.length > 0) {
124
+ systemPath = obj.children[0].path
125
+ }
126
+ })
127
+ }
128
+ // if (this.sysName === 'admin') {
129
+ let url = ''
130
+ if (this.stash === "GZW") {
131
+ url = `/data-platform/#${systemPath}`
132
+ } else if (this.stash === 'PANWEI') {
133
+ url = `/bigdata-portal/#${systemPath}`
134
+ } else {
135
+ url = `/#${systemPath}`
136
+ }
137
+ location.href = url
138
+ // }
139
+ }
140
+ } else if (flag === 'app') {
141
+ url = '/dataadmin/#/appSystem/index'
142
+ location.href = url;
143
+ } else if (flag === 'logout') {
144
+ this.logoutFunc()
145
+ }
146
+ },
147
+ async logoutFunc () {
148
+ console.log('开始调用退出接口...')
149
+ if (["integration", 'LNRD', 'HBJK'].includes(this.stash)) {
150
+ await integrationLogout();
151
+ await this.logoutUrl()
152
+ } else {
153
+ let url = ''
154
+ if (["integration", 'LNRD', 'HBJK'].includes(this.stash)) {
155
+ url = '/admin-ui/system/auth/logout'
156
+ } else if (this.stash === 'GZW') {
157
+ url = '/data-platform/auth/token/logout'
158
+ } else {
159
+ url = '/auth/token/logout'
160
+ }
161
+ const method = ["integration", 'LNRD', 'HBJK'].includes(this.stash) ? 'post' : 'delete'
162
+ Axios(url, method).then(async () => {
163
+ await this.logoutUrl();
164
+ })
165
+ .catch((err) => {
166
+ console.log('err: ', err)
167
+ });
168
+ }
169
+ },
170
+ async logoutUrl() {
171
+ localStorage.clear();
172
+ sessionStorage.clear();
173
+ if (["integration", 'LNRD', 'HBJK'].includes(this.stash)) {
174
+ await getLoginUrl()
175
+ .then((res) => {
176
+ if (res && res.data && res.data.data && res.data.data.loginoutUrl) {
177
+ console.log('Login URL found:', res.data.data.loginoutUrl);
178
+ window.location.href = res.data.data.loginoutUrl;
179
+ } else {
180
+ console.log('No login URL found, redirect to default login page.');
181
+ window.location.href = res.data.data.loginoutUrl;
182
+ }
183
+ })
184
+ .catch((e) => {
185
+ console.log('GetLoginUrl error: ', e);
186
+ window.location.href = '/admin-ui/login';
187
+ });
188
+ return;
189
+ } else if (this.stash === 'GZW') {
190
+ location.href = '/data-platform/#/login'
191
+ } else if (this.stash === 'PANWEI') {
192
+ location.href = '/bigdata-portal/#/login'
193
+ } else {
194
+ location.href = '/#/login'
195
+ }
196
+ },
197
+ getName () {
198
+ return getUserName()
199
+ },
200
+ }
201
+ }
202
+ </script>
203
+
204
+ <style scoped>
205
+ .menuItem {
206
+ margin-right: 10px;
207
+ margin-top: 10px;
208
+ vertical-align: sub;
209
+ }
210
+ .el-dropdown-menu{
211
+ width: 145px;
212
+ height: auto;
213
+ padding: 3px 0;
214
+ }
215
+ .el-dropdown-menu__item, .el-menu-item {
216
+ font-size: 13px;
217
+ }
218
+ .el-dropdown-menu__item img {
219
+ width: 13px;
220
+ }
221
+ .el-dropdown-link{
222
+ font-weight: 600;
223
+ color: rgba(0, 0, 0, 0.85);
224
+ }
225
+ .el-popper{
226
+ margin-top: -2px !important;
227
+ }
228
228
  </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
+ }