@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,473 @@
1
+ var Y = Object.defineProperty, $ = Object.defineProperties;
2
+ var k = Object.getOwnPropertyDescriptors;
3
+ var D = Object.getOwnPropertySymbols;
4
+ var x = Object.prototype.hasOwnProperty, K = Object.prototype.propertyIsEnumerable;
5
+ var c = (e, t, d) => t in e ? Y(e, t, { enumerable: !0, configurable: !0, writable: !0, value: d }) : e[t] = d, L = (e, t) => {
6
+ for (var d in t || (t = {}))
7
+ x.call(t, d) && c(e, d, t[d]);
8
+ if (D)
9
+ for (var d of D(t))
10
+ K.call(t, d) && c(e, d, t[d]);
11
+ return e;
12
+ }, O = (e, t) => $(e, k(t));
13
+ import { defineComponent as W, getCurrentInstance as X, ref as b, resolveComponent as Q, openBlock as q, createBlock as J, mergeProps as Z } from "vue";
14
+ import { JVxeTypes as i } from "/@/components/jeecg/JVxeTable/types";
15
+ import { u as z } from "./useTableSync-dc333087.mjs";
16
+ import { _ as j } from "./index-6a09a912.mjs";
17
+ import "./cgform.data-cbdd88c3.mjs";
18
+ import "/@/utils/dict";
19
+ import "/@/utils/dict/JDictSelectUtil";
20
+ import "/@/utils/uuid";
21
+ import "lodash-es";
22
+ import "/@/components/jeecg/OnLine/JPopupOnlReport.vue";
23
+ import "/@/hooks/web/useMessage";
24
+ import "vue-router";
25
+ const ee = [
26
+ "ADD",
27
+ "ALL",
28
+ "ALTER",
29
+ "ANALYZE",
30
+ "AND",
31
+ "AS",
32
+ "ASC",
33
+ "ASENSITIVE",
34
+ "BEFORE",
35
+ "BETWEEN",
36
+ "BIGINT",
37
+ "BINARY",
38
+ "BLOB",
39
+ "BOTH",
40
+ "BY",
41
+ "CALL",
42
+ "CASCADE",
43
+ "CASE",
44
+ "CHANGE",
45
+ "CHAR",
46
+ "CHARACTER",
47
+ "CHECK",
48
+ "COLLATE",
49
+ "COLUMN",
50
+ "CONDITION",
51
+ "CONNECTION",
52
+ "CONSTRAINT",
53
+ "CONTINUE",
54
+ "CONVERT",
55
+ "CREATE",
56
+ "CROSS",
57
+ "CURRENT_DATE",
58
+ "CURRENT_TIME",
59
+ "CURRENT_TIMESTAMP",
60
+ "CURRENT_USER",
61
+ "CURSOR",
62
+ "DATABASE",
63
+ "DATABASES",
64
+ "DAY_HOUR",
65
+ "DAY_MICROSECOND",
66
+ "DAY_MINUTE",
67
+ "DAY_SECOND",
68
+ "DEC",
69
+ "DECIMAL",
70
+ "DECLARE",
71
+ "DEFAULT",
72
+ "DELAYED",
73
+ "DELETE",
74
+ "DESC",
75
+ "DESCRIBE",
76
+ "DETERMINISTIC",
77
+ "DISTINCT",
78
+ "DISTINCTROW",
79
+ "DIV",
80
+ "DOUBLE",
81
+ "DROP",
82
+ "DUAL",
83
+ "EACH",
84
+ "ELSE",
85
+ "ELSEIF",
86
+ "ENCLOSED",
87
+ "ESCAPED",
88
+ "EXISTS",
89
+ "EXIT",
90
+ "EXPLAIN",
91
+ "FALSE",
92
+ "FETCH",
93
+ "FLOAT",
94
+ "FLOAT4",
95
+ "FLOAT8",
96
+ "FOR",
97
+ "FORCE",
98
+ "FOREIGN",
99
+ "FROM",
100
+ "FULLTEXT",
101
+ "GOTO",
102
+ "GRANT",
103
+ "GROUP",
104
+ "HAVING",
105
+ "HIGH_PRIORITY",
106
+ "HOUR_MICROSECOND",
107
+ "HOUR_MINUTE",
108
+ "HOUR_SECOND",
109
+ "IF",
110
+ "IGNORE",
111
+ "IN",
112
+ "INDEX",
113
+ "INFILE",
114
+ "INNER",
115
+ "INOUT",
116
+ "INSENSITIVE",
117
+ "INSERT",
118
+ "INT",
119
+ "INT1",
120
+ "INT2",
121
+ "INT3",
122
+ "INT4",
123
+ "INT8",
124
+ "INTEGER",
125
+ "INTERVAL",
126
+ "INTO",
127
+ "IS",
128
+ "ITERATE",
129
+ "JOIN",
130
+ "KEY",
131
+ "KEYS",
132
+ "KILL",
133
+ "LABEL",
134
+ "LEADING",
135
+ "LEAVE",
136
+ "LEFT",
137
+ "LIKE",
138
+ "LIMIT",
139
+ "LINEAR",
140
+ "LINES",
141
+ "LOAD",
142
+ "LOCALTIME",
143
+ "LOCALTIMESTAMP",
144
+ "LOCK",
145
+ "LONG",
146
+ "LONGBLOB",
147
+ "LONGTEXT",
148
+ "LOOP",
149
+ "LOW_PRIORITY",
150
+ "MATCH",
151
+ "MEDIUMBLOB",
152
+ "MEDIUMINT",
153
+ "MEDIUMTEXT",
154
+ "MIDDLEINT",
155
+ "MINUTE_MICROSECOND",
156
+ "MINUTE_SECOND",
157
+ "MOD",
158
+ "MODIFIES",
159
+ "NATURAL",
160
+ "NOT",
161
+ "NO_WRITE_TO_BINLOG",
162
+ "NULL",
163
+ "NUMERIC",
164
+ "ON",
165
+ "OPTIMIZE",
166
+ "OPTION",
167
+ "OPTIONALLY",
168
+ "OR",
169
+ "ORDER",
170
+ "OUT",
171
+ "OUTER",
172
+ "OUTFILE",
173
+ "PRECISION",
174
+ "PRIMARY",
175
+ "PROCEDURE",
176
+ "PURGE",
177
+ "RAID0",
178
+ "RANGE",
179
+ "READ",
180
+ "READS",
181
+ "REAL",
182
+ "REFERENCES",
183
+ "REGEXP",
184
+ "RELEASE",
185
+ "RENAME",
186
+ "REPEAT",
187
+ "REPLACE",
188
+ "REQUIRE",
189
+ "RESTRICT",
190
+ "RETURN",
191
+ "REVOKE",
192
+ "RIGHT",
193
+ "RLIKE",
194
+ "SCHEMA",
195
+ "SCHEMAS",
196
+ "SECOND_MICROSECOND",
197
+ "SELECT",
198
+ "SENSITIVE",
199
+ "SEPARATOR",
200
+ "SET",
201
+ "SHOW",
202
+ "SMALLINT",
203
+ "SPATIAL",
204
+ "SPECIFIC",
205
+ "SQL",
206
+ "SQLEXCEPTION",
207
+ "SQLSTATE",
208
+ "SQLWARNING",
209
+ "SQL_BIG_RESULT",
210
+ "SQL_CALC_FOUND_ROWS",
211
+ "SQL_SMALL_RESULT",
212
+ "SSL",
213
+ "STARTING",
214
+ "STRAIGHT_JOIN",
215
+ "TABLE",
216
+ "TERMINATED",
217
+ "THEN",
218
+ "TINYBLOB",
219
+ "TINYINT",
220
+ "TINYTEXT",
221
+ "TO",
222
+ "TRAILING",
223
+ "TRIGGER",
224
+ "TRUE",
225
+ "UNDO",
226
+ "UNION",
227
+ "UNIQUE",
228
+ "UNLOCK",
229
+ "UNSIGNED",
230
+ "UPDATE",
231
+ "USAGE",
232
+ "USE",
233
+ "USING",
234
+ "UTC_DATE",
235
+ "UTC_TIME",
236
+ "UTC_TIMESTAMP",
237
+ "VALUES",
238
+ "VARBINARY",
239
+ "VARCHAR",
240
+ "VARCHARACTER",
241
+ "VARYING",
242
+ "WHEN",
243
+ "WHERE",
244
+ "WHILE",
245
+ "WITH",
246
+ "WRITE",
247
+ "X509",
248
+ "XOR",
249
+ "YEAR_MONTH",
250
+ "ZEROFILL"
251
+ ], te = W({
252
+ name: "DBAttributeTable",
253
+ props: {
254
+ actionButton: { type: Boolean, default: !0 }
255
+ },
256
+ emits: ["added", "removed", "inserted", "dragged", "syncDbType"],
257
+ setup(e, { emit: t }) {
258
+ const d = X(), T = b(!1), R = b([
259
+ {
260
+ title: "字段名称",
261
+ key: "dbFieldName",
262
+ width: 140,
263
+ type: i.input,
264
+ defaultValue: "",
265
+ placeholder: "请输入${title}",
266
+ validateRules: [
267
+ { required: !0, message: "${title}不能为空" },
268
+ {
269
+ pattern: /^[a-zA-Z]{1}(?!_)[a-zA-Z0-9_\\$]+$/,
270
+ message: "命名规则:只能由字母、数字、下划线、$符号组成;必须以字母开头;不能以单个字母加下滑线开头"
271
+ },
272
+ { unique: !0, message: "${title}不能重复" },
273
+ {
274
+ handler({ cellValue: a }, n) {
275
+ ee.includes(a.toUpperCase()) ? n(!1, a + "是关键字,不能作为字段名称使用!") : n(!0);
276
+ }
277
+ },
278
+ { handler: S }
279
+ ],
280
+ disabled: !e.actionButton
281
+ },
282
+ {
283
+ title: "字段备注",
284
+ key: "dbFieldTxt",
285
+ width: 140,
286
+ type: i.input,
287
+ defaultValue: "",
288
+ placeholder: "请输入${title}",
289
+ validateRules: [{ required: !0, message: "${title}不能为空" }]
290
+ },
291
+ {
292
+ title: "字段长度",
293
+ key: "dbLength",
294
+ width: 120,
295
+ type: i.inputNumber,
296
+ defaultValue: 32,
297
+ placeholder: "请输入${title}",
298
+ validateRules: [{ required: !0, message: "${title}不能为空" }],
299
+ disabled: !e.actionButton
300
+ },
301
+ {
302
+ title: "小数点",
303
+ key: "dbPointLength",
304
+ width: 100,
305
+ type: i.inputNumber,
306
+ defaultValue: 0,
307
+ placeholder: "请输入${title}",
308
+ validateRules: [{ required: !0, message: "${title}不能为空" }],
309
+ disabled: !e.actionButton
310
+ },
311
+ {
312
+ title: "默认值",
313
+ key: "dbDefaultVal",
314
+ width: 140,
315
+ type: i.input,
316
+ defaultValue: "",
317
+ disabled: !e.actionButton
318
+ },
319
+ {
320
+ title: "字段类型",
321
+ key: "dbType",
322
+ width: 140,
323
+ type: i.select,
324
+ options: [
325
+ { title: "String", value: "string" },
326
+ { title: "Integer", value: "int" },
327
+ { title: "Double", value: "double" },
328
+ { title: "Date", value: "Date" },
329
+ { title: "Datetime", value: "Datetime" },
330
+ { title: "BigDecimal", value: "BigDecimal" },
331
+ { title: "Text", value: "Text" },
332
+ { title: "Blob", value: "Blob" }
333
+ ],
334
+ defaultValue: "string",
335
+ placeholder: "请选择${title}",
336
+ disabled: !e.actionButton,
337
+ validateRules: [{ required: !0, message: "请选择${title}" }]
338
+ },
339
+ {
340
+ title: "主键",
341
+ key: "dbIsKey",
342
+ width: 80,
343
+ type: i.checkbox,
344
+ align: "center",
345
+ customValue: ["1", "0"],
346
+ defaultChecked: !1,
347
+ disabled: !e.actionButton
348
+ },
349
+ {
350
+ title: "允许空值",
351
+ key: "dbIsNull",
352
+ width: 80,
353
+ type: i.checkbox,
354
+ customValue: ["1", "0"],
355
+ defaultChecked: !0,
356
+ disabled: !e.actionButton
357
+ },
358
+ {
359
+ title: "同步数据库",
360
+ key: "dbIsPersist",
361
+ minWidth: 80,
362
+ type: i.checkbox,
363
+ customValue: ["1", "0"],
364
+ defaultChecked: !0,
365
+ disabled: !e.actionButton
366
+ },
367
+ { title: "orderNum", key: "orderNum", type: i.hidden }
368
+ ]);
369
+ let u = [];
370
+ const r = z(R), { tableRef: N, loading: s, dataSource: m, tableHeight: f, tableProps: g, setDataSource: h, validateData: U } = r;
371
+ function p() {
372
+ t("added", d);
373
+ }
374
+ function B(a) {
375
+ u = u.concat(a.deleteRows.map((n) => n.id)), t("removed", O(L({}, a), { removeIds: u, target: d }));
376
+ }
377
+ function M(a) {
378
+ t("dragged", {
379
+ oldIndex: a.oldIndex,
380
+ newIndex: a.newIndex,
381
+ target: d
382
+ });
383
+ }
384
+ function y(a) {
385
+ t("inserted", O(L({}, a), { target: d }));
386
+ }
387
+ function v() {
388
+ return u;
389
+ }
390
+ function F(a) {
391
+ let { type: n, row: l, col: I, value: E, target: o } = a;
392
+ n === i.select && I.key === "dbType" && ((E === "Date" || E === "Datetime") && t("syncDbType", { row: l, value: E, target: d }), E === "Blob" || E === "Text" || E === "Date" ? o.setValues([{ rowKey: l.id, values: { dbLength: "0" } }]) : E === "int" || E === "double" || E === "BigDecimal" ? o.setValues([{ rowKey: l.id, values: { dbLength: "10" } }]) : l.dbLength === "0" && o.setValues([{ rowKey: l.id, values: { dbLength: "32" } }]));
393
+ }
394
+ function _(a, n, l) {
395
+ return a === "has_child" || a === "id" && l === 0;
396
+ }
397
+ function V(a) {
398
+ N.value.pushRows(a), T.value || t("added", d);
399
+ }
400
+ function H(a) {
401
+ return N.value.removeRowsById(a);
402
+ }
403
+ function G() {
404
+ T.value = !0, s.value = !0;
405
+ }
406
+ function P() {
407
+ T.value = !1, s.value = !1, t("added", d);
408
+ }
409
+ function S({ cellValue: a, row: n }, l) {
410
+ const { tables: I } = r;
411
+ if (I) {
412
+ let o = I.dbTable.value.tableRef.dataSource.filter((A) => A.id === n.id);
413
+ (!o || o.length <= 0) && l(!0);
414
+ let C = o[0].dbFieldName;
415
+ C == a && l(!0);
416
+ let w = I.idxTable.value.tableRef.getTableData();
417
+ for (let A of w)
418
+ A.indexField.split(",").indexOf(C) >= 0 && l(!1, "当前字段存在索引配置,请先删除索引再修改字段");
419
+ }
420
+ l(!0);
421
+ }
422
+ return {
423
+ tableRef: N,
424
+ loading: s,
425
+ columns: R,
426
+ dataSource: m,
427
+ setDataSource: h,
428
+ addBatchBegin: G,
429
+ addBatchEnd: P,
430
+ tableAddLine: V,
431
+ tableHeight: f,
432
+ tableProps: g,
433
+ tableDeleteLines: H,
434
+ handleAdded: p,
435
+ handleRemoved: B,
436
+ handleDragged: M,
437
+ handleInserted: y,
438
+ handleValueChange: F,
439
+ handleDisabledDbFieldName: _,
440
+ validateData: U,
441
+ getRemoveIds: v,
442
+ validateExistIndex: S
443
+ };
444
+ }
445
+ });
446
+ function ae(e, t, d, T, R, u) {
447
+ const r = Q("JVxeTable");
448
+ return q(), J(r, Z({
449
+ ref: "tableRef",
450
+ rowNumber: "",
451
+ rowSelection: "",
452
+ dragSort: "",
453
+ keyboardEdit: "",
454
+ sortKey: "orderNum",
455
+ addButtonSettings: "",
456
+ loading: e.loading,
457
+ columns: e.columns,
458
+ dataSource: e.dataSource,
459
+ toolbar: e.actionButton,
460
+ maxHeight: e.tableHeight.normal,
461
+ disabledRows: { dbFieldName: e.handleDisabledDbFieldName }
462
+ }, e.tableProps, {
463
+ onAdded: e.handleAdded,
464
+ onRemoved: e.handleRemoved,
465
+ onDragged: e.handleDragged,
466
+ onInserted: e.handleInserted,
467
+ onValueChange: e.handleValueChange
468
+ }), null, 16, ["loading", "columns", "dataSource", "toolbar", "maxHeight", "disabledRows", "onAdded", "onRemoved", "onDragged", "onInserted", "onValueChange"]);
469
+ }
470
+ const Oe = /* @__PURE__ */ j(te, [["render", ae]]);
471
+ export {
472
+ Oe as default
473
+ };
@@ -0,0 +1,160 @@
1
+ import { defineComponent as F, ref as i, resolveComponent as m, openBlock as k, createBlock as E, withCtx as t, createVNode as f, createTextVNode as g, createElementVNode as C } from "vue";
2
+ import { defHttp as v } from "/@/utils/http/axios";
3
+ import { BasicTable as R } from "/@/components/Table";
4
+ import { BasicModal as S, useModalInner as D } from "/@/components/Modal";
5
+ import { useListTable as I } from "/@/hooks/system/useListPage";
6
+ import { useMessage as N } from "/@/hooks/web/useMessage";
7
+ import { _ as $ } from "./index-6a09a912.mjs";
8
+ import "/@/components/jeecg/OnLine/JPopupOnlReport.vue";
9
+ import "vue-router";
10
+ const A = F({
11
+ name: "TransDb2Online",
12
+ components: { BasicModal: S, BasicTable: R },
13
+ emits: ["success", "register"],
14
+ setup(o, { emit: h }) {
15
+ const { createMessage: p } = N(), l = i("暂无数据"), u = i(!1), r = i(!1), n = i([]), a = i([]), [c, { closeModal: d }] = D(() => {
16
+ r.value = !1, l.value = "暂无数据", s.value = [], b();
17
+ }), [T, { setPagination: w }, { rowSelection: _, selectedRowKeys: s }] = I({
18
+ bordered: !0,
19
+ columns: [{ title: "表名", align: "left", dataIndex: "id" }],
20
+ dataSource: a,
21
+ maxHeight: 300,
22
+ locale: { emptyText: l },
23
+ pagination: {
24
+ showQuickJumper: !1,
25
+ showSizeChanger: !1
26
+ },
27
+ clickToRowSelect: !0,
28
+ showIndexColumn: !0,
29
+ showActionColumn: !1,
30
+ formConfig: {
31
+ schemas: [
32
+ {
33
+ label: "表名",
34
+ field: "tableName",
35
+ component: "Input",
36
+ componentProps: {
37
+ style: { width: "100%" },
38
+ placeholder: "请输入表名以模糊筛选",
39
+ onChange: (e) => L(e.target.value)
40
+ },
41
+ disabledLabelWidth: !0,
42
+ itemProps: {
43
+ labelCol: { sm: 24, md: 4 },
44
+ wrapperCol: { sm: 24, md: 20 }
45
+ }
46
+ }
47
+ ],
48
+ baseColProps: { xs: 24, sm: 24, md: 24, lg: 24, xl: 24, xxl: 24 },
49
+ showActionButtonGroup: !1
50
+ }
51
+ });
52
+ function b() {
53
+ return u.value = !0, v.get(
54
+ {
55
+ url: "/online/cgform/head/queryTables/"
56
+ /* query */
57
+ },
58
+ {
59
+ errorMessageMode: "none"
60
+ }
61
+ ).then(
62
+ (e) => (a.value = e, n.value = [...e], e),
63
+ (e) => {
64
+ e.message == "noadminauth" ? (l.value = "非admin用户无权限操作!", p.warn(l.value)) : console.error(e), a.value = [], n.value = [];
65
+ }
66
+ ).finally(() => {
67
+ u.value = !1;
68
+ });
69
+ }
70
+ function L(e) {
71
+ n.value.length !== 0 && (e ? (a.value = n.value.filter((y) => y.id.toLowerCase().includes(e.toLowerCase())), l.value = a.value.length === 0 ? "无筛选结果" : "暂无数据") : a.value = [...n.value], w({ current: 1 }));
72
+ }
73
+ function M() {
74
+ d();
75
+ }
76
+ function B() {
77
+ if (!s.value || s.value.length == 0) {
78
+ p.warning("请选择一张表");
79
+ return;
80
+ } else {
81
+ r.value = !0;
82
+ let e = s.value.join(",");
83
+ v.post({ url: "/online/cgform/head/transTables/" + e }).then(() => {
84
+ d(), h("success");
85
+ }).finally(() => r.value = !1);
86
+ }
87
+ }
88
+ return {
89
+ emptyText: l,
90
+ confirmLoading: u,
91
+ btnLoading: r,
92
+ metaSource: n,
93
+ handleTrans: B,
94
+ handleCancel: M,
95
+ queryTables: b,
96
+ registerModal: c,
97
+ registerTable: T,
98
+ rowSelection: _,
99
+ selectedRowKeys: s
100
+ };
101
+ }
102
+ }), P = /* @__PURE__ */ C("div", null, [
103
+ /* @__PURE__ */ g(" 注:导入表会排除配置前缀表 "),
104
+ /* @__PURE__ */ C("a", {
105
+ href: "http://doc.jeecg.com/2043924",
106
+ target: "_blank"
107
+ }, " 参考文档")
108
+ ], -1);
109
+ function q(o, h, p, l, u, r) {
110
+ const n = m("BasicTable"), a = m("a-spin"), c = m("a-button"), d = m("BasicModal");
111
+ return k(), E(d, {
112
+ onRegister: o.registerModal,
113
+ width: 500,
114
+ title: "从数据库导入表单",
115
+ confirmLoading: o.confirmLoading,
116
+ onCancel: o.handleCancel
117
+ }, {
118
+ footer: t(() => [
119
+ f(c, { onClick: o.handleCancel }, {
120
+ default: t(() => [
121
+ g("关闭")
122
+ ]),
123
+ _: 1
124
+ }, 8, ["onClick"]),
125
+ f(c, {
126
+ onClick: o.handleTrans,
127
+ type: "primary",
128
+ preIcon: "ant-design:swap",
129
+ loading: o.confirmLoading || o.btnLoading
130
+ }, {
131
+ default: t(() => [
132
+ g(" 生成表单 ")
133
+ ]),
134
+ _: 1
135
+ }, 8, ["onClick", "loading"])
136
+ ]),
137
+ default: t(() => [
138
+ f(a, { spinning: o.confirmLoading }, {
139
+ default: t(() => [
140
+ f(n, {
141
+ onRegister: o.registerTable,
142
+ rowSelection: o.rowSelection,
143
+ onTableRedo: o.queryTables
144
+ }, {
145
+ tableTitle: t(() => [
146
+ P
147
+ ]),
148
+ _: 1
149
+ }, 8, ["onRegister", "rowSelection", "onTableRedo"])
150
+ ]),
151
+ _: 1
152
+ }, 8, ["spinning"])
153
+ ]),
154
+ _: 1
155
+ }, 8, ["onRegister", "confirmLoading", "onCancel"]);
156
+ }
157
+ const Q = /* @__PURE__ */ $(A, [["render", q]]);
158
+ export {
159
+ Q as default
160
+ };