@das-fed/web 6.4.0-hot.5 → 6.4.0-hot.7
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/{packages/main-app-framework/index-CBrBve1k.js → index-C-ieIBXO.js} +1 -1
- package/{index-_67_4aoo.js → index-C8k4wrGJ.js} +1 -1
- package/index-C8k4wrGJ.js.gz +0 -0
- package/{index-CNuui6rH.js → index-CicbdbyR.js} +1 -1
- package/index-CicbdbyR.js.gz +0 -0
- package/{index-LTwaM8dS.js → index-CwfFnT6z.js} +1039 -1035
- package/index-CwfFnT6z.js.gz +0 -0
- package/index.js +1 -1
- package/package.json +6 -6
- package/{index-D_CiHfGN.js → packages/main-app-framework/index-Bcz8SW2I.js} +1 -1
- package/packages/main-app-framework/{index-Bnb7HNMb.js → index-CfM1liO6.js} +1 -1
- package/packages/main-app-framework/index-CfM1liO6.js.gz +0 -0
- package/packages/main-app-framework/{index-DF7V-TBl.js → index-DRQHVvCk.js} +942 -938
- package/packages/main-app-framework/index-DRQHVvCk.js.gz +0 -0
- package/packages/main-app-framework/{index-DOTMbc-l.js → index-E1pACiHI.js} +1 -1
- package/packages/main-app-framework/index-E1pACiHI.js.gz +0 -0
- package/packages/main-app-framework/index.js +1 -1
- package/packages/main-app-framework/style.css +1 -1
- package/packages/main-app-framework/style.css.gz +0 -0
- package/style.css +1 -1
- package/style.css.gz +0 -0
- package/index-CNuui6rH.js.gz +0 -0
- package/index-LTwaM8dS.js.gz +0 -0
- package/index-_67_4aoo.js.gz +0 -0
- package/packages/main-app-framework/index-Bnb7HNMb.js.gz +0 -0
- package/packages/main-app-framework/index-DF7V-TBl.js.gz +0 -0
- package/packages/main-app-framework/index-DOTMbc-l.js.gz +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ref as
|
|
1
|
+
import { ref as T, createApp as ms, reactive as Ne, computed as H, defineComponent as ne, watch as G, openBlock as $, createElementBlock as V, Fragment as De, createBlock as F, TransitionGroup as vs, normalizeProps as An, mergeProps as $t, withCtx as B, renderList as Tt, withDirectives as Te, resolveDynamicComponent as at, vShow as Le, unref as v, createCommentVNode as j, nextTick as Qe, resolveComponent as As, createElementVNode as O, normalizeClass as rr, normalizeStyle as yn, renderSlot as fe, createVNode as R, Transition as ao, guardReactiveProps as io, KeepAlive as co, h as he, onBeforeMount as ys, onMounted as Ve, onUnmounted as _s, getCurrentScope as bs, onScopeDispose as ws, getCurrentInstance as Cs, onActivated as Is, createTextVNode as ye, toDisplayString as se, pushScopeId as sr, popScopeId as ar, render as Vt, onBeforeUnmount as Zt, useCssVars as Ts, withModifiers as ue, toRefs as Es, isRef as Ss } from "vue";
|
|
2
2
|
import { initTheme as ks, setThemeRule as Ps } from "@das-fed/web/packages/theme/index";
|
|
3
3
|
import { initI18n as Ls, i18n as N } from "@das-fed/web/packages/i18n/index";
|
|
4
4
|
import { DasWebLayout as Dn, DasWebNav as ir, DasWebMenu as cr, DasWebTabs as lr, layout as M } from "@das-fed/web/packages/layout/index";
|
|
@@ -16,12 +16,12 @@ import { oauthServer as fr, justauth as Rn, enterpriseright as xn, iotModules as
|
|
|
16
16
|
import { createService as et } from "@das-fed/utils/create-api-service";
|
|
17
17
|
import { useGetAuth as zs } from "@das-fed/utils/hooks/use-get-auth";
|
|
18
18
|
import { systemConfiguration as qs, enterpriseright as jn, createService as ft, spaceManage as hr } from "@das-fed/utils/api-services";
|
|
19
|
-
import { microFrontend as
|
|
19
|
+
import { microFrontend as le } from "@das-fed/web/packages/micro-frontend/index";
|
|
20
20
|
import { getConfig as tt } from "@das-fed/utils/config";
|
|
21
21
|
import Cn from "dayjs";
|
|
22
22
|
import { getAccessToken as Js, removeAccessToken as Ks } from "@das-fed/utils/token-tools";
|
|
23
23
|
import { DasDialog as Nn } from "@das-fed/ui/packages/components/dialog/index";
|
|
24
|
-
import { DasButton as
|
|
24
|
+
import { DasButton as Ue } from "@das-fed/ui/packages/components/button/index";
|
|
25
25
|
import { vDasTooltip as Gs } from "@das-fed/ui/packages/components/text-tooltip/index";
|
|
26
26
|
import { tokenStorage as Xs } from "@das-fed/utils/create-api-service/sso";
|
|
27
27
|
import { setPersonalInfo as Zs } from "@das-fed/utils/common-info/set-personal-info";
|
|
@@ -56,24 +56,24 @@ const ha = {
|
|
|
56
56
|
}, In = $s();
|
|
57
57
|
In.use(Ds);
|
|
58
58
|
const ga = (t) => {
|
|
59
|
-
var i, u,
|
|
59
|
+
var i, u, f, p, d;
|
|
60
60
|
const e = ((i = t == null ? void 0 : t.router) == null ? void 0 : i.routerBase) ?? "/", n = ((u = t == null ? void 0 : t.router) == null ? void 0 : u.options) || {};
|
|
61
|
-
let o = Object.assign(((
|
|
62
|
-
const r = Object.values(o).filter((
|
|
63
|
-
(
|
|
64
|
-
var
|
|
65
|
-
const A = Object.values(((
|
|
61
|
+
let o = Object.assign(((f = t == null ? void 0 : t.router) == null ? void 0 : f.glob) || {});
|
|
62
|
+
const r = Object.values(o).filter((m) => !!m).flat().sort((m, A) => (m.index ?? 0) - (A.index ?? 0)), s = [];
|
|
63
|
+
(p = t == null ? void 0 : t.microApps) == null || p.map((m) => {
|
|
64
|
+
var g;
|
|
65
|
+
const A = Object.values(((g = m.router) == null ? void 0 : g.glob) || {}).filter((h) => !!h).flat().sort((h, b) => (h.index ?? 0) - (b.index ?? 0));
|
|
66
66
|
s.push(
|
|
67
|
-
...A.map((
|
|
67
|
+
...A.map((h) => ({ ...h, path: `/${m.microAppName}${h.path}` }))
|
|
68
68
|
), s.push(
|
|
69
|
-
...A.filter((
|
|
70
|
-
path:
|
|
71
|
-
redirect: `/${
|
|
72
|
-
meta: { ...
|
|
69
|
+
...A.filter((h) => !!h.path).filter((h) => h.path !== "").filter((h) => h.path !== "/").filter((h) => !h.path.startsWith(`/${h.microAppName}`)).map((h) => ({
|
|
70
|
+
path: h.path,
|
|
71
|
+
redirect: `/${m.microAppName}${h.path}`,
|
|
72
|
+
meta: { ...h.meta || {}, isMicroAppRouteRedirect: !0 }
|
|
73
73
|
}))
|
|
74
74
|
);
|
|
75
75
|
});
|
|
76
|
-
const a = ((
|
|
76
|
+
const a = ((d = t == null ? void 0 : t.router) == null ? void 0 : d.routers) || [], l = [
|
|
77
77
|
...un(r, t),
|
|
78
78
|
...un(a, t),
|
|
79
79
|
...un(s, t)
|
|
@@ -84,7 +84,7 @@ const ga = (t) => {
|
|
|
84
84
|
return o.keepAlive = o.keepAlive ?? (e == null ? void 0 : e.keepAlive) ?? !0, { ...n, meta: o };
|
|
85
85
|
}), Vg = (t) => {
|
|
86
86
|
t || (t = {});
|
|
87
|
-
const e =
|
|
87
|
+
const e = T(!0);
|
|
88
88
|
Promise.all([ks(t), Ls(t)]).then(() => {
|
|
89
89
|
e.value = !1;
|
|
90
90
|
});
|
|
@@ -92,7 +92,7 @@ const ga = (t) => {
|
|
|
92
92
|
s.use(ha, t), s.use(In);
|
|
93
93
|
const { router: a } = ga(t);
|
|
94
94
|
return s.use(a), s.mount(n || "#app"), { app: s, router: a, loading: e, store: In };
|
|
95
|
-
}, Ar =
|
|
95
|
+
}, Ar = Ne({}), yr = Ne({}), Jt = T("zh-CN"), ma = "dasI18n", ho = (t, e) => {
|
|
96
96
|
const n = e === "global", o = !n;
|
|
97
97
|
for (const r in t)
|
|
98
98
|
n && (yr[r] = t[r]), o && (Ar[r] = t[r]);
|
|
@@ -114,10 +114,10 @@ const ga = (t) => {
|
|
|
114
114
|
}), o;
|
|
115
115
|
}), Aa = va, zg = (t, ...e) => Aa(t, ...e).value, qg = (t) => {
|
|
116
116
|
Jt.value = t;
|
|
117
|
-
}, Jg = () => Jt, it =
|
|
117
|
+
}, Jg = () => Jt, it = T("light"), yt = T({
|
|
118
118
|
light: {},
|
|
119
119
|
dark: {}
|
|
120
|
-
}), _t =
|
|
120
|
+
}), _t = T({
|
|
121
121
|
light: {},
|
|
122
122
|
dark: {}
|
|
123
123
|
}), ya = "dasTheme", wt = "das-theme", _a = (t) => {
|
|
@@ -177,7 +177,7 @@ const go = (t, e) => {
|
|
|
177
177
|
}, wa = (t) => H(() => {
|
|
178
178
|
var e, n, o, r;
|
|
179
179
|
return ((n = (e = _t.value) == null ? void 0 : e[it.value]) == null ? void 0 : n[t]) || ((r = (o = yt.value) == null ? void 0 : o[it.value]) == null ? void 0 : r[t]) || t;
|
|
180
|
-
}), Xg = (t) => `var(${t})`, Zg = wa, X =
|
|
180
|
+
}), Xg = (t) => `var(${t})`, Zg = wa, X = Ne({
|
|
181
181
|
visible: !1,
|
|
182
182
|
logo: "",
|
|
183
183
|
items: [],
|
|
@@ -265,7 +265,7 @@ const go = (t, e) => {
|
|
|
265
265
|
remove: o
|
|
266
266
|
};
|
|
267
267
|
}
|
|
268
|
-
}, Re =
|
|
268
|
+
}, Re = Ne({
|
|
269
269
|
items: [],
|
|
270
270
|
eventListeners: {}
|
|
271
271
|
}), Ia = {
|
|
@@ -314,7 +314,7 @@ const go = (t, e) => {
|
|
|
314
314
|
remove: o
|
|
315
315
|
};
|
|
316
316
|
}
|
|
317
|
-
}, be =
|
|
317
|
+
}, be = Ne({
|
|
318
318
|
items: [],
|
|
319
319
|
eventListeners: {}
|
|
320
320
|
}), Ta = {
|
|
@@ -368,7 +368,7 @@ const go = (t, e) => {
|
|
|
368
368
|
remove: o
|
|
369
369
|
};
|
|
370
370
|
}
|
|
371
|
-
}, bt =
|
|
371
|
+
}, bt = Ne({
|
|
372
372
|
eventListeners: {}
|
|
373
373
|
}), Ea = {
|
|
374
374
|
triggerEventListener: (t, e, n) => {
|
|
@@ -402,7 +402,7 @@ const go = (t, e) => {
|
|
|
402
402
|
remove: o
|
|
403
403
|
};
|
|
404
404
|
}
|
|
405
|
-
}, Tn =
|
|
405
|
+
}, Tn = Ne({
|
|
406
406
|
visible: !1,
|
|
407
407
|
style: {}
|
|
408
408
|
}), Sa = {
|
|
@@ -415,7 +415,7 @@ const go = (t, e) => {
|
|
|
415
415
|
tab: be,
|
|
416
416
|
overlay: Tn,
|
|
417
417
|
iframeView: bt,
|
|
418
|
-
visible:
|
|
418
|
+
visible: T(!0)
|
|
419
419
|
}, z = {
|
|
420
420
|
nav: Ca,
|
|
421
421
|
menu: Ia,
|
|
@@ -432,82 +432,82 @@ const go = (t, e) => {
|
|
|
432
432
|
},
|
|
433
433
|
setup(t) {
|
|
434
434
|
const e = t, n = H(() => {
|
|
435
|
-
const { mode:
|
|
435
|
+
const { mode: f = "", ...p } = {
|
|
436
436
|
mode: "out-in",
|
|
437
437
|
"enter-active-class": "animate__animated animate__fadeInLeft",
|
|
438
438
|
...e.transitionConfig || {}
|
|
439
439
|
};
|
|
440
|
-
return
|
|
441
|
-
}), o = Ye(), r = Dt(), s =
|
|
442
|
-
var
|
|
443
|
-
return (
|
|
444
|
-
})), l = (
|
|
445
|
-
const
|
|
446
|
-
let
|
|
447
|
-
|
|
448
|
-
|
|
440
|
+
return p;
|
|
441
|
+
}), o = Ye(), r = Dt(), s = T([]), a = H(() => s.value.filter((f) => {
|
|
442
|
+
var p;
|
|
443
|
+
return (p = f.meta) == null ? void 0 : p.isOpen;
|
|
444
|
+
})), l = (f) => {
|
|
445
|
+
const p = f.lastIndexOf("-");
|
|
446
|
+
let d = p !== -1 ? f.substring(p + 1) : "";
|
|
447
|
+
d === "0" ? d = "1" : d = "0", a.value.forEach((m) => {
|
|
448
|
+
m.meta.key === f && (m.meta.key = `${m.path}-${d}`);
|
|
449
449
|
});
|
|
450
450
|
};
|
|
451
451
|
G(
|
|
452
452
|
() => e.exclude,
|
|
453
|
-
(
|
|
454
|
-
if (!
|
|
455
|
-
const
|
|
456
|
-
|
|
453
|
+
(f) => {
|
|
454
|
+
if (!f || !f.length) return;
|
|
455
|
+
const p = a.value.find((d) => f.includes(d.path));
|
|
456
|
+
p && l(p.meta.key);
|
|
457
457
|
},
|
|
458
458
|
{ deep: !0 }
|
|
459
459
|
);
|
|
460
|
-
const c = async (
|
|
461
|
-
const
|
|
462
|
-
let
|
|
463
|
-
return typeof
|
|
460
|
+
const c = async (f) => {
|
|
461
|
+
const p = f.component;
|
|
462
|
+
let d = null;
|
|
463
|
+
return typeof p == "function" ? d = (await p()).default : d = p, d;
|
|
464
464
|
}, i = async () => {
|
|
465
|
-
var
|
|
466
|
-
const
|
|
467
|
-
for (const
|
|
468
|
-
if ((
|
|
469
|
-
const
|
|
465
|
+
var p;
|
|
466
|
+
const f = o.options.routes;
|
|
467
|
+
for (const d of f)
|
|
468
|
+
if ((p = d == null ? void 0 : d.meta) != null && p.isIframe) {
|
|
469
|
+
const m = await c(d);
|
|
470
470
|
s.value.push({
|
|
471
|
-
...
|
|
472
|
-
meta: { ...
|
|
471
|
+
...d,
|
|
472
|
+
meta: { ...d.meta, key: `${d.path}-0`, componentInstance: m, isOpen: !1, isShow: !1 }
|
|
473
473
|
});
|
|
474
474
|
}
|
|
475
475
|
u();
|
|
476
476
|
}, u = async () => {
|
|
477
|
-
var
|
|
477
|
+
var d, m;
|
|
478
478
|
if (!s.value || !s.value.length) return;
|
|
479
|
-
const
|
|
480
|
-
|
|
481
|
-
const
|
|
482
|
-
|
|
479
|
+
const f = s.value.find((A) => A.meta.isShow);
|
|
480
|
+
f && (f.meta.isShow = !1, await Qe(), z.iframeView.triggerEventListener("onDeactivated", { route: f }));
|
|
481
|
+
const p = s.value.find((A) => A.path === r.path);
|
|
482
|
+
p && ((d = p.meta) != null && d.isOpen || (p.meta.isOpen = !0), (m = p.meta) != null && m.isShow || (p.meta.isShow = !0), await Qe(), z.iframeView.triggerEventListener("onActivated", { route: p }));
|
|
483
483
|
};
|
|
484
484
|
return i(), G(
|
|
485
485
|
() => r.path,
|
|
486
486
|
() => {
|
|
487
487
|
u();
|
|
488
488
|
}
|
|
489
|
-
), (
|
|
489
|
+
), (f, p) => ($(), V(
|
|
490
490
|
De,
|
|
491
491
|
null,
|
|
492
492
|
[
|
|
493
|
-
|
|
493
|
+
f.needTransition ? ($(), F(
|
|
494
494
|
vs,
|
|
495
495
|
An($t({ key: 0 }, n.value)),
|
|
496
496
|
{
|
|
497
497
|
default: B(() => [
|
|
498
|
-
($(!0),
|
|
498
|
+
($(!0), V(
|
|
499
499
|
De,
|
|
500
500
|
null,
|
|
501
|
-
Tt(a.value, ({ path:
|
|
501
|
+
Tt(a.value, ({ path: d, meta: m }) => Te(($(), V("div", {
|
|
502
502
|
class: "das-iframe-router-view",
|
|
503
|
-
key:
|
|
504
|
-
name:
|
|
503
|
+
key: d,
|
|
504
|
+
name: d
|
|
505
505
|
}, [
|
|
506
|
-
($(), F(at(
|
|
507
|
-
key:
|
|
506
|
+
($(), F(at(m.componentInstance), {
|
|
507
|
+
key: m.key
|
|
508
508
|
}))
|
|
509
509
|
], 8, ka)), [
|
|
510
|
-
[Le,
|
|
510
|
+
[Le, m.componentInstance && d === v(r).path]
|
|
511
511
|
])),
|
|
512
512
|
128
|
|
513
513
|
/* KEYED_FRAGMENT */
|
|
@@ -519,19 +519,19 @@ const go = (t, e) => {
|
|
|
519
519
|
16
|
|
520
520
|
/* FULL_PROPS */
|
|
521
521
|
)) : j("v-if", !0),
|
|
522
|
-
|
|
522
|
+
f.needTransition ? j("v-if", !0) : ($(!0), V(
|
|
523
523
|
De,
|
|
524
524
|
{ key: 1 },
|
|
525
|
-
Tt(a.value, ({ path:
|
|
525
|
+
Tt(a.value, ({ path: d, meta: m }) => Te(($(), V("div", {
|
|
526
526
|
class: "das-iframe-router-view",
|
|
527
|
-
key:
|
|
528
|
-
name:
|
|
527
|
+
key: d,
|
|
528
|
+
name: d
|
|
529
529
|
}, [
|
|
530
|
-
($(), F(at(
|
|
531
|
-
key:
|
|
530
|
+
($(), F(at(m.componentInstance), {
|
|
531
|
+
key: m.key
|
|
532
532
|
}))
|
|
533
533
|
], 8, Pa)), [
|
|
534
|
-
[Le,
|
|
534
|
+
[Le, m.componentInstance && d === v(r).path]
|
|
535
535
|
])),
|
|
536
536
|
128
|
|
537
537
|
/* KEYED_FRAGMENT */
|
|
@@ -579,23 +579,23 @@ const go = (t, e) => {
|
|
|
579
579
|
setup(t) {
|
|
580
580
|
const e = t;
|
|
581
581
|
da(), pa(), fa();
|
|
582
|
-
const n = Dt(), o =
|
|
582
|
+
const n = Dt(), o = T(!1), r = T(!1), s = T(!1), a = H(() => o.value && e.showLayout), l = H(() => r.value && e.showLayout && e.showAside), c = H(() => o.value && e.showLayout && e.showTabs), i = H(() => e.routerViewVisible ?? !0), u = H(() => Je.overlay.visible ?? !1), f = H(() => ({
|
|
583
583
|
"das-web-app-overlay-show": u.value === !0,
|
|
584
584
|
"das-web-app-overlay-hide": u.value === !1,
|
|
585
585
|
"das-web-app-overlay-destroy": u.value === "destroy"
|
|
586
|
-
})),
|
|
586
|
+
})), p = H(() => Je.overlay.style ?? { backgroundColor: "rgba(0,0,0,0.5)" }), d = H(() => e.excludeRoutes), m = H(() => e.routeKeepAliveVisible);
|
|
587
587
|
G(
|
|
588
588
|
() => [n.meta, n.query],
|
|
589
|
-
([y,
|
|
590
|
-
const { showLayout:
|
|
591
|
-
showLayout:
|
|
589
|
+
([y, C]) => {
|
|
590
|
+
const { showLayout: I = !0, showAside: _ = !0, showTabs: S = !0, layout: E = {} } = y, {
|
|
591
|
+
showLayout: k = !0,
|
|
592
592
|
showAside: x = !0,
|
|
593
593
|
showTabs: Q = !0,
|
|
594
|
-
app:
|
|
595
|
-
} =
|
|
594
|
+
app: W
|
|
595
|
+
} = C;
|
|
596
596
|
ua({ minHeight: "600px", minWidth: "1200px" });
|
|
597
|
-
let q = !0,
|
|
598
|
-
(
|
|
597
|
+
let q = !0, ie = !0, Ie = !0;
|
|
598
|
+
(I === !1 || k === !1 || k === "false") && (q = !1, ie = !1, Ie = !1), (_ === !1 || x === !1 || x === "false") && (ie = !1), (S === !1 || Q === !1 || Q === "false") && (Ie = !1), o.value = q, r.value = ie, s.value = Ie;
|
|
599
599
|
}
|
|
600
600
|
);
|
|
601
601
|
const A = H(() => ({
|
|
@@ -603,32 +603,32 @@ const go = (t, e) => {
|
|
|
603
603
|
"enter-active-class": "animate__animated animate__fadeInLeft",
|
|
604
604
|
...e.transitionConfig || {}
|
|
605
605
|
}));
|
|
606
|
-
let
|
|
607
|
-
const
|
|
608
|
-
let
|
|
609
|
-
return
|
|
610
|
-
name:
|
|
606
|
+
let g = /* @__PURE__ */ new Map();
|
|
607
|
+
const h = (y, C) => {
|
|
608
|
+
let I;
|
|
609
|
+
return g.has(C) ? I = g.get(C) : (I = {
|
|
610
|
+
name: C,
|
|
611
611
|
render() {
|
|
612
612
|
return he("div", { style: { width: "100%", height: "100%" } }, [he(y)]);
|
|
613
613
|
}
|
|
614
|
-
},
|
|
615
|
-
},
|
|
616
|
-
return (y,
|
|
617
|
-
const
|
|
618
|
-
return $(),
|
|
614
|
+
}, g.set(C, I)), he(I);
|
|
615
|
+
}, b = H(() => Je.visible.value);
|
|
616
|
+
return (y, C) => {
|
|
617
|
+
const I = As("router-view");
|
|
618
|
+
return $(), V("div", Da, [
|
|
619
619
|
Te(O(
|
|
620
620
|
"div",
|
|
621
621
|
{
|
|
622
|
-
class: rr(["das-web-app-overlay",
|
|
623
|
-
style: yn(
|
|
622
|
+
class: rr(["das-web-app-overlay", f.value]),
|
|
623
|
+
style: yn(p.value)
|
|
624
624
|
},
|
|
625
625
|
null,
|
|
626
626
|
6
|
|
627
627
|
/* CLASS, STYLE */
|
|
628
628
|
), [
|
|
629
|
-
[Le,
|
|
629
|
+
[Le, b.value]
|
|
630
630
|
]),
|
|
631
|
-
a.value ? Te(($(),
|
|
631
|
+
a.value ? Te(($(), V(
|
|
632
632
|
"div",
|
|
633
633
|
Ma,
|
|
634
634
|
[
|
|
@@ -637,10 +637,10 @@ const go = (t, e) => {
|
|
|
637
637
|
512
|
|
638
638
|
/* NEED_PATCH */
|
|
639
639
|
)), [
|
|
640
|
-
[Le,
|
|
640
|
+
[Le, b.value]
|
|
641
641
|
]) : j("v-if", !0),
|
|
642
642
|
O("div", Oa, [
|
|
643
|
-
l.value ? Te(($(),
|
|
643
|
+
l.value ? Te(($(), V(
|
|
644
644
|
"div",
|
|
645
645
|
Ba,
|
|
646
646
|
[
|
|
@@ -649,10 +649,10 @@ const go = (t, e) => {
|
|
|
649
649
|
512
|
|
650
650
|
/* NEED_PATCH */
|
|
651
651
|
)), [
|
|
652
|
-
[Le,
|
|
652
|
+
[Le, b.value]
|
|
653
653
|
]) : j("v-if", !0),
|
|
654
654
|
O("div", Ra, [
|
|
655
|
-
c.value ? Te(($(),
|
|
655
|
+
c.value ? Te(($(), V(
|
|
656
656
|
"div",
|
|
657
657
|
xa,
|
|
658
658
|
[
|
|
@@ -661,7 +661,7 @@ const go = (t, e) => {
|
|
|
661
661
|
512
|
|
662
662
|
/* NEED_PATCH */
|
|
663
663
|
)), [
|
|
664
|
-
[Le,
|
|
664
|
+
[Le, b.value]
|
|
665
665
|
]) : j("v-if", !0),
|
|
666
666
|
O("div", Qa, [
|
|
667
667
|
Te(O(
|
|
@@ -673,7 +673,7 @@ const go = (t, e) => {
|
|
|
673
673
|
512
|
|
674
674
|
/* NEED_PATCH */
|
|
675
675
|
), [
|
|
676
|
-
[Le,
|
|
676
|
+
[Le, b.value]
|
|
677
677
|
]),
|
|
678
678
|
O("div", Na, [
|
|
679
679
|
Te(O(
|
|
@@ -682,20 +682,20 @@ const go = (t, e) => {
|
|
|
682
682
|
[
|
|
683
683
|
fe(y.$slots, "router-view", {}, () => [
|
|
684
684
|
j(" 有动画 "),
|
|
685
|
-
y.needTransition ? ($(), F(
|
|
686
|
-
default: B(({ Component:
|
|
685
|
+
y.needTransition ? ($(), F(I, { key: 0 }, {
|
|
686
|
+
default: B(({ Component: _ }) => [
|
|
687
687
|
R(
|
|
688
688
|
ao,
|
|
689
689
|
An(io(A.value)),
|
|
690
690
|
{
|
|
691
691
|
default: B(() => {
|
|
692
|
-
var
|
|
692
|
+
var S;
|
|
693
693
|
return [
|
|
694
694
|
v(n).meta.keepAlive ? ($(), F(co, {
|
|
695
695
|
key: 0,
|
|
696
|
-
exclude:
|
|
696
|
+
exclude: d.value
|
|
697
697
|
}, [
|
|
698
|
-
|
|
698
|
+
m.value && !((S = v(n).meta) != null && S.isIframe) ? ($(), F(at(h(_, v(n).path)), {
|
|
699
699
|
key: v(n).path
|
|
700
700
|
})) : j("v-if", !0)
|
|
701
701
|
], 1032, ["exclude"])) : j("v-if", !0)
|
|
@@ -712,8 +712,8 @@ const go = (t, e) => {
|
|
|
712
712
|
An(io(A.value)),
|
|
713
713
|
{
|
|
714
714
|
default: B(() => [
|
|
715
|
-
!v(n).meta.keepAlive && !v(n).meta.isIframe ? ($(),
|
|
716
|
-
($(), F(at(
|
|
715
|
+
!v(n).meta.keepAlive && !v(n).meta.isIframe ? ($(), V("div", Ua, [
|
|
716
|
+
($(), F(at(_), {
|
|
717
717
|
key: v(n).path
|
|
718
718
|
}))
|
|
719
719
|
])) : j("v-if", !0)
|
|
@@ -729,18 +729,18 @@ const go = (t, e) => {
|
|
|
729
729
|
/* STABLE */
|
|
730
730
|
})) : j("v-if", !0),
|
|
731
731
|
j(" 无动画 "),
|
|
732
|
-
y.needTransition ? j("v-if", !0) : ($(), F(
|
|
733
|
-
default: B(({ Component:
|
|
732
|
+
y.needTransition ? j("v-if", !0) : ($(), F(I, { key: 1 }, {
|
|
733
|
+
default: B(({ Component: _ }) => [
|
|
734
734
|
v(n).meta.keepAlive ? ($(), F(co, {
|
|
735
735
|
key: 0,
|
|
736
|
-
exclude:
|
|
736
|
+
exclude: d.value
|
|
737
737
|
}, [
|
|
738
|
-
|
|
738
|
+
m.value && !v(n).meta.isIframe ? ($(), F(at(h(_, v(n).path)), {
|
|
739
739
|
key: v(n).path
|
|
740
740
|
})) : j("v-if", !0)
|
|
741
741
|
], 1032, ["exclude"])) : j("v-if", !0),
|
|
742
|
-
!v(n).meta.keepAlive && !v(n).meta.isIframe ? ($(),
|
|
743
|
-
($(), F(at(
|
|
742
|
+
!v(n).meta.keepAlive && !v(n).meta.isIframe ? ($(), V("div", Fa, [
|
|
743
|
+
($(), F(at(_), {
|
|
744
744
|
key: v(n).path
|
|
745
745
|
}))
|
|
746
746
|
])) : j("v-if", !0)
|
|
@@ -753,7 +753,7 @@ const go = (t, e) => {
|
|
|
753
753
|
Va,
|
|
754
754
|
[
|
|
755
755
|
R($a, {
|
|
756
|
-
exclude:
|
|
756
|
+
exclude: d.value,
|
|
757
757
|
transitionConfig: A.value,
|
|
758
758
|
needTransition: y.needTransition
|
|
759
759
|
}, null, 8, ["exclude", "transitionConfig", "needTransition"])
|
|
@@ -791,20 +791,20 @@ const go = (t, e) => {
|
|
|
791
791
|
}), Yg = /* @__PURE__ */ Ce(za, [["__scopeId", "data-v-47a099d6"]]), qa = ["modelValue", "logoUrl", "config", "innerPagesConfig", "searchConfig", "projectTreeConfig", "userInfoConfig"], em = /* @__PURE__ */ ne({
|
|
792
792
|
__name: "das-web-nav",
|
|
793
793
|
setup(t) {
|
|
794
|
-
const { nav: e } = Je, n = H(() => e.logo || ""), o = H(() => e.activeItem || ""), r = H(() => (e.items || []).filter((
|
|
795
|
-
var
|
|
794
|
+
const { nav: e } = Je, n = H(() => e.logo || ""), o = H(() => e.activeItem || ""), r = H(() => (e.items || []).filter((_) => _.fixed)), s = H(() => (e.items || []).filter((_) => !_.fixed)), a = H(() => {
|
|
795
|
+
var I, _, S, E;
|
|
796
796
|
return {
|
|
797
|
-
showFullScreen: ((
|
|
798
|
-
showChangeEnterprise: ((
|
|
799
|
-
showSearch: ((
|
|
800
|
-
showProjectTree: ((
|
|
801
|
-
subAppList: s.value.map((
|
|
797
|
+
showFullScreen: ((I = e.config) == null ? void 0 : I.showFullScreen) ?? !1,
|
|
798
|
+
showChangeEnterprise: ((_ = e.config) == null ? void 0 : _.showChangeEnterprise) ?? !1,
|
|
799
|
+
showSearch: ((S = e.config) == null ? void 0 : S.showSearch) ?? !0,
|
|
800
|
+
showProjectTree: ((E = e.config) == null ? void 0 : E.showProjectTree) ?? !0,
|
|
801
|
+
subAppList: s.value.map((k) => ({ code: k.value, name: k.label, ...k }))
|
|
802
802
|
};
|
|
803
803
|
}), l = H(() => {
|
|
804
|
-
const
|
|
804
|
+
const I = r.value.find((_) => _.value === e.activeItem);
|
|
805
805
|
return {
|
|
806
|
-
activeInnerPagePath: (
|
|
807
|
-
innerPages: r.value.map((
|
|
806
|
+
activeInnerPagePath: (I == null ? void 0 : I.path) || "",
|
|
807
|
+
innerPages: r.value.map((_) => ({ title: _.label, ..._ }))
|
|
808
808
|
};
|
|
809
809
|
}), c = H(() => ({
|
|
810
810
|
projectStore: {
|
|
@@ -812,29 +812,29 @@ const go = (t, e) => {
|
|
|
812
812
|
currentProject: e.activeProject
|
|
813
813
|
},
|
|
814
814
|
...e.projectConfig
|
|
815
|
-
})), i = H(() => e.userInfo), u = H(() => e.searchConfig),
|
|
816
|
-
const
|
|
817
|
-
await z.nav.triggerEventListener("onItemClick",
|
|
818
|
-
},
|
|
819
|
-
const
|
|
820
|
-
await z.nav.triggerEventListener("onItemClick",
|
|
821
|
-
},
|
|
822
|
-
const
|
|
823
|
-
await z.nav.triggerEventListener("onItemRemove",
|
|
824
|
-
},
|
|
825
|
-
const [
|
|
826
|
-
!
|
|
827
|
-
}, A = (
|
|
828
|
-
z.nav.triggerEventListener("onUserCommandChange",
|
|
829
|
-
},
|
|
830
|
-
z.nav.triggerEventListener("searchToPage", { item:
|
|
831
|
-
},
|
|
832
|
-
z.nav.triggerEventListener("clearSearchList", { cb:
|
|
833
|
-
},
|
|
834
|
-
z.nav.triggerEventListener("deleteSearchItem", { value:
|
|
815
|
+
})), i = H(() => e.userInfo), u = H(() => e.searchConfig), f = async (I) => {
|
|
816
|
+
const _ = I.detail[0], S = r.value.find((k) => _.value === k.value);
|
|
817
|
+
await z.nav.triggerEventListener("onItemClick", S) && z.nav.setActiveItem(S.value);
|
|
818
|
+
}, p = async (I) => {
|
|
819
|
+
const _ = I.detail[0], S = s.value.find((k) => _ === k.value);
|
|
820
|
+
await z.nav.triggerEventListener("onItemClick", S) && z.nav.setActiveItem(S.value);
|
|
821
|
+
}, d = async (I) => {
|
|
822
|
+
const _ = I.detail[0], S = s.value.find((k) => _ === k.value);
|
|
823
|
+
await z.nav.triggerEventListener("onItemRemove", S) && z.nav.removeItem(S.value);
|
|
824
|
+
}, m = async (I) => {
|
|
825
|
+
const [_, S] = I.detail;
|
|
826
|
+
!_ || !await z.nav.triggerEventListener("onProjectChange", S) || z.nav.setActiveProject(S);
|
|
827
|
+
}, A = (I) => {
|
|
828
|
+
z.nav.triggerEventListener("onUserCommandChange", I.detail[0]);
|
|
829
|
+
}, g = (I) => {
|
|
830
|
+
z.nav.triggerEventListener("searchToPage", { item: I.detail[0], keyword: I.detail[1], cb: I.detail[2] });
|
|
831
|
+
}, h = (I) => {
|
|
832
|
+
z.nav.triggerEventListener("clearSearchList", { cb: I.detail[0] });
|
|
833
|
+
}, b = (I) => {
|
|
834
|
+
z.nav.triggerEventListener("deleteSearchItem", { value: I.detail[0], cb: I.detail[1] });
|
|
835
835
|
}, y = () => {
|
|
836
836
|
z.nav.triggerEventListener("changeEnterpriseHandle");
|
|
837
|
-
},
|
|
837
|
+
}, C = () => {
|
|
838
838
|
z.nav.triggerEventListener("fullScreenHandle");
|
|
839
839
|
};
|
|
840
840
|
return ys(() => {
|
|
@@ -843,7 +843,7 @@ const go = (t, e) => {
|
|
|
843
843
|
z.nav.triggerEventListener("onMounted", null, { autoRemove: !0 });
|
|
844
844
|
}), _s(() => {
|
|
845
845
|
z.nav.triggerEventListener("onUnmounted", null, { autoRemove: !0 });
|
|
846
|
-
}), (
|
|
846
|
+
}), (I, _) => ($(), V("das-ce-nav", {
|
|
847
847
|
modelValue: o.value,
|
|
848
848
|
logoUrl: n.value,
|
|
849
849
|
config: a.value,
|
|
@@ -852,15 +852,15 @@ const go = (t, e) => {
|
|
|
852
852
|
projectTreeConfig: c.value,
|
|
853
853
|
userInfoConfig: i.value,
|
|
854
854
|
"on:userCommandHandle": A,
|
|
855
|
-
"on:changeInnerPage":
|
|
856
|
-
"on:handleTabClick":
|
|
857
|
-
"on:handleTabDelete":
|
|
858
|
-
"on:changeTreeHandle":
|
|
859
|
-
"on:searchToPage":
|
|
860
|
-
"on:clearSearchList":
|
|
861
|
-
"on:deleteSearchItem":
|
|
855
|
+
"on:changeInnerPage": f,
|
|
856
|
+
"on:handleTabClick": p,
|
|
857
|
+
"on:handleTabDelete": d,
|
|
858
|
+
"on:changeTreeHandle": m,
|
|
859
|
+
"on:searchToPage": g,
|
|
860
|
+
"on:clearSearchList": h,
|
|
861
|
+
"on:deleteSearchItem": b,
|
|
862
862
|
"on:changeEnterpriseHandle": y,
|
|
863
|
-
"on:fullScreen":
|
|
863
|
+
"on:fullScreen": C
|
|
864
864
|
}, null, 40, qa));
|
|
865
865
|
}
|
|
866
866
|
}), Ja = ["modelValue", "data", "collapse", "fixedTopMenu", "subMenuAttrs"], tm = /* @__PURE__ */ ne({
|
|
@@ -870,10 +870,10 @@ const go = (t, e) => {
|
|
|
870
870
|
},
|
|
871
871
|
setup(t) {
|
|
872
872
|
const { menu: e } = Je, n = t, o = H(() => n.menuAttr || {}), r = H(() => e.items), s = H(() => e.items.find((u) => u.fixed)), a = H(() => e.activeItem || ""), l = H(() => e.collapse ?? !1), c = H(() => ({ popupClassName: e.popupClassName ?? "" })), i = async (u) => {
|
|
873
|
-
const
|
|
874
|
-
await z.menu.triggerEventListener("onItemClick",
|
|
873
|
+
const f = u.detail[0], p = la(r.value).find((m) => f === m.id);
|
|
874
|
+
await z.menu.triggerEventListener("onItemClick", p) && z.menu.setActiveItem(p.id);
|
|
875
875
|
};
|
|
876
|
-
return (u,
|
|
876
|
+
return (u, f) => r.value.length > 0 ? ($(), V("das-ce-menu", $t({
|
|
877
877
|
key: 0,
|
|
878
878
|
modelValue: a.value,
|
|
879
879
|
data: r.value,
|
|
@@ -888,24 +888,24 @@ const go = (t, e) => {
|
|
|
888
888
|
tabsAttr: {}
|
|
889
889
|
},
|
|
890
890
|
setup(t) {
|
|
891
|
-
const { tab: e } = Je, n = t, o = H(() => n.tabsAttr || {}), r = H(() => e.items.map((
|
|
892
|
-
...
|
|
893
|
-
key:
|
|
894
|
-
tab:
|
|
895
|
-
}))), s = H(() => e.activeItem || ""), a = async (
|
|
896
|
-
const
|
|
897
|
-
await z.tab.triggerEventListener("onItemClick",
|
|
898
|
-
}, l = async (
|
|
899
|
-
const
|
|
900
|
-
await z.tab.triggerEventListener("onItemRemove",
|
|
901
|
-
}, c = async (
|
|
902
|
-
await z.tab.triggerEventListener("onMenuClick", { type:
|
|
903
|
-
}, i = async (
|
|
904
|
-
await z.tab.triggerEventListener("onPageRefresh",
|
|
891
|
+
const { tab: e } = Je, n = t, o = H(() => n.tabsAttr || {}), r = H(() => e.items.map((f) => ({
|
|
892
|
+
...f,
|
|
893
|
+
key: f.value,
|
|
894
|
+
tab: f.label
|
|
895
|
+
}))), s = H(() => e.activeItem || ""), a = async (f) => {
|
|
896
|
+
const p = f.detail[0], d = r.value.find((A) => p === A.value);
|
|
897
|
+
await z.tab.triggerEventListener("onItemClick", d) && z.tab.setActiveItem(d.value);
|
|
898
|
+
}, l = async (f) => {
|
|
899
|
+
const p = f.detail[0], d = r.value.find((A) => p === A.value);
|
|
900
|
+
await z.tab.triggerEventListener("onItemRemove", d) && z.tab.removeItem(d.value);
|
|
901
|
+
}, c = async (f) => {
|
|
902
|
+
await z.tab.triggerEventListener("onMenuClick", { type: f.detail[0], data: f.detail[1] });
|
|
903
|
+
}, i = async (f) => {
|
|
904
|
+
await z.tab.triggerEventListener("onPageRefresh", f.detail[0]);
|
|
905
905
|
}, u = () => {
|
|
906
906
|
z.tab.triggerEventListener("onToggleFullScreen");
|
|
907
907
|
};
|
|
908
|
-
return (
|
|
908
|
+
return (f, p) => r.value.length > 0 ? ($(), V("das-ce-tabs", $t({
|
|
909
909
|
key: 0,
|
|
910
910
|
modelValue: s.value,
|
|
911
911
|
options: r.value
|
|
@@ -917,7 +917,7 @@ const go = (t, e) => {
|
|
|
917
917
|
"on:toggleFullScreen": u
|
|
918
918
|
}), null, 16, Ka)) : j("v-if", !0);
|
|
919
919
|
}
|
|
920
|
-
}), mo =
|
|
920
|
+
}), mo = T("/das-micro-app"), de = T([]), Ht = T(!1), Qt = T([]), jt = T(!0);
|
|
921
921
|
let Ee = null, Se = null, rt = null;
|
|
922
922
|
const st = (t, e, n) => {
|
|
923
923
|
var r, s, a, l;
|
|
@@ -1123,15 +1123,15 @@ function ai(...t) {
|
|
|
1123
1123
|
Array.isArray(n) || (n = [n]), Array.isArray(o) || (o = [o]);
|
|
1124
1124
|
const s = [], a = () => {
|
|
1125
1125
|
s.forEach((u) => u()), s.length = 0;
|
|
1126
|
-
}, l = (u,
|
|
1127
|
-
a(), u && s.push(...n.flatMap((
|
|
1126
|
+
}, l = (u, f, p, d) => (u.addEventListener(f, p, d), () => u.removeEventListener(f, p, d)), c = G(() => [wr(e), _r(r)], ([u, f]) => {
|
|
1127
|
+
a(), u && s.push(...n.flatMap((p) => o.map((d) => l(u, p, d, f))));
|
|
1128
1128
|
}, { immediate: !0, flush: "post" }), i = () => {
|
|
1129
1129
|
c(), a();
|
|
1130
1130
|
};
|
|
1131
1131
|
return br(i), i;
|
|
1132
1132
|
}
|
|
1133
1133
|
function ii(t, e = !1) {
|
|
1134
|
-
const n =
|
|
1134
|
+
const n = T(), o = () => n.value = !!t();
|
|
1135
1135
|
return o(), oi(o, e), n;
|
|
1136
1136
|
}
|
|
1137
1137
|
const Ao = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, yo = "__vueuse_ssr_handlers__";
|
|
@@ -1179,7 +1179,7 @@ const _o = [
|
|
|
1179
1179
|
]
|
|
1180
1180
|
];
|
|
1181
1181
|
function ht(t, e = {}) {
|
|
1182
|
-
const { document: n = si, autoExit: o = !1 } = e, r = t || (n == null ? void 0 : n.querySelector("html")), s =
|
|
1182
|
+
const { document: n = si, autoExit: o = !1 } = e, r = t || (n == null ? void 0 : n.querySelector("html")), s = T(!1);
|
|
1183
1183
|
let a = _o[0];
|
|
1184
1184
|
const l = ii(() => {
|
|
1185
1185
|
if (n) {
|
|
@@ -1189,28 +1189,28 @@ function ht(t, e = {}) {
|
|
|
1189
1189
|
} else
|
|
1190
1190
|
return !1;
|
|
1191
1191
|
return !1;
|
|
1192
|
-
}), [c, i, u, ,
|
|
1193
|
-
async function
|
|
1192
|
+
}), [c, i, u, , f] = a;
|
|
1193
|
+
async function p() {
|
|
1194
1194
|
l.value && (n != null && n[u] && await n[i](), s.value = !1);
|
|
1195
1195
|
}
|
|
1196
|
-
async function
|
|
1196
|
+
async function d() {
|
|
1197
1197
|
if (!l.value)
|
|
1198
1198
|
return;
|
|
1199
|
-
await
|
|
1199
|
+
await p();
|
|
1200
1200
|
const A = wr(r);
|
|
1201
1201
|
A && (await A[c](), s.value = !0);
|
|
1202
1202
|
}
|
|
1203
|
-
async function
|
|
1204
|
-
s.value ? await
|
|
1203
|
+
async function m() {
|
|
1204
|
+
s.value ? await p() : await d();
|
|
1205
1205
|
}
|
|
1206
|
-
return n && ai(n,
|
|
1206
|
+
return n && ai(n, f, () => {
|
|
1207
1207
|
s.value = !!(n != null && n[u]);
|
|
1208
|
-
}, !1), o && br(
|
|
1208
|
+
}, !1), o && br(p), {
|
|
1209
1209
|
isSupported: l,
|
|
1210
1210
|
isFullscreen: s,
|
|
1211
|
-
enter:
|
|
1212
|
-
exit:
|
|
1213
|
-
toggle:
|
|
1211
|
+
enter: d,
|
|
1212
|
+
exit: p,
|
|
1213
|
+
toggle: m
|
|
1214
1214
|
};
|
|
1215
1215
|
}
|
|
1216
1216
|
var bo;
|
|
@@ -1268,7 +1268,7 @@ const fi = ["src", "entry", "name"], hi = /* @__PURE__ */ ne({
|
|
|
1268
1268
|
}, s = H(() => n.actived);
|
|
1269
1269
|
return G(() => s.value, (l) => {
|
|
1270
1270
|
l && o("onActivated"), l || o("onDeactivated");
|
|
1271
|
-
}), (l, c) => ($(),
|
|
1271
|
+
}), (l, c) => ($(), V("iframe", {
|
|
1272
1272
|
class: "das-micro-app",
|
|
1273
1273
|
src: n.src,
|
|
1274
1274
|
entry: n.src,
|
|
@@ -1280,13 +1280,13 @@ const fi = ["src", "entry", "name"], hi = /* @__PURE__ */ ne({
|
|
|
1280
1280
|
}), gi = /* @__PURE__ */ Ce(hi, [["__scopeId", "data-v-2266bab0"]]), mi = /* @__PURE__ */ ne({
|
|
1281
1281
|
__name: "das-micro-apps",
|
|
1282
1282
|
setup(t) {
|
|
1283
|
-
const e =
|
|
1284
|
-
const l = de.value.find((
|
|
1283
|
+
const e = T(null), n = async (s, a) => {
|
|
1284
|
+
const l = de.value.find((p) => p.name === a);
|
|
1285
1285
|
if (!l) return;
|
|
1286
|
-
l.dom = s.target, await Qe(), await new Promise((
|
|
1286
|
+
l.dom = s.target, await Qe(), await new Promise((p) => setTimeout(p, 50));
|
|
1287
1287
|
const c = () => {
|
|
1288
|
-
const
|
|
1289
|
-
return
|
|
1288
|
+
const p = e.value.getBoundingClientRect() || {};
|
|
1289
|
+
return p.width = e.value.clientWidth, p.height = e.value.clientHeight, p;
|
|
1290
1290
|
};
|
|
1291
1291
|
ee.sendMessageToMicroApp(a, "onLoaded", {
|
|
1292
1292
|
href: location.href,
|
|
@@ -1309,7 +1309,7 @@ const fi = ["src", "entry", "name"], hi = /* @__PURE__ */ ne({
|
|
|
1309
1309
|
const { dom: c, ...i } = l;
|
|
1310
1310
|
ee.sendMessageToMicroApp(a, "onDeactivated"), ee.triggerMicroAppLifeCycleListener("onDeactivated", i);
|
|
1311
1311
|
};
|
|
1312
|
-
return (s, a) => ($(),
|
|
1312
|
+
return (s, a) => ($(), V(
|
|
1313
1313
|
"div",
|
|
1314
1314
|
{
|
|
1315
1315
|
ref_key: "containerRef",
|
|
@@ -1317,10 +1317,10 @@ const fi = ["src", "entry", "name"], hi = /* @__PURE__ */ ne({
|
|
|
1317
1317
|
class: "das-micro-app-container"
|
|
1318
1318
|
},
|
|
1319
1319
|
[
|
|
1320
|
-
($(!0),
|
|
1320
|
+
($(!0), V(
|
|
1321
1321
|
De,
|
|
1322
1322
|
null,
|
|
1323
|
-
Tt(v(de), (l) => ($(),
|
|
1323
|
+
Tt(v(de), (l) => ($(), V(
|
|
1324
1324
|
De,
|
|
1325
1325
|
null,
|
|
1326
1326
|
[
|
|
@@ -1435,7 +1435,7 @@ const fi = ["src", "entry", "name"], hi = /* @__PURE__ */ ne({
|
|
|
1435
1435
|
component: Cr,
|
|
1436
1436
|
meta: { isMicroApp: !0, keepAlive: !0 }
|
|
1437
1437
|
});
|
|
1438
|
-
const o =
|
|
1438
|
+
const o = T(!1), r = T(!1), s = T("");
|
|
1439
1439
|
G(
|
|
1440
1440
|
() => e.currentRoute.value,
|
|
1441
1441
|
(a) => {
|
|
@@ -1477,8 +1477,8 @@ const fi = ["src", "entry", "name"], hi = /* @__PURE__ */ ne({
|
|
|
1477
1477
|
params: i
|
|
1478
1478
|
});
|
|
1479
1479
|
}), ee.addEventListenerFromMainApp("onActivated", (a) => {
|
|
1480
|
-
const { name: l = "", params: c = {}, query: i = {} } = e.currentRoute.value, { fromPath: u = "", fromQuery:
|
|
1481
|
-
o.value = !0, e == null || e.push({ path: u, query: JSON.parse(
|
|
1480
|
+
const { name: l = "", params: c = {}, query: i = {} } = e.currentRoute.value, { fromPath: u = "", fromQuery: f = "{}" } = i || {};
|
|
1481
|
+
o.value = !0, e == null || e.push({ path: u, query: JSON.parse(f), params: c });
|
|
1482
1482
|
}), ee.addEventListenerFromMainApp("sessionStorage", (a) => {
|
|
1483
1483
|
const { cmd: l, key: c, value: i } = a.data;
|
|
1484
1484
|
l === "setItem" && window.sessionStorage.setItem(c, i), l === "getItem" && window.sessionStorage.getItem(c), l === "removeItem" && window.sessionStorage.removeItem(c), l === "clear" && window.sessionStorage.clear();
|
|
@@ -1490,9 +1490,9 @@ const fi = ["src", "entry", "name"], hi = /* @__PURE__ */ ne({
|
|
|
1490
1490
|
jt.value = !0, Qt.value = [];
|
|
1491
1491
|
}, 100));
|
|
1492
1492
|
});
|
|
1493
|
-
}, Ct = "/",
|
|
1493
|
+
}, Ct = "/", je = "/application", Ir = [
|
|
1494
1494
|
{ value: Ct, label: N("首页").value, path: Ct, fixed: !0 },
|
|
1495
|
-
{ value:
|
|
1495
|
+
{ value: je, label: N("应用").value, path: je, fixed: !0 }
|
|
1496
1496
|
], ct = "/outerView", Tr = "/placeholder", yi = [
|
|
1497
1497
|
{ value: "0", label: N("主题设置").value },
|
|
1498
1498
|
{ value: "1", label: N("个人中心").value },
|
|
@@ -1550,62 +1550,62 @@ const fi = ["src", "entry", "name"], hi = /* @__PURE__ */ ne({
|
|
|
1550
1550
|
platformInitNextTick: {}
|
|
1551
1551
|
},
|
|
1552
1552
|
setup(t) {
|
|
1553
|
-
const e = t, n =
|
|
1553
|
+
const e = t, n = T({}), o = T(120), r = T(64);
|
|
1554
1554
|
let s = [];
|
|
1555
|
-
const a =
|
|
1555
|
+
const a = T([]), l = Ne({
|
|
1556
1556
|
color: "rgba(0,0,0,.15)",
|
|
1557
1557
|
fontSize: 16
|
|
1558
|
-
}), c = (
|
|
1558
|
+
}), c = (d, m) => {
|
|
1559
1559
|
const A = document.createElement("span");
|
|
1560
|
-
A.innerHTML =
|
|
1561
|
-
const
|
|
1562
|
-
o.value = Math.ceil(
|
|
1563
|
-
}, i = (
|
|
1560
|
+
A.innerHTML = d, A.style.fontSize = m + "px", A.style.fontFamily = "sans-serif", A.style.visibility = "hidden", document.body.appendChild(A);
|
|
1561
|
+
const g = A.getBoundingClientRect();
|
|
1562
|
+
o.value = Math.ceil(g.width) + m / 2, r.value = Math.ceil(g.height), document.body.removeChild(A);
|
|
1563
|
+
}, i = (d) => {
|
|
1564
1564
|
var A;
|
|
1565
|
-
const
|
|
1566
|
-
a.value =
|
|
1565
|
+
const m = !!((A = n.value) != null && A.pageSwith);
|
|
1566
|
+
a.value = d && m ? [...s] : [];
|
|
1567
1567
|
}, u = async () => {
|
|
1568
|
-
var
|
|
1568
|
+
var g, h, b, y, C, I, _;
|
|
1569
1569
|
await (e == null ? void 0 : e.platformInitNextTick());
|
|
1570
|
-
const [
|
|
1571
|
-
if (
|
|
1572
|
-
if (n.value =
|
|
1570
|
+
const [d, m] = await bi().run();
|
|
1571
|
+
if (d) return null;
|
|
1572
|
+
if (n.value = m, !!((g = n.value) != null && g.pageSwith)) {
|
|
1573
1573
|
s = [];
|
|
1574
|
-
const { name:
|
|
1575
|
-
let
|
|
1576
|
-
if ((
|
|
1577
|
-
const x =
|
|
1578
|
-
s.push(x),
|
|
1574
|
+
const { name: S, phone: E } = await na();
|
|
1575
|
+
let k = "";
|
|
1576
|
+
if ((h = n.value) != null && h.nameSwith && S && (s.push(S), k = k + `${S} `), (b = n.value) != null && b.phoneSwith && E) {
|
|
1577
|
+
const x = E.slice(-4);
|
|
1578
|
+
s.push(x), k = k + `${x} `;
|
|
1579
1579
|
}
|
|
1580
|
-
if ((y = n.value) != null && y.textSwith && ((
|
|
1580
|
+
if ((y = n.value) != null && y.textSwith && ((C = n.value) != null && C.text)) {
|
|
1581
1581
|
s.push(n.value.text);
|
|
1582
1582
|
const x = n.value.text.replaceAll(`
|
|
1583
1583
|
`, "<br/>");
|
|
1584
|
-
|
|
1584
|
+
k = k + `${x}`;
|
|
1585
1585
|
}
|
|
1586
1586
|
s.length && (s = s.join(" ").split(`
|
|
1587
|
-
`)), l.color = (
|
|
1587
|
+
`)), l.color = (I = n.value) != null && I.textColor ? n.value.textColor : "rgba(0,0,0,.15)", l.fontSize = (_ = n.value) != null && _.textSize ? parseInt(n.value.textSize) : 16, c(k, l.fontSize);
|
|
1588
1588
|
}
|
|
1589
|
-
return
|
|
1589
|
+
return m;
|
|
1590
1590
|
};
|
|
1591
1591
|
u();
|
|
1592
|
-
const
|
|
1592
|
+
const f = Ye(), p = Dt();
|
|
1593
1593
|
return G(
|
|
1594
|
-
() =>
|
|
1595
|
-
(
|
|
1596
|
-
var
|
|
1597
|
-
const
|
|
1598
|
-
let
|
|
1599
|
-
|
|
1594
|
+
() => f.currentRoute.value,
|
|
1595
|
+
(d) => {
|
|
1596
|
+
var h, b, y;
|
|
1597
|
+
const m = !!((h = n.value) != null && h.pageSwith), A = ((b = d.meta) == null ? void 0 : b.showWatermark) ?? !0;
|
|
1598
|
+
let g = ((y = d.query) == null ? void 0 : y.showWatermark) ?? !0;
|
|
1599
|
+
g === "false" && (g = !1), i(m && !!(A && g));
|
|
1600
1600
|
},
|
|
1601
1601
|
{ immediate: !0 }
|
|
1602
|
-
),
|
|
1603
|
-
var A,
|
|
1602
|
+
), le.addEventListenerFromMicroApp("systemconfig:watermark-change", () => {
|
|
1603
|
+
var A, g;
|
|
1604
1604
|
u();
|
|
1605
|
-
const
|
|
1606
|
-
let
|
|
1607
|
-
|
|
1608
|
-
}), (
|
|
1605
|
+
const d = !!((A = n.value) != null && A.pageSwith);
|
|
1606
|
+
let m = ((g = p.query) == null ? void 0 : g.showWatermark) ?? !0;
|
|
1607
|
+
m === "false" && (m = !1), i(!!(d && m));
|
|
1608
|
+
}), (d, m) => ($(), F(v(ra), {
|
|
1609
1609
|
class: "watermark",
|
|
1610
1610
|
font: l,
|
|
1611
1611
|
zIndex: 2147483647,
|
|
@@ -1614,7 +1614,7 @@ const fi = ["src", "entry", "name"], hi = /* @__PURE__ */ ne({
|
|
|
1614
1614
|
height: r.value
|
|
1615
1615
|
}, {
|
|
1616
1616
|
default: B(() => [
|
|
1617
|
-
fe(
|
|
1617
|
+
fe(d.$slots, "default", {}, void 0, !0)
|
|
1618
1618
|
]),
|
|
1619
1619
|
_: 3
|
|
1620
1620
|
/* FORWARDED */
|
|
@@ -1639,7 +1639,7 @@ const fi = ["src", "entry", "name"], hi = /* @__PURE__ */ ne({
|
|
|
1639
1639
|
closeCallback: {}
|
|
1640
1640
|
},
|
|
1641
1641
|
setup(t) {
|
|
1642
|
-
const e =
|
|
1642
|
+
const e = T(!0);
|
|
1643
1643
|
return (n, o) => ($(), F(v(Nn), {
|
|
1644
1644
|
modelValue: e.value,
|
|
1645
1645
|
"onUpdate:modelValue": o[0] || (o[0] = (r) => e.value = r),
|
|
@@ -1653,7 +1653,7 @@ const fi = ["src", "entry", "name"], hi = /* @__PURE__ */ ne({
|
|
|
1653
1653
|
}, {
|
|
1654
1654
|
footer: B(() => [
|
|
1655
1655
|
O("div", ki, [
|
|
1656
|
-
R(v(
|
|
1656
|
+
R(v(Ue), {
|
|
1657
1657
|
btnType: "default",
|
|
1658
1658
|
size: "small",
|
|
1659
1659
|
onClick: n.closeCallback
|
|
@@ -1671,20 +1671,20 @@ const fi = ["src", "entry", "name"], hi = /* @__PURE__ */ ne({
|
|
|
1671
1671
|
class: "content",
|
|
1672
1672
|
innerHTML: n.content
|
|
1673
1673
|
}, null, 8, Ei),
|
|
1674
|
-
n.desc && n.desc.length ? ($(),
|
|
1674
|
+
n.desc && n.desc.length ? ($(), V(
|
|
1675
1675
|
De,
|
|
1676
1676
|
{ key: 0 },
|
|
1677
1677
|
[
|
|
1678
1678
|
Si,
|
|
1679
|
-
($(!0),
|
|
1679
|
+
($(!0), V(
|
|
1680
1680
|
De,
|
|
1681
1681
|
null,
|
|
1682
|
-
Tt(n.desc, (r, s) => Te(($(),
|
|
1682
|
+
Tt(n.desc, (r, s) => Te(($(), V("div", {
|
|
1683
1683
|
key: s,
|
|
1684
1684
|
class: "desc-item"
|
|
1685
1685
|
}, [
|
|
1686
1686
|
ye(
|
|
1687
|
-
|
|
1687
|
+
se(r),
|
|
1688
1688
|
1
|
|
1689
1689
|
/* TEXT */
|
|
1690
1690
|
)
|
|
@@ -1777,29 +1777,29 @@ const $i = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAhwAAAFoCAYAAAAcpSI2AA
|
|
|
1777
1777
|
}, Qi = (t, e) => {
|
|
1778
1778
|
const n = "permission-btn", o = JSON.parse(sessionStorage.getItem(n) || "{}") || {}, r = t != null && t.length ? t.filter((c) => c.routeUrl) : [], s = t != null && t.length ? t.filter((c) => !c.routeUrl && c.children).map((c) => c.children).flat() : [], a = [...r, ...s], l = {};
|
|
1779
1779
|
return a.forEach((c) => {
|
|
1780
|
-
var
|
|
1780
|
+
var p;
|
|
1781
1781
|
const i = c.code, u = (c == null ? void 0 : c.originalCode) ?? "";
|
|
1782
1782
|
l[i] || (l[i] = []);
|
|
1783
|
-
let
|
|
1784
|
-
c != null && c.children && ((
|
|
1785
|
-
var
|
|
1786
|
-
!(
|
|
1787
|
-
code:
|
|
1788
|
-
originalCode:
|
|
1789
|
-
name:
|
|
1790
|
-
}) : Me([
|
|
1791
|
-
|
|
1792
|
-
code:
|
|
1793
|
-
originalCode:
|
|
1794
|
-
name:
|
|
1783
|
+
let f = [];
|
|
1784
|
+
c != null && c.children && ((p = c == null ? void 0 : c.children) != null && p.length) && (c.children.forEach((d) => {
|
|
1785
|
+
var m;
|
|
1786
|
+
!(d != null && d.children) || !((m = d.children) != null && m.length) ? f.push({
|
|
1787
|
+
code: d.code,
|
|
1788
|
+
originalCode: d.originalCode,
|
|
1789
|
+
name: d.name
|
|
1790
|
+
}) : Me([d]).forEach((g) => {
|
|
1791
|
+
f.push({
|
|
1792
|
+
code: g.code,
|
|
1793
|
+
originalCode: g.originalCode,
|
|
1794
|
+
name: g.name
|
|
1795
1795
|
});
|
|
1796
1796
|
});
|
|
1797
|
-
}),
|
|
1798
|
-
let
|
|
1799
|
-
|
|
1797
|
+
}), f.forEach((d) => {
|
|
1798
|
+
let m = d.originalCode ? d.originalCode : d.code ? d.code : "";
|
|
1799
|
+
m.includes(i + ".") && (m = m.replace(i + ".", "").replaceAll(".", "-")), m.includes(u + ".") && (m = m.replace(u + ".", "").replaceAll(".", "-"));
|
|
1800
1800
|
const A = {
|
|
1801
|
-
code:
|
|
1802
|
-
name:
|
|
1801
|
+
code: m,
|
|
1802
|
+
name: d.name
|
|
1803
1803
|
};
|
|
1804
1804
|
l[i].push(A), u && i !== u && (l["origin-auth"] || (l["origin-auth"] = {}), l["origin-auth"][u] || (l["origin-auth"][u] = []), l["origin-auth"][u].push(A));
|
|
1805
1805
|
}));
|
|
@@ -1898,20 +1898,20 @@ function lc(t, e) {
|
|
|
1898
1898
|
var n = this.__data__, o = tn(n, t);
|
|
1899
1899
|
return o < 0 ? (++this.size, n.push([t, e])) : n[o][1] = e, this;
|
|
1900
1900
|
}
|
|
1901
|
-
function
|
|
1901
|
+
function He(t) {
|
|
1902
1902
|
var e = -1, n = t == null ? 0 : t.length;
|
|
1903
1903
|
for (this.clear(); ++e < n; ) {
|
|
1904
1904
|
var o = t[e];
|
|
1905
1905
|
this.set(o[0], o[1]);
|
|
1906
1906
|
}
|
|
1907
1907
|
}
|
|
1908
|
-
|
|
1909
|
-
|
|
1910
|
-
|
|
1911
|
-
|
|
1912
|
-
|
|
1908
|
+
He.prototype.clear = oc;
|
|
1909
|
+
He.prototype.delete = ac;
|
|
1910
|
+
He.prototype.get = ic;
|
|
1911
|
+
He.prototype.has = cc;
|
|
1912
|
+
He.prototype.set = lc;
|
|
1913
1913
|
function uc() {
|
|
1914
|
-
this.__data__ = new
|
|
1914
|
+
this.__data__ = new He(), this.size = 0;
|
|
1915
1915
|
}
|
|
1916
1916
|
function dc(t) {
|
|
1917
1917
|
var e = this.__data__, n = e.delete(t);
|
|
@@ -2032,7 +2032,7 @@ Xe.prototype.set = Kc;
|
|
|
2032
2032
|
function Gc() {
|
|
2033
2033
|
this.size = 0, this.__data__ = {
|
|
2034
2034
|
hash: new Xe(),
|
|
2035
|
-
map: new (St ||
|
|
2035
|
+
map: new (St || He)(),
|
|
2036
2036
|
string: new Xe()
|
|
2037
2037
|
};
|
|
2038
2038
|
}
|
|
@@ -2073,7 +2073,7 @@ gt.prototype.set = tl;
|
|
|
2073
2073
|
var nl = 200;
|
|
2074
2074
|
function ol(t, e) {
|
|
2075
2075
|
var n = this.__data__;
|
|
2076
|
-
if (n instanceof
|
|
2076
|
+
if (n instanceof He) {
|
|
2077
2077
|
var o = n.__data__;
|
|
2078
2078
|
if (!St || o.length < nl - 1)
|
|
2079
2079
|
return o.push([t, e]), this.size = ++n.size, this;
|
|
@@ -2082,7 +2082,7 @@ function ol(t, e) {
|
|
|
2082
2082
|
return n.set(t, e), this.size = n.size, this;
|
|
2083
2083
|
}
|
|
2084
2084
|
function mt(t) {
|
|
2085
|
-
var e = this.__data__ = new
|
|
2085
|
+
var e = this.__data__ = new He(t);
|
|
2086
2086
|
this.size = e.size;
|
|
2087
2087
|
}
|
|
2088
2088
|
mt.prototype.clear = uc;
|
|
@@ -2402,30 +2402,30 @@ function Ft(t, e, n, o, r, s) {
|
|
|
2402
2402
|
if (a = Iu(t), !l)
|
|
2403
2403
|
return iu(t, a);
|
|
2404
2404
|
} else {
|
|
2405
|
-
var
|
|
2405
|
+
var f = xe(t), p = f == Xr || f == dd;
|
|
2406
2406
|
if (Qr(t))
|
|
2407
2407
|
return au(t, l);
|
|
2408
|
-
if (
|
|
2409
|
-
if (a = c ||
|
|
2408
|
+
if (f == Zr || f == Gr || p && !r) {
|
|
2409
|
+
if (a = c || p ? {} : Xu(t), !l)
|
|
2410
2410
|
return c ? fu(t, ru(a, t)) : du(t, Yl(a, t));
|
|
2411
2411
|
} else {
|
|
2412
|
-
if (!K[
|
|
2412
|
+
if (!K[f])
|
|
2413
2413
|
return r ? t : {};
|
|
2414
|
-
a = Ku(t,
|
|
2414
|
+
a = Ku(t, f, l);
|
|
2415
2415
|
}
|
|
2416
2416
|
}
|
|
2417
2417
|
s || (s = new mt());
|
|
2418
|
-
var
|
|
2419
|
-
if (
|
|
2420
|
-
return
|
|
2421
|
-
s.set(t, a), od(t) ? t.forEach(function(
|
|
2422
|
-
a.add(Ft(
|
|
2423
|
-
}) : ed(t) && t.forEach(function(
|
|
2424
|
-
a.set(
|
|
2418
|
+
var d = s.get(t);
|
|
2419
|
+
if (d)
|
|
2420
|
+
return d;
|
|
2421
|
+
s.set(t, a), od(t) ? t.forEach(function(g) {
|
|
2422
|
+
a.add(Ft(g, e, n, g, t, s));
|
|
2423
|
+
}) : ed(t) && t.forEach(function(g, h) {
|
|
2424
|
+
a.set(h, Ft(g, e, n, h, t, s));
|
|
2425
2425
|
});
|
|
2426
|
-
var
|
|
2427
|
-
return rl(A || t, function(
|
|
2428
|
-
A && (
|
|
2426
|
+
var m = i ? c ? gu : hu : c ? Jn : qn, A = u ? void 0 : m(t);
|
|
2427
|
+
return rl(A || t, function(g, h) {
|
|
2428
|
+
A && (h = g, g = t[h]), Br(a, h, Ft(g, e, n, h, t, s));
|
|
2429
2429
|
}), a;
|
|
2430
2430
|
}
|
|
2431
2431
|
var Ld = 1, $d = 4;
|
|
@@ -2465,13 +2465,13 @@ const Kt = (t, e = "") => {
|
|
|
2465
2465
|
{ key: "currentTab", value: {} },
|
|
2466
2466
|
{ key: `preTab:${t}`, value: {} },
|
|
2467
2467
|
{ key: `tabMap:${t}`, value: [] }
|
|
2468
|
-
]), o || (o = { fixed: !0, path:
|
|
2468
|
+
]), o || (o = { fixed: !0, path: je }), { currentApp: o };
|
|
2469
2469
|
}, Md = (t, e) => {
|
|
2470
2470
|
const n = t.findIndex((s) => s.code === e), o = t.slice(0, n), r = t.slice(n + 1);
|
|
2471
2471
|
return { left: o, right: r };
|
|
2472
2472
|
}, Od = (t, e, n) => {
|
|
2473
|
-
var
|
|
2474
|
-
const o = Me(e).filter((
|
|
2473
|
+
var f;
|
|
2474
|
+
const o = Me(e).filter((p) => p.routeUrl).filter((p) => !(p != null && p.disable) && !(p != null && p.expired)), s = (((f = ve()) == null ? void 0 : f.tabMap) ?? {})[t] ?? [], { left: a, right: l } = Md(s, n), c = s.filter((p) => o.find((d) => d.code === p.code));
|
|
2475
2475
|
if (!a.length && !l.length || !c.length)
|
|
2476
2476
|
return Ae([
|
|
2477
2477
|
{ key: "currentCode", value: "" },
|
|
@@ -2481,12 +2481,12 @@ const Kt = (t, e = "") => {
|
|
|
2481
2481
|
]), $n(t);
|
|
2482
2482
|
let i = null;
|
|
2483
2483
|
if (l.length) {
|
|
2484
|
-
const
|
|
2485
|
-
|
|
2484
|
+
const p = l.find((d) => c.map((m) => m.code).includes(d.code));
|
|
2485
|
+
p && (i = p);
|
|
2486
2486
|
}
|
|
2487
2487
|
if (!i && a.length) {
|
|
2488
|
-
const
|
|
2489
|
-
|
|
2488
|
+
const p = a.reverse().find((d) => c.map((m) => m.code).includes(d.code));
|
|
2489
|
+
p && (i = p);
|
|
2490
2490
|
}
|
|
2491
2491
|
return i ? (Ae([
|
|
2492
2492
|
{
|
|
@@ -2502,7 +2502,7 @@ const Kt = (t, e = "") => {
|
|
|
2502
2502
|
value: i
|
|
2503
2503
|
},
|
|
2504
2504
|
{ key: `tabMap:${t}`, value: c }
|
|
2505
|
-
]), kr(i.code), { currentMenu: o.find((
|
|
2505
|
+
]), kr(i.code), { currentMenu: o.find((p) => p.code === i.code), currentTab: i }) : (Ae([
|
|
2506
2506
|
{ key: `preTab:${t}`, value: {} },
|
|
2507
2507
|
{ key: `tabMap:${t}`, value: [] }
|
|
2508
2508
|
]), $n(t));
|
|
@@ -2522,56 +2522,56 @@ const Kt = (t, e = "") => {
|
|
|
2522
2522
|
a != null && a.children && a.children.length && (a.originalChildren = dt(a.children)), (a != null && a.expired || a != null && a.disable) && (a.children = []);
|
|
2523
2523
|
}), { menus: r, originalMenus: s };
|
|
2524
2524
|
}, Bd = async (t) => {
|
|
2525
|
-
var
|
|
2525
|
+
var p, d, m, A;
|
|
2526
2526
|
let { microApp: e = null, menuCode: n = "", menuPath: o = "", route: r = {} } = t;
|
|
2527
|
-
const s = ((
|
|
2528
|
-
let a = ((
|
|
2527
|
+
const s = ((p = r.meta) == null ? void 0 : p.showLayout) ?? !0;
|
|
2528
|
+
let a = ((d = r.query) == null ? void 0 : d.showLayout) ?? !0;
|
|
2529
2529
|
a === "false" && (a = !1);
|
|
2530
2530
|
let l = (e == null ? void 0 : e.code) ?? "";
|
|
2531
2531
|
if (!l) return { menuConfig: [], currentApp: null, currentMenu: null, query: null };
|
|
2532
2532
|
let c = [], i = [];
|
|
2533
2533
|
const u = J().subAppList ?? [];
|
|
2534
|
-
if (u.length && (c = ((
|
|
2535
|
-
const { menus:
|
|
2536
|
-
c =
|
|
2534
|
+
if (u.length && (c = ((m = u.find((g) => g.code === e.code)) == null ? void 0 : m.menus) ?? []), !c.length) {
|
|
2535
|
+
const { menus: g, originalMenus: h } = await Xn(l);
|
|
2536
|
+
c = g ?? [], i = h ?? [];
|
|
2537
2537
|
}
|
|
2538
2538
|
if (!c.length && (!s || !a))
|
|
2539
2539
|
return { menuConfig: [], currentApp: null, currentMenu: null, query: null };
|
|
2540
2540
|
if (e.routeUrl === "iot/iot") {
|
|
2541
|
-
const { instanceInfo:
|
|
2542
|
-
if (
|
|
2543
|
-
let
|
|
2541
|
+
const { instanceInfo: g } = await nc();
|
|
2542
|
+
if (g) {
|
|
2543
|
+
let h = !1;
|
|
2544
2544
|
c.forEach((y) => {
|
|
2545
|
-
y.routeUrl === "/deviceInstance" && (y.fixed = !0, y.divise = !0, y.menuCode = y.code, y.tagName = y.tabName = "实例", y.name =
|
|
2545
|
+
y.routeUrl === "/deviceInstance" && (y.fixed = !0, y.divise = !0, y.menuCode = y.code, y.tagName = y.tabName = "实例", y.name = g.instanceName, y.leftIcon = "change2", y.rightIcon = "change2");
|
|
2546
2546
|
});
|
|
2547
|
-
const
|
|
2548
|
-
if (
|
|
2549
|
-
const
|
|
2550
|
-
|
|
2547
|
+
const b = js(g.endTime) || g.endTime == 0 || g.endTime === 253370736e6 || g.endTime === "253370736000000" ? "-" : Number(g.endTime);
|
|
2548
|
+
if (h = Cn().endOf("day") > Cn(b).endOf("day"), !n && g.id && !h) {
|
|
2549
|
+
const C = Me(c).find((I) => I.routeUrl === "/statisticalReport");
|
|
2550
|
+
C && (n = C.code);
|
|
2551
2551
|
}
|
|
2552
2552
|
}
|
|
2553
2553
|
}
|
|
2554
2554
|
if (s && a) {
|
|
2555
|
-
const
|
|
2556
|
-
if (
|
|
2557
|
-
const
|
|
2558
|
-
(y) => n && n === y.code || o && o === `/${y.applicationPath}${y.path}`.replace(/\/\//g, "/") || Me(c).map((
|
|
2555
|
+
const h = (ve().tabMap ?? {})[e.code] ?? [];
|
|
2556
|
+
if (h.length) {
|
|
2557
|
+
const b = h.filter(
|
|
2558
|
+
(y) => n && n === y.code || o && o === `/${y.applicationPath}${y.path}`.replace(/\/\//g, "/") || Me(c).map((C) => C.code).includes(y.code)
|
|
2559
2559
|
);
|
|
2560
2560
|
Ae([
|
|
2561
2561
|
{
|
|
2562
2562
|
key: `tabMap:${e.code}`,
|
|
2563
|
-
value:
|
|
2563
|
+
value: b
|
|
2564
2564
|
}
|
|
2565
2565
|
]);
|
|
2566
2566
|
}
|
|
2567
2567
|
}
|
|
2568
2568
|
if (!n && o) {
|
|
2569
|
-
const
|
|
2570
|
-
const
|
|
2571
|
-
return
|
|
2569
|
+
const g = Me(c).find((h) => {
|
|
2570
|
+
const b = `/${h.applicationPath}${h.routeUrl}`.replace(/\/\//g, "/");
|
|
2571
|
+
return h.applicationPath && h.routeUrl && (o === b || o.startsWith(`/${b}/`));
|
|
2572
2572
|
});
|
|
2573
|
-
if (
|
|
2574
|
-
n =
|
|
2573
|
+
if (g)
|
|
2574
|
+
n = g.code;
|
|
2575
2575
|
else
|
|
2576
2576
|
return {
|
|
2577
2577
|
menuConfig: c,
|
|
@@ -2580,60 +2580,60 @@ const Kt = (t, e = "") => {
|
|
|
2580
2580
|
query: { ...r.query, app: l }
|
|
2581
2581
|
};
|
|
2582
2582
|
}
|
|
2583
|
-
let
|
|
2584
|
-
if (!
|
|
2583
|
+
let f = Kt(c, n);
|
|
2584
|
+
if (!f) {
|
|
2585
2585
|
if (!s || !a)
|
|
2586
2586
|
return { menuConfig: c, currentApp: null, currentMenu: null, query: { ...r.query, app: l } };
|
|
2587
|
-
const
|
|
2588
|
-
|
|
2587
|
+
const g = Od(e.code, c, n);
|
|
2588
|
+
g != null && g.currentApp && (e = g.currentApp), g != null && g.currentMenu && (f = g.currentMenu), g != null && g.currentTab && (r.query = ((A = g.currentTab) == null ? void 0 : A.query) ?? {});
|
|
2589
2589
|
}
|
|
2590
|
-
if ((e == null ? void 0 : e.routeUrl) ===
|
|
2590
|
+
if ((e == null ? void 0 : e.routeUrl) === je)
|
|
2591
2591
|
return { menuConfig: [], currentApp: e, currentMenu: null, query: null };
|
|
2592
|
-
if (
|
|
2593
|
-
const
|
|
2594
|
-
let
|
|
2595
|
-
o && o.startsWith(
|
|
2596
|
-
const
|
|
2592
|
+
if (f) {
|
|
2593
|
+
const g = `/${f.applicationPath}${f.routeUrl}`;
|
|
2594
|
+
let h = "";
|
|
2595
|
+
o && o.startsWith(g) && o !== g && (h = o);
|
|
2596
|
+
const b = { ...r.query, app: l, menu: f.code };
|
|
2597
2597
|
if (s && a) {
|
|
2598
|
-
const y = { ...e, currentMenuCode:
|
|
2598
|
+
const y = { ...e, currentMenuCode: f.code, menus: c, originalMenus: i };
|
|
2599
2599
|
ke([
|
|
2600
2600
|
{ key: "currentSubApp", value: y },
|
|
2601
2601
|
{ key: "currentSubAppCode", value: l },
|
|
2602
2602
|
{ key: "subAppList", value: y }
|
|
2603
2603
|
]);
|
|
2604
|
-
const
|
|
2604
|
+
const C = {
|
|
2605
2605
|
currentApplication: e.routeUrl,
|
|
2606
|
-
applicationPath:
|
|
2606
|
+
applicationPath: f.applicationPath,
|
|
2607
2607
|
applicationCode: l,
|
|
2608
|
-
menuId:
|
|
2609
|
-
code:
|
|
2610
|
-
name: (
|
|
2611
|
-
path:
|
|
2612
|
-
query:
|
|
2608
|
+
menuId: f.id,
|
|
2609
|
+
code: f.code,
|
|
2610
|
+
name: (f == null ? void 0 : f.tabName) ?? f.name,
|
|
2611
|
+
path: f.routeUrl,
|
|
2612
|
+
query: b
|
|
2613
2613
|
};
|
|
2614
2614
|
Ae([
|
|
2615
2615
|
{
|
|
2616
2616
|
key: "currentCode",
|
|
2617
|
-
value:
|
|
2617
|
+
value: f.code
|
|
2618
2618
|
},
|
|
2619
2619
|
{
|
|
2620
2620
|
key: "currentTab",
|
|
2621
|
-
value:
|
|
2621
|
+
value: C
|
|
2622
2622
|
},
|
|
2623
2623
|
{
|
|
2624
2624
|
key: `tabMap:${l}`,
|
|
2625
|
-
value:
|
|
2625
|
+
value: C
|
|
2626
2626
|
},
|
|
2627
2627
|
{
|
|
2628
2628
|
key: `preTab:${l}`,
|
|
2629
|
-
value:
|
|
2629
|
+
value: C
|
|
2630
2630
|
}
|
|
2631
2631
|
]);
|
|
2632
2632
|
}
|
|
2633
|
-
return { menuConfig: c, currentApp: e, currentMenu:
|
|
2633
|
+
return { menuConfig: c, currentApp: e, currentMenu: f, query: b, microPath: h };
|
|
2634
2634
|
}
|
|
2635
2635
|
return { menuConfig: c, currentApp: e, currentMenu: null, query: { ...r.query, app: l } };
|
|
2636
|
-
}, Rd = We.get("/appcategory"), zo =
|
|
2636
|
+
}, Rd = We.get("/appcategory"), zo = T([]), qo = T(!1), Yr = async () => {
|
|
2637
2637
|
qo.value = !0;
|
|
2638
2638
|
const [t, e] = await Rd().run({ userType: 1 });
|
|
2639
2639
|
return qo.value = !1, t ? (zo.value = [], { navConfig: [] }) : (zo.value = e, ke([{ key: "appcategorys", value: e }]), { navConfig: e });
|
|
@@ -2664,16 +2664,16 @@ const Kt = (t, e = "") => {
|
|
|
2664
2664
|
}, Kd = async () => {
|
|
2665
2665
|
const [t, e] = await Vd().run();
|
|
2666
2666
|
return t ? { platformConfig: null } : { platformConfig: e };
|
|
2667
|
-
}, es =
|
|
2667
|
+
}, es = T(null), Gd = async () => {
|
|
2668
2668
|
const [t, e] = await zd().run();
|
|
2669
2669
|
return t ? { homeConfig: null } : (e && (Bi(e), es.value = e), { homeConfig: e });
|
|
2670
|
-
}, Gt =
|
|
2670
|
+
}, Gt = T(1), ts = async () => {
|
|
2671
2671
|
const [t, e] = await qd().run();
|
|
2672
2672
|
return t ? { personalMenuConfig: null } : (Gt.value = (e == null ? void 0 : e.style) ?? 1, { personalMenuConfig: e });
|
|
2673
2673
|
}, Xd = We.post("/menu/personal-setting"), Zd = { class: "preson-style-drawer" }, Yd = { class: "preson-style-container" }, ep = { class: "title" }, tp = { class: "content" }, np = { class: "item-content" }, op = ["src"], rp = { class: "item-content" }, sp = ["src"], ap = { class: "preson-style-footer" }, ip = /* @__PURE__ */ ne({
|
|
2674
2674
|
__name: "index",
|
|
2675
2675
|
setup(t, { expose: e }) {
|
|
2676
|
-
const n =
|
|
2676
|
+
const n = T(!1), o = T(!1), r = T(!1), s = T(!1), a = () => {
|
|
2677
2677
|
o.value = Gt.value === 1, r.value = Gt.value === 2, n.value = !0;
|
|
2678
2678
|
}, l = (i) => {
|
|
2679
2679
|
i === 1 ? r.value = !1 : o.value = !1;
|
|
@@ -2684,19 +2684,19 @@ const Kt = (t, e = "") => {
|
|
|
2684
2684
|
return e({
|
|
2685
2685
|
/** 打开弹窗 */
|
|
2686
2686
|
openDialog: a
|
|
2687
|
-
}), (i, u) => ($(),
|
|
2687
|
+
}), (i, u) => ($(), V("div", Zd, [
|
|
2688
2688
|
R(v(sa), {
|
|
2689
2689
|
title: v(N)("主题设置").value,
|
|
2690
2690
|
modelValue: n.value,
|
|
2691
|
-
"onUpdate:modelValue": u[5] || (u[5] = (
|
|
2691
|
+
"onUpdate:modelValue": u[5] || (u[5] = (f) => n.value = f),
|
|
2692
2692
|
"body-style": { padding: 0 },
|
|
2693
2693
|
direction: "rtl"
|
|
2694
2694
|
}, {
|
|
2695
2695
|
footer: B(() => [
|
|
2696
2696
|
O("div", ap, [
|
|
2697
|
-
R(v(
|
|
2697
|
+
R(v(Ue), {
|
|
2698
2698
|
size: "middle",
|
|
2699
|
-
onClick: u[4] || (u[4] = (
|
|
2699
|
+
onClick: u[4] || (u[4] = (f) => n.value = !1),
|
|
2700
2700
|
style: { "margin-right": "12px" }
|
|
2701
2701
|
}, {
|
|
2702
2702
|
default: B(() => [
|
|
@@ -2705,7 +2705,7 @@ const Kt = (t, e = "") => {
|
|
|
2705
2705
|
_: 1
|
|
2706
2706
|
/* STABLE */
|
|
2707
2707
|
}),
|
|
2708
|
-
R(v(
|
|
2708
|
+
R(v(Ue), {
|
|
2709
2709
|
btnType: "primary",
|
|
2710
2710
|
size: "middle",
|
|
2711
2711
|
loading: s.value,
|
|
@@ -2724,7 +2724,7 @@ const Kt = (t, e = "") => {
|
|
|
2724
2724
|
O(
|
|
2725
2725
|
"p",
|
|
2726
2726
|
ep,
|
|
2727
|
-
|
|
2727
|
+
se(v(N)("侧边菜单栏").value),
|
|
2728
2728
|
1
|
|
2729
2729
|
/* TEXT */
|
|
2730
2730
|
),
|
|
@@ -2738,12 +2738,12 @@ const Kt = (t, e = "") => {
|
|
|
2738
2738
|
}, null, 8, op),
|
|
2739
2739
|
R(v(uo), {
|
|
2740
2740
|
modelValue: o.value,
|
|
2741
|
-
"onUpdate:modelValue": u[0] || (u[0] = (
|
|
2742
|
-
onChange: u[1] || (u[1] = (
|
|
2741
|
+
"onUpdate:modelValue": u[0] || (u[0] = (f) => o.value = f),
|
|
2742
|
+
onChange: u[1] || (u[1] = (f) => l(1))
|
|
2743
2743
|
}, {
|
|
2744
2744
|
default: B(() => [
|
|
2745
2745
|
ye(
|
|
2746
|
-
|
|
2746
|
+
se(v(N)("弹出式菜单栏").value),
|
|
2747
2747
|
1
|
|
2748
2748
|
/* TEXT */
|
|
2749
2749
|
)
|
|
@@ -2761,12 +2761,12 @@ const Kt = (t, e = "") => {
|
|
|
2761
2761
|
}, null, 8, sp),
|
|
2762
2762
|
R(v(uo), {
|
|
2763
2763
|
modelValue: r.value,
|
|
2764
|
-
"onUpdate:modelValue": u[2] || (u[2] = (
|
|
2765
|
-
onChange: u[3] || (u[3] = (
|
|
2764
|
+
"onUpdate:modelValue": u[2] || (u[2] = (f) => r.value = f),
|
|
2765
|
+
onChange: u[3] || (u[3] = (f) => l(2))
|
|
2766
2766
|
}, {
|
|
2767
2767
|
default: B(() => [
|
|
2768
2768
|
ye(
|
|
2769
|
-
|
|
2769
|
+
se(v(N)("内嵌式菜单栏").value),
|
|
2770
2770
|
1
|
|
2771
2771
|
/* TEXT */
|
|
2772
2772
|
)
|
|
@@ -2783,7 +2783,7 @@ const Kt = (t, e = "") => {
|
|
|
2783
2783
|
}, 8, ["title", "modelValue"])
|
|
2784
2784
|
]));
|
|
2785
2785
|
}
|
|
2786
|
-
}), cp = /* @__PURE__ */ Ce(ip, [["__scopeId", "data-v-d271fb9a"]]), lp = () =>
|
|
2786
|
+
}), cp = /* @__PURE__ */ Ce(ip, [["__scopeId", "data-v-d271fb9a"]]), lp = () => T(null), up = Rn.get("/login/history"), dp = () => {
|
|
2787
2787
|
const t = () => ["/licenseActivate", "/licenseDataManage", "/sso-logout"].some((c) => new RegExp(`^${c}$`, "i").test(location.pathname)), e = (a) => {
|
|
2788
2788
|
const { browserLogoImgHost: l = "", browserLogoImg: c = "" } = a || {}, i = c ? l + Mn(c) : "";
|
|
2789
2789
|
Ri(i), Ns(i);
|
|
@@ -2805,7 +2805,7 @@ const Kt = (t, e = "") => {
|
|
|
2805
2805
|
}, o = async () => {
|
|
2806
2806
|
const [{ loginConfig: a }, { platformConfig: l }] = await Promise.all([Jd(), Kd()]);
|
|
2807
2807
|
e(l), M.nav.setLogo((l == null ? void 0 : l.platformLogoImg) ?? ""), !t() && a != null && a.loginInfoTip && !sessionStorage.getItem("loginInfoTip") && n();
|
|
2808
|
-
}, r =
|
|
2808
|
+
}, r = T(!1), s = () => new Promise((a) => {
|
|
2809
2809
|
const l = () => {
|
|
2810
2810
|
if (r.value) return a();
|
|
2811
2811
|
setTimeout(() => l(), 50);
|
|
@@ -2822,11 +2822,11 @@ const Kt = (t, e = "") => {
|
|
|
2822
2822
|
initNextTick: s
|
|
2823
2823
|
};
|
|
2824
2824
|
}, pp = (t) => {
|
|
2825
|
-
const e = Ye(), n = Dt(), { getMenu: o } = zs(), { getHistoryList: r, getSearchList: s } = kp(), a =
|
|
2825
|
+
const e = Ye(), n = Dt(), { getMenu: o } = zs(), { getHistoryList: r, getSearchList: s } = kp(), a = T(!0), l = T([]), c = T([]), i = T(!1), u = T(!1);
|
|
2826
2826
|
G(
|
|
2827
2827
|
() => n.path,
|
|
2828
|
-
(
|
|
2829
|
-
i.value =
|
|
2828
|
+
(m) => {
|
|
2829
|
+
i.value = m === Ct;
|
|
2830
2830
|
},
|
|
2831
2831
|
{
|
|
2832
2832
|
immediate: !0
|
|
@@ -2845,44 +2845,44 @@ const Kt = (t, e = "") => {
|
|
|
2845
2845
|
immediate: !0
|
|
2846
2846
|
}
|
|
2847
2847
|
);
|
|
2848
|
-
const
|
|
2849
|
-
let
|
|
2850
|
-
return await Us([Yi, Hd, Gd, Yr, ts]).then((
|
|
2851
|
-
},
|
|
2848
|
+
const f = async () => {
|
|
2849
|
+
let m = {};
|
|
2850
|
+
return await Us([Yi, Hd, Gd, Yr, ts]).then((g) => Object.assign(m, ...g)), a.value = !1, m;
|
|
2851
|
+
}, p = T(!1);
|
|
2852
2852
|
return M.nav.addEventListener("onBeforeMount", async () => {
|
|
2853
|
-
var
|
|
2853
|
+
var E;
|
|
2854
2854
|
await t();
|
|
2855
|
-
const
|
|
2856
|
-
if (!
|
|
2857
|
-
const { homeConfig: A, projectConfig:
|
|
2858
|
-
u.value = ((
|
|
2859
|
-
const
|
|
2860
|
-
|
|
2861
|
-
A != null && A.appAlias &&
|
|
2862
|
-
}), l.value =
|
|
2855
|
+
const m = await f();
|
|
2856
|
+
if (!m) return;
|
|
2857
|
+
const { homeConfig: A, projectConfig: g, currentProject: h, tenantList: b, personalMenuConfig: y } = m;
|
|
2858
|
+
u.value = ((E = On()) == null ? void 0 : E.flag) !== 4 && b && b.length > 1;
|
|
2859
|
+
const C = [...Ir];
|
|
2860
|
+
C.forEach((k) => {
|
|
2861
|
+
A != null && A.appAlias && k.value === je && (k.label = A.appAlias), A != null && A.homeAlias && k.value === Ct && (k.label = A.homeAlias);
|
|
2862
|
+
}), l.value = C, A != null && A.enable || (l.value = l.value.filter((k) => k.path === je), n.path === Ct && await e.replace(je)), M.nav.setItems(l.value), g && g.length && (M.nav.setProjectConfig({
|
|
2863
2863
|
treeProps: {
|
|
2864
|
-
disabled: (
|
|
2864
|
+
disabled: (k) => k.type !== 7
|
|
2865
2865
|
},
|
|
2866
2866
|
// 过滤的节点
|
|
2867
|
-
filterNodeMethod: (
|
|
2867
|
+
filterNodeMethod: (k) => k.type === 7,
|
|
2868
2868
|
// 树打平之后保留的数据
|
|
2869
|
-
filterFlatCondition: (
|
|
2870
|
-
}), M.nav.setProjects(
|
|
2871
|
-
const
|
|
2872
|
-
c.value = [...yi],
|
|
2869
|
+
filterFlatCondition: (k) => k.type === 7
|
|
2870
|
+
}), M.nav.setProjects(g || []), h && M.nav.setActiveProject(h));
|
|
2871
|
+
const I = Yt() ?? {}, _ = I != null && I.headPicture ? Mn(I.headPicture) : void 0;
|
|
2872
|
+
c.value = [...yi], h && h.id !== 0 ? await o("personCenter", "", "/userInfo") || (c.value = c.value.filter((x) => x.value !== "1")) : c.value = c.value.filter((k) => k.value !== "1"), M.nav.setUserInfo({ headPicture: _, commandList: c.value }), M.nav.setSearchConfig({
|
|
2873
2873
|
getHistoryList: r,
|
|
2874
2874
|
getSearchList: s
|
|
2875
2875
|
});
|
|
2876
|
-
const
|
|
2877
|
-
|
|
2878
|
-
|
|
2879
|
-
}), ke([{ key: "subAppList", value:
|
|
2880
|
-
}), { loading: a, innerPage: l, commandList: c, layoutInited:
|
|
2876
|
+
const S = J().subAppList ?? [];
|
|
2877
|
+
S.length && (S.forEach((k) => {
|
|
2878
|
+
k.menus = [], k.originalMenus = [];
|
|
2879
|
+
}), ke([{ key: "subAppList", value: S }])), p.value = !0;
|
|
2880
|
+
}), { loading: a, innerPage: l, commandList: c, layoutInited: p, initNextTick: () => new Promise((m) => {
|
|
2881
2881
|
const A = async () => {
|
|
2882
|
-
var
|
|
2883
|
-
let
|
|
2884
|
-
if (
|
|
2885
|
-
|
|
2882
|
+
var b;
|
|
2883
|
+
let g = ((b = n.meta) == null ? void 0 : b.showLayout) ?? !0, { showLayout: h = !0 } = n.query;
|
|
2884
|
+
if (h === "false" && (h = !1), !g || !h || p.value) {
|
|
2885
|
+
m();
|
|
2886
2886
|
return;
|
|
2887
2887
|
}
|
|
2888
2888
|
setTimeout(() => A(), 50);
|
|
@@ -2901,7 +2901,7 @@ const Kt = (t, e = "") => {
|
|
|
2901
2901
|
}, hp = () => {
|
|
2902
2902
|
const { entryMenu: t } = rn();
|
|
2903
2903
|
M.menu.addEventListener("onItemClick", async (e) => {
|
|
2904
|
-
|
|
2904
|
+
ce.innerSet = !0;
|
|
2905
2905
|
const n = Me(zt(e.applicationCode)).filter((o) => !o.disable && !o.expired).find((o) => o.code === e.code);
|
|
2906
2906
|
if (!(n && !n.routeUrl)) {
|
|
2907
2907
|
if (!n) {
|
|
@@ -2931,106 +2931,106 @@ const Kt = (t, e = "") => {
|
|
|
2931
2931
|
const { enter: o } = ht();
|
|
2932
2932
|
return M.nav.addEventListener("fullScreenHandle", o), {};
|
|
2933
2933
|
}, mp = () => {
|
|
2934
|
-
const t = Ye(), e = "#666666", n = "#FAFAFA", o = "#D9D9D9", r =
|
|
2934
|
+
const t = Ye(), e = "#666666", n = "#FAFAFA", o = "#D9D9D9", r = T(e), s = T(n), a = T(o);
|
|
2935
2935
|
let l = "", c = {};
|
|
2936
2936
|
G(
|
|
2937
2937
|
() => t.currentRoute.value,
|
|
2938
|
-
async (
|
|
2939
|
-
var
|
|
2940
|
-
const
|
|
2941
|
-
let y = ((
|
|
2942
|
-
if (y === "false" && (y = !1), !
|
|
2943
|
-
l = dt(
|
|
2944
|
-
const
|
|
2945
|
-
if (!w) return;
|
|
2946
|
-
const C = ((T = f.query) == null ? void 0 : T.menu) ?? ((x = ve()) == null ? void 0 : x.currentCode) ?? "";
|
|
2938
|
+
async (h) => {
|
|
2939
|
+
var S, E, k, x, Q, W, q;
|
|
2940
|
+
const b = ((S = h.meta) == null ? void 0 : S.showLayout) ?? !0;
|
|
2941
|
+
let y = ((E = h.query) == null ? void 0 : E.showLayout) ?? !0;
|
|
2942
|
+
if (y === "false" && (y = !1), !b || !y || h.path === l && _n(h.query, c)) return;
|
|
2943
|
+
l = dt(h.path), c = dt(h.query);
|
|
2944
|
+
const C = J().currentSubAppCode ?? "";
|
|
2947
2945
|
if (!C) return;
|
|
2948
|
-
const k =
|
|
2949
|
-
|
|
2946
|
+
const I = ((k = h.query) == null ? void 0 : k.menu) ?? ((x = ve()) == null ? void 0 : x.currentCode) ?? "";
|
|
2947
|
+
if (!I) return;
|
|
2948
|
+
const _ = JSON.parse(sessionStorage.getItem("tabStyle") || "{}") || {};
|
|
2949
|
+
_ && JSON.stringify(_) !== "{}" && (r.value = (Q = _[C][I]) != null && Q.fontColor ? _[C][I].fontColor : e, s.value = (W = _[C][I]) != null && W.backgroundColor ? _[C][I].backgroundColor : n, a.value = (q = _[C][I]) != null && q.backgroundColor ? _[C][I].backgroundColor : o);
|
|
2950
2950
|
}
|
|
2951
2951
|
);
|
|
2952
|
-
const { deleteApp: i } = vt(), { entryMenu: u } = rn(), { reloadRoute:
|
|
2953
|
-
var
|
|
2954
|
-
const
|
|
2955
|
-
u({ currentMenu:
|
|
2956
|
-
},
|
|
2957
|
-
if (!
|
|
2958
|
-
const
|
|
2959
|
-
|
|
2960
|
-
}, A = (
|
|
2961
|
-
const
|
|
2962
|
-
|
|
2963
|
-
const y = ve(),
|
|
2964
|
-
if (
|
|
2965
|
-
const
|
|
2952
|
+
const { deleteApp: i } = vt(), { entryMenu: u } = rn(), { reloadRoute: f, unloadRoute: p } = ns(), d = (h) => {
|
|
2953
|
+
var I;
|
|
2954
|
+
const b = Me(zt(h.applicationCode)).find((_) => _.code === h.code), C = (((I = ve().tabMap) == null ? void 0 : I[h.applicationCode]) ?? []).find((_) => _.code === h.code);
|
|
2955
|
+
u({ currentMenu: b, route: { path: C.path, query: C.query ?? {} } });
|
|
2956
|
+
}, m = (h) => {
|
|
2957
|
+
if (!h || !h.length) return;
|
|
2958
|
+
const b = h.map((y) => y.path);
|
|
2959
|
+
p(b);
|
|
2960
|
+
}, A = (h) => {
|
|
2961
|
+
const b = J().currentSubAppCode ?? "";
|
|
2962
|
+
ce.innerSet = !0;
|
|
2963
|
+
const y = ve(), C = y.tabMap[b], I = C.findIndex((Q) => Q.code === h.data.code);
|
|
2964
|
+
if (I === -1) return;
|
|
2965
|
+
const _ = () => {
|
|
2966
2966
|
var q;
|
|
2967
|
-
let
|
|
2968
|
-
|
|
2967
|
+
let W = (((q = J().appcategorys) == null ? void 0 : q.map((ie) => ie.apps).flat()) ?? []).find((ie) => ie.code === b);
|
|
2968
|
+
W = { ...W, value: W.code, label: W.name }, i(W), M.nav.removeItem(b);
|
|
2969
2969
|
};
|
|
2970
2970
|
({
|
|
2971
2971
|
me: async (Q) => {
|
|
2972
|
-
if (
|
|
2973
|
-
|
|
2972
|
+
if (C.length === 1) {
|
|
2973
|
+
_();
|
|
2974
2974
|
return;
|
|
2975
2975
|
}
|
|
2976
|
-
const
|
|
2976
|
+
const W = y.currentCode;
|
|
2977
2977
|
let q = null;
|
|
2978
|
-
|
|
2978
|
+
W === Q.value && (I + 1 === C.length ? C[I - 1] && (q = C[I - 1]) : C[I + 1] && (q = C[I + 1])), C.splice(I, 1), m([Q]), Ae([{ key: `tabMap:${b}`, value: C }]), q ? d(q) : Ae([{ key: `preTab:${b}`, value: {} }]);
|
|
2979
2979
|
},
|
|
2980
|
-
all:
|
|
2980
|
+
all: _,
|
|
2981
2981
|
other: async (Q) => {
|
|
2982
|
-
const
|
|
2982
|
+
const W = C[I];
|
|
2983
2983
|
t.push({
|
|
2984
|
-
path: `/${
|
|
2985
|
-
query:
|
|
2986
|
-
}), M.menu.setActiveItem(
|
|
2987
|
-
const q =
|
|
2988
|
-
q.forEach((
|
|
2984
|
+
path: `/${W.applicationPath}${W.path}`.replace(/\/\//g, "/"),
|
|
2985
|
+
query: W.query
|
|
2986
|
+
}), M.menu.setActiveItem(W.menuId), M.tab.setActiveItem(W.code);
|
|
2987
|
+
const q = C.filter((ie) => ie.code !== Q.value);
|
|
2988
|
+
q.forEach((ie) => M.tab.removeItem(ie.code)), m(q), Ae([{ key: `tabMap:${b}`, value: [W] }]), d(W);
|
|
2989
2989
|
},
|
|
2990
2990
|
right: async (Q) => {
|
|
2991
|
-
const
|
|
2992
|
-
if (
|
|
2993
|
-
const Ie =
|
|
2994
|
-
|
|
2991
|
+
const W = y.currentCode;
|
|
2992
|
+
if (W !== Q.value && C.findIndex((Ie) => Ie.code === W) > I) {
|
|
2993
|
+
const Ie = C[I];
|
|
2994
|
+
d(Ie);
|
|
2995
2995
|
}
|
|
2996
|
-
const q =
|
|
2997
|
-
q.forEach((
|
|
2996
|
+
const q = C.slice(I + 1);
|
|
2997
|
+
q.forEach((ie) => M.tab.removeItem(ie.code)), m(q), C.splice(I + 1), Ae([{ key: `tabMap:${b}`, value: C }]);
|
|
2998
2998
|
}
|
|
2999
|
-
})[
|
|
2999
|
+
})[h.type](h.data);
|
|
3000
3000
|
};
|
|
3001
|
-
M.tab.addEventListener("onItemClick", async (
|
|
3002
|
-
ve().currentCode !==
|
|
3003
|
-
}), M.tab.addEventListener("onItemRemove", (
|
|
3004
|
-
const
|
|
3005
|
-
|
|
3006
|
-
}), M.tab.addEventListener("onMenuClick", (
|
|
3007
|
-
let
|
|
3008
|
-
const y = ve().tabMap[
|
|
3009
|
-
if (
|
|
3010
|
-
const
|
|
3011
|
-
|
|
3001
|
+
M.tab.addEventListener("onItemClick", async (h) => {
|
|
3002
|
+
ve().currentCode !== h.currentCode && (ce.innerSet = !0, d(h));
|
|
3003
|
+
}), M.tab.addEventListener("onItemRemove", (h) => {
|
|
3004
|
+
const b = ve(), y = J().currentSubAppCode ?? "";
|
|
3005
|
+
b.tabMap[y].findIndex((_) => _.code === h.code) !== -1 && (Ut(h.applicationCode, [h.code]), A({ type: "me", data: h }));
|
|
3006
|
+
}), M.tab.addEventListener("onMenuClick", (h) => {
|
|
3007
|
+
let b = [];
|
|
3008
|
+
const y = ve().tabMap[h.applicationCode] ?? [];
|
|
3009
|
+
if (h.type.key === "right") {
|
|
3010
|
+
const C = y.findIndex((I) => I.code === h.data.value);
|
|
3011
|
+
b = y.slice(C + 1);
|
|
3012
3012
|
}
|
|
3013
|
-
|
|
3014
|
-
|
|
3015
|
-
|
|
3016
|
-
), A({ type:
|
|
3017
|
-
}), M.tab.addEventListener("onPageRefresh", async (
|
|
3018
|
-
if (!
|
|
3019
|
-
Ut(
|
|
3020
|
-
const
|
|
3021
|
-
if (!
|
|
3022
|
-
if (
|
|
3023
|
-
|
|
3013
|
+
h.type.key === "other" && (b = y.filter((C) => C.code !== h.data.value)), h.type.key === "all" && (b = [...y]), Ut(
|
|
3014
|
+
h.applicationCode,
|
|
3015
|
+
b.map((C) => C.code)
|
|
3016
|
+
), A({ type: h.type.key, data: h.data });
|
|
3017
|
+
}), M.tab.addEventListener("onPageRefresh", async (h) => {
|
|
3018
|
+
if (!h || h.path === ct) return;
|
|
3019
|
+
Ut(h.applicationCode, [h.code]);
|
|
3020
|
+
const b = Me(zt(h.applicationCode)).find((I) => I.code === h.code);
|
|
3021
|
+
if (!b) return;
|
|
3022
|
+
if (b.routeUrl !== h.path) {
|
|
3023
|
+
f([h.path]), p([`/${h.applicationPath}${b.routeUrl}`]), await u({ currentMenu: b });
|
|
3024
3024
|
return;
|
|
3025
3025
|
}
|
|
3026
|
-
const y = { app:
|
|
3027
|
-
_n(y,
|
|
3026
|
+
const y = { app: b.applicationCode, menu: b.code }, C = { ...h.query };
|
|
3027
|
+
_n(y, C) || await u({ currentMenu: b }), f([h.path]);
|
|
3028
3028
|
});
|
|
3029
|
-
const { enter:
|
|
3030
|
-
return M.tab.addEventListener("onToggleFullScreen",
|
|
3029
|
+
const { enter: g } = ht();
|
|
3030
|
+
return M.tab.addEventListener("onToggleFullScreen", g), { fontColor: r, backgroudColor: s, borderColor: a };
|
|
3031
3031
|
}, gn = tt(), Jo = (gn == null ? void 0 : gn.isAutoCloseApp) ?? !0, Ko = location.href.includes("showLayout=false"), Go = window.self !== window.top, vp = () => {
|
|
3032
3032
|
const t = () => {
|
|
3033
|
-
|
|
3033
|
+
M.nav.setItems([]), M.menu.setItems([]), M.tab.setItems([]), Pr();
|
|
3034
3034
|
};
|
|
3035
3035
|
window.addEventListener("beforeunload", function(e) {
|
|
3036
3036
|
if (!(Ko || !Jo || Go) && window.__isAutoCloseApp) {
|
|
@@ -3046,60 +3046,60 @@ const Kt = (t, e = "") => {
|
|
|
3046
3046
|
}
|
|
3047
3047
|
const n = J();
|
|
3048
3048
|
n.subAppList && n.subAppList.length && sessionStorage.setItem("has-subapp", "true"), t();
|
|
3049
|
-
}), window.__isAutoCloseApp = !0, sessionStorage.getItem("has-subapp") && (window.__isAutoCloseApp = !1, window.location.replace(`${location.origin}/`), sessionStorage.removeItem("has-subapp")),
|
|
3049
|
+
}), window.__isAutoCloseApp = !0, sessionStorage.getItem("has-subapp") && (window.__isAutoCloseApp = !1, window.location.replace(`${location.origin}/`), sessionStorage.removeItem("has-subapp")), le.addEventListenerFromMicroApp("system-reload", () => {
|
|
3050
3050
|
t(), window.__isAutoCloseApp = !1, window.location.replace(`${location.origin}/`);
|
|
3051
3051
|
});
|
|
3052
3052
|
}, vt = () => {
|
|
3053
3053
|
const t = Ye(), { entryMenu: e } = rn(), { unloadRoute: n } = ns();
|
|
3054
3054
|
let { mainAppName: o = "", microAppName: r = "", microApps: s = [] } = tt();
|
|
3055
3055
|
!o && r && (s = [{ name: r }]);
|
|
3056
|
-
const a = s.map((
|
|
3056
|
+
const a = s.map((p) => p.name), l = () => {
|
|
3057
3057
|
M.menu.setItems([]), M.menu.setActiveItem(""), M.tab.setItems([]), M.tab.setActiveItem("");
|
|
3058
|
-
}, c = async (
|
|
3059
|
-
if (
|
|
3060
|
-
const
|
|
3061
|
-
let
|
|
3062
|
-
if (A && (
|
|
3063
|
-
const { menus:
|
|
3064
|
-
if (
|
|
3065
|
-
|
|
3058
|
+
}, c = async (p) => {
|
|
3059
|
+
if (p.routeUrl && !a.includes(p.routeUrl)) return !0;
|
|
3060
|
+
const d = p.code ?? "", A = (J().subAppList ?? []).find((C) => C.code === d);
|
|
3061
|
+
let g = [], h = [], b = !1;
|
|
3062
|
+
if (A && (g = A.menus ?? []), !g.length) {
|
|
3063
|
+
const { menus: C, originalMenus: I, err: _ } = await Xn(d);
|
|
3064
|
+
if (_) return !1;
|
|
3065
|
+
g = C ?? [], h = I ?? [];
|
|
3066
3066
|
}
|
|
3067
|
-
if (
|
|
3068
|
-
const y = { ...
|
|
3067
|
+
if (g.length ? Kt(g) || (await Et({ title: "提示", content: "此应用菜单已过期/已收回/配置有误<br/>无法使用" }), b = !0) : (await Et({ title: "提示", content: "此应用未配置菜单/无菜单权限<br/>无法使用" }), b = !0), b) return !1;
|
|
3068
|
+
const y = { ...p, menus: g, originalMenus: h };
|
|
3069
3069
|
return ke([{ key: "subAppList", value: y }]), !0;
|
|
3070
|
-
}, i = async (
|
|
3071
|
-
var
|
|
3072
|
-
const { microApp:
|
|
3073
|
-
let
|
|
3074
|
-
if (l(), !
|
|
3070
|
+
}, i = async (p) => {
|
|
3071
|
+
var W, q, ie, Ie, Rt;
|
|
3072
|
+
const { microApp: d = null, menuCode: m = "", menuPath: A = "", route: g = {} } = p;
|
|
3073
|
+
let h = g;
|
|
3074
|
+
if (l(), !d && A) {
|
|
3075
3075
|
if (!(a && a.find((oe) => A.startsWith("/" + oe) || A.startsWith(oe)))) return;
|
|
3076
|
-
t.push({ path: A, query:
|
|
3076
|
+
t.push({ path: A, query: h.query });
|
|
3077
3077
|
return;
|
|
3078
3078
|
}
|
|
3079
|
-
const
|
|
3080
|
-
let y = ((q =
|
|
3079
|
+
const b = ((W = h.meta) == null ? void 0 : W.showLayout) ?? !0;
|
|
3080
|
+
let y = ((q = h.query) == null ? void 0 : q.showLayout) ?? !0;
|
|
3081
3081
|
y === "false" && (y = !1);
|
|
3082
|
-
const
|
|
3083
|
-
if (
|
|
3084
|
-
const pe = ((
|
|
3085
|
-
if ((pe == null ? void 0 : pe.find((_e) => _e.code ===
|
|
3086
|
-
{ key: "currentSubApp", value:
|
|
3087
|
-
{ key: "currentSubAppCode", value:
|
|
3082
|
+
const C = (d == null ? void 0 : d.openType) ?? 1, I = (d == null ? void 0 : d.type) ?? 1;
|
|
3083
|
+
if (d.routeUrl && !a.includes(d.routeUrl)) {
|
|
3084
|
+
const pe = ((ie = J()) == null ? void 0 : ie.subAppList) ?? [];
|
|
3085
|
+
if ((pe == null ? void 0 : pe.find((_e) => _e.code === d.code)) || pe == null || pe.push(d), ke([
|
|
3086
|
+
{ key: "currentSubApp", value: d },
|
|
3087
|
+
{ key: "currentSubAppCode", value: d.code },
|
|
3088
3088
|
{ key: "subAppList", value: pe }
|
|
3089
3089
|
]), pe.forEach((_e) => {
|
|
3090
3090
|
const ze = { ..._e, value: _e.code, label: _e.name };
|
|
3091
3091
|
M.nav.appendItem(ze);
|
|
3092
|
-
}), M.nav.setActiveItem(
|
|
3093
|
-
t.push({ path:
|
|
3092
|
+
}), M.nav.setActiveItem(d.code), le.hideAllMicroApp(), d.routeUrl.includes("entrance=main")) {
|
|
3093
|
+
t.push({ path: d.routeUrl, query: { ...h.query, app: d.code } });
|
|
3094
3094
|
return;
|
|
3095
3095
|
}
|
|
3096
|
-
if (
|
|
3097
|
-
const _e = En(bn(wn(
|
|
3096
|
+
if (C === 1 && I === 2) {
|
|
3097
|
+
const _e = En(bn(wn(d.routeUrl)));
|
|
3098
3098
|
t.push({
|
|
3099
3099
|
path: ct,
|
|
3100
3100
|
query: {
|
|
3101
|
-
...
|
|
3102
|
-
app:
|
|
3101
|
+
...h.query,
|
|
3102
|
+
app: d.code,
|
|
3103
3103
|
iframeSrc: _e
|
|
3104
3104
|
}
|
|
3105
3105
|
});
|
|
@@ -3107,39 +3107,39 @@ const Kt = (t, e = "") => {
|
|
|
3107
3107
|
}
|
|
3108
3108
|
}
|
|
3109
3109
|
const {
|
|
3110
|
-
menuConfig:
|
|
3111
|
-
currentApp:
|
|
3112
|
-
currentMenu:
|
|
3113
|
-
microPath:
|
|
3110
|
+
menuConfig: _ = [],
|
|
3111
|
+
currentApp: S = null,
|
|
3112
|
+
currentMenu: E = null,
|
|
3113
|
+
microPath: k = "",
|
|
3114
3114
|
query: x = {}
|
|
3115
|
-
} = await Bd({ microApp:
|
|
3116
|
-
if (
|
|
3117
|
-
path:
|
|
3118
|
-
query: { ...x, app:
|
|
3119
|
-
meta: { ...(
|
|
3120
|
-
}),
|
|
3121
|
-
if (
|
|
3122
|
-
const pe = (Ie = J().subAppList) == null ? void 0 : Ie.find((ze) => ze.code ===
|
|
3115
|
+
} = await Bd({ microApp: d, menuCode: m, menuPath: A, route: h });
|
|
3116
|
+
if (E && (h = {
|
|
3117
|
+
path: k || `/${E.applicationPath}${E.routeUrl}`.replace(/\/\//g, "/"),
|
|
3118
|
+
query: { ...x, app: E.applicationCode, menu: E.code },
|
|
3119
|
+
meta: { ...(h == null ? void 0 : h.meta) ?? {} }
|
|
3120
|
+
}), S && (S == null ? void 0 : S.code) !== (d == null ? void 0 : d.code)) {
|
|
3121
|
+
if (S.fixed && (M.menu.setItems([]), M.tab.setItems([]), t.push(S.path), M.nav.setActiveItem(S.path), le.hideAllMicroApp()), !S.fixed) {
|
|
3122
|
+
const pe = (Ie = J().subAppList) == null ? void 0 : Ie.find((ze) => ze.code === S.code), oe = ve().preTab[S.code], _e = { ...(oe == null ? void 0 : oe.query) ?? {} };
|
|
3123
3123
|
await i({ microApp: pe, menuCode: (oe == null ? void 0 : oe.code) ?? "", route: { query: _e } });
|
|
3124
3124
|
}
|
|
3125
3125
|
return;
|
|
3126
3126
|
}
|
|
3127
|
-
const Q =
|
|
3128
|
-
if (!
|
|
3127
|
+
const Q = S || d;
|
|
3128
|
+
if (!E && A) {
|
|
3129
3129
|
t.push({
|
|
3130
3130
|
path: A,
|
|
3131
3131
|
query: {
|
|
3132
|
-
...
|
|
3132
|
+
...h.query,
|
|
3133
3133
|
app: Q.code
|
|
3134
3134
|
}
|
|
3135
3135
|
});
|
|
3136
3136
|
return;
|
|
3137
3137
|
}
|
|
3138
|
-
if (
|
|
3138
|
+
if (b && y) {
|
|
3139
3139
|
(Rt = J().subAppList) == null || Rt.forEach((oe) => {
|
|
3140
3140
|
const _e = { ...oe, value: oe.code, label: oe.name };
|
|
3141
3141
|
M.nav.appendItem(_e);
|
|
3142
|
-
}), M.nav.setActiveItem(Q.code), M.menu.setItems(
|
|
3142
|
+
}), M.nav.setActiveItem(Q.code), M.menu.setItems(_);
|
|
3143
3143
|
const pe = ve().tabMap[Q.code] ?? [];
|
|
3144
3144
|
pe.length && pe.forEach((oe) => {
|
|
3145
3145
|
M.tab.appendItem({
|
|
@@ -3149,50 +3149,51 @@ const Kt = (t, e = "") => {
|
|
|
3149
3149
|
});
|
|
3150
3150
|
});
|
|
3151
3151
|
}
|
|
3152
|
-
e({ currentMenu:
|
|
3153
|
-
}, u = async (
|
|
3154
|
-
var
|
|
3155
|
-
if (
|
|
3156
|
-
M.menu.setItems([]), M.tab.setItems([]), t.push(
|
|
3152
|
+
e({ currentMenu: E, microPath: k, route: h });
|
|
3153
|
+
}, u = async (p) => {
|
|
3154
|
+
var d;
|
|
3155
|
+
if (ce.innerSet = !0, p.fixed) {
|
|
3156
|
+
M.menu.setItems([]), M.tab.setItems([]), t.push(p.path), M.nav.setActiveItem(p.path), ke([
|
|
3157
3157
|
{ key: "currentSubAppCode", value: "" },
|
|
3158
3158
|
{ key: "currentSubApp", value: {} }
|
|
3159
3159
|
]), Ae([
|
|
3160
3160
|
{ key: "currentCode", value: "" },
|
|
3161
3161
|
{ key: "currentTab", value: {} }
|
|
3162
|
-
]),
|
|
3162
|
+
]), le.hideAllMicroApp();
|
|
3163
3163
|
return;
|
|
3164
3164
|
}
|
|
3165
|
-
if (!
|
|
3166
|
-
const
|
|
3167
|
-
await i({ microApp:
|
|
3165
|
+
if (!p.fixed) {
|
|
3166
|
+
const m = (d = J().subAppList) == null ? void 0 : d.find((b) => b.code === p.code), A = ve().preTab[p.code], g = (A == null ? void 0 : A.code) ?? "", h = { ...(A == null ? void 0 : A.query) ?? {} };
|
|
3167
|
+
await i({ microApp: m, menuCode: g, route: { query: h } });
|
|
3168
3168
|
}
|
|
3169
3169
|
};
|
|
3170
3170
|
return {
|
|
3171
3171
|
beforeEntryApp: c,
|
|
3172
3172
|
entryApp: i,
|
|
3173
3173
|
changeApp: u,
|
|
3174
|
-
deleteApp: async (
|
|
3175
|
-
var
|
|
3176
|
-
const
|
|
3177
|
-
if (!((
|
|
3178
|
-
const
|
|
3179
|
-
if (
|
|
3180
|
-
const A = ve().tabMap[
|
|
3174
|
+
deleteApp: async (p) => {
|
|
3175
|
+
var h;
|
|
3176
|
+
const d = J();
|
|
3177
|
+
if (!((h = d.subAppList) != null && h.length)) return;
|
|
3178
|
+
const m = d.subAppList.findIndex((b) => b.code === p.code);
|
|
3179
|
+
if (m === -1) return;
|
|
3180
|
+
const A = ve().tabMap[p.code] ?? [];
|
|
3181
3181
|
if (A.length) {
|
|
3182
|
-
const
|
|
3183
|
-
n(
|
|
3182
|
+
const b = A.map((y) => y.path);
|
|
3183
|
+
n(b);
|
|
3184
3184
|
}
|
|
3185
|
-
let
|
|
3186
|
-
if (
|
|
3187
|
-
{ key: `preTab:${
|
|
3188
|
-
{ key: `tabMap:${
|
|
3189
|
-
]),
|
|
3190
|
-
const
|
|
3191
|
-
await u(
|
|
3185
|
+
let g = null;
|
|
3186
|
+
if (d.currentSubAppCode === p.code && (m + 1 !== d.subAppList.length ? d.subAppList[m + 1] && (g = d.subAppList[m + 1]) : d.subAppList[m - 1] && (g = d.subAppList[m - 1])), d.subAppList.splice(m, 1), ke([{ key: "subAppList", value: d.subAppList }]), Ae([
|
|
3187
|
+
{ key: `preTab:${p.code}`, value: {} },
|
|
3188
|
+
{ key: `tabMap:${p.code}`, value: [] }
|
|
3189
|
+
]), g) {
|
|
3190
|
+
const b = { ...g, value: g.code, label: g.name };
|
|
3191
|
+
await u(b), M.nav.setActiveItem(g.code);
|
|
3192
3192
|
}
|
|
3193
|
-
if (!
|
|
3194
|
-
|
|
3195
|
-
|
|
3193
|
+
if (!d.subAppList.length) {
|
|
3194
|
+
M.menu.setItems([]), M.tab.setItems([]);
|
|
3195
|
+
const b = Ir.find((y) => y.value === je);
|
|
3196
|
+
b && u(b), Fn(), Sr();
|
|
3196
3197
|
}
|
|
3197
3198
|
}
|
|
3198
3199
|
};
|
|
@@ -3204,44 +3205,44 @@ const Kt = (t, e = "") => {
|
|
|
3204
3205
|
const { currentMenu: a, route: l = {}, microPath: c = "" } = s;
|
|
3205
3206
|
if (!a) return;
|
|
3206
3207
|
let i = { ...l.query, app: a.applicationCode, menu: a.code };
|
|
3207
|
-
const u = (a == null ? void 0 : a.openType) ?? 1,
|
|
3208
|
-
let
|
|
3208
|
+
const u = (a == null ? void 0 : a.openType) ?? 1, f = (a == null ? void 0 : a.type) ?? 1;
|
|
3209
|
+
let p = "";
|
|
3209
3210
|
if (u === 1)
|
|
3210
|
-
if (
|
|
3211
|
+
if (f === 1)
|
|
3211
3212
|
if (a.routeUrl.startsWith(ct)) {
|
|
3212
|
-
|
|
3213
|
-
const
|
|
3214
|
-
i = { ...i, iframeSrc:
|
|
3215
|
-
} else a.applicationPath && (
|
|
3213
|
+
le.hideAllMicroApp(), p = ct;
|
|
3214
|
+
const g = Fs(a.routeUrl, "iframeSrc");
|
|
3215
|
+
i = { ...i, iframeSrc: g }, t.push({ path: p, query: i });
|
|
3216
|
+
} else a.applicationPath && (p = c || a.routeUrl, p = `/${a.applicationPath}${p}`.replace(/\/\//g, "/"), t.push({ path: p, query: i }));
|
|
3216
3217
|
else {
|
|
3217
|
-
|
|
3218
|
-
const
|
|
3219
|
-
i = { ...i, iframeSrc:
|
|
3218
|
+
le.hideAllMicroApp(), p = ct;
|
|
3219
|
+
const g = En(bn(wn(a.routeUrl)));
|
|
3220
|
+
i = { ...i, iframeSrc: g }, t.push({ path: p, query: i });
|
|
3220
3221
|
}
|
|
3221
3222
|
if (u === 2) {
|
|
3222
|
-
let
|
|
3223
|
-
|
|
3224
|
-
path:
|
|
3223
|
+
let g = f === 1 ? `/${a.applicationPath}${a.routeUrl}`.replace(/\/\//g, "/") : a.routeUrl;
|
|
3224
|
+
g = En(bn(wn(g))), ce.innerSet ? (le.hideAllMicroApp(), p = Tr, t.push({ path: p, query: i }), g && window.open(g, "_blank")) : f === 1 && (p = g, i = { ...i, showLayout: !1 }, t.push({
|
|
3225
|
+
path: p,
|
|
3225
3226
|
query: i
|
|
3226
3227
|
}));
|
|
3227
3228
|
}
|
|
3228
|
-
const
|
|
3229
|
-
let
|
|
3230
|
-
if (
|
|
3231
|
-
const
|
|
3229
|
+
const d = ((A = l.meta) == null ? void 0 : A.showLayout) ?? !0;
|
|
3230
|
+
let m = (i == null ? void 0 : i.showLayout) ?? !0;
|
|
3231
|
+
if (m === "false" && (m = !1), d && m) {
|
|
3232
|
+
const g = {
|
|
3232
3233
|
currentApplication: J().currentSubApp.routeUrl,
|
|
3233
3234
|
applicationPath: a.applicationPath,
|
|
3234
3235
|
applicationCode: a.applicationCode,
|
|
3235
3236
|
menuId: a.id,
|
|
3236
3237
|
code: a.code,
|
|
3237
3238
|
name: (a == null ? void 0 : a.tabName) ?? a.name,
|
|
3238
|
-
path:
|
|
3239
|
+
path: p,
|
|
3239
3240
|
query: i
|
|
3240
3241
|
};
|
|
3241
3242
|
M.tab.appendItem({
|
|
3242
|
-
...
|
|
3243
|
-
value:
|
|
3244
|
-
label:
|
|
3243
|
+
...g,
|
|
3244
|
+
value: g.code,
|
|
3245
|
+
label: g.name
|
|
3245
3246
|
}), M.tab.setActiveItem(a.code), M.menu.setActiveItem(a.id), kr(a.code), Ae([
|
|
3246
3247
|
{
|
|
3247
3248
|
key: "currentCode",
|
|
@@ -3249,45 +3250,45 @@ const Kt = (t, e = "") => {
|
|
|
3249
3250
|
},
|
|
3250
3251
|
{
|
|
3251
3252
|
key: "currentTab",
|
|
3252
|
-
value:
|
|
3253
|
+
value: g
|
|
3253
3254
|
},
|
|
3254
3255
|
{
|
|
3255
3256
|
key: `preTab:${a.applicationCode}`,
|
|
3256
|
-
value:
|
|
3257
|
+
value: g
|
|
3257
3258
|
},
|
|
3258
3259
|
{
|
|
3259
3260
|
key: `tabMap:${a.applicationCode}`,
|
|
3260
|
-
value:
|
|
3261
|
+
value: g
|
|
3261
3262
|
}
|
|
3262
3263
|
]);
|
|
3263
3264
|
}
|
|
3264
3265
|
} };
|
|
3265
3266
|
}, Ap = (t, e, n) => {
|
|
3266
3267
|
const { entryApp: o } = vt(), r = Ye(), s = async (c) => {
|
|
3267
|
-
var
|
|
3268
|
+
var b, y, C, I;
|
|
3268
3269
|
let i = { ...c }, { showLayout: u = !0 } = i.query;
|
|
3269
3270
|
u === "false" && (u = !1);
|
|
3270
|
-
const
|
|
3271
|
-
var
|
|
3272
|
-
let
|
|
3273
|
-
if (!Array.isArray(
|
|
3271
|
+
const f = async () => {
|
|
3272
|
+
var E, k;
|
|
3273
|
+
let _ = J().appcategorys ?? [];
|
|
3274
|
+
if (!Array.isArray(_)) return [];
|
|
3274
3275
|
if (i.query) {
|
|
3275
|
-
const
|
|
3276
|
-
if (!
|
|
3276
|
+
const x = ((E = i.query) == null ? void 0 : E.project) ?? ((k = i.query) == null ? void 0 : k.projectId) ?? "";
|
|
3277
|
+
if (!_.length || x && x !== Fe().id) {
|
|
3277
3278
|
await e();
|
|
3278
|
-
const { navConfig:
|
|
3279
|
-
|
|
3279
|
+
const { navConfig: Q } = await Yr();
|
|
3280
|
+
Q && (_ = Q);
|
|
3280
3281
|
}
|
|
3281
3282
|
}
|
|
3282
|
-
return
|
|
3283
|
-
},
|
|
3284
|
-
if (
|
|
3285
|
-
const
|
|
3283
|
+
return _.map((x) => x.apps).flat() ?? [];
|
|
3284
|
+
}, p = tt().microApps ?? [], d = p.filter((_) => _.public);
|
|
3285
|
+
if (d.length) {
|
|
3286
|
+
const _ = d.find(
|
|
3286
3287
|
(S) => i.path.startsWith("/" + S.name) || i.path.startsWith(S.name)
|
|
3287
3288
|
);
|
|
3288
|
-
if (
|
|
3289
|
+
if (_) {
|
|
3289
3290
|
o({
|
|
3290
|
-
microApp: { routeUrl:
|
|
3291
|
+
microApp: { routeUrl: _.name, code: "" },
|
|
3291
3292
|
menuCode: i.query.menu,
|
|
3292
3293
|
menuPath: i.path,
|
|
3293
3294
|
route: i
|
|
@@ -3295,38 +3296,38 @@ const Kt = (t, e = "") => {
|
|
|
3295
3296
|
return;
|
|
3296
3297
|
}
|
|
3297
3298
|
}
|
|
3298
|
-
const
|
|
3299
|
-
if (
|
|
3300
|
-
const
|
|
3301
|
-
(
|
|
3299
|
+
const m = await f(), A = m.map((_) => _.code), g = ((b = i.query) == null ? void 0 : b.app) ?? "", h = ((y = J()) == null ? void 0 : y.subAppList) ?? [];
|
|
3300
|
+
if (h.length) {
|
|
3301
|
+
const _ = h.filter((E) => E.code !== g && !A.includes(E.code)), S = h.filter(
|
|
3302
|
+
(E) => g === E.code || A.includes(E.code)
|
|
3302
3303
|
);
|
|
3303
|
-
ke([{ key: "subAppList", value: S }]),
|
|
3304
|
+
ke([{ key: "subAppList", value: S }]), _ && _.length && _.forEach((E) => {
|
|
3304
3305
|
Ae([
|
|
3305
|
-
{ key: `preTab:${
|
|
3306
|
-
{ key: `tabMap:${
|
|
3306
|
+
{ key: `preTab:${E.code}`, value: {} },
|
|
3307
|
+
{ key: `tabMap:${E.code}`, value: [] }
|
|
3307
3308
|
]);
|
|
3308
3309
|
});
|
|
3309
3310
|
}
|
|
3310
3311
|
if (i.query.app) {
|
|
3311
|
-
let
|
|
3312
|
-
if (!
|
|
3312
|
+
let _ = m.find((S) => S.code === i.query.app);
|
|
3313
|
+
if (!_ && u) {
|
|
3313
3314
|
const { currentApp: S } = $n(i.query.app);
|
|
3314
3315
|
if (S) {
|
|
3315
|
-
|
|
3316
|
-
const
|
|
3317
|
-
i = {},
|
|
3316
|
+
_ = S;
|
|
3317
|
+
const k = (ve().preTab ?? {})[_.code];
|
|
3318
|
+
i = {}, k && (i.path = `/${k.applicationPath}${k.path}`.replace(/\/\//g, "/"), i.query = k.query);
|
|
3318
3319
|
}
|
|
3319
3320
|
}
|
|
3320
|
-
|
|
3321
|
+
_ != null && _.fixed ? (M.menu.setItems([]), M.tab.setItems([]), r.push(_.path), M.nav.setActiveItem(_.path), le.hideAllMicroApp()) : o({ microApp: _, menuCode: i.query.menu, menuPath: i.path, route: i });
|
|
3321
3322
|
return;
|
|
3322
3323
|
} else {
|
|
3323
|
-
const
|
|
3324
|
+
const _ = p && p.find(
|
|
3324
3325
|
(S) => i.path.startsWith("/" + S.name) || i.path.startsWith(S.name)
|
|
3325
3326
|
);
|
|
3326
|
-
if (
|
|
3327
|
-
let S =
|
|
3328
|
-
S || (S =
|
|
3329
|
-
(
|
|
3327
|
+
if (_) {
|
|
3328
|
+
let S = m.find((E) => E.routeUrl === _.name);
|
|
3329
|
+
S || (S = m.find(
|
|
3330
|
+
(E) => (E == null ? void 0 : E.routePath) && E.routePath.length && E.routePath.includes(_.name)
|
|
3330
3331
|
)), o({
|
|
3331
3332
|
microApp: S,
|
|
3332
3333
|
menuCode: i.query.menu,
|
|
@@ -3336,25 +3337,28 @@ const Kt = (t, e = "") => {
|
|
|
3336
3337
|
return;
|
|
3337
3338
|
}
|
|
3338
3339
|
}
|
|
3339
|
-
|
|
3340
|
-
|
|
3341
|
-
|
|
3342
|
-
|
|
3343
|
-
|
|
3344
|
-
|
|
3345
|
-
|
|
3346
|
-
|
|
3347
|
-
|
|
3348
|
-
|
|
3349
|
-
|
|
3340
|
+
if (u) {
|
|
3341
|
+
le.hideAllMicroApp(), (I = (C = J()) == null ? void 0 : C.subAppList) == null || I.forEach((S) => {
|
|
3342
|
+
const E = { ...S, value: S.code, label: S.name };
|
|
3343
|
+
M.nav.appendItem(E);
|
|
3344
|
+
});
|
|
3345
|
+
const _ = t.value.find((S) => S.path === location.pathname);
|
|
3346
|
+
_ && (M.nav.setActiveItem(_.path), M.menu.setItems([]), M.tab.setItems([]), ke([
|
|
3347
|
+
{ key: "currentSubAppCode", value: "" },
|
|
3348
|
+
{ key: "currentSubApp", value: {} }
|
|
3349
|
+
]), Ae([
|
|
3350
|
+
{ key: "currentCode", value: "" },
|
|
3351
|
+
{ key: "currentTab", value: {} }
|
|
3352
|
+
]));
|
|
3353
|
+
}
|
|
3350
3354
|
};
|
|
3351
3355
|
let a = "", l = {};
|
|
3352
3356
|
G(
|
|
3353
3357
|
() => r.currentRoute.value,
|
|
3354
3358
|
async (c) => {
|
|
3355
3359
|
if (!(c.path === a && _n(c.query, l))) {
|
|
3356
|
-
if (a = dt(c.path), l = dt(c.query), await n(),
|
|
3357
|
-
|
|
3360
|
+
if (a = dt(c.path), l = dt(c.query), await n(), ce.innerSet) {
|
|
3361
|
+
ce.innerSet = !1;
|
|
3358
3362
|
return;
|
|
3359
3363
|
}
|
|
3360
3364
|
s(c);
|
|
@@ -3362,18 +3366,18 @@ const Kt = (t, e = "") => {
|
|
|
3362
3366
|
}
|
|
3363
3367
|
);
|
|
3364
3368
|
}, ns = () => ({ reloadRoute: (n) => {
|
|
3365
|
-
|
|
3366
|
-
|
|
3369
|
+
ce.excludeRoutes = Array.from(/* @__PURE__ */ new Set([...ce.excludeRoutes, ...n])), ce.routeKeepAliveVisible = !1, setTimeout(() => {
|
|
3370
|
+
ce.routeKeepAliveVisible = !0, ce.excludeRoutes = [];
|
|
3367
3371
|
}, 300);
|
|
3368
3372
|
}, unloadRoute: (n) => {
|
|
3369
|
-
|
|
3370
|
-
|
|
3373
|
+
ce.excludeRoutes = Array.from(/* @__PURE__ */ new Set([...ce.excludeRoutes, ...n])), ce.routeKeepAliveVisible = !1, setTimeout(() => {
|
|
3374
|
+
ce.routeKeepAliveVisible = !0, ce.excludeRoutes = [];
|
|
3371
3375
|
}, 100);
|
|
3372
3376
|
} }), yp = () => {
|
|
3373
|
-
const t = Bs(), e = lp(), n = tt(), o = {
|
|
3374
|
-
|
|
3375
|
-
|
|
3376
|
-
|
|
3377
|
+
const t = Bs(), e = lp(), n = tt(), o = async () => {
|
|
3378
|
+
const a = {
|
|
3379
|
+
logout: "/api/justauth/oauth-server/v1/visitor/logout"
|
|
3380
|
+
}, l = `${location.origin}/`, c = {
|
|
3377
3381
|
response_type: "code",
|
|
3378
3382
|
scope: "sever",
|
|
3379
3383
|
client_id: "sys",
|
|
@@ -3384,32 +3388,32 @@ const Kt = (t, e = "") => {
|
|
|
3384
3388
|
logout: "true"
|
|
3385
3389
|
};
|
|
3386
3390
|
n.ssoLocale && (c.locale = "locale");
|
|
3387
|
-
const i = Object.keys(c).map((
|
|
3391
|
+
const i = Object.keys(c).map((f) => `${f}=${c[f]}`).join("&"), u = `${n.baseURL}${a.logout}?${i}`;
|
|
3388
3392
|
window.__isAutoCloseApp = !1, location.replace(u), sessionStorage.clear(), Ks(), localStorage.removeItem("idelTime");
|
|
3389
|
-
}, { entryApp:
|
|
3390
|
-
const
|
|
3391
|
-
if (
|
|
3392
|
-
const { title:
|
|
3393
|
-
await Et({ title:
|
|
3393
|
+
}, { entryApp: r } = vt(), s = async () => {
|
|
3394
|
+
const a = "personCenter", c = (J().appcategorys || []).map((d) => d.apps).flat(), { originalMenus: i = [] } = await Xn(a), f = Me(i).filter((d) => d.isMenu && d.routeUrl).find((d) => d.routeUrl === "/userInfo");
|
|
3395
|
+
if (f != null && f.disable || f != null && f.expired) {
|
|
3396
|
+
const { title: d, content: m, desc: A } = await Zn(f);
|
|
3397
|
+
await Et({ title: d, content: m, desc: A });
|
|
3394
3398
|
return;
|
|
3395
3399
|
}
|
|
3396
|
-
const p =
|
|
3397
|
-
p &&
|
|
3400
|
+
const p = c.find((d) => d.code === a);
|
|
3401
|
+
p && r({ microApp: p, menuPath: `/${p.routeUrl}/userInfo` });
|
|
3398
3402
|
};
|
|
3399
|
-
return M.nav.addEventListener("onUserCommandChange", (
|
|
3400
|
-
var
|
|
3403
|
+
return M.nav.addEventListener("onUserCommandChange", (a) => {
|
|
3404
|
+
var c, i;
|
|
3401
3405
|
({
|
|
3402
|
-
0: (
|
|
3403
|
-
1:
|
|
3404
|
-
2: (
|
|
3405
|
-
3:
|
|
3406
|
-
})[
|
|
3406
|
+
0: (c = e.value) == null ? void 0 : c.openDialog,
|
|
3407
|
+
1: s,
|
|
3408
|
+
2: (i = t.value) == null ? void 0 : i.openDialog,
|
|
3409
|
+
3: o
|
|
3410
|
+
})[a]();
|
|
3407
3411
|
}), {
|
|
3408
3412
|
$changePwd: t,
|
|
3409
3413
|
$personSetDialog: e
|
|
3410
3414
|
};
|
|
3411
3415
|
}, _p = fr.get("/convert/tenant"), bp = Rn.get("/platform/withdefault"), os = () => {
|
|
3412
|
-
const t = tt(), e =
|
|
3416
|
+
const t = tt(), e = T(!1), n = T(""), o = T(""), r = () => {
|
|
3413
3417
|
n.value = Yt().id, o.value = ur().tenantId, e.value = !0;
|
|
3414
3418
|
};
|
|
3415
3419
|
M.nav.addEventListener("changeEnterpriseHandle", () => {
|
|
@@ -3426,30 +3430,30 @@ const Kt = (t, e = "") => {
|
|
|
3426
3430
|
const [c, i] = await _p().run({ tenant: l });
|
|
3427
3431
|
if (c) return;
|
|
3428
3432
|
e.value = !1;
|
|
3429
|
-
const { access_token: u = "", refresh_token:
|
|
3433
|
+
const { access_token: u = "", refresh_token: f = "", expires_in: p = 0, sub: d = "", name: m = "", flag: A = "", tenant: g = "" } = i, h = {
|
|
3430
3434
|
accessToken: u,
|
|
3431
|
-
accessTokenExpiredAt: +/* @__PURE__ */ new Date() + Number(
|
|
3432
|
-
refreshToken:
|
|
3435
|
+
accessTokenExpiredAt: +/* @__PURE__ */ new Date() + Number(p) * 1e3,
|
|
3436
|
+
refreshToken: f,
|
|
3433
3437
|
info: i
|
|
3434
3438
|
};
|
|
3435
|
-
Xs().save(
|
|
3436
|
-
const
|
|
3437
|
-
id:
|
|
3438
|
-
name:
|
|
3439
|
+
Xs().save(h), pr(h);
|
|
3440
|
+
const b = {
|
|
3441
|
+
id: d,
|
|
3442
|
+
name: m,
|
|
3439
3443
|
flag: A,
|
|
3440
|
-
tenantId:
|
|
3444
|
+
tenantId: g
|
|
3441
3445
|
};
|
|
3442
|
-
sessionStorage.setItem("hotentUserInfo", JSON.stringify(
|
|
3446
|
+
sessionStorage.setItem("hotentUserInfo", JSON.stringify(b)), Zs(u);
|
|
3443
3447
|
let y = "";
|
|
3444
3448
|
if (t != null && t.ssoLocale)
|
|
3445
3449
|
y = `http://127.0.0.1:5000/oauth/refreshOauthToken?tenantId=${l}`;
|
|
3446
3450
|
else {
|
|
3447
|
-
const [
|
|
3448
|
-
|
|
3451
|
+
const [C, I] = await bp().run();
|
|
3452
|
+
I != null && I.loginHost && (y = `${I.loginHost}/oauth/refreshOauthToken?tenantId=${l}`);
|
|
3449
3453
|
}
|
|
3450
3454
|
if (y) {
|
|
3451
|
-
const
|
|
3452
|
-
|
|
3455
|
+
const C = document.createElement("iframe");
|
|
3456
|
+
C.src = y, C.style.display = "none", document.body.appendChild(C), setTimeout(() => s(), 300);
|
|
3453
3457
|
} else
|
|
3454
3458
|
s();
|
|
3455
3459
|
}
|
|
@@ -3475,8 +3479,8 @@ const Kt = (t, e = "") => {
|
|
|
3475
3479
|
return M.nav.addEventListener("searchToPage", async (o) => {
|
|
3476
3480
|
const { item: r, keyword: s, cb: a } = o;
|
|
3477
3481
|
if (r != null && r.disable || r != null && r.expired) {
|
|
3478
|
-
const { title: u, content:
|
|
3479
|
-
await Et({ title: u, content:
|
|
3482
|
+
const { title: u, content: f, desc: p } = await Zn(r);
|
|
3483
|
+
await Et({ title: u, content: f, desc: p });
|
|
3480
3484
|
return;
|
|
3481
3485
|
}
|
|
3482
3486
|
await Tp().run({ searchVal: s, clickData: r });
|
|
@@ -3492,13 +3496,13 @@ const Kt = (t, e = "") => {
|
|
|
3492
3496
|
getHistoryList: t,
|
|
3493
3497
|
getSearchList: e
|
|
3494
3498
|
};
|
|
3495
|
-
},
|
|
3499
|
+
}, ce = Ne({
|
|
3496
3500
|
/** 菜单或者应用跳转是否通过触发界面调用的 */
|
|
3497
3501
|
innerSet: !1,
|
|
3498
3502
|
excludeRoutes: [],
|
|
3499
3503
|
routeKeepAliveVisible: !0
|
|
3500
3504
|
}), Pp = () => {
|
|
3501
|
-
|
|
3505
|
+
le.addEventListenerFromMicroApp("iot:change-instance", (t) => {
|
|
3502
3506
|
const e = J(), n = e.currentSubAppCode;
|
|
3503
3507
|
let o = zt(n);
|
|
3504
3508
|
o.forEach((s) => {
|
|
@@ -3520,25 +3524,25 @@ const Kt = (t, e = "") => {
|
|
|
3520
3524
|
});
|
|
3521
3525
|
}, Lp = (t) => {
|
|
3522
3526
|
["personcenter", "rightmanage"].forEach((n) => {
|
|
3523
|
-
|
|
3527
|
+
le.addEventListenerFromMicroApp(`${n}:change-userinfo`, (o) => {
|
|
3524
3528
|
const { userInfo: r } = o.data, s = r != null && r.headPicture ? Mn(r.headPicture) : void 0;
|
|
3525
3529
|
M.nav.setUserInfo({ headPicture: s, commandList: t.value }), sessionStorage.setItem("userInfo", JSON.stringify(r));
|
|
3526
3530
|
});
|
|
3527
3531
|
});
|
|
3528
3532
|
}, $p = () => {
|
|
3529
|
-
|
|
3533
|
+
le.addEventListenerFromMicroApp("devicePanelShow", (t) => {
|
|
3530
3534
|
const { deviceId: e = "", panelCode: n = "", deviceName: o = "", x: r = 0, y: s = 0, isCenter: a = !1 } = t.data;
|
|
3531
3535
|
gr(e, n, o, r, s, a);
|
|
3532
|
-
}),
|
|
3536
|
+
}), le.addEventListenerFromMicroApp("closeDevicePanel", (t) => {
|
|
3533
3537
|
Ys();
|
|
3534
|
-
}),
|
|
3538
|
+
}), le.addEventListenerFromMicroApp("alarmDevicePanelShow", (t) => {
|
|
3535
3539
|
const { deviceId: e = "", panelCode: n = "", alarmTime: o = "" } = t.data;
|
|
3536
3540
|
ea(e, n, o);
|
|
3537
|
-
}),
|
|
3541
|
+
}), le.addEventListenerFromMicroApp("closeAlarmPanel", (t) => {
|
|
3538
3542
|
ta();
|
|
3539
3543
|
});
|
|
3540
3544
|
}, Dp = Qn.get("/platform/login/pwd-advance-notify-check"), Mp = () => {
|
|
3541
|
-
const t =
|
|
3545
|
+
const t = T([]), e = T(null), n = T([]), { entryApp: o } = qt.hooks.useEntryApp(), r = () => {
|
|
3542
3546
|
var c;
|
|
3543
3547
|
const l = (((c = J().appcategorys) == null ? void 0 : c.map((i) => i.apps).flat()) ?? []).find((i) => i.code === "messagecenter");
|
|
3544
3548
|
l && o({ microApp: l });
|
|
@@ -3550,7 +3554,7 @@ const Kt = (t, e = "") => {
|
|
|
3550
3554
|
await Dp().run();
|
|
3551
3555
|
},
|
|
3552
3556
|
message: async (a) => {
|
|
3553
|
-
if (
|
|
3557
|
+
if (le.sendMessageToMicroApp("enterpriseadmin/messagecenter", "message", { msgList: a }), window.self !== window.top) return;
|
|
3554
3558
|
const c = Fe().id;
|
|
3555
3559
|
t.value = a.filter(
|
|
3556
3560
|
(i) => i.projectId === c || i.projectId === 0 || i.projectId === "0"
|
|
@@ -3590,7 +3594,7 @@ const Kt = (t, e = "") => {
|
|
|
3590
3594
|
}), Zt(() => {
|
|
3591
3595
|
e.value && e.value.disconnect(), e.value = null;
|
|
3592
3596
|
});
|
|
3593
|
-
}, Op = "v1", Bp = ft(`/api/enterpriseright/permission/${Op}`), rs = ft("/api/
|
|
3597
|
+
}, Op = "v1", Bp = ft(`/api/enterpriseright/permission/${Op}`), rs = ft("/api/device-relation/deviceproject/v1/project/device/video", xp), Rp = jn.get("/permissionset/user-portal-menu");
|
|
3594
3598
|
function xp(t) {
|
|
3595
3599
|
const e = Fe() ? Fe().id : 1;
|
|
3596
3600
|
return t.params || (t.params = {}), t.params.project = e, t.params.projectId = e, t;
|
|
@@ -3602,10 +3606,10 @@ function ss(t) {
|
|
|
3602
3606
|
return e.toString();
|
|
3603
3607
|
}
|
|
3604
3608
|
function Xo(t) {
|
|
3605
|
-
return rs.post(`/
|
|
3609
|
+
return rs.post(`/ptz?${ss(t)}`)().run();
|
|
3606
3610
|
}
|
|
3607
3611
|
function Qp(t) {
|
|
3608
|
-
return rs.post(`/
|
|
3612
|
+
return rs.post(`/url/preview?${ss(t)}`)().run();
|
|
3609
3613
|
}
|
|
3610
3614
|
const jp = Bp.post("data/device-auth"), Np = /* @__PURE__ */ ne({
|
|
3611
3615
|
__name: "GridItem",
|
|
@@ -3618,21 +3622,21 @@ const jp = Bp.post("data/device-auth"), Np = /* @__PURE__ */ ne({
|
|
|
3618
3622
|
Ts((u) => ({
|
|
3619
3623
|
"6cb537a6": i.value
|
|
3620
3624
|
}));
|
|
3621
|
-
const n = t, o = e, r =
|
|
3625
|
+
const n = t, o = e, r = T(), { toggle: s, isFullscreen: a } = ht(r), l = () => {
|
|
3622
3626
|
r.value != document.fullscreenElement && (a.value ? (a.value = !1, Qe(() => {
|
|
3623
3627
|
s();
|
|
3624
3628
|
})) : s());
|
|
3625
3629
|
}, c = () => {
|
|
3626
3630
|
o("itemClick");
|
|
3627
3631
|
}, i = H(() => `calc(100% / ${Math.sqrt(n.gridNum)})`);
|
|
3628
|
-
return (u,
|
|
3632
|
+
return (u, f) => ($(), V(
|
|
3629
3633
|
"div",
|
|
3630
3634
|
{
|
|
3631
3635
|
ref_key: "containerRef",
|
|
3632
3636
|
ref: r,
|
|
3633
3637
|
class: rr(["wrapper", { "is-active": n.active }]),
|
|
3634
|
-
onDblclick:
|
|
3635
|
-
onClick:
|
|
3638
|
+
onDblclick: f[0] || (f[0] = (p) => l()),
|
|
3639
|
+
onClick: f[1] || (f[1] = (p) => c())
|
|
3636
3640
|
},
|
|
3637
3641
|
[
|
|
3638
3642
|
fe(u.$slots, "default", {}, void 0, !0)
|
|
@@ -3653,9 +3657,9 @@ const jp = Bp.post("data/device-auth"), Np = /* @__PURE__ */ ne({
|
|
|
3653
3657
|
const n = t, o = e, r = (s) => {
|
|
3654
3658
|
o("update:activeIndex", s);
|
|
3655
3659
|
};
|
|
3656
|
-
return (s, a) => ($(),
|
|
3660
|
+
return (s, a) => ($(), V("div", Up, [
|
|
3657
3661
|
j(' :active="index === activeIndex" '),
|
|
3658
|
-
($(!0),
|
|
3662
|
+
($(!0), V(
|
|
3659
3663
|
De,
|
|
3660
3664
|
null,
|
|
3661
3665
|
Tt(n.gridNum, (l, c) => ($(), F(Hp, {
|
|
@@ -3684,7 +3688,7 @@ const jp = Bp.post("data/device-auth"), Np = /* @__PURE__ */ ne({
|
|
|
3684
3688
|
const n = e, o = (r) => {
|
|
3685
3689
|
n("change", r);
|
|
3686
3690
|
};
|
|
3687
|
-
return (r, s) => ($(),
|
|
3691
|
+
return (r, s) => ($(), V(
|
|
3688
3692
|
"div",
|
|
3689
3693
|
{
|
|
3690
3694
|
class: "direction-control",
|
|
@@ -3817,33 +3821,33 @@ const jp = Bp.post("data/device-auth"), Np = /* @__PURE__ */ ne({
|
|
|
3817
3821
|
enlarge: import("@das-fed/ui/packages/icons/enlarge"),
|
|
3818
3822
|
"direction-control": import("@das-fed/ui/packages/icons/direction-control")
|
|
3819
3823
|
});
|
|
3820
|
-
const n = t, o = e, r =
|
|
3824
|
+
const n = t, o = e, r = T(!0), s = T(), a = T(!1), l = T(), c = H(() => {
|
|
3821
3825
|
var y;
|
|
3822
3826
|
return (y = l.value) == null ? void 0 : y.video;
|
|
3823
|
-
}), i =
|
|
3824
|
-
s.value = y, s.value.on(window.mpegts.Events.ERROR, (
|
|
3827
|
+
}), i = T(!1), u = T(!0), f = (y) => {
|
|
3828
|
+
s.value = y, s.value.on(window.mpegts.Events.ERROR, (C) => {
|
|
3825
3829
|
});
|
|
3826
|
-
}, d = () => {
|
|
3827
|
-
r.value = !r.value, s.value && (s.value.muted = r.value);
|
|
3828
3830
|
}, p = () => {
|
|
3831
|
+
r.value = !r.value, s.value && (s.value.muted = r.value);
|
|
3832
|
+
}, d = () => {
|
|
3829
3833
|
a.value = !a.value;
|
|
3830
|
-
},
|
|
3834
|
+
}, m = T(""), A = () => {
|
|
3831
3835
|
const y = document.createElement("canvas");
|
|
3832
3836
|
if (c.value) {
|
|
3833
3837
|
y.width = c.value.clientWidth, y.height = c.value.clientHeight;
|
|
3834
|
-
const
|
|
3835
|
-
|
|
3836
|
-
const
|
|
3837
|
-
if (
|
|
3838
|
-
const
|
|
3839
|
-
|
|
3838
|
+
const C = y.getContext("2d");
|
|
3839
|
+
C == null || C.drawImage(c.value, 0, 0, y.width, y.height);
|
|
3840
|
+
const I = y.toDataURL("image/jpg"), _ = `【${n.title}】${Cn().format("YYYYMMDDHHmmss").toString()}.jpg`;
|
|
3841
|
+
if (m.value = I, "download" in document.createElement("a")) {
|
|
3842
|
+
const S = document.createElement("a");
|
|
3843
|
+
S.download = _, S.style.display = "none", S.href = I, document.body.appendChild(S), document.body.appendChild(y), S.click(), URL.revokeObjectURL(S.href), document.body.removeChild(S), document.body.removeChild(y);
|
|
3840
3844
|
}
|
|
3841
3845
|
}
|
|
3842
|
-
},
|
|
3846
|
+
}, g = (y) => {
|
|
3843
3847
|
o("directionControl", y);
|
|
3844
|
-
},
|
|
3848
|
+
}, h = (y) => {
|
|
3845
3849
|
o("zoomControl", y);
|
|
3846
|
-
},
|
|
3850
|
+
}, b = (y) => n.authType.includes(y);
|
|
3847
3851
|
return G(
|
|
3848
3852
|
() => c.value,
|
|
3849
3853
|
() => {
|
|
@@ -3885,7 +3889,7 @@ const jp = Bp.post("data/device-auth"), Np = /* @__PURE__ */ ne({
|
|
|
3885
3889
|
u.value = !0;
|
|
3886
3890
|
});
|
|
3887
3891
|
}
|
|
3888
|
-
), (y,
|
|
3892
|
+
), (y, C) => ($(), V("div", Jp, [
|
|
3889
3893
|
R(v(vr), {
|
|
3890
3894
|
spinning: n.loading,
|
|
3891
3895
|
type: "component",
|
|
@@ -3898,14 +3902,14 @@ const jp = Bp.post("data/device-auth"), Np = /* @__PURE__ */ ne({
|
|
|
3898
3902
|
O(
|
|
3899
3903
|
"div",
|
|
3900
3904
|
Zp,
|
|
3901
|
-
|
|
3905
|
+
se(n.title.length > 20 ? n.title.slice(0, 19) + "..." : n.title),
|
|
3902
3906
|
1
|
|
3903
3907
|
/* TEXT */
|
|
3904
3908
|
)
|
|
3905
3909
|
])
|
|
3906
3910
|
]),
|
|
3907
3911
|
O("div", Yp, [
|
|
3908
|
-
["live"].includes(y.type) ? ($(),
|
|
3912
|
+
["live"].includes(y.type) ? ($(), V("span", ef, "正在实时预览")) : j("v-if", !0),
|
|
3909
3913
|
j(' <das-icon class="icon close-icon" icon="close" @click.stop="handleClose"></das-icon> ')
|
|
3910
3914
|
])
|
|
3911
3915
|
]),
|
|
@@ -3915,7 +3919,7 @@ const jp = Bp.post("data/device-auth"), Np = /* @__PURE__ */ ne({
|
|
|
3915
3919
|
ref_key: "dasLivePlayerRef",
|
|
3916
3920
|
ref: l,
|
|
3917
3921
|
muted: r.value,
|
|
3918
|
-
onLoaded:
|
|
3922
|
+
onLoaded: f,
|
|
3919
3923
|
src: n.videoUrl
|
|
3920
3924
|
}, null, 8, ["muted", "src"])) : j("v-if", !0),
|
|
3921
3925
|
O("div", tf, [
|
|
@@ -3925,7 +3929,7 @@ const jp = Bp.post("data/device-auth"), Np = /* @__PURE__ */ ne({
|
|
|
3925
3929
|
"div",
|
|
3926
3930
|
{
|
|
3927
3931
|
class: "controls",
|
|
3928
|
-
onDblclick:
|
|
3932
|
+
onDblclick: C[2] || (C[2] = ue((I) => I.stopPropagation(), ["stop"]))
|
|
3929
3933
|
},
|
|
3930
3934
|
[
|
|
3931
3935
|
R(v(me), { content: "声音" }, {
|
|
@@ -3933,7 +3937,7 @@ const jp = Bp.post("data/device-auth"), Np = /* @__PURE__ */ ne({
|
|
|
3933
3937
|
R(v(qe), {
|
|
3934
3938
|
class: "icon icon-volume",
|
|
3935
3939
|
icon: r.value ? "muted" : "volume",
|
|
3936
|
-
onClick: ue(
|
|
3940
|
+
onClick: ue(p, ["stop"])
|
|
3937
3941
|
}, null, 8, ["icon"])
|
|
3938
3942
|
]),
|
|
3939
3943
|
_: 1
|
|
@@ -3950,7 +3954,7 @@ const jp = Bp.post("data/device-auth"), Np = /* @__PURE__ */ ne({
|
|
|
3950
3954
|
_: 1
|
|
3951
3955
|
/* STABLE */
|
|
3952
3956
|
}),
|
|
3953
|
-
|
|
3957
|
+
b("control") ? ($(), F(v(me), {
|
|
3954
3958
|
key: 0,
|
|
3955
3959
|
content: "聚焦-"
|
|
3956
3960
|
}, {
|
|
@@ -3959,13 +3963,13 @@ const jp = Bp.post("data/device-auth"), Np = /* @__PURE__ */ ne({
|
|
|
3959
3963
|
key: 0,
|
|
3960
3964
|
class: "icon icon-shrink",
|
|
3961
3965
|
icon: "shrink",
|
|
3962
|
-
onClick:
|
|
3966
|
+
onClick: C[0] || (C[0] = ue((I) => h("zoomOut"), ["stop"]))
|
|
3963
3967
|
})) : j("v-if", !0)
|
|
3964
3968
|
]),
|
|
3965
3969
|
_: 1
|
|
3966
3970
|
/* STABLE */
|
|
3967
3971
|
})) : j("v-if", !0),
|
|
3968
|
-
|
|
3972
|
+
b("control") ? ($(), F(v(me), {
|
|
3969
3973
|
key: 1,
|
|
3970
3974
|
content: "聚焦+"
|
|
3971
3975
|
}, {
|
|
@@ -3974,13 +3978,13 @@ const jp = Bp.post("data/device-auth"), Np = /* @__PURE__ */ ne({
|
|
|
3974
3978
|
key: 0,
|
|
3975
3979
|
class: "icon icon-enlarge",
|
|
3976
3980
|
icon: "enlarge",
|
|
3977
|
-
onClick:
|
|
3981
|
+
onClick: C[1] || (C[1] = ue((I) => h("zoomIn"), ["stop"]))
|
|
3978
3982
|
})) : j("v-if", !0)
|
|
3979
3983
|
]),
|
|
3980
3984
|
_: 1
|
|
3981
3985
|
/* STABLE */
|
|
3982
3986
|
})) : j("v-if", !0),
|
|
3983
|
-
|
|
3987
|
+
b("control") ? ($(), F(v(me), {
|
|
3984
3988
|
key: 2,
|
|
3985
3989
|
content: "方向控制"
|
|
3986
3990
|
}, {
|
|
@@ -3989,7 +3993,7 @@ const jp = Bp.post("data/device-auth"), Np = /* @__PURE__ */ ne({
|
|
|
3989
3993
|
key: 0,
|
|
3990
3994
|
class: "icon icon-direction-control",
|
|
3991
3995
|
icon: "direction-control",
|
|
3992
|
-
onClick: ue(
|
|
3996
|
+
onClick: ue(d, ["stop"])
|
|
3993
3997
|
})) : j("v-if", !0)
|
|
3994
3998
|
]),
|
|
3995
3999
|
_: 1
|
|
@@ -4003,7 +4007,7 @@ const jp = Bp.post("data/device-auth"), Np = /* @__PURE__ */ ne({
|
|
|
4003
4007
|
]),
|
|
4004
4008
|
a.value ? ($(), F(zp, {
|
|
4005
4009
|
key: 1,
|
|
4006
|
-
onChange:
|
|
4010
|
+
onChange: g
|
|
4007
4011
|
})) : j("v-if", !0)
|
|
4008
4012
|
]),
|
|
4009
4013
|
_: 1
|
|
@@ -4023,7 +4027,7 @@ const jp = Bp.post("data/device-auth"), Np = /* @__PURE__ */ ne({
|
|
|
4023
4027
|
}) {
|
|
4024
4028
|
const {
|
|
4025
4029
|
deviceInfo: n
|
|
4026
|
-
} = Es(t), o =
|
|
4030
|
+
} = Es(t), o = T(!1), r = T(""), s = async () => {
|
|
4027
4031
|
var u;
|
|
4028
4032
|
if (!((u = n.value) != null && u.deviceId)) return;
|
|
4029
4033
|
o.value = !0;
|
|
@@ -4062,7 +4066,7 @@ const jp = Bp.post("data/device-auth"), Np = /* @__PURE__ */ ne({
|
|
|
4062
4066
|
}
|
|
4063
4067
|
});
|
|
4064
4068
|
function cf(t) {
|
|
4065
|
-
const e =
|
|
4069
|
+
const e = T(0), n = T(), {
|
|
4066
4070
|
toggle: o,
|
|
4067
4071
|
isFullscreen: r
|
|
4068
4072
|
} = ht(n);
|
|
@@ -4085,10 +4089,10 @@ function cf(t) {
|
|
|
4085
4089
|
videoUrl: c,
|
|
4086
4090
|
onDirectionControl: i,
|
|
4087
4091
|
onZoomControl: u,
|
|
4088
|
-
loading:
|
|
4092
|
+
loading: f
|
|
4089
4093
|
}) => R(sf, {
|
|
4090
4094
|
type: "live",
|
|
4091
|
-
loading:
|
|
4095
|
+
loading: f,
|
|
4092
4096
|
videoUrl: c,
|
|
4093
4097
|
title: l.deviceName,
|
|
4094
4098
|
onDirectionControl: i,
|
|
@@ -4118,7 +4122,7 @@ const lf = /* @__PURE__ */ O(
|
|
|
4118
4122
|
mr({
|
|
4119
4123
|
fullscreen2: import("@das-fed/ui/packages/icons/fullscreen-2")
|
|
4120
4124
|
});
|
|
4121
|
-
const e = t, n =
|
|
4125
|
+
const e = t, n = T(!0), { render: o, toggleFullscreen: r } = cf(e), s = H(() => {
|
|
4122
4126
|
let a = {};
|
|
4123
4127
|
switch (e.gridNum) {
|
|
4124
4128
|
case 1:
|
|
@@ -4179,7 +4183,7 @@ const lf = /* @__PURE__ */ O(
|
|
|
4179
4183
|
Vt(a, r);
|
|
4180
4184
|
});
|
|
4181
4185
|
}, pf = () => {
|
|
4182
|
-
const t =
|
|
4186
|
+
const t = T(4), e = T([]), n = T(null), o = async (s) => {
|
|
4183
4187
|
const [a, l] = await jp(s).run();
|
|
4184
4188
|
if (!a)
|
|
4185
4189
|
return l;
|
|
@@ -4195,22 +4199,22 @@ const lf = /* @__PURE__ */ O(
|
|
|
4195
4199
|
var u;
|
|
4196
4200
|
if ((i == null ? void 0 : i.project) === s) {
|
|
4197
4201
|
t.value = i.layout;
|
|
4198
|
-
let
|
|
4202
|
+
let f = {
|
|
4199
4203
|
projectId: s,
|
|
4200
4204
|
deviceIds: i == null ? void 0 : i.deviceId
|
|
4201
|
-
},
|
|
4202
|
-
let A =
|
|
4205
|
+
}, d = (await o(f)).map((m) => {
|
|
4206
|
+
let A = m.lookupOrOperation == 1;
|
|
4203
4207
|
return {
|
|
4204
|
-
id:
|
|
4205
|
-
productId:
|
|
4206
|
-
deviceId:
|
|
4207
|
-
deviceName:
|
|
4208
|
-
authType:
|
|
4208
|
+
id: m.id,
|
|
4209
|
+
productId: m.productId,
|
|
4210
|
+
deviceId: m.deviceId,
|
|
4211
|
+
deviceName: m.deviceName,
|
|
4212
|
+
authType: m.controlAuthorization == 1 ? 2 : 1,
|
|
4209
4213
|
// 1 查看权限 2 查看+操作权限
|
|
4210
4214
|
show: !!A
|
|
4211
4215
|
};
|
|
4212
4216
|
});
|
|
4213
|
-
e.value =
|
|
4217
|
+
e.value = d.filter((m) => !!m.show), (u = e.value) != null && u.length && df({ gridNum: t.value, deviceList: e.value });
|
|
4214
4218
|
}
|
|
4215
4219
|
}
|
|
4216
4220
|
}));
|
|
@@ -4348,10 +4352,10 @@ class sn {
|
|
|
4348
4352
|
return "";
|
|
4349
4353
|
}
|
|
4350
4354
|
}
|
|
4351
|
-
var
|
|
4355
|
+
var w;
|
|
4352
4356
|
(function(t) {
|
|
4353
4357
|
t[t.Trace = 0] = "Trace", t[t.Debug = 1] = "Debug", t[t.Information = 2] = "Information", t[t.Warning = 3] = "Warning", t[t.Error = 4] = "Error", t[t.Critical = 5] = "Critical", t[t.None = 6] = "None";
|
|
4354
|
-
})(
|
|
4358
|
+
})(w || (w = {}));
|
|
4355
4359
|
class Pt {
|
|
4356
4360
|
constructor() {
|
|
4357
4361
|
}
|
|
@@ -4362,7 +4366,7 @@ class Pt {
|
|
|
4362
4366
|
}
|
|
4363
4367
|
Pt.instance = new Pt();
|
|
4364
4368
|
const vf = "8.0.7";
|
|
4365
|
-
class
|
|
4369
|
+
class ae {
|
|
4366
4370
|
static isRequired(e, n) {
|
|
4367
4371
|
if (e == null)
|
|
4368
4372
|
throw new Error(`The '${n}' argument is required.`);
|
|
@@ -4413,7 +4417,7 @@ function Ze(t) {
|
|
|
4413
4417
|
}
|
|
4414
4418
|
async function is(t, e, n, o, r, s) {
|
|
4415
4419
|
const a = {}, [l, c] = pt();
|
|
4416
|
-
a[l] = c, t.log(
|
|
4420
|
+
a[l] = c, t.log(w.Trace, `(${e} transport) sending data. ${Lt(r, s.logMessageContent)}.`);
|
|
4417
4421
|
const i = Ze(r) ? "arraybuffer" : "text", u = await n.post(o, {
|
|
4418
4422
|
content: r,
|
|
4419
4423
|
headers: { ...a, ...s.headers },
|
|
@@ -4421,10 +4425,10 @@ async function is(t, e, n, o, r, s) {
|
|
|
4421
4425
|
timeout: s.timeout,
|
|
4422
4426
|
withCredentials: s.withCredentials
|
|
4423
4427
|
});
|
|
4424
|
-
t.log(
|
|
4428
|
+
t.log(w.Trace, `(${e} transport) request complete. Response status: ${u.statusCode}.`);
|
|
4425
4429
|
}
|
|
4426
4430
|
function yf(t) {
|
|
4427
|
-
return t === void 0 ? new Xt(
|
|
4431
|
+
return t === void 0 ? new Xt(w.Information) : t === null ? Pt.instance : t.log !== void 0 ? t : new Xt(t);
|
|
4428
4432
|
}
|
|
4429
4433
|
class _f {
|
|
4430
4434
|
constructor(e, n) {
|
|
@@ -4442,16 +4446,16 @@ class Xt {
|
|
|
4442
4446
|
}
|
|
4443
4447
|
log(e, n) {
|
|
4444
4448
|
if (e >= this._minLevel) {
|
|
4445
|
-
const o = `[${(/* @__PURE__ */ new Date()).toISOString()}] ${
|
|
4449
|
+
const o = `[${(/* @__PURE__ */ new Date()).toISOString()}] ${w[e]}: ${n}`;
|
|
4446
4450
|
switch (e) {
|
|
4447
|
-
case
|
|
4448
|
-
case
|
|
4451
|
+
case w.Critical:
|
|
4452
|
+
case w.Error:
|
|
4449
4453
|
this.out.error(o);
|
|
4450
4454
|
break;
|
|
4451
|
-
case
|
|
4455
|
+
case w.Warning:
|
|
4452
4456
|
this.out.warn(o);
|
|
4453
4457
|
break;
|
|
4454
|
-
case
|
|
4458
|
+
case w.Information:
|
|
4455
4459
|
this.out.info(o);
|
|
4456
4460
|
break;
|
|
4457
4461
|
default:
|
|
@@ -4536,7 +4540,7 @@ class Ef extends sn {
|
|
|
4536
4540
|
if (e.timeout) {
|
|
4537
4541
|
const c = e.timeout;
|
|
4538
4542
|
r = setTimeout(() => {
|
|
4539
|
-
n.abort(), this._logger.log(
|
|
4543
|
+
n.abort(), this._logger.log(w.Warning, "Timeout from HTTP request."), o = new Yn();
|
|
4540
4544
|
}, c);
|
|
4541
4545
|
}
|
|
4542
4546
|
e.content === "" && (e.content = void 0), e.content && (e.headers = e.headers || {}, Ze(e.content) ? e.headers["Content-Type"] = "application/octet-stream" : e.headers["Content-Type"] = "text/plain;charset=UTF-8");
|
|
@@ -4556,7 +4560,7 @@ class Ef extends sn {
|
|
|
4556
4560
|
signal: n.signal
|
|
4557
4561
|
});
|
|
4558
4562
|
} catch (c) {
|
|
4559
|
-
throw o || (this._logger.log(
|
|
4563
|
+
throw o || (this._logger.log(w.Warning, `Error from HTTP request. ${c}.`), c);
|
|
4560
4564
|
} finally {
|
|
4561
4565
|
r && clearTimeout(r), e.abortSignal && (e.abortSignal.onabort = null);
|
|
4562
4566
|
}
|
|
@@ -4608,9 +4612,9 @@ class Sf extends sn {
|
|
|
4608
4612
|
}), e.timeout && (r.timeout = e.timeout), r.onload = () => {
|
|
4609
4613
|
e.abortSignal && (e.abortSignal.onabort = null), r.status >= 200 && r.status < 300 ? n(new as(r.status, r.statusText, r.response || r.responseText)) : o(new Ke(r.response || r.responseText || r.statusText, r.status));
|
|
4610
4614
|
}, r.onerror = () => {
|
|
4611
|
-
this._logger.log(
|
|
4615
|
+
this._logger.log(w.Warning, `Error from HTTP request. ${r.status}: ${r.statusText}.`), o(new Ke(r.statusText, r.status));
|
|
4612
4616
|
}, r.ontimeout = () => {
|
|
4613
|
-
this._logger.log(
|
|
4617
|
+
this._logger.log(w.Warning, "Timeout from HTTP request."), o(new Yn());
|
|
4614
4618
|
}, r.send(e.content);
|
|
4615
4619
|
}) : Promise.reject(new Error("No url defined.")) : Promise.reject(new Error("No method defined."));
|
|
4616
4620
|
}
|
|
@@ -4809,8 +4813,8 @@ class eo {
|
|
|
4809
4813
|
}
|
|
4810
4814
|
constructor(e, n, o, r, s, a, l) {
|
|
4811
4815
|
this._nextKeepAlive = 0, this._freezeEventListener = () => {
|
|
4812
|
-
this._logger.log(
|
|
4813
|
-
},
|
|
4816
|
+
this._logger.log(w.Warning, "The page is being frozen, this will likely lead to the connection being closed and messages being lost. For more information see the docs at https://learn.microsoft.com/aspnet/core/signalr/javascript-client#bsleep");
|
|
4817
|
+
}, ae.isRequired(e, "connection"), ae.isRequired(n, "logger"), ae.isRequired(o, "protocol"), this.serverTimeoutInMilliseconds = s ?? Mf, this.keepAliveIntervalInMilliseconds = a ?? Of, this._statefulReconnectBufferSize = l ?? Bf, this._logger = n, this._protocol = o, this.connection = e, this._reconnectPolicy = r, this._handshakeProtocol = new Pf(), this.connection.onreceive = (c) => this._processIncomingData(c), this.connection.onclose = (c) => this._connectionClosed(c), this._callbacks = {}, this._methods = {}, this._closedCallbacks = [], this._reconnectingCallbacks = [], this._reconnectedCallbacks = [], this._invocationId = 0, this._receivedHandshakeResponse = !1, this._connectionState = Y.Disconnected, this._connectionStarted = !1, this._cachedPingMessage = this._protocol.writeMessage({ type: U.Ping });
|
|
4814
4818
|
}
|
|
4815
4819
|
/** Indicates the state of the {@link HubConnection} to the server. */
|
|
4816
4820
|
get state() {
|
|
@@ -4848,11 +4852,11 @@ class eo {
|
|
|
4848
4852
|
async _startWithStateTransitions() {
|
|
4849
4853
|
if (this._connectionState !== Y.Disconnected)
|
|
4850
4854
|
return Promise.reject(new Error("Cannot start a HubConnection that is not in the 'Disconnected' state."));
|
|
4851
|
-
this._connectionState = Y.Connecting, this._logger.log(
|
|
4855
|
+
this._connectionState = Y.Connecting, this._logger.log(w.Debug, "Starting HubConnection.");
|
|
4852
4856
|
try {
|
|
4853
|
-
await this._startInternal(), te.isBrowser && window.document.addEventListener("freeze", this._freezeEventListener), this._connectionState = Y.Connected, this._connectionStarted = !0, this._logger.log(
|
|
4857
|
+
await this._startInternal(), te.isBrowser && window.document.addEventListener("freeze", this._freezeEventListener), this._connectionState = Y.Connected, this._connectionStarted = !0, this._logger.log(w.Debug, "HubConnection connected successfully.");
|
|
4854
4858
|
} catch (e) {
|
|
4855
|
-
return this._connectionState = Y.Disconnected, this._logger.log(
|
|
4859
|
+
return this._connectionState = Y.Disconnected, this._logger.log(w.Debug, `HubConnection failed to start successfully because of error '${e}'.`), Promise.reject(e);
|
|
4856
4860
|
}
|
|
4857
4861
|
}
|
|
4858
4862
|
async _startInternal() {
|
|
@@ -4868,14 +4872,14 @@ class eo {
|
|
|
4868
4872
|
protocol: this._protocol.name,
|
|
4869
4873
|
version: n
|
|
4870
4874
|
};
|
|
4871
|
-
if (this._logger.log(
|
|
4875
|
+
if (this._logger.log(w.Debug, "Sending handshake request."), await this._sendMessage(this._handshakeProtocol.writeHandshakeRequest(o)), this._logger.log(w.Information, `Using HubProtocol '${this._protocol.name}'.`), this._cleanupTimeout(), this._resetTimeoutPeriod(), this._resetKeepAliveInterval(), await e, this._stopDuringStartError)
|
|
4872
4876
|
throw this._stopDuringStartError;
|
|
4873
4877
|
(this.connection.features.reconnect || !1) && (this._messageBuffer = new $f(this._protocol, this.connection, this._statefulReconnectBufferSize), this.connection.features.disconnected = this._messageBuffer._disconnected.bind(this._messageBuffer), this.connection.features.resend = () => {
|
|
4874
4878
|
if (this._messageBuffer)
|
|
4875
4879
|
return this._messageBuffer._resend();
|
|
4876
4880
|
}), this.connection.features.inherentKeepAlive || await this._sendMessage(this._cachedPingMessage);
|
|
4877
4881
|
} catch (n) {
|
|
4878
|
-
throw this._logger.log(
|
|
4882
|
+
throw this._logger.log(w.Debug, `Hub handshake failed with error '${n}' during start(). Stopping HubConnection.`), this._cleanupTimeout(), this._cleanupPingTimer(), await this.connection.stop(n), n;
|
|
4879
4883
|
}
|
|
4880
4884
|
}
|
|
4881
4885
|
/** Stops the connection.
|
|
@@ -4892,11 +4896,11 @@ class eo {
|
|
|
4892
4896
|
}
|
|
4893
4897
|
_stopInternal(e) {
|
|
4894
4898
|
if (this._connectionState === Y.Disconnected)
|
|
4895
|
-
return this._logger.log(
|
|
4899
|
+
return this._logger.log(w.Debug, `Call to HubConnection.stop(${e}) ignored because it is already in the disconnected state.`), Promise.resolve();
|
|
4896
4900
|
if (this._connectionState === Y.Disconnecting)
|
|
4897
|
-
return this._logger.log(
|
|
4901
|
+
return this._logger.log(w.Debug, `Call to HttpConnection.stop(${e}) ignored because the connection is already in the disconnecting state.`), this._stopPromise;
|
|
4898
4902
|
const n = this._connectionState;
|
|
4899
|
-
return this._connectionState = Y.Disconnecting, this._logger.log(
|
|
4903
|
+
return this._connectionState = Y.Disconnecting, this._logger.log(w.Debug, "Stopping HubConnection."), this._reconnectDelayHandle ? (this._logger.log(w.Debug, "Connection stopped during reconnect delay. Done reconnecting."), clearTimeout(this._reconnectDelayHandle), this._reconnectDelayHandle = void 0, this._completeClose(), Promise.resolve()) : (n === Y.Connected && this._sendCloseMessage(), this._cleanupTimeout(), this._cleanupPingTimer(), this._stopDuringStartError = e || new $e("The connection was stopped before the hub handshake could complete."), this.connection.stop(e));
|
|
4900
4904
|
}
|
|
4901
4905
|
async _sendCloseMessage() {
|
|
4902
4906
|
try {
|
|
@@ -4964,9 +4968,9 @@ class eo {
|
|
|
4964
4968
|
invoke(e, ...n) {
|
|
4965
4969
|
const [o, r] = this._replaceStreamingParams(n), s = this._createInvocation(e, n, !1, r);
|
|
4966
4970
|
return new Promise((l, c) => {
|
|
4967
|
-
this._callbacks[s.invocationId] = (u,
|
|
4968
|
-
if (
|
|
4969
|
-
c(
|
|
4971
|
+
this._callbacks[s.invocationId] = (u, f) => {
|
|
4972
|
+
if (f) {
|
|
4973
|
+
c(f);
|
|
4970
4974
|
return;
|
|
4971
4975
|
} else u && (u.type === U.Completion ? u.error ? c(new Error(u.error)) : l(u.result) : c(new Error(`Unexpected message type: ${u.type}`)));
|
|
4972
4976
|
};
|
|
@@ -5020,7 +5024,7 @@ class eo {
|
|
|
5020
5024
|
switch (o.type) {
|
|
5021
5025
|
case U.Invocation:
|
|
5022
5026
|
this._invokeClientMethod(o).catch((r) => {
|
|
5023
|
-
this._logger.log(
|
|
5027
|
+
this._logger.log(w.Error, `Invoke client method threw error: ${mn(r)}`);
|
|
5024
5028
|
});
|
|
5025
5029
|
break;
|
|
5026
5030
|
case U.StreamItem:
|
|
@@ -5031,7 +5035,7 @@ class eo {
|
|
|
5031
5035
|
try {
|
|
5032
5036
|
r(o);
|
|
5033
5037
|
} catch (s) {
|
|
5034
|
-
this._logger.log(
|
|
5038
|
+
this._logger.log(w.Error, `Stream callback threw error: ${mn(s)}`);
|
|
5035
5039
|
}
|
|
5036
5040
|
}
|
|
5037
5041
|
break;
|
|
@@ -5039,7 +5043,7 @@ class eo {
|
|
|
5039
5043
|
case U.Ping:
|
|
5040
5044
|
break;
|
|
5041
5045
|
case U.Close: {
|
|
5042
|
-
this._logger.log(
|
|
5046
|
+
this._logger.log(w.Information, "Close message received from server.");
|
|
5043
5047
|
const r = o.error ? new Error("Server returned an error on close: " + o.error) : void 0;
|
|
5044
5048
|
o.allowReconnect === !0 ? this.connection.stop(r) : this._stopPromise = this._stopInternal(r);
|
|
5045
5049
|
break;
|
|
@@ -5051,7 +5055,7 @@ class eo {
|
|
|
5051
5055
|
this._messageBuffer && this._messageBuffer._resetSequence(o);
|
|
5052
5056
|
break;
|
|
5053
5057
|
default:
|
|
5054
|
-
this._logger.log(
|
|
5058
|
+
this._logger.log(w.Warning, `Invalid message type: ${o.type}.`);
|
|
5055
5059
|
break;
|
|
5056
5060
|
}
|
|
5057
5061
|
}
|
|
@@ -5063,17 +5067,17 @@ class eo {
|
|
|
5063
5067
|
[o, n] = this._handshakeProtocol.parseHandshakeResponse(e);
|
|
5064
5068
|
} catch (r) {
|
|
5065
5069
|
const s = "Error parsing handshake response: " + r;
|
|
5066
|
-
this._logger.log(
|
|
5070
|
+
this._logger.log(w.Error, s);
|
|
5067
5071
|
const a = new Error(s);
|
|
5068
5072
|
throw this._handshakeRejecter(a), a;
|
|
5069
5073
|
}
|
|
5070
5074
|
if (n.error) {
|
|
5071
5075
|
const r = "Server returned handshake error: " + n.error;
|
|
5072
|
-
this._logger.log(
|
|
5076
|
+
this._logger.log(w.Error, r);
|
|
5073
5077
|
const s = new Error(r);
|
|
5074
5078
|
throw this._handshakeRejecter(s), s;
|
|
5075
5079
|
} else
|
|
5076
|
-
this._logger.log(
|
|
5080
|
+
this._logger.log(w.Debug, "Server handshake complete.");
|
|
5077
5081
|
return this._handshakeResolver(), o;
|
|
5078
5082
|
}
|
|
5079
5083
|
_resetKeepAliveInterval() {
|
|
@@ -5099,7 +5103,7 @@ class eo {
|
|
|
5099
5103
|
async _invokeClientMethod(e) {
|
|
5100
5104
|
const n = e.target.toLowerCase(), o = this._methods[n];
|
|
5101
5105
|
if (!o) {
|
|
5102
|
-
this._logger.log(
|
|
5106
|
+
this._logger.log(w.Warning, `No client method with the name '${n}' found.`), e.invocationId && (this._logger.log(w.Warning, `No result given for '${n}' method and invocation ID '${e.invocationId}'.`), await this._sendWithProtocol(this._createCompletionMessage(e.invocationId, "Client didn't provide a result.", null)));
|
|
5103
5107
|
return;
|
|
5104
5108
|
}
|
|
5105
5109
|
const r = o.slice(), s = !!e.invocationId;
|
|
@@ -5107,14 +5111,14 @@ class eo {
|
|
|
5107
5111
|
for (const i of r)
|
|
5108
5112
|
try {
|
|
5109
5113
|
const u = a;
|
|
5110
|
-
a = await i.apply(this, e.arguments), s && a && u && (this._logger.log(
|
|
5114
|
+
a = await i.apply(this, e.arguments), s && a && u && (this._logger.log(w.Error, `Multiple results provided for '${n}'. Sending error to server.`), c = this._createCompletionMessage(e.invocationId, "Client provided multiple results.", null)), l = void 0;
|
|
5111
5115
|
} catch (u) {
|
|
5112
|
-
l = u, this._logger.log(
|
|
5116
|
+
l = u, this._logger.log(w.Error, `A callback for the method '${n}' threw error '${u}'.`);
|
|
5113
5117
|
}
|
|
5114
|
-
c ? await this._sendWithProtocol(c) : s ? (l ? c = this._createCompletionMessage(e.invocationId, `${l}`, null) : a !== void 0 ? c = this._createCompletionMessage(e.invocationId, null, a) : (this._logger.log(
|
|
5118
|
+
c ? await this._sendWithProtocol(c) : s ? (l ? c = this._createCompletionMessage(e.invocationId, `${l}`, null) : a !== void 0 ? c = this._createCompletionMessage(e.invocationId, null, a) : (this._logger.log(w.Warning, `No result given for '${n}' method and invocation ID '${e.invocationId}'.`), c = this._createCompletionMessage(e.invocationId, "Client didn't provide a result.", null)), await this._sendWithProtocol(c)) : a && this._logger.log(w.Error, `Result given for '${n}' method but server is not expecting a result.`);
|
|
5115
5119
|
}
|
|
5116
5120
|
_connectionClosed(e) {
|
|
5117
|
-
this._logger.log(
|
|
5121
|
+
this._logger.log(w.Debug, `HubConnection.connectionClosed(${e}) called while in state ${this._connectionState}.`), this._stopDuringStartError = this._stopDuringStartError || e || new $e("The underlying connection was closed before the hub handshake could complete."), this._handshakeResolver && this._handshakeResolver(), this._cancelCallbacksWithError(e || new Error("Invocation canceled due to the underlying connection being closed.")), this._cleanupTimeout(), this._cleanupPingTimer(), this._connectionState === Y.Disconnecting ? this._completeClose(e) : this._connectionState === Y.Connected && this._reconnectPolicy ? this._reconnect(e) : this._connectionState === Y.Connected && this._completeClose(e);
|
|
5118
5122
|
}
|
|
5119
5123
|
_completeClose(e) {
|
|
5120
5124
|
if (this._connectionStarted) {
|
|
@@ -5122,7 +5126,7 @@ class eo {
|
|
|
5122
5126
|
try {
|
|
5123
5127
|
this._closedCallbacks.forEach((n) => n.apply(this, [e]));
|
|
5124
5128
|
} catch (n) {
|
|
5125
|
-
this._logger.log(
|
|
5129
|
+
this._logger.log(w.Error, `An onclose callback called with error '${e}' threw error '${n}'.`);
|
|
5126
5130
|
}
|
|
5127
5131
|
}
|
|
5128
5132
|
}
|
|
@@ -5130,44 +5134,44 @@ class eo {
|
|
|
5130
5134
|
const n = Date.now();
|
|
5131
5135
|
let o = 0, r = e !== void 0 ? e : new Error("Attempting to reconnect due to a unknown error."), s = this._getNextRetryDelay(o++, 0, r);
|
|
5132
5136
|
if (s === null) {
|
|
5133
|
-
this._logger.log(
|
|
5137
|
+
this._logger.log(w.Debug, "Connection not reconnecting because the IRetryPolicy returned null on the first reconnect attempt."), this._completeClose(e);
|
|
5134
5138
|
return;
|
|
5135
5139
|
}
|
|
5136
|
-
if (this._connectionState = Y.Reconnecting, e ? this._logger.log(
|
|
5140
|
+
if (this._connectionState = Y.Reconnecting, e ? this._logger.log(w.Information, `Connection reconnecting because of error '${e}'.`) : this._logger.log(w.Information, "Connection reconnecting."), this._reconnectingCallbacks.length !== 0) {
|
|
5137
5141
|
try {
|
|
5138
5142
|
this._reconnectingCallbacks.forEach((a) => a.apply(this, [e]));
|
|
5139
5143
|
} catch (a) {
|
|
5140
|
-
this._logger.log(
|
|
5144
|
+
this._logger.log(w.Error, `An onreconnecting callback called with error '${e}' threw error '${a}'.`);
|
|
5141
5145
|
}
|
|
5142
5146
|
if (this._connectionState !== Y.Reconnecting) {
|
|
5143
|
-
this._logger.log(
|
|
5147
|
+
this._logger.log(w.Debug, "Connection left the reconnecting state in onreconnecting callback. Done reconnecting.");
|
|
5144
5148
|
return;
|
|
5145
5149
|
}
|
|
5146
5150
|
}
|
|
5147
5151
|
for (; s !== null; ) {
|
|
5148
|
-
if (this._logger.log(
|
|
5152
|
+
if (this._logger.log(w.Information, `Reconnect attempt number ${o} will start in ${s} ms.`), await new Promise((a) => {
|
|
5149
5153
|
this._reconnectDelayHandle = setTimeout(a, s);
|
|
5150
5154
|
}), this._reconnectDelayHandle = void 0, this._connectionState !== Y.Reconnecting) {
|
|
5151
|
-
this._logger.log(
|
|
5155
|
+
this._logger.log(w.Debug, "Connection left the reconnecting state during reconnect delay. Done reconnecting.");
|
|
5152
5156
|
return;
|
|
5153
5157
|
}
|
|
5154
5158
|
try {
|
|
5155
|
-
if (await this._startInternal(), this._connectionState = Y.Connected, this._logger.log(
|
|
5159
|
+
if (await this._startInternal(), this._connectionState = Y.Connected, this._logger.log(w.Information, "HubConnection reconnected successfully."), this._reconnectedCallbacks.length !== 0)
|
|
5156
5160
|
try {
|
|
5157
5161
|
this._reconnectedCallbacks.forEach((a) => a.apply(this, [this.connection.connectionId]));
|
|
5158
5162
|
} catch (a) {
|
|
5159
|
-
this._logger.log(
|
|
5163
|
+
this._logger.log(w.Error, `An onreconnected callback called with connectionId '${this.connection.connectionId}; threw error '${a}'.`);
|
|
5160
5164
|
}
|
|
5161
5165
|
return;
|
|
5162
5166
|
} catch (a) {
|
|
5163
|
-
if (this._logger.log(
|
|
5164
|
-
this._logger.log(
|
|
5167
|
+
if (this._logger.log(w.Information, `Reconnect attempt failed because of error '${a}'.`), this._connectionState !== Y.Reconnecting) {
|
|
5168
|
+
this._logger.log(w.Debug, `Connection moved to the '${this._connectionState}' from the reconnecting state during reconnect attempt. Done reconnecting.`), this._connectionState === Y.Disconnecting && this._completeClose();
|
|
5165
5169
|
return;
|
|
5166
5170
|
}
|
|
5167
5171
|
r = a instanceof Error ? a : new Error(a.toString()), s = this._getNextRetryDelay(o++, Date.now() - n, r);
|
|
5168
5172
|
}
|
|
5169
5173
|
}
|
|
5170
|
-
this._logger.log(
|
|
5174
|
+
this._logger.log(w.Information, `Reconnect retries have been exhausted after ${Date.now() - n} ms and ${o} failed attempts. Connection disconnecting.`), this._completeClose();
|
|
5171
5175
|
}
|
|
5172
5176
|
_getNextRetryDelay(e, n, o) {
|
|
5173
5177
|
try {
|
|
@@ -5177,7 +5181,7 @@ class eo {
|
|
|
5177
5181
|
retryReason: o
|
|
5178
5182
|
});
|
|
5179
5183
|
} catch (r) {
|
|
5180
|
-
return this._logger.log(
|
|
5184
|
+
return this._logger.log(w.Error, `IRetryPolicy.nextRetryDelayInMilliseconds(${e}, ${n}) threw error '${r}'.`), null;
|
|
5181
5185
|
}
|
|
5182
5186
|
}
|
|
5183
5187
|
_cancelCallbacksWithError(e) {
|
|
@@ -5187,7 +5191,7 @@ class eo {
|
|
|
5187
5191
|
try {
|
|
5188
5192
|
r(null, e);
|
|
5189
5193
|
} catch (s) {
|
|
5190
|
-
this._logger.log(
|
|
5194
|
+
this._logger.log(w.Error, `Stream 'error' callback called with '${e}' threw error: ${mn(s)}`);
|
|
5191
5195
|
}
|
|
5192
5196
|
});
|
|
5193
5197
|
}
|
|
@@ -5330,10 +5334,10 @@ class xf extends sn {
|
|
|
5330
5334
|
return this._innerClient.getCookieString(e);
|
|
5331
5335
|
}
|
|
5332
5336
|
}
|
|
5333
|
-
var
|
|
5337
|
+
var re;
|
|
5334
5338
|
(function(t) {
|
|
5335
5339
|
t[t.None = 0] = "None", t[t.WebSockets = 1] = "WebSockets", t[t.ServerSentEvents = 2] = "ServerSentEvents", t[t.LongPolling = 4] = "LongPolling";
|
|
5336
|
-
})(
|
|
5340
|
+
})(re || (re = {}));
|
|
5337
5341
|
var ge;
|
|
5338
5342
|
(function(t) {
|
|
5339
5343
|
t[t.Text = 1] = "Text", t[t.Binary = 2] = "Binary";
|
|
@@ -5361,7 +5365,7 @@ class tr {
|
|
|
5361
5365
|
this._httpClient = e, this._logger = n, this._pollAbort = new Qf(), this._options = o, this._running = !1, this.onreceive = null, this.onclose = null;
|
|
5362
5366
|
}
|
|
5363
5367
|
async connect(e, n) {
|
|
5364
|
-
if (
|
|
5368
|
+
if (ae.isRequired(e, "url"), ae.isRequired(n, "transferFormat"), ae.isIn(n, ge, "transferFormat"), this._url = e, this._logger.log(w.Trace, "(LongPolling transport) Connecting."), n === ge.Binary && typeof XMLHttpRequest < "u" && typeof new XMLHttpRequest().responseType != "string")
|
|
5365
5369
|
throw new Error("Binary protocols over XmlHttpRequest not implementing advanced features are not supported.");
|
|
5366
5370
|
const [o, r] = pt(), s = { [o]: r, ...this._options.headers }, a = {
|
|
5367
5371
|
abortSignal: this._pollAbort.signal,
|
|
@@ -5371,32 +5375,32 @@ class tr {
|
|
|
5371
5375
|
};
|
|
5372
5376
|
n === ge.Binary && (a.responseType = "arraybuffer");
|
|
5373
5377
|
const l = `${e}&_=${Date.now()}`;
|
|
5374
|
-
this._logger.log(
|
|
5378
|
+
this._logger.log(w.Trace, `(LongPolling transport) polling: ${l}.`);
|
|
5375
5379
|
const c = await this._httpClient.get(l, a);
|
|
5376
|
-
c.statusCode !== 200 ? (this._logger.log(
|
|
5380
|
+
c.statusCode !== 200 ? (this._logger.log(w.Error, `(LongPolling transport) Unexpected response code: ${c.statusCode}.`), this._closeError = new Ke(c.statusText || "", c.statusCode), this._running = !1) : this._running = !0, this._receiving = this._poll(this._url, a);
|
|
5377
5381
|
}
|
|
5378
5382
|
async _poll(e, n) {
|
|
5379
5383
|
try {
|
|
5380
5384
|
for (; this._running; )
|
|
5381
5385
|
try {
|
|
5382
5386
|
const o = `${e}&_=${Date.now()}`;
|
|
5383
|
-
this._logger.log(
|
|
5387
|
+
this._logger.log(w.Trace, `(LongPolling transport) polling: ${o}.`);
|
|
5384
5388
|
const r = await this._httpClient.get(o, n);
|
|
5385
|
-
r.statusCode === 204 ? (this._logger.log(
|
|
5389
|
+
r.statusCode === 204 ? (this._logger.log(w.Information, "(LongPolling transport) Poll terminated by server."), this._running = !1) : r.statusCode !== 200 ? (this._logger.log(w.Error, `(LongPolling transport) Unexpected response code: ${r.statusCode}.`), this._closeError = new Ke(r.statusText || "", r.statusCode), this._running = !1) : r.content ? (this._logger.log(w.Trace, `(LongPolling transport) data received. ${Lt(r.content, this._options.logMessageContent)}.`), this.onreceive && this.onreceive(r.content)) : this._logger.log(w.Trace, "(LongPolling transport) Poll timed out, reissuing.");
|
|
5386
5390
|
} catch (o) {
|
|
5387
|
-
this._running ? o instanceof Yn ? this._logger.log(
|
|
5391
|
+
this._running ? o instanceof Yn ? this._logger.log(w.Trace, "(LongPolling transport) Poll timed out, reissuing.") : (this._closeError = o, this._running = !1) : this._logger.log(w.Trace, `(LongPolling transport) Poll errored after shutdown: ${o.message}`);
|
|
5388
5392
|
}
|
|
5389
5393
|
} finally {
|
|
5390
|
-
this._logger.log(
|
|
5394
|
+
this._logger.log(w.Trace, "(LongPolling transport) Polling complete."), this.pollAborted || this._raiseOnClose();
|
|
5391
5395
|
}
|
|
5392
5396
|
}
|
|
5393
5397
|
async send(e) {
|
|
5394
5398
|
return this._running ? is(this._logger, "LongPolling", this._httpClient, this._url, e, this._options) : Promise.reject(new Error("Cannot send until the transport is connected"));
|
|
5395
5399
|
}
|
|
5396
5400
|
async stop() {
|
|
5397
|
-
this._logger.log(
|
|
5401
|
+
this._logger.log(w.Trace, "(LongPolling transport) Stopping polling."), this._running = !1, this._pollAbort.abort();
|
|
5398
5402
|
try {
|
|
5399
|
-
await this._receiving, this._logger.log(
|
|
5403
|
+
await this._receiving, this._logger.log(w.Trace, `(LongPolling transport) sending DELETE request to ${this._url}.`);
|
|
5400
5404
|
const e = {}, [n, o] = pt();
|
|
5401
5405
|
e[n] = o;
|
|
5402
5406
|
const r = {
|
|
@@ -5410,15 +5414,15 @@ class tr {
|
|
|
5410
5414
|
} catch (a) {
|
|
5411
5415
|
s = a;
|
|
5412
5416
|
}
|
|
5413
|
-
s ? s instanceof Ke && (s.statusCode === 404 ? this._logger.log(
|
|
5417
|
+
s ? s instanceof Ke && (s.statusCode === 404 ? this._logger.log(w.Trace, "(LongPolling transport) A 404 response was returned from sending a DELETE request.") : this._logger.log(w.Trace, `(LongPolling transport) Error sending a DELETE request: ${s}`)) : this._logger.log(w.Trace, "(LongPolling transport) DELETE request accepted.");
|
|
5414
5418
|
} finally {
|
|
5415
|
-
this._logger.log(
|
|
5419
|
+
this._logger.log(w.Trace, "(LongPolling transport) Stop finished."), this._raiseOnClose();
|
|
5416
5420
|
}
|
|
5417
5421
|
}
|
|
5418
5422
|
_raiseOnClose() {
|
|
5419
5423
|
if (this.onclose) {
|
|
5420
5424
|
let e = "(LongPolling transport) Firing onclose event.";
|
|
5421
|
-
this._closeError && (e += " Error: " + this._closeError), this._logger.log(
|
|
5425
|
+
this._closeError && (e += " Error: " + this._closeError), this._logger.log(w.Trace, e), this.onclose(this._closeError);
|
|
5422
5426
|
}
|
|
5423
5427
|
}
|
|
5424
5428
|
}
|
|
@@ -5427,7 +5431,7 @@ class jf {
|
|
|
5427
5431
|
this._httpClient = e, this._accessToken = n, this._logger = o, this._options = r, this.onreceive = null, this.onclose = null;
|
|
5428
5432
|
}
|
|
5429
5433
|
async connect(e, n) {
|
|
5430
|
-
return
|
|
5434
|
+
return ae.isRequired(e, "url"), ae.isRequired(n, "transferFormat"), ae.isIn(n, ge, "transferFormat"), this._logger.log(w.Trace, "(SSE transport) Connecting."), this._url = e, this._accessToken && (e += (e.indexOf("?") < 0 ? "?" : "&") + `access_token=${encodeURIComponent(this._accessToken)}`), new Promise((o, r) => {
|
|
5431
5435
|
let s = !1;
|
|
5432
5436
|
if (n !== ge.Text) {
|
|
5433
5437
|
r(new Error("The Server-Sent Events transport only supports the 'Text' transfer format"));
|
|
@@ -5446,7 +5450,7 @@ class jf {
|
|
|
5446
5450
|
a.onmessage = (l) => {
|
|
5447
5451
|
if (this.onreceive)
|
|
5448
5452
|
try {
|
|
5449
|
-
this._logger.log(
|
|
5453
|
+
this._logger.log(w.Trace, `(SSE transport) data received. ${Lt(l.data, this._options.logMessageContent)}.`), this.onreceive(l.data);
|
|
5450
5454
|
} catch (c) {
|
|
5451
5455
|
this._close(c);
|
|
5452
5456
|
return;
|
|
@@ -5454,7 +5458,7 @@ class jf {
|
|
|
5454
5458
|
}, a.onerror = (l) => {
|
|
5455
5459
|
s ? this._close() : r(new Error("EventSource failed to connect. The connection could not be found on the server, either the connection ID is not present on the server, or a proxy is refusing/buffering the connection. If you have multiple servers check that sticky sessions are enabled."));
|
|
5456
5460
|
}, a.onopen = () => {
|
|
5457
|
-
this._logger.log(
|
|
5461
|
+
this._logger.log(w.Information, `SSE connected to ${this._url}`), this._eventSource = a, s = !0, o();
|
|
5458
5462
|
};
|
|
5459
5463
|
} catch (l) {
|
|
5460
5464
|
r(l);
|
|
@@ -5477,7 +5481,7 @@ class Nf {
|
|
|
5477
5481
|
this._logger = o, this._accessTokenFactory = n, this._logMessageContent = r, this._webSocketConstructor = s, this._httpClient = e, this.onreceive = null, this.onclose = null, this._headers = a;
|
|
5478
5482
|
}
|
|
5479
5483
|
async connect(e, n) {
|
|
5480
|
-
|
|
5484
|
+
ae.isRequired(e, "url"), ae.isRequired(n, "transferFormat"), ae.isIn(n, ge, "transferFormat"), this._logger.log(w.Trace, "(WebSockets transport) Connecting.");
|
|
5481
5485
|
let o;
|
|
5482
5486
|
return this._accessTokenFactory && (o = await this._accessTokenFactory()), new Promise((r, s) => {
|
|
5483
5487
|
e = e.replace(/^http/, "ws");
|
|
@@ -5485,19 +5489,19 @@ class Nf {
|
|
|
5485
5489
|
const l = this._httpClient.getCookieString(e);
|
|
5486
5490
|
let c = !1;
|
|
5487
5491
|
if (te.isNode || te.isReactNative) {
|
|
5488
|
-
const i = {}, [u,
|
|
5489
|
-
i[u] =
|
|
5492
|
+
const i = {}, [u, f] = pt();
|
|
5493
|
+
i[u] = f, o && (i[Ge.Authorization] = `Bearer ${o}`), l && (i[Ge.Cookie] = l), a = new this._webSocketConstructor(e, void 0, {
|
|
5490
5494
|
headers: { ...i, ...this._headers }
|
|
5491
5495
|
});
|
|
5492
5496
|
} else
|
|
5493
5497
|
o && (e += (e.indexOf("?") < 0 ? "?" : "&") + `access_token=${encodeURIComponent(o)}`);
|
|
5494
5498
|
a || (a = new this._webSocketConstructor(e)), n === ge.Binary && (a.binaryType = "arraybuffer"), a.onopen = (i) => {
|
|
5495
|
-
this._logger.log(
|
|
5499
|
+
this._logger.log(w.Information, `WebSocket connected to ${e}.`), this._webSocket = a, c = !0, r();
|
|
5496
5500
|
}, a.onerror = (i) => {
|
|
5497
5501
|
let u = null;
|
|
5498
|
-
typeof ErrorEvent < "u" && i instanceof ErrorEvent ? u = i.error : u = "There was an error with the transport", this._logger.log(
|
|
5502
|
+
typeof ErrorEvent < "u" && i instanceof ErrorEvent ? u = i.error : u = "There was an error with the transport", this._logger.log(w.Information, `(WebSockets transport) ${u}.`);
|
|
5499
5503
|
}, a.onmessage = (i) => {
|
|
5500
|
-
if (this._logger.log(
|
|
5504
|
+
if (this._logger.log(w.Trace, `(WebSockets transport) data received. ${Lt(i.data, this._logMessageContent)}.`), this.onreceive)
|
|
5501
5505
|
try {
|
|
5502
5506
|
this.onreceive(i.data);
|
|
5503
5507
|
} catch (u) {
|
|
@@ -5515,7 +5519,7 @@ class Nf {
|
|
|
5515
5519
|
});
|
|
5516
5520
|
}
|
|
5517
5521
|
send(e) {
|
|
5518
|
-
return this._webSocket && this._webSocket.readyState === this._webSocketConstructor.OPEN ? (this._logger.log(
|
|
5522
|
+
return this._webSocket && this._webSocket.readyState === this._webSocketConstructor.OPEN ? (this._logger.log(w.Trace, `(WebSockets transport) sending data. ${Lt(e, this._logMessageContent)}.`), this._webSocket.send(e), Promise.resolve()) : Promise.reject("WebSocket is not in the OPEN state");
|
|
5519
5523
|
}
|
|
5520
5524
|
stop() {
|
|
5521
5525
|
return this._webSocket && this._close(void 0), Promise.resolve();
|
|
@@ -5524,7 +5528,7 @@ class Nf {
|
|
|
5524
5528
|
this._webSocket && (this._webSocket.onclose = () => {
|
|
5525
5529
|
}, this._webSocket.onmessage = () => {
|
|
5526
5530
|
}, this._webSocket.onerror = () => {
|
|
5527
|
-
}, this._webSocket.close(), this._webSocket = void 0), this._logger.log(
|
|
5531
|
+
}, this._webSocket.close(), this._webSocket = void 0), this._logger.log(w.Trace, "(WebSockets transport) socket closed."), this.onclose && (this._isCloseEvent(e) && (e.wasClean === !1 || e.code !== 1e3) ? this.onclose(new Error(`WebSocket closed with status code: ${e.code} (${e.reason || "no reason given"}).`)) : e instanceof Error ? this.onclose(e) : this.onclose());
|
|
5528
5532
|
}
|
|
5529
5533
|
_isCloseEvent(e) {
|
|
5530
5534
|
return e && typeof e.wasClean == "boolean" && typeof e.code == "number";
|
|
@@ -5534,7 +5538,7 @@ const nr = 100;
|
|
|
5534
5538
|
class Hf {
|
|
5535
5539
|
constructor(e, n = {}) {
|
|
5536
5540
|
if (this._stopPromiseResolver = () => {
|
|
5537
|
-
}, this.features = {}, this._negotiateVersion = 1,
|
|
5541
|
+
}, this.features = {}, this._negotiateVersion = 1, ae.isRequired(e, "url"), this._logger = yf(n.logger), this.baseUrl = this._resolveUrl(e), n = n || {}, n.logMessageContent = n.logMessageContent === void 0 ? !1 : n.logMessageContent, typeof n.withCredentials == "boolean" || n.withCredentials === void 0)
|
|
5538
5542
|
n.withCredentials = n.withCredentials === void 0 ? !0 : n.withCredentials;
|
|
5539
5543
|
else
|
|
5540
5544
|
throw new Error("withCredentials option was not a 'boolean' or 'undefined' value");
|
|
@@ -5547,14 +5551,14 @@ class Hf {
|
|
|
5547
5551
|
!te.isNode && typeof WebSocket < "u" && !n.WebSocket ? n.WebSocket = WebSocket : te.isNode && !n.WebSocket && o && (n.WebSocket = o), !te.isNode && typeof EventSource < "u" && !n.EventSource ? n.EventSource = EventSource : te.isNode && !n.EventSource && typeof r < "u" && (n.EventSource = r), this._httpClient = new xf(n.httpClient || new kf(this._logger), n.accessTokenFactory), this._connectionState = "Disconnected", this._connectionStarted = !1, this._options = n, this.onreceive = null, this.onclose = null;
|
|
5548
5552
|
}
|
|
5549
5553
|
async start(e) {
|
|
5550
|
-
if (e = e || ge.Binary,
|
|
5554
|
+
if (e = e || ge.Binary, ae.isIn(e, ge, "transferFormat"), this._logger.log(w.Debug, `Starting connection with transfer format '${ge[e]}'.`), this._connectionState !== "Disconnected")
|
|
5551
5555
|
return Promise.reject(new Error("Cannot start an HttpConnection that is not in the 'Disconnected' state."));
|
|
5552
5556
|
if (this._connectionState = "Connecting", this._startInternalPromise = this._startInternal(e), await this._startInternalPromise, this._connectionState === "Disconnecting") {
|
|
5553
5557
|
const n = "Failed to start the HttpConnection before stop() was called.";
|
|
5554
|
-
return this._logger.log(
|
|
5558
|
+
return this._logger.log(w.Error, n), await this._stopPromise, Promise.reject(new $e(n));
|
|
5555
5559
|
} else if (this._connectionState !== "Connected") {
|
|
5556
5560
|
const n = "HttpConnection.startInternal completed gracefully but didn't enter the connection into the connected state!";
|
|
5557
|
-
return this._logger.log(
|
|
5561
|
+
return this._logger.log(w.Error, n), Promise.reject(new $e(n));
|
|
5558
5562
|
}
|
|
5559
5563
|
this._connectionStarted = !0;
|
|
5560
5564
|
}
|
|
@@ -5563,9 +5567,9 @@ class Hf {
|
|
|
5563
5567
|
}
|
|
5564
5568
|
async stop(e) {
|
|
5565
5569
|
if (this._connectionState === "Disconnected")
|
|
5566
|
-
return this._logger.log(
|
|
5570
|
+
return this._logger.log(w.Debug, `Call to HttpConnection.stop(${e}) ignored because the connection is already in the disconnected state.`), Promise.resolve();
|
|
5567
5571
|
if (this._connectionState === "Disconnecting")
|
|
5568
|
-
return this._logger.log(
|
|
5572
|
+
return this._logger.log(w.Debug, `Call to HttpConnection.stop(${e}) ignored because the connection is already in the disconnecting state.`), this._stopPromise;
|
|
5569
5573
|
this._connectionState = "Disconnecting", this._stopPromise = new Promise((n) => {
|
|
5570
5574
|
this._stopPromiseResolver = n;
|
|
5571
5575
|
}), await this._stopInternal(e), await this._stopPromise;
|
|
@@ -5580,19 +5584,19 @@ class Hf {
|
|
|
5580
5584
|
try {
|
|
5581
5585
|
await this.transport.stop();
|
|
5582
5586
|
} catch (n) {
|
|
5583
|
-
this._logger.log(
|
|
5587
|
+
this._logger.log(w.Error, `HttpConnection.transport.stop() threw error '${n}'.`), this._stopConnection();
|
|
5584
5588
|
}
|
|
5585
5589
|
this.transport = void 0;
|
|
5586
5590
|
} else
|
|
5587
|
-
this._logger.log(
|
|
5591
|
+
this._logger.log(w.Debug, "HttpConnection.transport is undefined in HttpConnection.stop() because start() failed.");
|
|
5588
5592
|
}
|
|
5589
5593
|
async _startInternal(e) {
|
|
5590
5594
|
let n = this.baseUrl;
|
|
5591
5595
|
this._accessTokenFactory = this._options.accessTokenFactory, this._httpClient._accessTokenFactory = this._accessTokenFactory;
|
|
5592
5596
|
try {
|
|
5593
5597
|
if (this._options.skipNegotiation)
|
|
5594
|
-
if (this._options.transport ===
|
|
5595
|
-
this.transport = this._constructTransport(
|
|
5598
|
+
if (this._options.transport === re.WebSockets)
|
|
5599
|
+
this.transport = this._constructTransport(re.WebSockets), await this._startTransport(n, e);
|
|
5596
5600
|
else
|
|
5597
5601
|
throw new Error("Negotiation can only be skipped when using the WebSocket transport directly.");
|
|
5598
5602
|
else {
|
|
@@ -5614,16 +5618,16 @@ class Hf {
|
|
|
5614
5618
|
throw new Error("Negotiate redirection limit exceeded.");
|
|
5615
5619
|
await this._createTransport(n, this._options.transport, o, e);
|
|
5616
5620
|
}
|
|
5617
|
-
this.transport instanceof tr && (this.features.inherentKeepAlive = !0), this._connectionState === "Connecting" && (this._logger.log(
|
|
5621
|
+
this.transport instanceof tr && (this.features.inherentKeepAlive = !0), this._connectionState === "Connecting" && (this._logger.log(w.Debug, "The HttpConnection connected successfully."), this._connectionState = "Connected");
|
|
5618
5622
|
} catch (o) {
|
|
5619
|
-
return this._logger.log(
|
|
5623
|
+
return this._logger.log(w.Error, "Failed to start the connection: " + o), this._connectionState = "Disconnected", this.transport = void 0, this._stopPromiseResolver(), Promise.reject(o);
|
|
5620
5624
|
}
|
|
5621
5625
|
}
|
|
5622
5626
|
async _getNegotiationResponse(e) {
|
|
5623
5627
|
const n = {}, [o, r] = pt();
|
|
5624
5628
|
n[o] = r;
|
|
5625
5629
|
const s = this._resolveNegotiateUrl(e);
|
|
5626
|
-
this._logger.log(
|
|
5630
|
+
this._logger.log(w.Debug, `Sending negotiation request: ${s}.`);
|
|
5627
5631
|
try {
|
|
5628
5632
|
const a = await this._httpClient.post(s, {
|
|
5629
5633
|
content: "",
|
|
@@ -5637,7 +5641,7 @@ class Hf {
|
|
|
5637
5641
|
return (!l.negotiateVersion || l.negotiateVersion < 1) && (l.connectionToken = l.connectionId), l.useStatefulReconnect && this._options._useStatefulReconnect !== !0 ? Promise.reject(new Zo("Client didn't negotiate Stateful Reconnect but the server did.")) : l;
|
|
5638
5642
|
} catch (a) {
|
|
5639
5643
|
let l = "Failed to complete negotiation with the server: " + a;
|
|
5640
|
-
return a instanceof Ke && a.statusCode === 404 && (l = l + " Either this is not a SignalR endpoint or there is a proxy blocking the connection."), this._logger.log(
|
|
5644
|
+
return a instanceof Ke && a.statusCode === 404 && (l = l + " Either this is not a SignalR endpoint or there is a proxy blocking the connection."), this._logger.log(w.Error, l), Promise.reject(new Zo(l));
|
|
5641
5645
|
}
|
|
5642
5646
|
}
|
|
5643
5647
|
_createConnectUrl(e, n) {
|
|
@@ -5646,7 +5650,7 @@ class Hf {
|
|
|
5646
5650
|
async _createTransport(e, n, o, r) {
|
|
5647
5651
|
let s = this._createConnectUrl(e, o.connectionToken);
|
|
5648
5652
|
if (this._isITransport(n)) {
|
|
5649
|
-
this._logger.log(
|
|
5653
|
+
this._logger.log(w.Debug, "Connection was provided an instance of ITransport, using that directly."), this.transport = n, await this._startTransport(s, r), this.connectionId = o.connectionId;
|
|
5650
5654
|
return;
|
|
5651
5655
|
}
|
|
5652
5656
|
const a = [], l = o.availableTransports || [];
|
|
@@ -5659,18 +5663,18 @@ class Hf {
|
|
|
5659
5663
|
if (this.transport = u, !c) {
|
|
5660
5664
|
try {
|
|
5661
5665
|
c = await this._getNegotiationResponse(e);
|
|
5662
|
-
} catch (
|
|
5663
|
-
return Promise.reject(
|
|
5666
|
+
} catch (f) {
|
|
5667
|
+
return Promise.reject(f);
|
|
5664
5668
|
}
|
|
5665
5669
|
s = this._createConnectUrl(e, c.connectionToken);
|
|
5666
5670
|
}
|
|
5667
5671
|
try {
|
|
5668
5672
|
await this._startTransport(s, r), this.connectionId = c.connectionId;
|
|
5669
5673
|
return;
|
|
5670
|
-
} catch (
|
|
5671
|
-
if (this._logger.log(
|
|
5672
|
-
const
|
|
5673
|
-
return this._logger.log(
|
|
5674
|
+
} catch (f) {
|
|
5675
|
+
if (this._logger.log(w.Error, `Failed to start the transport '${i.transport}': ${f}`), c = void 0, a.push(new gf(`${i.transport} failed: ${f}`, re[i.transport])), this._connectionState !== "Connecting") {
|
|
5676
|
+
const p = "Failed to select transport before stop() was called.";
|
|
5677
|
+
return this._logger.log(w.Debug, p), Promise.reject(new $e(p));
|
|
5674
5678
|
}
|
|
5675
5679
|
}
|
|
5676
5680
|
}
|
|
@@ -5679,15 +5683,15 @@ class Hf {
|
|
|
5679
5683
|
}
|
|
5680
5684
|
_constructTransport(e) {
|
|
5681
5685
|
switch (e) {
|
|
5682
|
-
case
|
|
5686
|
+
case re.WebSockets:
|
|
5683
5687
|
if (!this._options.WebSocket)
|
|
5684
5688
|
throw new Error("'WebSocket' is not supported in your environment.");
|
|
5685
5689
|
return new Nf(this._httpClient, this._accessTokenFactory, this._logger, this._options.logMessageContent, this._options.WebSocket, this._options.headers || {});
|
|
5686
|
-
case
|
|
5690
|
+
case re.ServerSentEvents:
|
|
5687
5691
|
if (!this._options.EventSource)
|
|
5688
5692
|
throw new Error("'EventSource' is not supported in your environment.");
|
|
5689
5693
|
return new jf(this._httpClient, this._httpClient._accessToken, this._logger, this._options);
|
|
5690
|
-
case
|
|
5694
|
+
case re.LongPolling:
|
|
5691
5695
|
return new tr(this._httpClient, this._logger, this._options);
|
|
5692
5696
|
default:
|
|
5693
5697
|
throw new Error(`Unknown transport: ${e}.`);
|
|
@@ -5710,42 +5714,42 @@ class Hf {
|
|
|
5710
5714
|
} : this.transport.onclose = (o) => this._stopConnection(o), this.transport.connect(e, n);
|
|
5711
5715
|
}
|
|
5712
5716
|
_resolveTransportOrError(e, n, o, r) {
|
|
5713
|
-
const s =
|
|
5717
|
+
const s = re[e.transport];
|
|
5714
5718
|
if (s == null)
|
|
5715
|
-
return this._logger.log(
|
|
5719
|
+
return this._logger.log(w.Debug, `Skipping transport '${e.transport}' because it is not supported by this client.`), new Error(`Skipping transport '${e.transport}' because it is not supported by this client.`);
|
|
5716
5720
|
if (Uf(n, s))
|
|
5717
5721
|
if (e.transferFormats.map((l) => ge[l]).indexOf(o) >= 0) {
|
|
5718
|
-
if (s ===
|
|
5719
|
-
return this._logger.log(
|
|
5720
|
-
this._logger.log(
|
|
5722
|
+
if (s === re.WebSockets && !this._options.WebSocket || s === re.ServerSentEvents && !this._options.EventSource)
|
|
5723
|
+
return this._logger.log(w.Debug, `Skipping transport '${re[s]}' because it is not supported in your environment.'`), new ff(`'${re[s]}' is not supported in your environment.`, s);
|
|
5724
|
+
this._logger.log(w.Debug, `Selecting transport '${re[s]}'.`);
|
|
5721
5725
|
try {
|
|
5722
|
-
return this.features.reconnect = s ===
|
|
5726
|
+
return this.features.reconnect = s === re.WebSockets ? r : void 0, this._constructTransport(s);
|
|
5723
5727
|
} catch (l) {
|
|
5724
5728
|
return l;
|
|
5725
5729
|
}
|
|
5726
5730
|
} else
|
|
5727
|
-
return this._logger.log(
|
|
5731
|
+
return this._logger.log(w.Debug, `Skipping transport '${re[s]}' because it does not support the requested transfer format '${ge[o]}'.`), new Error(`'${re[s]}' does not support ${ge[o]}.`);
|
|
5728
5732
|
else
|
|
5729
|
-
return this._logger.log(
|
|
5733
|
+
return this._logger.log(w.Debug, `Skipping transport '${re[s]}' because it was disabled by the client.`), new hf(`'${re[s]}' is disabled by the client.`, s);
|
|
5730
5734
|
}
|
|
5731
5735
|
_isITransport(e) {
|
|
5732
5736
|
return e && typeof e == "object" && "connect" in e;
|
|
5733
5737
|
}
|
|
5734
5738
|
_stopConnection(e) {
|
|
5735
|
-
if (this._logger.log(
|
|
5736
|
-
this._logger.log(
|
|
5739
|
+
if (this._logger.log(w.Debug, `HttpConnection.stopConnection(${e}) called while in state ${this._connectionState}.`), this.transport = void 0, e = this._stopError || e, this._stopError = void 0, this._connectionState === "Disconnected") {
|
|
5740
|
+
this._logger.log(w.Debug, `Call to HttpConnection.stopConnection(${e}) was ignored because the connection is already in the disconnected state.`);
|
|
5737
5741
|
return;
|
|
5738
5742
|
}
|
|
5739
5743
|
if (this._connectionState === "Connecting")
|
|
5740
|
-
throw this._logger.log(
|
|
5741
|
-
if (this._connectionState === "Disconnecting" && this._stopPromiseResolver(), e ? this._logger.log(
|
|
5742
|
-
this._logger.log(
|
|
5744
|
+
throw this._logger.log(w.Warning, `Call to HttpConnection.stopConnection(${e}) was ignored because the connection is still in the connecting state.`), new Error(`HttpConnection.stopConnection(${e}) was called while the connection is still in the connecting state.`);
|
|
5745
|
+
if (this._connectionState === "Disconnecting" && this._stopPromiseResolver(), e ? this._logger.log(w.Error, `Connection disconnected with error '${e}'.`) : this._logger.log(w.Information, "Connection disconnected."), this._sendQueue && (this._sendQueue.stop().catch((n) => {
|
|
5746
|
+
this._logger.log(w.Error, `TransportSendQueue.stop() threw error '${n}'.`);
|
|
5743
5747
|
}), this._sendQueue = void 0), this.connectionId = void 0, this._connectionState = "Disconnected", this._connectionStarted) {
|
|
5744
5748
|
this._connectionStarted = !1;
|
|
5745
5749
|
try {
|
|
5746
5750
|
this.onclose && this.onclose(e);
|
|
5747
5751
|
} catch (n) {
|
|
5748
|
-
this._logger.log(
|
|
5752
|
+
this._logger.log(w.Error, `HttpConnection.onclose(${e}) threw error '${n}'.`);
|
|
5749
5753
|
}
|
|
5750
5754
|
}
|
|
5751
5755
|
}
|
|
@@ -5755,7 +5759,7 @@ class Hf {
|
|
|
5755
5759
|
if (!te.isBrowser)
|
|
5756
5760
|
throw new Error(`Cannot resolve '${e}'.`);
|
|
5757
5761
|
const n = window.document.createElement("a");
|
|
5758
|
-
return n.href = e, this._logger.log(
|
|
5762
|
+
return n.href = e, this._logger.log(w.Information, `Normalizing '${e}' to '${n.href}'.`), n.href;
|
|
5759
5763
|
}
|
|
5760
5764
|
_resolveNegotiateUrl(e) {
|
|
5761
5765
|
const n = new URL(e);
|
|
@@ -5861,7 +5865,7 @@ class Vf {
|
|
|
5861
5865
|
this._isSequenceMessage(a);
|
|
5862
5866
|
break;
|
|
5863
5867
|
default:
|
|
5864
|
-
n.log(
|
|
5868
|
+
n.log(w.Information, "Unknown message type '" + a.type + "' ignored.");
|
|
5865
5869
|
continue;
|
|
5866
5870
|
}
|
|
5867
5871
|
r.push(a);
|
|
@@ -5902,15 +5906,15 @@ class Vf {
|
|
|
5902
5906
|
}
|
|
5903
5907
|
}
|
|
5904
5908
|
const Wf = {
|
|
5905
|
-
trace:
|
|
5906
|
-
debug:
|
|
5907
|
-
info:
|
|
5908
|
-
information:
|
|
5909
|
-
warn:
|
|
5910
|
-
warning:
|
|
5911
|
-
error:
|
|
5912
|
-
critical:
|
|
5913
|
-
none:
|
|
5909
|
+
trace: w.Trace,
|
|
5910
|
+
debug: w.Debug,
|
|
5911
|
+
info: w.Information,
|
|
5912
|
+
information: w.Information,
|
|
5913
|
+
warn: w.Warning,
|
|
5914
|
+
warning: w.Warning,
|
|
5915
|
+
error: w.Error,
|
|
5916
|
+
critical: w.Critical,
|
|
5917
|
+
none: w.None
|
|
5914
5918
|
};
|
|
5915
5919
|
function zf(t) {
|
|
5916
5920
|
const e = Wf[t.toLowerCase()];
|
|
@@ -5920,7 +5924,7 @@ function zf(t) {
|
|
|
5920
5924
|
}
|
|
5921
5925
|
class qf {
|
|
5922
5926
|
configureLogging(e) {
|
|
5923
|
-
if (
|
|
5927
|
+
if (ae.isRequired(e, "logging"), Jf(e))
|
|
5924
5928
|
this.logger = e;
|
|
5925
5929
|
else if (typeof e == "string") {
|
|
5926
5930
|
const n = zf(e);
|
|
@@ -5930,7 +5934,7 @@ class qf {
|
|
|
5930
5934
|
return this;
|
|
5931
5935
|
}
|
|
5932
5936
|
withUrl(e, n) {
|
|
5933
|
-
return
|
|
5937
|
+
return ae.isRequired(e, "url"), ae.isNotEmpty(e, "url"), this.url = e, typeof n == "object" ? this.httpConnectionOptions = { ...this.httpConnectionOptions, ...n } : this.httpConnectionOptions = {
|
|
5934
5938
|
...this.httpConnectionOptions,
|
|
5935
5939
|
transport: n
|
|
5936
5940
|
}, this;
|
|
@@ -5940,7 +5944,7 @@ class qf {
|
|
|
5940
5944
|
* @param {IHubProtocol} protocol The {@link @microsoft/signalr.IHubProtocol} implementation to use.
|
|
5941
5945
|
*/
|
|
5942
5946
|
withHubProtocol(e) {
|
|
5943
|
-
return
|
|
5947
|
+
return ae.isRequired(e, "protocol"), this.protocol = e, this;
|
|
5944
5948
|
}
|
|
5945
5949
|
withAutomaticReconnect(e) {
|
|
5946
5950
|
if (this.reconnectPolicy)
|
|
@@ -5952,14 +5956,14 @@ class qf {
|
|
|
5952
5956
|
* @returns The {@link @microsoft/signalr.HubConnectionBuilder} instance, for chaining.
|
|
5953
5957
|
*/
|
|
5954
5958
|
withServerTimeout(e) {
|
|
5955
|
-
return
|
|
5959
|
+
return ae.isRequired(e, "milliseconds"), this._serverTimeoutInMilliseconds = e, this;
|
|
5956
5960
|
}
|
|
5957
5961
|
/** Configures {@link @microsoft/signalr.HubConnection.keepAliveIntervalInMilliseconds} for the {@link @microsoft/signalr.HubConnection}.
|
|
5958
5962
|
*
|
|
5959
5963
|
* @returns The {@link @microsoft/signalr.HubConnectionBuilder} instance, for chaining.
|
|
5960
5964
|
*/
|
|
5961
5965
|
withKeepAliveInterval(e) {
|
|
5962
|
-
return
|
|
5966
|
+
return ae.isRequired(e, "milliseconds"), this._keepAliveIntervalInMilliseconds = e, this;
|
|
5963
5967
|
}
|
|
5964
5968
|
/** Enables and configures options for the Stateful Reconnect feature.
|
|
5965
5969
|
*
|
|
@@ -5987,7 +5991,7 @@ let { baseURL: Kf } = tt();
|
|
|
5987
5991
|
const Gf = () => {
|
|
5988
5992
|
const t = new qf().withUrl(`${Kf}/api/tool/event-bus`, {
|
|
5989
5993
|
skipNegotiation: !0,
|
|
5990
|
-
transport:
|
|
5994
|
+
transport: re.WebSockets
|
|
5991
5995
|
}).withAutomaticReconnect().build();
|
|
5992
5996
|
return t.start().then(() => {
|
|
5993
5997
|
}).catch((e) => {
|
|
@@ -6000,99 +6004,99 @@ const th = et(`/api/tool/event-bus/${an}/`), vn = th.post("/publish"), nh = xn.g
|
|
|
6000
6004
|
const t = Dt(), { entryApp: e } = qt.hooks.useEntryApp(), { entryMenu: n } = qt.hooks.useEntryMenu();
|
|
6001
6005
|
let o = null;
|
|
6002
6006
|
return Ve(async () => {
|
|
6003
|
-
var
|
|
6004
|
-
let r = ((
|
|
6007
|
+
var h;
|
|
6008
|
+
let r = ((h = t.meta) == null ? void 0 : h.showLayout) ?? !0, { showLayout: s = !0 } = t.query;
|
|
6005
6009
|
if (s === "false" && (s = !1), !r || !s) return;
|
|
6006
6010
|
await en();
|
|
6007
|
-
const a = (
|
|
6011
|
+
const a = (b) => {
|
|
6008
6012
|
try {
|
|
6009
|
-
return JSON.parse(
|
|
6013
|
+
return JSON.parse(b);
|
|
6010
6014
|
} catch {
|
|
6011
6015
|
return !1;
|
|
6012
6016
|
}
|
|
6013
|
-
}, l = async (
|
|
6014
|
-
var
|
|
6015
|
-
const y = J(),
|
|
6016
|
-
if (Array.isArray(
|
|
6017
|
-
const
|
|
6018
|
-
if (
|
|
6017
|
+
}, l = async (b) => {
|
|
6018
|
+
var I;
|
|
6019
|
+
const y = J(), C = ((I = y.appcategorys) == null ? void 0 : I.map((_) => _.apps).flat()) || [];
|
|
6020
|
+
if (Array.isArray(b)) {
|
|
6021
|
+
const _ = b.filter((S) => S.code).map((S) => S.code);
|
|
6022
|
+
if (b.length) {
|
|
6019
6023
|
if (y.currentSubAppCode) {
|
|
6020
|
-
const
|
|
6021
|
-
if (
|
|
6022
|
-
n({ currentMenu:
|
|
6024
|
+
const E = y.currentSubApp.menus ?? [], k = Me(E).find((x) => _.includes(x.code));
|
|
6025
|
+
if (k) {
|
|
6026
|
+
n({ currentMenu: k });
|
|
6023
6027
|
return;
|
|
6024
6028
|
}
|
|
6025
6029
|
}
|
|
6026
|
-
const
|
|
6027
|
-
|
|
6030
|
+
const S = C.find((E) => _.includes(E.code));
|
|
6031
|
+
S && e({ microApp: S });
|
|
6028
6032
|
}
|
|
6029
6033
|
}
|
|
6030
|
-
if (typeof
|
|
6031
|
-
if (
|
|
6032
|
-
const
|
|
6033
|
-
if (!
|
|
6034
|
-
const
|
|
6035
|
-
|
|
6034
|
+
if (typeof b == "string")
|
|
6035
|
+
if (b.includes(":")) {
|
|
6036
|
+
const _ = b.split(":"), [S = "", E = ""] = _;
|
|
6037
|
+
if (!S) return;
|
|
6038
|
+
const k = C.find((x) => x.code === S);
|
|
6039
|
+
k && e({ microApp: k, menuCode: E });
|
|
6036
6040
|
} else {
|
|
6037
|
-
const
|
|
6038
|
-
if (
|
|
6039
|
-
e({ microApp:
|
|
6041
|
+
const _ = b, S = C.find((E) => E.code === _);
|
|
6042
|
+
if (S)
|
|
6043
|
+
e({ microApp: S });
|
|
6040
6044
|
else {
|
|
6041
|
-
const [
|
|
6042
|
-
if (
|
|
6043
|
-
const x =
|
|
6044
|
-
x && e({ microApp: x, menuCode:
|
|
6045
|
+
const [E, k] = await nh().run({ menuCode: _ });
|
|
6046
|
+
if (E) return;
|
|
6047
|
+
const x = C.find((Q) => Q.code === k);
|
|
6048
|
+
x && e({ microApp: x, menuCode: _ });
|
|
6045
6049
|
}
|
|
6046
6050
|
}
|
|
6047
6051
|
};
|
|
6048
|
-
let c =
|
|
6049
|
-
const i = (
|
|
6052
|
+
let c = T(!0);
|
|
6053
|
+
const i = (b) => {
|
|
6050
6054
|
setTimeout(async () => {
|
|
6051
|
-
var y,
|
|
6055
|
+
var y, C;
|
|
6052
6056
|
if (c.value) {
|
|
6053
|
-
const [
|
|
6054
|
-
|
|
6055
|
-
uniqueId:
|
|
6057
|
+
const [I, _] = await eh().run({}, { params: { aliasName: b.actionValue } });
|
|
6058
|
+
I ? await vn().run({
|
|
6059
|
+
uniqueId: b.uniqueId,
|
|
6056
6060
|
status: 0,
|
|
6057
|
-
errorMsg: "未找到" +
|
|
6058
|
-
}) :
|
|
6059
|
-
uniqueId:
|
|
6061
|
+
errorMsg: "未找到" + b.actionValue
|
|
6062
|
+
}) : _.length ? (_.length > 1 ? l(_) : l((y = _[0]) == null ? void 0 : y.code), await vn().run({
|
|
6063
|
+
uniqueId: b.uniqueId,
|
|
6060
6064
|
status: 1,
|
|
6061
|
-
targetName: (
|
|
6065
|
+
targetName: (C = _[0]) == null ? void 0 : C.name
|
|
6062
6066
|
})) : await vn().run({
|
|
6063
|
-
uniqueId:
|
|
6067
|
+
uniqueId: b.uniqueId,
|
|
6064
6068
|
status: 0,
|
|
6065
|
-
errorMsg: "未找到" +
|
|
6069
|
+
errorMsg: "未找到" + b.actionValue
|
|
6066
6070
|
});
|
|
6067
6071
|
}
|
|
6068
6072
|
c.value = !0;
|
|
6069
6073
|
}, 2e3);
|
|
6070
|
-
}, u = (
|
|
6071
|
-
const y = Bn(),
|
|
6072
|
-
Gf().on(`${
|
|
6073
|
-
let
|
|
6074
|
-
if (
|
|
6075
|
-
|
|
6076
|
-
else if (
|
|
6077
|
-
const
|
|
6078
|
-
l(
|
|
6079
|
-
} else
|
|
6074
|
+
}, u = (b) => {
|
|
6075
|
+
const y = Bn(), C = JSON.parse(atob(y.split(".")[1])).sub;
|
|
6076
|
+
Gf().on(`${b}:${C}`, async function(_) {
|
|
6077
|
+
let S = a(_);
|
|
6078
|
+
if (S)
|
|
6079
|
+
S.uniqueId && S.actionKey == "switch-menu" && i(S);
|
|
6080
|
+
else if (_.includes("openAppMenu=")) {
|
|
6081
|
+
const E = _.split("="), k = JSON.parse(E[1]);
|
|
6082
|
+
l(k);
|
|
6083
|
+
} else _.includes("iocIsRun") && (c.value = !1);
|
|
6080
6084
|
});
|
|
6081
|
-
},
|
|
6082
|
-
|
|
6083
|
-
const
|
|
6084
|
-
const [
|
|
6085
|
-
y !==
|
|
6085
|
+
}, f = T(""), [p, d] = await or().run();
|
|
6086
|
+
f.value = d, u(f.value);
|
|
6087
|
+
const m = async () => {
|
|
6088
|
+
const [b, y] = await or().run();
|
|
6089
|
+
y !== f.value && (f.value = y, u(f.value));
|
|
6086
6090
|
};
|
|
6087
6091
|
o = setInterval(() => {
|
|
6088
|
-
|
|
6092
|
+
m();
|
|
6089
6093
|
}, 72e5);
|
|
6090
|
-
const A =
|
|
6091
|
-
|
|
6092
|
-
|
|
6094
|
+
const A = T("online"), g = (b) => {
|
|
6095
|
+
b === "online" && A.value === "offline" && setTimeout(() => {
|
|
6096
|
+
m();
|
|
6093
6097
|
}, 5e3), A.value = (window.navigator.onLine ? "on" : "off") + "line";
|
|
6094
6098
|
};
|
|
6095
|
-
window.addEventListener("online", () =>
|
|
6099
|
+
window.addEventListener("online", () => g("online")), window.addEventListener("offline", () => g("offline"));
|
|
6096
6100
|
}), Zt(() => {
|
|
6097
6101
|
o && clearInterval(o);
|
|
6098
6102
|
}), {};
|
|
@@ -6106,9 +6110,9 @@ const th = et(`/api/tool/event-bus/${an}/`), vn = th.post("/publish"), nh = xn.g
|
|
|
6106
6110
|
},
|
|
6107
6111
|
emits: ["emitFn"],
|
|
6108
6112
|
setup(t, { expose: e, emit: n }) {
|
|
6109
|
-
const o = t, r = n, s =
|
|
6110
|
-
|
|
6111
|
-
const i =
|
|
6113
|
+
const o = t, r = n, s = T(!1), a = T(null), l = T(0), c = T(!1);
|
|
6114
|
+
T("");
|
|
6115
|
+
const i = T({
|
|
6112
6116
|
processTypeId: "confirm",
|
|
6113
6117
|
// 处理类型
|
|
6114
6118
|
reason: "",
|
|
@@ -6134,7 +6138,7 @@ const th = et(`/api/tool/event-bus/${an}/`), vn = th.post("/publish"), nh = xn.g
|
|
|
6134
6138
|
// 处置时限
|
|
6135
6139
|
interval: 2
|
|
6136
6140
|
// 时限刻度 默认选择“时”
|
|
6137
|
-
}), u =
|
|
6141
|
+
}), u = T({
|
|
6138
6142
|
processTypeId: "",
|
|
6139
6143
|
// 处理类型 必填
|
|
6140
6144
|
reason: "",
|
|
@@ -6154,21 +6158,21 @@ const th = et(`/api/tool/event-bus/${an}/`), vn = th.post("/publish"), nh = xn.g
|
|
|
6154
6158
|
// 事件等级id
|
|
6155
6159
|
timeLimit: ""
|
|
6156
6160
|
// 处置时限
|
|
6157
|
-
}),
|
|
6161
|
+
}), f = T(!1), p = T([]), d = T([]), m = T([
|
|
6158
6162
|
{ id: 2, name: N("时").value },
|
|
6159
6163
|
{ id: 1, name: N("分").value },
|
|
6160
6164
|
{ id: 3, name: N("不限").value }
|
|
6161
|
-
]), A =
|
|
6162
|
-
|
|
6163
|
-
const
|
|
6165
|
+
]), A = T([]), g = T(""), h = T("告警对象位置"), b = T(""), y = T([]), C = T("");
|
|
6166
|
+
T("[]");
|
|
6167
|
+
const I = T(!0), _ = T(!0), S = async (D) => {
|
|
6164
6168
|
const P = { name: "1" };
|
|
6165
6169
|
D != null && D.id && (P.spaceId = D.id);
|
|
6166
6170
|
const [L, Pe] = await dh(P).run();
|
|
6167
6171
|
return L ? {} : Pe;
|
|
6168
|
-
},
|
|
6172
|
+
}, E = async (D) => {
|
|
6169
6173
|
const P = { name: D || "" }, [L, Pe] = await ph(P).run();
|
|
6170
6174
|
return L ? {} : Pe;
|
|
6171
|
-
},
|
|
6175
|
+
}, k = T(!0), x = T(!0), Q = T([]), W = async () => {
|
|
6172
6176
|
const [D, P] = await uh().run({ pageIndex: -1, pageSize: -1 });
|
|
6173
6177
|
if (D) return {};
|
|
6174
6178
|
Q.value = P.data.filter((L) => L.status), Q.value.length > 0 && (i.value.workOrderRules = Q.value[0].id);
|
|
@@ -6176,49 +6180,49 @@ const th = et(`/api/tool/event-bus/${an}/`), vn = th.post("/publish"), nh = xn.g
|
|
|
6176
6180
|
G(c, (D) => {
|
|
6177
6181
|
D || (oe(), _e());
|
|
6178
6182
|
}), G(
|
|
6179
|
-
|
|
6183
|
+
_,
|
|
6180
6184
|
(D) => {
|
|
6181
|
-
D ? (
|
|
6185
|
+
D ? (I.value = !0, i.value.customPath = N("选填").value) : (I.value = !1, i.value.customPath = "");
|
|
6182
6186
|
},
|
|
6183
6187
|
{ immediate: !0 }
|
|
6184
6188
|
), G(
|
|
6185
6189
|
x,
|
|
6186
6190
|
(D) => {
|
|
6187
|
-
D ? (i.value.reportTheme = N("告警对象").value,
|
|
6191
|
+
D ? (i.value.reportTheme = N("告警对象").value, k.value = !0) : (b.value = "请输入", i.value.reportTheme = "", k.value = !1);
|
|
6188
6192
|
},
|
|
6189
6193
|
{ immediate: !0 }
|
|
6190
6194
|
);
|
|
6191
6195
|
const q = (D) => {
|
|
6192
6196
|
var P;
|
|
6193
6197
|
return (P = a.value) == null ? void 0 : P.parentNode.parentNode;
|
|
6194
|
-
},
|
|
6198
|
+
}, ie = (D) => {
|
|
6195
6199
|
u.value.reportTheme = "";
|
|
6196
6200
|
}, Ie = (D, P) => {
|
|
6197
|
-
P.length > 0 && (
|
|
6201
|
+
P.length > 0 && (g.value = P[0].path), i.value.reportPosition = D, C.value = "";
|
|
6198
6202
|
}, Rt = (D) => {
|
|
6199
|
-
D && (u.value.reportPosition = "",
|
|
6203
|
+
D && (u.value.reportPosition = "", g.value = ""), D ? (i.value.reportPosition = null, g.value = "", h.value = "告警对象位置") : (i.value.reportPosition = null, g.value = "", h.value = "请选择");
|
|
6200
6204
|
}, pe = (D) => {
|
|
6201
|
-
D && (u.value.reportTheme = ""), D ? (i.value.reportTheme = "",
|
|
6205
|
+
D && (u.value.reportTheme = ""), D ? (i.value.reportTheme = "", b.value = "告警对象") : (i.value.reportTheme = "", b.value = "请输入");
|
|
6202
6206
|
}, oe = () => {
|
|
6203
6207
|
u.value.processTypeId = "", u.value.reason = "", u.value.treatmentPlan = "", u.value.reportPosition = "", u.value.reportTheme = "", u.value.workOrderRules = "", u.value.eventTypeId = "", u.value.eventLevelId = "", u.value.timeLimit = "";
|
|
6204
6208
|
}, _e = () => {
|
|
6205
|
-
i.value.processTypeId = "confirm", i.value.reason = "", i.value.treatmentPlan = "", i.value.remarks = "", i.value.reportPosition = "", i.value.reportTheme = "", i.value.workOrderRules = null,
|
|
6209
|
+
i.value.processTypeId = "confirm", i.value.reason = "", i.value.treatmentPlan = "", i.value.remarks = "", i.value.reportPosition = "", i.value.reportTheme = "", i.value.workOrderRules = null, _.value = !0, x.value = !0, k.value = !0, i.value.reportTheme = N("告警对象").value, g.value = "", h.value = "告警对象位置", b.value = "请输入", i.value.eventTypeId = "", i.value.eventLevelId = null, i.value.timeLimit = "", i.value.interval = 1, p.value = [], d.value = [];
|
|
6206
6210
|
}, ze = (D) => {
|
|
6207
|
-
D == "eventTypeId" && (i.value.eventLevelId = null, oo()), D == "eventLevelId" && ro(), D == "interval" && (u.value.timeLimit = "", i.value.interval == 3 ? (
|
|
6211
|
+
D == "eventTypeId" && (i.value.eventLevelId = null, oo()), D == "eventLevelId" && ro(), D == "interval" && (u.value.timeLimit = "", i.value.interval == 3 ? (f.value = !0, i.value.timeLimit = "") : f.value = !1);
|
|
6208
6212
|
}, ls = async () => {
|
|
6209
6213
|
const [D, P] = await fh().run();
|
|
6210
6214
|
if (D) return {};
|
|
6211
|
-
|
|
6215
|
+
p.value = P, i.value.eventTypeId || (i.value.eventTypeId = P[0] ? P[0].id : null), oo();
|
|
6212
6216
|
}, oo = async () => {
|
|
6213
6217
|
const D = {
|
|
6214
6218
|
eventTypeId: i.value.eventTypeId
|
|
6215
6219
|
}, [P, L] = await hh(D).run();
|
|
6216
6220
|
if (P) return {};
|
|
6217
6221
|
const Pe = { 1: "一级", 2: "二级", 3: "三级", 4: "四级" };
|
|
6218
|
-
|
|
6222
|
+
d.value = L.map((xt) => ({
|
|
6219
6223
|
id: `${xt}`,
|
|
6220
6224
|
name: Pe[xt] ? Pe[xt] : xt
|
|
6221
|
-
})), L.length && !i.value.eventLevelId && (i.value.eventLevelId =
|
|
6225
|
+
})), L.length && !i.value.eventLevelId && (i.value.eventLevelId = d.value[0].id, ro());
|
|
6222
6226
|
}, ro = async () => {
|
|
6223
6227
|
const D = {
|
|
6224
6228
|
eventTypeId: i.value.eventTypeId,
|
|
@@ -6242,13 +6246,13 @@ const th = et(`/api/tool/event-bus/${an}/`), vn = th.post("/publish"), nh = xn.g
|
|
|
6242
6246
|
}
|
|
6243
6247
|
s.value = !1, A.value = L;
|
|
6244
6248
|
for (let Pe = 0; Pe < A.value.length; Pe++)
|
|
6245
|
-
A.value[Pe].id === "createorder" &&
|
|
6249
|
+
A.value[Pe].id === "createorder" && W(), A.value[Pe].id === "createcontingency" && ls();
|
|
6246
6250
|
}, ps = () => {
|
|
6247
6251
|
let D = !0;
|
|
6248
6252
|
if (i.value.processTypeId == "dealwith")
|
|
6249
6253
|
i.value.reason.trim() || (D = !1, u.value.reason = N("必填,最多50个字符/汉字").value), i.value.treatmentPlan.trim() || (D = !1, u.value.treatmentPlan = N("必填,最多50个字符/汉字").value);
|
|
6250
6254
|
else if (i.value.processTypeId == "createorder")
|
|
6251
|
-
|
|
6255
|
+
_.value ? u.value.reportPosition = "" : !i.value.reportPosition && !i.value.customPath ? (D = !1, u.value.reportPosition = N("必填").value) : u.value.reportPosition = "", x.value || i.value.reportTheme ? u.value.reportTheme = "" : (D = !1, u.value.reportTheme = N("必填,最多20个汉字/字符").value), i.value.workOrderRules ? u.value.workOrderRules = "" : (D = !1, u.value.workOrderRules = N("必填").value);
|
|
6252
6256
|
else if (i.value.processTypeId == "createcontingency") {
|
|
6253
6257
|
const P = /^[1-9][0-9]{0,2}$/;
|
|
6254
6258
|
i.value.eventTypeId || (D = !1, u.value.eventTypeId = N("必选").value), i.value.eventLevelId || (D = !1, u.value.eventLevelId = N("必选").value), i.value.interval != 3 && !P.test(i.value.timeLimit) && (D = !1, u.value.timeLimit = N("必填,请输入1~999之间的正整数").value);
|
|
@@ -6268,7 +6272,7 @@ const th = et(`/api/tool/event-bus/${an}/`), vn = th.post("/publish"), nh = xn.g
|
|
|
6268
6272
|
processTypeId: i.value.processTypeId
|
|
6269
6273
|
//处理类型id
|
|
6270
6274
|
};
|
|
6271
|
-
i.value.processTypeId === "createorder" ? (D.path =
|
|
6275
|
+
i.value.processTypeId === "createorder" ? (D.path = _.value ? "" : i.value.customPath, D.topic = x.value ? "" : i.value.reportTheme, D.spaceId = _.value ? "" : i.value.reportPosition ?? "", D.orderId = i.value.workOrderRules) : i.value.processTypeId === "createcontingency" ? (D.eventTypeId = i.value.eventTypeId, D.eventLevelId = i.value.eventLevelId, D.timeLimit = i.value.interval == 3 ? null : Number(i.value.timeLimit), D.interval = i.value.interval) : (D.reason = i.value.reason, D.treatmentPlan = i.value.treatmentPlan, D.remarks = i.value.remarks), s.value = !0, r("emitFn", "startHandle");
|
|
6272
6276
|
const [P, L] = await ch(D, {
|
|
6273
6277
|
params: {
|
|
6274
6278
|
projectId: o.projectId
|
|
@@ -6287,7 +6291,7 @@ const th = et(`/api/tool/event-bus/${an}/`), vn = th.post("/publish"), nh = xn.g
|
|
|
6287
6291
|
return e({
|
|
6288
6292
|
open: gs,
|
|
6289
6293
|
close: ln
|
|
6290
|
-
}), (D, P) => ($(),
|
|
6294
|
+
}), (D, P) => ($(), V("div", mh, [
|
|
6291
6295
|
R(v(Nn), {
|
|
6292
6296
|
modelValue: c.value,
|
|
6293
6297
|
"onUpdate:modelValue": P[31] || (P[31] = (L) => c.value = L),
|
|
@@ -6302,20 +6306,20 @@ const th = et(`/api/tool/event-bus/${an}/`), vn = th.post("/publish"), nh = xn.g
|
|
|
6302
6306
|
}, {
|
|
6303
6307
|
header: B(() => [
|
|
6304
6308
|
ye(
|
|
6305
|
-
|
|
6309
|
+
se(v(N)("告警处理").value),
|
|
6306
6310
|
1
|
|
6307
6311
|
/* TEXT */
|
|
6308
6312
|
)
|
|
6309
6313
|
]),
|
|
6310
6314
|
footer: B(() => [
|
|
6311
6315
|
O("div", bh, [
|
|
6312
|
-
R(v(
|
|
6316
|
+
R(v(Ue), {
|
|
6313
6317
|
size: "middle",
|
|
6314
6318
|
onClick: fs
|
|
6315
6319
|
}, {
|
|
6316
6320
|
default: B(() => [
|
|
6317
6321
|
ye(
|
|
6318
|
-
|
|
6322
|
+
se(v(N)("取消").value),
|
|
6319
6323
|
1
|
|
6320
6324
|
/* TEXT */
|
|
6321
6325
|
)
|
|
@@ -6323,13 +6327,13 @@ const th = et(`/api/tool/event-bus/${an}/`), vn = th.post("/publish"), nh = xn.g
|
|
|
6323
6327
|
_: 1
|
|
6324
6328
|
/* STABLE */
|
|
6325
6329
|
}),
|
|
6326
|
-
R(v(
|
|
6330
|
+
R(v(Ue), {
|
|
6327
6331
|
size: "middle",
|
|
6328
6332
|
onClick: P[29] || (P[29] = (L) => so(1))
|
|
6329
6333
|
}, {
|
|
6330
6334
|
default: B(() => [
|
|
6331
6335
|
ye(
|
|
6332
|
-
|
|
6336
|
+
se(v(N)("结束处理").value),
|
|
6333
6337
|
1
|
|
6334
6338
|
/* TEXT */
|
|
6335
6339
|
)
|
|
@@ -6337,14 +6341,14 @@ const th = et(`/api/tool/event-bus/${an}/`), vn = th.post("/publish"), nh = xn.g
|
|
|
6337
6341
|
_: 1
|
|
6338
6342
|
/* STABLE */
|
|
6339
6343
|
}),
|
|
6340
|
-
R(v(
|
|
6344
|
+
R(v(Ue), {
|
|
6341
6345
|
btnType: "primary",
|
|
6342
6346
|
size: "middle",
|
|
6343
6347
|
onClick: P[30] || (P[30] = (L) => so(2))
|
|
6344
6348
|
}, {
|
|
6345
6349
|
default: B(() => [
|
|
6346
6350
|
ye(
|
|
6347
|
-
|
|
6351
|
+
se(v(N)("继续处理").value),
|
|
6348
6352
|
1
|
|
6349
6353
|
/* TEXT */
|
|
6350
6354
|
)
|
|
@@ -6447,16 +6451,16 @@ const th = et(`/api/tool/event-bus/${an}/`), vn = th.post("/publish"), nh = xn.g
|
|
|
6447
6451
|
props: { disabled: "_disabled", label: "name" },
|
|
6448
6452
|
modelValue: i.value.reportPosition,
|
|
6449
6453
|
"onUpdate:modelValue": P[8] || (P[8] = (L) => i.value.reportPosition = L),
|
|
6450
|
-
path:
|
|
6451
|
-
"onUpdate:path": P[9] || (P[9] = (L) =>
|
|
6452
|
-
keyword:
|
|
6453
|
-
"onUpdate:keyword": P[10] || (P[10] = (L) =>
|
|
6454
|
+
path: g.value,
|
|
6455
|
+
"onUpdate:path": P[9] || (P[9] = (L) => g.value = L),
|
|
6456
|
+
keyword: C.value,
|
|
6457
|
+
"onUpdate:keyword": P[10] || (P[10] = (L) => C.value = L),
|
|
6454
6458
|
showFullPath: !0,
|
|
6455
6459
|
data: y.value,
|
|
6456
|
-
placeholder:
|
|
6457
|
-
disabled:
|
|
6458
|
-
load:
|
|
6459
|
-
search:
|
|
6460
|
+
placeholder: h.value,
|
|
6461
|
+
disabled: I.value,
|
|
6462
|
+
load: S,
|
|
6463
|
+
search: E,
|
|
6460
6464
|
onChange: Ie,
|
|
6461
6465
|
filter: !0,
|
|
6462
6466
|
allowClear: !0
|
|
@@ -6466,20 +6470,20 @@ const th = et(`/api/tool/event-bus/${an}/`), vn = th.post("/publish"), nh = xn.g
|
|
|
6466
6470
|
modelValue: i.value.customPath,
|
|
6467
6471
|
"onUpdate:modelValue": P[11] || (P[11] = (L) => i.value.customPath = L),
|
|
6468
6472
|
placeholder: "选填",
|
|
6469
|
-
disabled:
|
|
6473
|
+
disabled: I.value,
|
|
6470
6474
|
maxlength: "20"
|
|
6471
6475
|
}, null, 8, ["modelValue", "disabled"])
|
|
6472
6476
|
]),
|
|
6473
6477
|
R(v(fo), {
|
|
6474
|
-
modelValue:
|
|
6475
|
-
"onUpdate:modelValue": P[12] || (P[12] = (L) =>
|
|
6478
|
+
modelValue: _.value,
|
|
6479
|
+
"onUpdate:modelValue": P[12] || (P[12] = (L) => _.value = L),
|
|
6476
6480
|
checkboxType: "default",
|
|
6477
6481
|
onChange: Rt,
|
|
6478
6482
|
size: "middle"
|
|
6479
6483
|
}, {
|
|
6480
6484
|
default: B(() => [
|
|
6481
6485
|
ye(
|
|
6482
|
-
|
|
6486
|
+
se(v(N)("告警对象位置").value),
|
|
6483
6487
|
1
|
|
6484
6488
|
/* TEXT */
|
|
6485
6489
|
)
|
|
@@ -6506,11 +6510,11 @@ const th = et(`/api/tool/event-bus/${an}/`), vn = th.post("/publish"), nh = xn.g
|
|
|
6506
6510
|
O("div", yh, [
|
|
6507
6511
|
R(v(po), {
|
|
6508
6512
|
maxlength: "20",
|
|
6509
|
-
disabled:
|
|
6513
|
+
disabled: k.value,
|
|
6510
6514
|
modelValue: i.value.reportTheme,
|
|
6511
6515
|
"onUpdate:modelValue": P[14] || (P[14] = (L) => i.value.reportTheme = L),
|
|
6512
|
-
placeholder:
|
|
6513
|
-
onChange:
|
|
6516
|
+
placeholder: b.value,
|
|
6517
|
+
onChange: ie
|
|
6514
6518
|
}, null, 8, ["disabled", "modelValue", "placeholder"]),
|
|
6515
6519
|
R(v(fo), {
|
|
6516
6520
|
modelValue: x.value,
|
|
@@ -6521,7 +6525,7 @@ const th = et(`/api/tool/event-bus/${an}/`), vn = th.post("/publish"), nh = xn.g
|
|
|
6521
6525
|
}, {
|
|
6522
6526
|
default: B(() => [
|
|
6523
6527
|
ye(
|
|
6524
|
-
|
|
6528
|
+
se(v(N)("告警对象").value),
|
|
6525
6529
|
1
|
|
6526
6530
|
/* TEXT */
|
|
6527
6531
|
)
|
|
@@ -6561,7 +6565,7 @@ const th = et(`/api/tool/event-bus/${an}/`), vn = th.post("/publish"), nh = xn.g
|
|
|
6561
6565
|
"onUpdate:modelValue": P[19] || (P[19] = (L) => i.value.eventTypeId = L),
|
|
6562
6566
|
error: u.value.eventTypeId,
|
|
6563
6567
|
"onUpdate:error": P[20] || (P[20] = (L) => u.value.eventTypeId = L),
|
|
6564
|
-
options:
|
|
6568
|
+
options: p.value,
|
|
6565
6569
|
col: 1,
|
|
6566
6570
|
optionsLabelKey: "typeName",
|
|
6567
6571
|
optionsValueKey: "id",
|
|
@@ -6579,7 +6583,7 @@ const th = et(`/api/tool/event-bus/${an}/`), vn = th.post("/publish"), nh = xn.g
|
|
|
6579
6583
|
"onUpdate:modelValue": P[22] || (P[22] = (L) => i.value.eventLevelId = L),
|
|
6580
6584
|
error: u.value.eventLevelId,
|
|
6581
6585
|
"onUpdate:error": P[23] || (P[23] = (L) => u.value.eventLevelId = L),
|
|
6582
|
-
options:
|
|
6586
|
+
options: d.value,
|
|
6583
6587
|
col: 1,
|
|
6584
6588
|
optionsLabelKey: "name",
|
|
6585
6589
|
optionsValueKey: "id",
|
|
@@ -6614,7 +6618,7 @@ const th = et(`/api/tool/event-bus/${an}/`), vn = th.post("/publish"), nh = xn.g
|
|
|
6614
6618
|
value: "id",
|
|
6615
6619
|
label: "name"
|
|
6616
6620
|
},
|
|
6617
|
-
options:
|
|
6621
|
+
options: m.value,
|
|
6618
6622
|
"border-type": "underline",
|
|
6619
6623
|
size: "small",
|
|
6620
6624
|
"get-popup-container": q,
|
|
@@ -6673,7 +6677,7 @@ const th = et(`/api/tool/event-bus/${an}/`), vn = th.post("/publish"), nh = xn.g
|
|
|
6673
6677
|
}, s = () => {
|
|
6674
6678
|
o("handerDetail", n.msgItem);
|
|
6675
6679
|
};
|
|
6676
|
-
return (a, l) => ($(),
|
|
6680
|
+
return (a, l) => ($(), V(
|
|
6677
6681
|
De,
|
|
6678
6682
|
null,
|
|
6679
6683
|
[
|
|
@@ -6694,7 +6698,7 @@ const th = et(`/api/tool/event-bus/${an}/`), vn = th.post("/publish"), nh = xn.g
|
|
|
6694
6698
|
O(
|
|
6695
6699
|
"div",
|
|
6696
6700
|
Ph,
|
|
6697
|
-
|
|
6701
|
+
se(v(N)("新告警").value),
|
|
6698
6702
|
1
|
|
6699
6703
|
/* TEXT */
|
|
6700
6704
|
)
|
|
@@ -6709,7 +6713,7 @@ const th = et(`/api/tool/event-bus/${an}/`), vn = th.post("/publish"), nh = xn.g
|
|
|
6709
6713
|
O(
|
|
6710
6714
|
"div",
|
|
6711
6715
|
Mh,
|
|
6712
|
-
|
|
6716
|
+
se(v(N)("告警等级:").value),
|
|
6713
6717
|
1
|
|
6714
6718
|
/* TEXT */
|
|
6715
6719
|
),
|
|
@@ -6719,7 +6723,7 @@ const th = et(`/api/tool/event-bus/${an}/`), vn = th.post("/publish"), nh = xn.g
|
|
|
6719
6723
|
class: "alarm-msg-line-right alarm-content-object",
|
|
6720
6724
|
style: yn({ color: a.msgItem.color })
|
|
6721
6725
|
},
|
|
6722
|
-
|
|
6726
|
+
se(a.msgItem.alarmLevelName || ""),
|
|
6723
6727
|
5
|
|
6724
6728
|
/* TEXT, STYLE */
|
|
6725
6729
|
)
|
|
@@ -6728,14 +6732,14 @@ const th = et(`/api/tool/event-bus/${an}/`), vn = th.post("/publish"), nh = xn.g
|
|
|
6728
6732
|
O(
|
|
6729
6733
|
"div",
|
|
6730
6734
|
Bh,
|
|
6731
|
-
|
|
6735
|
+
se(v(N)("告警对象:").value),
|
|
6732
6736
|
1
|
|
6733
6737
|
/* TEXT */
|
|
6734
6738
|
),
|
|
6735
6739
|
O(
|
|
6736
6740
|
"div",
|
|
6737
6741
|
Rh,
|
|
6738
|
-
|
|
6742
|
+
se(a.msgItem.equipmentName || ""),
|
|
6739
6743
|
1
|
|
6740
6744
|
/* TEXT */
|
|
6741
6745
|
)
|
|
@@ -6744,20 +6748,20 @@ const th = et(`/api/tool/event-bus/${an}/`), vn = th.post("/publish"), nh = xn.g
|
|
|
6744
6748
|
O(
|
|
6745
6749
|
"div",
|
|
6746
6750
|
Qh,
|
|
6747
|
-
|
|
6751
|
+
se(v(N)("告警内容:").value),
|
|
6748
6752
|
1
|
|
6749
6753
|
/* TEXT */
|
|
6750
6754
|
),
|
|
6751
6755
|
O(
|
|
6752
6756
|
"div",
|
|
6753
6757
|
jh,
|
|
6754
|
-
|
|
6758
|
+
se(a.msgItem.alarmContent || ""),
|
|
6755
6759
|
1
|
|
6756
6760
|
/* TEXT */
|
|
6757
6761
|
)
|
|
6758
6762
|
]),
|
|
6759
6763
|
O("div", Nh, [
|
|
6760
|
-
a.msgItem.equipmentCode && a.msgItem.equipmentPanelCode ? ($(), F(v(
|
|
6764
|
+
a.msgItem.equipmentCode && a.msgItem.equipmentPanelCode ? ($(), F(v(Ue), {
|
|
6761
6765
|
key: 0,
|
|
6762
6766
|
block: "",
|
|
6763
6767
|
onClick: ue(s, ["stop"]),
|
|
@@ -6766,7 +6770,7 @@ const th = et(`/api/tool/event-bus/${an}/`), vn = th.post("/publish"), nh = xn.g
|
|
|
6766
6770
|
}, {
|
|
6767
6771
|
default: B(() => [
|
|
6768
6772
|
ye(
|
|
6769
|
-
|
|
6773
|
+
se(v(N)("设备详情").value),
|
|
6770
6774
|
1
|
|
6771
6775
|
/* TEXT */
|
|
6772
6776
|
)
|
|
@@ -6774,7 +6778,7 @@ const th = et(`/api/tool/event-bus/${an}/`), vn = th.post("/publish"), nh = xn.g
|
|
|
6774
6778
|
_: 1
|
|
6775
6779
|
/* STABLE */
|
|
6776
6780
|
})) : j("v-if", !0),
|
|
6777
|
-
a.alarmhandle ? ($(), F(v(
|
|
6781
|
+
a.alarmhandle ? ($(), F(v(Ue), {
|
|
6778
6782
|
key: 1,
|
|
6779
6783
|
block: "",
|
|
6780
6784
|
btnType: "primary-text",
|
|
@@ -6783,7 +6787,7 @@ const th = et(`/api/tool/event-bus/${an}/`), vn = th.post("/publish"), nh = xn.g
|
|
|
6783
6787
|
}, {
|
|
6784
6788
|
default: B(() => [
|
|
6785
6789
|
ye(
|
|
6786
|
-
|
|
6790
|
+
se(v(N)("处理").value),
|
|
6787
6791
|
1
|
|
6788
6792
|
/* TEXT */
|
|
6789
6793
|
)
|
|
@@ -6810,7 +6814,7 @@ let Fh = (t = 21) => {
|
|
|
6810
6814
|
return e;
|
|
6811
6815
|
};
|
|
6812
6816
|
const Vh = () => {
|
|
6813
|
-
const t =
|
|
6817
|
+
const t = T(null), e = T(0), n = T(null), o = T(null), r = T([]), s = T([]), a = T(!1), l = T(!1), c = T(!1), i = T({
|
|
6814
6818
|
playId: "",
|
|
6815
6819
|
// 播放的告警的recordId
|
|
6816
6820
|
playPath: "",
|
|
@@ -6826,97 +6830,97 @@ const Vh = () => {
|
|
|
6826
6830
|
loop: !1
|
|
6827
6831
|
// 轮播-无限次播放
|
|
6828
6832
|
});
|
|
6829
|
-
|
|
6830
|
-
const { isRealTimeAlarm:
|
|
6831
|
-
|
|
6833
|
+
le.addEventListenerFromMicroApp("alarm:change-alarmconfig", (E) => {
|
|
6834
|
+
const { isRealTimeAlarm: k, audioPlay: x } = E.data;
|
|
6835
|
+
k != null && (l.value = k), x != null && (c.value = x, c.value || C());
|
|
6832
6836
|
});
|
|
6833
|
-
const u = (
|
|
6837
|
+
const u = (E) => {
|
|
6834
6838
|
var x;
|
|
6835
|
-
const
|
|
6836
|
-
|
|
6837
|
-
}, { entryApp:
|
|
6838
|
-
gr(
|
|
6839
|
-
}, { handleAlarmVue:
|
|
6839
|
+
const k = [];
|
|
6840
|
+
k.push({ alarmId: E.recordId }), r.value = k, (x = n.value) == null || x.open();
|
|
6841
|
+
}, { entryApp: f } = qt.hooks.useEntryApp(), p = (E) => {
|
|
6842
|
+
gr(E.equipmentCode, E.equipmentPanelCode);
|
|
6843
|
+
}, { handleAlarmVue: d } = Th(n, r), m = async () => {
|
|
6840
6844
|
var x;
|
|
6841
|
-
const
|
|
6842
|
-
|
|
6843
|
-
}, A = [],
|
|
6844
|
-
if (A.push(
|
|
6845
|
-
|
|
6845
|
+
const k = (((x = J().appcategorys) == null ? void 0 : x.map((Q) => Q.apps).flat()) ?? []).find((Q) => Q.code === "alarm");
|
|
6846
|
+
k && f({ microApp: k, menuPath: `/${k.routeUrl}/realTimeAlarm` });
|
|
6847
|
+
}, A = [], g = (E) => {
|
|
6848
|
+
if (A.push(E), s.value.length < 2) {
|
|
6849
|
+
h(A[0]), A.shift();
|
|
6846
6850
|
return;
|
|
6847
6851
|
}
|
|
6848
|
-
},
|
|
6849
|
-
if (!
|
|
6850
|
-
const
|
|
6852
|
+
}, h = (E) => {
|
|
6853
|
+
if (!E) return;
|
|
6854
|
+
const k = Fh();
|
|
6851
6855
|
Wt.open({
|
|
6852
|
-
key:
|
|
6856
|
+
key: k,
|
|
6853
6857
|
class: "alarm-notify",
|
|
6854
6858
|
message: N("新告警").value,
|
|
6855
6859
|
placement: "bottomRight",
|
|
6856
6860
|
description: he(Uh, {
|
|
6857
|
-
msgItem:
|
|
6861
|
+
msgItem: E,
|
|
6858
6862
|
alarmhandle: a.value,
|
|
6859
|
-
onHanderDetail:
|
|
6863
|
+
onHanderDetail: p,
|
|
6860
6864
|
onHanderFn: u
|
|
6861
6865
|
}),
|
|
6862
6866
|
duration: 5,
|
|
6863
6867
|
onClick: () => {
|
|
6864
|
-
|
|
6868
|
+
m();
|
|
6865
6869
|
},
|
|
6866
6870
|
onClose: () => {
|
|
6867
6871
|
setTimeout(() => {
|
|
6868
|
-
const x = s.value.findIndex((Q) => Q ==
|
|
6872
|
+
const x = s.value.findIndex((Q) => Q == k);
|
|
6869
6873
|
if (x >= 0 && s.value.splice(x, 1), s.value.length < 2 && A.length) {
|
|
6870
|
-
|
|
6874
|
+
h(A[0]), A.shift();
|
|
6871
6875
|
return;
|
|
6872
6876
|
}
|
|
6873
6877
|
}, 300);
|
|
6874
6878
|
}
|
|
6875
|
-
}), s.value.includes(
|
|
6876
|
-
},
|
|
6877
|
-
if (
|
|
6879
|
+
}), s.value.includes(k) || s.value.push(k), b(E);
|
|
6880
|
+
}, b = (E) => {
|
|
6881
|
+
if (E) {
|
|
6878
6882
|
if (!c.value) {
|
|
6879
|
-
|
|
6883
|
+
C();
|
|
6880
6884
|
return;
|
|
6881
6885
|
}
|
|
6882
|
-
if (!
|
|
6886
|
+
if (!E.coverId) {
|
|
6883
6887
|
if (i.value.playLine === null) {
|
|
6884
|
-
|
|
6888
|
+
C(), Number(E.noticeNum) != 0 && y(E);
|
|
6885
6889
|
return;
|
|
6886
6890
|
}
|
|
6887
|
-
Number(
|
|
6891
|
+
Number(E.alarmLevelId) < i.value.playLine && (C(), Number(E.noticeNum) != 0 && y(E));
|
|
6888
6892
|
}
|
|
6889
6893
|
}
|
|
6890
|
-
}, y = (
|
|
6891
|
-
const
|
|
6892
|
-
i.value.isplay && i.value.playId ==
|
|
6893
|
-
}, w = () => {
|
|
6894
|
-
i.value.playId = "", i.value.playPath = "", i.value.playLine = null, i.value.loopCount = 0, i.value.loopTotalCount = 0, i.value.isplay = !1, i.value.loop = !1;
|
|
6894
|
+
}, y = (E) => {
|
|
6895
|
+
const k = Number(E.noticeNum), x = location.origin + "/oss";
|
|
6896
|
+
i.value.isplay && i.value.playId == E.recordId ? C() : (k < 0 ? i.value.loop = !0 : i.value.loop = !1, k > 0 ? (i.value.loopTotalCount = Number(E.noticeNum), i.value.loopCount = 0) : (i.value.loopTotalCount = 0, i.value.loopCount = 0), i.value.isplay = !0, i.value.playId = E.recordId, i.value.playLine = Number(E.alarmLevelId), i.value.playPath = x + E.noticePath, I());
|
|
6895
6897
|
}, C = () => {
|
|
6898
|
+
i.value.playId = "", i.value.playPath = "", i.value.playLine = null, i.value.loopCount = 0, i.value.loopTotalCount = 0, i.value.isplay = !1, i.value.loop = !1;
|
|
6899
|
+
}, I = () => {
|
|
6896
6900
|
o.value.onended = function() {
|
|
6897
6901
|
i.value.loopCount = i.value.loopCount + 1, i.value.loopTotalCount && i.value.loopTotalCount && (i.value.loopCount == i.value.loopTotalCount ? (i.value.playPath = "", i.value.isplay = !1, i.value.playId = "", i.value.loopTotalCount = 0, i.value.loopCount = 0, i.value.playLine = null) : o.value.play());
|
|
6898
6902
|
};
|
|
6899
|
-
},
|
|
6900
|
-
const [
|
|
6901
|
-
|
|
6903
|
+
}, _ = async () => {
|
|
6904
|
+
const [E, k] = await lh().run();
|
|
6905
|
+
E || (c.value = k.isEnable);
|
|
6902
6906
|
};
|
|
6903
6907
|
return {
|
|
6904
6908
|
alarmSocket: t,
|
|
6905
6909
|
alarmCount: e,
|
|
6906
6910
|
audioObj: i,
|
|
6907
6911
|
audioAlarmRef: o,
|
|
6908
|
-
handleAlarmVue:
|
|
6912
|
+
handleAlarmVue: d,
|
|
6909
6913
|
creatAlarmSocket: async () => {
|
|
6910
|
-
|
|
6911
|
-
const [
|
|
6914
|
+
_();
|
|
6915
|
+
const [E, k] = await sh().run({
|
|
6912
6916
|
code: "alarm",
|
|
6913
6917
|
showBtn: !0
|
|
6914
6918
|
});
|
|
6915
|
-
if (
|
|
6919
|
+
if (E || !k || !k.length) return;
|
|
6916
6920
|
let x = !1;
|
|
6917
|
-
|
|
6918
|
-
Q.code === "alarm.realTimeAlarm" && (x = !0, Q.children && Q.children.length ? Q.children.forEach((
|
|
6919
|
-
|
|
6921
|
+
k.forEach((Q) => {
|
|
6922
|
+
Q.code === "alarm.realTimeAlarm" && (x = !0, Q.children && Q.children.length ? Q.children.forEach((W) => {
|
|
6923
|
+
W.code == "alarm.realTimeAlarm.handle" ? a.value = !0 : a.value = !1;
|
|
6920
6924
|
}) : a.value = !1);
|
|
6921
6925
|
}), x && (t.value = new Hn({
|
|
6922
6926
|
url: "/api/alarm/socket/v1/record/subscribe",
|
|
@@ -6926,7 +6930,7 @@ const Vh = () => {
|
|
|
6926
6930
|
Q && t.value.send(Q);
|
|
6927
6931
|
},
|
|
6928
6932
|
message: async (Q) => {
|
|
6929
|
-
|
|
6933
|
+
le.sendMessageToMicroApp("enterpriseadmin/alarm", "alarmmessage", { alarmMessage: Q }), window.self === window.top && (Q.messageType === "ADD" && (e.value = e.value + 1, Q.coverId || g(Q)), Q.messageType === "DELETE" && (e.value = e.value - 1, i.value.playId == Q.recordId && C()));
|
|
6930
6934
|
}
|
|
6931
6935
|
}));
|
|
6932
6936
|
}
|
|
@@ -6939,7 +6943,7 @@ const Vh = () => {
|
|
|
6939
6943
|
await en(), n();
|
|
6940
6944
|
}), Zt(() => {
|
|
6941
6945
|
e.value && e.value.disconnect(), e.value = null;
|
|
6942
|
-
}), (a, l) => ($(),
|
|
6946
|
+
}), (a, l) => ($(), V(
|
|
6943
6947
|
De,
|
|
6944
6948
|
null,
|
|
6945
6949
|
[
|
|
@@ -6961,19 +6965,19 @@ const Vh = () => {
|
|
|
6961
6965
|
}), qh = { class: "das-main-app-container" }, Jh = /* @__PURE__ */ ne({
|
|
6962
6966
|
__name: "index",
|
|
6963
6967
|
setup(t) {
|
|
6964
|
-
const { isFullscreen: e } = ht(), n = H(() => !e.value), o = H(() =>
|
|
6968
|
+
const { isFullscreen: e } = ht(), n = H(() => !e.value), o = H(() => ce.excludeRoutes), r = H(() => ce.routeKeepAliveVisible), s = H(() => ({ mode: Gt.value === 1 ? "vertical" : "inline" })), { initNextTick: a } = dp(), { innerPage: l, commandList: c, initNextTick: i } = pp(a);
|
|
6965
6969
|
Ap(l, a, i), vp(), gp(), wp();
|
|
6966
|
-
const { $changePwd: u, $personSetDialog:
|
|
6970
|
+
const { $changePwd: u, $personSetDialog: f } = yp(), { changeEnterprisesVisible: p, userId: d, tenantId: m, changeEnterprise: A } = os();
|
|
6967
6971
|
hp();
|
|
6968
|
-
const { fontColor:
|
|
6969
|
-
return Pp(), Lp(c), $p(), Mp(), pf(), oh(), (y,
|
|
6972
|
+
const { fontColor: g, backgroudColor: h, borderColor: b } = mp();
|
|
6973
|
+
return Pp(), Lp(c), $p(), Mp(), pf(), oh(), (y, C) => ($(), V("div", qh, [
|
|
6970
6974
|
R(v(Ci), { platformInitNextTick: v(a) }, {
|
|
6971
6975
|
default: B(() => [
|
|
6972
6976
|
R(_i, {
|
|
6973
6977
|
showLayout: n.value,
|
|
6974
6978
|
excludeRoutes: o.value,
|
|
6975
6979
|
routeKeepAliveVisible: r.value,
|
|
6976
|
-
tabsAttr: { fontColor: v(
|
|
6980
|
+
tabsAttr: { fontColor: v(g), backgroudColor: v(h), borderColor: v(b) },
|
|
6977
6981
|
menuAttr: s.value
|
|
6978
6982
|
}, null, 8, ["showLayout", "excludeRoutes", "routeKeepAliveVisible", "tabsAttr", "menuAttr"])
|
|
6979
6983
|
]),
|
|
@@ -6982,10 +6986,10 @@ const Vh = () => {
|
|
|
6982
6986
|
}, 8, ["platformInitNextTick"]),
|
|
6983
6987
|
j(" 切换租户 "),
|
|
6984
6988
|
R(v(xs), {
|
|
6985
|
-
visible: v(
|
|
6986
|
-
"onUpdate:visible":
|
|
6987
|
-
userId: v(
|
|
6988
|
-
tenantId: v(
|
|
6989
|
+
visible: v(p),
|
|
6990
|
+
"onUpdate:visible": C[0] || (C[0] = (I) => Ss(p) ? p.value = I : null),
|
|
6991
|
+
userId: v(d),
|
|
6992
|
+
tenantId: v(m),
|
|
6989
6993
|
onConfirm: v(A)
|
|
6990
6994
|
}, null, 8, ["visible", "userId", "tenantId", "onConfirm"]),
|
|
6991
6995
|
j(" 修改密码 "),
|
|
@@ -7004,7 +7008,7 @@ const Vh = () => {
|
|
|
7004
7008
|
v(cp),
|
|
7005
7009
|
{
|
|
7006
7010
|
ref_key: "$personSetDialog",
|
|
7007
|
-
ref:
|
|
7011
|
+
ref: f
|
|
7008
7012
|
},
|
|
7009
7013
|
null,
|
|
7010
7014
|
512
|
|
@@ -7015,19 +7019,19 @@ const Vh = () => {
|
|
|
7015
7019
|
]));
|
|
7016
7020
|
}
|
|
7017
7021
|
}), Kh = /* @__PURE__ */ Ce(Jh, [["__scopeId", "data-v-6e85c13f"]]);
|
|
7018
|
-
|
|
7022
|
+
T("@das-fed/web");
|
|
7019
7023
|
const Gh = [
|
|
7020
7024
|
{
|
|
7021
|
-
path:
|
|
7022
|
-
component: () => import("./index-
|
|
7025
|
+
path: je,
|
|
7026
|
+
component: () => import("./index-CicbdbyR.js")
|
|
7023
7027
|
},
|
|
7024
7028
|
{
|
|
7025
7029
|
path: ct,
|
|
7026
|
-
component: () => import("./index-
|
|
7030
|
+
component: () => import("./index-C8k4wrGJ.js")
|
|
7027
7031
|
},
|
|
7028
7032
|
{
|
|
7029
7033
|
path: Tr,
|
|
7030
|
-
component: () => import("./index-
|
|
7034
|
+
component: () => import("./index-C-ieIBXO.js")
|
|
7031
7035
|
}
|
|
7032
7036
|
], im = {
|
|
7033
7037
|
routes: Gh,
|
|
@@ -7061,7 +7065,7 @@ export {
|
|
|
7061
7065
|
Wg as i,
|
|
7062
7066
|
qg as j,
|
|
7063
7067
|
Jg as k,
|
|
7064
|
-
|
|
7068
|
+
ce as l,
|
|
7065
7069
|
Jt as m,
|
|
7066
7070
|
Kg as n,
|
|
7067
7071
|
Gg as o,
|