halo-pc 1.0.20 → 1.0.22

Sign up to get free protection for your applications and to get access to all the features.
Files changed (169) hide show
  1. package/dist/Article-C_3LULzy.js +200 -0
  2. package/dist/{ArticleFooter-CsCnjrJ1.js → ArticleFooter-Do6I1mma.js} +24 -18
  3. package/dist/{Autocomplete-BGkHGSX_.js → Autocomplete-BLOOqTTn.js} +1 -1
  4. package/dist/Autocomplete-BLrbt1wN.js +53 -0
  5. package/dist/Autocomplete-C27XN8Sp.js +54 -0
  6. package/dist/{CSharp-NuDfWEq7.js → CSharp-BGn9jf2B.js} +1 -1
  7. package/dist/{Calender-C2YaNTHk.js → Calender-4bSMqUzx.js} +4 -4
  8. package/dist/Callback-BHYDtogL.js +26 -0
  9. package/dist/Cascader-D3y3WjFF.js +87 -0
  10. package/dist/Cascader-D9Y8L7X2.js +47 -0
  11. package/dist/{Checkbox-BAcK--1U.js → Checkbox-DnTLeLjt.js} +1 -1
  12. package/dist/Checkbox-dDfYBhhc.js +76 -0
  13. package/dist/{Code-CbsVyhOv.js → Code-Af5URLnL.js} +1 -1
  14. package/dist/Code-Bi9Y45vV.js +42 -0
  15. package/dist/Code-CWsSgkJq.js +60 -0
  16. package/dist/{Code-BHEes80c.js → Code-QYs-sjcG.js} +1 -1
  17. package/dist/Code.vue_vue_type_style_index_0_lang-CI6sLXKy.js +65 -0
  18. package/dist/Column-wzxM_-Vp.js +74 -0
  19. package/dist/Comment-BF8L1umD.js +104 -0
  20. package/dist/Compare-CjSQcnd3.js +43 -0
  21. package/dist/{Compare-gEOPuGLB.js → Compare-Cj_CPjIV.js} +25 -19
  22. package/dist/Copy-BNt-Dwoo.js +49 -0
  23. package/dist/Custom-CYPkAqpf.js +57 -0
  24. package/dist/{DataExport-hwoZoZUN.js → DataExport-CHQtRKzA.js} +1 -1
  25. package/dist/{DataExport.vue_vue_type_script_setup_true_lang-Dkq4fSkZ.js → DataExport.vue_vue_type_script_setup_true_lang-Dt2BAaAO.js} +41 -36
  26. package/dist/{DataImport-CQYeF50z.js → DataImport-CDcmH3Du.js} +1 -1
  27. package/dist/DataImport.vue_vue_type_script_setup_true_lang-dULXjbl_.js +176 -0
  28. package/dist/{Date-a3T1YbHN.js → Date-BStpsA7n.js} +1 -1
  29. package/dist/Date-U1py5NaK.js +43 -0
  30. package/dist/DateRange-DxAx2gxI.js +63 -0
  31. package/dist/DateTime-B3609Ct6.js +44 -0
  32. package/dist/{DateTime-BUYojCOY.js → DateTime-CmJw1-WA.js} +1 -1
  33. package/dist/{DateTimeRange-D9K4am0p.js → DateTimeRange-aDw57sTG.js} +17 -11
  34. package/dist/Daterange-C48t6usd.js +63 -0
  35. package/dist/{Decimal-CNhxJUZg.js → Decimal-Ca0K6NoZ.js} +1 -1
  36. package/dist/Delete-FhIvONUV.js +62 -0
  37. package/dist/{Detail-BXkTd6Wh.js → Detail-qqW0J946.js} +21 -15
  38. package/dist/Dictionary-CaXytFmK.js +59 -0
  39. package/dist/Email-H2DHJhMe.js +54 -0
  40. package/dist/{File-CAnAcqJX.js → File-CjXewuui.js} +33 -27
  41. package/dist/Image-BSuCHshD.js +9 -0
  42. package/dist/Index-9KImKLrj.js +4 -0
  43. package/dist/Index-BIbR8SAU.js +178 -0
  44. package/dist/Index-BaoxkF9F.js +4 -0
  45. package/dist/{Index-DJvB04cS.js → Index-BrI9x7i7.js} +1 -1
  46. package/dist/Index-CXR5RC6-.js +4 -0
  47. package/dist/{Index-RZT6JXBO.js → Index-CpGonJ_m.js} +1 -1
  48. package/dist/{Index-CseSUp2Z.js → Index-DUgprnVp.js} +1 -1
  49. package/dist/{Index-BqjKndKz.js → Index-icEhc88J.js} +25 -20
  50. package/dist/{Index.vue_vue_type_script_setup_true_lang-DtNDN8Ex.js → Index.vue_vue_type_script_setup_true_lang-Beb5UD_S.js} +21 -15
  51. package/dist/{Index.vue_vue_type_script_setup_true_lang-C8ZEc4nU.js → Index.vue_vue_type_script_setup_true_lang-DJ8ZzZ2K.js} +22 -16
  52. package/dist/{Index.vue_vue_type_style_index_0_lang-T12lwRy6.js → Index.vue_vue_type_style_index_0_lang-D7LuD-a2.js} +40 -35
  53. package/dist/{Install-DWWpscrR.js → Install-FwXpJIWk.js} +26 -20
  54. package/dist/Int-CXl1QpEL.js +44 -0
  55. package/dist/Int-DAxz3ETu.js +46 -0
  56. package/dist/List-CV9bkdrq.js +79 -0
  57. package/dist/Maintaince-DZNq9aHX.js +20 -0
  58. package/dist/{Markdown-d8PCfAFf.js → Markdown-BhwqDlwa.js} +1 -1
  59. package/dist/{Month-COEkKDL_.js → Month-BEmnA7zU.js} +1 -1
  60. package/dist/Month-DXQBHoJU.js +43 -0
  61. package/dist/Month-bgEd_K7_.js +44 -0
  62. package/dist/{Normal-BD7sNr-b.js → Normal-Dya4aqc7.js} +56 -51
  63. package/dist/Paging-JXDzxoM0.js +99 -0
  64. package/dist/{PagingHeader-CznmI0kr.js → PagingHeader-BETGBySb.js} +31 -25
  65. package/dist/{PagingRow-BJ-VLpfV.js → PagingRow-BLqp1c9E.js} +28 -22
  66. package/dist/QueryApi-B5jI3sBl.js +20 -0
  67. package/dist/{Racebar-BkwhD-rw.js → Racebar-CozeXwLJ.js} +42 -37
  68. package/dist/{Radio-CS12bajp.js → Radio-CuAxYw7j.js} +1 -1
  69. package/dist/{Register-l_X4fDPP.js → Register-B11jE2Ox.js} +78 -73
  70. package/dist/RichText-CxBE_cVg.js +47 -0
  71. package/dist/{SearchFooter-C8N9ku25.js → SearchFooter-agTqPUGE.js} +1 -1
  72. package/dist/{SearchFooter.vue_vue_type_style_index_0_lang-6WvYHIn1.js → SearchFooter.vue_vue_type_style_index_0_lang-C-1Yr5_9.js} +1 -1
  73. package/dist/{SearchForm-DX0mN20A.js → SearchForm-DNKmE8W0.js} +1 -1
  74. package/dist/{SearchForm.vue_vue_type_style_index_0_lang-23AxHYiw.js → SearchForm.vue_vue_type_style_index_0_lang-BzrMV0Wr.js} +40 -35
  75. package/dist/Select-BPa5rx_H.js +86 -0
  76. package/dist/Select-CRfEAtba.js +117 -0
  77. package/dist/{Select-DYjvtHyi.js → Select-MqDjnB-C.js} +1 -1
  78. package/dist/{Single-DErvX9y_.js → Single-C5Kkr9SY.js} +112 -107
  79. package/dist/{Statistic-CQxXdu-V.js → Statistic-Ce_FMw5O.js} +36 -31
  80. package/dist/{Stock-CsoHCwV6.js → Stock-BTjhpaxv.js} +1 -1
  81. package/dist/{Stock-DXLdfC3r.js → Stock-D8AJmsvb.js} +1 -1
  82. package/dist/{Stock.vue_vue_type_style_index_0_lang-B-b3Lj_h.js → Stock.vue_vue_type_style_index_0_lang-DTj2ITJ6.js} +28 -23
  83. package/dist/{Switch-BCgZXfWo.js → Switch-gwGbi34o.js} +1 -1
  84. package/dist/{Table-CAVxyUTD.js → Table-C03eUBYm.js} +69 -63
  85. package/dist/{Table-DkJYgLFt.js → Table-DA8aGGEH.js} +74 -70
  86. package/dist/{Text-Cn0cOTli.js → Text-B5uPrGof.js} +18 -12
  87. package/dist/Text-D-VS-lCk.js +59 -0
  88. package/dist/Text-NRww74M3.js +4 -0
  89. package/dist/Text.vue_vue_type_style_index_0_lang-Fsbur1tJ.js +59 -0
  90. package/dist/TextLink-B_Qg6CnF.js +65 -0
  91. package/dist/{Textarea-Pc4TfoC3.js → Textarea-gtXLL6Qe.js} +1 -1
  92. package/dist/Time-DYOIZ2Rv.js +43 -0
  93. package/dist/Timeline-B4AYezYA.js +59 -0
  94. package/dist/{Tree-01Sb-9zi.js → Tree-CRDb0vS5.js} +67 -62
  95. package/dist/Tree-CTmXjN1O.js +122 -0
  96. package/dist/TreeNode-HFcGpAOb.js +42 -0
  97. package/dist/{Update-Cy1lFPVv.js → Update-EHyhYK5k.js} +18 -12
  98. package/dist/{UpdateChild-DV_8KV9G.js → UpdateChild-CC3b9evd.js} +23 -17
  99. package/dist/Upload-CkQ-5tVg.js +72 -0
  100. package/dist/Upload-um4BYzwO.js +150 -0
  101. package/dist/UploadApi-BmdGJGjh.js +20 -0
  102. package/dist/Year-DKBG5ihv.js +47 -0
  103. package/dist/{Year-BFZPXXq0.js → Year-Lhvyb9Vk.js} +1 -1
  104. package/dist/assets/@intlify-BISCQg1h.js +2189 -0
  105. package/dist/assets/@vue-aVYGocXp.js +93 -0
  106. package/dist/assets/clone-BZn0cTAu.js +134 -0
  107. package/dist/assets/file-saver-CwlpTZSc.js +74 -0
  108. package/dist/assets/liquidjs-C-LVcoaY.js +2893 -0
  109. package/dist/assets/moment-h96o7c8I.js +2578 -0
  110. package/dist/assets/sprintf-js-BPTdvBYM.js +148 -0
  111. package/dist/assets/underscore-B0BCaBxV.js +1070 -0
  112. package/dist/assets/underscore.string-DVXD2SZo.js +425 -0
  113. package/dist/assets/util-deprecate-Dzun97re.js +28 -0
  114. package/dist/assets/vue-i18n-CLr3brPz.js +1670 -0
  115. package/dist/main-C1iALE1f.js +8947 -0
  116. package/dist/main.js +42 -41
  117. package/package.json +2 -2
  118. package/dist/Article-aps_F4Uq.js +0 -194
  119. package/dist/Autocomplete-CGoxGIM2.js +0 -48
  120. package/dist/Autocomplete-XdLV4jzi.js +0 -49
  121. package/dist/Callback-Czdr_dVp.js +0 -20
  122. package/dist/Cascader-D3Kr80fH.js +0 -81
  123. package/dist/Cascader-DRvnD4Xc.js +0 -41
  124. package/dist/Checkbox-5pSKww4M.js +0 -70
  125. package/dist/Code-BxQxsVD8.js +0 -54
  126. package/dist/Code-CtDTGfBy.js +0 -36
  127. package/dist/Code.vue_vue_type_style_index_0_lang-CPZKY3vQ.js +0 -59
  128. package/dist/Column-D3PMyaiE.js +0 -68
  129. package/dist/Comment-B3fvVYJF.js +0 -98
  130. package/dist/Compare-BXxJuIXf.js +0 -37
  131. package/dist/Copy-1znXP-dt.js +0 -43
  132. package/dist/Custom-C_15ZImX.js +0 -51
  133. package/dist/DataImport.vue_vue_type_script_setup_true_lang-ChWRjj2W.js +0 -172
  134. package/dist/Date-0bIUTNCs.js +0 -37
  135. package/dist/DateRange-Cxu9FXTE.js +0 -57
  136. package/dist/DateTime-IlsYZL-l.js +0 -38
  137. package/dist/Daterange-CX0Klog4.js +0 -57
  138. package/dist/Delete-DFl8Tr27.js +0 -56
  139. package/dist/Dictionary-DmarNVsi.js +0 -55
  140. package/dist/Email-BBjDCCOK.js +0 -48
  141. package/dist/Image-pufFvop2.js +0 -9
  142. package/dist/Index-C4D5pwwu.js +0 -173
  143. package/dist/Index-CD_KS2lO.js +0 -4
  144. package/dist/Index-CEh3KlPE.js +0 -4
  145. package/dist/Index-XmvSiC1h.js +0 -4
  146. package/dist/Int-Bi3P8XeV.js +0 -41
  147. package/dist/Int-Bn2p1DqA.js +0 -38
  148. package/dist/List-CeQRwXop.js +0 -73
  149. package/dist/Maintaince-CVMjhqSO.js +0 -14
  150. package/dist/Month-BfUSQ3xa.js +0 -38
  151. package/dist/Month-DQKfNQzN.js +0 -37
  152. package/dist/Paging-d_-VefNv.js +0 -94
  153. package/dist/QueryApi-Cdniq3mZ.js +0 -13
  154. package/dist/RichText-9MwwjuZi.js +0 -41
  155. package/dist/Select-CQE5kY-n.js +0 -111
  156. package/dist/Select-DaEqum3a.js +0 -80
  157. package/dist/Text-Dk5tNNZo.js +0 -53
  158. package/dist/Text-DvVWvaMO.js +0 -4
  159. package/dist/Text.vue_vue_type_style_index_0_lang-I01JEYAx.js +0 -53
  160. package/dist/TextLink-D3nvnLHn.js +0 -59
  161. package/dist/Time-CToG3p0T.js +0 -37
  162. package/dist/Timeline-DphvhX0U.js +0 -53
  163. package/dist/Tree-CH1RoUqu.js +0 -117
  164. package/dist/TreeNode-C54d29V-.js +0 -37
  165. package/dist/Upload-BalaO4wz.js +0 -146
  166. package/dist/Upload-DQVaPUdG.js +0 -67
  167. package/dist/UploadApi-Cfm5DM_x.js +0 -13
  168. package/dist/Year-Swm3VSzj.js +0 -41
  169. package/dist/main-BYJVoHlf.js +0 -19457
