@since2006/pages 1.0.0-build.2025011700 → 2025.8.1

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.
Files changed (39) hide show
  1. package/dist/es/index.js +10 -8
  2. package/dist/es/src/app/module/ModuleAdd.vue.js +7 -0
  3. package/dist/es/src/app/module/ModuleAdd.vue2.js +280 -0
  4. package/dist/es/src/app/module/ModuleDetail.vue.js +133 -0
  5. package/dist/es/src/app/module/ModuleDetail.vue2.js +4 -0
  6. package/dist/es/src/app/module/ModuleEdit.vue.js +7 -0
  7. package/dist/es/src/app/module/ModuleEdit.vue2.js +283 -0
  8. package/dist/es/src/app/module/ModuleIndex.vue.js +218 -0
  9. package/dist/es/src/app/module/ModuleIndex.vue2.js +4 -0
  10. package/dist/es/src/app/module/api.js +14 -0
  11. package/dist/es/src/app/module/icon/IconSelectorModal.vue.js +7 -0
  12. package/dist/es/src/app/module/icon/IconSelectorModal.vue2.js +39 -0
  13. package/dist/es/src/app/module/index.js +9 -0
  14. package/dist/es/src/app/module/utils.js +11 -0
  15. package/dist/es/src/app/system/StatusIndex.vue.js +2 -2
  16. package/dist/es/src/app/system/StatusIndex.vue2.js +253 -160
  17. package/dist/es/src/app/system/api.js +3 -2
  18. package/dist/es/src/index.js +4 -2
  19. package/dist/es/style.css +1 -1
  20. package/dist/lib/index.js +1 -1
  21. package/dist/lib/src/app/module/ModuleAdd.vue.js +1 -0
  22. package/dist/lib/src/app/module/ModuleAdd.vue2.js +1 -0
  23. package/dist/lib/src/app/module/ModuleDetail.vue.js +1 -0
  24. package/dist/lib/src/app/module/ModuleDetail.vue2.js +1 -0
  25. package/dist/lib/src/app/module/ModuleEdit.vue.js +1 -0
  26. package/dist/lib/src/app/module/ModuleEdit.vue2.js +1 -0
  27. package/dist/lib/src/app/module/ModuleIndex.vue.js +1 -0
  28. package/dist/lib/src/app/module/ModuleIndex.vue2.js +1 -0
  29. package/dist/lib/src/app/module/api.js +1 -0
  30. package/dist/lib/src/app/module/icon/IconSelectorModal.vue.js +1 -0
  31. package/dist/lib/src/app/module/icon/IconSelectorModal.vue2.js +1 -0
  32. package/dist/lib/src/app/module/index.js +1 -0
  33. package/dist/lib/src/app/module/utils.js +1 -0
  34. package/dist/lib/src/app/system/StatusIndex.vue.js +1 -1
  35. package/dist/lib/src/app/system/StatusIndex.vue2.js +1 -1
  36. package/dist/lib/src/app/system/api.js +1 -1
  37. package/dist/lib/src/index.js +1 -1
  38. package/dist/lib/style.css +1 -1
  39. package/package.json +2 -1
