@jeecg/online 3.5.3-vite4 → 3.6.2-beta
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/{AuthButtonConfig-2f71787c.mjs → AuthButtonConfig-244ec09f.mjs} +1 -1
- package/{AuthButtonTree-d73bccf5.mjs → AuthButtonTree-3aa0ed49.mjs} +1 -1
- package/{AuthDataConfig-32cf23d2.mjs → AuthDataConfig-83891eea.mjs} +1 -1
- package/{AuthDataTree-03d62d3f.mjs → AuthDataTree-94e026e3.mjs} +1 -1
- package/{AuthFieldConfig-b1217a0c.mjs → AuthFieldConfig-6b21915c.mjs} +1 -1
- package/{AuthFieldTree-888e04a9.mjs → AuthFieldTree-69864163.mjs} +1 -1
- package/{AuthManagerDrawer-f127b8a2.mjs → AuthManagerDrawer-300dd4e4.mjs} +4 -4
- package/{AuthSetterModal-37da78ed.mjs → AuthSetterModal-a414fb35.mjs} +58 -52
- package/{CgformCopyList-3adab58f.mjs → CgformCopyList-14b76108.mjs} +42 -39
- package/CgformModal-eccfc38e.mjs +611 -0
- package/{CgreportModal-77ec8c17.mjs → CgreportModal-2065f5a9.mjs} +2 -1
- package/{CgreportModal.vue_vue_type_script_setup_true_lang-52dcec5e.mjs → CgreportModal.vue_vue_type_script_setup_true_lang-c89d9222.mjs} +170 -171
- package/{CheckDictTable-414313f2.mjs → CheckDictTable-134cbb83.mjs} +3 -3
- package/{CodeFileListModal-4831ce3d.mjs → CodeFileListModal-a6d3290d.mjs} +2 -2
- package/{CodeFileViewModal-5990dac4.mjs → CodeFileViewModal-373e8058.mjs} +2 -2
- package/{CodeGeneratorModal-7df9e25d.mjs → CodeGeneratorModal-f08a89cd.mjs} +5 -6
- package/{CustomButtonList-1c9bd859.mjs → CustomButtonList-02e3d897.mjs} +2 -2
- package/{DBAttributeTable-cd1c41e5.mjs → DBAttributeTable-370de07b.mjs} +2 -2
- package/{DbToOnlineModal-dc5d2030.mjs → DbToOnlineModal-9f13956f.mjs} +35 -35
- package/{DetailForm-e4538e7a.mjs → DetailForm-424638eb.mjs} +179 -163
- package/{EnhanceJavaModal-7f53d2ca.mjs → EnhanceJavaModal-f63aa2d3.mjs} +17 -13
- package/{EnhanceJsHistory-c30805ce.mjs → EnhanceJsHistory-352b46b1.mjs} +1 -1
- package/EnhanceJsModal-05c73a59.mjs +311 -0
- package/{EnhanceSqlModal-33a94c83.mjs → EnhanceSqlModal-5e4ae84f.mjs} +55 -46
- package/{ExtendConfigModal-60f2cf86.mjs → ExtendConfigModal-1dde390a.mjs} +2 -2
- package/FieldExtendJsonModal-a70a9ccd.mjs +219 -0
- package/FileSelectModal-9a02560b.mjs +103 -0
- package/{ForeignKeyTable-cb1abd1d.mjs → ForeignKeyTable-6a843c4b.mjs} +2 -2
- package/{IndexTable-4e94cd1f.mjs → IndexTable-f8af9d44.mjs} +2 -2
- package/JModalTip-33c7dc44.mjs +49 -0
- package/{JOnlineSearchSelect-5608a5cf.mjs → JOnlineSearchSelect-c287af12.mjs} +17 -16
- package/{LeftDepart-ca7a7375.mjs → LeftDepart-fa85523d.mjs} +1 -1
- package/{LeftRole-d0fa8398.mjs → LeftRole-8b8dfe21.mjs} +1 -1
- package/{LeftUser-0c88c240.mjs → LeftUser-dc24ef2f.mjs} +1 -1
- package/{LinkTableConfigModal-77d7c0b9.mjs → LinkTableConfigModal-d4fbdef2.mjs} +23 -23
- package/{LinkTableFieldConfigModal-c5689ab0.mjs → LinkTableFieldConfigModal-787bc55c.mjs} +44 -46
- package/LinkTableListPiece-8499a318.mjs +34 -0
- package/{ModalFormDemo-0eeea994.mjs → ModalFormDemo-977a49eb.mjs} +1 -1
- package/OnlCgformErpList-db45e22b.mjs +454 -0
- package/OnlCgformErpSubTable-54b50eec.mjs +403 -0
- package/OnlCgformInnerSubTable-fbca73e0.mjs +253 -0
- package/OnlCgformInnerTableList-782eaf04.mjs +444 -0
- package/OnlCgformTabList-a9e1e36a.mjs +395 -0
- package/OnlineAutoList-0583a910.mjs +479 -0
- package/{OnlineAutoModal-2a146238.mjs → OnlineAutoModal-510991eb.mjs} +59 -58
- package/{OnlineAutoTreeList-f8d0e100.mjs → OnlineAutoTreeList-89265688.mjs} +158 -153
- package/{OnlineCustomModal-456a85a6.mjs → OnlineCustomModal-518ad33c.mjs} +67 -66
- package/{OnlineDetailModal-f967f080.mjs → OnlineDetailModal-9675390d.mjs} +40 -39
- package/OnlineForm-1fa2d893.mjs +750 -0
- package/{OnlineFormDetail-1b216792.mjs → OnlineFormDetail-0e7294ca.mjs} +56 -55
- package/OnlineQueryForm-1bfc8320.mjs +386 -0
- package/{OnlineSearchFormItem-7c2ea9ed.mjs → OnlineSearchFormItem-0cc85a8a.mjs} +83 -87
- package/{OnlineSelectCascade-c7baf52b.mjs → OnlineSelectCascade-4265c95d.mjs} +31 -32
- package/{OnlineSubFormDetail-0aa4966c.mjs → OnlineSubFormDetail-f0d2c016.mjs} +53 -50
- package/OnlineTabAutoModal-6f636ee2.mjs +254 -0
- package/OnlineTabDetailModal-7356d3a8.mjs +223 -0
- package/OnlineTabForm-512d3951.mjs +766 -0
- package/OnlineTabFormDetail-5a70219d.mjs +324 -0
- package/{PageAttributeTable-811185fd.mjs → PageAttributeTable-965dc58e.mjs} +20 -20
- package/{ProcessOnlineForm-27be6f6f.mjs → ProcessOnlineForm-67558898.mjs} +39 -38
- package/{QueryTable-4ba771ef.mjs → QueryTable-eb9a5b21.mjs} +2 -2
- package/README.md +5 -2
- package/{SuperQuery-3821f984.mjs → SuperQuery-5d1ca957.mjs} +171 -173
- package/{SuperQueryValComponent-471110b5.mjs → SuperQueryValComponent-7ad86d4b.mjs} +1 -1
- package/SuperQueryValComponent.vue_vue_type_script_lang-e9196096.mjs +101 -0
- package/cgformState-d9f8ec42.mjs +28 -0
- package/constant-754f1a9d.mjs +9 -0
- package/index-0e3ab3af.mjs +56 -0
- package/{index-074b92e5.mjs → index-49508cad.mjs} +4 -3
- package/index-b7a05eef.mjs +1496 -0
- package/main.index.js +1 -1
- package/package.json +1 -1
- package/style.css +1 -1
- package/useCgformList-423282b7.mjs +400 -0
- package/useCustomHook-acb00837.mjs +53 -0
- package/useExtendComponent-325fe3f1.mjs +3926 -0
- package/useListButton-cdbab702.mjs +676 -0
- package/useOnlinePopEvent-687070b7.mjs +19 -0
- package/useOnlineTest-e4bd8be3.mjs +42 -0
- package/{useSchemas-fc8d97ce.mjs → useSchemas-0433a403.mjs} +129 -109
- package/{useTableSync-dc333087.mjs → useTableSync-774c3774.mjs} +17 -13
- package/CgformModal-6938d8c2.mjs +0 -613
- package/EnhanceJsModal-0b133341.mjs +0 -233
- package/FieldExtendJsonModal-48f7d67f.mjs +0 -220
- package/FileSelectModal-64aaf623.mjs +0 -91
- package/JModalTip-abe1515a.mjs +0 -46
- package/LinkTableListPiece-34266919.mjs +0 -34
- package/OnlCgformErpList-7a0388d8.mjs +0 -425
- package/OnlCgformErpSubTable-fc6ade76.mjs +0 -388
- package/OnlineAutoList-85e6a30d.mjs +0 -472
- package/OnlineForm-630a22c2.mjs +0 -778
- package/OnlineQueryForm-1c5949a7.mjs +0 -378
- package/SuperQueryValComponent.vue_vue_type_script_lang-e3ad7ee8.mjs +0 -101
- package/constant-fe20103a.mjs +0 -6
- package/index-6a09a912.mjs +0 -58
- package/index-9d32ae88.mjs +0 -313
- package/useCgformList-2d6a5955.mjs +0 -388
- package/useExtendComponent-48d37d9b.mjs +0 -3919
- package/useListButton-cef1371a.mjs +0 -656
- package/useOnlinePopEvent-e9a042f8.mjs +0 -19
- package/useOnlineTest-0df0ae86.mjs +0 -43
package/CgformModal-6938d8c2.mjs
DELETED
|
@@ -1,613 +0,0 @@
|
|
|
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
|
-
};
|