halo-pc 1.0.38 → 1.0.40

Sign up to get free protection for your applications and to get access to all the features.
Files changed (150) hide show
  1. package/dist/{Article-H_clf90b.js → Article-CqtkXVmQ.js} +29 -27
  2. package/dist/{ArticleFooter-BLi4TNA7.js → ArticleFooter-DeJdTtZD.js} +10 -10
  3. package/dist/{Autocomplete-DMm6oI1g.js → Autocomplete-0fxB2_FC.js} +1 -1
  4. package/dist/{Autocomplete-BF9x0F4f.js → Autocomplete-BfhYwZ5G.js} +7 -7
  5. package/dist/{Autocomplete-CcIzTPSr.js → Autocomplete-LQiKcvz1.js} +6 -6
  6. package/dist/{CSharp-CZOchOE-.js → CSharp-BIFRQLaK.js} +1 -1
  7. package/dist/{Calender-BoQV7bhA.js → Calender-DPNTn-S4.js} +4 -4
  8. package/dist/{Callback-79Bw4RwY.js → Callback-Ci5KrWOC.js} +6 -6
  9. package/dist/{Cascader-D1Ou5OSg.js → Cascader-CnOEgPDf.js} +1 -1
  10. package/dist/{Cascader-DMhl98vw.js → Cascader-Vhc81TDV.js} +14 -14
  11. package/dist/{Checkbox-C6t6S7ii.js → Checkbox-CIim5NiB.js} +1 -1
  12. package/dist/{Checkbox-DtrXMDBR.js → Checkbox-D9Sp6ZGQ.js} +7 -7
  13. package/dist/{Code-B8ISTTYK.js → Code-BEjqqeFZ.js} +3 -3
  14. package/dist/Code-BSrEPuXk.js +4 -0
  15. package/dist/{Code-DIGn8Raz.js → Code-Dp1-k8sW.js} +1 -1
  16. package/dist/{Code-DDacfgvl.js → Code-yDKaH1uF.js} +10 -8
  17. package/dist/Code.vue_vue_type_style_index_0_lang-CmkomJXY.js +59 -0
  18. package/dist/{Column-DjA11efs.js → Column-B0ViSver.js} +20 -20
  19. package/dist/{Comment-Ixu0gPk3.js → Comment-tU2wBvGO.js} +4 -2
  20. package/dist/{Compare-NN40QJWm.js → Compare-D7Gz-lE9.js} +1 -1
  21. package/dist/{Compare-C1uq4lgK.js → Compare-DqvGyQWA.js} +5 -5
  22. package/dist/{Copy-BcfSvyWG.js → Copy-Dm1LH9qB.js} +3 -3
  23. package/dist/Custom-CLKAPWEo.js +49 -0
  24. package/dist/{DataExport-DNGgWqsx.js → DataExport-BDftKI0U.js} +1 -1
  25. package/dist/{DataExport.vue_vue_type_script_setup_true_lang-tTTDFXQV.js → DataExport.vue_vue_type_script_setup_true_lang-Dzy9UC11.js} +8 -8
  26. package/dist/{DataImport-CI9eM5T1.js → DataImport-CRYaaQfA.js} +1 -1
  27. package/dist/{DataImport.vue_vue_type_script_setup_true_lang-BCMd1s45.js → DataImport.vue_vue_type_script_setup_true_lang-D7UdCnBM.js} +37 -37
  28. package/dist/{Date-CZGbZKjB.js → Date-DPPiYLWw.js} +4 -4
  29. package/dist/{Date-CGyzi8yX.js → Date-Dlh1_S7p.js} +1 -1
  30. package/dist/{DateRange-MbbkmZ_Y.js → DateRange-BgF_T3ls.js} +7 -7
  31. package/dist/{DateTime-DHrHmRLL.js → DateTime-CNjPeK9t.js} +1 -1
  32. package/dist/{DateTime-DqUOXGWH.js → DateTime-DP-VfmtN.js} +6 -6
  33. package/dist/{DateTimeRange-DgXQkZLx.js → DateTimeRange-DbEpW4nB.js} +5 -5
  34. package/dist/{Daterange-DLHJuRur.js → Daterange-DHVjhrK9.js} +5 -5
  35. package/dist/{Decimal-BUJuuvfr.js → Decimal-BDEWVSsK.js} +1 -1
  36. package/dist/{Delete-BGMk0orl.js → Delete-Bl0GmthL.js} +1 -1
  37. package/dist/{Detail-D4KzWdHQ.js → Detail-BozyhOTt.js} +12 -12
  38. package/dist/{Dictionary-Esd3ERAq.js → Dictionary-CJwZPQz6.js} +1 -1
  39. package/dist/{Email-C9K09hwC.js → Email-D5X1SzuJ.js} +8 -8
  40. package/dist/{File-ai1eYO7v.js → File-DixK0K7p.js} +34 -32
  41. package/dist/Image-BrelhCGo.js +9 -0
  42. package/dist/Index-BeM6hKX9.js +4 -0
  43. package/dist/{Index-DsZPtDYE.js → Index-BkfLyqpm.js} +34 -34
  44. package/dist/{Index-DYHrSEZ5.js → Index-D2FOeoNQ.js} +1 -1
  45. package/dist/Index-D8UVsXwf.js +4 -0
  46. package/dist/{Index-B5o7uf36.js → Index-DbXgnBz6.js} +2 -2
  47. package/dist/Index-FL-dxfFB.js +4 -0
  48. package/dist/Index-fWOqfFkG.js +4 -0
  49. package/dist/{Index-S1btGSGD.js → Index-j15c7lwJ.js} +1 -1
  50. package/dist/Index.vue_vue_type_script_setup_true_lang-ByxBNAdg.js +80 -0
  51. package/dist/{Index.vue_vue_type_script_setup_true_lang-BjE0VeTO.js → Index.vue_vue_type_script_setup_true_lang-DT7eOyjs.js} +23 -23
  52. package/dist/{Install-D-MgafyF.js → Install-WR3b4IfI.js} +1 -1
  53. package/dist/{Int-CnvfCxgn.js → Int-CWsDtoxE.js} +7 -7
  54. package/dist/{Int-D3RqVcmN.js → Int-GGWiUqO2.js} +4 -4
  55. package/dist/List-kRCsHp6d.js +71 -0
  56. package/dist/{Maintaince-BIgEbjrq.js → Maintaince-BG8MUi3A.js} +1 -1
  57. package/dist/{Markdown-hax8By5O.js → Markdown-nVfQs7kc.js} +1 -1
  58. package/dist/{Month-5lTUiWin.js → Month-B1icZmL4.js} +4 -4
  59. package/dist/{Month-CnVTSnyK.js → Month-CxKMP4kO.js} +1 -1
  60. package/dist/{Month-BDkwv-vc.js → Month-DnYlAi7k.js} +4 -4
  61. package/dist/{Normal-DoE9t7d7.js → Normal-RcqEyIFN.js} +23 -21
  62. package/dist/Paging-DrdGzxeP.js +94 -0
  63. package/dist/{PagingHeader-BFtE6jSy.js → PagingHeader-C8UpM9Kj.js} +27 -25
  64. package/dist/{PagingRow-CSB-kwMz.js → PagingRow-oQWCofO4.js} +8 -8
  65. package/dist/{Racebar-Bc-dDRss.js → Racebar-CvoF2ySW.js} +24 -22
  66. package/dist/{Radio-CMGOtMnx.js → Radio-DhjfkC14.js} +1 -1
  67. package/dist/{Register-8wi0uixs.js → Register-B0Vx60wY.js} +33 -33
  68. package/dist/{RichText-BR4Kvx0J.js → RichText-4wrLw9cy.js} +7 -7
  69. package/dist/{SearchForm-BMTSPce_.js → SearchForm-BHVnQaSL.js} +1 -1
  70. package/dist/{SearchForm.vue_vue_type_style_index_0_lang-wiTxKu-H.js → SearchForm.vue_vue_type_style_index_0_lang-ByICIL6w.js} +35 -35
  71. package/dist/SearchHeader-C9yovXli.js +4 -0
  72. package/dist/SearchHeader.vue_vue_type_style_index_0_lang-CHAg97-Y.js +60 -0
  73. package/dist/{Select-DAxdpZlO.js → Select-BDoCqD3I.js} +10 -10
  74. package/dist/{Select-MBD4Simw.js → Select-CX4i5KPQ.js} +1 -1
  75. package/dist/{Select-DnFyey0n.js → Select-vgwpegBi.js} +12 -12
  76. package/dist/Single-C3629BdC.js +317 -0
  77. package/dist/{Statistic-CTxHNeof.js → Statistic-Dxa-CZ8G.js} +10 -8
  78. package/dist/{Statistic-BS_DA72m.js → Statistic-WPezAlUn.js} +32 -30
  79. package/dist/{Stock-CtmevqBK.js → Stock-BD5Acf8y.js} +8 -6
  80. package/dist/{Stock-CbucObTu.js → Stock-EPM3j2f_.js} +1 -1
  81. package/dist/{Stock.vue_vue_type_style_index_0_lang-LfsWg1Ps.js → Stock.vue_vue_type_style_index_0_lang-D5RR2MRP.js} +14 -12
  82. package/dist/{Switch-BlXAy9qH.js → Switch-B0XN4K-9.js} +1 -1
  83. package/dist/Table-BklK1hSh.js +317 -0
  84. package/dist/{Table-Da9gan1Y.js → Table-JFdOXuME.js} +42 -40
  85. package/dist/Text-CNtHdodK.js +4 -0
  86. package/dist/{Text-CbZlEVTJ.js → Text-DrJkdxZF.js} +6 -6
  87. package/dist/{Text-C72NLZMt.js → Text-KAuEjP7I.js} +3 -3
  88. package/dist/{Text.vue_vue_type_style_index_0_lang-aMaBccpg.js → Text.vue_vue_type_style_index_0_lang-BJIbv4kF.js} +1 -1
  89. package/dist/{TextLink-SAnZ7BfX.js → TextLink-BnijIoEJ.js} +7 -7
  90. package/dist/{Textarea-DphCUpXp.js → Textarea-3SWLqQvO.js} +1 -1
  91. package/dist/{Time-DjE8yYdK.js → Time-C3qlNZkJ.js} +7 -7
  92. package/dist/{Timeline-D11vjkpZ.js → Timeline-B6hUIYhL.js} +12 -10
  93. package/dist/{Tree-kich05vY.js → Tree-DBvFF4Rj.js} +77 -75
  94. package/dist/{Tree-DK73Ou_F.js → Tree-JexLPBXX.js} +5 -3
  95. package/dist/{TreeNode-Dx6cZ31Z.js → TreeNode-BOWB2WN9.js} +4 -4
  96. package/dist/{Update-D2Plm_AG.js → Update-CDLYYwgj.js} +10 -10
  97. package/dist/{UpdateChild-BXV7QqaP.js → UpdateChild-DUG7pAuO.js} +11 -11
  98. package/dist/{Upload-B87EDynn.js → Upload-B2hbxDsT.js} +49 -49
  99. package/dist/{Upload-CHPjMGFZ.js → Upload-mlk6Y4Po.js} +13 -13
  100. package/dist/{Year-BPFmIiPX.js → Year-BRsJ7b1J.js} +1 -1
  101. package/dist/{Year-C93IJgc8.js → Year-BUF60NmB.js} +4 -4
  102. package/dist/{main-nvsTmKXH.js → main-DymfKjqO.js} +4363 -4204
  103. package/dist/main.js +144 -141
  104. package/esm/coms/commons/Table.vue.d.ts +1 -1
  105. package/esm/coms/drivers/Index.vue.d.ts +2 -2
  106. package/esm/coms/globals/Menu.vue.d.ts +1 -1
  107. package/esm/coms/globals/MenuItem.vue.d.ts +1 -1
  108. package/esm/coms/headers/@types/HeaderProps.d.ts +1 -1
  109. package/esm/coms/headers/Index.vue.d.ts +1 -1
  110. package/esm/coms/layouts/Index.vue.d.ts +3 -3
  111. package/esm/coms/layouts/Side.vue.d.ts +2 -2
  112. package/esm/coms/layouts/Top.vue.d.ts +1 -1
  113. package/esm/coms/lists/Racebar.vue.d.ts +1 -1
  114. package/esm/coms/lists/Statistic.vue.d.ts +1 -1
  115. package/esm/coms/lists/Tree.vue.d.ts +3 -3
  116. package/esm/coms/pages/@types/SchemaProps.d.ts +2 -1
  117. package/esm/coms/pages/Column.vue.d.ts +1 -1
  118. package/esm/coms/pages/Custom.vue.d.ts +6 -6
  119. package/esm/coms/pages/List.vue.d.ts +5 -3
  120. package/esm/coms/pages/Paging.vue.d.ts +5 -3
  121. package/esm/coms/pages/Single.vue.d.ts +3 -3
  122. package/esm/coms/pagings/@types/SearchHeaderProps.d.ts +9 -0
  123. package/esm/coms/pagings/@types/index.d.ts +2 -2
  124. package/esm/coms/pagings/Article.vue.d.ts +2 -2
  125. package/esm/coms/pagings/Index.vue.d.ts +4 -2
  126. package/esm/coms/pagings/SearchForm.vue.d.ts +1 -1
  127. package/esm/coms/pagings/SearchHeader.vue.d.ts +19 -0
  128. package/esm/coms/pagings/Table.vue.d.ts +4 -2
  129. package/esm/coms/partials/@types/PagingHeaderProps.d.ts +2 -1
  130. package/esm/coms/singles/Index.vue.d.ts +1 -1
  131. package/esm/coms/singles/Normal.vue.d.ts +1 -1
  132. package/esm/coms/singles/Table.vue.d.ts +1 -1
  133. package/esm/coms/singles/Tree.vue.d.ts +1 -1
  134. package/package.json +6 -6
  135. package/dist/Code-BMlBvnqa.js +0 -4
  136. package/dist/Code.vue_vue_type_style_index_0_lang-hHYTH50F.js +0 -57
  137. package/dist/Custom-Dn9_vPuD.js +0 -58
  138. package/dist/Image-CfY4G1Yn.js +0 -9
  139. package/dist/Index-CH3nwnPZ.js +0 -4
  140. package/dist/Index-CTjDkp7e.js +0 -4
  141. package/dist/Index-DSZ8wa7U.js +0 -4
  142. package/dist/Index-DVdiF3gr.js +0 -4
  143. package/dist/Index.vue_vue_type_script_setup_true_lang-H8ogKL2I.js +0 -76
  144. package/dist/List-DA4SO_le.js +0 -71
  145. package/dist/Paging-5qsCTRWy.js +0 -92
  146. package/dist/SearchFooter-DOC21dmS.js +0 -4
  147. package/dist/SearchFooter.vue_vue_type_style_index_0_lang-CoJZtP84.js +0 -55
  148. package/dist/Single-D6x6VV_B.js +0 -317
  149. package/dist/Table-CqsfAMh7.js +0 -310
  150. package/dist/Text-CHvsKR9H.js +0 -4
