@das-fed/web 7.0.2 → 7.0.4

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.
@@ -1,5 +1,5 @@
1
1
  import { createElementBlock as e, openBlock as r } from "vue";
2
- import { _ as c } from "./index-Clm5tnM_.js";
2
+ import { _ as c } from "./index-U_sgAS6j.js";
3
3
  const o = {};
4
4
  function t(n, _) {
5
5
  return r(), e("div");
@@ -6,71 +6,72 @@ import { DasSpin as x } from "@das-fed/ui/packages/components/spin/index";
6
6
  import { getTabInfo as T } from "@das-fed/utils/common-info";
7
7
  import { setShowLayout as b } from "@das-fed/utils/common-tools";
8
8
  import { createService as E } from "@das-fed/utils/create-api-service";
9
- import { u as L, p as P, a as u, c as f, b as q, l as B, g as K, d as M } from "./index-Clm5tnM_.js";
9
+ import { u as L, p as P, a as u, c as f, b as q, l as B, g as K, d as M } from "./index-U_sgAS6j.js";
10
10
  const N = "v1", O = E(`/api/justauth/client/${N}`), V = O.get("/visitor/kingdee/auth/user/auth_code"), z = /* @__PURE__ */ k({
11
11
  __name: "index",
12
12
  setup(F) {
13
- const { beforeEntryApp: d, entryApp: g } = L(), h = p(() => P.value.skinStyle), m = p(() => !!j.menu.items.length), w = p(() => {
13
+ const { beforeEntryApp: d, entryApp: g } = L(), m = p(() => P.value.skinStyle), h = p(() => !!j.menu.items.length), w = p(() => {
14
14
  if (!u.value || !u.value.length) return [];
15
- const t = f(u.value);
16
- return Array.isArray(t) ? t.length ? (t.forEach((r) => {
15
+ const o = f(u.value);
16
+ return Array.isArray(o) ? o.length ? (o.forEach((r) => {
17
17
  r.apps = y(
18
- r.apps.filter((o) => (o == null ? void 0 : o.code) && o.code !== "dasaiassistant"),
18
+ r.apps,
19
+ // element.apps.filter((item: any) => item?.code && item.code !== 'dasaiassistant'),
19
20
  4
20
21
  );
21
- }), t) : [] : [];
22
- }), y = (t, r) => {
23
- const o = [];
24
- for (let a = 0; a < t.length; a += r)
25
- o.push(t.slice(a, a + r));
26
- return o;
27
- }, _ = async (t) => {
28
- if (!t) return;
22
+ }), o) : [] : [];
23
+ }), y = (o, r) => {
24
+ const t = [];
25
+ for (let a = 0; a < o.length; a += r)
26
+ t.push(o.slice(a, a + r));
27
+ return t;
28
+ }, _ = async (o) => {
29
+ if (!o) return;
29
30
  if (!sessionStorage.getItem("projectInfo")) {
30
31
  window.confirm(D("系统资源更新,请刷新系统")) && (window.__isAutoCloseApp = !1, window.location.reload());
31
32
  return;
32
33
  }
33
- const o = f(t);
34
- if (B.innerSet = !0, o.routeUrl) {
35
- if (t.code === "Ioc") {
36
- window.open(o.routeUrl, "_blank");
34
+ const t = f(o);
35
+ if (B.innerSet = !0, t.routeUrl) {
36
+ if (o.code === "Ioc") {
37
+ window.open(t.routeUrl, "_blank");
37
38
  return;
38
39
  }
39
- if (t.code === "wojiacloud") {
40
+ if (o.code === "wojiacloud") {
40
41
  const e = sessionStorage.getItem("kingdee_token") || "";
41
42
  if (e) {
42
- const [n, s] = await V().run({ accessToken: e });
43
- if (s) {
44
- const i = (s == null ? void 0 : s.auth_code) ?? "";
45
- o.routeUrl = o.routeUrl.includes("?") ? `${o.routeUrl}&code=${i}` : `${o.routeUrl}?code=${i}`;
43
+ const [n, i] = await V().run({ accessToken: e });
44
+ if (i) {
45
+ const s = (i == null ? void 0 : i.auth_code) ?? "";
46
+ t.routeUrl = t.routeUrl.includes("?") ? `${t.routeUrl}&code=${s}` : `${t.routeUrl}?code=${s}`;
46
47
  }
47
48
  }
48
49
  }
49
50
  }
50
- const a = (t == null ? void 0 : t.openType) ?? 1, l = (t == null ? void 0 : t.type) ?? 1;
51
+ const a = (o == null ? void 0 : o.openType) ?? 1, l = (o == null ? void 0 : o.type) ?? 1;
51
52
  if (a === 1) {
52
- if (!await d(t)) return;
53
- const n = T().preTab[t.code], s = (n == null ? void 0 : n.code) ?? "", i = { ...(n == null ? void 0 : n.query) ?? {} };
54
- g({ microApp: o, menuCode: s, route: { query: i } });
53
+ if (!await d(o)) return;
54
+ const n = T().preTab[o.code], i = (n == null ? void 0 : n.code) ?? "", s = { ...(n == null ? void 0 : n.query) ?? {} };
55
+ g({ microApp: t, menuCode: i, route: { query: s } });
55
56
  }
56
- if (a === 2 && o.routeUrl) {
57
+ if (a === 2 && t.routeUrl) {
57
58
  let e = "";
58
59
  if (l === 1)
59
- e = o != null && o.applicationPath ? location.origin + "/" + o.applicationPath + o.routeUrl : location.origin + o.routeUrl, e = b(e);
60
+ e = t != null && t.applicationPath ? location.origin + "/" + t.applicationPath + t.routeUrl : location.origin + t.routeUrl, e = b(e);
60
61
  else if (l === 2) {
61
- const n = await K(o.routeUrl, (o == null ? void 0 : o.param) ?? []);
62
+ const n = await K(t.routeUrl, (t == null ? void 0 : t.param) ?? []);
62
63
  e = M(n);
63
64
  }
64
65
  window.open(e, "_blank");
65
66
  }
66
67
  };
67
- return (t, r) => v((C(), U(c(x), {
68
+ return (o, r) => v((C(), U(c(x), {
68
69
  full: "",
69
70
  spinning: c(q)
70
71
  }, {
71
72
  default: A(() => [
72
73
  S(c($), {
73
- theme: h.value,
74
+ theme: m.value,
74
75
  appCategorys: w.value,
75
76
  onOpenApp: _
76
77
  }, null, 8, ["theme", "appCategorys"])
@@ -78,7 +79,7 @@ const N = "v1", O = E(`/api/justauth/client/${N}`), V = O.get("/visitor/kingdee/
78
79
  _: 1
79
80
  /* STABLE */
80
81
  }, 8, ["spinning"])), [
81
- [I, !m.value]
82
+ [I, !h.value]
82
83
  ]);
83
84
  }
84
85
  });
Binary file