@jeecg/online 3.5.3-beta3 → 3.6.0-beta

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (163) hide show
  1. package/AuthButtonConfig-b6a674fa.mjs +125 -0
  2. package/AuthButtonTree-09e57bc4.mjs +156 -0
  3. package/AuthDataConfig-6e7e61ec.mjs +212 -0
  4. package/AuthDataTree-e83286c5.mjs +139 -0
  5. package/AuthFieldConfig-f1ec2708.mjs +139 -0
  6. package/AuthFieldTree-bb72e21f.mjs +232 -0
  7. package/AuthManagerDrawer-28a2d108.mjs +114 -0
  8. package/AuthSetterModal-2990d553.mjs +261 -0
  9. package/CgformCopyList-36a4cbf0.mjs +246 -0
  10. package/CgformModal-7399a5ac.mjs +611 -0
  11. package/CgreportModal-2eb9c9e1.mjs +13 -0
  12. package/CgreportModal.vue_vue_type_script_setup_true_lang-c2ceb064.mjs +566 -0
  13. package/CheckDictTable-3a8a54b3.mjs +211 -0
  14. package/CodeFileListModal-72f0d3bb.mjs +158 -0
  15. package/CodeFileViewModal-9eb88c47.mjs +244 -0
  16. package/CodeGeneratorModal-a89958f5.mjs +233 -0
  17. package/CustomButtonList-c44aec5a.mjs +363 -0
  18. package/DBAttributeTable-7d285e8d.mjs +473 -0
  19. package/DbToOnlineModal-d23cbeb1.mjs +160 -0
  20. package/DetailForm-2901d215.mjs +461 -0
  21. package/EnhanceJavaModal-153899a9.mjs +264 -0
  22. package/EnhanceJsHistory-7f5db3b1.mjs +184 -0
  23. package/EnhanceJsModal-c2fb75b8.mjs +311 -0
  24. package/EnhanceSqlModal-965e9b0a.mjs +268 -0
  25. package/ExtendConfigModal-8f08466f.mjs +111 -0
  26. package/FieldExtendJsonModal-adfcf5a7.mjs +219 -0
  27. package/FileSelectModal-432d4521.mjs +103 -0
  28. package/ForeignKeyTable-faab7ccf.mjs +69 -0
  29. package/IndexTable-0a2d3718.mjs +89 -0
  30. package/JModalTip-e1938b49.mjs +46 -0
  31. package/JOnlineSearchSelect-7e908492.mjs +95 -0
  32. package/LeftDepart-54f245b3.mjs +82 -0
  33. package/LeftRole-c138f892.mjs +86 -0
  34. package/LeftUser-9c812f8a.mjs +105 -0
  35. package/LinkTableConfigModal-c2c5c7e6.mjs +230 -0
  36. package/LinkTableFieldConfigModal-a3553b1f.mjs +176 -0
  37. package/LinkTableListPiece-7f793b08.mjs +34 -0
  38. package/ModalFormDemo-65685b0e.mjs +78 -0
  39. package/OnlCgformErpList-52c87ed3.mjs +449 -0
  40. package/OnlCgformErpSubTable-6e7fb17b.mjs +398 -0
  41. package/OnlCgformInnerSubTable-f0727b8f.mjs +248 -0
  42. package/OnlCgformInnerTableList-9f89c173.mjs +430 -0
  43. package/OnlCgformTabList-15516315.mjs +390 -0
  44. package/OnlineAutoList-63a0224f.mjs +474 -0
  45. package/OnlineAutoModal-ffe19c3f.mjs +206 -0
  46. package/OnlineAutoTreeList-317c7105.mjs +495 -0
  47. package/OnlineCustomModal-3939ce78.mjs +227 -0
  48. package/OnlineDetailModal-bfb1375f.mjs +177 -0
  49. package/OnlineForm-069f6092.mjs +749 -0
  50. package/OnlineFormDetail-ad5735fb.mjs +296 -0
  51. package/OnlineQueryForm-0771c80f.mjs +385 -0
  52. package/OnlineSearchFormItem-0db5834f.mjs +348 -0
  53. package/OnlineSelectCascade-a05c30f4.mjs +159 -0
  54. package/OnlineSubFormDetail-583d01eb.mjs +142 -0
  55. package/OnlineTabAutoModal-747e071d.mjs +253 -0
  56. package/OnlineTabDetailModal-887f0174.mjs +222 -0
  57. package/OnlineTabForm-b1dcd4b4.mjs +765 -0
  58. package/OnlineTabFormDetail-8e494a96.mjs +323 -0
  59. package/PageAttributeTable-5966b201.mjs +404 -0
  60. package/ProcessOnlineForm-4382bea7.mjs +177 -0
  61. package/QueryTable-6e8053ad.mjs +115 -0
  62. package/README.md +2 -1
  63. package/SuperQuery-78db6998.mjs +841 -0
  64. package/SuperQueryValComponent-471110b5.mjs +8 -0
  65. package/SuperQueryValComponent.vue_vue_type_script_lang-e3ad7ee8.mjs +101 -0
  66. package/auth.api-d3a6c4b3.mjs +39 -0
  67. package/auth.data-8be5c9e3.mjs +141 -0
  68. package/{cgform.data.js → cgform.data-cbdd88c3.mjs} +93 -62
  69. package/constant-754f1a9d.mjs +9 -0
  70. package/enhance.api-138e6826.mjs +104 -0
  71. package/enhance.data-efc7e155.mjs +175 -0
  72. package/index-0a93652b.mjs +237 -0
  73. package/index-7e9a23f2.mjs +1494 -0
  74. package/index-b70302f2.mjs +56 -0
  75. package/main.index.js +7 -1
  76. package/package.json +1 -1
  77. package/style.css +1 -1
  78. package/useCgformList-0c603af1.mjs +424 -0
  79. package/useCustomHook-acb00837.mjs +53 -0
  80. package/useExtendComponent-aa1cdfc8.mjs +3917 -0
  81. package/useListButton-0f18bf6a.mjs +671 -0
  82. package/useOnlinePopEvent-687070b7.mjs +19 -0
  83. package/useOnlineTest-e4bd8be3.mjs +42 -0
  84. package/useSchemas-43429d80.mjs +685 -0
  85. package/useTableSync-774c3774.mjs +87 -0
  86. package/AuthButtonConfig.js +0 -147
  87. package/AuthButtonTree.js +0 -183
  88. package/AuthDataConfig.js +0 -246
  89. package/AuthDataTree.js +0 -160
  90. package/AuthFieldConfig.js +0 -170
  91. package/AuthFieldTree.js +0 -281
  92. package/AuthManagerDrawer.js +0 -125
  93. package/AuthSetterModal.js +0 -316
  94. package/CgformCopyList.js +0 -266
  95. package/CgformModal.js +0 -780
  96. package/CgreportModal.js +0 -667
  97. package/CheckDictTable.js +0 -242
  98. package/CodeFileListModal.js +0 -175
  99. package/CodeFileViewModal.js +0 -325
  100. package/CodeGeneratorModal.js +0 -297
  101. package/CustomButtonList.js +0 -410
  102. package/DBAttributeTable.js +0 -526
  103. package/DbToOnlineModal.js +0 -192
  104. package/DetailForm.js +0 -608
  105. package/EnhanceJavaModal.js +0 -298
  106. package/EnhanceJsHistory.js +0 -229
  107. package/EnhanceJsModal.js +0 -293
  108. package/EnhanceSqlModal.js +0 -299
  109. package/ExtendConfigModal.js +0 -151
  110. package/FieldExtendJsonModal.js +0 -283
  111. package/FileSelectModal.js +0 -102
  112. package/ForeignKeyTable.js +0 -79
  113. package/IndexTable.js +0 -97
  114. package/JModalTip.js +0 -54
  115. package/JOnlineSearchSelect.js +0 -115
  116. package/LICENSE +0 -9
  117. package/LeftDepart.js +0 -96
  118. package/LeftRole.js +0 -98
  119. package/LeftUser.js +0 -117
  120. package/LinkTableConfigModal.js +0 -289
  121. package/LinkTableFieldConfigModal.js +0 -218
  122. package/LinkTableListPiece.js +0 -36
  123. package/ModalFormDemo.js +0 -85
  124. package/OnlineAutoList.js +0 -523
  125. package/OnlineAutoModal.js +0 -226
  126. package/OnlineAutoTreeList.js +0 -552
  127. package/OnlineCustomModal.js +0 -286
  128. package/OnlineDetailModal.js +0 -190
  129. package/OnlineForm.js +0 -1016
  130. package/OnlineFormDetail.js +0 -347
  131. package/OnlineQueryForm.js +0 -484
  132. package/OnlineSearchFormItem.js +0 -436
  133. package/OnlineSelectCascade.js +0 -228
  134. package/OnlineSubFormDetail.js +0 -166
  135. package/PageAttributeTable.js +0 -486
  136. package/ProcessOnlineForm.js +0 -208
  137. package/QueryTable.js +0 -129
  138. package/SuperQuery.js +0 -1020
  139. package/SuperQueryValComponent.js +0 -8
  140. package/SuperQueryValComponent.vue_vue_type_script_lang.js +0 -168
  141. package/_arrayPush.js +0 -278
  142. package/_baseClone.js +0 -471
  143. package/_baseSlice.js +0 -18
  144. package/_commonjsHelpers.js +0 -5
  145. package/_flatRest.js +0 -174
  146. package/auth.api.js +0 -43
  147. package/auth.data.js +0 -142
  148. package/clipboard.js +0 -565
  149. package/enhance.api.js +0 -129
  150. package/enhance.data.js +0 -196
  151. package/index.js +0 -87
  152. package/index2.js +0 -340
  153. package/index3.js +0 -264
  154. package/isArray.js +0 -47
  155. package/omit.js +0 -60
  156. package/pick.js +0 -68
  157. package/toString.js +0 -31
  158. package/useCgformList.js +0 -470
  159. package/useExtendComponent.js +0 -5205
  160. package/useListButton.js +0 -923
  161. package/useOnlineTest.js +0 -44
  162. package/useSchemas.js +0 -653
  163. package/useTableSync.js +0 -117
