n20-common-lib 2.7.0-beta.2 → 2.7.0-beta.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/assets/.DS_Store +0 -0
- package/src/assets/css/_coreLib.scss +4 -1
- package/src/assets/css/advanced-filter.scss +356 -0
- package/src/assets/css/cl-layout-header.scss +79 -15
- package/src/assets/css/cl-pagination.scss +34 -4
- package/src/assets/css/{cl-dialog.scss → dialog.scss} +10 -7
- package/src/assets/css/filter.scss +1 -178
- package/src/assets/css/font-icon.scss +3 -8
- package/src/assets/css/normalize.scss +12 -1
- package/src/assets/getJsonc.js +2 -2
- package/src/assets/iconFont/demo_index.html +1950 -1129
- package/src/assets/iconFont/iconfont.css +182 -68
- package/src/assets/iconFont/iconfont.js +1 -66
- package/src/assets/iconFont/iconfont.json +196 -0
- package/src/assets/iconFont/iconfont.ttf +0 -0
- package/src/assets/iconFont/iconfont.woff +0 -0
- package/src/assets/iconFont/iconfont.woff2 +0 -0
- package/src/assets/realUrl.js +1 -1
- package/src/components/.DS_Store +0 -0
- package/src/components/AdvancedFilter/filterItem.vue +7 -1
- package/src/components/AdvancedFilter/formItemRender.vue +248 -63
- package/src/components/AdvancedFilter/index.vue +113 -23
- package/src/components/AdvancedFilter/main/Form/form-item.vue +87 -0
- package/src/components/AdvancedFilter/main/Form/form.vue +59 -0
- package/src/components/AdvancedFilter/main/index.vue +34 -0
- package/src/components/AdvancedFilter/utils.js +2 -4
- package/src/components/Anchor/AnchorItem.vue +5 -0
- package/src/components/Anchor/index.vue +23 -1
- package/src/components/ApprovalButtons/index.vue +49 -10
- package/src/components/ApprovalButtons/showAppOpi.vue +5 -3
- package/src/components/ApprovalCard/index.vue +1 -1
- package/src/components/DateChoose/index.vue +278 -0
- package/src/components/DatePicker/por.vue +1 -1
- package/src/components/Descriptions/index.vue +4 -0
- package/src/components/ElectronicArchive/index.vue +1 -0
- package/src/components/FileUploadTable/index.vue +93 -28
- package/src/components/InputNumber/index.vue +1 -0
- package/src/components/Layout/HeaderWrap/changePwd.vue +2 -2
- package/src/components/Layout/HeaderWrap/indexN.vue +151 -84
- package/src/components/Layout/HeaderWrap/menuDrawer.vue +47 -38
- package/src/components/Layout/indexN.vue +30 -5
- package/src/components/LoginTemporary/indexN.vue +10 -57
- package/src/components/Pagination/index.vue +25 -137
- package/src/components/Pagination/remotePagination.vue +201 -0
- package/src/components/Pagination/staticPagination.vue +156 -0
- package/src/components/SecondaryTab/index.vue +27 -1
- package/src/components/TablePro/index.vue +15 -8
- package/src/directives/VRuleKey/index.js +5 -4
- package/src/index.js +3 -4
- package/src/plugins/Print/.DS_Store +0 -0
- package/style/fonts/iconfont.1676b4d9.woff2 +0 -0
- package/{src/assets/iconFont5/iconfont.ttf → style/fonts/iconfont.2be34155.ttf} +0 -0
- package/style/fonts/iconfont.ac432622.woff +0 -0
- package/style/index.css +2 -2
- package/theme/blue.css +2 -2
- package/theme/cctcRed.css +2 -2
- package/theme/fonts/iconfont.1676b4d9.woff2 +0 -0
- package/{style/fonts/iconfont.06971f9f.ttf → theme/fonts/iconfont.2be34155.ttf} +0 -0
- package/theme/fonts/iconfont.ac432622.woff +0 -0
- package/theme/green.css +2 -2
- package/theme/lightBlue.css +2 -2
- package/theme/orange.css +2 -2
- package/theme/purple.css +2 -2
- package/theme/red.css +2 -2
- package/theme/yellow.css +2 -2
- package/src/assets/iconFont3/demo.css +0 -539
- package/src/assets/iconFont3/demo_index.html +0 -1936
- package/src/assets/iconFont3/iconfont.css +0 -319
- package/src/assets/iconFont3/iconfont.js +0 -1
- package/src/assets/iconFont3/iconfont.json +0 -541
- package/src/assets/iconFont3/iconfont.ttf +0 -0
- package/src/assets/iconFont3/iconfont.woff +0 -0
- package/src/assets/iconFont3/iconfont.woff2 +0 -0
- package/src/assets/iconFont4/demo.css +0 -539
- package/src/assets/iconFont4/demo_index.html +0 -2005
- package/src/assets/iconFont4/iconfont.css +0 -331
- package/src/assets/iconFont4/iconfont.js +0 -1
- package/src/assets/iconFont4/iconfont.json +0 -562
- package/src/assets/iconFont4/iconfont.ttf +0 -0
- package/src/assets/iconFont4/iconfont.woff +0 -0
- package/src/assets/iconFont4/iconfont.woff2 +0 -0
- package/src/assets/iconFont5/demo.css +0 -539
- package/src/assets/iconFont5/demo_index.html +0 -2281
- package/src/assets/iconFont5/iconfont.css +0 -379
- package/src/assets/iconFont5/iconfont.js +0 -1
- package/src/assets/iconFont5/iconfont.json +0 -646
- package/src/assets/iconFont5/iconfont.woff +0 -0
- package/src/assets/iconFont5/iconfont.woff2 +0 -0
- package/src/components/Pagination/mixins/index.js +0 -39
- package/style/fonts/iconfont.47f5da25.woff2 +0 -0
- package/style/fonts/iconfont.6ad948fe.woff +0 -0
- package/style/fonts/iconfont.76d19005.woff2 +0 -0
- package/style/fonts/iconfont.84848783.woff2 +0 -0
- package/style/fonts/iconfont.85c70ef9.ttf +0 -0
- package/style/fonts/iconfont.a3597821.woff +0 -0
- package/style/fonts/iconfont.ab8c366d.ttf +0 -0
- package/style/fonts/iconfont.b7ea4726.woff +0 -0
- package/style/fonts/iconfont.e6bdbf43.woff2 +0 -0
- package/style/fonts/iconfont.f1777a50.woff +0 -0
- package/style/fonts/iconfont.fbdd69b3.ttf +0 -0
|
@@ -19,17 +19,16 @@
|
|
|
19
19
|
/>
|
|
20
20
|
<!-- <el-divider class="header-wrap-logo-hr" direction="vertical" /> -->
|
|
21
21
|
<div class="m-l-m"></div>
|
|
22
|
-
<h3 class="header-title m-r-s">{{ headerTitle | $l }}</h3>
|
|
23
|
-
<div class="m-r-auto p-a-ss pointer header_change_system_box" @click="handleChangeSystem">
|
|
22
|
+
<h3 :class="['header-title ', showNavigation ? 'm-r-s' : 'm-r-auto']">{{ headerTitle | $l }}</h3>
|
|
23
|
+
<div v-if="showNavigation" class="m-r-auto p-a-ss pointer header_change_system_box" @click="handleChangeSystem">
|
|
24
24
|
<svg class="icon" aria-hidden="true">
|
|
25
25
|
<use xlink:href="#n20-icon-caidan"></use>
|
|
26
26
|
</svg>
|
|
27
|
-
<span class="m-l-ss f-s-b color-primary"
|
|
27
|
+
<span class="m-l-ss f-s-b color-primary">{{ $lc('导航') }}</span>
|
|
28
28
|
<svg class="icon m-l-ss f-s-s" aria-hidden="true">
|
|
29
29
|
<use xlink:href="#n20-icon-lujing"></use>
|
|
30
30
|
</svg>
|
|
31
31
|
</div>
|
|
32
|
-
<menuDrawer :visible.sync="menuDrawer" :menus="headerSystem" :callback="getTreeList"></menuDrawer>
|
|
33
32
|
|
|
34
33
|
<span v-if="byLabel && !inBack" class="header-uif-by">{{ byLabel }}</span>
|
|
35
34
|
<!-- YSCW -->
|
|
@@ -78,20 +77,12 @@
|
|
|
78
77
|
</el-dropdown-menu>
|
|
79
78
|
</el-dropdown>
|
|
80
79
|
|
|
81
|
-
<el-tooltip v-if="!hideHelpDoc" :content="'帮助文档' | $lc">
|
|
82
|
-
<span class="set-user-btn iconfont icon-bangzhuwendang header-color m-l-lg" @click="openHelp"></span>
|
|
83
|
-
</el-tooltip>
|
|
84
|
-
|
|
85
|
-
<el-tooltip v-if="!hideDowApp" :content="'客户端下载' | $lc">
|
|
86
|
-
<span class="set-user-btn iconfont icon-kehuduanxiazai header-color m-l-lg" @click="dowApp"></span>
|
|
87
|
-
</el-tooltip>
|
|
88
|
-
|
|
89
80
|
<el-badge :hidden="noticeNum + afficheNum === 0" :value="noticeNum + afficheNum">
|
|
90
81
|
<span v-if="!noticeDrw" v-popover:noticePop class="news-btn iconfont icon-xiaoxi header-color"></span>
|
|
91
82
|
<span v-else class="news-btn iconfont icon-xiaoxi header-color" @click="customOpt.noticeDrawer"></span>
|
|
92
83
|
</el-badge>
|
|
93
84
|
|
|
94
|
-
<el-popover ref="by_popover" v-model="byV" placement="bottom-start" trigger="manual" popper-class="uby-w">
|
|
85
|
+
<!-- <el-popover ref="by_popover" v-model="byV" placement="bottom-start" trigger="manual" popper-class="uby-w">
|
|
95
86
|
<div class="uby-h flex-box flex-v">
|
|
96
87
|
<i class="uby-h-icon iconfont icon-icon_huanyingmoshi"></i>
|
|
97
88
|
<span
|
|
@@ -103,7 +94,7 @@
|
|
|
103
94
|
<div class="text-r">
|
|
104
95
|
<el-button type="primary" @click="byV = false">{{ '知道了' | $lc }}</el-button>
|
|
105
96
|
</div>
|
|
106
|
-
</el-popover>
|
|
97
|
+
</el-popover> -->
|
|
107
98
|
|
|
108
99
|
<el-dropdown
|
|
109
100
|
ref="userDrop"
|
|
@@ -215,6 +206,24 @@
|
|
|
215
206
|
</el-dropdown-menu>
|
|
216
207
|
</el-dropdown>
|
|
217
208
|
</el-dropdown-item>
|
|
209
|
+
<el-dropdown-item v-if="!inBack" command="toBack">
|
|
210
|
+
<div class="flex-box flex-v">
|
|
211
|
+
<span>{{ '后台管理' | $lc }}</span>
|
|
212
|
+
<i class="el-icon-caret-right m-l-auto m-r-0"></i>
|
|
213
|
+
</div>
|
|
214
|
+
</el-dropdown-item>
|
|
215
|
+
<el-dropdown-item v-if="!hideHelpDoc" command="openHelp">
|
|
216
|
+
<div class="flex-box flex-v">
|
|
217
|
+
<span>{{ '帮助文档' | $lc }}</span>
|
|
218
|
+
<i class="el-icon-caret-right m-l-auto m-r-0"></i>
|
|
219
|
+
</div>
|
|
220
|
+
</el-dropdown-item>
|
|
221
|
+
<el-dropdown-item v-if="!hideDowApp" command="dowApp">
|
|
222
|
+
<div class="flex-box flex-v">
|
|
223
|
+
<span>{{ '客户端下载' | $lc }}</span>
|
|
224
|
+
<i class="el-icon-caret-right m-l-auto m-r-0"></i>
|
|
225
|
+
</div>
|
|
226
|
+
</el-dropdown-item>
|
|
218
227
|
<!-- 系统切换 -->
|
|
219
228
|
<el-dropdown-item v-if="systemChange && systemList && systemList.length">
|
|
220
229
|
<el-dropdown trigger="hover" size="medium" placement="left-start" style="width: 100%">
|
|
@@ -223,18 +232,12 @@
|
|
|
223
232
|
<i class="el-icon-caret-right m-l-auto m-r-0"></i>
|
|
224
233
|
</div>
|
|
225
234
|
<el-dropdown-menu slot="dropdown">
|
|
226
|
-
<el-dropdown-item v-for="(item, i) in systemList" :key="i" @click.native="
|
|
235
|
+
<el-dropdown-item v-for="(item, i) in systemList" :key="i" @click.native="clickSystemChange(item)">
|
|
227
236
|
<span>{{ item.NAME }}</span>
|
|
228
237
|
</el-dropdown-item>
|
|
229
238
|
</el-dropdown-menu>
|
|
230
239
|
</el-dropdown>
|
|
231
240
|
</el-dropdown-item>
|
|
232
|
-
<el-dropdown-item v-if="!inBack" command="toBack">
|
|
233
|
-
<div class="flex-box flex-v">
|
|
234
|
-
<span>{{ '后台管理' | $lc }}</span>
|
|
235
|
-
<i class="el-icon-caret-right m-l-auto m-r-0"></i>
|
|
236
|
-
</div>
|
|
237
|
-
</el-dropdown-item>
|
|
238
241
|
<slot name="header-dropdown"></slot>
|
|
239
242
|
<el-dropdown-item command="logOut">
|
|
240
243
|
<div class="flex-box flex-v">
|
|
@@ -285,7 +288,6 @@ import { themeList } from '../../../utils/theme.config'
|
|
|
285
288
|
import dialogWrap from '../../Dialog/index.vue'
|
|
286
289
|
import operatingStatus from '../../operatingStatus/index.vue'
|
|
287
290
|
import changePwd from './changePwd.vue'
|
|
288
|
-
import menuDrawer from './menuDrawer.vue'
|
|
289
291
|
import noticePop from './noticePop.vue'
|
|
290
292
|
import switchUser from './switchUser.vue'
|
|
291
293
|
|
|
@@ -301,22 +303,86 @@ dayjs.extend(duration)
|
|
|
301
303
|
import { siteTree2menus } from '../../LoginTemporary/utils'
|
|
302
304
|
|
|
303
305
|
const prefix = window.__INJECTED_PUBLIC_PATH_BY_QIANKUN__ || process.env.BASE_URL || '/'
|
|
304
|
-
|
|
306
|
+
const SYSTEM_LIST = [
|
|
307
|
+
{
|
|
308
|
+
NO: 'CSZHYW',
|
|
309
|
+
NAME: '财司综合业务系统',
|
|
310
|
+
ICON: '',
|
|
311
|
+
LOGIN_MODE: ['account'],
|
|
312
|
+
LOGIN_FORGET_MODE: ['phoneCode'],
|
|
313
|
+
OPEN: true
|
|
314
|
+
},
|
|
315
|
+
{
|
|
316
|
+
NO: 'CSYWGL',
|
|
317
|
+
NAME: '财司业务管理系统',
|
|
318
|
+
ICON: '',
|
|
319
|
+
LOGIN_MODE: ['account'],
|
|
320
|
+
LOGIN_FORGET_MODE: [],
|
|
321
|
+
OPEN: true
|
|
322
|
+
},
|
|
323
|
+
{
|
|
324
|
+
NO: 'CSFZJC',
|
|
325
|
+
NAME: '财司辅助决策系统',
|
|
326
|
+
ICON: '',
|
|
327
|
+
LOGIN_MODE: ['pthon'],
|
|
328
|
+
LOGIN_FORGET_MODE: ['ukCode'],
|
|
329
|
+
OPEN: true
|
|
330
|
+
},
|
|
331
|
+
{
|
|
332
|
+
NO: 'CSWY',
|
|
333
|
+
NAME: '财司网银系统',
|
|
334
|
+
ICON: '',
|
|
335
|
+
LOGIN_MODE: ['qrcode', 'account'],
|
|
336
|
+
LOGIN_FORGET_MODE: ['phoneCode'],
|
|
337
|
+
OPEN: true
|
|
338
|
+
},
|
|
339
|
+
{
|
|
340
|
+
NO: 'JTZL',
|
|
341
|
+
NAME: '财司直连平台系统',
|
|
342
|
+
ICON: '',
|
|
343
|
+
LOGIN_MODE: ['accountPthon'],
|
|
344
|
+
LOGIN_FORGET_MODE: ['phoneCode'],
|
|
345
|
+
OPEN: true
|
|
346
|
+
},
|
|
347
|
+
{
|
|
348
|
+
NO: 'JRWG',
|
|
349
|
+
NAME: '金融网关系统',
|
|
350
|
+
ICON: '',
|
|
351
|
+
LOGIN_MODE: ['account'],
|
|
352
|
+
LOGIN_FORGET_MODE: ['ukCode'],
|
|
353
|
+
OPEN: true
|
|
354
|
+
},
|
|
355
|
+
{
|
|
356
|
+
NO: 'JTSKYWGK',
|
|
357
|
+
NAME: '集团司库业务管控系统',
|
|
358
|
+
ICON: '',
|
|
359
|
+
LOGIN_FORGET_MODE: ['phoneCode'],
|
|
360
|
+
LOGIN_MODE: ['pthon', 'account'],
|
|
361
|
+
OPEN: true
|
|
362
|
+
},
|
|
363
|
+
{
|
|
364
|
+
NO: 'JTSKSJFX',
|
|
365
|
+
NAME: '集团数据分析系统',
|
|
366
|
+
ICON: '',
|
|
367
|
+
LOGIN_FORGET_MODE: ['phoneCode'],
|
|
368
|
+
LOGIN_MODE: ['account'],
|
|
369
|
+
OPEN: true
|
|
370
|
+
}
|
|
371
|
+
]
|
|
305
372
|
export default {
|
|
306
373
|
components: {
|
|
307
374
|
dialogWrap,
|
|
308
375
|
changePwd,
|
|
309
376
|
noticePop,
|
|
310
377
|
switchUser,
|
|
311
|
-
operatingStatus
|
|
312
|
-
menuDrawer
|
|
378
|
+
operatingStatus
|
|
313
379
|
},
|
|
314
380
|
props: {
|
|
315
381
|
beforeLogout: {
|
|
316
382
|
type: Function,
|
|
317
383
|
default: undefined
|
|
318
384
|
},
|
|
319
|
-
|
|
385
|
+
drawerVisible: {
|
|
320
386
|
type: Boolean,
|
|
321
387
|
default: false
|
|
322
388
|
},
|
|
@@ -357,6 +423,8 @@ export default {
|
|
|
357
423
|
hideTheme: undefined,
|
|
358
424
|
userInfo: {},
|
|
359
425
|
userMd: undefined,
|
|
426
|
+
showNavigation: false,
|
|
427
|
+
systemChange: false,
|
|
360
428
|
userNo: window.sessionStorage.getItem('userNo'),
|
|
361
429
|
durationTime: $lc('00小时00分00秒'),
|
|
362
430
|
cpwdV: false,
|
|
@@ -375,7 +443,6 @@ export default {
|
|
|
375
443
|
byV: false,
|
|
376
444
|
byLabel: '',
|
|
377
445
|
byEV: false,
|
|
378
|
-
menuDrawer: false,
|
|
379
446
|
headerUserInfoBg: realUrl('/server-assets/userInfoBg.png'),
|
|
380
447
|
inBack: window.localStorage.getItem('pageInType') === 'inBack'
|
|
381
448
|
}
|
|
@@ -388,25 +455,30 @@ export default {
|
|
|
388
455
|
created() {
|
|
389
456
|
getJsonc('/server-config.jsonc').then(({ _layoutData = {}, loginSetting }) => {
|
|
390
457
|
let _loginSetting = loginSetting || _layoutData.loginSetting
|
|
391
|
-
this.headerLogoUrl = realUrl(_layoutData.headerLogoUrl
|
|
458
|
+
this.headerLogoUrl = realUrl(_layoutData.headerLogoUrl)
|
|
392
459
|
this.headerLogoWidth = _layoutData.headerLogoWidth
|
|
393
460
|
this.headerLogoHeight = _layoutData.headerLogoHeight
|
|
394
461
|
this.headerTitle = _layoutData.headerTitle
|
|
395
462
|
this.headerColor = _layoutData.headerColor
|
|
396
|
-
this.headerBgUrl = realUrl(_layoutData.headerBgUrl
|
|
463
|
+
this.headerBgUrl = realUrl(_layoutData.headerBgUrl)
|
|
397
464
|
this.headerBgColor = _layoutData.headerBgColor
|
|
398
465
|
this.hideHelpDoc = _layoutData.hideHelpDoc
|
|
399
466
|
this.hideLang = _layoutData.hideLang
|
|
400
467
|
this.hideDowApp = _layoutData.hideDowApp
|
|
401
468
|
this.hideTheme = _layoutData.hideTheme
|
|
469
|
+
this.showNavigation = _layoutData.showNavigation
|
|
470
|
+
this.systemChange = _layoutData.systemChange
|
|
402
471
|
|
|
403
472
|
if (_loginSetting !== 'JSON') {
|
|
404
473
|
this.headerTitle = sessionStorage.getItem('headerTitle') || this.headerTitle
|
|
405
474
|
}
|
|
475
|
+
if (this.systemChange) {
|
|
476
|
+
this.systemList = JSON.parse(localStorage.getItem('SYSTEM_LIST')) || SYSTEM_LIST
|
|
477
|
+
}
|
|
406
478
|
this.show = true
|
|
407
479
|
|
|
408
480
|
this.getUserImg().catch(() => {
|
|
409
|
-
this.headerUserUrl = realUrl(_layoutData.headerUserUrl
|
|
481
|
+
this.headerUserUrl = realUrl(_layoutData.headerUserUrl)
|
|
410
482
|
})
|
|
411
483
|
|
|
412
484
|
this.getByLabel().then(() => {
|
|
@@ -420,7 +492,6 @@ export default {
|
|
|
420
492
|
}
|
|
421
493
|
})
|
|
422
494
|
})
|
|
423
|
-
this.systemChange && this.getSystemList()
|
|
424
495
|
this.getNNum()
|
|
425
496
|
document.addEventListener('visibilitychange', this.getNNum)
|
|
426
497
|
window.addEventListener('message', this.updateNotice)
|
|
@@ -440,68 +511,58 @@ export default {
|
|
|
440
511
|
window.removeEventListener('message', this.updateNotice)
|
|
441
512
|
},
|
|
442
513
|
methods: {
|
|
443
|
-
handleChangeSystem() {
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
514
|
+
async handleChangeSystem() {
|
|
515
|
+
let menuTree = JSON.parse(sessionStorage.getItem('allMenuTree'))
|
|
516
|
+
this.setMenuData(menuTree)
|
|
517
|
+
},
|
|
518
|
+
setMenuData(menuTree) {
|
|
519
|
+
try {
|
|
520
|
+
this.headerSystem = SYSTEM_LIST.map((system) => {
|
|
521
|
+
const icon =
|
|
522
|
+
{
|
|
523
|
+
CSZHYW: '#n20-icon-zhcsyw',
|
|
524
|
+
CSYWGL: '#n20-icon-bianzu',
|
|
525
|
+
CSFZJC: '#n20-icon-a-bianzu70',
|
|
526
|
+
CSWY: '#n20-icon-a-bianzu69',
|
|
527
|
+
JTZL: '#n20-icon-a-bianzu3',
|
|
528
|
+
JRWG: '#n20-icon-a-bianzu1',
|
|
529
|
+
JTSKYWGK: '#n20-icon-a-bianzu701',
|
|
530
|
+
JTSKSJFX: '#n20-icon-a-bianzu2'
|
|
531
|
+
}[system.NO] || ''
|
|
448
532
|
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
case 'CSWY':
|
|
461
|
-
system_list[i].icon = '#n20-icon-a-bianzu69'
|
|
462
|
-
break
|
|
463
|
-
case 'JTZL':
|
|
464
|
-
system_list[i].icon = '#n20-icon-a-bianzu3'
|
|
465
|
-
break
|
|
466
|
-
case 'JRWG':
|
|
467
|
-
system_list[i].icon = '#n20-icon-a-bianzu1'
|
|
468
|
-
break
|
|
469
|
-
case 'JTSKYWGK':
|
|
470
|
-
system_list[i].icon = '#n20-icon-a-bianzu701'
|
|
471
|
-
break
|
|
472
|
-
case 'JTSKSJFX':
|
|
473
|
-
system_list[i].icon = '#n20-icon-a-bianzu2'
|
|
474
|
-
break
|
|
475
|
-
}
|
|
476
|
-
system_list[i].menuTree = []
|
|
477
|
-
for (let j = 0; j < menuTree.length; j++) {
|
|
478
|
-
if (system_list[i].NO === menuTree[j].systemNo && menuTree[j].isBackmenu === '1') {
|
|
479
|
-
system_list[i].menuTree.push(menuTree[j])
|
|
480
|
-
}
|
|
481
|
-
}
|
|
533
|
+
system.icon = icon
|
|
534
|
+
system.menuTree = menuTree?.filter(
|
|
535
|
+
(menu) =>
|
|
536
|
+
menu.systemNo === system.NO &&
|
|
537
|
+
menu.isBackmenu === '0' &&
|
|
538
|
+
(!menu.children || (menu.children && menu.children?.length > 0))
|
|
539
|
+
)
|
|
540
|
+
return system
|
|
541
|
+
}).filter((item) => item.menuTree?.length > 0)
|
|
542
|
+
} catch (error) {
|
|
543
|
+
console.log(error)
|
|
482
544
|
}
|
|
483
545
|
|
|
484
|
-
this.
|
|
485
|
-
this.
|
|
486
|
-
console.log(this.headerSystem)
|
|
487
|
-
},
|
|
488
|
-
clickMenu(row) {
|
|
489
|
-
this.$router.push(row.route)
|
|
546
|
+
this.$emit('update:drawerVisible', !this.drawerVisible)
|
|
547
|
+
this.$emit('clickSystem', this.headerSystem)
|
|
490
548
|
},
|
|
549
|
+
async clickSystemChange(item) {
|
|
550
|
+
await this.getTreeList(item)
|
|
551
|
+
// localStorage.setItem('pageInType', 'toFront')
|
|
552
|
+
window.localStorage.setItem('pageInSystemNo', item.NO)
|
|
553
|
+
// 切换系统的时候清除缓存的页签
|
|
554
|
+
window.sessionStorage.removeItem('tab-list')
|
|
555
|
+
let { base = '/' } = this.$router.options
|
|
556
|
+
if (!/\/$/.test(base)) base += '/'
|
|
491
557
|
|
|
492
|
-
|
|
493
|
-
* 获取系统列表
|
|
494
|
-
*/
|
|
495
|
-
getSystemList() {
|
|
496
|
-
this.systemList = JSON.parse(localStorage.getItem('SYSTEM_LIST'))
|
|
558
|
+
window.location.href = window.location.origin + base + 'dashboard/workplace'
|
|
497
559
|
},
|
|
498
|
-
async getTreeList(item
|
|
499
|
-
const systemNo = item?.NO
|
|
560
|
+
async getTreeList(item) {
|
|
500
561
|
let { data } = await axios.get(
|
|
501
562
|
`/bems/1.0/menuTree/tree?t=${Date.now()}`,
|
|
502
563
|
{
|
|
503
|
-
resType,
|
|
504
|
-
systemNo
|
|
564
|
+
resType: 1,
|
|
565
|
+
systemNo: item.NO
|
|
505
566
|
},
|
|
506
567
|
{ loading: false }
|
|
507
568
|
)
|
|
@@ -603,6 +664,12 @@ export default {
|
|
|
603
664
|
case 'toBack':
|
|
604
665
|
this.toBack()
|
|
605
666
|
break
|
|
667
|
+
case 'dowApp':
|
|
668
|
+
this.dowApp()
|
|
669
|
+
break
|
|
670
|
+
case 'openHelp':
|
|
671
|
+
this.openHelp()
|
|
672
|
+
break
|
|
606
673
|
default:
|
|
607
674
|
this.$emit('custom-event', { type: c })
|
|
608
675
|
break
|
|
@@ -1,13 +1,6 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<
|
|
3
|
-
|
|
4
|
-
custom-class="header-menu-drawer"
|
|
5
|
-
:with-header="false"
|
|
6
|
-
:appendToBody="true"
|
|
7
|
-
direction="ttb"
|
|
8
|
-
size="45%"
|
|
9
|
-
>
|
|
10
|
-
<div class="pointer flex-box flex-wrap">
|
|
2
|
+
<div class="pointer menu">
|
|
3
|
+
<div class="menu_drawer_layout menu_drawer_box">
|
|
11
4
|
<div v-for="(item, i) in menus" :key="i" class="menu-system-item">
|
|
12
5
|
<div class="flex-box flex-v" @click="clickSystem(item)">
|
|
13
6
|
<svg
|
|
@@ -16,61 +9,77 @@
|
|
|
16
9
|
>
|
|
17
10
|
<use :xlink:href="item.icon"></use>
|
|
18
11
|
</svg>
|
|
19
|
-
<span class="m-l-s">{{ item.NAME }}</span>
|
|
12
|
+
<span class="m-l-s menu-system-item_title">{{ item.NAME }}</span>
|
|
20
13
|
</div>
|
|
21
|
-
<div v-if="item.menuTree.length" class="
|
|
22
|
-
<div
|
|
23
|
-
|
|
14
|
+
<div v-if="item.menuTree.length" class="menu_drawer_layout menu-system-child">
|
|
15
|
+
<div
|
|
16
|
+
v-for="(row, i) in item.menuTree"
|
|
17
|
+
:key="i"
|
|
18
|
+
class="menu-first-item"
|
|
19
|
+
@click="clickMenu(row, item.menuTree)"
|
|
20
|
+
>
|
|
21
|
+
<span class="menu-first-item_title">{{ row.title }}</span>
|
|
24
22
|
</div>
|
|
25
23
|
</div>
|
|
26
24
|
</div>
|
|
27
25
|
</div>
|
|
28
|
-
</
|
|
26
|
+
</div>
|
|
29
27
|
</template>
|
|
30
28
|
|
|
31
29
|
<script>
|
|
30
|
+
import axios from '../../../utils/axios.js'
|
|
31
|
+
import { siteTree2menus } from '../../LoginTemporary/utils'
|
|
32
32
|
export default {
|
|
33
33
|
name: 'MenuDrawer',
|
|
34
34
|
props: {
|
|
35
35
|
menus: {
|
|
36
36
|
type: Array,
|
|
37
37
|
default: () => []
|
|
38
|
-
},
|
|
39
|
-
visible: {
|
|
40
|
-
type: Boolean,
|
|
41
|
-
default: false
|
|
42
|
-
},
|
|
43
|
-
callback: {
|
|
44
|
-
type: Function,
|
|
45
|
-
default: () => {}
|
|
46
|
-
}
|
|
47
|
-
},
|
|
48
|
-
computed: {
|
|
49
|
-
drawer: {
|
|
50
|
-
get() {
|
|
51
|
-
return this.visible
|
|
52
|
-
},
|
|
53
|
-
set(val) {
|
|
54
|
-
this.$emit('update:visible', val)
|
|
55
|
-
}
|
|
56
38
|
}
|
|
57
39
|
},
|
|
58
40
|
methods: {
|
|
41
|
+
async getTreeList(item) {
|
|
42
|
+
let { data } = await axios.get(
|
|
43
|
+
`/bems/1.0/menuTree/tree?t=${Date.now()}`,
|
|
44
|
+
{
|
|
45
|
+
resType: 1,
|
|
46
|
+
systemNo: item.NO
|
|
47
|
+
},
|
|
48
|
+
{ loading: false }
|
|
49
|
+
)
|
|
50
|
+
let layoutMenus = siteTree2menus(data || [])
|
|
51
|
+
sessionStorage.setItem('menuTree', JSON.stringify(layoutMenus))
|
|
52
|
+
},
|
|
59
53
|
async clickSystem(item) {
|
|
60
|
-
|
|
54
|
+
await this.getTreeList(item)
|
|
61
55
|
window.localStorage.setItem('pageInSystemNo', item.NO)
|
|
62
56
|
// 切换系统的时候清除缓存的页签
|
|
63
57
|
window.sessionStorage.removeItem('tab-list')
|
|
64
58
|
let { base = '/' } = this.$router.options
|
|
65
59
|
if (!/\/$/.test(base)) base += '/'
|
|
66
|
-
|
|
67
60
|
window.location.href = window.location.origin + base + 'dashboard/workplace'
|
|
68
61
|
},
|
|
69
|
-
clickMenu(row) {
|
|
70
|
-
|
|
71
|
-
|
|
62
|
+
async clickMenu(row, MenuTre) {
|
|
63
|
+
let pageInSystemNo = window.localStorage.getItem('pageInSystemNo')
|
|
64
|
+
window.localStorage.setItem('pageInType', 'toFront')
|
|
65
|
+
if (pageInSystemNo === row.systemNo) {
|
|
66
|
+
this.$emit('clickMenu', false)
|
|
67
|
+
if (row?.children?.length) {
|
|
68
|
+
this.$router.push(row.children[0].route)
|
|
69
|
+
} else {
|
|
70
|
+
this.$router.push(row.route)
|
|
71
|
+
}
|
|
72
72
|
} else {
|
|
73
|
-
|
|
73
|
+
window.localStorage.setItem('pageInSystemNo', row.systemNo)
|
|
74
|
+
window.sessionStorage.setItem('menuTree', JSON.stringify(MenuTre))
|
|
75
|
+
// 切换系统的时候清除缓存的页签
|
|
76
|
+
window.sessionStorage.removeItem('tab-list')
|
|
77
|
+
if (row?.children?.length) {
|
|
78
|
+
window.location.href =
|
|
79
|
+
window.location.origin + row.children[0].route + `?token=${window.sessionStorage.getItem('token')}`
|
|
80
|
+
} else {
|
|
81
|
+
window.location.href = window.location.origin + row.route + `?token=${window.sessionStorage.getItem('token')}`
|
|
82
|
+
}
|
|
74
83
|
}
|
|
75
84
|
}
|
|
76
85
|
}
|
|
@@ -7,11 +7,19 @@
|
|
|
7
7
|
:operation-status="operationStatus"
|
|
8
8
|
:before-logout="beforeLogout"
|
|
9
9
|
:after-logout="afterLogout"
|
|
10
|
+
:drawerVisible.sync="showDrawerBox"
|
|
11
|
+
@clickSystem="clickSystem"
|
|
10
12
|
@custom-event="(par) => $emit('custom-event', par)"
|
|
11
13
|
>
|
|
12
14
|
<slot slot="header-ectad" name="header-ectad"></slot>
|
|
13
15
|
<slot slot="header-dropdown" name="header-dropdown"></slot>
|
|
14
16
|
</headerWrap>
|
|
17
|
+
<div v-if="showDrawerBox" class="wrapper-mask" @click="showDrawerBox = false"></div>
|
|
18
|
+
<menuDrawer
|
|
19
|
+
:class="showDrawerBox ? 'show_drawer' : ''"
|
|
20
|
+
:menus="systemMenu"
|
|
21
|
+
@clickMenu="(row) => (this.showDrawerBox = row)"
|
|
22
|
+
></menuDrawer>
|
|
15
23
|
<asideNav :menus="menusC" :active-nav="activeNavC" :collapse.sync="collapse" @menu-click="menuClick" />
|
|
16
24
|
<tabsNav
|
|
17
25
|
class="tabs-nav-wrap"
|
|
@@ -43,13 +51,15 @@ import { setRela } from '../../utils/relaNo'
|
|
|
43
51
|
import asideNav from './AsideNav/index.vue'
|
|
44
52
|
import headerWrap from './HeaderWrap/indexN.vue'
|
|
45
53
|
import tabsNav from './TabsNav/index.vue'
|
|
54
|
+
import menuDrawer from './HeaderWrap/menuDrawer.vue'
|
|
46
55
|
|
|
47
56
|
export default {
|
|
48
57
|
name: 'Layout',
|
|
49
58
|
components: {
|
|
50
59
|
asideNav,
|
|
51
60
|
headerWrap,
|
|
52
|
-
tabsNav
|
|
61
|
+
tabsNav,
|
|
62
|
+
menuDrawer
|
|
53
63
|
},
|
|
54
64
|
filters: {
|
|
55
65
|
keyF({ path, query = {} }) {
|
|
@@ -109,7 +119,8 @@ export default {
|
|
|
109
119
|
clientM,
|
|
110
120
|
clientHeight: document.documentElement.offsetHeight - headerH - tabsH - 1 * clientM,
|
|
111
121
|
collapse: window.localStorage.getItem('aside-nav-collapse') === 'true',
|
|
112
|
-
|
|
122
|
+
showDrawerBox: false,
|
|
123
|
+
systemMenu: [],
|
|
113
124
|
menusC: [],
|
|
114
125
|
menuList: [],
|
|
115
126
|
tabList: [],
|
|
@@ -190,6 +201,9 @@ export default {
|
|
|
190
201
|
refreshTab && this.tabRefresh(refreshTab)
|
|
191
202
|
}
|
|
192
203
|
},
|
|
204
|
+
clickSystem(menu) {
|
|
205
|
+
this.systemMenu = menu
|
|
206
|
+
},
|
|
193
207
|
getCollapse() {
|
|
194
208
|
this.collapse = window.localStorage.getItem('aside-nav-collapse') === 'true'
|
|
195
209
|
},
|
|
@@ -207,7 +221,8 @@ export default {
|
|
|
207
221
|
m.route = base + m.route.replace(/\/$/, '')
|
|
208
222
|
m.route || (m.route = '/')
|
|
209
223
|
m.uuid = m.route
|
|
210
|
-
|
|
224
|
+
// 新增一个字段用于接收初始化的url携带参数的处理之后的url
|
|
225
|
+
m.originPath = getBeforeQuestionMark(m.route)
|
|
211
226
|
menuList.push(m)
|
|
212
227
|
}
|
|
213
228
|
})
|
|
@@ -226,6 +241,7 @@ export default {
|
|
|
226
241
|
this.menusC = menus
|
|
227
242
|
this.menuList = menuList
|
|
228
243
|
},
|
|
244
|
+
|
|
229
245
|
getTabList() {
|
|
230
246
|
let tabList = JSON.parse(window.sessionStorage.getItem('tab-list')) || []
|
|
231
247
|
this.tabList = tabList
|
|
@@ -274,7 +290,6 @@ export default {
|
|
|
274
290
|
},
|
|
275
291
|
tabClick(tab) {
|
|
276
292
|
this.activeNav = tab.uuid
|
|
277
|
-
|
|
278
293
|
this.routerPush({
|
|
279
294
|
path: tab.route,
|
|
280
295
|
query: tab.query
|
|
@@ -473,8 +488,18 @@ export default {
|
|
|
473
488
|
}
|
|
474
489
|
}
|
|
475
490
|
|
|
491
|
+
// 处理携带参数的url,只取参数之前的路径
|
|
492
|
+
function getBeforeQuestionMark(url) {
|
|
493
|
+
const questionMarkIndex = url.indexOf('?')
|
|
494
|
+
if (questionMarkIndex !== -1) {
|
|
495
|
+
return url.slice(0, questionMarkIndex)
|
|
496
|
+
}
|
|
497
|
+
return url
|
|
498
|
+
}
|
|
499
|
+
|
|
476
500
|
function getShowUuid(uuid, list) {
|
|
477
|
-
|
|
501
|
+
// 拿uuid去菜单中找对应的uuid或者originPath,originPath主要用与匹配初始化的菜单上携带参数的问题
|
|
502
|
+
let menu = list.find((m) => m.uuid === uuid || m.originPath === uuid)
|
|
478
503
|
if (menu) {
|
|
479
504
|
return menu.hide ? menu.pid : menu.uuid
|
|
480
505
|
}
|