@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,611 @@
1
+ var Ue = Object.defineProperty, Ve = Object.defineProperties;
2
+ var He = Object.getOwnPropertyDescriptors;
3
+ var ae = Object.getOwnPropertySymbols;
4
+ var Ge = Object.prototype.hasOwnProperty, Ye = Object.prototype.propertyIsEnumerable;
5
+ var te = (a, n, c) => n in a ? Ue(a, n, { enumerable: !0, configurable: !0, writable: !0, value: c }) : a[n] = c, E = (a, n) => {
6
+ for (var c in n || (n = {}))
7
+ Ge.call(n, c) && te(a, c, n[c]);
8
+ if (ae)
9
+ for (var c of ae(n))
10
+ Ye.call(n, c) && te(a, c, n[c]);
11
+ return a;
12
+ }, le = (a, n) => Ve(a, He(n));
13
+ var F = (a, n, c) => new Promise((B, h) => {
14
+ var m = (p) => {
15
+ try {
16
+ C(c.next(p));
17
+ } catch (T) {
18
+ h(T);
19
+ }
20
+ }, D = (p) => {
21
+ try {
22
+ C(c.throw(p));
23
+ } catch (T) {
24
+ h(T);
25
+ }
26
+ }, C = (p) => p.done ? B(p.value) : Promise.resolve(p.value).then(m, D);
27
+ C((c = c.apply(a, n)).next());
28
+ });
29
+ import { defineComponent as ze, ref as y, computed as ne, provide as oe, reactive as We, nextTick as G, toRaw as Xe, resolveComponent as b, openBlock as A, createBlock as Y, mergeProps as Ze, withCtx as d, createVNode as s, createTextVNode as R, createElementBlock as ie, Fragment as ea, renderList as aa, toDisplayString as ta, createCommentVNode as se, createElementVNode as re } from "vue";
30
+ import { Icon as la } from "/@/components/Icon";
31
+ import { BasicModal as na, useModalInner as oa, useModal as ia } from "/@/components/Modal";
32
+ import { BasicForm as sa, useForm as ra } from "/@/components/Form/index";
33
+ import { useMessage as ua } from "/@/hooks/web/useMessage";
34
+ import { u as da } from "./useSchemas-43429d80.mjs";
35
+ import ca from "./DBAttributeTable-7d285e8d.mjs";
36
+ import fa from "./PageAttributeTable-5966b201.mjs";
37
+ import ba from "./CheckDictTable-3a8a54b3.mjs";
38
+ import ma from "./ForeignKeyTable-faab7ccf.mjs";
39
+ import pa from "./IndexTable-0a2d3718.mjs";
40
+ import Ta from "./QueryTable-6e8053ad.mjs";
41
+ import ga from "./ExtendConfigModal-8f08466f.mjs";
42
+ import { u as ya, E as va, a as ha, V as O } from "./cgform.data-cbdd88c3.mjs";
43
+ import { defHttp as v } from "/@/utils/http/axios";
44
+ import { simpleDebounce as Ca } from "/@/utils/common/compUtils";
45
+ import { u as Fa } from "./useOnlineTest-e4bd8be3.mjs";
46
+ import { buildUUID as Da } from "/@/utils/uuid";
47
+ import { sleep as P } from "/@/utils";
48
+ import { g as ka } from "./useExtendComponent-aa1cdfc8.mjs";
49
+ import { _ as Ra } from "./index-b70302f2.mjs";
50
+ const et = (a) => v.get({ url: "/online/cgform/head/list", params: a }), at = (a) => ue(a, 0), tt = (a) => v.delete(
51
+ { url: "/online/cgform/head/removeRecord", params: { id: a } },
52
+ { joinParamsToUrl: !0 }
53
+ ), lt = (a) => ue(a, 1), nt = (a) => v.delete(
54
+ { url: "/online/cgform/head/delete", params: { id: a } },
55
+ { joinParamsToUrl: !0 }
56
+ );
57
+ function ue(a, n) {
58
+ return v.delete(
59
+ {
60
+ url: "/online/cgform/head/deleteBatch",
61
+ params: {
62
+ ids: a.join(","),
63
+ flag: n
64
+ }
65
+ },
66
+ { joinParamsToUrl: !0 }
67
+ );
68
+ }
69
+ const ot = (a, n) => v.post({ url: `/online/cgform/api/doDbSynch/${a}/${n}`, timeout: 12e3, timeoutErrorMessage: "同步数据库超时,已自动刷新" }), it = (a) => v.post({ url: `/online/cgform/head/copyOnline?code=${a}` }), st = (a, n, c) => v.get({ url: `/online/cgform/head/copyOnlineTable/${a}`, params: E({ tableName: n }, c) }), L = {
70
+ // 查询表字段 e3e3NcxzbUiGa53YYVXxWc8ADo5ISgQGx/gaZwERF91oAryDlivjqBv3wqRArgChupi+Y/Gg/swwGEyL0PuVFg==
71
+ doQueryField: (a, n) => v.get({ url: "/online/cgform/field/listByHeadId", params: E({ headId: a }, n) }),
72
+ // 查询表index配置
73
+ doQueryIndexes: (a, n) => v.get({ url: "/online/cgform/index/listByHeadId", params: E({ headId: a }, n) }),
74
+ // 新增或修改
75
+ doSaveOrUpdate: (a, n) => n ? v.put({ url: "/online/cgform/api/editAll", params: a }) : v.post({ url: "/online/cgform/api/addAll", params: a }),
76
+ //只是修改表配置不改字段
77
+ editHead: (a) => v.put({ url: "/online/cgform/head/edit", params: a })
78
+ }, wa = ze({
79
+ name: "CgformModal",
80
+ components: {
81
+ BasicModal: na,
82
+ BasicForm: sa,
83
+ DBAttributeTable: ca,
84
+ PageAttributeTable: fa,
85
+ CheckDictTable: ba,
86
+ ForeignKeyTable: ma,
87
+ IndexTable: pa,
88
+ QueryTable: Ta,
89
+ ExtendConfigModal: ga,
90
+ Icon: la
91
+ },
92
+ emits: ["success", "register"],
93
+ props: {
94
+ actionButton: {
95
+ type: Boolean,
96
+ default: !0,
97
+ required: !1
98
+ }
99
+ },
100
+ setup(a, { emit: n }) {
101
+ const { createMessage: c } = ua(), B = y(), h = y(!1);
102
+ let m = {};
103
+ const D = ne(() => h.value ? "编辑" : "新增"), C = y(!0), p = y(!1), T = y("dbTable"), _ = y(!0), u = {
104
+ dbTable: y(),
105
+ pageTable: y(),
106
+ checkTable: y(),
107
+ fkTable: y(),
108
+ idxTable: y(),
109
+ queryTable: y()
110
+ }, $ = ne(() => {
111
+ var e, t;
112
+ return (t = (e = B.value) == null ? void 0 : e.fullScreenRef) != null ? t : !1;
113
+ });
114
+ oe("tables", u), oe("fullScreenRef", $);
115
+ const N = { value: {} }, { formSchemas: Q } = da(a, N, {
116
+ onTableTypeChange: Fe,
117
+ onIsTreeChange: De,
118
+ ifShowOfSubTableStr: () => W
119
+ }), [x, w] = ra({
120
+ schemas: Q,
121
+ showActionButtonGroup: !1,
122
+ labelAlign: "right"
123
+ }), { resetFields: J, setFieldsValue: I, validate: K } = w, [q, { closeModal: U }] = oa((e) => {
124
+ var t;
125
+ h.value = (t = e == null ? void 0 : e.isUpdate) != null ? t : !1, h.value ? X(e == null ? void 0 : e.record) : Te();
126
+ }), M = y("");
127
+ let f = We({});
128
+ const V = Ca(() => ke(), 150);
129
+ let z = [], W = !1, j = !1, k = [];
130
+ const { aiTestMode: de, aiTestTable: ce, aiTableList: fe, initVirtualData: be, tableJsonGetHelper: me, refreshCacheTableName: pe } = Fa();
131
+ function Te() {
132
+ X({});
133
+ }
134
+ function X(e) {
135
+ return F(this, null, function* () {
136
+ var t;
137
+ if (C.value = !1, T.value = "dbTable", yield J(), m = Object.assign({}, e), he(m), me(m), ve(m), I(m), M.value = m.tableName, P(1, () => _.value = !1), h.value)
138
+ (t = u.dbTable.value) == null || t.setDataSource([]), yield ge(m.id), yield ye(m.id), ka(u.pageTable).then(() => {
139
+ u.pageTable.value.changePageType(m.tableType == 3);
140
+ });
141
+ else {
142
+ let { initialData: l, tempIds: o } = ya();
143
+ yield Z(l, !0), z = o;
144
+ }
145
+ });
146
+ }
147
+ function ge(e) {
148
+ return F(this, null, function* () {
149
+ p.value = !0;
150
+ try {
151
+ let t = yield L.doQueryField(e);
152
+ p.value = !1, yield Z(t);
153
+ } finally {
154
+ p.value = !1;
155
+ }
156
+ });
157
+ }
158
+ function ye(e) {
159
+ return F(this, null, function* () {
160
+ let t = yield L.doQueryIndexes(e);
161
+ u.idxTable.value.setDataSource(t);
162
+ });
163
+ }
164
+ function ve(e) {
165
+ let t = {};
166
+ if (e.extConfigJson)
167
+ try {
168
+ t = JSON.parse(e.extConfigJson);
169
+ } catch (l) {
170
+ }
171
+ f = Object.assign({}, va, t, {
172
+ isDesForm: e.isDesForm || "N",
173
+ desFormCode: e.desFormCode || ""
174
+ });
175
+ }
176
+ function he(e) {
177
+ j = e.isTree == "Y", W = e.tableType === 2;
178
+ }
179
+ function Z(e, t) {
180
+ return F(this, null, function* () {
181
+ const { dbTable: l, pageTable: o, checkTable: r, fkTable: i, queryTable: g } = u;
182
+ l.value || (yield G(), yield P(1)), l.value.setDataSource(e, t), setTimeout(() => {
183
+ o.value.setDataSource(e, t), r.value.setDataSource(e, t), i.value.setDataSource(e, t), g.value.setDataSource(e, t);
184
+ }, 10);
185
+ });
186
+ }
187
+ function Ce(e) {
188
+ if (["pageTable", "checkTable", "fkTable", "idxTable", "queryTable"].indexOf(e) !== -1) {
189
+ const t = u.dbTable, l = u[e];
190
+ t.value.tableRef.resetScrollTop(), l.value.syncTable(t);
191
+ }
192
+ }
193
+ function Fe(e) {
194
+ e === 1 && I({ themeTemplate: "normal" }), u.pageTable.value.changePageType(e == 3);
195
+ }
196
+ function De(e) {
197
+ e === "Y" ? Ae() : Oe();
198
+ }
199
+ function H() {
200
+ V();
201
+ }
202
+ function ke() {
203
+ return F(this, null, function* () {
204
+ let { dbTable: e, pageTable: t, checkTable: l, fkTable: o, queryTable: r } = u;
205
+ yield t.value.syncTable(e), yield l.value.syncTable(e), yield o.value.syncTable(e), yield r.value.syncTable(e);
206
+ });
207
+ }
208
+ function Re() {
209
+ H();
210
+ }
211
+ function we() {
212
+ H();
213
+ }
214
+ function Be(e) {
215
+ let { oldIndex: t, newIndex: l } = e;
216
+ Ie(t, l);
217
+ }
218
+ function _e(e) {
219
+ return F(this, null, function* () {
220
+ let { insertIndex: t, row: l } = e, { pageTable: o, checkTable: r, fkTable: i, queryTable: g } = u;
221
+ o.value.tableRef.insertRows(l, t), r.value.tableRef.insertRows(l, t), i.value.tableRef.insertRows(l, t), g.value.tableRef.insertRows(l, t);
222
+ });
223
+ }
224
+ function Ie(e, t) {
225
+ let { pageTable: l, checkTable: o, fkTable: r, queryTable: i } = u;
226
+ l.value.tableRef.rowResort(e, t), o.value.tableRef.rowResort(e, t), r.value.tableRef.rowResort(e, t), i.value.tableRef.rowResort(e, t);
227
+ }
228
+ function Se(e) {
229
+ u.pageTable.value.syncFieldShowType(e.row);
230
+ }
231
+ function Ee(e) {
232
+ u.pageTable.value.enableQuery(e);
233
+ }
234
+ function Ae() {
235
+ if (!j) {
236
+ let { dbTable: e, pageTable: t, checkTable: l } = u, o = ha();
237
+ o = o.filter((r) => !e.value.tableRef.getTableData().map((g) => g.dbFieldName).includes(r.dbFieldName)), k = [], o.forEach((r) => {
238
+ let i = Da() + "__tempId";
239
+ k.push(i), r.id = i;
240
+ }), e.value.tableRef.addRows(o, { setActive: !1 }), t.value.tableRef.addRows(o, { setActive: !1 }), l.value.tableRef.addRows(o, { setActive: !1 }), G(() => H()), j = !0;
241
+ }
242
+ G(() => {
243
+ w.setFieldsValue({
244
+ treeIdField: "has_child",
245
+ treeParentIdField: "pid"
246
+ });
247
+ });
248
+ }
249
+ function Oe() {
250
+ if (k && k.length > 0) {
251
+ let { dbTable: e } = u;
252
+ e.value.tableDeleteLines(k), k = [], j = !1;
253
+ }
254
+ }
255
+ function Ne() {
256
+ let e = {};
257
+ return new Promise((t, l) => {
258
+ K().then(
259
+ (o) => t({ values: o }),
260
+ () => l(O)
261
+ );
262
+ }).then((t) => (Object.assign(e, t), Me())).then((t) => {
263
+ Object.assign(e, t);
264
+ let l = je(e);
265
+ return Pe(l);
266
+ }).catch((t) => ((t === O || (t == null ? void 0 : t.code) === O) && c.warning("校验未通过"), Promise.reject(null)));
267
+ }
268
+ function Me() {
269
+ return new Promise((e, t) => F(this, null, function* () {
270
+ let l = Object.keys(u), o = {};
271
+ for (let r = 0; r < l.length; r++) {
272
+ let i = l[r], g = u[i];
273
+ try {
274
+ o[i] = yield g.value.validateData(i);
275
+ } catch (S) {
276
+ S.code === O && (T.value = S.activeKey), t(S);
277
+ return;
278
+ }
279
+ }
280
+ e(o);
281
+ }));
282
+ }
283
+ function je(e) {
284
+ let t = {
285
+ head: {},
286
+ fields: [],
287
+ indexs: [],
288
+ deleteFieldIds: [],
289
+ deleteIndexIds: []
290
+ };
291
+ return t.head = Object.assign(m, e.values), t.head.isDesForm = f.isDesForm, t.head.desFormCode = f.desFormCode, delete f.isDesForm, delete f.desFormCode, t.head.extConfigJson = JSON.stringify(f), e.dbTable.tableData.forEach((l, o) => {
292
+ let r = l.id, i = Object.assign({}, l), g = e.pageTable.tableData[o];
293
+ i = Object.assign(g, i);
294
+ let S = e.checkTable.tableData[o];
295
+ i = Object.assign(S, i);
296
+ let Ke = e.fkTable.tableData[o];
297
+ i = Object.assign(Ke, i);
298
+ let qe = e.queryTable.tableData[o];
299
+ i = Object.assign(qe, i), r == null || r === "" ? delete i.id : i.id = r, [].concat(z, k).includes(i.id) && delete i.id, t.fields.push(i);
300
+ }), t.deleteFieldIds = e.dbTable.deleteIds, t.indexs = e.idxTable.tableData, t.deleteIndexIds = e.idxTable.deleteIds, t;
301
+ }
302
+ function Pe(e) {
303
+ return new Promise((t, l) => {
304
+ let o = e.fields, r = !0;
305
+ if (o && o.length > 0) {
306
+ let i = 0;
307
+ for (let g = 0; g < o.length; g++)
308
+ if ((o[g].mainField || o[g].mainTable) && (i += 1), i > 1) {
309
+ r = !1;
310
+ break;
311
+ }
312
+ }
313
+ r ? t(e) : l({
314
+ code: -1,
315
+ msg: "外键只允许配置一个!",
316
+ error: O
317
+ });
318
+ });
319
+ }
320
+ function Le() {
321
+ C.value = !0, Ne().then(
322
+ (e) => F(this, null, function* () {
323
+ var t;
324
+ if (e.fields && e.fields.length > 0)
325
+ for (let l of e.fields)
326
+ l.dbFieldName = l.dbFieldName.toLowerCase().trim();
327
+ (t = e.head) != null && t.tableName && (e.head.tableName = e.head.tableName.toLowerCase().trim()), yield L.doSaveOrUpdate(e, h.value), pe(M.value, e.head.tableName), n("success"), P(1, () => ee());
328
+ }),
329
+ (e) => {
330
+ }
331
+ ).finally(() => {
332
+ C.value = !1;
333
+ });
334
+ }
335
+ const [$e, Qe] = ia();
336
+ function xe(e) {
337
+ return F(this, null, function* () {
338
+ if (N.value = e, e.joinQuery == 0 && w.validateFields(["themeTemplate"]), f = e, h.value == !0) {
339
+ let t = Xe(f);
340
+ const l = {
341
+ id: m.id,
342
+ extConfigJson: JSON.stringify(t)
343
+ };
344
+ yield L.editHead(l), n("success");
345
+ }
346
+ });
347
+ }
348
+ function Je() {
349
+ Qe.openModal(!0, {
350
+ extConfigJson: f
351
+ });
352
+ }
353
+ function ee() {
354
+ _.value = !0, P(1, () => U());
355
+ }
356
+ return le(E({}, u), {
357
+ modalRef: B,
358
+ title: D,
359
+ confirmLoading: C,
360
+ tableLoading: p,
361
+ activeKey: T,
362
+ onCancel: ee,
363
+ extConfigJson: f,
364
+ formAction: w,
365
+ hideTabs: _,
366
+ onSubmit: Le,
367
+ onTabsChange: Ce,
368
+ onTableAdded: Re,
369
+ onTableRemoved: we,
370
+ onTableDragged: Be,
371
+ onTableInserted: _e,
372
+ onTableSyncDbType: Se,
373
+ onTableQuery: Ee,
374
+ onOpenExtConfig: Je,
375
+ onExtConfigOk: xe,
376
+ registerForm: x,
377
+ registerModal: q,
378
+ registerExtendConfigModal: $e,
379
+ // hook OnlineTest
380
+ aiTestMode: de,
381
+ aiTestTable: ce,
382
+ aiTableList: fe,
383
+ initVirtualData: be
384
+ });
385
+ }
386
+ }), Ba = { style: { flex: "1", "text-align": "right" } }, _a = {
387
+ key: 0,
388
+ style: { display: "inline-block", "text-align": "left", position: "absolute", left: "0" }
389
+ };
390
+ function Ia(a, n, c, B, h, m) {
391
+ const D = b("a-button"), C = b("BasicForm"), p = b("DBAttributeTable"), T = b("a-tab-pane"), _ = b("PageAttributeTable"), u = b("CheckDictTable"), $ = b("ForeignKeyTable"), N = b("IndexTable"), Q = b("Icon"), x = b("a-tooltip"), w = b("QueryTable"), J = b("a-tabs"), I = b("a-spin"), K = b("a-select-option"), q = b("a-select"), U = b("ExtendConfigModal"), M = b("BasicModal");
392
+ return A(), Y(M, Ze({
393
+ ref: "modalRef",
394
+ title: a.title,
395
+ width: 1200,
396
+ maskClosable: !1,
397
+ defaultFullscreen: !0,
398
+ confirmLoading: a.confirmLoading
399
+ }, a.$attrs, {
400
+ onCancel: a.onCancel,
401
+ onRegister: a.registerModal
402
+ }), {
403
+ footer: d(() => [
404
+ s(D, { onClick: a.onCancel }, {
405
+ default: d(() => [
406
+ R("关闭")
407
+ ]),
408
+ _: 1
409
+ }, 8, ["onClick"]),
410
+ s(D, {
411
+ type: "primary",
412
+ loading: a.confirmLoading,
413
+ preIcon: "ant-design:save",
414
+ onClick: a.onSubmit
415
+ }, {
416
+ default: d(() => [
417
+ R("保存")
418
+ ]),
419
+ _: 1
420
+ }, 8, ["loading", "onClick"]),
421
+ a.aiTestMode ? (A(), ie("div", _a, [
422
+ s(q, {
423
+ value: a.aiTestTable,
424
+ "onUpdate:value": n[1] || (n[1] = (f) => a.aiTestTable = f),
425
+ placeholder: "请选择测试的表类型",
426
+ getPopupContainer: (f) => f.parentElement,
427
+ style: { width: "250px", margin: "0 10px 0 20px" }
428
+ }, {
429
+ default: d(() => [
430
+ (A(!0), ie(ea, null, aa(a.aiTableList, (f, V) => (A(), Y(K, {
431
+ key: V,
432
+ value: f.name
433
+ }, {
434
+ default: d(() => [
435
+ R(ta(f.title + "(" + f.name + ")"), 1)
436
+ ]),
437
+ _: 2
438
+ }, 1032, ["value"]))), 128))
439
+ ]),
440
+ _: 1
441
+ }, 8, ["value", "getPopupContainer"]),
442
+ s(D, {
443
+ type: "primary",
444
+ ghost: "",
445
+ onClick: a.initVirtualData
446
+ }, {
447
+ default: d(() => [
448
+ R("生成数据>>")
449
+ ]),
450
+ _: 1
451
+ }, 8, ["onClick"])
452
+ ])) : se("", !0)
453
+ ]),
454
+ default: d(() => [
455
+ s(I, {
456
+ wrapperClassName: "p-2",
457
+ spinning: a.confirmLoading
458
+ }, {
459
+ default: d(() => [
460
+ s(C, { onRegister: a.registerForm }, {
461
+ extConfigButton: d(() => [
462
+ re("div", Ba, [
463
+ s(D, {
464
+ preIcon: "ant-design:setting",
465
+ onClick: a.onOpenExtConfig
466
+ }, {
467
+ default: d(() => [
468
+ R("扩展配置")
469
+ ]),
470
+ _: 1
471
+ }, 8, ["onClick"])
472
+ ])
473
+ ]),
474
+ _: 1
475
+ }, 8, ["onRegister"]),
476
+ s(I, {
477
+ spinning: a.tableLoading || a.hideTabs
478
+ }, {
479
+ default: d(() => [
480
+ a.hideTabs ? se("", !0) : (A(), Y(J, {
481
+ key: 0,
482
+ activeKey: a.activeKey,
483
+ "onUpdate:activeKey": n[0] || (n[0] = (f) => a.activeKey = f),
484
+ animated: "",
485
+ onChange: a.onTabsChange
486
+ }, {
487
+ default: d(() => [
488
+ s(T, {
489
+ tab: "数据库属性",
490
+ key: "dbTable",
491
+ forceRender: ""
492
+ }, {
493
+ default: d(() => [
494
+ s(p, {
495
+ ref: "dbTable",
496
+ actionButton: a.actionButton,
497
+ onAdded: a.onTableAdded,
498
+ onRemoved: a.onTableRemoved,
499
+ onDragged: a.onTableDragged,
500
+ onInserted: a.onTableInserted,
501
+ onSyncDbType: a.onTableSyncDbType
502
+ }, null, 8, ["actionButton", "onAdded", "onRemoved", "onDragged", "onInserted", "onSyncDbType"])
503
+ ]),
504
+ _: 1
505
+ }),
506
+ s(T, {
507
+ tab: "页面属性",
508
+ key: "pageTable",
509
+ forceRender: ""
510
+ }, {
511
+ default: d(() => [
512
+ s(_, { ref: "pageTable" }, null, 512)
513
+ ]),
514
+ _: 1
515
+ }),
516
+ s(T, {
517
+ tab: "校验字段",
518
+ key: "checkTable",
519
+ forceRender: ""
520
+ }, {
521
+ default: d(() => [
522
+ s(u, { ref: "checkTable" }, null, 512)
523
+ ]),
524
+ _: 1
525
+ }),
526
+ s(T, {
527
+ tab: "外键",
528
+ key: "fkTable",
529
+ forceRender: ""
530
+ }, {
531
+ default: d(() => [
532
+ s($, {
533
+ ref: "fkTable",
534
+ actionButton: a.actionButton
535
+ }, null, 8, ["actionButton"])
536
+ ]),
537
+ _: 1
538
+ }),
539
+ s(T, {
540
+ tab: "索引",
541
+ key: "idxTable",
542
+ forceRender: ""
543
+ }, {
544
+ default: d(() => [
545
+ s(N, {
546
+ ref: "idxTable",
547
+ actionButton: a.actionButton
548
+ }, null, 8, ["actionButton"])
549
+ ]),
550
+ _: 1
551
+ }),
552
+ s(T, {
553
+ key: "queryTable",
554
+ forceRender: ""
555
+ }, {
556
+ tab: d(() => [
557
+ re("span", null, [
558
+ R(" 个性查询配置 "),
559
+ s(x, null, {
560
+ title: d(() => [
561
+ R("允许自定义,查询表单字段控件类型!")
562
+ ]),
563
+ default: d(() => [
564
+ s(Q, { icon: "bx:help-circle" })
565
+ ]),
566
+ _: 1
567
+ })
568
+ ])
569
+ ]),
570
+ default: d(() => [
571
+ s(w, {
572
+ ref: "queryTable",
573
+ onQuery: a.onTableQuery
574
+ }, null, 8, ["onQuery"])
575
+ ]),
576
+ _: 1
577
+ })
578
+ ]),
579
+ _: 1
580
+ }, 8, ["activeKey", "onChange"]))
581
+ ]),
582
+ _: 1
583
+ }, 8, ["spinning"])
584
+ ]),
585
+ _: 1
586
+ }, 8, ["spinning"]),
587
+ s(U, {
588
+ onRegister: a.registerExtendConfigModal,
589
+ parentForm: a.formAction,
590
+ onOk: a.onExtConfigOk
591
+ }, null, 8, ["onRegister", "parentForm", "onOk"])
592
+ ]),
593
+ _: 1
594
+ }, 16, ["title", "confirmLoading", "onCancel", "onRegister"]);
595
+ }
596
+ const Sa = /* @__PURE__ */ Ra(wa, [["render", Ia]]), rt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
597
+ __proto__: null,
598
+ default: Sa
599
+ }, Symbol.toStringTag, { value: "Module" }));
600
+ export {
601
+ Sa as C,
602
+ nt as a,
603
+ tt as b,
604
+ at as c,
605
+ it as d,
606
+ lt as e,
607
+ ot as f,
608
+ st as g,
609
+ rt as h,
610
+ et as l
611
+ };
@@ -0,0 +1,13 @@
1
+ import { _ as o } from "./CgreportModal.vue_vue_type_script_setup_true_lang-c2ceb064.mjs";
2
+ import "vue";
3
+ import "/@/components/Modal";
4
+ import "/@/components/Form/index";
5
+ import "/@/hooks/system/useJvxeMethods.ts";
6
+ import "/@/components/jeecg/JVxeTable/types";
7
+ import "/@/views/system/user/user.api";
8
+ import "/@/utils/http/axios";
9
+ import "/@/hooks/web/useMessage";
10
+ import "/@/store/modules/permission";
11
+ export {
12
+ o as default
13
+ };