@@ -1,62 +1,83 @@
1
- import { defineComponent as k, ref as V, reactive as d, resolveComponent as g, openBlock as w, createBlock as C, withCtx as o, createVNode as n, createElementVNode as t, toDisplayString as l } from "vue";
2
- import { getStatus as I } from "./api.js";
3
- const O = { class: "large-text" }, M = { class: "float-right" }, z = { style: { "margin-right": "18px", "margin-bottom": "14px" } }, D = { class: "large-text" }, T = { class: "float-right" }, J = { class: "large-text" }, N = { class: "float-right" }, P = { class: "large-text" }, A = { class: "float-right" }, B = { class: "large-text" }, H = { class: "float-right" }, E = { class: "large-text" }, U = { class: "float-right" }, W = { class: "large-text" }, X = { class: "float-right" }, q = { class: "large-text" }, F = { class: "float-right" }, G = { class: "large-text" }, K = { class: "float-right" }, L = { class: "large-text" }, Q = { class: "float-right" }, R = { class: "large-text" }, Y = { class: "float-right" }, Z = { class: "large-text" }, $ = { class: "float-right" }, h = { class: "large-text" }, c = { class: "float-right" }, ss = { class: "large-text" }, ts = { class: "float-right" }, ls = { class: "large-text" }, ns = { class: "float-right" }, os = { class: "large-text" }, as = { class: "float-right" }, is = { class: "large-text" }, es = { class: "float-right" }, rs = { class: "large-text" }, ds = { class: "float-right" }, us = { class: "large-text" }, ps = { class: "float-right" }, gs = { class: "large-text" }, fs = { class: "float-right" }, vs = { class: "large-text" }, xs = { class: "float-right" }, _s = { class: "large-text" }, ms = { class: "float-right" }, bs = { class: "large-text" }, ys = { class: "float-right" }, js = { class: "large-text" }, Ss = { class: "float-right" }, ks = { class: "large-text" }, Vs = { class: "float-right" }, ws = { class: "large-text" }, Cs = { class: "float-right" }, Is = { class: "large-text" }, Os = { class: "float-right" }, Ms = { class: "large-text" }, zs = { class: "float-right" }, Ds = { class: "large-text" }, Ts = { class: "float-right" }, Bs = /* @__PURE__ */ k({
1
+ import { defineComponent as D, ref as h, reactive as g, resolveComponent as d, openBlock as y, createBlock as C, withCtx as o, createVNode as n, createElementVNode as s, toDisplayString as l, unref as j, h as U, createTextVNode as I, createElementBlock as V, Fragment as B } from "vue";
2
+ import { getMachineCode as $, getStatus as E } from "./api.js";
3
+ import { notification as S } from "ant-design-vue";
4
+ import { CloudUploadOutlined as H } from "@ant-design/icons-vue";
5
+ import { getContextPath as X, getToken as F } from "@since2006/utils";
6
+ const W = { class: "large-text" }, q = { class: "float-right" }, G = { style: { "margin-right": "18px", "margin-bottom": "14px" } }, K = { class: "large-text" }, Q = { class: "float-right" }, R = { class: "large-text" }, Y = { class: "float-right" }, Z = { class: "large-text" }, c = { class: "float-right" }, tt = { class: "large-text" }, st = { class: "float-right" }, lt = { class: "large-text" }, nt = { class: "float-right" }, ot = { class: "large-text" }, et = { class: "float-right" }, at = { class: "large-text" }, it = { class: "float-right" }, rt = { class: "large-text" }, dt = { class: "float-right" }, ut = { class: "large-text" }, pt = { class: "float-right" }, gt = { class: "large-text" }, ft = { class: "float-right" }, mt = { class: "large-text" }, vt = { class: "float-right" }, xt = { class: "large-text" }, _t = { class: "float-right" }, bt = { class: "large-text" }, yt = { class: "float-right" }, kt = { class: "large-text" }, wt = { class: "float-right" }, Ct = { class: "large-text" }, jt = { class: "float-right" }, St = { class: "large-text" }, Ot = { class: "float-right" }, ht = { class: "large-text" }, It = { class: "float-right" }, Vt = { class: "large-text" }, Tt = { class: "float-right" }, Mt = { class: "large-text" }, Nt = { class: "float-right" }, Jt = { class: "large-text" }, zt = { class: "float-right" }, At = { class: "large-text" }, Lt = { class: "float-right" }, Pt = { class: "large-text" }, Dt = { class: "float-right" }, Ut = { class: "large-text" }, Bt = { class: "float-right" }, $t = { class: "large-text" }, Et = { class: "float-right" }, Ht = { class: "large-text" }, Xt = { class: "float-right" }, Ft = {
7
+ class: "large-text",
8
+ style: { color: "orangered", "font-weight": "bold" }
9
+ }, Wt = { class: "float-right" }, qt = { class: "large-text" }, Gt = { class: "float-right" }, Kt = { class: "large-text" }, Qt = { class: "float-right" }, Rt = { class: "large-text" }, Yt = { class: "float-right" }, Zt = { class: "float-right" }, ct = {
10
+ key: 1,
11
+ class: "float-right"
12
+ }, ts = { class: "large-text" }, ss = { class: "float-right" }, ls = { class: "large-text" }, ns = { class: "float-right" }, os = { class: "large-text" }, es = { class: "float-right" }, as = { class: "large-text" }, is = { class: "float-right" }, ms = /* @__PURE__ */ D({
4
13
  __name: "StatusIndex",
5
- setup(Js) {
6
- const e = V(!1), r = d({}), u = d({}), i = d({}), a = d({}), m = d({}), p = d({}), f = d({});
7
- return (async () => {
8
- var s;
9
- e.value = !0;
10
- const b = await I();
11
- b.code === 200 && (Object.assign(r, b.result), Object.assign(u, r.license), Object.assign(i, r.database), Object.assign(a, r.jvm), Object.assign(m, r.os), Object.assign(p, r.app), Object.assign(f, (s = r.jvm) == null ? void 0 : s.thread)), e.value = !1;
12
- })(), (b, s) => {
13
- const j = g("a-progress"), v = g("a-skeleton"), x = g("a-card"), _ = g("a-col"), y = g("a-typography-text"), S = g("a-row");
14
- return w(), C(S, { gutter: 16 }, {
14
+ setup(rs) {
15
+ const T = X(), M = F(), u = h(!1), w = h(), p = g({}), e = g({}), r = g({}), a = g({}), k = g({}), f = g({}), m = g({}), O = async () => {
16
+ var t;
17
+ u.value = !0;
18
+ const i = await E();
19
+ i.code === 200 && (Object.assign(p, i.result), Object.assign(e, p.license), Object.assign(r, p.database), Object.assign(a, p.jvm), Object.assign(k, p.os), Object.assign(f, p.app), Object.assign(m, (t = p.jvm) == null ? void 0 : t.thread)), u.value = !1;
20
+ };
21
+ O(), $().then((i) => {
22
+ w.value = i.result;
23
+ });
24
+ const N = (i) => {
25
+ i.file.status === "done" ? i.file.response.code === 200 ? (S.success({
26
+ message: "License 更新成功",
27
+ description: "将重新加载 License 信息,请确认是否正确"
28
+ }), O()) : S.error({
29
+ message: i.file.response.msg,
30
+ description: "请检查 License 文件是否正确"
31
+ }) : i.file.status === "error" && S.error({ message: "上传失败" });
32
+ };
33
+ return (i, t) => {
34
+ const J = d("a-progress"), v = d("a-skeleton"), x = d("a-card"), _ = d("a-col"), b = d("a-typography-text"), z = d("a-button"), A = d("a-upload"), L = d("a-tooltip"), P = d("a-row");
35
+ return y(), C(P, { gutter: 16 }, {
15
36
  default: o(() => [
16
37
  n(_, { span: 12 }, {
17
38
  default: o(() => [
18
39
  n(x, { title: "内存线程信息" }, {
19
40
  default: o(() => [
20
- n(v, { loading: e.value }, {
41
+ n(v, { loading: u.value }, {
21
42
  default: o(() => [
22
- t("div", O, [
23
- s[0] || (s[0] = t("span", null, "当前用量", -1)),
24
- t("span", M, l(a.usedMemorySize) + " / " + l(a.totalMemorySize), 1),
25
- t("div", z, [
26
- n(j, {
43
+ s("div", W, [
44
+ t[0] || (t[0] = s("span", null, "当前用量", -1)),
45
+ s("span", q, l(a.usedMemorySize) + " / " + l(a.totalMemorySize), 1),
46
+ s("div", G, [
47
+ n(J, {
27
48
  percent: a.memoryUsage,
28
49
  size: 12
29
50
  }, null, 8, ["percent"])
30
51
  ])
31
52
  ]),
32
- t("div", D, [
33
- s[1] || (s[1] = t("span", null, "当前可用", -1)),
34
- t("span", T, l(a.freeMemorySize), 1)
35
- ]),
36
- s[7] || (s[7] = t("br", null, null, -1)),
37
- t("div", J, [
38
- s[2] || (s[2] = t("span", null, "最大堆(-Xmx)", -1)),
39
- t("span", N, l(a.maxMemorySize), 1)
40
- ]),
41
- s[8] || (s[8] = t("br", null, null, -1)),
42
- t("div", P, [
43
- s[3] || (s[3] = t("span", null, "当前线程数", -1)),
44
- t("span", A, l(f.threadCount), 1)
45
- ]),
46
- s[9] || (s[9] = t("br", null, null, -1)),
47
- t("div", B, [
48
- s[4] || (s[4] = t("span", null, "守护线程数", -1)),
49
- t("span", H, l(f.daemonThreadCount), 1)
50
- ]),
51
- s[10] || (s[10] = t("br", null, null, -1)),
52
- t("div", E, [
53
- s[5] || (s[5] = t("span", null, "最大线程峰值", -1)),
54
- t("span", U, l(f.peakThreadCount), 1)
55
- ]),
56
- s[11] || (s[11] = t("br", null, null, -1)),
57
- t("div", W, [
58
- s[6] || (s[6] = t("span", null, "创建线程总数", -1)),
59
- t("span", X, l(f.totalStartedThreadCount), 1)
53
+ s("div", K, [
54
+ t[1] || (t[1] = s("span", null, "当前可用", -1)),
55
+ s("span", Q, l(a.freeMemorySize), 1)
56
+ ]),
57
+ t[7] || (t[7] = s("br", null, null, -1)),
58
+ s("div", R, [
59
+ t[2] || (t[2] = s("span", null, "最大堆(-Xmx)", -1)),
60
+ s("span", Y, l(a.maxMemorySize), 1)
61
+ ]),
62
+ t[8] || (t[8] = s("br", null, null, -1)),
63
+ s("div", Z, [
64
+ t[3] || (t[3] = s("span", null, "当前线程数", -1)),
65
+ s("span", c, l(m.threadCount), 1)
66
+ ]),
67
+ t[9] || (t[9] = s("br", null, null, -1)),
68
+ s("div", tt, [
69
+ t[4] || (t[4] = s("span", null, "守护线程数", -1)),
70
+ s("span", st, l(m.daemonThreadCount), 1)
71
+ ]),
72
+ t[10] || (t[10] = s("br", null, null, -1)),
73
+ s("div", lt, [
74
+ t[5] || (t[5] = s("span", null, "最大线程峰值", -1)),
75
+ s("span", nt, l(m.peakThreadCount), 1)
76
+ ]),
77
+ t[11] || (t[11] = s("br", null, null, -1)),
78
+ s("div", ot, [
79
+ t[6] || (t[6] = s("span", null, "创建线程总数", -1)),
80
+ s("span", et, l(m.totalStartedThreadCount), 1)
60
81
  ])
61
82
  ]),
62
83
  _: 1
@@ -71,22 +92,22 @@ const O = { class: "large-text" }, M = { class: "float-right" }, z = { style: {
71
92
  default: o(() => [
72
93
  n(x, { title: "JVM信息" }, {
73
94
  default: o(() => [
74
- n(v, { loading: e.value }, {
95
+ n(v, { loading: u.value }, {
75
96
  default: o(() => [
76
- t("div", q, [
77
- s[12] || (s[12] = t("span", null, "系统启动时间", -1)),
78
- t("span", F, l(a.startTimeDisplay), 1)
79
- ]),
80
- s[19] || (s[19] = t("br", null, null, -1)),
81
- t("div", G, [
82
- s[13] || (s[13] = t("span", null, "系统运行时长", -1)),
83
- t("span", K, l(a.uptimeDisplay), 1)
84
- ]),
85
- s[20] || (s[20] = t("br", null, null, -1)),
86
- t("div", L, [
87
- s[14] || (s[14] = t("span", null, "Java安装目录", -1)),
88
- t("span", Q, [
89
- n(y, {
97
+ s("div", at, [
98
+ t[12] || (t[12] = s("span", null, "系统启动时间", -1)),
99
+ s("span", it, l(a.startTimeDisplay), 1)
100
+ ]),
101
+ t[19] || (t[19] = s("br", null, null, -1)),
102
+ s("div", rt, [
103
+ t[13] || (t[13] = s("span", null, "系统运行时长", -1)),
104
+ s("span", dt, l(a.uptimeDisplay), 1)
105
+ ]),
106
+ t[20] || (t[20] = s("br", null, null, -1)),
107
+ s("div", ut, [
108
+ t[14] || (t[14] = s("span", null, "Java安装目录", -1)),
109
+ s("span", pt, [
110
+ n(b, {
90
111
  style: { width: "300px" },
91
112
  class: "large-text",
92
113
  ellipsis: { tooltip: a.javaHome },
@@ -94,27 +115,27 @@ const O = { class: "large-text" }, M = { class: "float-right" }, z = { style: {
94
115
  }, null, 8, ["ellipsis", "content"])
95
116
  ])
96
117
  ]),
97
- s[21] || (s[21] = t("br", null, null, -1)),
98
- t("div", R, [
99
- s[15] || (s[15] = t("span", null, "Java版本", -1)),
100
- t("span", Y, l(a.javaVersion), 1)
118
+ t[21] || (t[21] = s("br", null, null, -1)),
119
+ s("div", gt, [
120
+ t[15] || (t[15] = s("span", null, "Java版本", -1)),
121
+ s("span", ft, l(a.javaVersion), 1)
101
122
  ]),
102
- s[22] || (s[22] = t("br", null, null, -1)),
103
- t("div", Z, [
104
- s[16] || (s[16] = t("span", null, "Java供应商", -1)),
105
- t("span", $, l(a.javaVendor), 1)
123
+ t[22] || (t[22] = s("br", null, null, -1)),
124
+ s("div", mt, [
125
+ t[16] || (t[16] = s("span", null, "Java供应商", -1)),
126
+ s("span", vt, l(a.javaVendor), 1)
106
127
  ]),
107
- s[23] || (s[23] = t("br", null, null, -1)),
108
- t("div", h, [
109
- s[17] || (s[17] = t("span", null, "操作系统", -1)),
110
- t("span", c, l(m.name) + " " + l(m.version), 1)
128
+ t[23] || (t[23] = s("br", null, null, -1)),
129
+ s("div", xt, [
130
+ t[17] || (t[17] = s("span", null, "操作系统", -1)),
131
+ s("span", _t, l(k.name) + " " + l(k.version), 1)
111
132
  ]),
112
- s[24] || (s[24] = t("br", null, null, -1)),
113
- t("div", ss, [
114
- s[18] || (s[18] = t("span", null, "系统核心数", -1)),
115
- t("span", ts, l(m.availableProcessors), 1)
133
+ t[24] || (t[24] = s("br", null, null, -1)),
134
+ s("div", bt, [
135
+ t[18] || (t[18] = s("span", null, "系统核心数", -1)),
136
+ s("span", yt, l(k.availableProcessors), 1)
116
137
  ]),
117
- s[25] || (s[25] = t("br", null, null, -1))
138
+ t[25] || (t[25] = s("br", null, null, -1))
118
139
  ]),
119
140
  _: 1
120
141
  }, 8, ["loading"])
@@ -129,37 +150,52 @@ const O = { class: "large-text" }, M = { class: "float-right" }, z = { style: {
129
150
  span: 12
130
151
  }, {
131
152
  default: o(() => [
132
- n(x, { title: "系统信息" }, {
153
+ n(x, { title: "主数据库信息" }, {
133
154
  default: o(() => [
134
- n(v, { loading: e.value }, {
155
+ n(v, { loading: u.value }, {
135
156
  default: o(() => [
136
- t("div", ls, [
137
- s[26] || (s[26] = t("span", null, "应用服务器", -1)),
138
- t("span", ns, l(p.serverInfo), 1)
139
- ]),
140
- s[30] || (s[30] = t("br", null, null, -1)),
141
- t("div", os, [
142
- s[27] || (s[27] = t("span", null, "工作目录", -1)),
143
- t("span", as, [
144
- n(y, {
157
+ s("div", kt, [
158
+ t[26] || (t[26] = s("span", null, "数据库名称", -1)),
159
+ s("span", wt, l(r.productName), 1)
160
+ ]),
161
+ t[33] || (t[33] = s("br", null, null, -1)),
162
+ s("div", Ct, [
163
+ t[27] || (t[27] = s("span", null, "数据库版本", -1)),
164
+ s("span", jt, l(r.productVersion), 1)
165
+ ]),
166
+ t[34] || (t[34] = s("br", null, null, -1)),
167
+ s("div", St, [
168
+ t[28] || (t[28] = s("span", null, "驱动名称", -1)),
169
+ s("span", Ot, [
170
+ n(b, {
145
171
  style: { width: "300px" },
146
172
  class: "large-text",
147
- ellipsis: { tooltip: p.appPath },
148
- content: p.appPath
173
+ ellipsis: { tooltip: r.driverVersion },
174
+ content: r.driverVersion
149
175
  }, null, 8, ["ellipsis", "content"])
150
176
  ])
151
177
  ]),
152
- s[31] || (s[31] = t("br", null, null, -1)),
153
- t("div", is, [
154
- s[28] || (s[28] = t("span", null, "会话超时(Session Timeout)", -1)),
155
- t("span", es, l(p.maxInactiveInterval / 60) + "分钟", 1)
178
+ t[35] || (t[35] = s("br", null, null, -1)),
179
+ s("div", ht, [
180
+ t[29] || (t[29] = s("span", null, "数据库连接池", -1)),
181
+ s("span", It, l(r.poolName), 1)
182
+ ]),
183
+ t[36] || (t[36] = s("br", null, null, -1)),
184
+ s("div", Vt, [
185
+ t[30] || (t[30] = s("span", null, "最大活跃连接数", -1)),
186
+ s("span", Tt, l(r.maxActive), 1)
187
+ ]),
188
+ t[37] || (t[37] = s("br", null, null, -1)),
189
+ s("div", Mt, [
190
+ t[31] || (t[31] = s("span", null, "最小空闲连接数", -1)),
191
+ s("span", Nt, l(r.minIdle), 1)
156
192
  ]),
157
- s[32] || (s[32] = t("br", null, null, -1)),
158
- t("div", rs, [
159
- s[29] || (s[29] = t("span", null, "缓存管理", -1)),
160
- t("span", ds, l(p.cacheManager), 1)
193
+ t[38] || (t[38] = s("br", null, null, -1)),
194
+ s("div", Jt, [
195
+ t[32] || (t[32] = s("span", null, "获取连接等待时间", -1)),
196
+ s("span", zt, l(r.maxWait) + "ms", 1)
161
197
  ]),
162
- s[33] || (s[33] = t("br", null, null, -1))
198
+ t[39] || (t[39] = s("br", null, null, -1))
163
199
  ]),
164
200
  _: 1
165
201
  }, 8, ["loading"])
@@ -175,29 +211,101 @@ const O = { class: "large-text" }, M = { class: "float-right" }, z = { style: {
175
211
  }, {
176
212
  default: o(() => [
177
213
  n(x, { title: "授权信息" }, {
214
+ extra: o(() => [
215
+ n(A, {
216
+ name: "file",
217
+ action: `${j(T)}/api/v2/license/update_license`,
218
+ headers: { "X-Auth-Token": j(M) },
219
+ showUploadList: !1,
220
+ onChange: N
221
+ }, {
222
+ default: o(() => [
223
+ n(z, {
224
+ icon: U(j(H))
225
+ }, {
226
+ default: o(() => t[40] || (t[40] = [
227
+ I("更新")
228
+ ])),
229
+ _: 1
230
+ }, 8, ["icon"])
231
+ ]),
232
+ _: 1
233
+ }, 8, ["action", "headers"])
234
+ ]),
178
235
  default: o(() => [
179
- n(v, { loading: e.value }, {
236
+ n(v, { loading: u.value }, {
180
237
  default: o(() => [
181
- t("div", us, [
182
- s[34] || (s[34] = t("span", null, "授权使用", -1)),
183
- t("span", ps, l(u.company), 1)
184
- ]),
185
- s[38] || (s[38] = t("br", null, null, -1)),
186
- t("div", gs, [
187
- s[35] || (s[35] = t("span", null, "授权IP", -1)),
188
- t("span", fs, l(u.ip ? u.ip : "无限制"), 1)
189
- ]),
190
- s[39] || (s[39] = t("br", null, null, -1)),
191
- t("div", vs, [
192
- s[36] || (s[36] = t("span", null, "授权日期", -1)),
193
- t("span", xs, l(u.createdAt), 1)
194
- ]),
195
- s[40] || (s[40] = t("br", null, null, -1)),
196
- t("div", _s, [
197
- s[37] || (s[37] = t("span", null, "结束日期", -1)),
198
- t("span", ms, l(u.expiresAt), 1)
199
- ]),
200
- s[41] || (s[41] = t("br", null, null, -1))
238
+ s("div", At, [
239
+ t[41] || (t[41] = s("span", null, "当前机器码", -1)),
240
+ s("span", Lt, [
241
+ n(b, {
242
+ style: { width: "300px", color: "brown" },
243
+ class: "large-text",
244
+ ellipsis: { tooltip: w.value },
245
+ content: w.value
246
+ }, null, 8, ["ellipsis", "content"])
247
+ ])
248
+ ]),
249
+ t[50] || (t[50] = s("br", null, null, -1)),
250
+ s("div", Pt, [
251
+ t[42] || (t[42] = s("span", null, "授权使用", -1)),
252
+ s("span", Dt, l(e.company), 1)
253
+ ]),
254
+ t[51] || (t[51] = s("br", null, null, -1)),
255
+ s("div", Ut, [
256
+ t[43] || (t[43] = s("span", null, "授权IP", -1)),
257
+ s("span", Bt, l(e.ip ? e.ip : "无限制"), 1)
258
+ ]),
259
+ t[52] || (t[52] = s("br", null, null, -1)),
260
+ s("div", $t, [
261
+ t[44] || (t[44] = s("span", null, "授权机器码", -1)),
262
+ s("span", Et, [
263
+ e.machineCode ? (y(), C(b, {
264
+ key: 0,
265
+ style: { width: "300px" },
266
+ class: "large-text float-right",
267
+ ellipsis: { tooltip: e.machineCode },
268
+ content: e.machineCode
269
+ }, null, 8, ["ellipsis", "content"])) : (y(), V(B, { key: 1 }, [
270
+ I("无限制")
271
+ ], 64))
272
+ ])
273
+ ]),
274
+ t[53] || (t[53] = s("br", null, null, -1)),
275
+ s("div", Ht, [
276
+ t[45] || (t[45] = s("span", null, "授权日期", -1)),
277
+ s("span", Xt, l(e.createdAt), 1)
278
+ ]),
279
+ t[54] || (t[54] = s("br", null, null, -1)),
280
+ s("div", Ft, [
281
+ t[46] || (t[46] = s("span", null, "结束日期", -1)),
282
+ s("span", Wt, l(e.expiresAt ? e.expiresAt : "无限制"), 1)
283
+ ]),
284
+ t[55] || (t[55] = s("br", null, null, -1)),
285
+ s("div", qt, [
286
+ t[47] || (t[47] = s("span", null, "最大用户数", -1)),
287
+ s("span", Gt, l(e.users ? `${e.users} 人` : "无限制"), 1)
288
+ ]),
289
+ t[56] || (t[56] = s("br", null, null, -1)),
290
+ s("div", Kt, [
291
+ t[48] || (t[48] = s("span", null, "最大流程实例数", -1)),
292
+ s("span", Qt, l(e.workflowInstances ? `${e.workflowInstances} 条` : "无限制"), 1)
293
+ ]),
294
+ t[57] || (t[57] = s("br", null, null, -1)),
295
+ s("div", Rt, [
296
+ t[49] || (t[49] = s("span", null, "扩展信息", -1)),
297
+ s("span", Yt, [
298
+ e.extras ? (y(), C(L, {
299
+ key: 0,
300
+ title: JSON.stringify(e.extras)
301
+ }, {
302
+ default: o(() => [
303
+ s("span", Zt, l(JSON.stringify(e.extras)), 1)
304
+ ]),
305
+ _: 1
306
+ }, 8, ["title"])) : (y(), V("span", ct, "无"))
307
+ ])
308
+ ])
201
309
  ]),
202
310
  _: 1
203
311
  }, 8, ["loading"])
@@ -212,52 +320,37 @@ const O = { class: "large-text" }, M = { class: "float-right" }, z = { style: {
212
320
  span: 12
213
321
  }, {
214
322
  default: o(() => [
215
- n(x, { title: "主数据库信息" }, {
323
+ n(x, { title: "系统信息" }, {
216
324
  default: o(() => [
217
- n(v, { loading: e.value }, {
325
+ n(v, { loading: u.value }, {
218
326
  default: o(() => [
219
- t("div", bs, [
220
- s[42] || (s[42] = t("span", null, "数据库名称", -1)),
221
- t("span", ys, l(i.productName), 1)
222
- ]),
223
- s[49] || (s[49] = t("br", null, null, -1)),
224
- t("div", js, [
225
- s[43] || (s[43] = t("span", null, "数据库版本", -1)),
226
- t("span", Ss, l(i.productVersion), 1)
227
- ]),
228
- s[50] || (s[50] = t("br", null, null, -1)),
229
- t("div", ks, [
230
- s[44] || (s[44] = t("span", null, "驱动名称", -1)),
231
- t("span", Vs, [
232
- n(y, {
327
+ s("div", ts, [
328
+ t[58] || (t[58] = s("span", null, "应用服务器", -1)),
329
+ s("span", ss, l(f.serverInfo), 1)
330
+ ]),
331
+ t[62] || (t[62] = s("br", null, null, -1)),
332
+ s("div", ls, [
333
+ t[59] || (t[59] = s("span", null, "工作目录", -1)),
334
+ s("span", ns, [
335
+ n(b, {
233
336
  style: { width: "300px" },
234
337
  class: "large-text",
235
- ellipsis: { tooltip: i.driverVersion },
236
- content: i.driverVersion
338
+ ellipsis: { tooltip: f.appPath },
339
+ content: f.appPath
237
340
  }, null, 8, ["ellipsis", "content"])
238
341
  ])
239
342
  ]),
240
- s[51] || (s[51] = t("br", null, null, -1)),
241
- t("div", ws, [
242
- s[45] || (s[45] = t("span", null, "数据库连接池", -1)),
243
- t("span", Cs, l(i.poolName), 1)
244
- ]),
245
- s[52] || (s[52] = t("br", null, null, -1)),
246
- t("div", Is, [
247
- s[46] || (s[46] = t("span", null, "最大活跃连接数", -1)),
248
- t("span", Os, l(i.maxActive), 1)
249
- ]),
250
- s[53] || (s[53] = t("br", null, null, -1)),
251
- t("div", Ms, [
252
- s[47] || (s[47] = t("span", null, "最小空闲连接数", -1)),
253
- t("span", zs, l(i.minIdle), 1)
343
+ t[63] || (t[63] = s("br", null, null, -1)),
344
+ s("div", os, [
345
+ t[60] || (t[60] = s("span", null, "会话超时(Session Timeout)", -1)),
346
+ s("span", es, l(f.maxInactiveInterval / 60) + "分钟", 1)
254
347
  ]),
255
- s[54] || (s[54] = t("br", null, null, -1)),
256
- t("div", Ds, [
257
- s[48] || (s[48] = t("span", null, "获取连接等待时间", -1)),
258
- t("span", Ts, l(i.maxWait) + "ms", 1)
348
+ t[64] || (t[64] = s("br", null, null, -1)),
349
+ s("div", as, [
350
+ t[61] || (t[61] = s("span", null, "缓存管理", -1)),
351
+ s("span", is, l(f.cacheManager), 1)
259
352
  ]),
260
- s[55] || (s[55] = t("br", null, null, -1))
353
+ t[65] || (t[65] = s("br", null, null, -1))
261
354
  ]),
262
355
  _: 1
263
356
  }, 8, ["loading"])
@@ -274,5 +367,5 @@ const O = { class: "large-text" }, M = { class: "float-right" }, z = { style: {
274
367
  }
275
368
  });
276
369
  export {
277
- Bs as default
370
+ ms as default
278
371
  };
@@ -1,5 +1,6 @@
1
1
  import { http as t } from "@since2006/utils";
2
- const e = () => t.get("/api/v2/status/get_status");
2
+ const s = () => t.get("/api/v2/status/get_status"), a = () => t.get("/api/v2/license/get_machine_code");
3
3
  export {
4
- e as getStatus
4
+ a as getMachineCode,
5
+ s as getStatus
5
6
  };
@@ -1,4 +1,6 @@
1
- import { StatusIndex as o } from "./app/system/index.js";
1
+ import { StatusIndex as r } from "./app/system/index.js";
2
+ import { ModuleIndex as x } from "./app/module/index.js";
2
3
  export {
3
- o as StatusIndex
4
+ x as ModuleIndex,
5
+ r as StatusIndex
4
6
  };
package/dist/es/style.css CHANGED
@@ -1 +1 @@
1
- .large-text[data-v-f46e2d33]{font-size:16px}.float-right[data-v-f46e2d33]{float:right}.margin-block[data-v-f46e2d33]{margin-top:14px}
1
+ .large-text[data-v-1f96ab02]{font-size:16px}.float-right[data-v-1f96ab02]{float:right}.margin-block[data-v-1f96ab02]{margin-top:14px}.icon-selector deep(ul) li.active[data-v-33554e43],.icon-selector deep(ul) li[data-v-33554e43]:hover{border-radius:2px;border-color:#4a4a48;background-color:#4a4a48;color:#fff;transition:all .3s;box-shadow:none}.icon-selector deep(ul) i[data-v-33554e43]{font-size:1.5rem;border:1px solid #f1f1f1;padding:.02rem;margin:.03rem;cursor:pointer}.ant-form[data-v-cd92ee31]{padding-top:20px}.permission-tree[data-v-cd92ee31],.permission-tree[data-v-266daf0e]{overflow-y:auto;overflow-x:hidden;margin-top:10px}
package/dist/lib/index.js CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./src/index.js"),u=require("./src/app/system/index.js"),i={install:t=>{for(let n in e)t.use(e[n])}};exports.StatusIndex=u.StatusIndex;exports.default=i;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./src/index.js"),u=require("./src/app/system/index.js"),d=require("./src/app/module/index.js"),i={install:t=>{for(let n in e)t.use(e[n])}};exports.StatusIndex=u.StatusIndex;exports.ModuleIndex=d.ModuleIndex;exports.default=i;
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./ModuleAdd.vue2.js");;/* empty css */const u=require("../../../_virtual/_plugin-vue_export-helper.js"),t=u.default(e.default,[["__scopeId","data-v-cd92ee31"]]);exports.default=t;
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),P=require("./icon/IconSelectorModal.vue.js"),R=require("ant-design-vue"),j=require("@ant-design/icons-vue"),m=require("./api.js"),E=require("@since2006/components"),$=e.defineComponent({__name:"ModuleAdd",props:{open:{type:Boolean,default:!1},parentId:{type:String,default:null}},emits:["update:open","success","cancel"],setup(v,{emit:x}){const c=v,f=e.ref(),s=e.ref([]),i=e.ref(!1),C=e.ref([]),N=e.ref([]),u=e.ref({icon:!1}),_={id:"",cateId:"",parentId:"",name:"",icon:"",path:"",component:"",seqNo:"",remark:"",state:"0",target:!1,permissionSummary:""},o=e.reactive({..._}),b={name:[{required:!0,message:"请填写模块名称"}],seqNo:[{required:!0,type:"number",message:"请填写数字类型顺序号"}]},p=x;e.watch(()=>c.open,l=>{l&&(g(),q())});const g=()=>{Object.assign(o,_),s.value=[]},k=(l,t)=>t.componentOptions.children[0].text.toLowerCase().indexOf(l.toLowerCase())>=0,q=()=>{m.getModules().then(l=>{const t=[];V(t,l.result,[]),C.value=t,c.parentId&&(o.parentId=c.parentId)}),m.getDocs().then(l=>{N.value=D(l.result)})},I=()=>{u.value.icon=!0},S=l=>{u.value.icon=!1,o.icon=l},U=()=>{f.value.validateFields().then(()=>{i.value=!0;const l={...o,target:o.target?1:0,permIds:s.value,seqNo:parseInt(o.seqNo)};m.createModule(l).then(t=>{R.message.success("添加模块成功"),p("update:open",!1),p("success",t.result.parentId)})}).finally(l=>{i.value=!1})},y=()=>{p("update:open",!1)},V=(l,t,d)=>{t&&t.forEach(n=>{if(!d.includes(n.id)){const r={value:n.id,title:n.name,children:[]};V(r.children,n.children,d),l.push(r)}})},D=l=>l.map(t=>({value:t.id,label:t.name}));return(l,t)=>{const d=e.resolveComponent("a-tree-select"),n=e.resolveComponent("a-form-item"),r=e.resolveComponent("a-input"),O=e.resolveComponent("a-select"),L=e.resolveComponent("a-input-number"),w=e.resolveComponent("a-radio"),M=e.resolveComponent("a-radio-group"),B=e.resolveComponent("a-switch"),h=e.resolveComponent("a-col"),A=e.resolveComponent("a-row"),T=e.resolveComponent("a-form"),F=e.resolveComponent("a-modal");return e.openBlock(),e.createBlock(F,{title:"添加系统模块",width:800,visible:v.open,"mask-closable":!1,"confirm-loading":i.value,"destroy-on-close":"",onOk:U,onCancel:y},{default:e.withCtx(()=>[e.createVNode(T,{ref_key:"formRef",ref:f,model:o,rules:b,"label-col":{span:5},"wrapper-col":{span:15}},{default:e.withCtx(()=>[e.createVNode(A,null,{default:e.withCtx(()=>[e.createVNode(h,{span:15},{default:e.withCtx(()=>[e.createVNode(n,{label:"上级模块"},{default:e.withCtx(()=>[e.createVNode(d,{value:o.parentId,"onUpdate:value":t[0]||(t[0]=a=>o.parentId=a),treeData:C.value,treeDefaultExpandAll:"",allowClear:""},null,8,["value","treeData"])]),_:1}),e.createVNode(n,{label:"模块名称",name:"name"},{default:e.withCtx(()=>[e.createVNode(r,{value:o.name,"onUpdate:value":t[1]||(t[1]=a=>o.name=a),placeholder:"模块名称"},null,8,["value"])]),_:1}),e.createVNode(n,{label:"文档类别"},{default:e.withCtx(()=>[e.createVNode(O,{value:o.cateId,"onUpdate:value":t[2]||(t[2]=a=>o.cateId=a),"show-search":"","option-filter-prop":"children","filter-option":k,options:N.value,allowClear:""},null,8,["value","options"])]),_:1}),e.createVNode(n,{label:"模块图标"},{default:e.withCtx(()=>[e.createVNode(r,{value:o.icon,"onUpdate:value":t[3]||(t[3]=a=>o.icon=a),placeholder:"点击右侧按钮选择图标"},{prefix:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(o.icon),{style:{color:"#108b16"}}))]),addonAfter:e.withCtx(()=>[e.createVNode(e.unref(j.SearchOutlined),{onClick:I})]),_:1},8,["value"])]),_:1}),e.createVNode(n,{label:"顺序号",name:"seqNo"},{default:e.withCtx(()=>[e.createVNode(L,{value:o.seqNo,"onUpdate:value":t[4]||(t[4]=a=>o.seqNo=a),placeholder:"顺序号"},null,8,["value"])]),_:1}),e.createVNode(n,{label:"访问路径"},{default:e.withCtx(()=>[e.createVNode(r,{value:o.path,"onUpdate:value":t[5]||(t[5]=a=>o.path=a),placeholder:"访问路径"},null,8,["value"])]),_:1}),e.createVNode(n,{label:"模板文件"},{default:e.withCtx(()=>[e.createVNode(r,{value:o.component,"onUpdate:value":t[6]||(t[6]=a=>o.component=a),placeholder:"@/epp/module/viewName"},null,8,["value"])]),_:1}),e.createVNode(n,{label:"是否显示"},{default:e.withCtx(()=>[e.createVNode(M,{value:o.state,"onUpdate:value":t[7]||(t[7]=a=>o.state=a)},{default:e.withCtx(()=>[e.createVNode(w,{value:"1"},{default:e.withCtx(()=>t[12]||(t[12]=[e.createTextVNode("显示")])),_:1}),e.createVNode(w,{value:"0"},{default:e.withCtx(()=>t[13]||(t[13]=[e.createTextVNode("隐藏")])),_:1})]),_:1},8,["value"])]),_:1}),e.createVNode(n,{label:"打开方式"},{default:e.withCtx(()=>[e.createVNode(B,{checked:o.target,"onUpdate:checked":t[8]||(t[8]=a=>o.target=a),"checked-children":"新开窗口","un-checked-children":"内部窗口"},null,8,["checked"])]),_:1}),e.createVNode(n,{label:"描述"},{default:e.withCtx(()=>[e.createVNode(r,{value:o.remark,"onUpdate:value":t[9]||(t[9]=a=>o.remark=a),placeholder:"描述"},null,8,["value"])]),_:1})]),_:1}),e.createVNode(h,{span:9},{default:e.withCtx(()=>[e.createVNode(e.unref(E.PermPanel),{modelValue:s.value,"onUpdate:modelValue":t[10]||(t[10]=a=>s.value=a)},null,8,["modelValue"])]),_:1})]),_:1})]),_:1},8,["model"]),e.createVNode(P.default,{visible:u.value.icon,onSuccess:S,onCancel:t[11]||(t[11]=a=>u.value.icon=!1)},null,8,["visible"])]),_:1},8,["visible","confirm-loading"])}}});exports.default=$;
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),n=require("@since2006/components"),u={style:{color:"#a6a6a6","margin-left":"4px"}},i=e.defineComponent({__name:"ModuleDetail",props:{module:{}},setup(c){return(t,l)=>{const o=e.resolveComponent("a-descriptions-item"),a=e.resolveComponent("a-tag"),d=e.resolveComponent("a-descriptions");return e.openBlock(),e.createBlock(d,{bordered:"",column:1,labelStyle:{width:"140px",textAlign:"center"}},{default:e.withCtx(()=>[e.createVNode(o,{label:"模块名称"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.module.name),1)]),_:1}),e.createVNode(o,{label:"文档类别"},{default:e.withCtx(()=>{var r;return[e.createTextVNode(e.toDisplayString((r=t.module.cate)==null?void 0:r.name),1)]}),_:1}),e.createVNode(o,{label:"模块图标"},{default:e.withCtx(()=>[t.module.icon?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.module.icon),{key:0,style:{"font-size":"16px"}})):e.createCommentVNode("",!0),e.createElementVNode("span",u,e.toDisplayString(t.module.icon),1)]),_:1}),e.createVNode(o,{label:"访问路径"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.module.path)+" ",1),t.module.path?(e.openBlock(),e.createBlock(e.unref(n.ClickCopy),{key:0,value:t.module.path},null,8,["value"])):e.createCommentVNode("",!0)]),_:1}),e.createVNode(o,{label:"模板文件"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.module.component)+" ",1),t.module.component?(e.openBlock(),e.createBlock(e.unref(n.ClickCopy),{key:0,value:t.module.component},null,8,["value"])):e.createCommentVNode("",!0)]),_:1}),e.createVNode(o,{label:"打开方式"},{default:e.withCtx(()=>[t.module.target!=null?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[t.module.target===1?(e.openBlock(),e.createBlock(a,{key:0,color:"red"},{default:e.withCtx(()=>l[0]||(l[0]=[e.createTextVNode("新开窗口")])),_:1})):(e.openBlock(),e.createBlock(a,{key:1},{default:e.withCtx(()=>l[1]||(l[1]=[e.createTextVNode("默认")])),_:1}))],64)):e.createCommentVNode("",!0)]),_:1}),e.createVNode(o,{label:"排序"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.module.seqNo),1)]),_:1}),e.createVNode(o,{label:"是否显示"},{default:e.withCtx(()=>[t.module.state?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[t.module.state==="1"?(e.openBlock(),e.createBlock(a,{key:0,color:"green"},{default:e.withCtx(()=>l[2]||(l[2]=[e.createTextVNode("显示")])),_:1})):(e.openBlock(),e.createBlock(a,{key:1,color:"red"},{default:e.withCtx(()=>l[3]||(l[3]=[e.createTextVNode("隐藏")])),_:1}))],64)):e.createCommentVNode("",!0)]),_:1}),e.createVNode(o,{label:"访问权限"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.module.permsSummary),1)]),_:1}),e.createVNode(o,{label:"描述"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.module.remark),1)]),_:1})]),_:1})}}});exports.default=i;
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./ModuleDetail.vue.js");exports.default=e.default;
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./ModuleEdit.vue2.js");;/* empty css */const t=require("../../../_virtual/_plugin-vue_export-helper.js"),u=t.default(e.default,[["__scopeId","data-v-266daf0e"]]);exports.default=u;
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),j=require("./icon/IconSelectorModal.vue.js"),F=require("ant-design-vue"),R=require("@ant-design/icons-vue"),c=require("./api.js"),A=require("@since2006/components"),$=e.defineComponent({__name:"ModuleEdit",props:{open:{type:Boolean,default:!1},moduleId:{type:String,required:!0}},emits:["update:open","success","cancel"],setup(v,{emit:b}){const i=v,f=e.ref(),p=e.ref(!1),C=e.ref([]),N=e.ref([]),s=e.ref([]),d=e.ref({icon:!1}),_={id:"",cateId:"",parentId:"",name:"",icon:"",path:"",component:"",seqNo:"",remark:"",state:"0",target:!1,permissionSummary:""},o=e.reactive({..._}),x={name:[{required:!0,message:"请填写模块名称"}],seqNo:[{required:!0,type:"number",message:"请填写数字类型顺序号"}]},m=b;e.watch(()=>i.open,l=>{l&&(g(),k())});const g=()=>{Object.assign(o,_),s.value=[]},q=(l,t)=>t.componentOptions.children[0].text.toLowerCase().indexOf(l.toLowerCase())>=0,k=()=>{c.getModule(i.moduleId).then(l=>{const t=l.result;t.target=t.target===1,Object.assign(o,l.result),s.value=[...l.result.permissions.map(u=>u.id)]}),c.getModules().then(l=>{const t=[];V(t,l.result,[i.moduleId]),C.value=t}),c.getDocs().then(l=>{N.value=D(l.result)})},I=()=>{d.value.icon=!0},S=l=>{d.value.icon=!1,o.icon=l},U=()=>{f.value.validateFields().then(()=>{p.value=!0;const l={...o,target:o.target?1:0,permIds:s.value,seqNo:parseInt(o.seqNo)};c.updateModule(l).then(t=>{t.code===200&&(F.message.success("编辑模块成功"),m("update:open",!1),m("success",t.result.id,t.result.parentId,t.result.srcParentId))})}).finally(()=>{p.value=!1})},y=()=>{m("update:open",!1)},D=l=>l.map(t=>({value:t.id,label:t.name})),V=(l,t,u)=>{t&&t.forEach(n=>{if(!u.includes(n.id)){const r={value:n.id,title:n.name,children:[]};V(r.children,n.children,u),l.push(r)}})};return(l,t)=>{const u=e.resolveComponent("a-tree-select"),n=e.resolveComponent("a-form-item"),r=e.resolveComponent("a-input"),O=e.resolveComponent("a-select"),M=e.resolveComponent("a-input-number"),w=e.resolveComponent("a-radio"),L=e.resolveComponent("a-radio-group"),B=e.resolveComponent("a-switch"),h=e.resolveComponent("a-col"),E=e.resolveComponent("a-row"),P=e.resolveComponent("a-form"),T=e.resolveComponent("a-modal");return e.openBlock(),e.createBlock(T,{title:"编辑系统模块",width:800,visible:v.open,"mask-closable":!1,"confirm-loading":p.value,"destroy-on-close":"",onOk:U,onCancel:y},{default:e.withCtx(()=>[e.createVNode(P,{ref_key:"formRef",ref:f,model:o,rules:x,"label-col":{span:5},"wrapper-col":{span:15}},{default:e.withCtx(()=>[e.createVNode(E,null,{default:e.withCtx(()=>[e.createVNode(h,{span:15},{default:e.withCtx(()=>[e.createVNode(n,{label:"上级模块"},{default:e.withCtx(()=>[e.createVNode(u,{value:o.parentId,"onUpdate:value":t[0]||(t[0]=a=>o.parentId=a),treeData:C.value,treeDefaultExpandAll:"",allowClear:""},null,8,["value","treeData"])]),_:1}),e.createVNode(n,{label:"模块名称",name:"name"},{default:e.withCtx(()=>[e.createVNode(r,{value:o.name,"onUpdate:value":t[1]||(t[1]=a=>o.name=a),placeholder:"模块名称"},null,8,["value"])]),_:1}),e.createVNode(n,{label:"文档类别"},{default:e.withCtx(()=>[e.createVNode(O,{value:o.cateId,"onUpdate:value":t[2]||(t[2]=a=>o.cateId=a),"show-search":"","option-filter-prop":"children","filter-option":q,options:N.value,allowClear:""},null,8,["value","options"])]),_:1}),e.createVNode(n,{label:"模块图标"},{default:e.withCtx(()=>[e.createVNode(r,{value:o.icon,"onUpdate:value":t[3]||(t[3]=a=>o.icon=a),placeholder:"点击右侧按钮选择图标"},{prefix:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(o.icon),{style:{color:"#108b16"}}))]),addonAfter:e.withCtx(()=>[e.createVNode(e.unref(R.SearchOutlined),{onClick:I})]),_:1},8,["value"])]),_:1}),e.createVNode(n,{label:"顺序号",name:"seqNo"},{default:e.withCtx(()=>[e.createVNode(M,{value:o.seqNo,"onUpdate:value":t[4]||(t[4]=a=>o.seqNo=a),placeholder:"顺序号"},null,8,["value"])]),_:1}),e.createVNode(n,{label:"访问路径"},{default:e.withCtx(()=>[e.createVNode(r,{value:o.path,"onUpdate:value":t[5]||(t[5]=a=>o.path=a),placeholder:"访问路径"},null,8,["value"])]),_:1}),e.createVNode(n,{label:"模板文件"},{default:e.withCtx(()=>[e.createVNode(r,{value:o.component,"onUpdate:value":t[6]||(t[6]=a=>o.component=a),placeholder:"@/epp/module/viewName"},null,8,["value"])]),_:1}),e.createVNode(n,{label:"是否显示"},{default:e.withCtx(()=>[e.createVNode(L,{value:o.state,"onUpdate:value":t[7]||(t[7]=a=>o.state=a)},{default:e.withCtx(()=>[e.createVNode(w,{value:"1"},{default:e.withCtx(()=>t[12]||(t[12]=[e.createTextVNode("显示")])),_:1}),e.createVNode(w,{value:"0"},{default:e.withCtx(()=>t[13]||(t[13]=[e.createTextVNode("隐藏")])),_:1})]),_:1},8,["value"])]),_:1}),e.createVNode(n,{label:"打开方式"},{default:e.withCtx(()=>[e.createVNode(B,{checked:o.target,"onUpdate:checked":t[8]||(t[8]=a=>o.target=a),"checked-children":"新开窗口","un-checked-children":"内部窗口"},null,8,["checked"])]),_:1}),e.createVNode(n,{label:"描述"},{default:e.withCtx(()=>[e.createVNode(r,{value:o.remark,"onUpdate:value":t[9]||(t[9]=a=>o.remark=a),placeholder:"描述"},null,8,["value"])]),_:1})]),_:1}),e.createVNode(h,{span:9},{default:e.withCtx(()=>[e.createVNode(e.unref(A.PermPanel),{modelValue:s.value,"onUpdate:modelValue":t[10]||(t[10]=a=>s.value=a)},null,8,["modelValue"])]),_:1})]),_:1})]),_:1},8,["model"]),e.createVNode(j.default,{visible:d.value.icon,onSuccess:S,onCancel:t[11]||(t[11]=a=>d.value.icon=!1)},null,8,["visible"])]),_:1},8,["visible","confirm-loading"])}}});exports.default=$;
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),B=require("ant-design-vue"),f=require("./api.js"),m=require("./utils.js"),v=require("@ant-design/icons-vue"),P=require("./ModuleDetail.vue.js"),j=require("./ModuleAdd.vue.js"),U=require("./ModuleEdit.vue.js"),z={class:"ant-pro-table-list-toolbar"},F={class:"ant-pro-table-list-toolbar-container"},G={class:"ant-pro-table-list-toolbar-right"},H=e.defineComponent({__name:"ModuleIndex",setup(I){const w=e.ref(),a=e.ref([]),_=e.ref([]),r=e.ref([]),d=e.reactive({id:"",cateId:"",parentId:"",icon:"",component:"",path:"",seqNo:"",remark:"",permsSummary:""}),h=e.ref(!0),s=e.reactive({openAdd:!1,openEdit:!1}),C=e.ref(!1),y=()=>{f.getModulesNoCache().then(o=>{r.value=m.mapTreeData(o.result),N(r.value[0].key)})},M=o=>{a.value=o},E=o=>new Promise(t=>{if(o.dataRef.children){t("当前节点没有子模块");return}f.getModulesNoCache(o.dataRef.key).then(n=>{o.dataRef.children=m.mapTreeData(n.result),r.value=[...r.value],t("获取模块数据成功")})}),k=(o,t)=>{const n=t.node.dataRef,l=a.value.includes(n.key);if(n.isLeaf||(t.selected?l||a.value.push(n.key):l&&(a.value=a.value.filter(u=>u!==n.key))),o.length===0)return;const c=o[0];N(c)},N=o=>{h.value=!0,f.getModule(o).then(t=>{Object.assign(d,t.result),h.value=!1}).catch(t=>{console.log(t)})},b=()=>{C.value=!0,s.openAdd=!0},D=()=>{C.value=!1,s.openAdd=!0},T=o=>{i(o)},S=()=>{s.openEdit=!0},A=(o,t,n)=>{N(o),t===n||i(n),i(t)},q=()=>{f.deleteModule(d.id).then(o=>{B.message.success("删除成功"),i(o.result.parentId)})},i=o=>{f.getModulesNoCache(o).then(t=>{o?V(r.value,o,m.mapTreeData(t.result)):r.value=m.mapTreeData(t.result)})},V=(o,t,n)=>{o.forEach(l=>{if(l.key===t){l.isLeaf=n.length===0;const c=x([l],0);_.value=_.value.filter(u=>!c.includes(u)),a.value=a.value.filter(u=>!c.includes(u)),l.children=n}else l.children&&V(l.children,t,n)})},x=(o,t)=>{let n=[];return o.forEach(l=>{t>0&&n.push(l.key),l.children&&(n=n.concat(x(l.children,++t)))}),n};return y(),(o,t)=>{const n=e.resolveComponent("a-button"),l=e.resolveComponent("a-popconfirm"),c=e.resolveComponent("a-button-group"),u=e.resolveComponent("a-space"),R=e.resolveComponent("a-tree"),g=e.resolveComponent("a-col"),K=e.resolveComponent("a-skeleton"),O=e.resolveComponent("a-row"),L=e.resolveComponent("a-card");return e.openBlock(),e.createElementBlock("div",null,[e.createVNode(L,{"body-style":{padding:"0 20px 20px 10px"},ref_key:"fusRef",ref:w},{default:e.withCtx(()=>[e.createElementVNode("div",z,[e.createElementVNode("div",F,[t[6]||(t[6]=e.createElementVNode("div",{class:"ant-pro-table-list-toolbar-left"},[e.createElementVNode("div",{class:"ant-pro-table-list-toolbar-title"},"模块配置")],-1)),e.createElementVNode("div",G,[e.createVNode(u,{align:"center"},{default:e.withCtx(()=>[e.createVNode(c,null,{default:e.withCtx(()=>[e.createVNode(n,{onClick:b},{default:e.withCtx(()=>[e.createVNode(e.unref(v.PlusOutlined)),t[2]||(t[2]=e.createTextVNode(" 添加根模块 "))]),_:1}),e.withDirectives(e.createVNode(n,{onClick:D},{default:e.withCtx(()=>[e.createVNode(e.unref(v.PlusOutlined)),t[3]||(t[3]=e.createTextVNode(" 添加子模块 "))]),_:1},512),[[e.vShow,d.id]]),e.withDirectives(e.createVNode(n,{onClick:S},{default:e.withCtx(()=>[e.createVNode(e.unref(v.EditOutlined)),t[4]||(t[4]=e.createTextVNode(" 修改模块 "))]),_:1},512),[[e.vShow,d.id]]),e.createVNode(l,{title:"是否确认删除模块?",onConfirm:q},{default:e.withCtx(()=>[e.withDirectives(e.createVNode(n,{danger:""},{default:e.withCtx(()=>[e.createVNode(e.unref(v.DeleteOutlined)),t[5]||(t[5]=e.createTextVNode(" 删除模块 "))]),_:1},512),[[e.vShow,d.id]])]),_:1})]),_:1})]),_:1})])])]),e.createVNode(O,null,{default:e.withCtx(()=>[e.createVNode(g,{sm:5,md:4},{default:e.withCtx(()=>[e.createVNode(R,{showIcon:!0,expandedKeys:a.value,loadedKeys:_.value,treeData:r.value,onExpand:M,loadData:E,onSelect:k},{icon:e.withCtx(p=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(p.iconName)))]),_:1},8,["expandedKeys","loadedKeys","treeData"])]),_:1}),e.createVNode(g,{sm:19,md:20},{default:e.withCtx(()=>[e.createVNode(K,{loading:h.value},{default:e.withCtx(()=>[e.createVNode(P.default,{module:d},null,8,["module"])]),_:1},8,["loading"])]),_:1})]),_:1})]),_:1},512),e.createVNode(j.default,{ref:"moduleAdd",open:s.openAdd,"onUpdate:open":t[0]||(t[0]=p=>s.openAdd=p),"parent-id":C.value?null:d.id,onSuccess:T},null,8,["open","parent-id"]),e.createVNode(U.default,{ref:"moduleEdit",open:s.openEdit,"onUpdate:open":t[1]||(t[1]=p=>s.openEdit=p),"module-id":d.id,onSuccess:A},null,8,["open","module-id"])])}}});exports.default=H;