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,321 +1,322 @@
1
- <template>
2
- <div :style = "{ background: stash === 'HBJK' ? '#1890ff' : '#fff' }">
3
- <div class='menuPopupAndTitle' :style="{height: stash === 'LNRD' ? '75px': 'auto'}">
4
- <div class='menuIcon' :style="{background: stash === 'LNRD' ? '#EA1A1A' : '#4091f7',height: stash === 'LNRD' ? '75px' : '50px', width: stash === 'LNRD' ? '75px' : '60px'}" @mouseenter="showMenuList = true" @mouseleave="showMenuList = false">
5
- <img class="menuIcon_img" :src="menuIconSrc" :style="{verticalAlign: stash === 'LNRD' ? 'bottom': 'middle'}"/>
6
- </div>
7
- <div :class="'menu_title_content'" v-show="showCollapse" @click="toHref()" :style="{lineHeight: stash === 'LNRD' ? '53px' : '49px' }">
8
- <img v-if="stash !== 'HBJK'" class="menu_title_content_img" :src="getLogoAndTitle().logoSrc" alt="logo" :style="{verticalAlign: stash === 'LNRD' ? 'bottom': 'middle'}"/>
9
- <span class='menu_title' :style="{color: stash === 'LNRD' || stash === 'HBJK'? '#fff' : '#1890ff',verticalAlign: stash === 'LNRD' ? 'bottom': 'middle'}">{{getLogoAndTitle().title}}</span>
10
- </div>
11
- </div>
12
- <div class='menu_list_content' :style="{ display: showMenuList ? 'block' : 'none', top: stash === 'LNRD' ? '75px' : '50px'}" @mouseenter="showMenuList = true" @mouseleave="showMenuList = false">
13
- <div v-for="(item, index) in menuList" :key="item.path">
14
- <div :key="item.name" class="cardLine" :style="{height: item.children.length > 3 ? '90px' : ''}">
15
- <div class='leftMenu'
16
- :style="{
17
- height: item.children.length > 3 ? '96px' : '70px',
18
- lineHeight: item.children.length > 3 ? '45px' : '70px',
19
- }">
20
- <img :src="item.url" class="middle imgWidth" />
21
- <span class="middle textPad" :class="stash === 'LNRD' ? 'LNRD_menu_title' : 'textPad'" @click="toHomePage(index)">{{item.name}}</span>
22
- </div>
23
- <div class='rightMenu'
24
- :style="{
25
- height: item.children.length > 6 ? '140px' : item.children.length > 3 ? '96px' : '70px',
26
- lineHeight: item.children.length > 3 ? '45px' : '70px',
27
- borderBottom: index === menuList.length - 1 ? '0px' : '1px solid #E9E9E9',
28
- }">
29
- <span v-show="index === 0 && isExist">
30
- <img :src="require('./../../assets/exchange_portal_logo.svg')" class="middle exchangeCss" />
31
- <span class="middle textPad" @click="toExchangePage()">政务共享交换平台</span>
32
- </span>
33
- <span v-for="child in item.children" :key="child.url">
34
- <span :key="child.childName">
35
- <img :src="child.url" class="middle iconPad" />
36
- <span :class="stash === 'LNRD' ? 'LNRD_menu_title childMenu textPad' : 'childMenu textPad middle'" @click="toModulePage(child.childName)">{{child.childName}}</span>
37
- </span>
38
- </span>
39
- </div>
40
- </div>
41
- </div>
42
- </div>
43
- </div>
44
- </template>
45
-
46
- <script>
47
- import { menuList as menuListInit, menuList_PANWEI, menuIconSrc, sysNameMap, lnrdMenuList, lnrdSysNameMap, menuList_HBJK} from './constant.js'
48
- import './menu.css'
49
- import { getMenuList, isLogoutThird, getInfoByName, getUrlByInfo } from './service.js'
50
- export default {
51
- name: 'ModuleMenu',
52
- props: {
53
- sysName: {
54
- type: String,
55
- default: 'admin'
56
- },
57
- collapse: {
58
- type: Boolean,
59
- default: true,
60
- },
61
- stash: {
62
- type: String,
63
- default: 'HBJK'
64
- }
65
- },
66
- watch: {
67
- collapse: {
68
- handler: function (newVal, oldVal) {
69
- console.log('---', newVal, oldVal)
70
- this.showCollapse = newVal
71
- },
72
- deep: true
73
- }
74
- },
75
- data () {
76
- return {
77
- showMenuList: false,
78
- menuIconSrc: menuIconSrc,
79
- menuList: [],
80
- sessionMenu: [],
81
- menuListInit: menuListInit,
82
- menuList_PANWEI,
83
- lnrdMenuList,
84
- lnrdSysNameMap,
85
- sysNameMap: sysNameMap,
86
- showCollapse: true,
87
- isExist: false,
88
- systemPath: ''
89
- }
90
- },
91
- created () {
92
- this.getSessionMenu();
93
- if (!["integration", 'LNRD', 'HBJK'].includes(this.stash)) {
94
- this.getNewMenuList();
95
- }
96
- },
97
- methods: {
98
- // 跳转政务共享交换平台
99
- toExchangePage() {
100
- isLogoutThird().then((rsp) => {
101
- const rspObj = rsp.data
102
- console.log('isLogoutThird rspObj: ', rspObj);
103
- if (rspObj && rspObj.data !== '1') {
104
- location.href = rsp.data;
105
- }
106
- });
107
- },
108
- toHref () {
109
- if (this.sysName === 'admin') {
110
- let url = ''
111
- if (this.stash === "GZW") {
112
- url = `/data-platform/#${this.systemPath}`
113
- } else if (this.stash === 'PANWEI') {
114
- url = `/bigdata-portal/#${this.systemPath}`
115
- } else if (!["integration", 'LNRD', 'HBJK'].includes(this.stash)) {
116
- url = `/#${this.systemPath}`
117
- }
118
- location.href = url
119
- }
120
- },
121
- async getSessionMenu () {
122
- // 一体化
123
- if (["integration", 'LNRD', 'HBJK'].includes(this.stash)) {
124
- const rsp = await getMenuList()
125
- const rspData = rsp.data.data
126
- if (rspData && rspData.length > 0) {
127
- const routesList = rspData[0].routes
128
- if (rsp.data.data) {
129
- const pathList = routesList.map(item => {
130
- if (item.path.indexOf('appSystem') !== -1) {
131
- let appSysMenuList = []
132
- let appSysNameList = []
133
- item.routes.forEach(obj => {
134
- appSysMenuList.push('/' + obj.path)
135
- appSysNameList.push(obj.name)
136
- }) || []
137
- localStorage.setItem('appSysMenuList', JSON.stringify(appSysMenuList))
138
- localStorage.setItem('appSysNameList', JSON.stringify(appSysNameList))
139
- }
140
- return {
141
- ...item,
142
- path: item.path.indexOf('/') === -1 ? '/' + item.path : item.path
143
- }
144
- })
145
- this.sessionMenu = [...pathList]
146
- this.getNewMenuList();
147
- }
148
- }
149
- } else {
150
- // 轻量级
151
- const menuObj = JSON.parse(sessionStorage.getItem('bigdata-menu'));
152
- if (menuObj) {
153
- this.sessionMenu = [...menuObj.content]
154
- // 判断是否展示 政务共享平台 菜单(烟台需求)
155
- this.isExist = this.sessionMenu.some(obj => {
156
- if (obj.name === '权限管理' && obj.children.length > 0) {
157
- this.systemPath = obj.children[0].path
158
- }
159
- return obj.path === '/exchange'
160
- })
161
- }
162
- }
163
- },
164
- // 获取系统logo及title
165
- getLogoAndTitle () {
166
- const newMap = this.stash === 'LNRD' ? this.lnrdSysNameMap : this.sysNameMap
167
- let sysInfo = newMap.find(item => item.sysName === this.sysName);
168
- let logoAndTitle = { logoSrc: "", title: "" };
169
- if (sysInfo) {
170
- logoAndTitle.logoSrc = sysInfo.logoSrc;
171
- logoAndTitle.title = sysInfo.title;
172
- }
173
- return logoAndTitle;
174
- },
175
- async getUrl(name) {
176
- let res = null;
177
- let obj = {}
178
- res = await getInfoByName(name)
179
- obj = {
180
- clientId: res.data.data.clientId,
181
- redirectUrl: encodeURIComponent(res.data.data.redirectUris[0]),
182
- }
183
- res = await getUrlByInfo(obj)
184
- return res.data.data
185
- },
186
- // 跳转各个模块
187
- async toModulePage (nameStr) {
188
- let thirdPartyServiceJumpPath = ""; // 第三方服务跳转路径
189
- switch (nameStr) {
190
- case '平台运行总览':
191
- thirdPartyServiceJumpPath = '/dataadmin/#/overview'
192
- return;
193
- case '知识图谱':
194
- thirdPartyServiceJumpPath = await this.getUrl('knowledge')
195
- break;
196
- case '数据可视化':
197
- thirdPartyServiceJumpPath = await this.getUrl('dataview')
198
- break;
199
- case '数据填报':
200
- thirdPartyServiceJumpPath = await this.getUrl('datafill')
201
- break;
202
- case '数据标签':
203
- thirdPartyServiceJumpPath = '/datatag/';
204
- break;
205
- case "数据集成":
206
- thirdPartyServiceJumpPath = "/datacollect/";
207
- break;
208
- case "数据治理":
209
- thirdPartyServiceJumpPath = "/datamanage/";
210
- break;
211
- case "元数据管理":
212
- thirdPartyServiceJumpPath = "/metadata/";
213
- break;
214
- case "数据质量":
215
- thirdPartyServiceJumpPath = "/quality/";
216
- break;
217
- case "离线开发":
218
- thirdPartyServiceJumpPath = "/datadev/";
219
- break;
220
- case "实时开发":
221
- thirdPartyServiceJumpPath = "/dataanalytic/";
222
- break;
223
- case "数据服务":
224
- thirdPartyServiceJumpPath = "/dataservice/";
225
- break;
226
- case "数据资产":
227
- thirdPartyServiceJumpPath = "/dataasset/";
228
- break;
229
- case "数据共享":
230
- thirdPartyServiceJumpPath = "/datasharing/";
231
- break;
232
- case "运维中心":
233
- thirdPartyServiceJumpPath = "/operate/";
234
- break;
235
- case "消息中心":
236
- thirdPartyServiceJumpPath = "/alert/";
237
- break;
238
- case "数据安全":
239
- thirdPartyServiceJumpPath = "/datasecurity/";
240
- break;
241
- case "目录管理":
242
- thirdPartyServiceJumpPath = "/admin-ui/catalog";
243
- break;
244
- case "资源管理":
245
- thirdPartyServiceJumpPath = "/admin-ui/resource/tableResource/list";
246
- break;
247
- case "供需对接":
248
- thirdPartyServiceJumpPath = '/admin-ui/supply-and-demand-docking/dataRequirement/propose/list';
249
- break;
250
- case "数据直达":
251
- thirdPartyServiceJumpPath = '/admin-ui/cascade';
252
- break;
253
- case '综合评价系统':
254
- thirdPartyServiceJumpPath = '/admin-ui/evaluate';
255
- break;
256
- default:
257
- break;
258
- }
259
- if (['公共卫生监测人口库', '电子传染病档案库', '应急资源库', '传染病防控知识库', '主题库'].includes(nameStr)) {
260
- console.log(nameStr)
261
- }
262
- if (['平台运行总览', '知识图谱', '数据可视化', '数据填报'].includes(nameStr)) {
263
- window.open(thirdPartyServiceJumpPath, '_blank')
264
- } else {
265
- location.href = thirdPartyServiceJumpPath
266
- }
267
- },
268
- // 跳转首页
269
- toHomePage (index) {
270
- if (index === 0) {
271
- let url = ''
272
- if (["integration", 'LNRD', 'HBJK'].includes(this.stash)) {
273
- url = '/dataadmin/#/index'
274
- } else if (this.stash === "GZW") {
275
- url = '/data-platform/#/index'
276
- } else if (this.stash === "PANWEI") {
277
- url = '/bigdata-portal/#/index'
278
- } else {
279
- url = '/#/index'
280
- }
281
- location.href = url
282
- }
283
- },
284
- getNewMenuList () {
285
- let newMenuList = this.stash === 'LNRD' ? [...lnrdMenuList] : this.stash === 'PANWEI' ? [...this.menuList_PANWEI] : [...this.menuListInit];
286
- if (this.sessionMenu) {
287
- const pathList = this.sessionMenu.map(item => item.path)
288
- // 过滤掉没有权限的子菜单(PS:如果模块下面子菜单都没有,则不显示该模块)
289
- for (let index = newMenuList.length - 1; index >= 0; index--) {
290
- const menuItem = newMenuList[index]
291
- for (let index_ch = menuItem.children.length - 1; index_ch >= 0; index_ch--) {
292
- const child = menuItem.children[index_ch]
293
- if (!pathList.includes(child.path)) {
294
- newMenuList[index].children.splice(index_ch, 1)
295
- }
296
- }
297
- if (menuItem.children.length === 0 && menuItem.name !== '首页') {
298
- newMenuList.splice(index, 1)
299
- }
300
- }
301
- }
302
- console.log("menuList_HBJK")
303
- if (this.stash === 'HBJK') {
304
- newMenuList = [...newMenuList, ...menuList_HBJK]
305
- console.log("add menuList_HBJK===", newMenuList)
306
- }
307
- this.menuList = [...newMenuList];
308
- console.log("finally menuList===", newMenuList)
309
- },
310
- }
311
- }
312
- </script>
313
- <style scoped>
314
- .iconPad{
315
- width: 15px;
316
- height: 15px;
317
- }
318
- .imgWidth{
319
- width: 20px;
320
- }
321
- </style>
1
+ <template>
2
+ <div :style = "{ background: stash === 'HBJK' ? '#1890ff' : '#fff' }">
3
+ <div class='menuPopupAndTitle' :style="{height: stash === 'LNRD' ? '75px': 'auto'}">
4
+ <div class='menuIcon' :style="{background: stash === 'LNRD' ? '#EA1A1A' : '#4091f7',height: stash === 'LNRD' ? '75px' : '50px', width: stash === 'LNRD' ? '75px' : '60px'}" @mouseenter="showMenuList = true" @mouseleave="showMenuList = false">
5
+ <img class="menuIcon_img" :src="menuIconSrc" :style="{verticalAlign: stash === 'LNRD' ? 'bottom': 'middle'}"/>
6
+ </div>
7
+ <div :class="'menu_title_content'" v-show="showCollapse" @click="toHref()" :style="{lineHeight: stash === 'LNRD' ? '53px' : '49px' }">
8
+ <img v-if="stash !== 'HBJK'" class="menu_title_content_img" :src="getLogoAndTitle().logoSrc" alt="logo" :style="{verticalAlign: stash === 'LNRD' ? 'bottom': 'middle'}"/>
9
+ <span class='menu_title' :style="{color: stash === 'LNRD' || stash === 'HBJK'? '#fff' : '#1890ff',verticalAlign: stash === 'LNRD' ? 'bottom': 'middle'}">{{getLogoAndTitle().title}}</span>
10
+ </div>
11
+ </div>
12
+ <div class='menu_list_content' :style="{ display: showMenuList ? 'block' : 'none', top: stash === 'LNRD' ? '75px' : '50px'}" @mouseenter="showMenuList = true" @mouseleave="showMenuList = true">
13
+ <div v-for="(item, index) in menuList" :key="item.path">
14
+ <div :key="item.name" class="cardLine" :style="{height: item.children.length > 3 ? '90px' : ''}">
15
+ <div class='leftMenu'
16
+ :style="{
17
+ height: item.children.length > 3 ? '96px' : '70px',
18
+ lineHeight: item.children.length > 3 ? '45px' : '70px',
19
+ }">
20
+ <img :src="item.url" class="middle imgWidth" />
21
+ <span class="middle textPad" :class="stash === 'LNRD' ? 'LNRD_menu_title' : 'textPad'" @click="toHomePage(index)">{{item.name}}</span>
22
+ </div>
23
+ <div class='rightMenu'
24
+ :style="{
25
+ height: item.children.length > 6 ? '140px' : item.children.length > 3 ? '96px' : '70px',
26
+ lineHeight: item.children.length > 3 ? '45px' : '70px',
27
+ borderBottom: index === menuList.length - 1 ? '0px' : '1px solid #E9E9E9',
28
+ }">
29
+ <span v-show="index === 0 && isExist">
30
+ <img :src="require('./../../assets/exchange_portal_logo.svg')" class="middle exchangeCss" />
31
+ <span class="middle textPad" @click="toExchangePage()">政务共享交换平台</span>
32
+ </span>
33
+ <span v-for="child in item.children" :key="child.url">
34
+ <span :key="child.childName">
35
+ <img :src="child.url" class="middle iconPad" />
36
+ <span :class="stash === 'LNRD' ? 'LNRD_menu_title childMenu textPad' : 'childMenu textPad middle'" @click="toModulePage(child.childName)">{{child.childName}}</span>
37
+ </span>
38
+ </span>
39
+ </div>
40
+ </div>
41
+ </div>
42
+ </div>
43
+ </div>
44
+ </template>
45
+
46
+ <script>
47
+ import { menuList as menuListInit, menuList_PANWEI, menuIconSrc, sysNameMap, lnrdMenuList, lnrdSysNameMap, menuList_HBJK} from './constant.js'
48
+ import './menu.css'
49
+ import { getMenuList, isLogoutThird, getInfoByName, getUrlByInfo } from './service.js'
50
+ export default {
51
+ name: 'ModuleMenu',
52
+ props: {
53
+ sysName: {
54
+ type: String,
55
+ default: 'admin'
56
+ },
57
+ collapse: {
58
+ type: Boolean,
59
+ default: true,
60
+ },
61
+ stash: {
62
+ type: String,
63
+ default: 'integration'
64
+ }
65
+ },
66
+ watch: {
67
+ collapse: {
68
+ handler: function (newVal, oldVal) {
69
+ console.log('---', newVal, oldVal)
70
+ this.showCollapse = newVal
71
+ },
72
+ deep: true
73
+ }
74
+ },
75
+ data () {
76
+ return {
77
+ showMenuList: false,
78
+ menuIconSrc: menuIconSrc,
79
+ menuList: [],
80
+ sessionMenu: [],
81
+ menuListInit: menuListInit,
82
+ menuList_PANWEI,
83
+ lnrdMenuList,
84
+ lnrdSysNameMap,
85
+ sysNameMap: sysNameMap,
86
+ showCollapse: true,
87
+ isExist: false,
88
+ systemPath: ''
89
+ }
90
+ },
91
+ created () {
92
+ this.getSessionMenu();
93
+ if (!["integration", 'LNRD', 'HBJK'].includes(this.stash)) {
94
+ this.getNewMenuList();
95
+ }
96
+ },
97
+ methods: {
98
+ // 跳转政务共享交换平台
99
+ toExchangePage() {
100
+ isLogoutThird().then((rsp) => {
101
+ const rspObj = rsp.data
102
+ console.log('isLogoutThird rspObj: ', rspObj);
103
+ if (rspObj && rspObj.data !== '1') {
104
+ location.href = rsp.data;
105
+ }
106
+ });
107
+ },
108
+ toHref () {
109
+ if (this.sysName === 'admin') {
110
+ let url = ''
111
+ if (this.stash === "GZW") {
112
+ url = `/data-platform/#${this.systemPath}`
113
+ } else if (this.stash === 'PANWEI') {
114
+ url = `/bigdata-portal/#${this.systemPath}`
115
+ } else if (!["integration", 'LNRD', 'HBJK'].includes(this.stash)) {
116
+ url = `/#${this.systemPath}`
117
+ }
118
+ location.href = url
119
+ }
120
+ },
121
+ async getSessionMenu () {
122
+ // 一体化
123
+ if (["integration", 'LNRD', 'HBJK'].includes(this.stash)) {
124
+ const rsp = await getMenuList()
125
+ const rspData = rsp.data.data
126
+ if (rspData && rspData.length > 0) {
127
+ const routesList = rspData[0].routes
128
+ if (rsp.data.data) {
129
+ const pathList = routesList.map(item => {
130
+ if (item.path.indexOf('appSystem') !== -1) {
131
+ let appSysMenuList = []
132
+ let appSysNameList = []
133
+ item.routes.forEach(obj => {
134
+ appSysMenuList.push('/' + obj.path)
135
+ appSysNameList.push(obj.name)
136
+ }) || []
137
+ localStorage.setItem('appSysMenuList', JSON.stringify(appSysMenuList))
138
+ localStorage.setItem('appSysNameList', JSON.stringify(appSysNameList))
139
+ }
140
+ return {
141
+ ...item,
142
+ path: item.path.indexOf('/') === -1 ? '/' + item.path : item.path
143
+ }
144
+ })
145
+ this.sessionMenu = [...pathList]
146
+ this.getNewMenuList();
147
+ }
148
+ }
149
+ } else {
150
+ // 轻量级
151
+ const menuObj = JSON.parse(sessionStorage.getItem('bigdata-menu'));
152
+ if (menuObj) {
153
+ this.sessionMenu = [...menuObj.content]
154
+ // 判断是否展示 政务共享平台 菜单(烟台需求)
155
+ this.isExist = this.sessionMenu.some(obj => {
156
+ if (obj.name === '权限管理' && obj.children.length > 0) {
157
+ this.systemPath = obj.children[0].path
158
+ }
159
+ return obj.path === '/exchange'
160
+ })
161
+ }
162
+ }
163
+ },
164
+ // 获取系统logo及title
165
+ getLogoAndTitle () {
166
+ const newMap = this.stash === 'LNRD' ? this.lnrdSysNameMap : this.sysNameMap
167
+ let sysInfo = newMap.find(item => item.sysName === this.sysName);
168
+ let logoAndTitle = { logoSrc: "", title: "" };
169
+ if (sysInfo) {
170
+ logoAndTitle.logoSrc = sysInfo.logoSrc;
171
+ logoAndTitle.title = sysInfo.title;
172
+ }
173
+ return logoAndTitle;
174
+ },
175
+ async getUrl(name) {
176
+ let res = null;
177
+ let obj = {}
178
+ res = await getInfoByName(name)
179
+ obj = {
180
+ clientId: res.data.data.clientId,
181
+ redirectUrl: encodeURIComponent(res.data.data.redirectUris[0]),
182
+ }
183
+ res = await getUrlByInfo(obj)
184
+ return res.data.data
185
+ },
186
+ // 跳转各个模块
187
+ async toModulePage (nameStr) {
188
+ let thirdPartyServiceJumpPath = ""; // 第三方服务跳转路径
189
+ switch (nameStr) {
190
+ case '平台运行总览':
191
+ thirdPartyServiceJumpPath = '/dataadmin/#/overview'
192
+ return;
193
+ case '知识图谱':
194
+ thirdPartyServiceJumpPath = await this.getUrl('knowledge')
195
+ break;
196
+ case '数据可视化':
197
+ thirdPartyServiceJumpPath = await this.getUrl('dataview')
198
+ break;
199
+ case '数据填报':
200
+ thirdPartyServiceJumpPath = await this.getUrl('datafill')
201
+ break;
202
+ case '数据标签':
203
+ thirdPartyServiceJumpPath = '/datatag/';
204
+ break;
205
+ case "数据集成":
206
+ thirdPartyServiceJumpPath = "/datacollect/";
207
+ break;
208
+ case "数据治理":
209
+ thirdPartyServiceJumpPath = "/datamanage/";
210
+ break;
211
+ case "元数据管理":
212
+ thirdPartyServiceJumpPath = "/metadata/";
213
+ break;
214
+ case "数据质量":
215
+ thirdPartyServiceJumpPath = "/quality/";
216
+ break;
217
+ case "离线开发":
218
+ thirdPartyServiceJumpPath = "/datadev/";
219
+ break;
220
+ case "实时开发":
221
+ thirdPartyServiceJumpPath = "/dataanalytic/";
222
+ break;
223
+ case "数据服务":
224
+ thirdPartyServiceJumpPath = "/dataservice/";
225
+ break;
226
+ case "数据资产":
227
+ thirdPartyServiceJumpPath = "/dataasset/";
228
+ break;
229
+ case "数据共享":
230
+ thirdPartyServiceJumpPath = "/datasharing/";
231
+ break;
232
+ case "运维中心":
233
+ thirdPartyServiceJumpPath = "/operate/";
234
+ break;
235
+ case "消息中心":
236
+ thirdPartyServiceJumpPath = "/alert/";
237
+ break;
238
+ case "数据安全":
239
+ thirdPartyServiceJumpPath = "/datasecurity/";
240
+ break;
241
+ case "目录管理":
242
+ thirdPartyServiceJumpPath = "/admin-ui/catalog";
243
+ break;
244
+ case "资源管理":
245
+ thirdPartyServiceJumpPath = "/admin-ui/resource/tableResource/list";
246
+ break;
247
+ case "供需对接":
248
+ thirdPartyServiceJumpPath = '/admin-ui/supply-and-demand-docking/dataRequirement/propose/list';
249
+ break;
250
+ case "数据直达":
251
+ thirdPartyServiceJumpPath = '/admin-ui/cascade';
252
+ break;
253
+ case '综合评价系统':
254
+ thirdPartyServiceJumpPath = '/admin-ui/evaluate';
255
+ break;
256
+ default:
257
+ break;
258
+ }
259
+ if (['公共卫生监测人口库', '电子传染病档案库', '应急资源库', '传染病防控知识库', '主题库'].includes(nameStr)) {
260
+ console.log(nameStr)
261
+ }
262
+ if (['平台运行总览', '知识图谱', '数据可视化', '数据填报'].includes(nameStr)) {
263
+ window.open(thirdPartyServiceJumpPath, '_blank')
264
+ } else {
265
+ location.href = thirdPartyServiceJumpPath
266
+ }
267
+ },
268
+ // 跳转首页
269
+ toHomePage (index) {
270
+ if (index === 0) {
271
+ let url = ''
272
+ // if (["integration", 'LNRD', 'HBJK'].includes(this.stash)) {
273
+ // url = '/dataadmin/#/index'
274
+ // } else if (this.stash === "GZW") {
275
+ // url = '/data-platform/#/index'
276
+ // } else if (this.stash === "PANWEI") {
277
+ // url = '/bigdata-portal/#/index'
278
+ // } else {
279
+ // url = '/#/index'
280
+ // }
281
+ url = '/data-capability'
282
+ location.href = url
283
+ }
284
+ },
285
+ getNewMenuList () {
286
+ let newMenuList = this.stash === 'LNRD' ? [...lnrdMenuList] : this.stash === 'PANWEI' ? [...this.menuList_PANWEI] : [...this.menuListInit];
287
+ if (this.sessionMenu) {
288
+ const pathList = this.sessionMenu.map(item => item.path)
289
+ // 过滤掉没有权限的子菜单(PS:如果模块下面子菜单都没有,则不显示该模块)
290
+ for (let index = newMenuList.length - 1; index >= 0; index--) {
291
+ const menuItem = newMenuList[index]
292
+ for (let index_ch = menuItem.children.length - 1; index_ch >= 0; index_ch--) {
293
+ const child = menuItem.children[index_ch]
294
+ if (!pathList.includes(child.path)) {
295
+ newMenuList[index].children.splice(index_ch, 1)
296
+ }
297
+ }
298
+ if (menuItem.children.length === 0 && menuItem.name !== '首页') {
299
+ newMenuList.splice(index, 1)
300
+ }
301
+ }
302
+ }
303
+ console.log("menuList_HBJK")
304
+ if (this.stash === 'HBJK') {
305
+ newMenuList = [...newMenuList, ...menuList_HBJK]
306
+ console.log("add menuList_HBJK===", newMenuList)
307
+ }
308
+ this.menuList = [...newMenuList];
309
+ console.log("finally menuList===", newMenuList)
310
+ },
311
+ }
312
+ }
313
+ </script>
314
+ <style scoped>
315
+ .iconPad{
316
+ width: 15px;
317
+ height: 15px;
318
+ }
319
+ .imgWidth{
320
+ width: 20px;
321
+ }
322
+ </style>