@@ -0,0 +1,765 @@
1
+ var ht = Object.defineProperty;
2
+ var he = Object.getOwnPropertySymbols;
3
+ var bt = Object.prototype.hasOwnProperty, yt = Object.prototype.propertyIsEnumerable;
4
+ var be = (s, c, r) => c in s ? ht(s, c, { enumerable: !0, configurable: !0, writable: !0, value: r }) : s[c] = r, I = (s, c) => {
5
+ for (var r in c || (c = {}))
6
+ bt.call(c, r) && be(s, r, c[r]);
7
+ if (he)
8
+ for (var r of he(c))
9
+ yt.call(c, r) && be(s, r, c[r]);
10
+ return s;
11
+ };
12
+ var v = (s, c, r) => new Promise((a, P) => {
13
+ var T = (d) => {
14
+ try {
15
+ F(r.next(d));
16
+ } catch (m) {
17
+ P(m);
18
+ }
19
+ }, k = (d) => {
20
+ try {
21
+ F(r.throw(d));
22
+ } catch (m) {
23
+ P(m);
24
+ }
25
+ }, F = (d) => d.done ? a(d.value) : Promise.resolve(d.value).then(T, k);
26
+ F((r = r.apply(s, c)).next());
27
+ });
28
+ import { useMessage as Ft } from "/@/hooks/web/useMessage";
29
+ import { ref as g, reactive as _t, computed as vt, watch as St, resolveComponent as y, openBlock as S, createElementBlock as N, createVNode as w, createCommentVNode as q, withCtx as V, createBlock as K, Fragment as wt, renderList as Tt, normalizeStyle as Ct, renderSlot as kt, unref as ye, nextTick as Fe, toRaw as D } from "vue";
30
+ import { BasicForm as Ot, useForm as Pt } from "/@/components/Form/index";
31
+ import { c as xt, O as Rt, d as Vt, e as Dt, u as At, l as H, g as Mt, V as J, S as Et, f as jt, h as _e } from "./useExtendComponent-aa1cdfc8.mjs";
32
+ import { defHttp as ee } from "/@/utils/http/axios";
33
+ import { pick as Bt, omit as ve } from "lodash-es";
34
+ import { sleep as It, goJmReportViewPage as Nt } from "/@/utils";
35
+ import { Loading as Jt } from "/@/components/Loading";
36
+ import { getToken as Ut } from "/@/utils/auth";
37
+ import { PrinterOutlined as Lt, DiffOutlined as qt, FormOutlined as Kt } from "@ant-design/icons-vue";
38
+ import { useModal as Ht } from "/@/components/Modal";
39
+ import { u as Wt, G as Gt } from "./useCustomHook-acb00837.mjs";
40
+ import { _ as zt } from "./index-b70302f2.mjs";
41
+ import "/@/components/Form/src/componentMap";
42
+ import "/@/utils/propTypes";
43
+ import "./constant-754f1a9d.mjs";
44
+ import "/@/components/Form/src/jeecg/components/JUpload";
45
+ import "/@/views/system/user/user.api";
46
+ import "/@/store/modules/user";
47
+ import "/@/utils/desform/customExpression";
48
+ import "/@/store/modules/permission";
49
+ import "/@/utils/dict/JDictSelectUtil";
50
+ import "/@/utils/common/compUtils";
51
+ import "/@/components/Table";
52
+ import "/@/hooks/system/useListPage";
53
+ import "vue-router";
54
+ import "/@/components/Form/src/utils/Area";
55
+ import "/@/components/Preview/index";
56
+ import "./LinkTableListPiece-7f793b08.mjs";
57
+ import "./OnlineSelectCascade-a05c30f4.mjs";
58
+ import "./JModalTip-e1938b49.mjs";
59
+ import "ant-design-vue";
60
+ import "@vueuse/core";
61
+ import "/@/utils/cache";
62
+ import "/@/components/jeecg/OnLine/JPopupOnlReport.vue";
63
+ const te = {
64
+ optPre: "/online/cgform/api/form/",
65
+ urlButtonAction: "/online/cgform/api/doButton"
66
+ }, Qt = {
67
+ name: "OnlineTabForm",
68
+ components: {
69
+ BasicForm: Ot,
70
+ Loading: Jt,
71
+ OnlineSubForm: xt,
72
+ PrinterOutlined: Lt,
73
+ DiffOutlined: qt,
74
+ FormOutlined: Kt,
75
+ OnlinePopModal: Rt
76
+ },
77
+ props: {
78
+ id: {
79
+ type: String,
80
+ default: ""
81
+ },
82
+ formTemplate: {
83
+ type: Number,
84
+ default: 1
85
+ },
86
+ disabled: {
87
+ type: Boolean,
88
+ default: !1
89
+ },
90
+ isTree: {
91
+ type: Boolean,
92
+ default: !1
93
+ },
94
+ pidField: {
95
+ type: String,
96
+ default: ""
97
+ },
98
+ submitTip: {
99
+ type: Boolean,
100
+ default: !0
101
+ },
102
+ modalClass: {
103
+ type: String,
104
+ default: ""
105
+ },
106
+ themeTemplate: {
107
+ type: String,
108
+ default: ""
109
+ },
110
+ tabIndex: {
111
+ type: String,
112
+ default: ""
113
+ }
114
+ },
115
+ emits: ["success", "rendered"],
116
+ setup(s, { emit: c }) {
117
+ const { createMessage: r } = Ft(), a = g(null), P = g(!0), T = g(!1), k = g(1), F = g(""), d = g(!1), m = g(!1), x = _t({
118
+ reportPrintShow: 0,
119
+ reportPrintUrl: "",
120
+ joinQuery: 0,
121
+ modelFullscreen: 0,
122
+ modalMinWidth: "",
123
+ commentStatus: 0
124
+ }), { onlineFormContext: f, resetContext: W } = Vt(), {
125
+ formSchemas: A,
126
+ defaultValueFields: R,
127
+ changeDataIfArray2String: U,
128
+ tableName: O,
129
+ dbData: i,
130
+ checkOnlyFieldValue: G,
131
+ hasSubTable: h,
132
+ subTabInfo: M,
133
+ refMap: z,
134
+ subDataSource: L,
135
+ baseColProps: Se,
136
+ createFormSchemas: we,
137
+ fieldDisplayStatus: E
138
+ } = Dt(s, a);
139
+ let { EnhanceJS: u, initCgEnhanceJs: Te } = At(f, !1);
140
+ const { executeJsEnhanced: Ce } = Wt({}, f), [ke, { setProps: Oe, validate: le, resetFields: oe, setFieldsValue: C, updateSchema: Q, getFieldsValue: Y, scrollToField: Pe }] = Pt({
141
+ schemas: A,
142
+ showActionButtonGroup: !1,
143
+ baseColProps: Se
144
+ }), ne = g(!1);
145
+ function xe() {
146
+ let e = s.disabled;
147
+ ne.value = e, Oe({ disabled: e });
148
+ }
149
+ function Re(e, t, l) {
150
+ return v(this, null, function* () {
151
+ yield Ve(), F.value = "", yield oe(), i.value = "";
152
+ let o = ye(e);
153
+ m.value = o, o ? yield ie(t) : re(), Fe(() => {
154
+ !o && l && C(l), De(), X("js", "loaded"), xe();
155
+ });
156
+ });
157
+ }
158
+ function Ve() {
159
+ return v(this, null, function* () {
160
+ if (s.isTree === !0) {
161
+ let e = s.pidField, t = A.value;
162
+ t && t.length > 0 && t.filter((o) => o.field === e).length > 0 && (yield Q({
163
+ field: e,
164
+ componentProps: {
165
+ reload: (/* @__PURE__ */ new Date()).getTime()
166
+ }
167
+ }));
168
+ }
169
+ });
170
+ }
171
+ function De() {
172
+ if (ye(m) === !1) {
173
+ let e = D(R[O.value]);
174
+ H(e, (t) => {
175
+ C(t);
176
+ });
177
+ }
178
+ }
179
+ function ae(e, t) {
180
+ let l = D(R[e.key]);
181
+ H(l, (o) => {
182
+ const { row: n, target: p } = t;
183
+ let _ = [{ rowKey: n.id, values: I({}, o) }];
184
+ p.setValues(_);
185
+ });
186
+ }
187
+ function ie(e) {
188
+ return v(this, null, function* () {
189
+ let t = yield Me(e.id);
190
+ i.value = Object.assign({}, e, t);
191
+ let l = Ae.value, o = Bt(t, ...l);
192
+ s.disabled && Object.keys(o).map((n) => {
193
+ !o[n] && o[n] !== 0 && o[n] !== "0" && delete o[n];
194
+ }), yield C(o), re(t);
195
+ });
196
+ }
197
+ function re(e) {
198
+ e || (e = {});
199
+ let t = Object.keys(L.value);
200
+ if (t && t.length > 0) {
201
+ let l = {};
202
+ for (let o of t)
203
+ l[o] = e[o] || [];
204
+ L.value = l;
205
+ }
206
+ }
207
+ let Ae = vt(() => {
208
+ let e = A.value, t = [];
209
+ for (let l of e)
210
+ t.push(l.field);
211
+ return t;
212
+ });
213
+ function Me(e) {
214
+ let t = `${te.optPre}${s.id}/${e}`;
215
+ return new Promise((l, o) => {
216
+ ee.get({ url: t }, { isTransformResponse: !1 }).then((n) => {
217
+ n.success ? l(n.result) : (o(), r.warning(n.message));
218
+ }).catch(() => {
219
+ o();
220
+ });
221
+ });
222
+ }
223
+ function Ee(e) {
224
+ return v(this, null, function* () {
225
+ k.value = e.head.tableType, O.value = e.head.tableName, P.value = e.head.tableType == 1, Ie(e.head.extConfigJson), we(e.schema.properties, e.schema.required, G), u = Te(e.enhanceJs), c("rendered", x);
226
+ let t = yield Mt(a);
227
+ t.$formValueChange = (l, o, n) => {
228
+ et(l, o), n && C(n), je(l, o, n);
229
+ }, u && u.setup && fe(u.setup);
230
+ });
231
+ }
232
+ function je(e, t, l) {
233
+ f.changEvent(e, t, l);
234
+ }
235
+ function Be(e) {
236
+ f.addObject2Context("changEvent", e);
237
+ }
238
+ function Ie(e) {
239
+ let t = { reportPrintShow: 0, reportPrintUrl: "", joinQuery: 0, modelFullscreen: 0, modalMinWidth: "", commentStatus: 0 };
240
+ e && (t = JSON.parse(e)), Object.keys(t).map((l) => {
241
+ x[l] = t[l];
242
+ });
243
+ }
244
+ function Ne() {
245
+ P.value === !0 ? Ke() : Je();
246
+ }
247
+ function Je() {
248
+ Ue().then((e) => {
249
+ se(e);
250
+ });
251
+ }
252
+ function Ue() {
253
+ let e = {};
254
+ return new Promise((t, l) => {
255
+ le().then(
256
+ (o) => t(o),
257
+ ({ errorFields: o }) => {
258
+ o && o.length > 0 && Pe(o[0][0]), l(J);
259
+ }
260
+ );
261
+ }).then((t) => (Object.assign(e, U(t)), qe())).then((t) => (Object.assign(e, t), Promise.resolve(e))).catch((t) => ((t === J || (t == null ? void 0 : t.code) === J) && (r.warning("校验未通过"), t.key && Le(t.key)), Promise.reject(null)));
262
+ }
263
+ function Le(e) {
264
+ let t = M.value;
265
+ for (let l = 0; l < t.length; l++)
266
+ if (e == t[l].key) {
267
+ let o = l + "";
268
+ if (j.value === o)
269
+ break;
270
+ if (j.value = o, t[l].relationType === 0) {
271
+ let n = b(e);
272
+ It(300, () => n == null ? void 0 : n.validateTable());
273
+ }
274
+ break;
275
+ }
276
+ }
277
+ function qe() {
278
+ return new Promise((e, t) => v(this, null, function* () {
279
+ let l = {};
280
+ try {
281
+ let o = M.value;
282
+ for (let n = 0; n < o.length; n++) {
283
+ let p = o[n].key, _ = b(p);
284
+ if (o[n].relationType == 1)
285
+ try {
286
+ let B = yield _.getAll();
287
+ l[p] = [], l[p].push(B);
288
+ } catch (B) {
289
+ throw { code: J, key: p };
290
+ }
291
+ else {
292
+ if (yield _.fullValidateTable())
293
+ throw { code: J, key: p };
294
+ l[p] = _.getTableData();
295
+ }
296
+ }
297
+ } catch (o) {
298
+ t(o);
299
+ }
300
+ e(l);
301
+ }));
302
+ }
303
+ function Ke() {
304
+ return v(this, null, function* () {
305
+ try {
306
+ let e = yield le();
307
+ e = Object.assign({}, i.value, e), e = U(e), T.value = !0, se(e);
308
+ } finally {
309
+ T.value = !1;
310
+ }
311
+ });
312
+ }
313
+ function se(e) {
314
+ ot(ge, e).then(() => {
315
+ He(e);
316
+ }).catch((t) => {
317
+ r.warning(t);
318
+ });
319
+ }
320
+ function He(e) {
321
+ Object.keys(e).map((n) => {
322
+ Array.isArray(e[n]) && e[n].length == 0 && (e[n] = "");
323
+ });
324
+ let t = F.value, l = `${te.optPre}${s.id}?tabletype=${k.value}`;
325
+ t && (l = `${t}?tabletype=${k.value}`), d.value === !0 && (e[Et] = 1);
326
+ let o = m.value === !0 ? "put" : "post";
327
+ ee.request({ url: l, method: o, params: e }, { isTransformResponse: !1 }).then((n) => {
328
+ n.success ? (n.result && (e[jt] = n.result), c("success", e), s.submitTip === !0 && r.success(n.message)) : r.warning(n.message);
329
+ }).finally(() => {
330
+ T.value = !1;
331
+ });
332
+ }
333
+ function We(e, t, l) {
334
+ t && l ? l.vxeProps ? l.setValues([
335
+ {
336
+ rowKey: t,
337
+ values: e
338
+ }
339
+ ]) : l.setValues(e) : C(e);
340
+ }
341
+ function Ge(e, t) {
342
+ let l = {};
343
+ l[e] = t, C(l);
344
+ }
345
+ const j = g("0"), ue = g(300), ce = g(340);
346
+ function ze(e) {
347
+ if (m.value === !0) {
348
+ let t = i.value;
349
+ return Qe(t, e);
350
+ }
351
+ return "";
352
+ }
353
+ St(
354
+ () => s.tabIndex,
355
+ (e) => {
356
+ j.value = e;
357
+ },
358
+ {
359
+ immediate: !0
360
+ }
361
+ );
362
+ function Qe(e, t) {
363
+ if (e) {
364
+ let l = e[t];
365
+ return !l && l !== 0 && (l = e[t.toLowerCase()], !l && l !== 0 && (l = e[t.toUpperCase()])), l;
366
+ }
367
+ return "";
368
+ }
369
+ function Ye(e, t) {
370
+ if (u && u[t + "_onlChange"]) {
371
+ let l = u[t + "_onlChange"](), o = Object.keys(e)[0];
372
+ if (l[o]) {
373
+ let p = b(t).getFormEvent(), _ = I({
374
+ column: { key: o },
375
+ value: e[o]
376
+ }, p);
377
+ l[o].call(f, f, _);
378
+ }
379
+ }
380
+ }
381
+ function Xe(e, t) {
382
+ if (u && u[t + "_onlChange"]) {
383
+ let l = u[t + "_onlChange"](f);
384
+ if (e.column === "all") {
385
+ let o = Object.keys(l);
386
+ if (o.length > 0)
387
+ for (let n of o)
388
+ l[n].call(f, f, e);
389
+ } else {
390
+ let o = e.column.key || e.col.key;
391
+ l[o] && e.row && e.row.id && l[o].call(f, f, e);
392
+ }
393
+ }
394
+ }
395
+ function Ze(e, t) {
396
+ t.isModalData || ae(e, t);
397
+ }
398
+ function $e(e) {
399
+ return "online_" + e + ":";
400
+ }
401
+ function et(e, t) {
402
+ return v(this, null, function* () {
403
+ if (!u || !u.onlChange || !e)
404
+ return !1;
405
+ let l = u.onlChange();
406
+ if (l[e]) {
407
+ let n = {
408
+ row: yield Y(),
409
+ column: { key: e },
410
+ value: t
411
+ };
412
+ l[e].call(f, f, n);
413
+ }
414
+ });
415
+ }
416
+ function fe(e) {
417
+ let l = e.toLocaleString().match(Gt);
418
+ if (l.length > 1) {
419
+ let o = l[1];
420
+ Ce(o);
421
+ }
422
+ }
423
+ function X(e, t) {
424
+ if (e == "js") {
425
+ let l = t + "_hook";
426
+ u && u[t] ? u[t].call(f, f) : u && u[l] && fe(u[l]);
427
+ } else if (e == "action") {
428
+ let l = i.value, o = {
429
+ formId: s.id,
430
+ buttonCode: t,
431
+ dataId: l.id,
432
+ uiFormData: Object.assign({}, l)
433
+ };
434
+ ee.post(
435
+ {
436
+ url: `${te.urlButtonAction}`,
437
+ params: o
438
+ },
439
+ { isTransformResponse: !1 }
440
+ ).then((n) => {
441
+ n.success ? r.success("处理完成!") : r.warning("处理失败!");
442
+ });
443
+ }
444
+ }
445
+ function de(e) {
446
+ let t = b(e), l = [...t.getNewDataWithId(), ...L.value[e]];
447
+ if (!l || l.length == 0)
448
+ return !1;
449
+ let o = [];
450
+ for (let n of l)
451
+ o.push(n.id);
452
+ t.removeRowsById(o);
453
+ }
454
+ function me(e, t) {
455
+ if (!t)
456
+ return !1;
457
+ let l = b(e);
458
+ typeof t == "object" ? l.addRows(t, !0) : this.$message.error("添加子表数据,参数不识别!");
459
+ }
460
+ function tt(e, t) {
461
+ de(e), me(e, t);
462
+ }
463
+ function lt(e, t) {
464
+ !t && t.length <= 0 && (t = []), t.map((l) => {
465
+ l.hasOwnProperty("label") || (l.label = l.text);
466
+ }), Q({
467
+ field: e,
468
+ componentProps: {
469
+ options: t
470
+ }
471
+ });
472
+ }
473
+ function ot(e, t) {
474
+ return u && u.beforeSubmit ? u.beforeSubmit(e, t) : Promise.resolve();
475
+ }
476
+ function nt(e, t) {
477
+ let l = D(E);
478
+ e && e.length > 0 ? Object.keys(l).map((o) => {
479
+ !o.endsWith("_load") && e.indexOf(o) < 0 && (E[o] = !1);
480
+ }) : t && t.length > 0 && Object.keys(l).map((o) => {
481
+ t.indexOf(o) >= 0 && (E[o] = !1);
482
+ });
483
+ }
484
+ function at(e, t) {
485
+ return v(this, null, function* () {
486
+ F.value = t, yield oe(), i.value = "", m.value = !0, yield ie(e), yield Fe(() => {
487
+ X("js", "loaded");
488
+ });
489
+ });
490
+ }
491
+ function b(e) {
492
+ let t = z[e].value;
493
+ if (t instanceof Array && (t = t[0]), !t) {
494
+ r.warning("子表ref找不到:" + e);
495
+ return;
496
+ }
497
+ return t;
498
+ }
499
+ function it() {
500
+ let e = x.reportPrintUrl, t = i.value.id, l = Ut();
501
+ Nt(e, t, l);
502
+ }
503
+ const [rt, { openModal: pe }] = Ht(), Z = g(""), $ = g(!0);
504
+ function st(e) {
505
+ Z.value = e.id, $.value = !1, pe(!0, { isUpdate: !1, tableType: "3" });
506
+ }
507
+ function ut(e) {
508
+ let l = b(e.key).getSelectedData();
509
+ if (l.length != 1) {
510
+ r.warning("请选择一条数据");
511
+ return;
512
+ }
513
+ Z.value = e.id, $.value = !1, pe(!0, { isUpdate: !0, record: l[0] });
514
+ }
515
+ function ct(e) {
516
+ const t = e[_e];
517
+ let l = ve(e, [_e]);
518
+ if (l.id) {
519
+ let o = ve(I({}, l), "id"), n = [{ rowKey: l.id, values: o }];
520
+ b(t).setValues(n);
521
+ } else
522
+ b(t).addRows(l, { isOnlineJS: !1, setActive: !1, emitChange: !0, isModalData: !0 });
523
+ }
524
+ function ft() {
525
+ let e = M.value;
526
+ if (e && e.length > 0) {
527
+ for (let t of e)
528
+ if (t.relationType != 1) {
529
+ let l = b(t.key);
530
+ l && l.clearSelection();
531
+ }
532
+ }
533
+ }
534
+ function dt() {
535
+ let e = Y(), t = D(R[O.value]);
536
+ H(
537
+ t,
538
+ (l) => {
539
+ C(l);
540
+ },
541
+ e
542
+ );
543
+ }
544
+ function mt(e, t) {
545
+ let l = M.value;
546
+ if (l && l.length > 0) {
547
+ let o = l.filter((n) => n.key === e);
548
+ if (o.length == 0)
549
+ return;
550
+ if (o[0].relationType == 1)
551
+ b(e).executeFillRule();
552
+ else {
553
+ let n = D(R[e]), p = D(t.row);
554
+ H(
555
+ n,
556
+ (_) => {
557
+ const { row: B, target: pt } = t;
558
+ let gt = [{ rowKey: B.id, values: I({}, _) }];
559
+ pt.setValues(gt);
560
+ },
561
+ p
562
+ );
563
+ }
564
+ }
565
+ }
566
+ let ge = {
567
+ tableName: O,
568
+ loading: T,
569
+ subActiveKey: j,
570
+ onlineFormRef: a,
571
+ getFieldsValue: Y,
572
+ setFieldsValue: C,
573
+ submitFlowFlag: d,
574
+ subFormHeight: ue,
575
+ subTableHeight: ce,
576
+ refMap: z,
577
+ triggleChangeValues: We,
578
+ triggleChangeValue: Ge,
579
+ sh: E,
580
+ clearSubRows: de,
581
+ addSubRows: me,
582
+ clearThenAddRows: tt,
583
+ changeOptions: lt,
584
+ isUpdate: m,
585
+ getSubTableInstance: b,
586
+ updateSchema: Q,
587
+ executeMainFillRule: dt,
588
+ executeSubFillRule: mt,
589
+ changEvent: () => {
590
+ },
591
+ onlineFormValueChange: Be
592
+ };
593
+ return W(ge), {
594
+ //主表
595
+ tableName: O,
596
+ onlineFormRef: a,
597
+ registerForm: ke,
598
+ loading: T,
599
+ //子表
600
+ subActiveKey: j,
601
+ hasSubTable: h,
602
+ subTabInfo: M,
603
+ refMap: z,
604
+ //一对一子表
605
+ subFormHeight: ue,
606
+ getSubTableForeignKeyValue: ze,
607
+ isUpdate: m,
608
+ handleSubFormChange: Ye,
609
+ //一对多子表
610
+ subTableHeight: ce,
611
+ onlineFormDisabled: ne,
612
+ subDataSource: L,
613
+ getSubTableAuthPre: $e,
614
+ handleAdded: Ze,
615
+ handleSubTableDefaultValue: ae,
616
+ handleValueChange: Xe,
617
+ openSubFormModalForAdd: st,
618
+ openSubFormModalForEdit: ut,
619
+ //父组件调用
620
+ show: Re,
621
+ createRootProperties: Ee,
622
+ handleSubmit: Ne,
623
+ sh: E,
624
+ handleCgButtonClick: X,
625
+ handleCustomFormSh: nt,
626
+ handleCustomFormEdit: at,
627
+ //跳转
628
+ dbData: i,
629
+ onOpenReportPrint: it,
630
+ onlineExtConfigJson: x,
631
+ //一对多子表弹窗操作数据
632
+ registerPopModal: rt,
633
+ popTableName: Z,
634
+ getPopFormData: ct,
635
+ popModalRequest: $,
636
+ onCloseModal: ft
637
+ };
638
+ }
639
+ }, Yt = ["id"], Xt = {
640
+ key: 0,
641
+ style: { "text-align": "right", position: "absolute", top: "6px", right: "20px", "z-index": "999" }
642
+ }, Zt = { key: 1 };
643
+ function $t(s, c, r, a, P, T) {
644
+ const k = y("PrinterOutlined"), F = y("BasicForm"), d = y("a-tab-pane"), m = y("online-sub-form"), x = y("diff-outlined"), f = y("a-button"), W = y("form-outlined"), A = y("JVxeTable"), R = y("a-tabs"), U = y("Loading"), O = y("online-pop-modal");
645
+ return S(), N("div", {
646
+ id: a.tableName + "_form"
647
+ }, [
648
+ a.dbData.id && a.onlineExtConfigJson.reportPrintShow ? (S(), N("div", Xt, [
649
+ w(k, {
650
+ title: "打印",
651
+ onClick: a.onOpenReportPrint,
652
+ style: { "font-size": "16px" }
653
+ }, null, 8, ["onClick"])
654
+ ])) : q("", !0),
655
+ w(R, {
656
+ class: "tabTheme",
657
+ activeKey: a.subActiveKey,
658
+ "onUpdate:activeKey": c[0] || (c[0] = (i) => a.subActiveKey = i)
659
+ }, {
660
+ default: V(() => [
661
+ (S(), K(d, {
662
+ tab: "主表",
663
+ key: "-1"
664
+ }, {
665
+ default: V(() => [
666
+ w(F, {
667
+ ref: "onlineFormRef",
668
+ onRegister: a.registerForm
669
+ }, null, 8, ["onRegister"])
670
+ ]),
671
+ _: 1
672
+ })),
673
+ a.hasSubTable ? (S(!0), N(wt, { key: 0 }, Tt(a.subTabInfo, (i, G) => (S(), K(d, {
674
+ tab: i.describe,
675
+ key: G + "",
676
+ forceRender: !0
677
+ }, {
678
+ default: V(() => [
679
+ i.relationType == 1 ? (S(), N("div", {
680
+ key: 0,
681
+ style: Ct({ "overflow-y": "auto", "overflow-x": "hidden", "max-height": a.subFormHeight + "px" })
682
+ }, [
683
+ w(m, {
684
+ ref_for: !0,
685
+ ref: a.refMap[i.key],
686
+ table: i.key,
687
+ disabled: a.onlineFormDisabled,
688
+ "form-template": r.formTemplate,
689
+ "main-id": a.getSubTableForeignKeyValue(i.foreignKey),
690
+ properties: i.properties,
691
+ "required-fields": i.requiredFields,
692
+ "is-update": a.isUpdate,
693
+ onFormChange: (h) => a.handleSubFormChange(h, i.key)
694
+ }, null, 8, ["table", "disabled", "form-template", "main-id", "properties", "required-fields", "is-update", "onFormChange"])
695
+ ], 4)) : (S(), N("div", Zt, [
696
+ w(A, {
697
+ ref_for: !0,
698
+ ref: a.refMap[i.key],
699
+ toolbar: "",
700
+ "keep-source": "",
701
+ "row-number": "",
702
+ "row-selection": "",
703
+ height: (
704
+ // 【VUEN-803】一对多子表固定340高度,修复自定义列组件被遮挡的问题
705
+ a.subTableHeight
706
+ ),
707
+ disabled: a.onlineFormDisabled,
708
+ columns: i.columns,
709
+ dataSource: a.subDataSource[i.key],
710
+ onValueChange: (h) => a.handleValueChange(h, i.key),
711
+ authPre: a.getSubTableAuthPre(i.key),
712
+ onAdded: (h) => a.handleAdded(i, h),
713
+ onExecuteFillRule: (h) => a.handleSubTableDefaultValue(i, h)
714
+ }, {
715
+ toolbarSuffix: V(() => [
716
+ a.onlineFormDisabled ? q("", !0) : (S(), K(f, {
717
+ key: 0,
718
+ type: "primary",
719
+ onClick: (h) => a.openSubFormModalForAdd(i)
720
+ }, {
721
+ default: V(() => [
722
+ w(x)
723
+ ]),
724
+ _: 2
725
+ }, 1032, ["onClick"])),
726
+ a.onlineFormDisabled ? q("", !0) : (S(), K(f, {
727
+ key: 1,
728
+ type: "primary",
729
+ onClick: (h) => a.openSubFormModalForEdit(i)
730
+ }, {
731
+ default: V(() => [
732
+ w(W)
733
+ ]),
734
+ _: 2
735
+ }, 1032, ["onClick"]))
736
+ ]),
737
+ _: 2
738
+ }, 1032, ["height", "disabled", "columns", "dataSource", "onValueChange", "authPre", "onAdded", "onExecuteFillRule"])
739
+ ]))
740
+ ]),
741
+ _: 2
742
+ }, 1032, ["tab"]))), 128)) : q("", !0)
743
+ ]),
744
+ _: 1
745
+ }, 8, ["activeKey"]),
746
+ w(U, {
747
+ loading: a.loading,
748
+ absolute: !1
749
+ }, null, 8, ["loading"]),
750
+ kt(s.$slots, "bottom", {}, void 0, !0),
751
+ w(O, {
752
+ formTableType: "3",
753
+ request: a.popModalRequest,
754
+ id: a.popTableName,
755
+ onRegister: a.registerPopModal,
756
+ onSuccess: a.getPopFormData,
757
+ topTip: "",
758
+ isVxeTableData: ""
759
+ }, null, 8, ["request", "id", "onRegister", "onSuccess"])
760
+ ], 8, Yt);
761
+ }
762
+ const jl = /* @__PURE__ */ zt(Qt, [["render", $t], ["__scopeId", "data-v-52a8d605"]]);
763
+ export {
764
+ jl as default
765
+ };