@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.
- package/AiModal-6de335e3.mjs +84 -0
- package/AuthButtonConfig-89763932.mjs +154 -0
- package/{AuthButtonTree-3aa0ed49.mjs → AuthButtonTree-2d87d0b3.mjs} +6 -5
- package/AuthDataConfig-5c3a8e6b.mjs +238 -0
- package/{AuthDataTree-94e026e3.mjs → AuthDataTree-dd7a1240.mjs} +6 -6
- package/AuthFieldConfig-9f6fa06c.mjs +245 -0
- package/{AuthFieldTree-69864163.mjs → AuthFieldTree-e326fc38.mjs} +2 -2
- package/AuthManagerDrawer-76f15e8d.mjs +119 -0
- package/AuthSetterModal-f5d2e87f.mjs +274 -0
- package/{CgformCopyList-14b76108.mjs → CgformCopyList-365b3e8f.mjs} +49 -46
- package/CgformModal-21c5c387.mjs +671 -0
- package/{CgreportModal.vue_vue_type_script_setup_true_lang-c89d9222.mjs → CgreportModal-edefa8e3.mjs} +153 -129
- package/CheckDictTable-1bc8322d.mjs +229 -0
- package/{CodeFileListModal-a6d3290d.mjs → CodeFileListModal-24601898.mjs} +5 -4
- package/CodeFileViewModal-2fe911f4.mjs +253 -0
- package/CodeGeneratorModal-f09fe903.mjs +282 -0
- package/CustomButtonList-f07bc695.mjs +397 -0
- package/{DBAttributeTable-370de07b.mjs → DBAttributeTable-285d40db.mjs} +118 -89
- package/DbToOnlineModal-5dcb67c3.mjs +169 -0
- package/DetailForm-deecbf3d.mjs +486 -0
- package/{EnhanceJavaModal-f63aa2d3.mjs → EnhanceJavaModal-45c66cd5.mjs} +3 -3
- package/{EnhanceJsHistory-352b46b1.mjs → EnhanceJsHistory-fab3102e.mjs} +2 -2
- package/EnhanceJsModal-175357a1.mjs +548 -0
- package/{EnhanceSqlModal-5e4ae84f.mjs → EnhanceSqlModal-7ea1b300.mjs} +3 -3
- package/ExtendConfigModal-a89ae052.mjs +117 -0
- package/FieldExtendJsonModal-32135634.mjs +277 -0
- package/{FileSelectModal-9a02560b.mjs → FileSelectModal-1643c8b9.mjs} +1 -1
- package/{ForeignKeyTable-6a843c4b.mjs → ForeignKeyTable-7f7e28a7.mjs} +3 -3
- package/{IndexTable-f8af9d44.mjs → IndexTable-cdcc2b48.mjs} +28 -20
- package/{JModalTip-33c7dc44.mjs → JModalTip-b055ab60.mjs} +1 -1
- package/JOnlineSearchSelect-22aae934.mjs +128 -0
- package/{LeftDepart-fa85523d.mjs → LeftDepart-d5615ed9.mjs} +1 -1
- package/{LeftRole-8b8dfe21.mjs → LeftRole-2ed8a2bf.mjs} +1 -1
- package/{LeftUser-dc24ef2f.mjs → LeftUser-22baa378.mjs} +3 -3
- package/LinkTableConfigModal-9242d750.mjs +240 -0
- package/{LinkTableFieldConfigModal-787bc55c.mjs → LinkTableFieldConfigModal-24adc50c.mjs} +41 -41
- package/{LinkTableListPiece-8499a318.mjs → LinkTableListPiece-f3a8e0d7.mjs} +1 -1
- package/{ModalFormDemo-977a49eb.mjs → ModalFormDemo-711418db.mjs} +1 -1
- package/OnlCgformErpList-58acdfa0.mjs +470 -0
- package/OnlCgformErpSubTable-9b1e1938.mjs +426 -0
- package/OnlCgformInnerSubTable-6c23781f.mjs +265 -0
- package/OnlCgformInnerTableList-4b5e14ed.mjs +458 -0
- package/OnlCgformTabList-019ad753.mjs +408 -0
- package/OnlineAutoList-48589d09.mjs +493 -0
- package/OnlineAutoModal-c2928847.mjs +239 -0
- package/{OnlineAutoTreeList-89265688.mjs → OnlineAutoTreeList-3baa1d00.mjs} +207 -204
- package/{OnlineCustomModal-518ad33c.mjs → OnlineCustomModal-9e17b6ce.mjs} +16 -12
- package/{OnlineDetailModal-9675390d.mjs → OnlineDetailModal-d5895734.mjs} +74 -64
- package/OnlineForm-9f1153ba.mjs +985 -0
- package/OnlineForm.vue_vue_type_style_index_0_scoped_4657b304_lang-4ed993c7.mjs +1 -0
- package/OnlineFormDetail-022ca117.mjs +342 -0
- package/OnlineFormUrlAdd-9715d70a.mjs +115 -0
- package/OnlineFormUrlDetail-8f864b1a.mjs +119 -0
- package/OnlineFormUrlEdit-ac985b36.mjs +113 -0
- package/OnlineFormUrlSuccess-3dfc54ab.mjs +59 -0
- package/OnlineQueryForm-eedb9a60.mjs +466 -0
- package/{OnlineSearchFormItem-0cc85a8a.mjs → OnlineSearchFormItem-6c557343.mjs} +2 -2
- package/{OnlineSelectCascade-4265c95d.mjs → OnlineSelectCascade-05c40fef.mjs} +1 -1
- package/{OnlineSubFormDetail-f0d2c016.mjs → OnlineSubFormDetail-58e896ce.mjs} +30 -28
- package/OnlineTabAutoModal-47b18ad6.mjs +306 -0
- package/{OnlineTabDetailModal-7356d3a8.mjs → OnlineTabDetailModal-82de1465.mjs} +22 -20
- package/OnlineTabForm-27655c83.mjs +817 -0
- package/OnlineTabFormDetail-8d0c40c0.mjs +327 -0
- package/PageAttributeTable-25e3b7da.mjs +466 -0
- package/{ProcessOnlineForm-67558898.mjs → ProcessOnlineForm-148632fe.mjs} +66 -56
- package/QueryTable-f7bfca7f.mjs +147 -0
- package/SetSwitchOptions-b2af757f.mjs +62 -0
- package/SuperQuery-a8592995.mjs +967 -0
- package/auth.api-ea1d33d4.mjs +41 -0
- package/auth.data-511e5197.mjs +217 -0
- package/{cgform.data-cbdd88c3.mjs → cgform.data-475d4984.mjs} +5 -1
- package/constant-fa63bd66.mjs +10 -0
- package/{enhance.data-efc7e155.mjs → enhance.data-a67572e1.mjs} +11 -10
- package/index-1d1a6e56.mjs +57 -0
- package/{index-b7a05eef.mjs → index-30e0e923.mjs} +396 -362
- package/{index-49508cad.mjs → index-f30613d1.mjs} +29 -27
- package/main.index.js +1 -1
- package/package.json +1 -1
- package/style.css +1 -1
- package/useCgformList-f41d4dc1.mjs +426 -0
- package/useExtendComponent-dcae5c78.mjs +4399 -0
- package/useFormUrl-2ee1a82d.mjs +24 -0
- package/useListButton-bfac4ecf.mjs +697 -0
- package/{useSchemas-0433a403.mjs → useSchemas-a9c75b0f.mjs} +191 -101
- package/useTableSync-d7e9f18d.mjs +89 -0
- package/AuthButtonConfig-244ec09f.mjs +0 -125
- package/AuthDataConfig-83891eea.mjs +0 -212
- package/AuthFieldConfig-6b21915c.mjs +0 -139
- package/AuthManagerDrawer-300dd4e4.mjs +0 -114
- package/AuthSetterModal-a414fb35.mjs +0 -267
- package/CgformModal-eccfc38e.mjs +0 -611
- package/CgreportModal-2065f5a9.mjs +0 -13
- package/CheckDictTable-134cbb83.mjs +0 -211
- package/CodeFileViewModal-373e8058.mjs +0 -244
- package/CodeGeneratorModal-f08a89cd.mjs +0 -233
- package/CustomButtonList-02e3d897.mjs +0 -363
- package/DbToOnlineModal-9f13956f.mjs +0 -160
- package/DetailForm-424638eb.mjs +0 -462
- package/EnhanceJsModal-05c73a59.mjs +0 -311
- package/ExtendConfigModal-1dde390a.mjs +0 -111
- package/FieldExtendJsonModal-a70a9ccd.mjs +0 -219
- package/JOnlineSearchSelect-c287af12.mjs +0 -95
- package/LinkTableConfigModal-d4fbdef2.mjs +0 -230
- package/OnlCgformErpList-db45e22b.mjs +0 -454
- package/OnlCgformErpSubTable-54b50eec.mjs +0 -403
- package/OnlCgformInnerSubTable-fbca73e0.mjs +0 -253
- package/OnlCgformInnerTableList-782eaf04.mjs +0 -444
- package/OnlCgformTabList-a9e1e36a.mjs +0 -395
- package/OnlineAutoList-0583a910.mjs +0 -479
- package/OnlineAutoModal-510991eb.mjs +0 -207
- package/OnlineForm-1fa2d893.mjs +0 -750
- package/OnlineFormDetail-0e7294ca.mjs +0 -297
- package/OnlineQueryForm-1bfc8320.mjs +0 -386
- package/OnlineTabAutoModal-6f636ee2.mjs +0 -254
- package/OnlineTabForm-512d3951.mjs +0 -766
- package/OnlineTabFormDetail-5a70219d.mjs +0 -324
- package/PageAttributeTable-965dc58e.mjs +0 -404
- package/QueryTable-eb9a5b21.mjs +0 -115
- package/SuperQuery-5d1ca957.mjs +0 -843
- package/auth.api-d3a6c4b3.mjs +0 -39
- package/auth.data-8be5c9e3.mjs +0 -141
- package/constant-754f1a9d.mjs +0 -9
- package/index-0e3ab3af.mjs +0 -56
- package/useCgformList-423282b7.mjs +0 -400
- package/useExtendComponent-325fe3f1.mjs +0 -3926
- package/useListButton-cdbab702.mjs +0 -676
- package/useTableSync-774c3774.mjs +0 -87
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
var Y = Object.defineProperty, $ = Object.defineProperties;
|
|
2
2
|
var k = Object.getOwnPropertyDescriptors;
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
var c = (e,
|
|
6
|
-
for (var d in
|
|
7
|
-
|
|
8
|
-
if (
|
|
9
|
-
for (var d of
|
|
10
|
-
|
|
3
|
+
var b = Object.getOwnPropertySymbols;
|
|
4
|
+
var K = Object.prototype.hasOwnProperty, W = Object.prototype.propertyIsEnumerable;
|
|
5
|
+
var c = (e, a, d) => a in e ? Y(e, a, { enumerable: !0, configurable: !0, writable: !0, value: d }) : e[a] = d, D = (e, a) => {
|
|
6
|
+
for (var d in a || (a = {}))
|
|
7
|
+
K.call(a, d) && c(e, d, a[d]);
|
|
8
|
+
if (b)
|
|
9
|
+
for (var d of b(a))
|
|
10
|
+
W.call(a, d) && c(e, d, a[d]);
|
|
11
11
|
return e;
|
|
12
|
-
},
|
|
13
|
-
import { defineComponent as
|
|
14
|
-
import { JVxeTypes as
|
|
15
|
-
import { u as
|
|
16
|
-
import { _ as
|
|
17
|
-
import "./cgform.data-
|
|
12
|
+
}, S = (e, a) => $(e, k(a));
|
|
13
|
+
import { defineComponent as X, getCurrentInstance as Q, ref as f, resolveComponent as q, openBlock as J, createBlock as Z, mergeProps as z } from "vue";
|
|
14
|
+
import { JVxeTypes as E } from "/@/components/jeecg/JVxeTable/types";
|
|
15
|
+
import { u as j } from "./useTableSync-d7e9f18d.mjs";
|
|
16
|
+
import { _ as ee } from "./index-1d1a6e56.mjs";
|
|
17
|
+
import "./cgform.data-475d4984.mjs";
|
|
18
18
|
import "/@/utils/dict";
|
|
19
19
|
import "/@/utils/dict/JDictSelectUtil";
|
|
20
20
|
import "/@/utils/uuid";
|
|
@@ -22,7 +22,7 @@ import "lodash-es";
|
|
|
22
22
|
import "/@/components/jeecg/OnLine/JPopupOnlReport.vue";
|
|
23
23
|
import "/@/hooks/web/useMessage";
|
|
24
24
|
import "vue-router";
|
|
25
|
-
const
|
|
25
|
+
const te = [
|
|
26
26
|
"ADD",
|
|
27
27
|
"ALL",
|
|
28
28
|
"ALTER",
|
|
@@ -248,19 +248,19 @@ const ee = [
|
|
|
248
248
|
"XOR",
|
|
249
249
|
"YEAR_MONTH",
|
|
250
250
|
"ZEROFILL"
|
|
251
|
-
],
|
|
251
|
+
], ae = X({
|
|
252
252
|
name: "DBAttributeTable",
|
|
253
253
|
props: {
|
|
254
254
|
actionButton: { type: Boolean, default: !0 }
|
|
255
255
|
},
|
|
256
|
-
emits: ["added", "removed", "inserted", "dragged", "syncDbType"],
|
|
257
|
-
setup(e, { emit:
|
|
258
|
-
const d =
|
|
256
|
+
emits: ["added", "removed", "inserted", "dragged", "syncDbType", "syncDbIsPersist", "syncDbIsNull"],
|
|
257
|
+
setup(e, { emit: a }) {
|
|
258
|
+
const d = Q(), R = f(!1), N = f([
|
|
259
259
|
{
|
|
260
260
|
title: "字段名称",
|
|
261
261
|
key: "dbFieldName",
|
|
262
262
|
width: 140,
|
|
263
|
-
type:
|
|
263
|
+
type: E.input,
|
|
264
264
|
defaultValue: "",
|
|
265
265
|
placeholder: "请输入${title}",
|
|
266
266
|
validateRules: [
|
|
@@ -271,11 +271,18 @@ const ee = [
|
|
|
271
271
|
},
|
|
272
272
|
{ unique: !0, message: "${title}不能重复" },
|
|
273
273
|
{
|
|
274
|
-
handler({ cellValue:
|
|
275
|
-
|
|
274
|
+
handler({ cellValue: t }, i) {
|
|
275
|
+
te.includes(t.toUpperCase()) ? i(!1, t + "是关键字,不能作为字段名称使用!") : i(!0);
|
|
276
276
|
}
|
|
277
277
|
},
|
|
278
|
-
{ handler:
|
|
278
|
+
{ handler: O },
|
|
279
|
+
// update-begin--author:liaozhiyang---date:20240603---for:【TV360X-631】表名字段名表描述字段备注长度校验
|
|
280
|
+
{
|
|
281
|
+
handler({ cellValue: t }, i) {
|
|
282
|
+
t.length > 32 ? i(!1, "字段名最长32个字符") : i(!0);
|
|
283
|
+
}
|
|
284
|
+
}
|
|
285
|
+
// update-end--author:liaozhiyang---date:20240603---for:【TV360X-631】表名字段名表描述字段备注长度校验
|
|
279
286
|
],
|
|
280
287
|
disabled: !e.actionButton
|
|
281
288
|
},
|
|
@@ -283,16 +290,25 @@ const ee = [
|
|
|
283
290
|
title: "字段备注",
|
|
284
291
|
key: "dbFieldTxt",
|
|
285
292
|
width: 140,
|
|
286
|
-
type:
|
|
293
|
+
type: E.input,
|
|
287
294
|
defaultValue: "",
|
|
288
295
|
placeholder: "请输入${title}",
|
|
289
|
-
validateRules: [
|
|
296
|
+
validateRules: [
|
|
297
|
+
{ required: !0, message: "${title}不能为空" },
|
|
298
|
+
// update-begin--author:liaozhiyang---date:20240603---for:【TV360X-631】表名字段名表描述字段备注长度校验
|
|
299
|
+
{
|
|
300
|
+
handler({ cellValue: t }, i) {
|
|
301
|
+
t.length > 200 ? i(!1, "字段名最长200个字") : i(!0);
|
|
302
|
+
}
|
|
303
|
+
}
|
|
304
|
+
// update-end--author:liaozhiyang---date:20240603---for:【TV360X-631】表名字段名表描述字段备注长度校验
|
|
305
|
+
]
|
|
290
306
|
},
|
|
291
307
|
{
|
|
292
308
|
title: "字段长度",
|
|
293
309
|
key: "dbLength",
|
|
294
310
|
width: 120,
|
|
295
|
-
type:
|
|
311
|
+
type: E.inputNumber,
|
|
296
312
|
defaultValue: 32,
|
|
297
313
|
placeholder: "请输入${title}",
|
|
298
314
|
validateRules: [{ required: !0, message: "${title}不能为空" }],
|
|
@@ -302,7 +318,7 @@ const ee = [
|
|
|
302
318
|
title: "小数点",
|
|
303
319
|
key: "dbPointLength",
|
|
304
320
|
width: 100,
|
|
305
|
-
type:
|
|
321
|
+
type: E.inputNumber,
|
|
306
322
|
defaultValue: 0,
|
|
307
323
|
placeholder: "请输入${title}",
|
|
308
324
|
validateRules: [{ required: !0, message: "${title}不能为空" }],
|
|
@@ -312,7 +328,7 @@ const ee = [
|
|
|
312
328
|
title: "默认值",
|
|
313
329
|
key: "dbDefaultVal",
|
|
314
330
|
width: 140,
|
|
315
|
-
type:
|
|
331
|
+
type: E.input,
|
|
316
332
|
defaultValue: "",
|
|
317
333
|
disabled: !e.actionButton
|
|
318
334
|
},
|
|
@@ -320,7 +336,7 @@ const ee = [
|
|
|
320
336
|
title: "字段类型",
|
|
321
337
|
key: "dbType",
|
|
322
338
|
width: 140,
|
|
323
|
-
type:
|
|
339
|
+
type: E.select,
|
|
324
340
|
options: [
|
|
325
341
|
{ title: "String", value: "string" },
|
|
326
342
|
{ title: "Integer", value: "int" },
|
|
@@ -334,13 +350,13 @@ const ee = [
|
|
|
334
350
|
defaultValue: "string",
|
|
335
351
|
placeholder: "请选择${title}",
|
|
336
352
|
disabled: !e.actionButton,
|
|
337
|
-
validateRules: [{ required: !0, message: "请选择${title}" }]
|
|
353
|
+
validateRules: [{ required: !0, message: "请选择${title}" }, { handler: x }]
|
|
338
354
|
},
|
|
339
355
|
{
|
|
340
356
|
title: "主键",
|
|
341
357
|
key: "dbIsKey",
|
|
342
358
|
width: 80,
|
|
343
|
-
type:
|
|
359
|
+
type: E.checkbox,
|
|
344
360
|
align: "center",
|
|
345
361
|
customValue: ["1", "0"],
|
|
346
362
|
defaultChecked: !1,
|
|
@@ -350,7 +366,7 @@ const ee = [
|
|
|
350
366
|
title: "允许空值",
|
|
351
367
|
key: "dbIsNull",
|
|
352
368
|
width: 80,
|
|
353
|
-
type:
|
|
369
|
+
type: E.checkbox,
|
|
354
370
|
customValue: ["1", "0"],
|
|
355
371
|
defaultChecked: !0,
|
|
356
372
|
disabled: !e.actionButton
|
|
@@ -359,97 +375,110 @@ const ee = [
|
|
|
359
375
|
title: "同步数据库",
|
|
360
376
|
key: "dbIsPersist",
|
|
361
377
|
minWidth: 80,
|
|
362
|
-
type:
|
|
378
|
+
type: E.checkbox,
|
|
363
379
|
customValue: ["1", "0"],
|
|
364
380
|
defaultChecked: !0,
|
|
365
381
|
disabled: !e.actionButton
|
|
366
382
|
},
|
|
367
|
-
{ title: "orderNum", key: "orderNum", type:
|
|
383
|
+
{ title: "orderNum", key: "orderNum", type: E.hidden }
|
|
368
384
|
]);
|
|
369
|
-
let
|
|
370
|
-
const
|
|
371
|
-
function
|
|
372
|
-
|
|
385
|
+
let s = [];
|
|
386
|
+
const I = j(N), { tableRef: A, loading: L, dataSource: g, tableHeight: m, tableProps: h, setDataSource: p, validateData: y } = I;
|
|
387
|
+
function U() {
|
|
388
|
+
a("added", d);
|
|
373
389
|
}
|
|
374
|
-
function B(
|
|
375
|
-
|
|
390
|
+
function B(t) {
|
|
391
|
+
s = s.concat(t.deleteRows.map((i) => i.id)), a("removed", S(D({}, t), { removeIds: s, target: d }));
|
|
376
392
|
}
|
|
377
|
-
function
|
|
378
|
-
|
|
379
|
-
oldIndex:
|
|
380
|
-
newIndex:
|
|
393
|
+
function _(t) {
|
|
394
|
+
a("dragged", {
|
|
395
|
+
oldIndex: t.oldIndex,
|
|
396
|
+
newIndex: t.newIndex,
|
|
381
397
|
target: d
|
|
382
398
|
});
|
|
383
399
|
}
|
|
384
|
-
function
|
|
385
|
-
|
|
400
|
+
function M(t) {
|
|
401
|
+
a("inserted", S(D({}, t), { target: d }));
|
|
386
402
|
}
|
|
387
403
|
function v() {
|
|
388
|
-
return
|
|
404
|
+
return s;
|
|
389
405
|
}
|
|
390
|
-
function F(
|
|
391
|
-
let { type:
|
|
392
|
-
|
|
406
|
+
function F(t) {
|
|
407
|
+
let { type: i, row: l, col: o, value: n, target: u, oldValue: r } = t;
|
|
408
|
+
i === E.select && o.key === "dbType" ? ((n === "Date" || n === "Datetime") && a("syncDbType", { row: l, value: n, target: d }), (n !== "Date" || n !== "Datetime") && (r == "Date" || r == "Datetime") && a("syncDbType", { row: l, value: n, target: d }), n === "Blob" || n === "Text" || n === "Date" ? u.setValues([{ rowKey: l.id, values: { dbLength: "0" } }]) : n === "string" ? u.setValues([{ rowKey: l.id, values: { dbLength: "32" } }]) : n === "int" || n === "double" || n === "BigDecimal" ? u.setValues([{ rowKey: l.id, values: { dbLength: "10" } }]) : l.dbLength === "0" && u.setValues([{ rowKey: l.id, values: { dbLength: "32" } }])) : o.key === "dbIsPersist" ? a("syncDbIsPersist", { row: l, value: n, target: d }) : o.key === "dbIsNull" && a("syncDbIsNull", { row: l, value: n, target: d });
|
|
393
409
|
}
|
|
394
|
-
function
|
|
395
|
-
|
|
410
|
+
function V(t, i, l) {
|
|
411
|
+
var o;
|
|
412
|
+
if (t === "has_child")
|
|
413
|
+
return !0;
|
|
414
|
+
if (t === "id") {
|
|
415
|
+
const { tables: n } = I, r = ((o = n.dbTable.value.tableRef.getTableData()) != null ? o : []).findIndex((T) => T.dbFieldName === "id");
|
|
416
|
+
if ((r === -1 ? 0 : r) === l)
|
|
417
|
+
return !0;
|
|
418
|
+
}
|
|
419
|
+
return !1;
|
|
396
420
|
}
|
|
397
|
-
function
|
|
398
|
-
|
|
421
|
+
function P(t) {
|
|
422
|
+
A.value.pushRows(t), R.value || a("added", d);
|
|
399
423
|
}
|
|
400
|
-
function H(
|
|
401
|
-
return
|
|
424
|
+
function H(t) {
|
|
425
|
+
return A.value.removeRowsById(t);
|
|
402
426
|
}
|
|
403
427
|
function G() {
|
|
404
|
-
|
|
428
|
+
R.value = !0, L.value = !0;
|
|
405
429
|
}
|
|
406
|
-
function
|
|
407
|
-
|
|
430
|
+
function w() {
|
|
431
|
+
R.value = !1, L.value = !1, a("added", d);
|
|
408
432
|
}
|
|
409
|
-
function
|
|
410
|
-
const { tables:
|
|
411
|
-
if (
|
|
412
|
-
let
|
|
413
|
-
(!
|
|
414
|
-
let
|
|
415
|
-
|
|
416
|
-
let
|
|
417
|
-
for (let
|
|
418
|
-
|
|
433
|
+
function O({ cellValue: t, row: i }, l) {
|
|
434
|
+
const { tables: o } = I;
|
|
435
|
+
if (o) {
|
|
436
|
+
let u = o.dbTable.value.tableRef.dataSource.filter((T) => T.id === i.id);
|
|
437
|
+
(!u || u.length <= 0) && l(!0);
|
|
438
|
+
let r = u[0].dbFieldName;
|
|
439
|
+
r == t && l(!0);
|
|
440
|
+
let C = o.idxTable.value.tableRef.getTableData();
|
|
441
|
+
for (let T of C)
|
|
442
|
+
T.indexField.split(",").indexOf(r) >= 0 && l(!1, "当前字段存在索引配置,请先删除索引再修改字段");
|
|
419
443
|
}
|
|
420
444
|
l(!0);
|
|
421
445
|
}
|
|
446
|
+
function x({ cellValue: t, row: i }, l) {
|
|
447
|
+
i.dbType == "int" && i.dbPointLength > 0 && l(!1, "设置了小数点不可设置integer类型"), l(!0);
|
|
448
|
+
}
|
|
422
449
|
return {
|
|
423
|
-
tableRef:
|
|
424
|
-
loading:
|
|
425
|
-
columns:
|
|
426
|
-
dataSource:
|
|
427
|
-
setDataSource:
|
|
450
|
+
tableRef: A,
|
|
451
|
+
loading: L,
|
|
452
|
+
columns: N,
|
|
453
|
+
dataSource: g,
|
|
454
|
+
setDataSource: p,
|
|
428
455
|
addBatchBegin: G,
|
|
429
|
-
addBatchEnd:
|
|
430
|
-
tableAddLine:
|
|
431
|
-
tableHeight:
|
|
432
|
-
tableProps:
|
|
456
|
+
addBatchEnd: w,
|
|
457
|
+
tableAddLine: P,
|
|
458
|
+
tableHeight: m,
|
|
459
|
+
tableProps: h,
|
|
433
460
|
tableDeleteLines: H,
|
|
434
|
-
handleAdded:
|
|
461
|
+
handleAdded: U,
|
|
435
462
|
handleRemoved: B,
|
|
436
|
-
handleDragged:
|
|
437
|
-
handleInserted:
|
|
463
|
+
handleDragged: _,
|
|
464
|
+
handleInserted: M,
|
|
438
465
|
handleValueChange: F,
|
|
439
|
-
handleDisabledDbFieldName:
|
|
440
|
-
validateData:
|
|
466
|
+
handleDisabledDbFieldName: V,
|
|
467
|
+
validateData: y,
|
|
441
468
|
getRemoveIds: v,
|
|
442
|
-
validateExistIndex:
|
|
469
|
+
validateExistIndex: O
|
|
443
470
|
};
|
|
444
471
|
}
|
|
445
472
|
});
|
|
446
|
-
function
|
|
447
|
-
const
|
|
448
|
-
return
|
|
473
|
+
function de(e, a, d, R, N, s) {
|
|
474
|
+
const I = q("JVxeTable");
|
|
475
|
+
return J(), Z(I, z({
|
|
476
|
+
class: "dBAttributeTable",
|
|
449
477
|
ref: "tableRef",
|
|
450
478
|
rowNumber: "",
|
|
451
479
|
rowSelection: "",
|
|
452
480
|
dragSort: "",
|
|
481
|
+
notAllowDrag: [{ key: "dbFieldName", value: "id" }],
|
|
453
482
|
keyboardEdit: "",
|
|
454
483
|
sortKey: "orderNum",
|
|
455
484
|
addButtonSettings: "",
|
|
@@ -467,7 +496,7 @@ function ae(e, t, d, T, R, u) {
|
|
|
467
496
|
onValueChange: e.handleValueChange
|
|
468
497
|
}), null, 16, ["loading", "columns", "dataSource", "toolbar", "maxHeight", "disabledRows", "onAdded", "onRemoved", "onDragged", "onInserted", "onValueChange"]);
|
|
469
498
|
}
|
|
470
|
-
const
|
|
499
|
+
const Se = /* @__PURE__ */ ee(ae, [["render", de], ["__scopeId", "data-v-7723c158"]]);
|
|
471
500
|
export {
|
|
472
|
-
|
|
501
|
+
Se as default
|
|
473
502
|
};
|
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
import { defineComponent as D, ref as i, resolveComponent as d, openBlock as H, createBlock as I, withCtx as l, createVNode as m, createTextVNode as g, createElementVNode as _ } from "vue";
|
|
2
|
+
import { defHttp as T } from "/@/utils/http/axios";
|
|
3
|
+
import { BasicTable as $ } from "/@/components/Table";
|
|
4
|
+
import { BasicModal as A, useModalInner as P } from "/@/components/Modal";
|
|
5
|
+
import { useListTable as q } from "/@/hooks/system/useListPage";
|
|
6
|
+
import { useMessage as O } from "/@/hooks/web/useMessage";
|
|
7
|
+
import { useDesign as V } from "/@/hooks/web/useDesign";
|
|
8
|
+
import { _ as j } from "./index-1d1a6e56.mjs";
|
|
9
|
+
import "/@/components/jeecg/OnLine/JPopupOnlReport.vue";
|
|
10
|
+
import "vue-router";
|
|
11
|
+
const x = D({
|
|
12
|
+
name: "TransDb2Online",
|
|
13
|
+
components: { BasicModal: A, BasicTable: $ },
|
|
14
|
+
emits: ["success", "register"],
|
|
15
|
+
setup(o, { emit: h }) {
|
|
16
|
+
const { createMessage: f } = O(), t = i("暂无数据"), u = i(!1), s = i(!1), n = i([]), a = i([]), { prefixCls: c } = V("online-db-import-form-modal"), p = c, C = document.documentElement.clientHeight, b = C - 180, M = b > 690 ? 690 : b, [L, { setPagination: y, getForm: B }, { rowSelection: F, selectedRowKeys: r }] = q({
|
|
17
|
+
bordered: !0,
|
|
18
|
+
columns: [{ title: "表名", align: "left", dataIndex: "id" }],
|
|
19
|
+
dataSource: a,
|
|
20
|
+
maxHeight: C - 400,
|
|
21
|
+
locale: { emptyText: t },
|
|
22
|
+
pagination: {
|
|
23
|
+
showQuickJumper: !1,
|
|
24
|
+
showSizeChanger: !1
|
|
25
|
+
},
|
|
26
|
+
clickToRowSelect: !0,
|
|
27
|
+
showIndexColumn: !0,
|
|
28
|
+
showActionColumn: !1,
|
|
29
|
+
formConfig: {
|
|
30
|
+
schemas: [
|
|
31
|
+
{
|
|
32
|
+
label: "表名",
|
|
33
|
+
field: "tableName",
|
|
34
|
+
component: "Input",
|
|
35
|
+
componentProps: {
|
|
36
|
+
style: { width: "100%" },
|
|
37
|
+
placeholder: "请输入表名以模糊筛选",
|
|
38
|
+
onChange: (e) => N(e.target.value)
|
|
39
|
+
},
|
|
40
|
+
disabledLabelWidth: !0,
|
|
41
|
+
itemProps: {
|
|
42
|
+
labelCol: { sm: 0, md: 0 },
|
|
43
|
+
wrapperCol: { sm: 24, md: 20 }
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
],
|
|
47
|
+
baseColProps: { xs: 24, sm: 24, md: 24, lg: 24, xl: 24, xxl: 24 },
|
|
48
|
+
showActionButtonGroup: !1
|
|
49
|
+
}
|
|
50
|
+
}), [E, { closeModal: v }] = P(() => {
|
|
51
|
+
var e;
|
|
52
|
+
(e = B()) == null || e.resetFields(), s.value = !1, t.value = "暂无数据", r.value = [], w();
|
|
53
|
+
});
|
|
54
|
+
function w() {
|
|
55
|
+
return u.value = !0, T.get(
|
|
56
|
+
{
|
|
57
|
+
url: "/online/cgform/head/queryTables"
|
|
58
|
+
/* query */
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
errorMessageMode: "none"
|
|
62
|
+
}
|
|
63
|
+
).then(
|
|
64
|
+
(e) => (a.value = e, n.value = [...e], e),
|
|
65
|
+
(e) => {
|
|
66
|
+
e.message == "noadminauth" && (t.value = "非admin用户无权限操作!", f.warn(t.value)), a.value = [], n.value = [];
|
|
67
|
+
}
|
|
68
|
+
).finally(() => {
|
|
69
|
+
u.value = !1;
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
function N(e) {
|
|
73
|
+
n.value.length !== 0 && (e ? (a.value = n.value.filter((S) => S.id.toLowerCase().includes(e.toLowerCase())), t.value = a.value.length === 0 ? "无筛选结果" : "暂无数据") : a.value = [...n.value], y({ current: 1 }));
|
|
74
|
+
}
|
|
75
|
+
function k() {
|
|
76
|
+
v();
|
|
77
|
+
}
|
|
78
|
+
function R() {
|
|
79
|
+
if (!r.value || r.value.length == 0) {
|
|
80
|
+
f.warning("请选择一张表");
|
|
81
|
+
return;
|
|
82
|
+
} else {
|
|
83
|
+
s.value = !0;
|
|
84
|
+
let e = r.value.join(",");
|
|
85
|
+
T.post({ url: "/online/cgform/head/transTables/" + e }, { errorMessageMode: "modal" }).then(() => {
|
|
86
|
+
v();
|
|
87
|
+
}).finally(() => {
|
|
88
|
+
s.value = !1, h("success");
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
return {
|
|
93
|
+
emptyText: t,
|
|
94
|
+
confirmLoading: u,
|
|
95
|
+
btnLoading: s,
|
|
96
|
+
metaSource: n,
|
|
97
|
+
handleTrans: R,
|
|
98
|
+
handleCancel: k,
|
|
99
|
+
queryTables: w,
|
|
100
|
+
registerModal: E,
|
|
101
|
+
registerTable: L,
|
|
102
|
+
rowSelection: F,
|
|
103
|
+
selectedRowKeys: r,
|
|
104
|
+
wrapClassName: p,
|
|
105
|
+
modalHeight: M
|
|
106
|
+
};
|
|
107
|
+
}
|
|
108
|
+
});
|
|
109
|
+
const z = /* @__PURE__ */ _("div", null, [
|
|
110
|
+
/* @__PURE__ */ g(" 注:导入表会排除配置前缀表 "),
|
|
111
|
+
/* @__PURE__ */ _("a", {
|
|
112
|
+
href: "http://doc.jeecg.com/2043924",
|
|
113
|
+
target: "_blank"
|
|
114
|
+
}, " 参考文档")
|
|
115
|
+
], -1);
|
|
116
|
+
function G(o, h, f, t, u, s) {
|
|
117
|
+
const n = d("BasicTable"), a = d("a-spin"), c = d("a-button"), p = d("BasicModal");
|
|
118
|
+
return H(), I(p, {
|
|
119
|
+
onRegister: o.registerModal,
|
|
120
|
+
height: o.modalHeight,
|
|
121
|
+
width: 500,
|
|
122
|
+
title: "从数据库导入表单",
|
|
123
|
+
confirmLoading: o.confirmLoading,
|
|
124
|
+
onCancel: o.handleCancel,
|
|
125
|
+
wrapClassName: o.wrapClassName
|
|
126
|
+
}, {
|
|
127
|
+
footer: l(() => [
|
|
128
|
+
m(c, { onClick: o.handleCancel }, {
|
|
129
|
+
default: l(() => [
|
|
130
|
+
g("关闭")
|
|
131
|
+
]),
|
|
132
|
+
_: 1
|
|
133
|
+
}, 8, ["onClick"]),
|
|
134
|
+
m(c, {
|
|
135
|
+
onClick: o.handleTrans,
|
|
136
|
+
type: "primary",
|
|
137
|
+
preIcon: "ant-design:swap",
|
|
138
|
+
loading: o.confirmLoading || o.btnLoading
|
|
139
|
+
}, {
|
|
140
|
+
default: l(() => [
|
|
141
|
+
g(" 生成表单 ")
|
|
142
|
+
]),
|
|
143
|
+
_: 1
|
|
144
|
+
}, 8, ["onClick", "loading"])
|
|
145
|
+
]),
|
|
146
|
+
default: l(() => [
|
|
147
|
+
m(a, { spinning: o.confirmLoading }, {
|
|
148
|
+
default: l(() => [
|
|
149
|
+
m(n, {
|
|
150
|
+
onRegister: o.registerTable,
|
|
151
|
+
rowSelection: o.rowSelection,
|
|
152
|
+
onTableRedo: o.queryTables
|
|
153
|
+
}, {
|
|
154
|
+
tableTitle: l(() => [
|
|
155
|
+
z
|
|
156
|
+
]),
|
|
157
|
+
_: 1
|
|
158
|
+
}, 8, ["onRegister", "rowSelection", "onTableRedo"])
|
|
159
|
+
]),
|
|
160
|
+
_: 1
|
|
161
|
+
}, 8, ["spinning"])
|
|
162
|
+
]),
|
|
163
|
+
_: 1
|
|
164
|
+
}, 8, ["onRegister", "height", "confirmLoading", "onCancel", "wrapClassName"]);
|
|
165
|
+
}
|
|
166
|
+
const ne = /* @__PURE__ */ j(x, [["render", G]]);
|
|
167
|
+
export {
|
|
168
|
+
ne as default
|
|
169
|
+
};
|