module-menu-vue 0.3.21 → 0.3.23
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/README.md +24 -24
- package/babel.config.js +5 -5
- package/index.js +4 -4
- package/jsconfig.json +19 -19
- package/package.json +48 -48
- package/public/index.html +14 -14
- package/src/App.vue +29 -29
- package/src/assets/admin_logo.svg +48 -48
- package/src/assets/admin_slogo.svg +48 -48
- package/src/assets/alert_logo.svg +26 -26
- package/src/assets/alert_slogo.svg +26 -26
- package/src/assets/childIcon.svg +10 -10
- package/src/assets/dataManager_logo.svg +42 -42
- package/src/assets/dataanalytic_logo.svg +44 -44
- package/src/assets/dataanalytic_slogo.svg +47 -47
- package/src/assets/dataasset_logo.svg +52 -52
- package/src/assets/dataasset_slogo.svg +52 -52
- package/src/assets/datacollection_logo.svg +70 -70
- package/src/assets/datacollection_slogo.svg +70 -70
- package/src/assets/datadev_logo.svg +26 -26
- package/src/assets/datadev_slogo.svg +26 -26
- package/src/assets/datalabel_logo.svg +26 -26
- package/src/assets/datalabel_slogo.svg +26 -26
- package/src/assets/datamanager_slogo.svg +42 -42
- package/src/assets/dataservice_logo.svg +209 -209
- package/src/assets/dataservice_slogo.svg +209 -209
- package/src/assets/datasharing_logo.svg +28 -28
- package/src/assets/datasharing_slogo.svg +28 -28
- package/src/assets/exchange_portal_logo.svg +9 -9
- package/src/assets/home.svg +12 -12
- package/src/assets/ic_gonggongmokuai_m.svg +5 -5
- package/src/assets/ic_shujuhuiju_m.svg +5 -5
- package/src/assets/ic_shujukaifa_m.svg +15 -15
- package/src/assets/ic_shujukaifang_m.svg +5 -5
- package/src/assets/ic_shujuyingyong_m.svg +5 -5
- package/src/assets/ic_shujuzhili_m.svg +5 -5
- package/src/assets/metadata_logo.svg +25 -25
- package/src/assets/metadata_slogo.svg +25 -25
- package/src/assets/module.svg +12 -12
- package/src/assets/operate_logo.svg +63 -63
- package/src/assets/operate_slogo.svg +63 -63
- package/src/assets/personalCenter.svg +15 -15
- package/src/assets/quality_logo.svg +26 -26
- package/src/assets/quality_slogo.svg +26 -26
- package/src/assets/systemManage.svg +15 -15
- package/src/assets/wordorder_logo.svg +57 -57
- package/src/assets/workorder_slogo.svg +54 -54
- package/src/components/Menu/ModuleMenu.vue +356 -353
- package/src/components/Menu/constant.js +585 -580
- package/src/components/Menu/menu.css +122 -122
- package/src/components/Menu/service.js +25 -25
- package/src/components/Portal/PortalBtn.vue +30 -30
- package/src/components/Tenant/TenantList.vue +74 -74
- package/src/components/Tenant/service.js +17 -17
- package/src/components/User/UserInfo.vue +233 -227
- package/src/components/User/constant.js +11 -11
- package/src/components/User/service.js +14 -14
- package/src/components/Util/axios.js +89 -89
- package/src/components/Util/config.js +13 -13
- package/src/components/Util/permessionUtils.js +46 -46
- package/src/components/Util/userInfo.js +96 -96
- package/src/main.js +11 -11
- package/vue.config.js +34 -34
|
@@ -1,353 +1,356 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div :style = "{ background: stash === 'HBJK' ? '#1373FF' : '#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' : '#1373FF',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" class="menu-item-wrapper">
|
|
34
|
-
<span :key="child.childName" class="menu-item-content">
|
|
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 { getMenuList as getMenuListInit, 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: ''
|
|
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: getMenuListInit(this.stash),
|
|
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
|
-
// 针对HBJK的标签管理,从菜单权限数据中获取动态路径
|
|
189
|
-
if (this.stash === 'HBJK' && nameStr === '标签管理') {
|
|
190
|
-
const menuItem = this.sessionMenu.find(item => item.name === '标签管理');
|
|
191
|
-
if (menuItem && menuItem.path) {
|
|
192
|
-
window.open(menuItem.path, '_blank');
|
|
193
|
-
return;
|
|
194
|
-
}
|
|
195
|
-
}
|
|
196
|
-
|
|
197
|
-
let thirdPartyServiceJumpPath = ""; // 第三方服务跳转路径
|
|
198
|
-
switch (nameStr) {
|
|
199
|
-
case '平台运行总览':
|
|
200
|
-
thirdPartyServiceJumpPath = '/dataadmin/#/overview'
|
|
201
|
-
return;
|
|
202
|
-
case '知识图谱':
|
|
203
|
-
thirdPartyServiceJumpPath = await this.getUrl('knowledge')
|
|
204
|
-
break;
|
|
205
|
-
case '数据可视化':
|
|
206
|
-
thirdPartyServiceJumpPath = await this.getUrl('dataview')
|
|
207
|
-
break;
|
|
208
|
-
case '数据填报':
|
|
209
|
-
thirdPartyServiceJumpPath = await this.getUrl('datafill')
|
|
210
|
-
break;
|
|
211
|
-
case '数据直报':
|
|
212
|
-
thirdPartyServiceJumpPath = await this.getUrl('sjzb')
|
|
213
|
-
break;
|
|
214
|
-
case '标签分析':
|
|
215
|
-
thirdPartyServiceJumpPath = await this.getUrl('indicator')
|
|
216
|
-
break
|
|
217
|
-
case '机器学习组件':
|
|
218
|
-
thirdPartyServiceJumpPath = await this.getUrl('machineLearning')
|
|
219
|
-
break
|
|
220
|
-
case '数据标签':
|
|
221
|
-
thirdPartyServiceJumpPath = '/datatag/';
|
|
222
|
-
break;
|
|
223
|
-
case "数据集成":
|
|
224
|
-
thirdPartyServiceJumpPath = "/datacollect/";
|
|
225
|
-
break;
|
|
226
|
-
case "数据治理":
|
|
227
|
-
thirdPartyServiceJumpPath = "/datamanage/";
|
|
228
|
-
break;
|
|
229
|
-
case "数据标准":
|
|
230
|
-
thirdPartyServiceJumpPath = "/datastandard/";
|
|
231
|
-
break;
|
|
232
|
-
case "元数据管理":
|
|
233
|
-
thirdPartyServiceJumpPath = "/metadata/";
|
|
234
|
-
break;
|
|
235
|
-
case "数据质量":
|
|
236
|
-
thirdPartyServiceJumpPath = "/quality/";
|
|
237
|
-
break;
|
|
238
|
-
case "离线开发":
|
|
239
|
-
thirdPartyServiceJumpPath = "/datadev/";
|
|
240
|
-
break;
|
|
241
|
-
case "实时开发":
|
|
242
|
-
thirdPartyServiceJumpPath = "/dataanalytic/";
|
|
243
|
-
break;
|
|
244
|
-
case "数据服务":
|
|
245
|
-
thirdPartyServiceJumpPath = "/dataservice/";
|
|
246
|
-
break;
|
|
247
|
-
case "数据资产":
|
|
248
|
-
thirdPartyServiceJumpPath = "/dataasset/";
|
|
249
|
-
break;
|
|
250
|
-
case "数据共享":
|
|
251
|
-
thirdPartyServiceJumpPath = "/datasharing/";
|
|
252
|
-
break;
|
|
253
|
-
case "运维中心":
|
|
254
|
-
thirdPartyServiceJumpPath = "/operate/";
|
|
255
|
-
break;
|
|
256
|
-
case "消息中心":
|
|
257
|
-
thirdPartyServiceJumpPath = "/alert/";
|
|
258
|
-
break;
|
|
259
|
-
case "数据安全":
|
|
260
|
-
thirdPartyServiceJumpPath = "/datasecurity/";
|
|
261
|
-
break;
|
|
262
|
-
case "
|
|
263
|
-
thirdPartyServiceJumpPath = "/admin-ui/catalog";
|
|
264
|
-
break;
|
|
265
|
-
case "
|
|
266
|
-
thirdPartyServiceJumpPath = "/admin-ui/catalog-
|
|
267
|
-
break;
|
|
268
|
-
case "
|
|
269
|
-
thirdPartyServiceJumpPath = "/admin-ui/
|
|
270
|
-
break;
|
|
271
|
-
case "
|
|
272
|
-
thirdPartyServiceJumpPath =
|
|
273
|
-
break;
|
|
274
|
-
case "
|
|
275
|
-
thirdPartyServiceJumpPath = '/admin-ui/
|
|
276
|
-
break;
|
|
277
|
-
case
|
|
278
|
-
thirdPartyServiceJumpPath = '/admin-ui/
|
|
279
|
-
break;
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
}
|
|
286
|
-
if (['
|
|
287
|
-
|
|
288
|
-
}
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
const
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
}
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
}
|
|
353
|
-
|
|
1
|
+
<template>
|
|
2
|
+
<div :style = "{ background: stash === 'HBJK' ? '#1373FF' : '#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' : '#1373FF',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" class="menu-item-wrapper">
|
|
34
|
+
<span :key="child.childName" class="menu-item-content">
|
|
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 { getMenuList as getMenuListInit, 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: ''
|
|
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: getMenuListInit(this.stash),
|
|
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
|
+
// 针对HBJK的标签管理,从菜单权限数据中获取动态路径
|
|
189
|
+
if (this.stash === 'HBJK' && nameStr === '标签管理') {
|
|
190
|
+
const menuItem = this.sessionMenu.find(item => item.name === '标签管理');
|
|
191
|
+
if (menuItem && menuItem.path) {
|
|
192
|
+
window.open(menuItem.path, '_blank');
|
|
193
|
+
return;
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
let thirdPartyServiceJumpPath = ""; // 第三方服务跳转路径
|
|
198
|
+
switch (nameStr) {
|
|
199
|
+
case '平台运行总览':
|
|
200
|
+
thirdPartyServiceJumpPath = '/dataadmin/#/overview'
|
|
201
|
+
return;
|
|
202
|
+
case '知识图谱':
|
|
203
|
+
thirdPartyServiceJumpPath = await this.getUrl('knowledge')
|
|
204
|
+
break;
|
|
205
|
+
case '数据可视化':
|
|
206
|
+
thirdPartyServiceJumpPath = await this.getUrl('dataview')
|
|
207
|
+
break;
|
|
208
|
+
case '数据填报':
|
|
209
|
+
thirdPartyServiceJumpPath = await this.getUrl('datafill')
|
|
210
|
+
break;
|
|
211
|
+
case '数据直报':
|
|
212
|
+
thirdPartyServiceJumpPath = await this.getUrl('sjzb')
|
|
213
|
+
break;
|
|
214
|
+
case '标签分析':
|
|
215
|
+
thirdPartyServiceJumpPath = await this.getUrl('indicator')
|
|
216
|
+
break
|
|
217
|
+
case '机器学习组件':
|
|
218
|
+
thirdPartyServiceJumpPath = await this.getUrl('machineLearning')
|
|
219
|
+
break
|
|
220
|
+
case '数据标签':
|
|
221
|
+
thirdPartyServiceJumpPath = '/datatag/';
|
|
222
|
+
break;
|
|
223
|
+
case "数据集成":
|
|
224
|
+
thirdPartyServiceJumpPath = "/datacollect/";
|
|
225
|
+
break;
|
|
226
|
+
case "数据治理":
|
|
227
|
+
thirdPartyServiceJumpPath = "/datamanage/";
|
|
228
|
+
break;
|
|
229
|
+
case "数据标准":
|
|
230
|
+
thirdPartyServiceJumpPath = "/datastandard/";
|
|
231
|
+
break;
|
|
232
|
+
case "元数据管理":
|
|
233
|
+
thirdPartyServiceJumpPath = "/metadata/";
|
|
234
|
+
break;
|
|
235
|
+
case "数据质量":
|
|
236
|
+
thirdPartyServiceJumpPath = "/quality/";
|
|
237
|
+
break;
|
|
238
|
+
case "离线开发":
|
|
239
|
+
thirdPartyServiceJumpPath = "/datadev/";
|
|
240
|
+
break;
|
|
241
|
+
case "实时开发":
|
|
242
|
+
thirdPartyServiceJumpPath = "/dataanalytic/";
|
|
243
|
+
break;
|
|
244
|
+
case "数据服务":
|
|
245
|
+
thirdPartyServiceJumpPath = "/dataservice/";
|
|
246
|
+
break;
|
|
247
|
+
case "数据资产":
|
|
248
|
+
thirdPartyServiceJumpPath = "/dataasset/";
|
|
249
|
+
break;
|
|
250
|
+
case "数据共享":
|
|
251
|
+
thirdPartyServiceJumpPath = "/datasharing/";
|
|
252
|
+
break;
|
|
253
|
+
case "运维中心":
|
|
254
|
+
thirdPartyServiceJumpPath = "/operate/";
|
|
255
|
+
break;
|
|
256
|
+
case "消息中心":
|
|
257
|
+
thirdPartyServiceJumpPath = "/alert/";
|
|
258
|
+
break;
|
|
259
|
+
case "数据安全":
|
|
260
|
+
thirdPartyServiceJumpPath = "/datasecurity/";
|
|
261
|
+
break;
|
|
262
|
+
case "目录管理":
|
|
263
|
+
thirdPartyServiceJumpPath = "/admin-ui/catalog";
|
|
264
|
+
break;
|
|
265
|
+
case "目录编制":
|
|
266
|
+
thirdPartyServiceJumpPath = "/admin-ui/catalog-compile";
|
|
267
|
+
break;
|
|
268
|
+
case "目录中心":
|
|
269
|
+
thirdPartyServiceJumpPath = "/admin-ui/catalog-center";
|
|
270
|
+
break;
|
|
271
|
+
case "资源管理":
|
|
272
|
+
thirdPartyServiceJumpPath = "/admin-ui/resource/tableResource/list";
|
|
273
|
+
break;
|
|
274
|
+
case "供需对接":
|
|
275
|
+
thirdPartyServiceJumpPath = '/admin-ui/supply-and-demand-docking/dataRequirement/propose/list';
|
|
276
|
+
break;
|
|
277
|
+
case "数据直达":
|
|
278
|
+
thirdPartyServiceJumpPath = '/admin-ui/cascade';
|
|
279
|
+
break;
|
|
280
|
+
case '综合评价系统':
|
|
281
|
+
thirdPartyServiceJumpPath = '/admin-ui/evaluate';
|
|
282
|
+
break;
|
|
283
|
+
default:
|
|
284
|
+
break;
|
|
285
|
+
}
|
|
286
|
+
if (['公共卫生监测人口库', '电子传染病档案库', '应急资源库', '传染病防控知识库', '主题库'].includes(nameStr)) {
|
|
287
|
+
thirdPartyServiceJumpPath = `/data-resource-center/data-source/list?menuName=${nameStr}`
|
|
288
|
+
}
|
|
289
|
+
if (['平台运行总览', '知识图谱', '数据可视化', '数据填报', '标签分析', '数据直报', '机器学习组件'].includes(nameStr)) {
|
|
290
|
+
window.open(thirdPartyServiceJumpPath, '_blank')
|
|
291
|
+
} else {
|
|
292
|
+
location.href = thirdPartyServiceJumpPath
|
|
293
|
+
}
|
|
294
|
+
},
|
|
295
|
+
// 跳转首页
|
|
296
|
+
toHomePage (index) {
|
|
297
|
+
if (index === 0) {
|
|
298
|
+
let url = ''
|
|
299
|
+
if (["integration", 'LNRD', 'HBJK'].includes(this.stash)) {
|
|
300
|
+
url = '/dataadmin/#/index'
|
|
301
|
+
} else if (this.stash === "GZW") {
|
|
302
|
+
url = '/data-platform/#/index'
|
|
303
|
+
} else if (this.stash === "PANWEI") {
|
|
304
|
+
url = '/bigdata-portal/#/index'
|
|
305
|
+
} else {
|
|
306
|
+
url = '/#/index'
|
|
307
|
+
}
|
|
308
|
+
location.href = url
|
|
309
|
+
}
|
|
310
|
+
},
|
|
311
|
+
getNewMenuList () {
|
|
312
|
+
let newMenuList = this.stash === 'LNRD' ? [...lnrdMenuList] : this.stash === 'PANWEI' ? [...this.menuList_PANWEI] : [...this.menuListInit];
|
|
313
|
+
if (this.sessionMenu) {
|
|
314
|
+
const pathList = [...this.sessionMenu].map(item => item.path)
|
|
315
|
+
const nameList = [...this.sessionMenu].map((item) => item.name); // 添加按名称匹配的列表
|
|
316
|
+
|
|
317
|
+
// 过滤掉没有权限的子菜单(PS:如果模块下面子菜单都没有,则不显示该模块)
|
|
318
|
+
for (let index = newMenuList.length - 1; index >= 0; index--) {
|
|
319
|
+
const menuItem = newMenuList[index]
|
|
320
|
+
for (let index_ch = menuItem.children.length - 1; index_ch >= 0; index_ch--) {
|
|
321
|
+
const child = menuItem.children[index_ch]
|
|
322
|
+
|
|
323
|
+
// 对于HBJK的标签管理,使用名称匹配而不是path匹配
|
|
324
|
+
const hasPermission = (this.stash === 'HBJK' && child.childName === '标签管理')
|
|
325
|
+
? nameList.includes('标签管理')
|
|
326
|
+
: pathList.includes(child.path);
|
|
327
|
+
|
|
328
|
+
if (!hasPermission) {
|
|
329
|
+
newMenuList[index].children.splice(index_ch, 1)
|
|
330
|
+
}
|
|
331
|
+
}
|
|
332
|
+
if (menuItem.children.length === 0 && menuItem.name !== '首页') {
|
|
333
|
+
newMenuList.splice(index, 1)
|
|
334
|
+
}
|
|
335
|
+
}
|
|
336
|
+
}
|
|
337
|
+
console.log("menuList_HBJK")
|
|
338
|
+
if (this.stash === 'HBJK') {
|
|
339
|
+
newMenuList = [...newMenuList, ...menuList_HBJK]
|
|
340
|
+
console.log("add menuList_HBJK===", newMenuList)
|
|
341
|
+
}
|
|
342
|
+
this.menuList = [...newMenuList];
|
|
343
|
+
console.log("finally menuList===", newMenuList)
|
|
344
|
+
},
|
|
345
|
+
}
|
|
346
|
+
}
|
|
347
|
+
</script>
|
|
348
|
+
<style scoped>
|
|
349
|
+
.iconPad{
|
|
350
|
+
width: 15px;
|
|
351
|
+
height: 15px;
|
|
352
|
+
}
|
|
353
|
+
.imgWidth{
|
|
354
|
+
width: 20px;
|
|
355
|
+
}
|
|
356
|
+
</style>
|