lw-cdp-ui 1.2.66 → 1.3.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.
|
@@ -179,11 +179,14 @@ export default {
|
|
|
179
179
|
closeSelectedTag(tag, autoPushLatestView = true) {
|
|
180
180
|
let item = this.menu[0]
|
|
181
181
|
if (item.children) {
|
|
182
|
-
item =
|
|
182
|
+
item = item.children[0]
|
|
183
183
|
}
|
|
184
|
-
|
|
185
|
-
|
|
184
|
+
|
|
185
|
+
// 兼容合并菜单
|
|
186
|
+
if (item.meta?.code) {
|
|
187
|
+
item.path = `/i/${item.name}`
|
|
186
188
|
}
|
|
189
|
+
|
|
187
190
|
this.$store.commit("removeViewTags", tag)
|
|
188
191
|
this.$store.commit("removeIframeList", tag)
|
|
189
192
|
this.$store.commit("removeKeepLive", tag.name)
|
|
@@ -193,7 +196,7 @@ export default {
|
|
|
193
196
|
if (latestView) {
|
|
194
197
|
this.$router.push(latestView)
|
|
195
198
|
} else {
|
|
196
|
-
this.$router.push(
|
|
199
|
+
this.$router.push({ path: item.path })
|
|
197
200
|
}
|
|
198
201
|
}
|
|
199
202
|
},
|
|
@@ -352,7 +352,7 @@ export default {
|
|
|
352
352
|
}
|
|
353
353
|
},
|
|
354
354
|
beforeCreate() {
|
|
355
|
-
//
|
|
355
|
+
// 挂载自定义菜单订阅
|
|
356
356
|
this.$bus.$on('setMenu', (menu) => {
|
|
357
357
|
this.changeMenu = true
|
|
358
358
|
this.menu = this.filterUrl(menu)
|
|
@@ -370,8 +370,10 @@ export default {
|
|
|
370
370
|
this.onLayoutResize();
|
|
371
371
|
window.addEventListener('resize', this.onLayoutResize);
|
|
372
372
|
this.getUserInfo();
|
|
373
|
-
|
|
374
|
-
|
|
373
|
+
if (!this.changeMenu) {
|
|
374
|
+
var menu = this.$router.sc_getMenu();
|
|
375
|
+
this.menu = this.filterUrl(menu);
|
|
376
|
+
}
|
|
375
377
|
this.showThis()
|
|
376
378
|
this.$store.commit("LOAD_USER_FROM_LOCAL_STORAGE")
|
|
377
379
|
},
|
|
@@ -414,7 +416,6 @@ export default {
|
|
|
414
416
|
}
|
|
415
417
|
this.$tool.data.set('tenantId', user.userAuthInfo.tenantId)
|
|
416
418
|
this.$tool.data.set('userAuthInfo', userAuthInfo)
|
|
417
|
-
this.$tool.data.set('MenuPath', user.userAuthInfo.grantedApplications)
|
|
418
419
|
this.$store.state.user = userAuthInfo
|
|
419
420
|
},
|
|
420
421
|
|
|
@@ -299,6 +299,7 @@ export default {
|
|
|
299
299
|
this.$store.commit("clearViewTags");
|
|
300
300
|
this.$store.commit("clearKeepLive");
|
|
301
301
|
this.$store.commit("clearIframeList")
|
|
302
|
+
this.$tool.data.remove("MENU_LIST")
|
|
302
303
|
},
|
|
303
304
|
methods: {
|
|
304
305
|
// 加密
|
|
@@ -363,7 +364,6 @@ export default {
|
|
|
363
364
|
this.$tool.data.set('tenantId', user.userAuthInfo.tenantId)
|
|
364
365
|
this.$tool.data.set('userAuthInfo', userAuthInfo)
|
|
365
366
|
// 用与应用菜单显示
|
|
366
|
-
this.$tool.data.set('MenuPath', user.userAuthInfo.grantedApplications)
|
|
367
367
|
this.$store.state.user = userAuthInfo
|
|
368
368
|
|
|
369
369
|
|
package/dist/lw-cdp-ui.esm.js
CHANGED
|
@@ -485,12 +485,11 @@ const uc = /* @__PURE__ */ ue(ac, [["render", sc], ["__scopeId", "data-v-c198cd7
|
|
|
485
485
|
},
|
|
486
486
|
//关闭tag
|
|
487
487
|
closeSelectedTag(e, n = !0) {
|
|
488
|
+
var r;
|
|
488
489
|
let t = this.menu[0];
|
|
489
|
-
if (t.children && (t = t.children[0]),
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
const r = this.tagList.slice(-1)[0];
|
|
493
|
-
r ? this.$router.push(r) : this.$router.push("/");
|
|
490
|
+
if (t.children && (t = t.children[0]), (r = t.meta) != null && r.code && (t.path = `/i/${t.name}`), this.$store.commit("removeViewTags", e), this.$store.commit("removeIframeList", e), this.$store.commit("removeKeepLive", e.name), this.$tool.data.set("RouteTags", this.$store.state.viewTags.viewTags), n && this.isActive(e)) {
|
|
491
|
+
const a = this.tagList.slice(-1)[0];
|
|
492
|
+
a ? this.$router.push(a) : this.$router.push({ path: t.path });
|
|
494
493
|
}
|
|
495
494
|
},
|
|
496
495
|
//tag右键
|
|
@@ -3077,9 +3076,11 @@ const D8 = /* @__PURE__ */ ue(V8, [["render", R8], ["__scopeId", "data-v-91dc7bb
|
|
|
3077
3076
|
this.$store.state.global.menuIsCollapse = !!n;
|
|
3078
3077
|
},
|
|
3079
3078
|
async created() {
|
|
3080
|
-
this.onLayoutResize(), window.addEventListener("resize", this.onLayoutResize), this.getUserInfo()
|
|
3081
|
-
|
|
3082
|
-
|
|
3079
|
+
if (this.onLayoutResize(), window.addEventListener("resize", this.onLayoutResize), this.getUserInfo(), !this.changeMenu) {
|
|
3080
|
+
var e = this.$router.sc_getMenu();
|
|
3081
|
+
this.menu = this.filterUrl(e);
|
|
3082
|
+
}
|
|
3083
|
+
this.showThis(), this.$store.commit("LOAD_USER_FROM_LOCAL_STORAGE");
|
|
3083
3084
|
},
|
|
3084
3085
|
watch: {
|
|
3085
3086
|
async $route() {
|
|
@@ -3109,7 +3110,7 @@ const D8 = /* @__PURE__ */ ue(V8, [["render", R8], ["__scopeId", "data-v-91dc7bb
|
|
|
3109
3110
|
loginPage: n.loginPage,
|
|
3110
3111
|
menuContent: n.menuContent
|
|
3111
3112
|
};
|
|
3112
|
-
this.$tool.data.set("tenantId", n.userAuthInfo.tenantId), this.$tool.data.set("userAuthInfo", r), this.$
|
|
3113
|
+
this.$tool.data.set("tenantId", n.userAuthInfo.tenantId), this.$tool.data.set("userAuthInfo", r), this.$store.state.user = r;
|
|
3113
3114
|
},
|
|
3114
3115
|
openSetting() {
|
|
3115
3116
|
this.settingDialog = !0;
|
|
@@ -5299,7 +5300,7 @@ const I6 = /* @__PURE__ */ a5(_6), k6 = "data:image/svg+xml,%3c?xml%20version='1
|
|
|
5299
5300
|
};
|
|
5300
5301
|
},
|
|
5301
5302
|
created: function() {
|
|
5302
|
-
this.$store.commit("clearViewTags"), this.$store.commit("clearKeepLive"), this.$store.commit("clearIframeList");
|
|
5303
|
+
this.$store.commit("clearViewTags"), this.$store.commit("clearKeepLive"), this.$store.commit("clearIframeList"), this.$tool.data.remove("MENU_LIST");
|
|
5303
5304
|
},
|
|
5304
5305
|
methods: {
|
|
5305
5306
|
// 加密
|
|
@@ -5338,7 +5339,7 @@ const I6 = /* @__PURE__ */ a5(_6), k6 = "data:image/svg+xml,%3c?xml%20version='1
|
|
|
5338
5339
|
loginPage: l.loginPage,
|
|
5339
5340
|
menuContent: l.menuContent
|
|
5340
5341
|
};
|
|
5341
|
-
if (this.$tool.data.set("tenantId", l.userAuthInfo.tenantId), this.$tool.data.set("userAuthInfo", u), this.$
|
|
5342
|
+
if (this.$tool.data.set("tenantId", l.userAuthInfo.tenantId), this.$tool.data.set("userAuthInfo", u), this.$store.state.user = u, sessionStorage.setItem("easyweb_session_passport_current_user", JSON.stringify({ v: l })), sessionStorage.setItem("easyweb_session_passport_bu", JSON.stringify({ v: r[0] })), sessionStorage.setItem("easyweb_session_passport_bu_list", JSON.stringify({ v: r })), document.cookie = `Authorization=Bearer ${t}`, this.isInitialized) {
|
|
5342
5343
|
let d = await this.$api.auth.initialized();
|
|
5343
5344
|
this.$tool.data.set("zoneInitialized", d), d ? this.$router.push(this.$config.DASHBOARD_URL) : this.$router.push(this.$config.INIT_URL);
|
|
5344
5345
|
} else
|
|
@@ -5636,7 +5637,7 @@ function N6(e, n, t, r, a, o) {
|
|
|
5636
5637
|
])
|
|
5637
5638
|
]);
|
|
5638
5639
|
}
|
|
5639
|
-
const U6 = /* @__PURE__ */ ue(L6, [["render", N6], ["__scopeId", "data-v-
|
|
5640
|
+
const U6 = /* @__PURE__ */ ue(L6, [["render", N6], ["__scopeId", "data-v-22546a3b"]]), j6 = { class: "svg-icon" }, G6 = ["xlink:href"], z6 = {
|
|
5640
5641
|
__name: "index",
|
|
5641
5642
|
props: {
|
|
5642
5643
|
name: {
|