@@ -1,317 +0,0 @@
1
- import { defineComponent as $e, toRefs as Ue, ref as u, computed as Y, watch as Be, resolveComponent as c, openBlock as d, createElementBlock as j, normalizeClass as De, unref as e, createElementVNode as m, createVNode as g, withCtx as s, withModifiers as Le, createBlock as h, isRef as Z, Fragment as ee, renderList as le, toDisplayString as k, createCommentVNode as B, resolveDynamicComponent as Ae, normalizeStyle as Ke, createTextVNode as te, nextTick as ae } from "vue";
2
- import { c as Me, b as Ne, f as oe, w as Pe, e as qe, d as D, a as je, _ as Fe, i as ue, S as He, M as Oe, m as re, x as Ge, A as Ie } from "./main-nvsTmKXH.js";
3
- import { _ as ne } from "./Index.vue_vue_type_script_setup_true_lang-BjE0VeTO.js";
4
- const Je = { class: "ha-main-form" }, Qe = { class: "row-header" }, We = { class: "row-title" }, Xe = { class: "el-drawer__title" }, Ye = ["href"], al = /* @__PURE__ */ $e({
5
- __name: "Single",
6
- props: {
7
- base: {},
8
- route: {},
9
- url: {},
10
- win: {}
11
- },
12
- emits: ["navigate", "load", "succeed", "close"],
13
- setup(se, { expose: ie, emit: de }) {
14
- let L = de, me = se, { url: ve, base: F, route: z } = Ue(me), p = u(), b = u(), v = u(), r = u(), y = u(), A = u(), f = u({ table: null, layout: null }), w = u(), K = u([]), fe = u(), E = u(), S = u(), N = u(), C = u(), H = u(), i = u({ page: null, url: null, visible: !1, appendToBody: !1 }), x = u(!1), P = u(), R = u(), ce = (l) => !0, pe = (l) => {
15
- let t = D.url.getPath(ve.value), a = D.url.getPath(l);
16
- return t != a;
17
- }, be = () => {
18
- Ve();
19
- }, ye = (l, t) => {
20
- O("copy", l, t);
21
- }, _e = (l, t) => {
22
- O("update", l, t);
23
- }, ge = () => {
24
- i.value.visible = !1;
25
- }, O = (l, t, a) => {
26
- let n = he(l, t);
27
- a.ctrlKey ? L("navigate", n) : (i.value.appendToBody = a.altKey, i.value.page = l, i.value.url = n, i.value.visible = !0);
28
- }, he = (l, t = null) => {
29
- let a = `${b.value[l].route}`;
30
- if (t != null) {
31
- let n = t[y.value.key.name];
32
- a += `?id=${n}`;
33
- }
34
- return a;
35
- }, we = (l, t, a) => {
36
- (a.ctrlKey || x.value) && (P.value = l, R.value = D.object.clone(t), x.value = !0, R.value.fields.forEach((n) => {
37
- n.control.textualize = !1;
38
- }));
39
- }, G = (l) => {
40
- i.value.visible = !1, L("succeed", W.value, l);
41
- }, Ce = () => {
42
- L("close");
43
- }, I = (l, t, a, n, T) => {
44
- }, J = (l, t) => {
45
- if (t) {
46
- A.value = y.value.layouts.find((a) => a.type == l);
47
- return;
48
- }
49
- f.value.layout = f.value.table.layouts.find((a) => a.type == l);
50
- }, xe = (l) => {
51
- let t = r.value.find((a) => a.name == l);
52
- f.value.table = t, f.value.layout = t.layouts[0];
53
- }, ke = (l) => {
54
- let t = Object.keys(l)[0], a = t.substring(1, t.indexOf("]"));
55
- r.value.find((T) => T.name == a).main || (w.value = a);
56
- }, Se = (l, t = null, a = null) => {
57
- ae(() => {
58
- E.value.validate((n, T) => {
59
- if (!n)
60
- return ke(T), a && a(!1), !1;
61
- let $ = p.value.type == "Update" ? b.value.update.route : b.value.insert.route;
62
- t && t($, v.value), Fe.post($, v.value).then(({ data: U, message: V }) => {
63
- E.value.clearValidate(), ue.success(V), G(v.value);
64
- }).catch(({ code: U, data: V, message: X }) => {
65
- if (U != "ValidateError")
66
- return;
67
- K.value = V;
68
- let M = V.find((_) => _.table !== y.value.name);
69
- if (M) {
70
- let _ = r.value.find((o) => o.name == M.table);
71
- _ && (w.value = _.name);
72
- }
73
- ae(() => {
74
- E.value.clearValidate(), E.value.validate((_, o) => {
75
- _ || (a && a(!1), K.value = []);
76
- });
77
- });
78
- }).finally(() => {
79
- a && a();
80
- });
81
- });
82
- });
83
- }, Q = (l) => {
84
- var a, n;
85
- let t = He(l.module.type, l.module.name);
86
- Oe.setTitle(t, l.module.env), p.value = l.module, b.value = l.next, v.value = re.expandSet(l.schema, l.set), r.value = re.expandSchema(l.schema, l.set), y.value = (a = r.value) == null ? void 0 : a[0], A.value = y.value.layouts[0], ((n = r.value) == null ? void 0 : n.length) > 1 && (w.value = r.value[1].name, f.value.table = r.value[1], f.value.layout = r.value[1].layouts[0]);
87
- }, Re = (l) => {
88
- S.value && S.value.resize && S.value.resize(l), C.value && C.value.resize && C.value.resize(l);
89
- }, Te = (l, t) => {
90
- if (l == Ge.ctrlS) {
91
- if (p.value.type == "Detail") {
92
- Ie.triggerKeyboardHandler(H.value, l, t);
93
- return;
94
- }
95
- q(t);
96
- }
97
- }, Ve = () => {
98
- let l = D.url.getUrl(z.value.path, z.value.query);
99
- L("load", l, !1, (t) => {
100
- });
101
- };
102
- (() => {
103
- Q(F.value.data);
104
- })();
105
- let q = (l) => {
106
- if (!N.value.submit) {
107
- ue.notify("提示", "请在子组件暴露submit方法来实现快捷提交", "warning");
108
- return;
109
- }
110
- N.value.submit(l);
111
- }, ze = Y(() => {
112
- let l = `/${y.value.name}/update`, t = p.value.type == "Detail" ? "detail" : "update";
113
- return Me.getComponent(l, "partial", t);
114
- }), W = Y(() => p.value.type.toLowerCase());
115
- return Be(() => F.value, (l) => {
116
- Q(l.data), S.value.update && S.value.update(l.data), C.value && C.value.update && C.value.update(l.data);
117
- }), ie({ shouldLoad: ce, shouldSpin: pe, keyboardHandler: Te, refresh: be, resize: Re }), (l, t) => {
118
- 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"), M = c("el-card"), _ = c("el-drawer");
119
- return d(), j("div", {
120
- ref_key: "singleRef",
121
- ref: fe,
122
- class: De(["ha-single-page", { [e(W) + "-page"]: !0, editing: e(x) }])
123
- }, [
124
- m("div", Je, [
125
- g(U, { class: "main-scroller" }, {
126
- default: s(() => [
127
- g($, {
128
- ref_key: "formRef",
129
- ref: E,
130
- model: e(v),
131
- onSubmit: t[3] || (t[3] = Le(() => {
132
- }, ["prevent"]))
133
- }, {
134
- default: s(() => [
135
- g(ne, {
136
- ref_key: "mainRef",
137
- ref: S,
138
- module: e(p),
139
- schema: e(r),
140
- table: e(y),
141
- layout: e(A),
142
- next: e(b),
143
- set: e(v),
144
- route: e(z),
145
- "validate-errors": e(K),
146
- onChange: e(I),
147
- onLayoutChange: t[0] || (t[0] = (o) => e(J)(o, !0)),
148
- onSubmit: e(q)
149
- }, null, 8, ["module", "schema", "table", "layout", "next", "set", "route", "validate-errors", "onChange", "onSubmit"]),
150
- e(r).length > 1 ? (d(), h(T, {
151
- key: 0,
152
- type: "border-card",
153
- onTabChange: e(xe),
154
- modelValue: e(w),
155
- "onUpdate:modelValue": t[1] || (t[1] = (o) => Z(w) ? w.value = o : w = o)
156
- }, {
157
- default: s(() => [
158
- (d(!0), j(ee, null, le(e(r).filter((o, Ee) => Ee > 0), (o) => (d(), h(n, {
159
- name: o.name,
160
- key: o.name
161
- }, {
162
- label: s(() => [
163
- g(a, {
164
- placement: "top",
165
- content: o.tooltip,
166
- disabled: !o.tooltip
167
- }, {
168
- default: s(() => [
169
- m("div", null, k(e(Ne)(o.table)), 1)
170
- ]),
171
- _: 2
172
- }, 1032, ["content", "disabled"])
173
- ]),
174
- _: 2
175
- }, 1032, ["name"]))), 128))
176
- ]),
177
- _: 1
178
- }, 8, ["onTabChange", "modelValue"])) : B("", !0),
179
- e(f).table ? (d(), h(ne, {
180
- key: 1,
181
- ref_key: "childRef",
182
- ref: C,
183
- module: e(p),
184
- schema: e(r),
185
- table: e(f).table,
186
- layout: e(f).layout,
187
- next: e(b),
188
- set: e(v),
189
- route: e(z),
190
- "validate-errors": e(K),
191
- onRowEdit: e(we),
192
- onChange: e(I),
193
- onLayoutChange: t[2] || (t[2] = (o) => e(J)(o, !1)),
194
- onSubmit: e(q)
195
- }, null, 8, ["module", "schema", "table", "layout", "next", "set", "route", "validate-errors", "onRowEdit", "onChange", "onSubmit"])) : B("", !0)
196
- ]),
197
- _: 1
198
- }, 8, ["model"])
199
- ]),
200
- _: 1
201
- }),
202
- (d(), h(Ae(e(ze)), {
203
- ref_key: "updateRef",
204
- ref: N,
205
- class: "main-footer",
206
- schema: e(r),
207
- table: e(y),
208
- layout: e(A),
209
- next: e(b),
210
- set: e(v),
211
- route: e(z),
212
- onCopy: e(ye),
213
- onEdit: e(_e),
214
- onSubmit: e(Se),
215
- onClose: e(Ce)
216
- }, null, 40, ["schema", "table", "layout", "next", "set", "route", "onCopy", "onEdit", "onSubmit", "onClose"]))
217
- ]),
218
- e(x) ? (d(), h(M, {
219
- key: 0,
220
- class: "side-form"
221
- }, {
222
- header: s(() => [
223
- m("div", Qe, [
224
- m("div", We, k(e(oe)("common.modify")) + " " + k(e(P)[e(R).show[0].name]), 1),
225
- m("div", {
226
- class: "row-close",
227
- onClick: t[4] || (t[4] = (o) => Z(x) ? x.value = !1 : x = !1)
228
- }, t[6] || (t[6] = [
229
- m("i", { class: "fa fa-close" }, null, -1)
230
- ]))
231
- ])
232
- ]),
233
- default: s(() => [
234
- g(U, null, {
235
- default: s(() => [
236
- g($, {
237
- size: "small",
238
- "label-width": "80px"
239
- }, {
240
- default: s(() => [
241
- (d(!0), j(ee, null, le(e(R).show, (o) => (d(), h(X, {
242
- style: Ke(o.control.height ? `height: ${o.control.height}px;` : ""),
243
- rules: o.rules
244
- }, {
245
- label: s(() => [
246
- te(k(e(Pe)(e(R).name, o.name)) + " ", 1),
247
- o.control.tooltip ? (d(), h(V, {
248
- key: 0,
249
- trigger: "hover",
250
- placement: "top",
251
- width: "auto",
252
- title: o.control.tooltip.title
253
- }, {
254
- reference: s(() => t[7] || (t[7] = [
255
- m("i", { class: "fa fa-question-circle icon-question" }, null, -1)
256
- ])),
257
- default: s(() => [
258
- m("pre", null, k(o.control.tooltip.content), 1)
259
- ]),
260
- _: 2
261
- }, 1032, ["title"])) : B("", !0)
262
- ]),
263
- default: s(() => [
264
- g(qe, {
265
- schema: e(r),
266
- table: e(R),
267
- field: o,
268
- set: e(v),
269
- row: e(P)
270
- }, null, 8, ["schema", "table", "field", "set", "row"])
271
- ]),
272
- _: 2
273
- }, 1032, ["style", "rules"]))), 256))
274
- ]),
275
- _: 1
276
- })
277
- ]),
278
- _: 1
279
- })
280
- ]),
281
- _: 1
282
- })) : B("", !0),
283
- e(i).page ? (d(), h(_, {
284
- key: 1,
285
- "destroy-on-close": "",
286
- "append-to-body": e(i).appendToBody,
287
- size: `${e(p).width ?? "60%"}`,
288
- modelValue: e(i).visible,
289
- "onUpdate:modelValue": t[5] || (t[5] = (o) => e(i).visible = o)
290
- }, {
291
- header: s(() => [
292
- m("div", Xe, [
293
- te(k(e(b)[e(i).page].title) + " ", 1),
294
- m("a", {
295
- class: "drawer-copy",
296
- href: `${e(D).url.getToUrl(e(i).url)}`
297
- }, k(e(oe)("common.link")), 9, Ye)
298
- ])
299
- ]),
300
- default: s(() => [
301
- g(e(je), {
302
- ref_key: "pageRef",
303
- ref: H,
304
- url: e(i).url,
305
- onSucceed: e(G),
306
- onClose: e(ge)
307
- }, null, 8, ["url", "onSucceed", "onClose"])
308
- ]),
309
- _: 1
310
- }, 8, ["append-to-body", "size", "modelValue"])) : B("", !0)
311
- ], 2);
312
- };
313
- }
314
- });
315
- export {
316
- al as default
317
- };
@@ -1,310 +0,0 @@
1
- import { defineComponent as Be, toRefs as He, ref as u, onMounted as De, nextTick as M, computed as ae, resolveComponent as k, openBlock as f, createElementBlock as H, createVNode as v, unref as e, isRef as x, normalizeClass as Te, withCtx as h, createTextVNode as le, toDisplayString as S, Fragment as Ue, renderList as Ee, createBlock as z, createCommentVNode as $, createElementVNode as D, resolveDynamicComponent as Ae } from "vue";
2
- import { D as Ne, d as b, c as Le, E as Me, f as K, w as Ke, e as Pe, o as je, F as qe, G as oe, a as Fe, _ as Oe, i as Ge, S as Ie, A as Je } from "./main-nvsTmKXH.js";
3
- import { _ as Qe } from "./SearchForm.vue_vue_type_style_index_0_lang-wiTxKu-H.js";
4
- import { _ as Xe } from "./DataImport.vue_vue_type_script_setup_true_lang-BCMd1s45.js";
5
- import { _ as Ye } from "./DataExport.vue_vue_type_script_setup_true_lang-tTTDFXQV.js";
6
- import "vue-router";
7
- import "./assets/intro.js-Cg1adLK7.js";
8
- import { _ as Ze } from "./SearchFooter.vue_vue_type_style_index_0_lang-CoJZtP84.js";
9
- const et = {
10
- key: 0,
11
- class: "required"
12
- }, tt = ["onMouseenter"], at = { class: "el-drawer__title" }, lt = { key: 0 }, ot = ["href"], gt = /* @__PURE__ */ Be({
13
- __name: "Table",
14
- props: {
15
- searchData: {},
16
- module: {},
17
- schema: {},
18
- table: {},
19
- layout: {},
20
- next: {},
21
- set: {}
22
- },
23
- emits: ["search", "navigate", "sort", "page-change", "size-change", "succeed", "close"],
24
- setup(ne, { expose: re, emit: se }) {
25
- let w = se, ue = ne, { module: ie, schema: T, table: r, layout: i, next: p, set: C, searchData: P } = He(ue), U = u([]), V = u(), E = u(), A = u(), j = u(), q = u(), F = u(), m = u(!1), c = u(!1), O = u(), G = u("120px"), I = u({}), y = u({ layout: "prev, pager, next", count: 5, sizes: [20, 50, 200, 500, 2e3] }), W = u(), n = u({ title: null, env: null, page: null, url: null, row: null, visible: !1, appendToBody: !1 }), de = new Ne(), pe = (t) => {
26
- R("insert", null, t);
27
- }, me = (t, a) => {
28
- R("detail", t, a);
29
- }, ce = (t, a) => {
30
- R("update", t, a);
31
- }, ge = (t, a) => {
32
- R("copy", t, a);
33
- }, ve = (t, a) => {
34
- R("delete", t, a);
35
- }, J = async (t) => {
36
- let a = t.map((o) => o[r.value.key.name]);
37
- await Oe.post(p.value.delete.route, a).then((o) => {
38
- Ge.success(o.message), N();
39
- });
40
- }, R = (t, a, o) => {
41
- let s = fe(t, a);
42
- o.ctrlKey ? (n.value.row = null, w("navigate", s)) : (n.value.appendToBody = o.altKey, n.value.page = t, n.value.url = s, n.value.row = a, n.value.visible = !0);
43
- }, fe = (t, a = null) => {
44
- let o = `${p.value[t].route}`;
45
- if (a != null) {
46
- let s = a[r.value.key.name];
47
- o += `?id=${s}`;
48
- }
49
- return o;
50
- }, he = () => {
51
- n.value.visible = !1, w("close");
52
- }, ye = (t) => {
53
- n.value.title = Ie(t.module.type, t.module.name), n.value.env = t.module.env;
54
- }, N = () => {
55
- n.value.visible = !1;
56
- let t = U.value;
57
- w("succeed", async (a) => {
58
- let o = a.data.set[r.value.name];
59
- if (!o.length)
60
- return;
61
- await M();
62
- let s = r.value.key, g = n.value.row;
63
- if (g != null) {
64
- let d = o.find((_) => _[s.name] == g[s.name]);
65
- d && E.value.setCurrentRow(d);
66
- }
67
- if (t.length > 0)
68
- for (let d of t) {
69
- let _ = o.find((l) => l[s.name] == d[s.name]);
70
- _ != null && E.value.toggleRowSelection(_, !0);
71
- }
72
- });
73
- }, Q = (t) => {
74
- w("search", t);
75
- }, we = (t) => {
76
- w("page-change", t);
77
- }, be = (t) => {
78
- w("size-change", t);
79
- }, _e = (t, a) => {
80
- let o = { [a.name]: { [t.prop]: t.order != "descending" ? "asc" : "desc" } };
81
- w("sort", o);
82
- }, xe = (t, a, o, s, g) => {
83
- }, Ce = (t) => {
84
- G.value = t;
85
- }, Re = (t, a) => {
86
- U.value = t;
87
- }, ke = (t, a, o) => {
88
- let s = t.target.children[0], g = b.dom.getWidth(s) + 16 + 14, d = a.realWidth || a.width;
89
- o._headerTooltip = g > d;
90
- }, Se = async (t, a, o, s) => {
91
- await oe.setColumnWidth(p.value.paging.route, r.value.name, o.property, t);
92
- }, X = () => {
93
- var s, g, d;
94
- let t = b.dom.getHeight(V.value), a = b.dom.getHeight([(s = A.value) == null ? void 0 : s.$el, (g = j.value) == null ? void 0 : g.$el, (d = q.value) == null ? void 0 : d.$el]), o = t - a;
95
- O.value = `${o}px`;
96
- }, Y = () => {
97
- let t = W.value;
98
- t <= 690 ? y.value.count = 5 : y.value.count = 7, t <= 300 ? y.value.layout = "pager" : t <= 620 ? y.value.layout = "prev, pager, next" : y.value.layout = "sizes, total, prev, pager, next, jumper";
99
- }, ze = (t, a) => {
100
- Je.triggerKeyboardHandler(F.value, t, a);
101
- }, $e = (t) => {
102
- A.value.resize(t), W.value = b.dom.getWidth(V.value), Y(), M(() => {
103
- X();
104
- });
105
- };
106
- De(async () => {
107
- await de.openAsync("sys", "page", I.value), W.value = b.dom.getWidth(V.value), Y(), await M(), X();
108
- });
109
- let Ve = ae(() => {
110
- let a = Object.keys(i.value.orderBys)[0], o = i.value.orderBys[a];
111
- return { prop: a, order: o ? "ascending" : "descending" };
112
- }), We = ae(() => {
113
- let t = `/${r.value.name}/paging-row`;
114
- return Le.getComponent(t, "partial", "paging-row");
115
- });
116
- return re({ keyboardHandler: ze, resize: $e }), (t, a) => {
117
- const o = k("el-table-column"), s = k("el-tooltip"), g = k("el-table"), d = k("el-pagination"), _ = k("el-drawer");
118
- return f(), H("div", {
119
- ref_key: "pagingRef",
120
- ref: V,
121
- class: "paging-table"
122
- }, [
123
- v(Qe, {
124
- ref_key: "searchRef",
125
- ref: A,
126
- schema: e(T),
127
- table: e(r),
128
- layout: e(i),
129
- "search-data": e(P),
130
- onSubmit: e(Q)
131
- }, null, 8, ["schema", "table", "layout", "search-data", "onSubmit"]),
132
- v(Ze, {
133
- ref_key: "headerRef",
134
- ref: j,
135
- schema: e(T),
136
- table: e(r),
137
- layout: e(i),
138
- set: e(C),
139
- next: e(p),
140
- selection: e(U),
141
- "search-data": e(P),
142
- onAdd: e(pe),
143
- onRemove: e(J),
144
- onShowImport: a[0] || (a[0] = (l) => x(m) ? m.value = !0 : m = !0),
145
- onShowExport: a[1] || (a[1] = (l) => x(c) ? c.value = !0 : c = !0),
146
- onSearch: e(Q)
147
- }, null, 8, ["schema", "table", "layout", "set", "next", "selection", "search-data", "onAdd", "onRemove", "onSearch"]),
148
- v(g, {
149
- ref_key: "tableRef",
150
- ref: E,
151
- class: Te([{ "hide-nav": e(Me).hideNav }, "table-default table-paging"]),
152
- size: "small",
153
- border: "",
154
- "highlight-current-row": "",
155
- "max-height": e(O),
156
- data: e(C)[e(r).name],
157
- "default-sort": e(Ve),
158
- onSelectionChange: a[2] || (a[2] = (l) => e(Re)(l, e(r))),
159
- onSortChange: a[3] || (a[3] = (l) => e(_e)(l, e(r))),
160
- onHeaderDragend: e(Se)
161
- }, {
162
- empty: h(() => [
163
- le(S(e(K)("common.no_data")), 1)
164
- ]),
165
- default: h(() => [
166
- v(o, {
167
- type: "selection",
168
- width: "30"
169
- }),
170
- (f(!0), H(Ue, null, Ee(e(r).show, (l, nt) => {
171
- var Z, ee, te;
172
- return f(), z(o, {
173
- sortable: e(r) ? "custom" : !1,
174
- prop: l.name,
175
- "sort-orders": ["descending", "ascending"],
176
- fixed: e(i).fixed.indexOf(l.name) > -1,
177
- "min-width": ((te = (ee = (Z = e(I)) == null ? void 0 : Z[e(p).paging.route]) == null ? void 0 : ee[e(r).name]) == null ? void 0 : te[l.name]) ?? l.control.width,
178
- label: `${l.label}${l.control.prefix || l.suffix ? "(" + (l.control.prefix || l.suffix) + ")" : ""}`,
179
- key: `${e(r).name}.${l.name}`
180
- }, {
181
- header: h((B) => [
182
- l.control.required && l.control.editable ? (f(), H("i", et)) : $("", !0),
183
- v(s, {
184
- placement: "top",
185
- content: l.label,
186
- disabled: !l._headerTooltip
187
- }, {
188
- default: h(() => [
189
- D("span", {
190
- onMouseenter: (L) => e(ke)(L, B.column, l)
191
- }, [
192
- D("span", null, S(e(Ke)(e(r).name, l.name)), 1)
193
- ], 40, tt)
194
- ]),
195
- _: 2
196
- }, 1032, ["content", "disabled"])
197
- ]),
198
- default: h((B) => [
199
- v(Pe, {
200
- schema: e(T),
201
- table: e(r),
202
- field: l,
203
- set: e(C),
204
- row: B.row,
205
- config: e(je).getConfig(l, e(ie).type, e(i).type),
206
- onChange: (L) => e(xe)(L, e(r), l, e(C), B.row)
207
- }, null, 8, ["schema", "table", "field", "set", "row", "config", "onChange"])
208
- ]),
209
- _: 2
210
- }, 1032, ["sortable", "prop", "fixed", "min-width", "label"]);
211
- }), 128)),
212
- v(o, {
213
- label: e(K)("common.operation"),
214
- fixed: "right",
215
- "show-overflow-tooltip": "",
216
- "min-width": e(G)
217
- }, {
218
- default: h((l) => [
219
- (f(), z(Ae(e(We)), {
220
- table: e(r),
221
- next: e(p),
222
- set: e(C),
223
- row: l.row,
224
- onPreview: e(me),
225
- onEdit: e(ce),
226
- onCopy: e(ge),
227
- onBeforeRemove: e(ve),
228
- onRemove: e(J),
229
- onChangeWidth: e(Ce)
230
- }, null, 40, ["table", "next", "set", "row", "onPreview", "onEdit", "onCopy", "onBeforeRemove", "onRemove", "onChangeWidth"]))
231
- ]),
232
- _: 1
233
- }, 8, ["label", "min-width"])
234
- ]),
235
- _: 1
236
- }, 8, ["class", "max-height", "data", "default-sort", "onHeaderDragend"]),
237
- v(e(qe), {
238
- ref_key: "footerRef",
239
- ref: q,
240
- class: "list-toolbar"
241
- }, {
242
- default: h(() => [
243
- v(d, {
244
- background: "",
245
- layout: e(y).layout,
246
- "current-page": e(i).page,
247
- "pager-count": e(y).count,
248
- total: e(i).count,
249
- "page-sizes": e(y).sizes,
250
- onCurrentChange: e(we),
251
- onSizeChange: e(be),
252
- "page-size": e(i).size,
253
- "onUpdate:pageSize": a[4] || (a[4] = (l) => e(i).size = l)
254
- }, null, 8, ["layout", "current-page", "pager-count", "total", "page-sizes", "onCurrentChange", "onSizeChange", "page-size"])
255
- ]),
256
- _: 1
257
- }, 512),
258
- e(p).import ? (f(), z(Xe, {
259
- key: 0,
260
- next: e(p),
261
- onClose: a[5] || (a[5] = (l) => x(m) ? m.value = !1 : m = !1),
262
- onSucceed: e(N),
263
- modelValue: e(m),
264
- "onUpdate:modelValue": a[6] || (a[6] = (l) => x(m) ? m.value = l : m = l)
265
- }, null, 8, ["next", "onSucceed", "modelValue"])) : $("", !0),
266
- e(p).export ? (f(), z(Ye, {
267
- key: 1,
268
- route: e(p).export.route,
269
- "page-count": e(b).math.pageCount(e(i).count, e(i).size),
270
- onClose: a[7] || (a[7] = (l) => x(c) ? c.value = !1 : c = !1),
271
- modelValue: e(c),
272
- "onUpdate:modelValue": a[8] || (a[8] = (l) => x(c) ? c.value = l : c = l)
273
- }, null, 8, ["route", "page-count", "modelValue"])) : $("", !0),
274
- e(n).page ? (f(), z(_, {
275
- key: 2,
276
- "destroy-on-close": "",
277
- "append-to-body": e(n).appendToBody,
278
- size: e(oe).getDrawerWidth(e(W)),
279
- modelValue: e(n).visible,
280
- "onUpdate:modelValue": a[9] || (a[9] = (l) => e(n).visible = l)
281
- }, {
282
- header: h(() => [
283
- D("div", at, [
284
- le(S(e(n).title) + " ", 1),
285
- e(n).env ? (f(), H("span", lt, "[" + S(e(n).env) + "]", 1)) : $("", !0),
286
- D("a", {
287
- class: "drawer-copy",
288
- href: e(b).url.getToUrl(e(n).url)
289
- }, S(e(K)("common.link")), 9, ot)
290
- ])
291
- ]),
292
- default: h(() => [
293
- v(e(Fe), {
294
- ref_key: "pageRef",
295
- ref: F,
296
- url: e(n).url,
297
- onLoaded: e(ye),
298
- onSucceed: e(N),
299
- onClose: e(he)
300
- }, null, 8, ["url", "onLoaded", "onSucceed", "onClose"])
301
- ]),
302
- _: 1
303
- }, 8, ["append-to-body", "size", "modelValue"])) : $("", !0)
304
- ], 512);
305
- };
306
- }
307
- });
308
- export {
309
- gt as default
310
- };
@@ -1,4 +0,0 @@
1
- import { _ as f } from "./Text.vue_vue_type_style_index_0_lang-aMaBccpg.js";
2
- export {
3
- f as default
4
- };