@jeecg/online 3.7.0-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-fe3988fb.mjs → AiModal-6de335e3.mjs} +1 -1
- package/AuthButtonConfig-89763932.mjs +154 -0
- package/{AuthButtonTree-589395ed.mjs → AuthButtonTree-2d87d0b3.mjs} +6 -5
- package/{AuthDataConfig-7bb0cd85.mjs → AuthDataConfig-5c3a8e6b.mjs} +11 -10
- package/{AuthDataTree-6e3bb86f.mjs → AuthDataTree-dd7a1240.mjs} +6 -6
- package/AuthFieldConfig-9f6fa06c.mjs +245 -0
- package/{AuthFieldTree-b7cd091e.mjs → AuthFieldTree-e326fc38.mjs} +2 -2
- package/{AuthManagerDrawer-5e2ed5ce.mjs → AuthManagerDrawer-76f15e8d.mjs} +9 -8
- package/{AuthSetterModal-6f74449c.mjs → AuthSetterModal-f5d2e87f.mjs} +12 -11
- package/{CgformCopyList-8077ccc6.mjs → CgformCopyList-365b3e8f.mjs} +43 -42
- package/CgformModal-21c5c387.mjs +671 -0
- package/{CgreportModal-5a23d089.mjs → CgreportModal-edefa8e3.mjs} +15 -14
- package/{CheckDictTable-b5cb0e2b.mjs → CheckDictTable-1bc8322d.mjs} +36 -33
- package/{CodeFileListModal-0e26b7e0.mjs → CodeFileListModal-24601898.mjs} +5 -4
- package/{CodeFileViewModal-9d4a5b5f.mjs → CodeFileViewModal-2fe911f4.mjs} +89 -84
- package/CodeGeneratorModal-f09fe903.mjs +282 -0
- package/{CustomButtonList-37639061.mjs → CustomButtonList-f07bc695.mjs} +108 -92
- package/{DBAttributeTable-95dc66c1.mjs → DBAttributeTable-285d40db.mjs} +79 -71
- package/DbToOnlineModal-5dcb67c3.mjs +169 -0
- package/{DetailForm-4aa2570b.mjs → DetailForm-deecbf3d.mjs} +50 -49
- package/{EnhanceJavaModal-98934198.mjs → EnhanceJavaModal-45c66cd5.mjs} +2 -2
- package/{EnhanceJsHistory-9c4acdaf.mjs → EnhanceJsHistory-fab3102e.mjs} +1 -1
- package/{EnhanceJsModal-247f640d.mjs → EnhanceJsModal-175357a1.mjs} +119 -103
- package/{EnhanceSqlModal-65b74b0f.mjs → EnhanceSqlModal-7ea1b300.mjs} +2 -2
- package/{ExtendConfigModal-00f2fb55.mjs → ExtendConfigModal-a89ae052.mjs} +2 -2
- package/{FieldExtendJsonModal-cc7fce26.mjs → FieldExtendJsonModal-32135634.mjs} +2 -2
- package/{FileSelectModal-38660e3c.mjs → FileSelectModal-1643c8b9.mjs} +1 -1
- package/{ForeignKeyTable-a78cb5ad.mjs → ForeignKeyTable-7f7e28a7.mjs} +2 -2
- package/{IndexTable-1b496559.mjs → IndexTable-cdcc2b48.mjs} +27 -19
- package/{JModalTip-4a83aaed.mjs → JModalTip-b055ab60.mjs} +1 -1
- package/JOnlineSearchSelect-22aae934.mjs +128 -0
- package/{LeftDepart-8ade4bf7.mjs → LeftDepart-d5615ed9.mjs} +1 -1
- package/{LeftRole-7d8c5acc.mjs → LeftRole-2ed8a2bf.mjs} +1 -1
- package/{LeftUser-b4d1372a.mjs → LeftUser-22baa378.mjs} +1 -1
- package/{LinkTableConfigModal-a138c85e.mjs → LinkTableConfigModal-9242d750.mjs} +1 -1
- package/{LinkTableFieldConfigModal-17b413b0.mjs → LinkTableFieldConfigModal-24adc50c.mjs} +1 -1
- package/{LinkTableListPiece-2660d709.mjs → LinkTableListPiece-f3a8e0d7.mjs} +1 -1
- package/{ModalFormDemo-0544737d.mjs → ModalFormDemo-711418db.mjs} +1 -1
- package/{OnlCgformErpList-30e416c8.mjs → OnlCgformErpList-58acdfa0.mjs} +121 -121
- package/{OnlCgformErpSubTable-9a876058.mjs → OnlCgformErpSubTable-9b1e1938.mjs} +149 -150
- package/{OnlCgformInnerSubTable-290ace5d.mjs → OnlCgformInnerSubTable-6c23781f.mjs} +96 -97
- package/{OnlCgformInnerTableList-f89b6687.mjs → OnlCgformInnerTableList-4b5e14ed.mjs} +156 -156
- package/{OnlCgformTabList-7a2f2c03.mjs → OnlCgformTabList-019ad753.mjs} +138 -138
- package/{OnlineAutoList-46c6c8b9.mjs → OnlineAutoList-48589d09.mjs} +90 -90
- package/{OnlineAutoModal-971bef13.mjs → OnlineAutoModal-c2928847.mjs} +64 -61
- package/{OnlineAutoTreeList-3b92454c.mjs → OnlineAutoTreeList-3baa1d00.mjs} +20 -19
- package/{OnlineCustomModal-594244f3.mjs → OnlineCustomModal-9e17b6ce.mjs} +8 -8
- package/{OnlineDetailModal-2a271e0b.mjs → OnlineDetailModal-d5895734.mjs} +8 -8
- package/OnlineForm-9f1153ba.mjs +985 -0
- package/{OnlineFormDetail-e036cd11.mjs → OnlineFormDetail-022ca117.mjs} +7 -7
- package/{OnlineFormUrlAdd-7fb3dcca.mjs → OnlineFormUrlAdd-9715d70a.mjs} +10 -10
- package/{OnlineFormUrlDetail-b2292137.mjs → OnlineFormUrlDetail-8f864b1a.mjs} +12 -12
- package/{OnlineFormUrlEdit-44080fb3.mjs → OnlineFormUrlEdit-ac985b36.mjs} +10 -10
- package/{OnlineFormUrlSuccess-af285b02.mjs → OnlineFormUrlSuccess-3dfc54ab.mjs} +1 -1
- package/OnlineQueryForm-eedb9a60.mjs +466 -0
- package/{OnlineSearchFormItem-6feacae6.mjs → OnlineSearchFormItem-6c557343.mjs} +2 -2
- package/{OnlineSelectCascade-471fcc76.mjs → OnlineSelectCascade-05c40fef.mjs} +1 -1
- package/{OnlineSubFormDetail-03f8ee5c.mjs → OnlineSubFormDetail-58e896ce.mjs} +7 -7
- package/{OnlineTabAutoModal-7b9bcd0b.mjs → OnlineTabAutoModal-47b18ad6.mjs} +7 -7
- package/{OnlineTabDetailModal-88143301.mjs → OnlineTabDetailModal-82de1465.mjs} +8 -8
- package/{OnlineTabForm-9ad7d29a.mjs → OnlineTabForm-27655c83.mjs} +236 -224
- package/{OnlineTabFormDetail-bbf23caa.mjs → OnlineTabFormDetail-8d0c40c0.mjs} +7 -7
- package/{PageAttributeTable-6c23547b.mjs → PageAttributeTable-25e3b7da.mjs} +156 -136
- package/{ProcessOnlineForm-b42198f5.mjs → ProcessOnlineForm-148632fe.mjs} +61 -55
- package/{QueryTable-96b3dbd0.mjs → QueryTable-f7bfca7f.mjs} +39 -36
- package/{SetSwitchOptions-a452fa0f.mjs → SetSwitchOptions-b2af757f.mjs} +1 -1
- package/SuperQuery-a8592995.mjs +967 -0
- package/auth.api-ea1d33d4.mjs +41 -0
- package/{auth.data-22948e87.mjs → auth.data-511e5197.mjs} +62 -28
- package/{enhance.data-3304d553.mjs → enhance.data-a67572e1.mjs} +8 -7
- package/index-1d1a6e56.mjs +57 -0
- package/{index-d2abb8a0.mjs → index-30e0e923.mjs} +48 -47
- package/{index-581bef24.mjs → index-f30613d1.mjs} +2 -2
- package/main.index.js +1 -1
- package/package.json +1 -1
- package/style.css +1 -1
- package/{useCgformList-8755a94e.mjs → useCgformList-f41d4dc1.mjs} +1 -1
- package/useExtendComponent-dcae5c78.mjs +4399 -0
- package/{useListButton-7ddb9a46.mjs → useListButton-bfac4ecf.mjs} +45 -45
- package/{useSchemas-47e45edc.mjs → useSchemas-a9c75b0f.mjs} +55 -46
- package/useTableSync-d7e9f18d.mjs +89 -0
- package/AuthButtonConfig-d50a0a65.mjs +0 -134
- package/AuthFieldConfig-490fc0ab.mjs +0 -139
- package/CgformModal-36faf29a.mjs +0 -621
- package/CodeGeneratorModal-b722d976.mjs +0 -238
- package/DbToOnlineModal-f49b9530.mjs +0 -166
- package/JOnlineSearchSelect-34a37ec9.mjs +0 -95
- package/OnlineForm-018981b2.mjs +0 -924
- package/OnlineQueryForm-998c12a4.mjs +0 -444
- package/SuperQuery-cbfba908.mjs +0 -975
- package/auth.api-d3a6c4b3.mjs +0 -39
- package/index-173949bb.mjs +0 -57
- package/useExtendComponent-bb7cca20.mjs +0 -4295
- package/useTableSync-f6089e8a.mjs +0 -87
- /package/{OnlineForm.vue_vue_type_style_index_0_scoped_0f9f2964_lang-4ed993c7.mjs → OnlineForm.vue_vue_type_style_index_0_scoped_4657b304_lang-4ed993c7.mjs} +0 -0
package/CgformModal-36faf29a.mjs
DELETED
|
@@ -1,621 +0,0 @@
|
|
|
1
|
-
var He = Object.defineProperty, Ge = Object.defineProperties;
|
|
2
|
-
var Ye = Object.getOwnPropertyDescriptors;
|
|
3
|
-
var ae = Object.getOwnPropertySymbols;
|
|
4
|
-
var ze = Object.prototype.hasOwnProperty, We = Object.prototype.propertyIsEnumerable;
|
|
5
|
-
var te = (a, n, c) => n in a ? He(a, n, { enumerable: !0, configurable: !0, writable: !0, value: c }) : a[n] = c, A = (a, n) => {
|
|
6
|
-
for (var c in n || (n = {}))
|
|
7
|
-
ze.call(n, c) && te(a, c, n[c]);
|
|
8
|
-
if (ae)
|
|
9
|
-
for (var c of ae(n))
|
|
10
|
-
We.call(n, c) && te(a, c, n[c]);
|
|
11
|
-
return a;
|
|
12
|
-
}, le = (a, n) => Ge(a, Ye(n));
|
|
13
|
-
var F = (a, n, c) => new Promise((I, h) => {
|
|
14
|
-
var m = (T) => {
|
|
15
|
-
try {
|
|
16
|
-
C(c.next(T));
|
|
17
|
-
} catch (p) {
|
|
18
|
-
h(p);
|
|
19
|
-
}
|
|
20
|
-
}, D = (T) => {
|
|
21
|
-
try {
|
|
22
|
-
C(c.throw(T));
|
|
23
|
-
} catch (p) {
|
|
24
|
-
h(p);
|
|
25
|
-
}
|
|
26
|
-
}, C = (T) => T.done ? I(T.value) : Promise.resolve(T.value).then(m, D);
|
|
27
|
-
C((c = c.apply(a, n)).next());
|
|
28
|
-
});
|
|
29
|
-
import { defineComponent as Xe, ref as y, computed as ne, provide as oe, reactive as Ze, nextTick as G, toRaw as ea, resolveComponent as f, openBlock as N, createBlock as Y, mergeProps as aa, withCtx as b, createVNode as u, createTextVNode as w, createElementBlock as ie, Fragment as ta, renderList as la, toDisplayString as na, createCommentVNode as se, createElementVNode as re } from "vue";
|
|
30
|
-
import { Icon as oa } from "/@/components/Icon";
|
|
31
|
-
import { BasicModal as ia, useModalInner as sa, useModal as ra } from "/@/components/Modal";
|
|
32
|
-
import { BasicForm as ua, useForm as da } from "/@/components/Form/index";
|
|
33
|
-
import { useMessage as ca } from "/@/hooks/web/useMessage";
|
|
34
|
-
import { u as ba } from "./useSchemas-47e45edc.mjs";
|
|
35
|
-
import fa from "./DBAttributeTable-95dc66c1.mjs";
|
|
36
|
-
import ma from "./PageAttributeTable-6c23547b.mjs";
|
|
37
|
-
import Ta from "./CheckDictTable-b5cb0e2b.mjs";
|
|
38
|
-
import pa from "./ForeignKeyTable-a78cb5ad.mjs";
|
|
39
|
-
import ga from "./IndexTable-1b496559.mjs";
|
|
40
|
-
import ya from "./QueryTable-96b3dbd0.mjs";
|
|
41
|
-
import va from "./ExtendConfigModal-00f2fb55.mjs";
|
|
42
|
-
import { u as ha, E as Ca, a as Fa, V as O } from "./cgform.data-475d4984.mjs";
|
|
43
|
-
import { defHttp as v } from "/@/utils/http/axios";
|
|
44
|
-
import { simpleDebounce as Da } from "/@/utils/common/compUtils";
|
|
45
|
-
import { u as ka } from "./useOnlineTest-e4bd8be3.mjs";
|
|
46
|
-
import { buildUUID as wa } from "/@/utils/uuid";
|
|
47
|
-
import { sleep as j } from "/@/utils";
|
|
48
|
-
import { g as Ra } from "./useExtendComponent-bb7cca20.mjs";
|
|
49
|
-
import { _ as Ia } from "./index-173949bb.mjs";
|
|
50
|
-
const tt = (a) => v.get({ url: "/online/cgform/head/list", params: a }), lt = (a) => ue(a, 0), nt = (a) => v.delete(
|
|
51
|
-
{ url: "/online/cgform/head/removeRecord", params: { id: a } },
|
|
52
|
-
{ joinParamsToUrl: !0 }
|
|
53
|
-
), ot = (a) => ue(a, 1), it = (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 st = (a, n) => v.post({ url: `/online/cgform/api/doDbSynch/${a}/${n}`, timeout: 12e3, timeoutErrorMessage: "同步数据库超时,已自动刷新" }), rt = (a) => v.post({ url: `/online/cgform/head/copyOnline?code=${a}` }), ut = (a, n, c) => v.get({ url: `/online/cgform/head/copyOnlineTable/${a}`, params: A({ tableName: n }, c) }), L = {
|
|
70
|
-
// 查询表字段 e3e3NcxzbUiGa53YYVXxWc8ADo5ISgQGx/gaZwERF91oAryDlivjqBv3wqRArgChupi+Y/Gg/swwGEyL0PuVFg==
|
|
71
|
-
doQueryField: (a, n) => v.get({ url: "/online/cgform/field/listByHeadId", params: A({ headId: a }, n) }),
|
|
72
|
-
// 查询表index配置
|
|
73
|
-
doQueryIndexes: (a, n) => v.get({ url: "/online/cgform/index/listByHeadId", params: A({ 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
|
-
}, Ba = Xe({
|
|
79
|
-
name: "CgformModal",
|
|
80
|
-
components: {
|
|
81
|
-
BasicModal: ia,
|
|
82
|
-
BasicForm: ua,
|
|
83
|
-
DBAttributeTable: fa,
|
|
84
|
-
PageAttributeTable: ma,
|
|
85
|
-
CheckDictTable: Ta,
|
|
86
|
-
ForeignKeyTable: pa,
|
|
87
|
-
IndexTable: ga,
|
|
88
|
-
QueryTable: ya,
|
|
89
|
-
ExtendConfigModal: va,
|
|
90
|
-
Icon: oa
|
|
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 } = ca(), I = y(), h = y(!1);
|
|
102
|
-
let m = {};
|
|
103
|
-
const D = ne(() => h.value ? "编辑" : "新增"), C = y(!0), T = y(!1), p = y("dbTable"), B = y(!0), s = {
|
|
104
|
-
dbTable: y(),
|
|
105
|
-
pageTable: y(),
|
|
106
|
-
checkTable: y(),
|
|
107
|
-
fkTable: y(),
|
|
108
|
-
idxTable: y(),
|
|
109
|
-
queryTable: y()
|
|
110
|
-
}, Q = ne(() => {
|
|
111
|
-
var e, t;
|
|
112
|
-
return (t = (e = I.value) == null ? void 0 : e.fullScreenRef) != null ? t : !1;
|
|
113
|
-
});
|
|
114
|
-
oe("tables", s), oe("fullScreenRef", Q);
|
|
115
|
-
const S = { value: {} }, { formSchemas: $ } = ba(a, S, {
|
|
116
|
-
onTableTypeChange: Fe,
|
|
117
|
-
onIsTreeChange: De,
|
|
118
|
-
ifShowOfSubTableStr: () => W
|
|
119
|
-
}), [J, R] = da({
|
|
120
|
-
schemas: $,
|
|
121
|
-
showActionButtonGroup: !1,
|
|
122
|
-
labelAlign: "right"
|
|
123
|
-
}), { resetFields: K, setFieldsValue: _, validate: q } = R, [U, { closeModal: V }] = sa((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) : pe();
|
|
126
|
-
}), M = y("");
|
|
127
|
-
let r = Ze({});
|
|
128
|
-
const x = Da(() => ke(), 150);
|
|
129
|
-
let z = [], W = !1, P = !1, k = [];
|
|
130
|
-
const { aiTestMode: de, aiTestTable: ce, aiTableList: be, initVirtualData: fe, tableJsonGetHelper: me, refreshCacheTableName: Te } = ka();
|
|
131
|
-
function pe() {
|
|
132
|
-
X({});
|
|
133
|
-
}
|
|
134
|
-
function X(e) {
|
|
135
|
-
return F(this, null, function* () {
|
|
136
|
-
var t;
|
|
137
|
-
if (C.value = !1, p.value = "dbTable", yield K(), m = Object.assign({}, e), he(m), me(m), ve(m), _(m), M.value = m.tableName, j(1, () => B.value = !1), h.value)
|
|
138
|
-
(t = s.dbTable.value) == null || t.setDataSource([]), yield ge(m.id), yield ye(m.id), Ra(s.pageTable).then(() => {
|
|
139
|
-
s.pageTable.value.changePageType(m.tableType == 3);
|
|
140
|
-
});
|
|
141
|
-
else {
|
|
142
|
-
let { initialData: l, tempIds: o } = ha();
|
|
143
|
-
yield Z(l, !0), z = o;
|
|
144
|
-
}
|
|
145
|
-
});
|
|
146
|
-
}
|
|
147
|
-
function ge(e) {
|
|
148
|
-
return F(this, null, function* () {
|
|
149
|
-
T.value = !0;
|
|
150
|
-
try {
|
|
151
|
-
let t = yield L.doQueryField(e);
|
|
152
|
-
T.value = !1, yield Z(t);
|
|
153
|
-
} finally {
|
|
154
|
-
T.value = !1;
|
|
155
|
-
}
|
|
156
|
-
});
|
|
157
|
-
}
|
|
158
|
-
function ye(e) {
|
|
159
|
-
return F(this, null, function* () {
|
|
160
|
-
let t = yield L.doQueryIndexes(e);
|
|
161
|
-
s.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
|
-
r = Object.assign({}, Ca, t, {
|
|
172
|
-
isDesForm: e.isDesForm || "N",
|
|
173
|
-
desFormCode: e.desFormCode || ""
|
|
174
|
-
}), S.value = r;
|
|
175
|
-
}
|
|
176
|
-
function he(e) {
|
|
177
|
-
P = 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: d, fkTable: i, queryTable: g } = s;
|
|
182
|
-
l.value || (yield G(), yield j(1)), l.value.setDataSource(e, t), setTimeout(() => {
|
|
183
|
-
o.value.setDataSource(e, t), d.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 = s.dbTable, l = s[e];
|
|
190
|
-
t.value.tableRef.resetScrollTop(), l.value.syncTable(t);
|
|
191
|
-
}
|
|
192
|
-
}
|
|
193
|
-
function Fe(e) {
|
|
194
|
-
e === 1 && _({ themeTemplate: "normal" }), s.pageTable.value.changePageType(e == 3);
|
|
195
|
-
}
|
|
196
|
-
function De(e) {
|
|
197
|
-
e === "Y" ? Oe() : Me();
|
|
198
|
-
}
|
|
199
|
-
function H() {
|
|
200
|
-
x();
|
|
201
|
-
}
|
|
202
|
-
function ke() {
|
|
203
|
-
return F(this, null, function* () {
|
|
204
|
-
let { dbTable: e, pageTable: t, checkTable: l, fkTable: o, queryTable: d } = s;
|
|
205
|
-
yield t.value.syncTable(e), yield l.value.syncTable(e), yield o.value.syncTable(e), yield d.value.syncTable(e);
|
|
206
|
-
});
|
|
207
|
-
}
|
|
208
|
-
function we() {
|
|
209
|
-
H();
|
|
210
|
-
}
|
|
211
|
-
function Re() {
|
|
212
|
-
H();
|
|
213
|
-
}
|
|
214
|
-
function Ie(e) {
|
|
215
|
-
let { oldIndex: t, newIndex: l } = e;
|
|
216
|
-
Se(t, l);
|
|
217
|
-
}
|
|
218
|
-
function Be(e) {
|
|
219
|
-
return F(this, null, function* () {
|
|
220
|
-
let { insertIndex: t, row: l } = e, { pageTable: o, checkTable: d, fkTable: i, queryTable: g } = s;
|
|
221
|
-
o.value.tableRef.insertRows(l, t), d.value.tableRef.insertRows(l, t), i.value.tableRef.insertRows(l, t), g.value.tableRef.insertRows(l, t);
|
|
222
|
-
});
|
|
223
|
-
}
|
|
224
|
-
function Se(e, t) {
|
|
225
|
-
let { pageTable: l, checkTable: o, fkTable: d, queryTable: i } = s;
|
|
226
|
-
l.value.tableRef.rowResort(e, t), o.value.tableRef.rowResort(e, t), d.value.tableRef.rowResort(e, t), i.value.tableRef.rowResort(e, t);
|
|
227
|
-
}
|
|
228
|
-
function _e(e) {
|
|
229
|
-
s.pageTable.value.syncFieldShowType(e.row);
|
|
230
|
-
}
|
|
231
|
-
function Ee(e) {
|
|
232
|
-
s.pageTable.value.syncIsQuery(e.row);
|
|
233
|
-
}
|
|
234
|
-
function Ae(e) {
|
|
235
|
-
s.checkTable.value.syncFieldMustInput(e.row);
|
|
236
|
-
}
|
|
237
|
-
function Ne(e) {
|
|
238
|
-
s.pageTable.value.enableQuery(e);
|
|
239
|
-
}
|
|
240
|
-
function Oe() {
|
|
241
|
-
if (!P) {
|
|
242
|
-
let { dbTable: e, pageTable: t, checkTable: l } = s, o = Fa();
|
|
243
|
-
o = o.filter((d) => !e.value.tableRef.getTableData().map((g) => g.dbFieldName).includes(d.dbFieldName)), k = [], o.forEach((d) => {
|
|
244
|
-
let i = wa() + "__tempId";
|
|
245
|
-
k.push(i), d.id = i;
|
|
246
|
-
}), e.value.tableRef.addRows(o, { setActive: !1 }), t.value.tableRef.addRows(o, { setActive: !1 }), l.value.tableRef.addRows(o, { setActive: !1 }), G(() => H()), P = !0;
|
|
247
|
-
}
|
|
248
|
-
G(() => {
|
|
249
|
-
R.setFieldsValue({
|
|
250
|
-
treeIdField: "has_child",
|
|
251
|
-
treeParentIdField: "pid"
|
|
252
|
-
});
|
|
253
|
-
});
|
|
254
|
-
}
|
|
255
|
-
function Me() {
|
|
256
|
-
if (k && k.length > 0) {
|
|
257
|
-
let { dbTable: e } = s;
|
|
258
|
-
e.value.tableDeleteLines(k), k = [], P = !1;
|
|
259
|
-
}
|
|
260
|
-
}
|
|
261
|
-
function Pe() {
|
|
262
|
-
let e = {};
|
|
263
|
-
return new Promise((t, l) => {
|
|
264
|
-
q().then(
|
|
265
|
-
(o) => t({ values: o }),
|
|
266
|
-
() => l(O)
|
|
267
|
-
);
|
|
268
|
-
}).then((t) => (Object.assign(e, t), je())).then((t) => {
|
|
269
|
-
Object.assign(e, t);
|
|
270
|
-
let l = Le(e);
|
|
271
|
-
return Qe(l);
|
|
272
|
-
}).catch((t) => (t === O || (t == null ? void 0 : t.code) === O ? c.warning("校验未通过") : t != null && t.msg && c.warning(t.msg), Promise.reject(null)));
|
|
273
|
-
}
|
|
274
|
-
function je() {
|
|
275
|
-
return new Promise((e, t) => F(this, null, function* () {
|
|
276
|
-
let l = Object.keys(s), o = {};
|
|
277
|
-
for (let d = 0; d < l.length; d++) {
|
|
278
|
-
let i = l[d], g = s[i];
|
|
279
|
-
try {
|
|
280
|
-
o[i] = yield g.value.validateData(i);
|
|
281
|
-
} catch (E) {
|
|
282
|
-
E.code === O && (p.value = E.activeKey), t(E);
|
|
283
|
-
return;
|
|
284
|
-
}
|
|
285
|
-
}
|
|
286
|
-
e(o);
|
|
287
|
-
}));
|
|
288
|
-
}
|
|
289
|
-
function Le(e) {
|
|
290
|
-
let t = {
|
|
291
|
-
head: {},
|
|
292
|
-
fields: [],
|
|
293
|
-
indexs: [],
|
|
294
|
-
deleteFieldIds: [],
|
|
295
|
-
deleteIndexIds: []
|
|
296
|
-
};
|
|
297
|
-
return t.head = Object.assign(m, e.values), t.head.isDesForm = r.isDesForm, t.head.desFormCode = r.desFormCode, delete r.isDesForm, delete r.desFormCode, t.head.extConfigJson = JSON.stringify(r), e.dbTable.tableData.forEach((l, o) => {
|
|
298
|
-
let d = l.id, i = Object.assign({}, l), g = e.pageTable.tableData[o];
|
|
299
|
-
i = Object.assign(g, i);
|
|
300
|
-
let E = e.checkTable.tableData[o];
|
|
301
|
-
i = Object.assign(E, i);
|
|
302
|
-
let Ve = e.fkTable.tableData[o];
|
|
303
|
-
i = Object.assign(Ve, i);
|
|
304
|
-
let xe = e.queryTable.tableData[o];
|
|
305
|
-
i = Object.assign(xe, i), d == null || d === "" ? delete i.id : i.id = d, [].concat(z, k).includes(i.id) && delete i.id, t.fields.push(i);
|
|
306
|
-
}), t.deleteFieldIds = e.dbTable.deleteIds, t.indexs = e.idxTable.tableData, t.deleteIndexIds = e.idxTable.deleteIds, t;
|
|
307
|
-
}
|
|
308
|
-
function Qe(e) {
|
|
309
|
-
return new Promise((t, l) => {
|
|
310
|
-
let o = e.fields, d = !0;
|
|
311
|
-
if (o && o.length > 0) {
|
|
312
|
-
let i = 0;
|
|
313
|
-
for (let g = 0; g < o.length; g++)
|
|
314
|
-
if ((o[g].mainField || o[g].mainTable) && (i += 1), i > 1) {
|
|
315
|
-
d = !1;
|
|
316
|
-
break;
|
|
317
|
-
}
|
|
318
|
-
}
|
|
319
|
-
d ? t(e) : l({
|
|
320
|
-
code: -1,
|
|
321
|
-
msg: "外键只允许配置一个!",
|
|
322
|
-
error: O
|
|
323
|
-
});
|
|
324
|
-
});
|
|
325
|
-
}
|
|
326
|
-
function $e() {
|
|
327
|
-
C.value = !0, Pe().then(
|
|
328
|
-
(e) => F(this, null, function* () {
|
|
329
|
-
var t;
|
|
330
|
-
if (e.fields && e.fields.length > 0)
|
|
331
|
-
for (let l of e.fields)
|
|
332
|
-
l.dbFieldName = l.dbFieldName.toLowerCase().trim();
|
|
333
|
-
(t = e.head) != null && t.tableName && (e.head.tableName = e.head.tableName.toLowerCase().trim()), yield L.doSaveOrUpdate(e, h.value), Te(M.value, e.head.tableName), n("success"), j(1, () => ee());
|
|
334
|
-
}),
|
|
335
|
-
(e) => {
|
|
336
|
-
}
|
|
337
|
-
).finally(() => {
|
|
338
|
-
C.value = !1;
|
|
339
|
-
});
|
|
340
|
-
}
|
|
341
|
-
const [Je, Ke] = ra();
|
|
342
|
-
function qe(e) {
|
|
343
|
-
return F(this, null, function* () {
|
|
344
|
-
if (S.value = e, e.joinQuery == 0 && R.validateFields(["themeTemplate"]), r = e, h.value == !0) {
|
|
345
|
-
let t = ea(r);
|
|
346
|
-
const l = {
|
|
347
|
-
id: m.id,
|
|
348
|
-
extConfigJson: JSON.stringify(t)
|
|
349
|
-
};
|
|
350
|
-
yield L.editHead(l), n("success");
|
|
351
|
-
}
|
|
352
|
-
});
|
|
353
|
-
}
|
|
354
|
-
function Ue() {
|
|
355
|
-
Ke.openModal(!0, {
|
|
356
|
-
extConfigJson: r
|
|
357
|
-
});
|
|
358
|
-
}
|
|
359
|
-
function ee() {
|
|
360
|
-
B.value = !0, j(1, () => V());
|
|
361
|
-
}
|
|
362
|
-
return le(A({}, s), {
|
|
363
|
-
modalRef: I,
|
|
364
|
-
title: D,
|
|
365
|
-
confirmLoading: C,
|
|
366
|
-
tableLoading: T,
|
|
367
|
-
activeKey: p,
|
|
368
|
-
onCancel: ee,
|
|
369
|
-
extConfigJson: r,
|
|
370
|
-
formAction: R,
|
|
371
|
-
hideTabs: B,
|
|
372
|
-
onSubmit: $e,
|
|
373
|
-
onTabsChange: Ce,
|
|
374
|
-
onTableAdded: we,
|
|
375
|
-
onTableRemoved: Re,
|
|
376
|
-
onTableDragged: Ie,
|
|
377
|
-
onTableInserted: Be,
|
|
378
|
-
onTableSyncDbType: _e,
|
|
379
|
-
onTableQuery: Ne,
|
|
380
|
-
onOpenExtConfig: Ue,
|
|
381
|
-
onExtConfigOk: qe,
|
|
382
|
-
registerForm: J,
|
|
383
|
-
registerModal: U,
|
|
384
|
-
registerExtendConfigModal: Je,
|
|
385
|
-
// hook OnlineTest
|
|
386
|
-
aiTestMode: de,
|
|
387
|
-
aiTestTable: ce,
|
|
388
|
-
aiTableList: be,
|
|
389
|
-
initVirtualData: fe,
|
|
390
|
-
onTableSyncDbIsPersist: Ee,
|
|
391
|
-
onTableSyncDbIsNull: Ae
|
|
392
|
-
});
|
|
393
|
-
}
|
|
394
|
-
}), Sa = { style: { flex: "1", "text-align": "right" } }, _a = {
|
|
395
|
-
key: 0,
|
|
396
|
-
style: { display: "inline-block", "text-align": "left", position: "absolute", left: "0" }
|
|
397
|
-
};
|
|
398
|
-
function Ea(a, n, c, I, h, m) {
|
|
399
|
-
const D = f("a-button"), C = f("BasicForm"), T = f("DBAttributeTable"), p = f("a-tab-pane"), B = f("PageAttributeTable"), s = f("CheckDictTable"), Q = f("ForeignKeyTable"), S = f("IndexTable"), $ = f("Icon"), J = f("a-tooltip"), R = f("QueryTable"), K = f("a-tabs"), _ = f("a-spin"), q = f("a-select-option"), U = f("a-select"), V = f("ExtendConfigModal"), M = f("BasicModal");
|
|
400
|
-
return N(), Y(M, aa({
|
|
401
|
-
ref: "modalRef",
|
|
402
|
-
title: a.title,
|
|
403
|
-
width: 1200,
|
|
404
|
-
maskClosable: !1,
|
|
405
|
-
defaultFullscreen: !0,
|
|
406
|
-
confirmLoading: a.confirmLoading
|
|
407
|
-
}, a.$attrs, {
|
|
408
|
-
onCancel: a.onCancel,
|
|
409
|
-
onRegister: a.registerModal
|
|
410
|
-
}), {
|
|
411
|
-
footer: b(() => [
|
|
412
|
-
u(D, { onClick: a.onCancel }, {
|
|
413
|
-
default: b(() => [
|
|
414
|
-
w("关闭")
|
|
415
|
-
]),
|
|
416
|
-
_: 1
|
|
417
|
-
}, 8, ["onClick"]),
|
|
418
|
-
u(D, {
|
|
419
|
-
type: "primary",
|
|
420
|
-
loading: a.confirmLoading,
|
|
421
|
-
preIcon: "ant-design:save",
|
|
422
|
-
onClick: a.onSubmit
|
|
423
|
-
}, {
|
|
424
|
-
default: b(() => [
|
|
425
|
-
w("保存")
|
|
426
|
-
]),
|
|
427
|
-
_: 1
|
|
428
|
-
}, 8, ["loading", "onClick"]),
|
|
429
|
-
a.aiTestMode ? (N(), ie("div", _a, [
|
|
430
|
-
u(U, {
|
|
431
|
-
value: a.aiTestTable,
|
|
432
|
-
"onUpdate:value": n[1] || (n[1] = (r) => a.aiTestTable = r),
|
|
433
|
-
placeholder: "请选择测试的数据模型",
|
|
434
|
-
getPopupContainer: (r) => r == null ? void 0 : r.parentElement,
|
|
435
|
-
style: { width: "350px", margin: "0 10px 0 20px" }
|
|
436
|
-
}, {
|
|
437
|
-
default: b(() => [
|
|
438
|
-
(N(!0), ie(ta, null, la(a.aiTableList, (r, x) => (N(), Y(q, {
|
|
439
|
-
key: x,
|
|
440
|
-
value: r.name
|
|
441
|
-
}, {
|
|
442
|
-
default: b(() => [
|
|
443
|
-
w(na(r.title + "(" + r.name + ")"), 1)
|
|
444
|
-
]),
|
|
445
|
-
_: 2
|
|
446
|
-
}, 1032, ["value"]))), 128))
|
|
447
|
-
]),
|
|
448
|
-
_: 1
|
|
449
|
-
}, 8, ["value", "getPopupContainer"]),
|
|
450
|
-
u(D, {
|
|
451
|
-
type: "primary",
|
|
452
|
-
ghost: "",
|
|
453
|
-
onClick: a.initVirtualData
|
|
454
|
-
}, {
|
|
455
|
-
default: b(() => [
|
|
456
|
-
w("生成数据>>")
|
|
457
|
-
]),
|
|
458
|
-
_: 1
|
|
459
|
-
}, 8, ["onClick"])
|
|
460
|
-
])) : se("", !0)
|
|
461
|
-
]),
|
|
462
|
-
default: b(() => [
|
|
463
|
-
u(_, {
|
|
464
|
-
wrapperClassName: "p-2",
|
|
465
|
-
spinning: a.confirmLoading
|
|
466
|
-
}, {
|
|
467
|
-
default: b(() => [
|
|
468
|
-
u(C, { onRegister: a.registerForm }, {
|
|
469
|
-
extConfigButton: b(() => [
|
|
470
|
-
re("div", Sa, [
|
|
471
|
-
u(D, {
|
|
472
|
-
preIcon: "ant-design:setting",
|
|
473
|
-
onClick: a.onOpenExtConfig
|
|
474
|
-
}, {
|
|
475
|
-
default: b(() => [
|
|
476
|
-
w("扩展配置")
|
|
477
|
-
]),
|
|
478
|
-
_: 1
|
|
479
|
-
}, 8, ["onClick"])
|
|
480
|
-
])
|
|
481
|
-
]),
|
|
482
|
-
_: 1
|
|
483
|
-
}, 8, ["onRegister"]),
|
|
484
|
-
u(_, {
|
|
485
|
-
spinning: a.tableLoading || a.hideTabs
|
|
486
|
-
}, {
|
|
487
|
-
default: b(() => [
|
|
488
|
-
a.hideTabs ? se("", !0) : (N(), Y(K, {
|
|
489
|
-
key: 0,
|
|
490
|
-
activeKey: a.activeKey,
|
|
491
|
-
"onUpdate:activeKey": n[0] || (n[0] = (r) => a.activeKey = r),
|
|
492
|
-
animated: "",
|
|
493
|
-
onChange: a.onTabsChange
|
|
494
|
-
}, {
|
|
495
|
-
default: b(() => [
|
|
496
|
-
u(p, {
|
|
497
|
-
tab: "数据库属性",
|
|
498
|
-
key: "dbTable",
|
|
499
|
-
forceRender: ""
|
|
500
|
-
}, {
|
|
501
|
-
default: b(() => [
|
|
502
|
-
u(T, {
|
|
503
|
-
ref: "dbTable",
|
|
504
|
-
actionButton: a.actionButton,
|
|
505
|
-
onAdded: a.onTableAdded,
|
|
506
|
-
onRemoved: a.onTableRemoved,
|
|
507
|
-
onDragged: a.onTableDragged,
|
|
508
|
-
onInserted: a.onTableInserted,
|
|
509
|
-
onSyncDbType: a.onTableSyncDbType,
|
|
510
|
-
onSyncDbIsPersist: a.onTableSyncDbIsPersist,
|
|
511
|
-
onSyncDbIsNull: a.onTableSyncDbIsNull
|
|
512
|
-
}, null, 8, ["actionButton", "onAdded", "onRemoved", "onDragged", "onInserted", "onSyncDbType", "onSyncDbIsPersist", "onSyncDbIsNull"])
|
|
513
|
-
]),
|
|
514
|
-
_: 1
|
|
515
|
-
}),
|
|
516
|
-
u(p, {
|
|
517
|
-
tab: "页面属性",
|
|
518
|
-
key: "pageTable",
|
|
519
|
-
forceRender: ""
|
|
520
|
-
}, {
|
|
521
|
-
default: b(() => [
|
|
522
|
-
u(B, { ref: "pageTable" }, null, 512)
|
|
523
|
-
]),
|
|
524
|
-
_: 1
|
|
525
|
-
}),
|
|
526
|
-
u(p, {
|
|
527
|
-
tab: "校验字段",
|
|
528
|
-
key: "checkTable",
|
|
529
|
-
forceRender: ""
|
|
530
|
-
}, {
|
|
531
|
-
default: b(() => [
|
|
532
|
-
u(s, { ref: "checkTable" }, null, 512)
|
|
533
|
-
]),
|
|
534
|
-
_: 1
|
|
535
|
-
}),
|
|
536
|
-
u(p, {
|
|
537
|
-
tab: "外键",
|
|
538
|
-
key: "fkTable",
|
|
539
|
-
forceRender: ""
|
|
540
|
-
}, {
|
|
541
|
-
default: b(() => [
|
|
542
|
-
u(Q, {
|
|
543
|
-
ref: "fkTable",
|
|
544
|
-
actionButton: a.actionButton
|
|
545
|
-
}, null, 8, ["actionButton"])
|
|
546
|
-
]),
|
|
547
|
-
_: 1
|
|
548
|
-
}),
|
|
549
|
-
u(p, {
|
|
550
|
-
tab: "索引",
|
|
551
|
-
key: "idxTable",
|
|
552
|
-
forceRender: ""
|
|
553
|
-
}, {
|
|
554
|
-
default: b(() => [
|
|
555
|
-
u(S, {
|
|
556
|
-
ref: "idxTable",
|
|
557
|
-
actionButton: a.actionButton
|
|
558
|
-
}, null, 8, ["actionButton"])
|
|
559
|
-
]),
|
|
560
|
-
_: 1
|
|
561
|
-
}),
|
|
562
|
-
u(p, {
|
|
563
|
-
key: "queryTable",
|
|
564
|
-
forceRender: ""
|
|
565
|
-
}, {
|
|
566
|
-
tab: b(() => [
|
|
567
|
-
re("span", null, [
|
|
568
|
-
w(" 个性查询配置 "),
|
|
569
|
-
u(J, null, {
|
|
570
|
-
title: b(() => [
|
|
571
|
-
w("允许自定义,查询表单字段控件类型!")
|
|
572
|
-
]),
|
|
573
|
-
default: b(() => [
|
|
574
|
-
u($, { icon: "bx:help-circle" })
|
|
575
|
-
]),
|
|
576
|
-
_: 1
|
|
577
|
-
})
|
|
578
|
-
])
|
|
579
|
-
]),
|
|
580
|
-
default: b(() => [
|
|
581
|
-
u(R, {
|
|
582
|
-
ref: "queryTable",
|
|
583
|
-
onQuery: a.onTableQuery
|
|
584
|
-
}, null, 8, ["onQuery"])
|
|
585
|
-
]),
|
|
586
|
-
_: 1
|
|
587
|
-
})
|
|
588
|
-
]),
|
|
589
|
-
_: 1
|
|
590
|
-
}, 8, ["activeKey", "onChange"]))
|
|
591
|
-
]),
|
|
592
|
-
_: 1
|
|
593
|
-
}, 8, ["spinning"])
|
|
594
|
-
]),
|
|
595
|
-
_: 1
|
|
596
|
-
}, 8, ["spinning"]),
|
|
597
|
-
u(V, {
|
|
598
|
-
onRegister: a.registerExtendConfigModal,
|
|
599
|
-
parentForm: a.formAction,
|
|
600
|
-
onOk: a.onExtConfigOk
|
|
601
|
-
}, null, 8, ["onRegister", "parentForm", "onOk"])
|
|
602
|
-
]),
|
|
603
|
-
_: 1
|
|
604
|
-
}, 16, ["title", "confirmLoading", "onCancel", "onRegister"]);
|
|
605
|
-
}
|
|
606
|
-
const Aa = /* @__PURE__ */ Ia(Ba, [["render", Ea]]), dt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
607
|
-
__proto__: null,
|
|
608
|
-
default: Aa
|
|
609
|
-
}, Symbol.toStringTag, { value: "Module" }));
|
|
610
|
-
export {
|
|
611
|
-
Aa as C,
|
|
612
|
-
it as a,
|
|
613
|
-
nt as b,
|
|
614
|
-
lt as c,
|
|
615
|
-
rt as d,
|
|
616
|
-
ot as e,
|
|
617
|
-
st as f,
|
|
618
|
-
ut as g,
|
|
619
|
-
dt as h,
|
|
620
|
-
tt as l
|
|
621
|
-
};
|