@@ -1,53 +0,0 @@
1
- import { defineComponent as h, toRefs as y, resolveComponent as o, openBlock as t, createBlock as n, unref as e, withCtx as m, createElementVNode as r, createElementBlock as c, Fragment as k, renderList as x, createCommentVNode as v } from "vue";
2
- import { f as g, J as C } from "./main-BYJVoHlf.js";
3
- const B = { class: "timeline-layout" }, H = ["innerHTML"], L = {
4
- key: 0,
5
- class: "timeline-detail"
6
- }, D = /* @__PURE__ */ h({
7
- __name: "Timeline",
8
- props: {
9
- searchData: {},
10
- route: {},
11
- module: {},
12
- schema: {},
13
- table: {},
14
- layout: {},
15
- next: {},
16
- set: {}
17
- },
18
- setup(_) {
19
- let u = _, { module: T, schema: b, table: l, layout: i, next: E, set: s } = y(u);
20
- return (J, M) => {
21
- const p = o("el-timeline-item"), d = o("el-timeline"), f = o("el-empty");
22
- return t(), n(e(g), { class: "timeline" }, {
23
- default: m(() => [
24
- r("div", B, [
25
- e(s)[e(l).name].length > 0 ? (t(), n(d, {
26
- key: 0,
27
- reverse: !1
28
- }, {
29
- default: m(() => [
30
- (t(!0), c(k, null, x(e(s)[e(l).name], (a) => (t(), n(p, {
31
- timestamp: a[e(i).time]
32
- }, {
33
- default: m(() => [
34
- r("div", {
35
- innerHTML: e(C).getHtml(a[e(i).text])
36
- }, null, 8, H)
37
- ]),
38
- _: 2
39
- }, 1032, ["timestamp"]))), 256))
40
- ]),
41
- _: 1
42
- })) : (t(), n(f, { key: 1 }))
43
- ]),
44
- e(l).length > 0 ? (t(), c("div", L, " 时间线节点详情 ")) : v("", !0)
45
- ]),
46
- _: 1
47
- });
48
- };
49
- }
50
- });
51
- export {
52
- D as default
53
- };
@@ -1,117 +0,0 @@
1
- import { defineComponent as Q, toRefs as U, ref as m, onMounted as X, watch as Y, nextTick as K, resolveComponent as N, openBlock as k, createElementBlock as w, unref as d, Fragment as L, renderList as B, createBlock as M, withCtx as b, createVNode as Z, createElementVNode as ee, toDisplayString as T, createCommentVNode as j } from "vue";
2
- import { v as le, n as _, j as F, s as P } from "./main-BYJVoHlf.js";
3
- const te = { class: "option-text" }, ae = {
4
- key: 0,
5
- class: "option-suffix"
6
- }, de = /* @__PURE__ */ Q({
7
- __name: "Tree",
8
- props: {
9
- route: {},
10
- validateErrors: {},
11
- module: {},
12
- schema: {},
13
- table: {},
14
- layout: {},
15
- next: {},
16
- set: {}
17
- },
18
- setup(S, { expose: $ }) {
19
- let z = S, { module: D, schema: ne, table: u, layout: l, set: f } = U(z), E = m(), V = m([]), x = m(), y = m(0), g = m([]), R = m(!0), W = (e, n, o) => {
20
- let a = f.value[u.value.name].find((r) => r.PermissionId == e[l.value.id]);
21
- a && (a[l.value.expand] = !0);
22
- }, q = (e, n, o) => {
23
- let a = f.value[u.value.name].find((r) => r.PermissionId == e[l.value.id]);
24
- a && (a[l.value.expand] = !1);
25
- }, A = (e, n, o) => {
26
- let a = n.checkedKeys, r = e[l.value.id], i = _.contains(a, r), c = [], s = [], h = F.getChildren(e, "Children").map((t) => t[l.value.id]), p = f.value[u.value.name].map((t) => t[l.value.checked]), v = _.intersect(h, p);
27
- if (i) {
28
- c.push(e[l.value.id]);
29
- let t = _.except(h, v);
30
- t.length && (a.push(...t), c.push(...t));
31
- } else
32
- s.push(r), v.length == h.length && (s.push(...h), _.remove(a, h));
33
- c.length && G(c), s.length && H(s);
34
- }, G = (e) => {
35
- for (let n = 0; n < e.length; n++) {
36
- let o = P.getDefaultRow(u.value);
37
- o[l.value.checked] = e[n], f.value[u.value.name].push(o);
38
- }
39
- }, H = (e) => {
40
- let n = f.value[u.value.name];
41
- for (let o = 0; o < e.length; o++) {
42
- let a = n.find((r) => r[l.value.checked] == e[o]);
43
- _.remove(n, a);
44
- }
45
- }, J = (e) => {
46
- x.value = e.contentRect.width, y.value = Math.ceil(x.value / 300), I(u.value, l.value, f.value);
47
- }, I = (e, n, o) => {
48
- g.value = P.getLines(n.data, y.value, (a) => [a], () => 1), K(() => {
49
- let a = o[e.name].map((i) => i[n.checked]), r = 0;
50
- for (let i = 0; i < g.value.length; i++) {
51
- let c = g.value[i];
52
- for (let s = 0; s < c.length; s++) {
53
- let C = V.value[r], h = c[s].data, p = F.getFlat(h, "Children").map((t) => t[n.id]), v = _.intersect(p, a);
54
- if (!(v.length == 1 && p.length > 1)) for (let t = 0; t < v.length; t++) {
55
- let O = v[t];
56
- C.setChecked(O, !0, !1);
57
- }
58
- r++;
59
- }
60
- }
61
- });
62
- };
63
- return X(() => {
64
- x.value = le.getWidth(E.value), y.value = Math.ceil(x.value / 300), I(u.value, l.value, f.value);
65
- }), Y(() => u.value, (e, n) => {
66
- R.value = !1, K(() => {
67
- R.value = !0, I(e, l.value, f.value);
68
- });
69
- }), $({ resize: J }), (e, n) => {
70
- const o = N("el-tree"), a = N("el-col"), r = N("el-row");
71
- return k(), w("div", {
72
- ref_key: "layoutRef",
73
- ref: E,
74
- class: "ha-tree-layout"
75
- }, [
76
- d(R) ? (k(!0), w(L, { key: 0 }, B(d(g), (i, c) => (k(), M(r, null, {
77
- default: b(() => [
78
- (k(!0), w(L, null, B(i, ({ data: s, span: C, index: h }, p) => (k(), M(a, {
79
- span: C,
80
- key: `${c}.${p}`
81
- }, {
82
- default: b(() => [
83
- Z(o, {
84
- ref_for: !0,
85
- ref_key: "treeRefs",
86
- ref: V,
87
- "show-checkbox": "",
88
- "highlight-current": "",
89
- "default-expand-all": !1,
90
- "expand-on-click-node": !1,
91
- "node-key": d(l).id,
92
- data: s,
93
- props: { children: "Children", label: d(l).text },
94
- disabled: d(D).type == "Detail",
95
- onNodeExpand: d(W),
96
- onNodeCollapse: d(q),
97
- onCheck: (v, t) => d(A)(v, t, h)
98
- }, {
99
- default: b(({ node: v, data: t }) => [
100
- ee("div", te, T(t[d(l).text]), 1),
101
- d(l).suffix ? (k(), w("div", ae, T(t[d(l).suffix]), 1)) : j("", !0)
102
- ]),
103
- _: 2
104
- }, 1032, ["node-key", "data", "props", "disabled", "onNodeExpand", "onNodeCollapse", "onCheck"])
105
- ]),
106
- _: 2
107
- }, 1032, ["span"]))), 128))
108
- ]),
109
- _: 2
110
- }, 1024))), 256)) : j("", !0)
111
- ], 512);
112
- };
113
- }
114
- });
115
- export {
116
- de as default
117
- };
@@ -1,37 +0,0 @@
1
- import { defineComponent as x, toRefs as h, computed as C, openBlock as s, createElementBlock as i, unref as e, createElementVNode as N, toDisplayString as a, createTextVNode as b, createCommentVNode as d } from "vue";
2
- import { P as y, Q as g } from "./main-BYJVoHlf.js";
3
- const k = ["title"], v = { class: "number" }, V = {
4
- key: 0,
5
- class: "option-suffix"
6
- }, B = {
7
- key: 1,
8
- class: "count"
9
- }, O = /* @__PURE__ */ x({
10
- __name: "TreeNode",
11
- props: {
12
- table: {},
13
- layout: {},
14
- row: {},
15
- node: {}
16
- },
17
- setup(u) {
18
- let c = u, { table: p, layout: n, row: t, node: f } = h(c), m = (r, o) => {
19
- let l = (r.parent.data.Children ? r.parent.data.Children.indexOf(o) : r.parent.data.indexOf(o)) + 1;
20
- return g.padLeft(l, 2, "0");
21
- }, _ = C(() => p.value.fields.find((l) => l.name == n.value.text).control.i18N);
22
- return (r, o) => {
23
- var l;
24
- return s(), i("div", {
25
- title: e(t)[e(n).title]
26
- }, [
27
- N("span", v, a(e(m)(e(f), e(t))), 1),
28
- b(" " + a((l = e(_)) != null && l.value ? e(y)(e(t)[e(n).text]) : e(t)[e(n).text]) + " ", 1),
29
- e(n).suffix ? (s(), i("span", V, a(e(t)[e(n).suffix]), 1)) : d("", !0),
30
- e(t).Children && e(t).Children.length > 0 ? (s(), i("span", B, "(" + a(e(t).Children.length) + ")", 1)) : d("", !0)
31
- ], 8, k);
32
- };
33
- }
34
- });
35
- export {
36
- O as default
37
- };
@@ -1,146 +0,0 @@
1
- import { defineComponent as X, toRefs as Y, ref as p, onMounted as Z, computed as k, watch as ee, resolveComponent as x, openBlock as I, createElementBlock as T, normalizeClass as le, unref as t, createVNode as B, withCtx as P, createBlock as ae, createTextVNode as te, toDisplayString as oe, isRef as re, createElementVNode as ue } from "vue";
2
- import { P as ne, I as R, m as ie, L as U, b as se, n as s, k as C, o as F, O as L, p as S, K as de } from "./main-BYJVoHlf.js";
3
- import "./QueryApi-Cdniq3mZ.js";
4
- import { U as pe } from "./UploadApi-Cfm5DM_x.js";
5
- const me = {
6
- key: 0,
7
- class: "fa fa-upload"
8
- }, ce = ["src"], _e = /* @__PURE__ */ X({
9
- __name: "Upload",
10
- props: {
11
- schema: {},
12
- table: {},
13
- field: {},
14
- set: {},
15
- row: {},
16
- modelValue: {}
17
- },
18
- emits: ["submit", "change", "update:modelValue"],
19
- setup($, { emit: z }) {
20
- let h = z, A = $, { table: d, field: u, row: g, set: ve, modelValue: E } = Y(A), m = p(!1), O = p({}), c = p([]), j = p(), q = p(), f = !0, b = p({ action: "", data: null }), H = (e) => {
21
- let l = pe.getUploadToken();
22
- e.forEach((o) => {
23
- let a = `${F.upload.address}/api/objects/download?slug=${o[0]}&token=${l}`;
24
- c.value.push({ name: o[1], url: a });
25
- });
26
- }, D = async (e) => {
27
- f = !1;
28
- let l = `/upload?table=${d.value.name}&field=${u.value.name}`;
29
- b.value.action = R.api.url + l;
30
- let o = new ie();
31
- o.path = l, o.method = "POST", await U.onRequest(o);
32
- let a = o.getHeader("Authorization");
33
- return O.value.Authorization = a, u.value.control.fileType == "Image" ? e.type.indexOf("image") == 0 ? Promise.resolve() : (se.error("请上传正确的图片文件"), Promise.reject()) : Promise.resolve();
34
- }, K = (e, l) => {
35
- f = !1;
36
- let a = [e.name.replace(R.api.url, "")];
37
- return U.post("/upload/delete", { files: a }).then(({ data: r }) => {
38
- let n = l.indexOf(e), _ = s.removeIndex(i.value, n, ",");
39
- if (h("update:modelValue", _), u.value.control.name) {
40
- let v = d.value.fields.find((y) => y.name == u.value.control.name), V = C.getValue(r.value, n, d.value, v), w = s.removeIndex(V, n, ",");
41
- C.setValue(w, r.value, d.value, n, v);
42
- }
43
- return Promise.resolve();
44
- }).catch(() => Promise.reject());
45
- }, M = (e) => {
46
- m.value = !0, j.value = e.url;
47
- }, G = (e, l, o) => {
48
- }, J = (e, l) => {
49
- U.handleResponseBody(e).then((o) => {
50
- let { name: a, url: r } = o.data[0];
51
- F.upload.method == "box" || L.isImage(r) || (l.url = S.getFileIcon(r));
52
- let _ = s.split(i.value, ",", r).join(",");
53
- if (i.value = _, u.value.control.name) {
54
- let v = d.value.fields.find((y) => y.name == u.value.control.name), V = g.value[v.value], w = s.split(V, ",", a);
55
- g.value[v.value] = w.join(",");
56
- }
57
- }).catch(() => {
58
- c.value = [];
59
- }).finally(() => {
60
- f = !0;
61
- });
62
- }, N = () => {
63
- if (c.value = [], !i.value)
64
- return;
65
- let e = s.split(i.value, ","), l = [];
66
- if (u.value.control.name) {
67
- let a = d.value.fields.find((n) => n.name == u.value.control.name), r = g.value[a.name];
68
- l = s.split(r, ",");
69
- }
70
- let o = s.combine(e, l);
71
- if (F.upload.method == "box")
72
- H(o);
73
- else {
74
- let a = de.httpOrHttps(i.value) ? i.value : R.api.url + i.value, r = { name: a, url: null };
75
- L.isImage(a) ? r.url = a : r.url = S.getFileIcon(a), c.value.push(r);
76
- }
77
- };
78
- Z(() => {
79
- N();
80
- });
81
- let i = k({
82
- get() {
83
- return E.value;
84
- },
85
- set(e) {
86
- h("update:modelValue", e), h("change", e);
87
- }
88
- }), Q = k(() => u.value.control.preview ? "picture-card" : null), W = k(() => W);
89
- return ee(() => i.value, (e, l) => {
90
- f && N();
91
- }), (e, l) => {
92
- const o = x("el-button"), a = x("el-upload"), r = x("el-dialog");
93
- return I(), T("div", {
94
- class: le(t(u).control.preview ? "control-file-preview" : "control-file")
95
- }, [
96
- B(a, {
97
- ref_key: "uploadRef",
98
- ref: q,
99
- "list-type": t(Q),
100
- action: t(b).action,
101
- headers: t(O),
102
- data: t(b).data,
103
- "file-list": t(c),
104
- "before-upload": t(D),
105
- "before-remove": t(K),
106
- "on-preview": t(M),
107
- "on-success": t(J),
108
- "on-progress": t(G),
109
- disabled: t(u).readonly
110
- }, {
111
- default: P(() => [
112
- t(u).control.preview ? (I(), T("i", me)) : (I(), ae(o, {
113
- key: 1,
114
- icon: "el-icon-upload",
115
- type: "primary"
116
- }, {
117
- default: P(() => [
118
- te(oe(t(ne)("common.click_upload")), 1)
119
- ]),
120
- _: 1
121
- }))
122
- ]),
123
- _: 1
124
- }, 8, ["list-type", "action", "headers", "data", "file-list", "before-upload", "before-remove", "on-preview", "on-success", "on-progress", "disabled"]),
125
- B(r, {
126
- draggable: "",
127
- "append-to-body": "",
128
- modelValue: t(m),
129
- "onUpdate:modelValue": l[0] || (l[0] = (n) => re(m) ? m.value = n : m = n)
130
- }, {
131
- default: P(() => [
132
- ue("img", {
133
- width: "100%",
134
- src: t(j),
135
- alt: ""
136
- }, null, 8, ce)
137
- ]),
138
- _: 1
139
- }, 8, ["modelValue"])
140
- ], 2);
141
- };
142
- }
143
- });
144
- export {
145
- _e as default
146
- };
@@ -1,67 +0,0 @@
1
- import { defineComponent as V, toRefs as b, ref as r, onMounted as k, computed as w, resolveComponent as x, openBlock as d, createElementBlock as n, Fragment as C, renderList as I, unref as s, createVNode as E, isRef as F, withCtx as O, createElementVNode as $ } from "vue";
2
- import { o as c, K as y, I as B, O as N, p as R } from "./main-BYJVoHlf.js";
3
- import "./QueryApi-Cdniq3mZ.js";
4
- import { U as j } from "./UploadApi-Cfm5DM_x.js";
5
- const A = { class: "text-upload" }, H = ["src", "onClick", "alt"], K = ["src"], P = /* @__PURE__ */ V({
6
- __name: "Upload",
7
- props: {
8
- schema: {},
9
- table: {},
10
- field: {},
11
- set: {},
12
- row: {},
13
- modelValue: {}
14
- },
15
- setup(v) {
16
- let f = v, { table: L, field: M, set: S, row: T, modelValue: g } = b(f), i = r(), t = r(!1), p = r([]), m = r(), _ = (e) => {
17
- t.value = !0, m.value = e.url;
18
- }, h = () => {
19
- if (o.value)
20
- if (c.upload.method == "box")
21
- j.getUploadToken().then((e) => {
22
- o.value.split(",").forEach((a) => {
23
- let l = `${c.upload.address}/api/objects/download?slug=${a}&token=${e}`;
24
- p.value.push({ name: a, url: l });
25
- });
26
- });
27
- else {
28
- let e = y.httpOrHttps(o.value) ? o.value : B.api.url + o.value;
29
- N.isImage(e) ? i.value = e : i.value = R.getFileIcon(e);
30
- }
31
- };
32
- k(() => {
33
- h();
34
- });
35
- let o = w(() => g.value);
36
- return (e, u) => {
37
- const a = x("el-dialog");
38
- return d(), n("div", A, [
39
- (d(!0), n(C, null, I(s(p), (l, U) => (d(), n("img", {
40
- class: "detail-image",
41
- src: l.url,
42
- onClick: (q) => s(_)(l),
43
- alt: l.name,
44
- key: U
45
- }, null, 8, H))), 128)),
46
- E(a, {
47
- draggable: "",
48
- "append-to-body": "",
49
- top: "5vh",
50
- modelValue: s(t),
51
- "onUpdate:modelValue": u[0] || (u[0] = (l) => F(t) ? t.value = l : t = l)
52
- }, {
53
- default: O(() => [
54
- $("img", {
55
- width: "100%",
56
- src: s(m)
57
- }, null, 8, K)
58
- ]),
59
- _: 1
60
- }, 8, ["modelValue"])
61
- ]);
62
- };
63
- }
64
- });
65
- export {
66
- P as default
67
- };
@@ -1,13 +0,0 @@
1
- import { L as o, l as t } from "./main-BYJVoHlf.js";
2
- let e = null;
3
- class s {
4
- /**
5
- * 获取上传令牌,过期自动获取
6
- */
7
- static async getUploadToken() {
8
- return e == null || t.getTime() >= t.getTime(e.expireTime) ? o.get("/upload/token").then(({ data: r }) => (e = r, Promise.resolve(e.token))).catch(() => Promise.reject()) : Promise.resolve(e.token);
9
- }
10
- }
11
- export {
12
- s as U
13
- };
@@ -1,41 +0,0 @@
1
- import { defineComponent as f, toRefs as _, computed as h, resolveComponent as V, openBlock as b, createBlock as g, unref as e, isRef as Y } from "vue";
2
- import { q as k } from "./main-BYJVoHlf.js";
3
- const w = /* @__PURE__ */ f({
4
- __name: "Year",
5
- props: {
6
- schema: {},
7
- table: {},
8
- field: {},
9
- set: {},
10
- row: {},
11
- modelValue: {}
12
- },
13
- emits: ["submit", "change", "update:modelValue"],
14
- setup(r, { emit: d }) {
15
- let o = d, u = r, { table: p, field: a, row: C, set: y, modelValue: s } = _(u), c = () => {
16
- o("submit");
17
- }, l = h({
18
- get() {
19
- return s.value;
20
- },
21
- set(t) {
22
- o("update:modelValue", t), o("change", t);
23
- }
24
- });
25
- return (t, n) => {
26
- const i = V("el-date-picker");
27
- return b(), g(i, {
28
- type: "year",
29
- placeholder: e(k)(e(p).name, e(a).name),
30
- "value-format": "YYYY",
31
- disabled: e(a).control.readonly,
32
- onChange: e(c),
33
- modelValue: e(l),
34
- "onUpdate:modelValue": n[0] || (n[0] = (m) => Y(l) ? l.value = m : l = m)
35
- }, null, 8, ["placeholder", "disabled", "onChange", "modelValue"]);
36
- };
37
- }
38
- });
39
- export {
40
- w as default
41
- };