n20-common-lib 2.1.8 → 2.1.9
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/components/Layout/HeaderWrap/indexN.vue +5 -5
- package/src/components/LoginSetting/setItem.vue +1 -1
- package/src/components/LoginTemporary/form.vue +19 -4
- package/src/components/LoginTemporary/indexN.vue +1 -1
- package/src/components/LoginTemporary/utils.js +0 -22
package/package.json
CHANGED
|
@@ -232,7 +232,7 @@ import dayjs from 'dayjs'
|
|
|
232
232
|
import duration from 'dayjs/plugin/duration'
|
|
233
233
|
dayjs.extend(duration)
|
|
234
234
|
|
|
235
|
-
import {
|
|
235
|
+
import { siteTree2menus } from '../../LoginTemporary/utils'
|
|
236
236
|
|
|
237
237
|
const prefix = window.__INJECTED_PUBLIC_PATH_BY_QIANKUN__ || process.env.BASE_URL || '/'
|
|
238
238
|
|
|
@@ -431,10 +431,10 @@ export default {
|
|
|
431
431
|
window.localStorage.setItem('pageLang', this.langVal)
|
|
432
432
|
Cookies.set('language', ['zh-cn', 'zh-hk'].includes(this.langVal) ? 'zh' : this.langVal, { expires: 365 })
|
|
433
433
|
auth.setReqLang()
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
434
|
+
axios.get('/bems/1.0/menuTree/tree').then(({ data }) => {
|
|
435
|
+
data || (data = [])
|
|
436
|
+
let layoutMenus = siteTree2menus(data)
|
|
437
|
+
sessionStorage.setItem('menuTree', JSON.stringify(layoutMenus))
|
|
438
438
|
window.location.reload()
|
|
439
439
|
})
|
|
440
440
|
},
|
|
@@ -143,7 +143,7 @@ import { $lc } from '../../utils/i18n/index'
|
|
|
143
143
|
import axios from '../../utils/axios'
|
|
144
144
|
import auth from '../../utils/auth'
|
|
145
145
|
import qrCode from './qrcode.vue'
|
|
146
|
-
import {
|
|
146
|
+
import { siteTree2menus, siteTree2RelaNos } from './utils'
|
|
147
147
|
import importG from '../../utils/importGlobal.js'
|
|
148
148
|
|
|
149
149
|
function encode(pwd = '', key = 0) {
|
|
@@ -572,9 +572,24 @@ export default {
|
|
|
572
572
|
// 获取子应用相关列表
|
|
573
573
|
async getMicroAppsInfo() {
|
|
574
574
|
this.loadingAdd()
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
575
|
+
let { data } = await axios.get(
|
|
576
|
+
'/bems/1.0/menuTree/tree',
|
|
577
|
+
{
|
|
578
|
+
resType: this.asyncRelaNos ? '1' : undefined,
|
|
579
|
+
...this.extraForm
|
|
580
|
+
},
|
|
581
|
+
{ loading: this.loadingSub }
|
|
582
|
+
)
|
|
583
|
+
data || (data = [])
|
|
584
|
+
|
|
585
|
+
let layoutMenus = siteTree2menus(data)
|
|
586
|
+
sessionStorage.setItem('menuTree', JSON.stringify(layoutMenus))
|
|
587
|
+
|
|
588
|
+
let relaNos = siteTree2RelaNos(data)
|
|
589
|
+
sessionStorage.setItem('relaNos', JSON.stringify(relaNos))
|
|
590
|
+
|
|
591
|
+
// XXX: 兼容旧版resources
|
|
592
|
+
sessionStorage.setItem('resources', JSON.stringify(data))
|
|
578
593
|
},
|
|
579
594
|
// 新增不同单位对应不同角色,具有不同权限
|
|
580
595
|
getCltRelaNos() {
|
|
@@ -84,25 +84,3 @@ export function siteTree2RelaNos(siteTree) {
|
|
|
84
84
|
let relaNos = Object.values(relaNosMap)
|
|
85
85
|
return relaNos
|
|
86
86
|
}
|
|
87
|
-
|
|
88
|
-
import axios from '../../utils/axios'
|
|
89
|
-
export async function getMenuAndRela(asyncRelaNos, extraForm, loadingSub) {
|
|
90
|
-
let { data } = await axios.get(
|
|
91
|
-
'/bems/1.0/menuTree/tree',
|
|
92
|
-
{
|
|
93
|
-
resType: asyncRelaNos ? '1' : undefined,
|
|
94
|
-
...extraForm
|
|
95
|
-
},
|
|
96
|
-
{ loading: loadingSub }
|
|
97
|
-
)
|
|
98
|
-
data || (data = [])
|
|
99
|
-
|
|
100
|
-
let layoutMenus = siteTree2menus(data)
|
|
101
|
-
sessionStorage.setItem('menuTree', JSON.stringify(layoutMenus))
|
|
102
|
-
|
|
103
|
-
let relaNos = siteTree2RelaNos(data)
|
|
104
|
-
sessionStorage.setItem('relaNos', JSON.stringify(relaNos))
|
|
105
|
-
|
|
106
|
-
// XXX: 兼容旧版resources
|
|
107
|
-
sessionStorage.setItem('resources', JSON.stringify(data))
|
|
108
|
-
}
|