halo-pc 1.0.3 → 1.0.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (145) hide show
  1. package/dist/Article-CjlnxF__.js +196 -0
  2. package/dist/ArticleFooter-BAf1rKUX.js +78 -0
  3. package/dist/Autocomplete-BnQpnnyK.js +27 -0
  4. package/dist/Autocomplete-C2FkoM3g.js +52 -0
  5. package/dist/Autocomplete-Da3h7NqJ.js +53 -0
  6. package/dist/CSharp-Dxc7debp.js +27 -0
  7. package/dist/Calender-CZajLEjs.js +10 -0
  8. package/dist/Callback-txUuqwa4.js +24 -0
  9. package/dist/Cascader-Bm6ZjZBu.js +84 -0
  10. package/dist/Cascader-CWljbVzB.js +45 -0
  11. package/dist/Checkbox-CYpA0Abh.js +69 -0
  12. package/dist/Checkbox-DvjA_jtM.js +27 -0
  13. package/dist/Code--QwKtfhx.js +4 -0
  14. package/dist/Code-BO3eZKLy.js +58 -0
  15. package/dist/Code-Dh_cfHCX.js +40 -0
  16. package/dist/Code-Dn68YB2V.js +28 -0
  17. package/dist/Code.vue_vue_type_style_index_0_lang-DcAjaZOQ.js +63 -0
  18. package/dist/Color-CfXtJFUo.js +22 -0
  19. package/dist/Color-Da69pnQg.js +34 -0
  20. package/dist/Column-DGnsLHim.js +69 -0
  21. package/dist/Comment--Tr_kWBl.js +102 -0
  22. package/dist/Compare-C3rlbp4P.js +60 -0
  23. package/dist/Compare-DaSyOFIe.js +30 -0
  24. package/dist/Copy-C5yEC9dX.js +43 -0
  25. package/dist/Custom-K9vfVRxn.js +53 -0
  26. package/dist/DataExport-GCZvxEp5.js +4 -0
  27. package/dist/DataExport.vue_vue_type_script_setup_true_lang-CqT0RHF6.js +112 -0
  28. package/dist/DataImport-BofV1eCR.js +4 -0
  29. package/dist/DataImport.vue_vue_type_script_setup_true_lang-WCH5ToC7.js +174 -0
  30. package/dist/Date-BeHsQ2Ow.js +36 -0
  31. package/dist/Date-DgpsRJon.js +27 -0
  32. package/dist/DateRange-DrYK_l0Y.js +19 -0
  33. package/dist/DateRange-UHosLXP9.js +61 -0
  34. package/dist/DateTime-BfNjKDfI.js +37 -0
  35. package/dist/DateTime-CHn5T-FB.js +27 -0
  36. package/dist/DateTimeRange-6TctUiMd.js +65 -0
  37. package/dist/Daterange-DISQqOFM.js +61 -0
  38. package/dist/Decimal-BB2w4V2o.js +27 -0
  39. package/dist/Decimal-C38-N54B.js +36 -0
  40. package/dist/Delete-C7gIYWP8.js +59 -0
  41. package/dist/Detail-D-6vJTGF.js +70 -0
  42. package/dist/Dictionary-DfEacdox.js +59 -0
  43. package/dist/Email-BKW9GRcH.js +19 -0
  44. package/dist/Email-ME_MU94C.js +47 -0
  45. package/dist/File-CMCYSg30.js +158 -0
  46. package/dist/Image-BL458jPH.js +9 -0
  47. package/dist/Index-8lbvVECt.js +4 -0
  48. package/dist/Index-B1ZfzgLV.js +4 -0
  49. package/dist/Index-C_HCipwv.js +4 -0
  50. package/dist/Index-Ch59SxF3.js +74 -0
  51. package/dist/Index-CopnEHli.js +4 -0
  52. package/dist/Index-Cp7EDm0u.js +173 -0
  53. package/dist/Index-DZkeSKKp.js +4 -0
  54. package/dist/Index-tbCW5R6_.js +4 -0
  55. package/dist/Index.vue_vue_type_script_setup_true_lang-B-sM48XO.js +36 -0
  56. package/dist/Index.vue_vue_type_script_setup_true_lang-DOibFo1_.js +70 -0
  57. package/dist/Index.vue_vue_type_script_setup_true_lang-Dwm5MQ9l.js +82 -0
  58. package/dist/Index.vue_vue_type_style_index_0_lang-D9Jt6Of_.js +113 -0
  59. package/dist/Install-CJbpeRw0.js +130 -0
  60. package/dist/Int-B-t8edhd.js +19 -0
  61. package/dist/Int-C-0RMDmy.js +37 -0
  62. package/dist/Int-CkzuFSk2.js +45 -0
  63. package/dist/List-V1uPlNfP.js +77 -0
  64. package/dist/Maintaince-BM4tthS_.js +19 -0
  65. package/dist/Markdown-BzMP3m7o.js +37 -0
  66. package/dist/Markdown-Dq7L9EMQ.js +27 -0
  67. package/dist/Month-B_SzKf02.js +36 -0
  68. package/dist/Month-CUX-EnU_.js +27 -0
  69. package/dist/Month-DfemgHac.js +37 -0
  70. package/dist/Normal-B2w0Isvm.js +255 -0
  71. package/dist/Paging-Bnpq9uSh.js +95 -0
  72. package/dist/PagingHeader-CBXHiUXR.js +140 -0
  73. package/dist/PagingRow-tny-wHwu.js +66 -0
  74. package/dist/Password-DuyYEgzR.js +55 -0
  75. package/dist/Password-yHtlY-Qa.js +24 -0
  76. package/dist/Progress-C3D821AQ.js +34 -0
  77. package/dist/Progress-CKVzMO-W.js +25 -0
  78. package/dist/QueryApi-BLc_au6L.js +18 -0
  79. package/dist/Racebar-DqWtIQm-.js +166 -0
  80. package/dist/Radio-DkcBKBvX.js +47 -0
  81. package/dist/Radio-xLd4l78I.js +27 -0
  82. package/dist/Rate-B7jKTFKT.js +34 -0
  83. package/dist/Rate-BmC4gw_0.js +34 -0
  84. package/dist/Register-Bio0HxyZ.js +203 -0
  85. package/dist/RichText-BYNi_iMx.js +105 -0
  86. package/dist/RichText-Bk0Msyhl.js +22 -0
  87. package/dist/SearchFooter-BAPlMiuj.js +4 -0
  88. package/dist/SearchFooter.vue_vue_type_style_index_0_lang-Bp7M7_IY.js +55 -0
  89. package/dist/SearchForm-BaPwWOch.js +4 -0
  90. package/dist/SearchForm.vue_vue_type_style_index_0_lang-BJeXUISp.js +150 -0
  91. package/dist/Select-DMDcHdlD.js +116 -0
  92. package/dist/Select-Dlx4Tg2X.js +27 -0
  93. package/dist/Select-Doyr8ioF.js +84 -0
  94. package/dist/Single-B4EEi5Bm.js +323 -0
  95. package/dist/Statistic-AY1NP5tM.js +161 -0
  96. package/dist/Statistic-CTxHNeof.js +76 -0
  97. package/dist/Stock-CcBqUgOB.js +28 -0
  98. package/dist/Stock-Sh2UHojP.js +4 -0
  99. package/dist/Stock.vue_vue_type_style_index_0_lang-CcHVxdzc.js +302 -0
  100. package/dist/Switch-BOsRzAW-.js +27 -0
  101. package/dist/Switch-DhFaku5L.js +50 -0
  102. package/dist/Table-C9IrdZEj.js +241 -0
  103. package/dist/Table-CrMo5L6q.js +318 -0
  104. package/dist/Text-BRRmmXYV.js +52 -0
  105. package/dist/Text-DKpPIUcY.js +51 -0
  106. package/dist/Text-vz76Xb4X.js +4 -0
  107. package/dist/Text.vue_vue_type_style_index_0_lang-BMxOYNEI.js +56 -0
  108. package/dist/TextLink-DKm6XbeF.js +66 -0
  109. package/dist/Textarea-D9TgF9ig.js +37 -0
  110. package/dist/Textarea-WPLyT7XC.js +28 -0
  111. package/dist/Time-BcQzBDX-.js +36 -0
  112. package/dist/Timeline-Dolubd-b.js +57 -0
  113. package/dist/Tree-Bv5eVC8s.js +122 -0
  114. package/dist/Tree-KwP6ais4.js +295 -0
  115. package/dist/TreeNode-rHeuE2ot.js +38 -0
  116. package/dist/Tree_Old-h__WmqFA.js +11 -0
  117. package/dist/Update-C5bPCalk.js +65 -0
  118. package/dist/UpdateChild-B2A3hP6m.js +85 -0
  119. package/dist/Upload-BSbIQu56.js +147 -0
  120. package/dist/Upload-heb0FQTh.js +72 -0
  121. package/dist/UploadApi-vYU0Jda6.js +18 -0
  122. package/dist/Year-1ug2_a1g.js +40 -0
  123. package/dist/Year-Dlp5PKhI.js +27 -0
  124. package/dist/main-Bs5Q5ZLl.js +6535 -0
  125. package/dist/main.js +110 -0
  126. package/dist/style.css +1 -0
  127. package/dist/vendor-@intlify-BISCQg1h.js +2189 -0
  128. package/dist/vendor-@monaco-editor-DKC4UNw_.js +258 -0
  129. package/dist/vendor-@vue-aVYGocXp.js +93 -0
  130. package/dist/vendor-clipboard-BqjesuiY.js +521 -0
  131. package/dist/vendor-clone-BPtCWdXG.js +134 -0
  132. package/dist/vendor-crypto-js-ftX_aBC-.js +4995 -0
  133. package/dist/vendor-element-plus-Z7vJFrsh.js +456 -0
  134. package/dist/vendor-file-saver-CytTIJ-3.js +74 -0
  135. package/dist/vendor-intro.js-CZkClzQO.js +1695 -0
  136. package/dist/vendor-moment-h96o7c8I.js +2578 -0
  137. package/dist/vendor-pinia-C-_fm-ER.js +1167 -0
  138. package/dist/vendor-sprintf-js-BPTdvBYM.js +148 -0
  139. package/dist/vendor-state-local-CEworIRt.js +131 -0
  140. package/dist/vendor-underscore-DVTek3G4.js +1070 -0
  141. package/dist/vendor-underscore.string-BEHfJwHl.js +425 -0
  142. package/dist/vendor-util-deprecate-DzpNkCzj.js +28 -0
  143. package/dist/vendor-vue-demi-DdR-Jw7p.js +31 -0
  144. package/dist/vendor-vue-i18n-C3KH15Qn.js +1670 -0
  145. package/package.json +1 -1
