@jeecg/online 3.6.2-beta → 3.7.1-RC

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 (127) hide show
  1. package/AiModal-6de335e3.mjs +84 -0
  2. package/AuthButtonConfig-89763932.mjs +154 -0
  3. package/{AuthButtonTree-3aa0ed49.mjs → AuthButtonTree-2d87d0b3.mjs} +6 -5
  4. package/AuthDataConfig-5c3a8e6b.mjs +238 -0
  5. package/{AuthDataTree-94e026e3.mjs → AuthDataTree-dd7a1240.mjs} +6 -6
  6. package/AuthFieldConfig-9f6fa06c.mjs +245 -0
  7. package/{AuthFieldTree-69864163.mjs → AuthFieldTree-e326fc38.mjs} +2 -2
  8. package/AuthManagerDrawer-76f15e8d.mjs +119 -0
  9. package/AuthSetterModal-f5d2e87f.mjs +274 -0
  10. package/{CgformCopyList-14b76108.mjs → CgformCopyList-365b3e8f.mjs} +49 -46
  11. package/CgformModal-21c5c387.mjs +671 -0
  12. package/{CgreportModal.vue_vue_type_script_setup_true_lang-c89d9222.mjs → CgreportModal-edefa8e3.mjs} +153 -129
  13. package/CheckDictTable-1bc8322d.mjs +229 -0
  14. package/{CodeFileListModal-a6d3290d.mjs → CodeFileListModal-24601898.mjs} +5 -4
  15. package/CodeFileViewModal-2fe911f4.mjs +253 -0
  16. package/CodeGeneratorModal-f09fe903.mjs +282 -0
  17. package/CustomButtonList-f07bc695.mjs +397 -0
  18. package/{DBAttributeTable-370de07b.mjs → DBAttributeTable-285d40db.mjs} +118 -89
  19. package/DbToOnlineModal-5dcb67c3.mjs +169 -0
  20. package/DetailForm-deecbf3d.mjs +486 -0
  21. package/{EnhanceJavaModal-f63aa2d3.mjs → EnhanceJavaModal-45c66cd5.mjs} +3 -3
  22. package/{EnhanceJsHistory-352b46b1.mjs → EnhanceJsHistory-fab3102e.mjs} +2 -2
  23. package/EnhanceJsModal-175357a1.mjs +548 -0
  24. package/{EnhanceSqlModal-5e4ae84f.mjs → EnhanceSqlModal-7ea1b300.mjs} +3 -3
  25. package/ExtendConfigModal-a89ae052.mjs +117 -0
  26. package/FieldExtendJsonModal-32135634.mjs +277 -0
  27. package/{FileSelectModal-9a02560b.mjs → FileSelectModal-1643c8b9.mjs} +1 -1
  28. package/{ForeignKeyTable-6a843c4b.mjs → ForeignKeyTable-7f7e28a7.mjs} +3 -3
  29. package/{IndexTable-f8af9d44.mjs → IndexTable-cdcc2b48.mjs} +28 -20
  30. package/{JModalTip-33c7dc44.mjs → JModalTip-b055ab60.mjs} +1 -1
  31. package/JOnlineSearchSelect-22aae934.mjs +128 -0
  32. package/{LeftDepart-fa85523d.mjs → LeftDepart-d5615ed9.mjs} +1 -1
  33. package/{LeftRole-8b8dfe21.mjs → LeftRole-2ed8a2bf.mjs} +1 -1
  34. package/{LeftUser-dc24ef2f.mjs → LeftUser-22baa378.mjs} +3 -3
  35. package/LinkTableConfigModal-9242d750.mjs +240 -0
  36. package/{LinkTableFieldConfigModal-787bc55c.mjs → LinkTableFieldConfigModal-24adc50c.mjs} +41 -41
  37. package/{LinkTableListPiece-8499a318.mjs → LinkTableListPiece-f3a8e0d7.mjs} +1 -1
  38. package/{ModalFormDemo-977a49eb.mjs → ModalFormDemo-711418db.mjs} +1 -1
  39. package/OnlCgformErpList-58acdfa0.mjs +470 -0
  40. package/OnlCgformErpSubTable-9b1e1938.mjs +426 -0
  41. package/OnlCgformInnerSubTable-6c23781f.mjs +265 -0
  42. package/OnlCgformInnerTableList-4b5e14ed.mjs +458 -0
  43. package/OnlCgformTabList-019ad753.mjs +408 -0
  44. package/OnlineAutoList-48589d09.mjs +493 -0
  45. package/OnlineAutoModal-c2928847.mjs +239 -0
  46. package/{OnlineAutoTreeList-89265688.mjs → OnlineAutoTreeList-3baa1d00.mjs} +207 -204
  47. package/{OnlineCustomModal-518ad33c.mjs → OnlineCustomModal-9e17b6ce.mjs} +16 -12
  48. package/{OnlineDetailModal-9675390d.mjs → OnlineDetailModal-d5895734.mjs} +74 -64
  49. package/OnlineForm-9f1153ba.mjs +985 -0
  50. package/OnlineForm.vue_vue_type_style_index_0_scoped_4657b304_lang-4ed993c7.mjs +1 -0
  51. package/OnlineFormDetail-022ca117.mjs +342 -0
  52. package/OnlineFormUrlAdd-9715d70a.mjs +115 -0
  53. package/OnlineFormUrlDetail-8f864b1a.mjs +119 -0
  54. package/OnlineFormUrlEdit-ac985b36.mjs +113 -0
  55. package/OnlineFormUrlSuccess-3dfc54ab.mjs +59 -0
  56. package/OnlineQueryForm-eedb9a60.mjs +466 -0
  57. package/{OnlineSearchFormItem-0cc85a8a.mjs → OnlineSearchFormItem-6c557343.mjs} +2 -2
  58. package/{OnlineSelectCascade-4265c95d.mjs → OnlineSelectCascade-05c40fef.mjs} +1 -1
  59. package/{OnlineSubFormDetail-f0d2c016.mjs → OnlineSubFormDetail-58e896ce.mjs} +30 -28
  60. package/OnlineTabAutoModal-47b18ad6.mjs +306 -0
  61. package/{OnlineTabDetailModal-7356d3a8.mjs → OnlineTabDetailModal-82de1465.mjs} +22 -20
  62. package/OnlineTabForm-27655c83.mjs +817 -0
  63. package/OnlineTabFormDetail-8d0c40c0.mjs +327 -0
  64. package/PageAttributeTable-25e3b7da.mjs +466 -0
  65. package/{ProcessOnlineForm-67558898.mjs → ProcessOnlineForm-148632fe.mjs} +66 -56
  66. package/QueryTable-f7bfca7f.mjs +147 -0
  67. package/SetSwitchOptions-b2af757f.mjs +62 -0
  68. package/SuperQuery-a8592995.mjs +967 -0
  69. package/auth.api-ea1d33d4.mjs +41 -0
  70. package/auth.data-511e5197.mjs +217 -0
  71. package/{cgform.data-cbdd88c3.mjs → cgform.data-475d4984.mjs} +5 -1
  72. package/constant-fa63bd66.mjs +10 -0
  73. package/{enhance.data-efc7e155.mjs → enhance.data-a67572e1.mjs} +11 -10
  74. package/index-1d1a6e56.mjs +57 -0
  75. package/{index-b7a05eef.mjs → index-30e0e923.mjs} +396 -362
  76. package/{index-49508cad.mjs → index-f30613d1.mjs} +29 -27
  77. package/main.index.js +1 -1
  78. package/package.json +1 -1
  79. package/style.css +1 -1
  80. package/useCgformList-f41d4dc1.mjs +426 -0
  81. package/useExtendComponent-dcae5c78.mjs +4399 -0
  82. package/useFormUrl-2ee1a82d.mjs +24 -0
  83. package/useListButton-bfac4ecf.mjs +697 -0
  84. package/{useSchemas-0433a403.mjs → useSchemas-a9c75b0f.mjs} +191 -101
  85. package/useTableSync-d7e9f18d.mjs +89 -0
  86. package/AuthButtonConfig-244ec09f.mjs +0 -125
  87. package/AuthDataConfig-83891eea.mjs +0 -212
  88. package/AuthFieldConfig-6b21915c.mjs +0 -139
  89. package/AuthManagerDrawer-300dd4e4.mjs +0 -114
  90. package/AuthSetterModal-a414fb35.mjs +0 -267
  91. package/CgformModal-eccfc38e.mjs +0 -611
  92. package/CgreportModal-2065f5a9.mjs +0 -13
  93. package/CheckDictTable-134cbb83.mjs +0 -211
  94. package/CodeFileViewModal-373e8058.mjs +0 -244
  95. package/CodeGeneratorModal-f08a89cd.mjs +0 -233
  96. package/CustomButtonList-02e3d897.mjs +0 -363
  97. package/DbToOnlineModal-9f13956f.mjs +0 -160
  98. package/DetailForm-424638eb.mjs +0 -462
  99. package/EnhanceJsModal-05c73a59.mjs +0 -311
  100. package/ExtendConfigModal-1dde390a.mjs +0 -111
  101. package/FieldExtendJsonModal-a70a9ccd.mjs +0 -219
  102. package/JOnlineSearchSelect-c287af12.mjs +0 -95
  103. package/LinkTableConfigModal-d4fbdef2.mjs +0 -230
  104. package/OnlCgformErpList-db45e22b.mjs +0 -454
  105. package/OnlCgformErpSubTable-54b50eec.mjs +0 -403
  106. package/OnlCgformInnerSubTable-fbca73e0.mjs +0 -253
  107. package/OnlCgformInnerTableList-782eaf04.mjs +0 -444
  108. package/OnlCgformTabList-a9e1e36a.mjs +0 -395
  109. package/OnlineAutoList-0583a910.mjs +0 -479
  110. package/OnlineAutoModal-510991eb.mjs +0 -207
  111. package/OnlineForm-1fa2d893.mjs +0 -750
  112. package/OnlineFormDetail-0e7294ca.mjs +0 -297
  113. package/OnlineQueryForm-1bfc8320.mjs +0 -386
  114. package/OnlineTabAutoModal-6f636ee2.mjs +0 -254
  115. package/OnlineTabForm-512d3951.mjs +0 -766
  116. package/OnlineTabFormDetail-5a70219d.mjs +0 -324
  117. package/PageAttributeTable-965dc58e.mjs +0 -404
  118. package/QueryTable-eb9a5b21.mjs +0 -115
  119. package/SuperQuery-5d1ca957.mjs +0 -843
  120. package/auth.api-d3a6c4b3.mjs +0 -39
  121. package/auth.data-8be5c9e3.mjs +0 -141
  122. package/constant-754f1a9d.mjs +0 -9
  123. package/index-0e3ab3af.mjs +0 -56
  124. package/useCgformList-423282b7.mjs +0 -400
  125. package/useExtendComponent-325fe3f1.mjs +0 -3926
  126. package/useListButton-cdbab702.mjs +0 -676
  127. package/useTableSync-774c3774.mjs +0 -87
