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,28 @@
1
+ import { defineComponent as c, toRefs as m, openBlock as u, createBlock as p, unref as e } from "vue";
2
+ import { _ } from "./Stock.vue_vue_type_style_index_0_lang-CcHVxdzc.js";
3
+ const b = /* @__PURE__ */ c({
4
+ __name: "Stock",
5
+ props: {
6
+ route: {},
7
+ validateErrors: {},
8
+ module: {},
9
+ schema: {},
10
+ table: {},
11
+ layout: {},
12
+ next: {},
13
+ set: {}
14
+ },
15
+ setup(t) {
16
+ let a = t, { schema: o, table: s, layout: l, next: r, set: n } = m(a);
17
+ return (f, i) => (u(), p(_, {
18
+ schema: e(o),
19
+ table: e(s),
20
+ layout: e(l),
21
+ next: e(r),
22
+ set: e(n)
23
+ }, null, 8, ["schema", "table", "layout", "next", "set"]));
24
+ }
25
+ });
26
+ export {
27
+ b as default
28
+ };
@@ -0,0 +1,4 @@
1
+ import { _ as f } from "./Stock.vue_vue_type_style_index_0_lang-CcHVxdzc.js";
2
+ export {
3
+ f as default
4
+ };
@@ -0,0 +1,302 @@
1
+ import { defineComponent as F, toRefs as R, ref as T, onMounted as B, openBlock as G, createBlock as P, unref as h, withCtx as V, createElementVNode as A, createTextVNode as E, toDisplayString as b } from "vue";
2
+ import { i as O, k as K, A as N } 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 j = /* @__PURE__ */ A("div", { class: "ha-empty" }, "暂无行情数据", -1), z = [
8
+ j
9
+ ], D = /* @__PURE__ */ F({
10
+ __name: "Stock",
11
+ props: {
12
+ searchData: {},
13
+ route: {},
14
+ module: {},
15
+ schema: {},
16
+ table: {},
17
+ layout: {},
18
+ next: {},
19
+ set: {}
20
+ },
21
+ setup(k) {
22
+ let L = k, { module: H, schema: W, table: v, layout: n, next: $, set: f } = R(L), p = null, d = null, w = O(), y = "#04aa4e", x = "#ff5945", S = T(), u = { history: null, week: null, month: null }, _ = (t) => {
23
+ let o = N.orderBy(t, (i) => i[n.value.time], !1), e = [], l = [], r = [];
24
+ for (let i = 0; i < o.length; i++) {
25
+ let a = o[i];
26
+ e.push(a[n.value.time]);
27
+ let c = parseFloat(a[n.value.open]), s = parseFloat(a[n.value.close]);
28
+ l.push([c, s, parseFloat(a[n.value.low]), parseFloat(a[n.value.high])]);
29
+ let C = {
30
+ value: parseFloat(a[n.value.volumn]),
31
+ itemStyle: { color: s > c ? y : x }
32
+ };
33
+ r.push(C);
34
+ }
35
+ return { times: e, values: l, volumes: r };
36
+ }, m = (t, o) => {
37
+ let e = [];
38
+ for (let l = 0, r = t.values.length; l < r; l++) {
39
+ if (l < o) {
40
+ e.push("-");
41
+ continue;
42
+ }
43
+ let i = 0;
44
+ for (let a = 0; a < o; a++)
45
+ i += t.values[l - a][1];
46
+ e.push(i / o);
47
+ }
48
+ return e;
49
+ }, M = (t) => {
50
+ let o = n.value.trade, e = {
51
+ animation: !1,
52
+ //关闭动画,提升性能
53
+ // title: {text: this.table.title, left: 'left', textStyle: {}},//标题
54
+ tooltip: {
55
+ trigger: "axis",
56
+ backgroundColor: "rgba(255, 255, 255, 0.8)",
57
+ textStyle: { color: "#666" },
58
+ borderColor: "#ddd",
59
+ borderWidth: 1,
60
+ axisPointer: { type: "cross" }
61
+ },
62
+ //提示
63
+ title: { textStyle: { color: null } },
64
+ axisPointer: { link: { xAxisIndex: "all" } },
65
+ //连接多个坐标轴的提示器
66
+ grid: [
67
+ { left: "2%", right: "3%", height: "60%", containLabel: !0 },
68
+ //k线图占据网格配置
69
+ { left: "4%", right: "3%", top: "76%", containLabel: !0 }
70
+ //交易量图的网格
71
+ ],
72
+ dataZoom: [
73
+ { type: "inside", start: 0, end: 100, xAxisIndex: [0, 1] },
74
+ //K线图 和 交易量 控件联动;控制默认滑块的选择范围
75
+ { show: !0, type: "slider", top: "91%", start: 50, end: 100 }
76
+ //不显示底部滑块
77
+ ],
78
+ toolbox: { left: "2%", feature: { dataZoom: { yAxisIndex: "none" }, restore: {}, saveAsImage: {} } },
79
+ xAxis: [
80
+ {
81
+ //主图
82
+ type: "category",
83
+ scale: !0,
84
+ data: t.times,
85
+ //X坐标轴
86
+ boundaryGap: !0,
87
+ //保留边界,当图标数据过多时,可以看的更完整
88
+ axisTick: { show: !1 },
89
+ //不显示坐标轴刻度
90
+ axisLabel: { show: !1 },
91
+ //不显示x坐标轴标签
92
+ axisLine: { onZero: !1, show: !1 }
93
+ //隐藏x坐标轴线
94
+ },
95
+ {
96
+ //交易量图
97
+ type: "category",
98
+ gridIndex: 1,
99
+ data: t.times,
100
+ boundaryGap: !0,
101
+ //保留边界,当图标数据过多时,可以看的更完整
102
+ axisTick: { show: !1 },
103
+ //不显示x坐标轴刻度
104
+ axisLabel: { color: "#9b9da9" },
105
+ //label文字设置
106
+ axisLine: { onZero: !1, show: !1 }
107
+ //隐藏x坐标轴线
108
+ }
109
+ ],
110
+ yAxis: [
111
+ {
112
+ //k线图
113
+ type: null,
114
+ scale: !0,
115
+ axisTick: { show: !1 },
116
+ //不显示y坐标轴刻度
117
+ splitArea: { show: !1 },
118
+ //不显示间隔块
119
+ splitLine: { lineStyle: { color: "#eee" } },
120
+ //分割线颜色
121
+ axisLabel: { color: "#777" },
122
+ //y轴标签颜色
123
+ axisLine: { show: !1 }
124
+ //隐藏y坐标轴线
125
+ },
126
+ {
127
+ //交易量图
128
+ show: !1,
129
+ gridIndex: 1,
130
+ position: "left",
131
+ //刻度数值的位置
132
+ axisLine: { show: !1 },
133
+ //不显示y坐标轴
134
+ axisTick: { show: !1 },
135
+ splitLine: { onZero: !0, show: !1 },
136
+ //y轴分割线
137
+ axisLabel: { color: "#c7c7c7", inside: !0, fontSize: 8 }
138
+ //label文字朝内对齐
139
+ }
140
+ ],
141
+ series: [],
142
+ legend: null
143
+ };
144
+ if (f.value[v.value.name][0][n.value.open])
145
+ e.legend = { data: ["日K", "MA5", "MA10", "MA20", "MA30"], right: "2%" }, e.series = [
146
+ {
147
+ name: "日K",
148
+ type: "candlestick",
149
+ //k线图
150
+ gridIndex: 1,
151
+ //网格索引,表示使用第2个网格的配置
152
+ data: t.values,
153
+ itemStyle: {
154
+ color: y,
155
+ color0: x,
156
+ borderColor: y,
157
+ borderColor0: x
158
+ },
159
+ markPoint: {
160
+ //图标标注
161
+ symbol: "pin",
162
+ //标记的图形
163
+ label: {
164
+ normal: {
165
+ formatter: function(l) {
166
+ return l != null ? l.value : "";
167
+ }
168
+ }
169
+ },
170
+ data: [{ type: "max" }],
171
+ tooltip: {
172
+ formatter: function(l) {
173
+ debugger;
174
+ return l.name + "<br>" + (l.data.coord || "");
175
+ }
176
+ }
177
+ }
178
+ },
179
+ {
180
+ name: "成交量",
181
+ type: "bar",
182
+ data: t.volumes,
183
+ xAxisIndex: 1,
184
+ //绑定对应的x坐标轴配置
185
+ yAxisIndex: 1
186
+ //绑定对应的y坐标轴配置
187
+ },
188
+ {
189
+ name: "MA5",
190
+ type: "line",
191
+ data: m(t, 5),
192
+ smooth: !0,
193
+ lineStyle: { width: 1 },
194
+ itemStyle: { opacity: 0 }
195
+ //点样式
196
+ },
197
+ {
198
+ name: "MA10",
199
+ type: "line",
200
+ data: m(t, 10),
201
+ smooth: !0,
202
+ lineStyle: { width: 1 },
203
+ itemStyle: { opacity: 0 }
204
+ //点样式
205
+ },
206
+ {
207
+ name: "MA20",
208
+ type: "line",
209
+ data: m(t, 20),
210
+ smooth: !0,
211
+ lineStyle: { width: 1 },
212
+ itemStyle: { opacity: 0 }
213
+ //点样式
214
+ },
215
+ {
216
+ name: "MA30",
217
+ type: "line",
218
+ data: m(t, 30),
219
+ smooth: !0,
220
+ lineStyle: { width: 1 },
221
+ itemStyle: { opacity: 0 }
222
+ //点样式
223
+ }
224
+ ];
225
+ else {
226
+ e.legend = { data: ["净值"], right: "2%", textStyle: {} }, e.yAxis[0].type = "value", e.series = [], w.theme == "dark" && (e.title.textStyle.color = "rgba(255,255,255,0.8)", e.legend.textStyle.color = "rgba(255,255,255,.72)", e.xAxis[0].axisLabel.color = "rgba(255,255,255,.72)", e.yAxis[0].splitLine.lineStyle.color = "rgba(110,117,130,0.2)", e.yAxis[0].axisLabel.color = "rgba(255,255,255,.72)");
227
+ let l = "#62bfff", r = {
228
+ name: "净值",
229
+ type: "line",
230
+ lineStyle: { color: l, width: 1 },
231
+ itemStyle: { color: l },
232
+ //点样式
233
+ smooth: !0,
234
+ data: [],
235
+ areaStyle: {
236
+ color: new d.graphic.LinearGradient(0, 0, 0, 1, [{
237
+ offset: 0,
238
+ color: l
239
+ }, {
240
+ offset: 1,
241
+ color: "#fff"
242
+ }])
243
+ }
244
+ };
245
+ w.theme == "dark" && (r.areaStyle.color = new d.graphic.LinearGradient(
246
+ 0,
247
+ 0,
248
+ 0,
249
+ 1,
250
+ [
251
+ { offset: 0, color: l },
252
+ { offset: 1, color: "#354052" }
253
+ ]
254
+ )), e.xAxis[0].data.push(...t.times);
255
+ let i = t.values.map((a) => a[1]);
256
+ r.data.push(...i), e.series.push(r);
257
+ }
258
+ return o && f.value[o.table].forEach((r) => {
259
+ let i = r[o.time], a = t.times.indexOf(i), c = t.values[a], s = {
260
+ coord: [i],
261
+ itemStyle: { color: null },
262
+ label: { position: null, offset: null },
263
+ value: null,
264
+ symbolRotate: null
265
+ };
266
+ r[o.direction] == 1 ? (s.coord.push(c[2] * 0.99), s.value = "买", s.itemStyle.color = "#00c805", s.symbolRotate = 180, s.label.position = "insideBottom", s.label.offset = [0, -5]) : (s.coord.push(c[3] * 1.01), s.value = "卖", s.itemStyle.color = "#ff5000"), e.series[0].markPoint.data.push(s);
267
+ }), e;
268
+ }, g = (t) => {
269
+ let o = 0;
270
+ return t.forEach((e) => {
271
+ let r = Math.max(e[0] - e[2], e[3] - e[0]) / e[0];
272
+ o += r;
273
+ }), o / t.length * 100;
274
+ }, I = (t) => {
275
+ let o = M(t);
276
+ p || (p = d.init(S.value)), p.setOption(o);
277
+ let e = t.values, l = e.reverse();
278
+ u.history = g(e), u.week = g(l.slice(0, 7)), u.month = g(l.slice(0, 30));
279
+ }, Z = () => {
280
+ let t = f.value[v.value.name];
281
+ t.length > 0 && I(_(t));
282
+ };
283
+ return B(() => {
284
+ import("echarts").then((t) => {
285
+ d = t, Z();
286
+ });
287
+ }), (t, o) => (G(), P(h(K), null, {
288
+ default: V(() => [
289
+ A("div", {
290
+ ref_key: "chartRef",
291
+ ref: S,
292
+ class: "chart"
293
+ }, z, 512),
294
+ E(" 30日开盘振幅:" + b(h(u).month) + "% 7日开盘振幅:" + b(h(u).week) + "% 历史开盘振幅:" + b(h(u).history) + "% ", 1)
295
+ ]),
296
+ _: 1
297
+ }));
298
+ }
299
+ });
300
+ export {
301
+ D as _
302
+ };
@@ -0,0 +1,27 @@
1
+ import { defineComponent as u, defineAsyncComponent as f, toRefs as c, openBlock as b, createBlock as w, unref as e, isRef as V } from "vue";
2
+ const x = /* @__PURE__ */ u({
3
+ __name: "Switch",
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: i, set: d, row: p, modelValue: t } = c(n);
14
+ return (h, l) => (b(), w(e(r), {
15
+ schema: e(m),
16
+ table: e(s),
17
+ field: e(i),
18
+ set: e(d),
19
+ row: e(p),
20
+ modelValue: e(t),
21
+ "onUpdate:modelValue": l[0] || (l[0] = (o) => V(t) ? t.value = o : t = o)
22
+ }, null, 8, ["schema", "table", "field", "set", "row", "modelValue"]));
23
+ }
24
+ });
25
+ export {
26
+ x as default
27
+ };
@@ -0,0 +1,50 @@
1
+ import { defineComponent as V, toRefs as h, computed as _, resolveComponent as b, openBlock as m, createElementBlock as i, createVNode as g, unref as l, isRef as C, createCommentVNode as w } from "vue";
2
+ const k = { class: "control-switch" }, x = /* @__PURE__ */ V({
3
+ __name: "Switch",
4
+ props: {
5
+ schema: {},
6
+ table: {},
7
+ field: {},
8
+ set: {},
9
+ row: {},
10
+ modelValue: { type: [Boolean, Number] }
11
+ },
12
+ emits: ["submit", "change", "update:modelValue"],
13
+ setup(c, { emit: p }) {
14
+ let d = p, f = c, { table: y, field: n, set: B, modelValue: s } = h(f), r = () => {
15
+ e.value = null;
16
+ }, v = (o) => {
17
+ let t = n.value.control.data.data.find((u) => u.value == o);
18
+ e.value = t.value;
19
+ }, e = _({
20
+ get() {
21
+ if (s.value != null)
22
+ return s.value == !0;
23
+ },
24
+ set(o) {
25
+ d("update:modelValue", o), d("change", o);
26
+ }
27
+ });
28
+ return (o, t) => {
29
+ const u = b("el-switch");
30
+ return m(), i("span", k, [
31
+ g(u, {
32
+ small: "",
33
+ disabled: l(n).control.readonly,
34
+ onChange: l(v),
35
+ modelValue: l(e),
36
+ "onUpdate:modelValue": t[0] || (t[0] = (a) => C(e) ? e.value = a : e = a)
37
+ }, null, 8, ["disabled", "onChange", "modelValue"]),
38
+ !l(n).required && l(e) != null ? (m(), i("i", {
39
+ key: 0,
40
+ class: "fa fa-times",
41
+ onClick: t[1] || (t[1] = //@ts-ignore
42
+ (...a) => l(r) && l(r)(...a))
43
+ })) : w("", !0)
44
+ ]);
45
+ };
46
+ }
47
+ });
48
+ export {
49
+ x as default
50
+ };
@@ -0,0 +1,241 @@
1
+ import { defineComponent as be, defineAsyncComponent as xe, toRefs as Ce, ref as c, onMounted as Se, computed as L, watch as Re, resolveComponent as b, openBlock as v, createElementBlock as F, Fragment as U, createVNode as S, unref as e, withCtx as f, createTextVNode as ke, toDisplayString as W, createBlock as H, createCommentVNode as $, renderList as Fe, createElementVNode as x, normalizeStyle as He, resolveDynamicComponent as $e, nextTick as G } from "vue";
2
+ import { l as De, w as ze, P as J, C as K, j as q, D as y, q as B, x as Q, A as I, O as We, v as qe } 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 "element-plus";
8
+ const Be = {
9
+ key: 0,
10
+ class: "required"
11
+ }, Ie = ["onMouseenter"], Me = /* @__PURE__ */ x("i", { class: "fa fa-question-circle icon-question" }, null, -1), Oe = { class: "footer-left" }, Te = { class: "footer-right" }, Ge = /* @__PURE__ */ be({
12
+ __name: "Table",
13
+ props: {
14
+ route: {},
15
+ validateErrors: {},
16
+ module: {},
17
+ schema: {},
18
+ table: {},
19
+ layout: {},
20
+ next: {},
21
+ set: {}
22
+ },
23
+ emits: ["submit", "change", "row-edit"],
24
+ setup(X, { expose: Y, emit: Z }) {
25
+ let ee = xe(() => import("./Index-DZkeSKKp.js")), D = Z, te = X, { schema: M, table: a, layout: p, set: i, next: Ae, route: O, module: R, validateErrors: T } = Ce(te), _ = c({ page: 1 }), le = De(), d = c([]), ae = c(!0), k = c(), A = c(), E = c(), N = c(), g = c({ layout: "prev, pager, next", count: 5 }), oe = (t, o, n) => {
26
+ D("row-edit", t, a.value, n);
27
+ }, ne = (t) => {
28
+ D("submit", t);
29
+ }, re = (t, o) => {
30
+ let n = a.value.show[o];
31
+ return n._headerWidth ? (t.column.realWidth || t.column.width) > n._headerWidth + 20 : !0;
32
+ }, ue = (t, o) => {
33
+ let n = t.target.children[0].offsetWidth, u = a.value.show[o];
34
+ u._headerWidth = n;
35
+ }, ie = (t, o, n, u, l) => {
36
+ D("change", t, o, n, u, l);
37
+ }, V = (t) => i.value[a.value.name].indexOf(t), se = (t) => {
38
+ d.value = t;
39
+ }, me = (t, o, n, u, l) => {
40
+ J.setColumnWidth(O.value, l.name, n.property, t);
41
+ }, pe = (t) => {
42
+ j(t.contentRect.width), G(() => {
43
+ P(t.contentRect.height);
44
+ });
45
+ }, j = (t = null) => {
46
+ let o = y.parentUntil(k.value.$el, ".ha-main-form");
47
+ t == null && (t = y.getWidth(o)), t <= 690 ? g.value.count = 5 : g.value.count = 7, t <= 300 ? g.value.layout = "pager" : t <= 620 ? g.value.layout = "prev, pager, next" : g.value.layout = "total, prev, pager, next, jumper";
48
+ }, P = (t = null) => {
49
+ let o = y.parentUntil(k.value.$el, ".ha-main-form");
50
+ t || (t = y.getHeight(o));
51
+ let n = y.getHeight(A.value), u = y.find(o, ".main-footer"), l = y.getHeight(u), s = t - n - l;
52
+ N.value = `${s}px`;
53
+ }, de = () => {
54
+ let t = i.value[a.value.name].length, o = q.getDefaultRow(a.value);
55
+ i.value[a.value.name].push(o);
56
+ let n = a.value.fields.filter((l) => l.feature != null);
57
+ for (let l = 0; l < n.length; l++) {
58
+ let s = n[l];
59
+ B.getFeature(s.feature.type).add(a.value, s, i.value, o);
60
+ }
61
+ z(t);
62
+ let u = Q.isBottom(".tree-detail");
63
+ G(() => {
64
+ u && Q.scrollToBottom(".tree-detail");
65
+ });
66
+ }, ce = () => {
67
+ let t = d.value[0], o = q.getDefaultRow(a.value), n = I.insert(i.value[a.value.name], t, o), u = a.value.fields.filter((l) => l.feature != null);
68
+ for (let l = 0; l < u.length; l++) {
69
+ let s = u[l];
70
+ B.getFeature(s.feature.type).insert(a.value, s, i.value, t, o);
71
+ }
72
+ z(n);
73
+ }, ve = () => {
74
+ let t = a.value.key.name, o = We.clone(d.value, (l) => {
75
+ l[t] = null, l[`Old_${t}`] = null;
76
+ }), n = i.value[a.value.name].indexOf(d.value[0]);
77
+ for (let l = 0; l < d.value.length; l++) {
78
+ let s = d.value[l], w = o[l];
79
+ I.append(i.value[a.value.name], s, w);
80
+ }
81
+ let u = a.value.fields.filter((l) => l.feature != null);
82
+ for (let l = 0; l < u.length; l++) {
83
+ let s = u[l];
84
+ B.getFeature(s.feature.type).copy(a.value, s, i.value);
85
+ }
86
+ z(n);
87
+ }, fe = () => {
88
+ I.remove(i.value[a.value.name], d.value), d.value = [];
89
+ }, z = (t) => {
90
+ let o = qe.pageCount(t + 1, p.value.pageSize);
91
+ _.value.page = o;
92
+ }, ge = (t) => {
93
+ _.value.page = t;
94
+ }, he = () => {
95
+ k.value.$el.querySelector("tbody");
96
+ };
97
+ Se(() => {
98
+ he(), j(), ze.detectLoaded(E, () => {
99
+ P();
100
+ });
101
+ });
102
+ let ye = L(() => {
103
+ let t = (_.value.page - 1) * p.value.pageSize, o = _.value.page * p.value.pageSize - 1;
104
+ return i.value[a.value.name].filter((u, l) => l >= t && l <= o);
105
+ }), _e = L(() => {
106
+ let t = a.value.main ? `/${a.value.name}` : `/${M.value[0].name}/${a.value.name}`;
107
+ return le.getComponent(`${t}/update-child`, "partial", "update-child");
108
+ });
109
+ return Re(T, (t, o) => {
110
+ let n = t.find((u) => u.table == a.value.name);
111
+ n != null && (_.value.page = Math.ceil((n.index + 1) / p.value.pageSize));
112
+ }), Y({ resize: pe }), (t, o) => {
113
+ const n = b("el-table-column"), u = b("el-tooltip"), l = b("el-popover"), s = b("el-form-item"), w = b("el-table"), we = b("el-pagination");
114
+ return v(), F(U, null, [
115
+ S(w, {
116
+ ref_key: "tableRef",
117
+ ref: k,
118
+ class: "ha-table-layout table-default",
119
+ size: "small",
120
+ border: "",
121
+ "max-height": e(N),
122
+ data: e(ye),
123
+ onRowClick: o[0] || (o[0] = (r, h, m) => e(oe)(r, h, m)),
124
+ onSelectionChange: e(se),
125
+ onHeaderDragend: o[1] || (o[1] = (r, h, m, C) => e(me)(r, h, m, C, e(a)))
126
+ }, {
127
+ empty: f(() => [
128
+ ke(W(t.t("common.no_data")), 1)
129
+ ]),
130
+ default: f(() => [
131
+ e(ae) ? (v(), H(n, {
132
+ key: 0,
133
+ type: "selection",
134
+ width: "40",
135
+ fixed: ""
136
+ })) : $("", !0),
137
+ (v(!0), F(U, null, Fe(e(a).show, (r, h) => (v(), H(n, {
138
+ key: r.name,
139
+ "show-overflow-tooltip": "",
140
+ prop: r.name,
141
+ label: r.label,
142
+ "min-width": e(J).getColumnWidth(e(O), e(a).name, r),
143
+ fixed: e(p).fixed.length > 0 ? e(p).fixed.indexOf(r.name) > -1 : h == 0
144
+ }, {
145
+ header: f((m) => [
146
+ e(R).type != "Detail" && r.control.required ? (v(), F("i", Be, "*")) : $("", !0),
147
+ S(u, {
148
+ placement: "top",
149
+ content: r.label,
150
+ disabled: e(re)(m, h)
151
+ }, {
152
+ default: f(() => [
153
+ x("span", {
154
+ onMouseenter: (C) => e(ue)(C, h)
155
+ }, [
156
+ x("span", null, W(t.t_field(e(a).table, r.name)), 1)
157
+ ], 40, Ie)
158
+ ]),
159
+ _: 2
160
+ }, 1032, ["content", "disabled"]),
161
+ r.control.tooltip ? (v(), H(l, {
162
+ key: 1,
163
+ trigger: "hover",
164
+ placement: "top",
165
+ width: "auto",
166
+ title: r.control.tooltip.title
167
+ }, {
168
+ reference: f(() => [
169
+ Me
170
+ ]),
171
+ default: f(() => [
172
+ x("pre", null, W(r.control.tooltip.content), 1)
173
+ ]),
174
+ _: 2
175
+ }, 1032, ["title"])) : $("", !0)
176
+ ]),
177
+ default: f((m) => [
178
+ S(s, {
179
+ style: He(e(K).getStyle(r, e(R).type, e(p).type)),
180
+ rules: e(q).getRules(e(T), e(a), r, m.$index),
181
+ prop: `[${e(a).name}][${e(V)(m.row)}][${r.name}]`
182
+ }, {
183
+ default: f(() => [
184
+ S(e(ee), {
185
+ schema: e(M),
186
+ table: e(a),
187
+ field: r,
188
+ set: e(i),
189
+ row: m.row,
190
+ config: e(K).getConfig(r, e(R).type, e(p).type),
191
+ onSubmit: e(ne),
192
+ onChange: (C) => e(ie)(C, e(i), e(a), r, e(V)(m.row))
193
+ }, null, 8, ["schema", "table", "field", "set", "row", "config", "onSubmit", "onChange"])
194
+ ]),
195
+ _: 2
196
+ }, 1032, ["style", "rules", "prop"])
197
+ ]),
198
+ _: 2
199
+ }, 1032, ["prop", "label", "min-width", "fixed"]))), 128))
200
+ ]),
201
+ _: 1
202
+ }, 8, ["max-height", "data", "onSelectionChange"]),
203
+ e(a).main ? $("", !0) : (v(), F("div", {
204
+ key: 0,
205
+ ref_key: "footerRef",
206
+ ref: A,
207
+ class: "table-footer"
208
+ }, [
209
+ x("div", Oe, [
210
+ (v(), H($e(e(_e)), {
211
+ ref_key: "operationRef",
212
+ ref: E,
213
+ module: e(R),
214
+ table: e(a),
215
+ set: e(i),
216
+ selection: e(d),
217
+ onAdd: e(de),
218
+ onInsert: e(ce),
219
+ onCopy: e(ve),
220
+ onRemove: e(fe)
221
+ }, null, 40, ["module", "table", "set", "selection", "onAdd", "onInsert", "onCopy", "onRemove"]))
222
+ ]),
223
+ x("div", Te, [
224
+ S(we, {
225
+ background: "",
226
+ layout: e(g).layout,
227
+ "current-page": e(_).page,
228
+ "page-size": e(p).pageSize,
229
+ "pager-count": e(g).count,
230
+ total: e(i)[e(a).name].length,
231
+ onCurrentChange: e(ge)
232
+ }, null, 8, ["layout", "current-page", "page-size", "pager-count", "total", "onCurrentChange"])
233
+ ])
234
+ ], 512))
235
+ ], 64);
236
+ };
237
+ }
238
+ });
239
+ export {
240
+ Ge as default
241
+ };