@@ -0,0 +1,27 @@
1
+ import { defineComponent as u, defineAsyncComponent as f, toRefs as c, openBlock as b, createBlock as V, unref as e, isRef as w } from "vue";
2
+ const x = /* @__PURE__ */ u({
3
+ __name: "Select",
4
+ props: {
5
+ schema: {},
6
+ table: {},
7
+ field: {},
8
+ set: {},
9
+ row: {},
10
+ modelValue: { type: [String, Number, Boolean] }
11
+ },
12
+ setup(a) {
13
+ let r = f(() => import("./Dictionary-DfEacdox.js")), n = a, { schema: m, table: s, field: d, set: i, row: p, modelValue: l } = c(n);
14
+ return (_, t) => (b(), V(e(r), {
15
+ schema: e(m),
16
+ table: e(s),
17
+ field: e(d),
18
+ set: e(i),
19
+ row: e(p),
20
+ modelValue: e(l),
21
+ "onUpdate:modelValue": t[0] || (t[0] = (o) => w(l) ? l.value = o : l = o)
22
+ }, null, 8, ["schema", "table", "field", "set", "row", "modelValue"]));
23
+ }
24
+ });
25
+ export {
26
+ x as default
27
+ };
@@ -0,0 +1,84 @@
1
+ import { defineComponent as K, toRefs as R, ref as i, computed as S, resolveComponent as p, openBlock as r, createBlock as c, unref as l, withKeys as M, withModifiers as N, isRef as F, withCtx as f, createElementBlock as h, Fragment as L, renderList as U, createElementVNode as j, toDisplayString as v, createCommentVNode as q } from "vue";
2
+ import { h as z } from "./main-Bs5Q5ZLl.js";
3
+ import "xlsx-js-style";
4
+ import "./vendor-crypto-js-ftX_aBC-.js";
5
+ import "./vendor-@monaco-editor-DKC4UNw_.js";
6
+ import "./vendor-moment-h96o7c8I.js";
7
+ const A = { class: "option-text" }, G = {
8
+ key: 0,
9
+ class: "option-suffix"
10
+ }, X = /* @__PURE__ */ K({
11
+ __name: "Select",
12
+ props: {
13
+ schema: {},
14
+ table: {},
15
+ field: {},
16
+ searchData: {},
17
+ modelValue: { type: [String, Boolean] }
18
+ },
19
+ emits: ["change", "submit", "update:modelValue"],
20
+ setup(_, { emit: x }) {
21
+ let s = x, b = _, { schema: H, table: g, field: a, searchData: y, modelValue: V } = R(b), k = i(!1), d = i(), m = i(a.value.control.data.data), C = () => {
22
+ s("submit");
23
+ }, w = () => {
24
+ }, B = (t) => {
25
+ d.value = t, D();
26
+ }, D = () => {
27
+ let t = { text: d.value, conditions: [] };
28
+ a.value.control.data.conditions.forEach((o) => {
29
+ let u = y.value[o.table][o.field];
30
+ t.conditions.push({ name: o.name, value: u });
31
+ }), z.post(a.value.control.data.route, t).then(({ data: o }) => {
32
+ m.value = o;
33
+ }).finally(() => {
34
+ k.value = !1;
35
+ });
36
+ }, n = S({
37
+ get() {
38
+ return V.value;
39
+ },
40
+ set(t) {
41
+ s("update:modelValue", t), s("change", t);
42
+ }
43
+ });
44
+ return (t, o) => {
45
+ const u = p("el-option"), E = p("el-select");
46
+ return r(), c(E, {
47
+ ref: "selectRef",
48
+ filterable: "",
49
+ remote: "",
50
+ "reserve-keyword": "",
51
+ clearable: "",
52
+ "default-first-option": "",
53
+ "remote-show-suffix": "",
54
+ placeholder: t.t("common.please_choose") + t.t_field(l(g).name, l(a).name),
55
+ multiple: l(a).control.multiple,
56
+ "loading-text": "加载中",
57
+ "remote-method": l(B),
58
+ disabled: l(a).control.readonly,
59
+ onKeyup: M(N(l(C), ["alt"]), ["enter", "native"]),
60
+ onChange: l(w),
61
+ modelValue: l(n),
62
+ "onUpdate:modelValue": o[0] || (o[0] = (e) => F(n) ? n.value = e : n = e)
63
+ }, {
64
+ default: f(() => [
65
+ (r(!0), h(L, null, U(l(m), (e, I) => (r(), c(u, {
66
+ label: e.text + (e.suffix ? "(" + e.suffix + ")" : ""),
67
+ value: e.value,
68
+ key: e.value
69
+ }, {
70
+ default: f(() => [
71
+ j("span", A, v(e.text), 1),
72
+ e.suffix ? (r(), h("span", G, "(" + v(e.suffix) + ")", 1)) : q("", !0)
73
+ ]),
74
+ _: 2
75
+ }, 1032, ["label", "value"]))), 128))
76
+ ]),
77
+ _: 1
78
+ }, 8, ["placeholder", "multiple", "remote-method", "disabled", "onKeyup", "onChange", "modelValue"]);
79
+ };
80
+ }
81
+ });
82
+ export {
83
+ X as default
84
+ };
@@ -0,0 +1,323 @@
1
+ import { defineComponent as Be, toRefs as De, ref as r, computed as Y, watch as Le, resolveComponent as c, openBlock as d, createElementBlock as F, normalizeClass as Pe, unref as e, createElementVNode as m, createVNode as h, withCtx as s, withModifiers as Me, createBlock as g, isRef as Z, Fragment as ee, renderList as le, toDisplayString as k, createCommentVNode as B, resolveDynamicComponent as Ne, normalizeStyle as Oe, createTextVNode as te, nextTick as ae } from "vue";
2
+ import { u as je, l as qe, g as O, o as Ke, O as Fe, h as He, M as oe, P as Ae, j as re } from "./main-Bs5Q5ZLl.js";
3
+ import "xlsx-js-style";
4
+ import "./vendor-crypto-js-ftX_aBC-.js";
5
+ import "./vendor-@monaco-editor-DKC4UNw_.js";
6
+ import "./vendor-moment-h96o7c8I.js";
7
+ import { _ as Ie } from "./Index.vue_vue_type_style_index_0_lang-D9Jt6Of_.js";
8
+ import { _ as ue } from "./Index.vue_vue_type_script_setup_true_lang-DOibFo1_.js";
9
+ const Ge = { class: "ha-main-form" }, Je = { class: "row-header" }, Qe = { class: "row-title" }, We = /* @__PURE__ */ m("i", { class: "fa fa-close" }, null, -1), Xe = [
10
+ We
11
+ ], Ye = /* @__PURE__ */ m("i", { class: "fa fa-question-circle icon-question" }, null, -1), Ze = { class: "el-drawer__title" }, el = ["href"], dl = /* @__PURE__ */ Be({
12
+ __name: "Single",
13
+ props: {
14
+ base: {},
15
+ route: {},
16
+ url: {}
17
+ },
18
+ emits: ["navigate", "load", "succeed", "close"],
19
+ setup(ne, { expose: se, emit: ie }) {
20
+ let D = ie, de = ne, { url: me, base: H, route: z } = De(de), f = r(), b = r(), v = r(), u = r(), y = r(), L = r(), p = r({ table: null, layout: null }), w = r(), P = r([]), ve = r(), E = r(), x = r(), j = r(), C = r(), M = r(), { t_module: pe, $t_table: ce } = je(), fe = qe(), i = r({ page: null, url: null, visible: !1, appendToBody: !1 }), S = r(!1), q = r(), R = r(), be = (l) => !0, ye = (l) => {
21
+ let t = O.getPath(me.value), a = O.getPath(l);
22
+ return t != a;
23
+ }, _e = () => {
24
+ Ee();
25
+ }, he = (l, t) => {
26
+ A("copy", l, t);
27
+ }, ge = (l, t) => {
28
+ A("update", l, t);
29
+ }, we = () => {
30
+ i.value.visible = !1;
31
+ }, A = (l, t, a) => {
32
+ let n = Ce(l, t);
33
+ a.ctrlKey ? D("navigate", n) : (i.value.appendToBody = a.altKey, i.value.page = l, i.value.url = n, i.value.visible = !0);
34
+ }, Ce = (l, t = null) => {
35
+ let a = `${b.value[l].route}`;
36
+ if (t != null) {
37
+ let n = t[y.value.key.name];
38
+ a += `?id=${n}`;
39
+ }
40
+ return a;
41
+ }, Se = (l, t, a) => {
42
+ (a.ctrlKey || S.value) && (q.value = l, R.value = Fe.clone(t), S.value = !0, R.value.fields.forEach((n) => {
43
+ n.control.textualize = !1;
44
+ }));
45
+ }, I = (l) => {
46
+ i.value.visible = !1, D("succeed", W.value, l);
47
+ }, ke = () => {
48
+ D("close");
49
+ }, G = (l, t, a, n, T) => {
50
+ }, J = (l, t) => {
51
+ if (t) {
52
+ L.value = y.value.layouts.find((a) => a.type == l);
53
+ return;
54
+ }
55
+ p.value.layout = p.value.table.layouts.find((a) => a.type == l);
56
+ }, xe = (l) => {
57
+ let t = u.value.find((a) => a.name == l);
58
+ p.value.table = t, p.value.layout = t.layouts[0];
59
+ }, Re = (l) => {
60
+ let t = Object.keys(l)[0], a = t.substring(1, t.indexOf("]"));
61
+ u.value.find((T) => T.name == a).main || (w.value = a);
62
+ }, Te = (l, t = null, a = null) => {
63
+ ae(() => {
64
+ E.value.validate((n, T) => {
65
+ if (!n)
66
+ return Re(T), a && a(!1), !1;
67
+ let $ = f.value.type == "Update" ? b.value.update.route : b.value.insert.route;
68
+ t && t($, v.value), He.post($, v.value).then(({ data: U, message: V }) => {
69
+ E.value.clearValidate(), oe.success(V), I(v.value);
70
+ }).catch(({ code: U, data: V, message: X }) => {
71
+ if (U != "ValidateError")
72
+ return;
73
+ P.value = V;
74
+ let N = V.find((_) => _.table !== y.value.name);
75
+ if (N) {
76
+ let _ = u.value.find((o) => o.name == N.table);
77
+ _ && (w.value = _.name);
78
+ }
79
+ ae(() => {
80
+ E.value.clearValidate(), E.value.validate((_, o) => {
81
+ _ || (a && a(!1), P.value = []);
82
+ });
83
+ });
84
+ }).finally(() => {
85
+ a && a();
86
+ });
87
+ });
88
+ });
89
+ }, Q = (l) => {
90
+ var a, n;
91
+ let t = pe(l.module.type, l.module.name);
92
+ Ae.setTitle(t, l.module.env), f.value = l.module, b.value = l.next, v.value = re.expandSet(l.schema, l.set), u.value = re.expandSchema(l.schema), y.value = (a = u.value) == null ? void 0 : a[0], L.value = y.value.layouts[0], ((n = u.value) == null ? void 0 : n.length) > 1 && (w.value = u.value[1].name, p.value.table = u.value[1], p.value.layout = u.value[1].layouts[0]);
93
+ }, Ve = (l) => {
94
+ x.value && x.value.resize && x.value.resize(l), C.value && C.value.resize && C.value.resize(l);
95
+ }, ze = (l, t) => {
96
+ if (l == "ctrlS") {
97
+ if (f.value.type == "Detail") {
98
+ if (!M.value || !M.value.keyboard)
99
+ return !1;
100
+ M.value.keyboard(l, t);
101
+ return;
102
+ }
103
+ K(t);
104
+ }
105
+ }, Ee = () => {
106
+ let l = O.getUrl(z.value.path, z.value.query);
107
+ D("load", l, !1, (t) => {
108
+ });
109
+ };
110
+ (() => {
111
+ Q(H.value.data);
112
+ })();
113
+ let K = (l) => {
114
+ if (!j.value.submit) {
115
+ oe.notify("提示", "请在子组件暴露submit方法来实现快捷提交", "warning");
116
+ return;
117
+ }
118
+ j.value.submit(l);
119
+ }, $e = Y(() => {
120
+ let l = `/${y.value.name}/update`, t = f.value.type == "Detail" ? "detail" : "update";
121
+ return fe.getComponent(l, "partial", t);
122
+ }), W = Y(() => f.value.type.toLowerCase());
123
+ return Le(() => H.value, (l) => {
124
+ Q(l.data), x.value.update && x.value.update(l.data), C.value && C.value.update && C.value.update(l.data);
125
+ }), se({ shouldLoad: be, shouldSpin: ye, keyboard: ze, refresh: _e, resize: Ve }), (l, t) => {
126
+ const a = c("el-tooltip"), n = c("el-tab-pane"), T = c("el-tabs"), $ = c("el-form"), U = c("el-scrollbar"), V = c("el-popover"), X = c("el-form-item"), N = c("el-card"), _ = c("el-drawer");
127
+ return d(), F("div", {
128
+ ref_key: "singleRef",
129
+ ref: ve,
130
+ class: Pe(["ha-single-page", { [e(W) + "-page"]: !0, editing: e(S) }])
131
+ }, [
132
+ m("div", Ge, [
133
+ h(U, { class: "main-scroller" }, {
134
+ default: s(() => [
135
+ h($, {
136
+ ref_key: "formRef",
137
+ ref: E,
138
+ model: e(v),
139
+ onSubmit: t[3] || (t[3] = Me(() => {
140
+ }, ["prevent"]))
141
+ }, {
142
+ default: s(() => [
143
+ h(ue, {
144
+ ref_key: "mainRef",
145
+ ref: x,
146
+ module: e(f),
147
+ schema: e(u),
148
+ table: e(y),
149
+ layout: e(L),
150
+ next: e(b),
151
+ set: e(v),
152
+ route: e(z),
153
+ "validate-errors": e(P),
154
+ onChange: e(G),
155
+ onLayoutChange: t[0] || (t[0] = (o) => e(J)(o, !0)),
156
+ onSubmit: e(K)
157
+ }, null, 8, ["module", "schema", "table", "layout", "next", "set", "route", "validate-errors", "onChange", "onSubmit"]),
158
+ e(u).length > 1 ? (d(), g(T, {
159
+ key: 0,
160
+ type: "border-card",
161
+ onTabChange: e(xe),
162
+ modelValue: e(w),
163
+ "onUpdate:modelValue": t[1] || (t[1] = (o) => Z(w) ? w.value = o : w = o)
164
+ }, {
165
+ default: s(() => [
166
+ (d(!0), F(ee, null, le(e(u).filter((o, Ue) => Ue > 0), (o) => (d(), g(n, {
167
+ name: o.name,
168
+ key: o.name
169
+ }, {
170
+ label: s(() => [
171
+ h(a, {
172
+ placement: "top",
173
+ content: o.tooltip,
174
+ disabled: !o.tooltip
175
+ }, {
176
+ default: s(() => [
177
+ m("div", null, k(e(ce)(o.table)), 1)
178
+ ]),
179
+ _: 2
180
+ }, 1032, ["content", "disabled"])
181
+ ]),
182
+ _: 2
183
+ }, 1032, ["name"]))), 128))
184
+ ]),
185
+ _: 1
186
+ }, 8, ["onTabChange", "modelValue"])) : B("", !0),
187
+ e(p).table ? (d(), g(ue, {
188
+ key: 1,
189
+ ref_key: "childRef",
190
+ ref: C,
191
+ module: e(f),
192
+ schema: e(u),
193
+ table: e(p).table,
194
+ layout: e(p).layout,
195
+ next: e(b),
196
+ set: e(v),
197
+ route: e(z),
198
+ "validate-errors": e(P),
199
+ onRowEdit: e(Se),
200
+ onChange: e(G),
201
+ onLayoutChange: t[2] || (t[2] = (o) => e(J)(o, !1)),
202
+ onSubmit: e(K)
203
+ }, null, 8, ["module", "schema", "table", "layout", "next", "set", "route", "validate-errors", "onRowEdit", "onChange", "onSubmit"])) : B("", !0)
204
+ ]),
205
+ _: 1
206
+ }, 8, ["model"])
207
+ ]),
208
+ _: 1
209
+ }),
210
+ (d(), g(Ne(e($e)), {
211
+ ref_key: "updateRef",
212
+ ref: j,
213
+ class: "main-footer",
214
+ schema: e(u),
215
+ table: e(y),
216
+ layout: e(L),
217
+ next: e(b),
218
+ set: e(v),
219
+ route: e(z),
220
+ onCopy: e(he),
221
+ onEdit: e(ge),
222
+ onSubmit: e(Te),
223
+ onClose: e(ke)
224
+ }, null, 40, ["schema", "table", "layout", "next", "set", "route", "onCopy", "onEdit", "onSubmit", "onClose"]))
225
+ ]),
226
+ e(S) ? (d(), g(N, {
227
+ key: 0,
228
+ class: "side-form"
229
+ }, {
230
+ header: s(() => [
231
+ m("div", Je, [
232
+ m("div", Qe, k(l.t("common.modify")) + " " + k(e(q)[e(R).show[0].name]), 1),
233
+ m("div", {
234
+ class: "row-close",
235
+ onClick: t[4] || (t[4] = (o) => Z(S) ? S.value = !1 : S = !1)
236
+ }, Xe)
237
+ ])
238
+ ]),
239
+ default: s(() => [
240
+ h(U, null, {
241
+ default: s(() => [
242
+ h($, {
243
+ size: "small",
244
+ "label-width": "80px"
245
+ }, {
246
+ default: s(() => [
247
+ (d(!0), F(ee, null, le(e(R).show, (o) => (d(), g(X, {
248
+ style: Oe(o.control.height ? `height: ${o.control.height}px;` : ""),
249
+ rules: o.rules
250
+ }, {
251
+ label: s(() => [
252
+ te(k(l.t_field(e(R).name, o.name)) + " ", 1),
253
+ o.control.tooltip ? (d(), g(V, {
254
+ key: 0,
255
+ trigger: "hover",
256
+ placement: "top",
257
+ width: "auto",
258
+ title: o.control.tooltip.title
259
+ }, {
260
+ reference: s(() => [
261
+ Ye
262
+ ]),
263
+ default: s(() => [
264
+ m("pre", null, k(o.control.tooltip.content), 1)
265
+ ]),
266
+ _: 2
267
+ }, 1032, ["title"])) : B("", !0)
268
+ ]),
269
+ default: s(() => [
270
+ h(Ie, {
271
+ schema: e(u),
272
+ table: e(R),
273
+ field: o,
274
+ set: e(v),
275
+ row: e(q)
276
+ }, null, 8, ["schema", "table", "field", "set", "row"])
277
+ ]),
278
+ _: 2
279
+ }, 1032, ["style", "rules"]))), 256))
280
+ ]),
281
+ _: 1
282
+ })
283
+ ]),
284
+ _: 1
285
+ })
286
+ ]),
287
+ _: 1
288
+ })) : B("", !0),
289
+ e(i).page ? (d(), g(_, {
290
+ key: 1,
291
+ "destroy-on-close": "",
292
+ "append-to-body": e(i).appendToBody,
293
+ size: `${e(f).width ?? "60%"}`,
294
+ modelValue: e(i).visible,
295
+ "onUpdate:modelValue": t[5] || (t[5] = (o) => e(i).visible = o)
296
+ }, {
297
+ header: s(() => [
298
+ m("div", Ze, [
299
+ te(k(e(b)[e(i).page].title) + " ", 1),
300
+ m("a", {
301
+ class: "drawer-copy",
302
+ href: `${e(O).getToUrl(e(i).url)}`
303
+ }, k(l.t("common.link")), 9, el)
304
+ ])
305
+ ]),
306
+ default: s(() => [
307
+ h(e(Ke), {
308
+ ref_key: "pageRef",
309
+ ref: M,
310
+ url: e(i).url,
311
+ onSucceed: e(I),
312
+ onClose: e(we)
313
+ }, null, 8, ["url", "onSucceed", "onClose"])
314
+ ]),
315
+ _: 1
316
+ }, 8, ["append-to-body", "size", "modelValue"])) : B("", !0)
317
+ ], 2);
318
+ };
319
+ }
320
+ });
321
+ export {
322
+ dl as default
323
+ };
@@ -0,0 +1,161 @@
1
+ import { defineComponent as N, toRefs as $, ref as n, onMounted as q, watch as G, openBlock as O, createElementBlock as I, createVNode as J, unref as i, createElementVNode as K, normalizeStyle as P, nextTick as m } from "vue";
2
+ import { i as Q, j as U, A as W, M as X, D as Y } from "./main-Bs5Q5ZLl.js";
3
+ import "xlsx-js-style";
4
+ import "./vendor-crypto-js-ftX_aBC-.js";
5
+ import "./vendor-@monaco-editor-DKC4UNw_.js";
6
+ import "./vendor-moment-h96o7c8I.js";
7
+ import { _ as Z } from "./SearchForm.vue_vue_type_style_index_0_lang-BJeXUISp.js";
8
+ const ne = /* @__PURE__ */ N({
9
+ __name: "Statistic",
10
+ props: {
11
+ searchData: {},
12
+ route: {},
13
+ module: {},
14
+ schema: {},
15
+ table: {},
16
+ layout: {},
17
+ next: {},
18
+ set: {}
19
+ },
20
+ emits: ["search"],
21
+ setup(A, { expose: C, emit: H }) {
22
+ let F = H, z = A, { route: D, module: B, schema: p, table: x, layout: a, next: ee, set: u, searchData: y } = $(z), g = Q(), s = null, v = null, b = n(), f = n(), S = n(), k = n(), M = (t) => {
23
+ T("search");
24
+ }, T = (t, e = null) => {
25
+ F(t, (r) => {
26
+ m(() => {
27
+ d(), e && e(r);
28
+ });
29
+ });
30
+ }, d = () => {
31
+ let t = W.distinct(u.value[a.value.table], (l) => l[a.value.date]), e = {
32
+ title: { text: B.value.title, left: "center", textStyle: { color: "#777" } },
33
+ //标题
34
+ tooltip: { trigger: "axis" },
35
+ //提示
36
+ legend: { data: [], right: "2%", textStyle: { color: "#777" } },
37
+ //图例
38
+ grid: { left: "2%", right: "3%", containLabel: !0 },
39
+ //网格
40
+ //x轴
41
+ xAxis: {
42
+ data: [],
43
+ //X坐标轴数据
44
+ boundaryGap: !1,
45
+ //移除边界
46
+ axisTick: { show: !1 },
47
+ //不显示坐标轴刻度
48
+ axisLabel: { color: "#777" },
49
+ axisLine: { show: !1 }
50
+ //隐藏x坐标轴线
51
+ },
52
+ //y轴
53
+ yAxis: {
54
+ type: "value",
55
+ axisTick: { show: !1 },
56
+ //不显示坐标轴刻度
57
+ axisLabel: { color: "#777" },
58
+ splitLine: { lineStyle: { color: "#eee" } },
59
+ axisLine: { show: !1 }
60
+ //隐藏y坐标轴线
61
+ },
62
+ //坐标
63
+ series: []
64
+ };
65
+ g.theme == "dark" && (e.title.textStyle.color = "rgba(255,255,255,0.8)", e.legend.textStyle.color = "rgba(255,255,255,.72)", e.xAxis.axisLabel.color = "rgba(255,255,255,.72)", e.yAxis.splitLine.lineStyle.color = "rgba(110,117,130,0.2)", e.yAxis.axisLabel.color = "rgba(255,255,255,.72)");
66
+ let r = a.value.fields.find((l) => l.group && l.name != a.value.date), L = x.value.fields.find((l) => l.name == r.name).control.data.data;
67
+ for (let l = 0; l < L.length; l++) {
68
+ let o = L[l];
69
+ o.color || X.error("颜色字段不能为空");
70
+ let c = {
71
+ name: o.text,
72
+ type: "line",
73
+ lineStyle: { color: o.color, width: 1 },
74
+ itemStyle: { color: o.color },
75
+ //点样式
76
+ smooth: !0,
77
+ data: [],
78
+ areaStyle: {
79
+ color: {
80
+ type: "linear",
81
+ x: 0,
82
+ y: 0,
83
+ x2: 1,
84
+ y2: 0,
85
+ colorStops: [
86
+ { offset: 0, color: o.color },
87
+ // 0% 处的颜色
88
+ { offset: 1, color: "#fff" }
89
+ // 100% 处的颜色
90
+ ],
91
+ global: !1
92
+ }
93
+ }
94
+ };
95
+ g.theme == "dark" && (c.areaStyle.color = {
96
+ type: "linear",
97
+ x: 0,
98
+ y: 0,
99
+ x2: 0,
100
+ y2: 1,
101
+ colorStops: [
102
+ { offset: 0, color: o.color },
103
+ // 0% 处的颜色
104
+ { offset: 1, color: "#354052" }
105
+ // 100% 处的颜色
106
+ ],
107
+ global: !0
108
+ });
109
+ for (let h = 0; h < t.length; h++) {
110
+ let E = t[h], w = u.value[a.value.table].find((R) => R[r.name] == o.value && R[a.value.date] == E);
111
+ w == null ? c.data.push(null) : c.data.push(w[a.value.value]);
112
+ }
113
+ e.series.push(c), e.legend.data.push(o.text);
114
+ }
115
+ e.xAxis.data.push(...t), s.setOption(e);
116
+ }, _ = () => {
117
+ var r;
118
+ let t = Y.getHeight([(r = f.value) == null ? void 0 : r.$el]), e = k.value.getBoundingClientRect();
119
+ b.value = e.height - t - 10 - 1;
120
+ }, V = (t) => {
121
+ f.value.resize(t), m(() => {
122
+ _(), s == null || s.resize();
123
+ });
124
+ }, j = () => {
125
+ _(), m(() => {
126
+ s = v.init(S.value), d();
127
+ });
128
+ };
129
+ return q(() => {
130
+ y.value = U.getConditionForm(p.value, D.value.query.condition), import("echarts").then((t) => {
131
+ v = t, j();
132
+ });
133
+ }), G(() => a.value, (t, e) => {
134
+ d();
135
+ }), C({ resize: V }), (t, e) => (O(), I("div", {
136
+ ref_key: "statisticRef",
137
+ ref: k,
138
+ class: "ha-statistic-layout"
139
+ }, [
140
+ J(Z, {
141
+ ref_key: "searchRef",
142
+ ref: f,
143
+ schema: i(p),
144
+ table: i(x),
145
+ layout: i(a),
146
+ set: i(u),
147
+ "search-data": i(y),
148
+ onChange: i(M)
149
+ }, null, 8, ["schema", "table", "layout", "set", "search-data", "onChange"]),
150
+ K("div", {
151
+ ref_key: "chartRef",
152
+ ref: S,
153
+ class: "chart",
154
+ style: P({ height: i(b) + "px" })
155
+ }, null, 4)
156
+ ], 512));
157
+ }
158
+ });
159
+ export {
160
+ ne as default
161
+ };
@@ -0,0 +1,76 @@
1
+ import { defineComponent as h, toRefs as f, onMounted as x, resolveComponent as v, openBlock as _, createElementBlock as g, createVNode as y, unref as A } from "vue";
2
+ const b = { class: "ha-statistic-layout" }, k = /* @__PURE__ */ h({
3
+ __name: "Statistic",
4
+ props: {
5
+ route: {},
6
+ validateErrors: {},
7
+ module: {},
8
+ schema: {},
9
+ table: {},
10
+ layout: {},
11
+ next: {},
12
+ set: {}
13
+ },
14
+ setup(p) {
15
+ let c = p, { schema: E, table: a, layout: l, set: n } = f(c), t = {
16
+ plotOptions: {
17
+ series: { animation: !1 }
18
+ //禁用载入动画
19
+ },
20
+ chart: {
21
+ type: "spline",
22
+ marginRight: 10
23
+ },
24
+ title: {
25
+ text: null
26
+ },
27
+ xAxis: {
28
+ name: null,
29
+ categories: []
30
+ },
31
+ yAxis: {
32
+ title: {
33
+ text: null
34
+ }
35
+ },
36
+ tooltip: {
37
+ shared: !0
38
+ },
39
+ series: []
40
+ }, m = () => {
41
+ let s = l.value.fields.find((e) => e.group);
42
+ t.xAxis.name = s.name, t.xAxis.categories = n.value[a.value.name].map((e) => e[s.name]);
43
+ let o = [];
44
+ l.value.fields.forEach((e) => {
45
+ if (!e.group) {
46
+ let r = a.value.fields.find((i) => i.name == e.name), u = {
47
+ name: r.label,
48
+ tooltip: {
49
+ valueSuffix: " ms"
50
+ },
51
+ data: []
52
+ };
53
+ n.value[a.value.name].forEach((i) => {
54
+ u.data.push(parseFloat(i[r.name]));
55
+ }), o.push(u);
56
+ }
57
+ }), t.series = o, t.yAxis.title.text = l.value.value;
58
+ }, d = () => {
59
+ m();
60
+ };
61
+ return x(() => {
62
+ d();
63
+ }), (s, o) => {
64
+ const e = v("Highcharts");
65
+ return _(), g("div", b, [
66
+ y(e, {
67
+ class: "chart",
68
+ options: A(t)
69
+ }, null, 8, ["options"])
70
+ ]);
71
+ };
72
+ }
73
+ });
74
+ export {
75
+ k as default
76
+ };