@@ -0,0 +1,817 @@
1
+ var Ct = Object.defineProperty, kt = Object.defineProperties;
2
+ var Ot = Object.getOwnPropertyDescriptors;
3
+ var ye = Object.getOwnPropertySymbols;
4
+ var Pt = Object.prototype.hasOwnProperty, Rt = Object.prototype.propertyIsEnumerable;
5
+ var ve = (i, c, r) => c in i ? Ct(i, c, { enumerable: !0, configurable: !0, writable: !0, value: r }) : i[c] = r, R = (i, c) => {
6
+ for (var r in c || (c = {}))
7
+ Pt.call(c, r) && ve(i, r, c[r]);
8
+ if (ye)
9
+ for (var r of ye(c))
10
+ Rt.call(c, r) && ve(i, r, c[r]);
11
+ return i;
12
+ }, Fe = (i, c) => kt(i, Ot(c));
13
+ var _ = (i, c, r) => new Promise((a, V) => {
14
+ var w = (g) => {
15
+ try {
16
+ y(r.next(g));
17
+ } catch (h) {
18
+ V(h);
19
+ }
20
+ }, O = (g) => {
21
+ try {
22
+ y(r.throw(g));
23
+ } catch (h) {
24
+ V(h);
25
+ }
26
+ }, y = (g) => g.done ? a(g.value) : Promise.resolve(g.value).then(w, O);
27
+ y((r = r.apply(i, c)).next());
28
+ });
29
+ import { useMessage as Vt } from "/@/hooks/web/useMessage";
30
+ import { ref as p, reactive as xt, computed as At, watch as Mt, resolveComponent as v, openBlock as C, createElementBlock as U, normalizeClass as Dt, createVNode as k, withCtx as A, createBlock as q, Fragment as Et, renderList as jt, normalizeStyle as It, createElementVNode as oe, createCommentVNode as $, renderSlot as Bt, unref as _e, nextTick as we, toRaw as M, pushScopeId as Nt, popScopeId as Lt } from "vue";
31
+ import { BasicForm as Jt, useForm as Ut } from "/@/components/Form/index";
32
+ import { c as qt, O as Kt, d as Ht, e as Wt, u as Gt, l as K, g as zt, V as I, S as Qt, f as Yt, h as Te } from "./useExtendComponent-dcae5c78.mjs";
33
+ import { defHttp as ee } from "/@/utils/http/axios";
34
+ import { pick as Xt, omit as Se } from "lodash-es";
35
+ import { sleep as Zt, goJmReportViewPage as $t } from "/@/utils";
36
+ import { Loading as eo } from "/@/components/Loading";
37
+ import { getToken as to } from "/@/utils/auth";
38
+ import { PrinterOutlined as oo, DiffOutlined as lo, FormOutlined as no } from "@ant-design/icons-vue";
39
+ import { useModal as ao } from "/@/components/Modal";
40
+ import { u as io, G as ro } from "./useCustomHook-acb00837.mjs";
41
+ import { useAppInject as so } from "/@/hooks/web/useAppInject";
42
+ import { _ as uo } from "./index-1d1a6e56.mjs";
43
+ import "/@/components/Form/src/componentMap";
44
+ import "/@/utils/propTypes";
45
+ import "./constant-fa63bd66.mjs";
46
+ import "/@/utils/common/compUtils";
47
+ import "/@/components/Form/src/jeecg/components/JUpload";
48
+ import "/@/utils/is";
49
+ import "/@/views/system/user/user.api";
50
+ import "/@/store/modules/user";
51
+ import "/@/utils/desform/customExpression";
52
+ import "/@/store/modules/permission";
53
+ import "/@/utils/dict/JDictSelectUtil";
54
+ import "/@/components/Table";
55
+ import "/@/hooks/system/useListPage";
56
+ import "vue-router";
57
+ import "/@/components/Form/src/utils/Area";
58
+ import "/@/components/Preview/index";
59
+ import "./LinkTableListPiece-f3a8e0d7.mjs";
60
+ import "/@/api/common/api";
61
+ import "/@/assets/images/placeholderImage.png";
62
+ import "./OnlineSelectCascade-05c40fef.mjs";
63
+ import "./JModalTip-b055ab60.mjs";
64
+ import "ant-design-vue";
65
+ import "@vueuse/core";
66
+ import "/@/utils/cache";
67
+ import "/@/components/jeecg/OnLine/JPopupOnlReport.vue";
68
+ const te = {
69
+ optPre: "/online/cgform/api/form/",
70
+ urlButtonAction: "/online/cgform/api/doButton"
71
+ }, co = {
72
+ name: "OnlineTabForm",
73
+ components: {
74
+ BasicForm: Jt,
75
+ Loading: eo,
76
+ OnlineSubForm: qt,
77
+ PrinterOutlined: oo,
78
+ DiffOutlined: lo,
79
+ FormOutlined: no,
80
+ OnlinePopModal: Kt
81
+ },
82
+ props: {
83
+ id: {
84
+ type: String,
85
+ default: ""
86
+ },
87
+ formTemplate: {
88
+ type: Number,
89
+ default: 1
90
+ },
91
+ disabled: {
92
+ type: Boolean,
93
+ default: !1
94
+ },
95
+ isTree: {
96
+ type: Boolean,
97
+ default: !1
98
+ },
99
+ pidField: {
100
+ type: String,
101
+ default: ""
102
+ },
103
+ submitTip: {
104
+ type: Boolean,
105
+ default: !0
106
+ },
107
+ modalClass: {
108
+ type: String,
109
+ default: ""
110
+ },
111
+ themeTemplate: {
112
+ type: String,
113
+ default: ""
114
+ },
115
+ tabIndex: {
116
+ type: String,
117
+ default: ""
118
+ }
119
+ },
120
+ emits: ["success", "rendered", "toggleTab"],
121
+ setup(i, { emit: c }) {
122
+ const { createMessage: r } = Vt(), a = p(null), V = p(!0), w = p(!1), O = p(1), y = p(""), g = p(!1), h = p(!1), { getIsMobile: B } = so(), H = p(!B.value), P = xt({
123
+ reportPrintShow: 0,
124
+ reportPrintUrl: "",
125
+ joinQuery: 0,
126
+ modelFullscreen: 0,
127
+ modalMinWidth: "",
128
+ commentStatus: 0
129
+ }), { onlineFormContext: f, resetContext: W } = Ht(), {
130
+ formSchemas: D,
131
+ defaultValueFields: s,
132
+ changeDataIfArray2String: N,
133
+ tableName: d,
134
+ dbData: T,
135
+ checkOnlyFieldValue: Ce,
136
+ hasSubTable: ke,
137
+ subTabInfo: E,
138
+ refMap: G,
139
+ subDataSource: L,
140
+ baseColProps: Oe,
141
+ createFormSchemas: Pe,
142
+ fieldDisplayStatus: j,
143
+ labelCol: Re,
144
+ wrapperCol: Ve,
145
+ labelWidth: xe
146
+ } = Wt(i, a);
147
+ let { EnhanceJS: u, initCgEnhanceJs: Ae } = Gt(f, !1);
148
+ const { executeJsEnhanced: Me } = io({}, f), [De, { setProps: Ee, validate: le, resetFields: ne, clearValidate: je, setFieldsValue: S, updateSchema: z, getFieldsValue: Q, scrollToField: ae }] = Ut({
149
+ schemas: D,
150
+ showActionButtonGroup: !1,
151
+ baseColProps: Oe,
152
+ // update-begin--author:liaozhiyang---date:20240329---for:【QQYUN-7872】online表单label较长优化
153
+ labelWidth: xe,
154
+ // update-end--author:liaozhiyang---date:20240329---for:【QQYUN-7872】online表单label较长优化
155
+ // update-begin--author:liaozhiyang---date:20240105---for:【QQYUN-7499】多列风格富文本、markdown增加独占一行功能
156
+ labelCol: Re,
157
+ wrapperCol: Ve
158
+ // update-end--author:liaozhiyang---date:20240105---for:【QQYUN-7499】多列风格富文本、markdown增加独占一行功能
159
+ }), ie = p(!1);
160
+ function Ie() {
161
+ let e = i.disabled;
162
+ ie.value = e, Ee({ disabled: e });
163
+ }
164
+ function Be(e, t, o) {
165
+ return _(this, null, function* () {
166
+ yield Ne(), y.value = "", yield ne(), setTimeout(() => {
167
+ je();
168
+ }, 0), T.value = "";
169
+ let l = _e(e);
170
+ h.value = l, l ? yield se(t) : ue(), we(() => {
171
+ !l && o && S(o), Le(), Y("js", "loaded"), Ie();
172
+ });
173
+ });
174
+ }
175
+ function Ne() {
176
+ return _(this, null, function* () {
177
+ if (i.isTree === !0) {
178
+ let e = i.pidField, t = D.value;
179
+ t && t.length > 0 && t.filter((l) => l.field === e).length > 0 && (yield z({
180
+ field: e,
181
+ componentProps: {
182
+ reload: (/* @__PURE__ */ new Date()).getTime(),
183
+ // update-begin--author:liaozhiyang---date:20240529---for:【TV360X-87】树表编辑时不可选自己及子孙节点当父节点
184
+ hiddenNodeKey: ""
185
+ // update-end--author:liaozhiyang---date:20240529---for:【TV360X-87】树表编辑时不可选自己及子孙节点当父节点
186
+ }
187
+ }));
188
+ }
189
+ });
190
+ }
191
+ function Le() {
192
+ if (_e(h) === !1) {
193
+ let e = M(s[d.value]);
194
+ K(e, (t) => {
195
+ S(t);
196
+ });
197
+ }
198
+ }
199
+ function re(e, t) {
200
+ let o = M(s[e.key]);
201
+ K(o, (l) => {
202
+ const { row: n, target: m } = t;
203
+ let F = [{ rowKey: n.id, values: R({}, l) }];
204
+ m.setValues(F);
205
+ });
206
+ }
207
+ function se(e) {
208
+ return _(this, null, function* () {
209
+ let t = yield Ue(e.id);
210
+ T.value = Object.assign({}, e, t);
211
+ let o = Je.value, l = Xt(t, ...o);
212
+ i.disabled && Object.keys(l).map((n) => {
213
+ !l[n] && l[n] !== 0 && l[n] !== "0" && delete l[n];
214
+ }), yield S(l), ue(t);
215
+ });
216
+ }
217
+ function ue(e) {
218
+ e || (e = {});
219
+ let t = Object.keys(L.value);
220
+ if (t && t.length > 0) {
221
+ let o = {};
222
+ for (let l of t)
223
+ o[l] = e[l] || [];
224
+ L.value = o;
225
+ }
226
+ }
227
+ let Je = At(() => {
228
+ let e = D.value, t = [];
229
+ for (let o of e)
230
+ t.push(o.field);
231
+ return t;
232
+ });
233
+ function Ue(e) {
234
+ let t = `${te.optPre}${i.id}/${e}`;
235
+ return new Promise((o, l) => {
236
+ ee.get({ url: t }, { isTransformResponse: !1 }).then((n) => {
237
+ n.success ? o(n.result) : (l(), r.warning(n.message));
238
+ }).catch(() => {
239
+ l();
240
+ });
241
+ });
242
+ }
243
+ function qe(e) {
244
+ return _(this, null, function* () {
245
+ O.value = e.head.tableType, d.value = e.head.tableName, V.value = e.head.tableType == 1, We(e.head.extConfigJson), Pe(e.schema.properties, e.schema.required, Ce, P), u = Ae(e.enhanceJs), c("rendered", P);
246
+ let t = yield zt(a);
247
+ t.$formValueChange = (o, l, n) => {
248
+ ut(o, l), n && S(n), Ke(o, l, n);
249
+ }, u && u.setup && me(u.setup);
250
+ });
251
+ }
252
+ function Ke(e, t, o) {
253
+ f.changEvent(e, t, o);
254
+ }
255
+ function He(e) {
256
+ f.addObject2Context("changEvent", e);
257
+ }
258
+ function We(e) {
259
+ let t = { reportPrintShow: 0, reportPrintUrl: "", joinQuery: 0, modelFullscreen: 0, modalMinWidth: "", commentStatus: 0, formLabelLength: null };
260
+ e && (t = JSON.parse(e)), Object.keys(t).map((o) => {
261
+ P[o] = t[o];
262
+ });
263
+ }
264
+ function Ge() {
265
+ V.value === !0 ? Ze() : ze();
266
+ }
267
+ function ze() {
268
+ Qe().then((e) => {
269
+ ce(e);
270
+ });
271
+ }
272
+ function Qe() {
273
+ let e = {};
274
+ return new Promise((t, o) => {
275
+ le().then(
276
+ (l) => t(l),
277
+ ({ errorFields: l }) => {
278
+ o({
279
+ code: I,
280
+ key: d.value,
281
+ // 滚动到未通过校验的字段上
282
+ scrollToField: () => l[0] && ae(l[0].name, { behavior: "smooth", block: "center" })
283
+ });
284
+ }
285
+ );
286
+ }).then((t) => (Object.assign(e, N(t)), Xe())).then((t) => (Object.assign(e, t), Promise.resolve(e))).catch((t) => ((t === I || (t == null ? void 0 : t.code) === I) && (r.warning("校验未通过"), t.key && (Ye(t.key), t.scrollToField && setTimeout(() => t.scrollToField(), 150))), Promise.reject(null)));
287
+ }
288
+ function Ye(e) {
289
+ if (e === d.value) {
290
+ c("toggleTab", "-1");
291
+ return;
292
+ }
293
+ let t = E.value;
294
+ for (let o = 0; o < t.length; o++)
295
+ if (e == t[o].key) {
296
+ let l = o + "";
297
+ if (J.value === l)
298
+ break;
299
+ if (c("toggleTab", l), t[o].relationType === 0) {
300
+ let n = b(e);
301
+ Zt(300, () => n == null ? void 0 : n.validateTable());
302
+ }
303
+ break;
304
+ }
305
+ }
306
+ function Xe() {
307
+ return new Promise((e, t) => _(this, null, function* () {
308
+ let o = {};
309
+ try {
310
+ let l = E.value;
311
+ for (let n = 0; n < l.length; n++) {
312
+ let m = l[n].key, F = b(m);
313
+ if (l[n].relationType == 1)
314
+ try {
315
+ let x = yield F.getAll();
316
+ o[m] = [], o[m].push(x);
317
+ } catch (x) {
318
+ return t(R({ code: I, key: m }, x));
319
+ }
320
+ else {
321
+ if (yield F.fullValidateTable())
322
+ return t({ code: I, key: m });
323
+ o[m] = F.getTableData();
324
+ }
325
+ }
326
+ } catch (l) {
327
+ t(l);
328
+ }
329
+ e(o);
330
+ }));
331
+ }
332
+ function Ze() {
333
+ return _(this, null, function* () {
334
+ try {
335
+ let e = yield le();
336
+ e = Object.assign({}, T.value, e), e = N(e), w.value = !0, ce(e);
337
+ } catch (e) {
338
+ Array.isArray(e == null ? void 0 : e.errorFields) && e.errorFields[0] && ae(e.errorFields[0].name, { behavior: "smooth", block: "center" });
339
+ } finally {
340
+ w.value = !1;
341
+ }
342
+ });
343
+ }
344
+ function ce(e) {
345
+ dt(be, e).then(() => {
346
+ $e(e);
347
+ }).catch((t) => {
348
+ r.warning(t);
349
+ });
350
+ }
351
+ function $e(e) {
352
+ Object.keys(e).map((n) => {
353
+ Array.isArray(e[n]) && e[n].length == 0 && (e[n] = "");
354
+ });
355
+ let t = y.value, o = `${te.optPre}${i.id}?tabletype=${O.value}`;
356
+ t && (o = `${t}?tabletype=${O.value}`), g.value === !0 && (e[Qt] = 1);
357
+ let l = h.value === !0 ? "put" : "post";
358
+ ee.request({ url: o, method: l, params: e }, { isTransformResponse: !1 }).then((n) => {
359
+ n.success ? (n.result && (e[Yt] = n.result), c("success", e), i.submitTip === !0 && r.success(n.message)) : r.warning(n.message);
360
+ }).finally(() => {
361
+ w.value = !1;
362
+ });
363
+ }
364
+ function et(e, t, o) {
365
+ t && o ? o.vxeProps ? o.setValues([
366
+ {
367
+ rowKey: t,
368
+ values: e
369
+ }
370
+ ]) : o.setValues(e) : S(e);
371
+ }
372
+ function tt(e, t) {
373
+ let o = {};
374
+ o[e] = t, S(o);
375
+ }
376
+ const J = p("0"), fe = p("auto"), de = p(340);
377
+ function ot(e) {
378
+ if (h.value === !0) {
379
+ let t = T.value;
380
+ return lt(t, e);
381
+ }
382
+ return "";
383
+ }
384
+ Mt(
385
+ () => i.tabIndex,
386
+ (e) => {
387
+ J.value = e;
388
+ },
389
+ {
390
+ immediate: !0
391
+ }
392
+ );
393
+ function lt(e, t) {
394
+ if (e) {
395
+ let o = e[t];
396
+ return !o && o !== 0 && (o = e[t.toLowerCase()], !o && o !== 0 && (o = e[t.toUpperCase()])), o;
397
+ }
398
+ return "";
399
+ }
400
+ function nt(e, t) {
401
+ if (u && u[t + "_onlChange"]) {
402
+ let o = u[t + "_onlChange"](), l = Object.keys(e)[0];
403
+ if (o[l]) {
404
+ let m = b(t).getFormEvent(), F = R({
405
+ column: { key: l },
406
+ value: e[l]
407
+ }, m);
408
+ o[l].call(f, f, F);
409
+ }
410
+ }
411
+ }
412
+ function at(e, t) {
413
+ if (u && u[t + "_onlChange"]) {
414
+ let o = u[t + "_onlChange"](f);
415
+ if (e.column === "all") {
416
+ let l = Object.keys(o);
417
+ if (l.length > 0)
418
+ for (let n of l)
419
+ o[n].call(f, f, e);
420
+ } else {
421
+ let l = e.column.key || e.col.key;
422
+ o[l] && e.row && e.row.id && o[l].call(f, f, e);
423
+ }
424
+ }
425
+ }
426
+ function it(e, t) {
427
+ var o;
428
+ if (u && u[t + "_onlChange"]) {
429
+ let l = u[t + "_onlChange"](f), n = Object.keys(l);
430
+ if (n.length > 0)
431
+ for (let m of n)
432
+ (o = l[m]) == null || o.call(f, f, Fe(R({}, e), { row: e.deleteRows }));
433
+ }
434
+ }
435
+ function rt(e, t) {
436
+ t.isModalData || re(e, t);
437
+ }
438
+ function st(e) {
439
+ return "online_" + e + ":";
440
+ }
441
+ function ut(e, t) {
442
+ return _(this, null, function* () {
443
+ if (!u || !u.onlChange || !e)
444
+ return !1;
445
+ let o = u.onlChange();
446
+ if (o[e]) {
447
+ let n = {
448
+ row: yield Q(),
449
+ column: { key: e },
450
+ value: t
451
+ };
452
+ o[e].call(f, f, n);
453
+ }
454
+ });
455
+ }
456
+ function me(e) {
457
+ let o = e.toLocaleString().match(ro);
458
+ if (o.length > 1) {
459
+ let l = o[1];
460
+ Me(l);
461
+ }
462
+ }
463
+ function Y(e, t) {
464
+ if (e == "js") {
465
+ let o = t + "_hook";
466
+ u && u[t] ? u[t].call(f, f) : u && u[o] && me(u[o]);
467
+ } else if (e == "action") {
468
+ let o = T.value, l = {
469
+ formId: i.id,
470
+ buttonCode: t,
471
+ dataId: o.id,
472
+ uiFormData: Object.assign({}, o)
473
+ };
474
+ ee.post(
475
+ {
476
+ url: `${te.urlButtonAction}`,
477
+ params: l
478
+ },
479
+ { isTransformResponse: !1 }
480
+ ).then((n) => {
481
+ n.success ? r.success("处理完成!") : r.warning("处理失败!");
482
+ });
483
+ }
484
+ }
485
+ function pe(e) {
486
+ let t = b(e), o = [...t.getNewDataWithId(), ...L.value[e]];
487
+ if (!o || o.length == 0)
488
+ return !1;
489
+ let l = [];
490
+ for (let n of o)
491
+ l.push(n.id);
492
+ t.removeRowsById(l);
493
+ }
494
+ function he(e, t) {
495
+ if (!t)
496
+ return !1;
497
+ let o = b(e);
498
+ typeof t == "object" ? o.addRows(t, !0) : this.$message.error("添加子表数据,参数不识别!");
499
+ }
500
+ function ct(e, t) {
501
+ pe(e), he(e, t);
502
+ }
503
+ function ft(e, t) {
504
+ !t && t.length <= 0 && (t = []), t.map((o) => {
505
+ o.hasOwnProperty("label") || (o.label = o.text);
506
+ }), z({
507
+ field: e,
508
+ componentProps: {
509
+ options: t
510
+ }
511
+ });
512
+ }
513
+ function dt(e, t) {
514
+ return u && u.beforeSubmit ? u.beforeSubmit(e, t) : Promise.resolve();
515
+ }
516
+ function mt(e, t) {
517
+ let o = M(j);
518
+ e && e.length > 0 ? Object.keys(o).map((l) => {
519
+ !l.endsWith("_load") && e.indexOf(l) < 0 && (j[l] = !1);
520
+ }) : t && t.length > 0 && Object.keys(o).map((l) => {
521
+ t.indexOf(l) >= 0 && (j[l] = !1);
522
+ });
523
+ }
524
+ function pt(e, t) {
525
+ return _(this, null, function* () {
526
+ y.value = t, yield ne(), T.value = "", h.value = !0, yield se(e), yield we(() => {
527
+ Y("js", "loaded");
528
+ });
529
+ });
530
+ }
531
+ function b(e) {
532
+ let t = G[e].value;
533
+ if (t instanceof Array && (t = t[0]), !t) {
534
+ r.warning("子表ref找不到:" + e);
535
+ return;
536
+ }
537
+ return t;
538
+ }
539
+ function ht() {
540
+ let e = P.reportPrintUrl, t = T.value.id, o = to();
541
+ $t(e, t, o);
542
+ }
543
+ const [gt, { openModal: ge }] = ao(), X = p(""), Z = p(!0);
544
+ function bt(e) {
545
+ X.value = e.id, Z.value = !1, ge(!0, { isUpdate: !1, tableType: "3" });
546
+ }
547
+ function yt(e) {
548
+ let o = b(e.key).getSelectedData();
549
+ if (o.length != 1) {
550
+ r.warning("请选择一条数据");
551
+ return;
552
+ }
553
+ X.value = e.id, Z.value = !1, ge(!0, { isUpdate: !0, record: o[0] });
554
+ }
555
+ function vt(e) {
556
+ const t = e[Te];
557
+ let o = Se(e, [Te]);
558
+ if (o.id) {
559
+ let l = Se(R({}, o), "id"), n = [{ rowKey: o.id, values: l }];
560
+ b(t).setValues(n);
561
+ } else
562
+ b(t).addRows(o, { isOnlineJS: !1, setActive: !1, emitChange: !0, isModalData: !0 });
563
+ }
564
+ function Ft() {
565
+ let e = E.value;
566
+ if (e && e.length > 0) {
567
+ for (let t of e)
568
+ if (t.relationType != 1) {
569
+ let o = b(t.key);
570
+ o && o.clearSelection();
571
+ }
572
+ }
573
+ }
574
+ function _t() {
575
+ let e = Q(), t = M(s[d.value]);
576
+ K(
577
+ t,
578
+ (o) => {
579
+ S(o);
580
+ },
581
+ e
582
+ );
583
+ }
584
+ function wt(e, t) {
585
+ let o = E.value;
586
+ if (o && o.length > 0) {
587
+ let l = o.filter((n) => n.key === e);
588
+ if (l.length == 0)
589
+ return;
590
+ if (l[0].relationType == 1)
591
+ b(e).executeFillRule();
592
+ else {
593
+ let n = M(s[e]), m = M(t.row);
594
+ K(
595
+ n,
596
+ (F) => {
597
+ const { row: x, target: Tt } = t;
598
+ let St = [{ rowKey: x.id, values: R({}, F) }];
599
+ Tt.setValues(St);
600
+ },
601
+ m
602
+ );
603
+ }
604
+ }
605
+ }
606
+ let be = {
607
+ tableName: d,
608
+ loading: w,
609
+ subActiveKey: J,
610
+ onlineFormRef: a,
611
+ getFieldsValue: Q,
612
+ setFieldsValue: S,
613
+ submitFlowFlag: g,
614
+ subFormHeight: fe,
615
+ subTableHeight: de,
616
+ refMap: G,
617
+ triggleChangeValues: et,
618
+ triggleChangeValue: tt,
619
+ sh: j,
620
+ clearSubRows: pe,
621
+ addSubRows: he,
622
+ clearThenAddRows: ct,
623
+ changeOptions: ft,
624
+ isUpdate: h,
625
+ getSubTableInstance: b,
626
+ updateSchema: z,
627
+ executeMainFillRule: _t,
628
+ executeSubFillRule: wt,
629
+ changEvent: () => {
630
+ },
631
+ onlineFormValueChange: He
632
+ };
633
+ return W(be), {
634
+ //主表
635
+ tableName: d,
636
+ onlineFormRef: a,
637
+ registerForm: De,
638
+ loading: w,
639
+ //子表
640
+ subActiveKey: J,
641
+ hasSubTable: ke,
642
+ subTabInfo: E,
643
+ refMap: G,
644
+ //一对一子表
645
+ subFormHeight: fe,
646
+ getSubTableForeignKeyValue: ot,
647
+ isUpdate: h,
648
+ handleSubFormChange: nt,
649
+ //一对多子表
650
+ subTableHeight: de,
651
+ onlineFormDisabled: ie,
652
+ subDataSource: L,
653
+ getSubTableAuthPre: st,
654
+ handleAdded: rt,
655
+ handleSubTableDefaultValue: re,
656
+ handleValueChange: at,
657
+ openSubFormModalForAdd: bt,
658
+ openSubFormModalForEdit: yt,
659
+ handleRemoved: it,
660
+ //父组件调用
661
+ show: Be,
662
+ createRootProperties: qe,
663
+ handleSubmit: Ge,
664
+ sh: j,
665
+ handleCgButtonClick: Y,
666
+ handleCustomFormSh: mt,
667
+ handleCustomFormEdit: pt,
668
+ //跳转
669
+ dbData: T,
670
+ onOpenReportPrint: ht,
671
+ onlineExtConfigJson: P,
672
+ //一对多子表弹窗操作数据
673
+ registerPopModal: gt,
674
+ popTableName: X,
675
+ getPopFormData: vt,
676
+ popModalRequest: Z,
677
+ onCloseModal: Ft,
678
+ rowNumber: H
679
+ };
680
+ }
681
+ }, fo = (i) => (Nt("data-v-dec72f46"), i = i(), Lt(), i), mo = ["id"], po = { key: 1 }, ho = { class: "add" }, go = /* @__PURE__ */ fo(() => /* @__PURE__ */ oe("svg", {
682
+ t: "1714390025804",
683
+ class: "icon",
684
+ viewBox: "0 0 1024 1024",
685
+ version: "1.1",
686
+ xmlns: "http://www.w3.org/2000/svg",
687
+ "p-id": "50960",
688
+ width: "16",
689
+ height: "16"
690
+ }, [
691
+ /* @__PURE__ */ oe("path", {
692
+ d: "M469.333333 469.333333V170.666667h85.333334v298.666666h298.666666v85.333334h-298.666666v298.666666h-85.333334v-298.666666H170.666667v-85.333334h298.666666z",
693
+ fill: "#fff",
694
+ "p-id": "50961"
695
+ })
696
+ ], -1));
697
+ function bo(i, c, r, a, V, w) {
698
+ const O = v("BasicForm"), y = v("a-tab-pane"), g = v("online-sub-form"), h = v("diff-outlined"), B = v("a-button"), H = v("form-outlined"), P = v("JVxeTable"), f = v("a-tabs"), W = v("Loading"), D = v("online-pop-modal");
699
+ return C(), U("div", {
700
+ id: a.tableName + "_form",
701
+ class: Dt(["onlineFormWrap", [`formTemplate_${r.formTemplate}`]])
702
+ }, [
703
+ k(f, {
704
+ class: "tabTheme",
705
+ activeKey: a.subActiveKey,
706
+ "onUpdate:activeKey": c[0] || (c[0] = (s) => a.subActiveKey = s)
707
+ }, {
708
+ default: A(() => [
709
+ (C(), q(y, {
710
+ tab: "主表",
711
+ key: "-1"
712
+ }, {
713
+ default: A(() => [
714
+ k(O, {
715
+ ref: "onlineFormRef",
716
+ onRegister: a.registerForm
717
+ }, null, 8, ["onRegister"])
718
+ ]),
719
+ _: 1
720
+ })),
721
+ a.hasSubTable ? (C(!0), U(Et, { key: 0 }, jt(a.subTabInfo, (s, N) => (C(), q(y, {
722
+ tab: s.describe,
723
+ key: N + "",
724
+ forceRender: !0
725
+ }, {
726
+ default: A(() => [
727
+ s.relationType == 1 ? (C(), U("div", {
728
+ key: 0,
729
+ style: It({ "overflow-y": "auto", "overflow-x": "hidden", "max-height": a.subFormHeight + "px" })
730
+ }, [
731
+ k(g, {
732
+ ref_for: !0,
733
+ ref: a.refMap[s.key],
734
+ table: s.key,
735
+ disabled: a.onlineFormDisabled,
736
+ "form-template": r.formTemplate,
737
+ "main-id": a.getSubTableForeignKeyValue(s.foreignKey),
738
+ properties: s.properties,
739
+ "required-fields": s.requiredFields,
740
+ "is-update": a.isUpdate,
741
+ onFormChange: (d) => a.handleSubFormChange(d, s.key)
742
+ }, null, 8, ["table", "disabled", "form-template", "main-id", "properties", "required-fields", "is-update", "onFormChange"])
743
+ ], 4)) : (C(), U("div", po, [
744
+ k(P, {
745
+ ref_for: !0,
746
+ ref: a.refMap[s.key],
747
+ toolbar: "",
748
+ "keep-source": "",
749
+ "row-number": a.rowNumber,
750
+ "row-selection": "",
751
+ height: (
752
+ // 【VUEN-803】一对多子表固定340高度,修复自定义列组件被遮挡的问题
753
+ a.subTableHeight
754
+ ),
755
+ disabled: a.onlineFormDisabled,
756
+ columns: s.columns,
757
+ dataSource: a.subDataSource[s.key],
758
+ onValueChange: (d) => a.handleValueChange(d, s.key),
759
+ onRemoved: (d) => a.handleRemoved(d, s.key),
760
+ authPre: a.getSubTableAuthPre(s.key),
761
+ onAdded: (d) => a.handleAdded(s, d),
762
+ onExecuteFillRule: (d) => a.handleSubTableDefaultValue(s, d)
763
+ }, {
764
+ toolbarSuffix: A(() => [
765
+ a.onlineFormDisabled ? $("", !0) : (C(), q(B, {
766
+ key: 0,
767
+ type: "primary",
768
+ onClick: (d) => a.openSubFormModalForAdd(s)
769
+ }, {
770
+ default: A(() => [
771
+ oe("div", ho, [
772
+ go,
773
+ k(h)
774
+ ])
775
+ ]),
776
+ _: 2
777
+ }, 1032, ["onClick"])),
778
+ a.onlineFormDisabled ? $("", !0) : (C(), q(B, {
779
+ key: 1,
780
+ type: "primary",
781
+ onClick: (d) => a.openSubFormModalForEdit(s)
782
+ }, {
783
+ default: A(() => [
784
+ k(H)
785
+ ]),
786
+ _: 2
787
+ }, 1032, ["onClick"]))
788
+ ]),
789
+ _: 2
790
+ }, 1032, ["row-number", "height", "disabled", "columns", "dataSource", "onValueChange", "onRemoved", "authPre", "onAdded", "onExecuteFillRule"])
791
+ ]))
792
+ ]),
793
+ _: 2
794
+ }, 1032, ["tab"]))), 128)) : $("", !0)
795
+ ]),
796
+ _: 1
797
+ }, 8, ["activeKey"]),
798
+ k(W, {
799
+ loading: a.loading,
800
+ absolute: !1
801
+ }, null, 8, ["loading"]),
802
+ Bt(i.$slots, "bottom", {}, void 0, !0),
803
+ k(D, {
804
+ formTableType: "3",
805
+ request: a.popModalRequest,
806
+ id: a.popTableName,
807
+ onRegister: a.registerPopModal,
808
+ onSuccess: a.getPopFormData,
809
+ topTip: "",
810
+ isVxeTableData: ""
811
+ }, null, 8, ["request", "id", "onRegister", "onSuccess"])
812
+ ], 10, mo);
813
+ }
814
+ const nl = /* @__PURE__ */ uo(co, [["render", bo], ["__scopeId", "data-v-dec72f46"]]);
815
+ export {
816
+ nl as default
817
+ };