@jeecg/online 3.5.3-beta2 → 3.5.3-vite4

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