@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
|
@@ -0,0 +1,611 @@
|
|
|
1
|
+
var Ue = Object.defineProperty, Ve = Object.defineProperties;
|
|
2
|
+
var He = Object.getOwnPropertyDescriptors;
|
|
3
|
+
var ae = Object.getOwnPropertySymbols;
|
|
4
|
+
var Ge = Object.prototype.hasOwnProperty, Ye = Object.prototype.propertyIsEnumerable;
|
|
5
|
+
var te = (a, n, d) => n in a ? Ue(a, n, { enumerable: !0, configurable: !0, writable: !0, value: d }) : a[n] = d, E = (a, n) => {
|
|
6
|
+
for (var d in n || (n = {}))
|
|
7
|
+
Ge.call(n, d) && te(a, d, n[d]);
|
|
8
|
+
if (ae)
|
|
9
|
+
for (var d of ae(n))
|
|
10
|
+
Ye.call(n, d) && te(a, d, n[d]);
|
|
11
|
+
return a;
|
|
12
|
+
}, le = (a, n) => Ve(a, He(n));
|
|
13
|
+
var F = (a, n, d) => new Promise((B, h) => {
|
|
14
|
+
var m = (p) => {
|
|
15
|
+
try {
|
|
16
|
+
C(d.next(p));
|
|
17
|
+
} catch (T) {
|
|
18
|
+
h(T);
|
|
19
|
+
}
|
|
20
|
+
}, D = (p) => {
|
|
21
|
+
try {
|
|
22
|
+
C(d.throw(p));
|
|
23
|
+
} catch (T) {
|
|
24
|
+
h(T);
|
|
25
|
+
}
|
|
26
|
+
}, C = (p) => p.done ? B(p.value) : Promise.resolve(p.value).then(m, D);
|
|
27
|
+
C((d = d.apply(a, n)).next());
|
|
28
|
+
});
|
|
29
|
+
import { defineComponent as ze, ref as y, computed as ne, provide as oe, reactive as We, nextTick as G, toRaw as Xe, resolveComponent as b, openBlock as A, createBlock as Y, mergeProps as Ze, withCtx as f, createVNode as s, createTextVNode as R, createElementBlock as ie, Fragment as ea, renderList as aa, toDisplayString as ta, createCommentVNode as se, createElementVNode as re } from "vue";
|
|
30
|
+
import { Icon as la } from "/@/components/Icon";
|
|
31
|
+
import { BasicModal as na, useModalInner as oa, useModal as ia } from "/@/components/Modal";
|
|
32
|
+
import { BasicForm as sa, useForm as ra } from "/@/components/Form/index";
|
|
33
|
+
import { useMessage as ua } from "/@/hooks/web/useMessage";
|
|
34
|
+
import { u as da } from "./useSchemas-0433a403.mjs";
|
|
35
|
+
import ca from "./DBAttributeTable-370de07b.mjs";
|
|
36
|
+
import fa from "./PageAttributeTable-965dc58e.mjs";
|
|
37
|
+
import ba from "./CheckDictTable-134cbb83.mjs";
|
|
38
|
+
import ma from "./ForeignKeyTable-6a843c4b.mjs";
|
|
39
|
+
import pa from "./IndexTable-f8af9d44.mjs";
|
|
40
|
+
import Ta from "./QueryTable-eb9a5b21.mjs";
|
|
41
|
+
import ga from "./ExtendConfigModal-1dde390a.mjs";
|
|
42
|
+
import { u as ya, E as va, a as ha, V as O } from "./cgform.data-cbdd88c3.mjs";
|
|
43
|
+
import { defHttp as v } from "/@/utils/http/axios";
|
|
44
|
+
import { simpleDebounce as Ca } from "/@/utils/common/compUtils";
|
|
45
|
+
import { u as Fa } from "./useOnlineTest-e4bd8be3.mjs";
|
|
46
|
+
import { buildUUID as Da } from "/@/utils/uuid";
|
|
47
|
+
import { sleep as P } from "/@/utils";
|
|
48
|
+
import { g as ka } from "./useExtendComponent-325fe3f1.mjs";
|
|
49
|
+
import { _ as Ra } from "./index-0e3ab3af.mjs";
|
|
50
|
+
const et = (a) => v.get({ url: "/online/cgform/head/list", params: a }), at = (a) => ue(a, 0), tt = (a) => v.delete(
|
|
51
|
+
{ url: "/online/cgform/head/removeRecord", params: { id: a } },
|
|
52
|
+
{ joinParamsToUrl: !0 }
|
|
53
|
+
), lt = (a) => ue(a, 1), nt = (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 ot = (a, n) => v.post({ url: `/online/cgform/api/doDbSynch/${a}/${n}`, timeout: 12e3, timeoutErrorMessage: "同步数据库超时,已自动刷新" }), it = (a) => v.post({ url: `/online/cgform/head/copyOnline?code=${a}` }), st = (a, n, d) => v.get({ url: `/online/cgform/head/copyOnlineTable/${a}`, params: E({ tableName: n }, d) }), L = {
|
|
70
|
+
// 查询表字段 e3e3NcxzbUiGa53YYVXxWc8ADo5ISgQGx/gaZwERF91oAryDlivjqBv3wqRArgChupi+Y/Gg/swwGEyL0PuVFg==
|
|
71
|
+
doQueryField: (a, n) => v.get({ url: "/online/cgform/field/listByHeadId", params: E({ headId: a }, n) }),
|
|
72
|
+
// 查询表index配置
|
|
73
|
+
doQueryIndexes: (a, n) => v.get({ url: "/online/cgform/index/listByHeadId", params: E({ 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
|
+
}, wa = ze({
|
|
79
|
+
name: "CgformModal",
|
|
80
|
+
components: {
|
|
81
|
+
BasicModal: na,
|
|
82
|
+
BasicForm: sa,
|
|
83
|
+
DBAttributeTable: ca,
|
|
84
|
+
PageAttributeTable: fa,
|
|
85
|
+
CheckDictTable: ba,
|
|
86
|
+
ForeignKeyTable: ma,
|
|
87
|
+
IndexTable: pa,
|
|
88
|
+
QueryTable: Ta,
|
|
89
|
+
ExtendConfigModal: ga,
|
|
90
|
+
Icon: la
|
|
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: d } = ua(), B = y(), h = y(!1);
|
|
102
|
+
let m = {};
|
|
103
|
+
const D = ne(() => h.value ? "编辑" : "新增"), C = y(!0), p = y(!1), T = y("dbTable"), _ = y(!0), c = {
|
|
104
|
+
dbTable: y(),
|
|
105
|
+
pageTable: y(),
|
|
106
|
+
checkTable: y(),
|
|
107
|
+
fkTable: y(),
|
|
108
|
+
idxTable: y(),
|
|
109
|
+
queryTable: y()
|
|
110
|
+
}, $ = ne(() => {
|
|
111
|
+
var e, t;
|
|
112
|
+
return (t = (e = B.value) == null ? void 0 : e.fullScreenRef) != null ? t : !1;
|
|
113
|
+
});
|
|
114
|
+
oe("tables", c), oe("fullScreenRef", $);
|
|
115
|
+
const N = { value: {} }, { formSchemas: Q } = da(a, N, {
|
|
116
|
+
onTableTypeChange: Fe,
|
|
117
|
+
onIsTreeChange: De,
|
|
118
|
+
ifShowOfSubTableStr: () => W
|
|
119
|
+
}), [x, w] = ra({
|
|
120
|
+
schemas: Q,
|
|
121
|
+
showActionButtonGroup: !1,
|
|
122
|
+
labelAlign: "right"
|
|
123
|
+
}), { resetFields: J, setFieldsValue: I, validate: K } = w, [q, { closeModal: U }] = oa((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) : Te();
|
|
126
|
+
}), M = y("");
|
|
127
|
+
let r = We({});
|
|
128
|
+
const V = Ca(() => ke(), 150);
|
|
129
|
+
let z = [], W = !1, j = !1, k = [];
|
|
130
|
+
const { aiTestMode: de, aiTestTable: ce, aiTableList: fe, initVirtualData: be, tableJsonGetHelper: me, refreshCacheTableName: pe } = Fa();
|
|
131
|
+
function Te() {
|
|
132
|
+
X({});
|
|
133
|
+
}
|
|
134
|
+
function X(e) {
|
|
135
|
+
return F(this, null, function* () {
|
|
136
|
+
var t;
|
|
137
|
+
if (C.value = !1, T.value = "dbTable", yield J(), m = Object.assign({}, e), he(m), me(m), ve(m), I(m), M.value = m.tableName, P(1, () => _.value = !1), h.value)
|
|
138
|
+
(t = c.dbTable.value) == null || t.setDataSource([]), yield ge(m.id), yield ye(m.id), ka(c.pageTable).then(() => {
|
|
139
|
+
c.pageTable.value.changePageType(m.tableType == 3);
|
|
140
|
+
});
|
|
141
|
+
else {
|
|
142
|
+
let { initialData: l, tempIds: o } = ya();
|
|
143
|
+
yield Z(l, !0), z = o;
|
|
144
|
+
}
|
|
145
|
+
});
|
|
146
|
+
}
|
|
147
|
+
function ge(e) {
|
|
148
|
+
return F(this, null, function* () {
|
|
149
|
+
p.value = !0;
|
|
150
|
+
try {
|
|
151
|
+
let t = yield L.doQueryField(e);
|
|
152
|
+
p.value = !1, yield Z(t);
|
|
153
|
+
} finally {
|
|
154
|
+
p.value = !1;
|
|
155
|
+
}
|
|
156
|
+
});
|
|
157
|
+
}
|
|
158
|
+
function ye(e) {
|
|
159
|
+
return F(this, null, function* () {
|
|
160
|
+
let t = yield L.doQueryIndexes(e);
|
|
161
|
+
c.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({}, va, t, {
|
|
172
|
+
isDesForm: e.isDesForm || "N",
|
|
173
|
+
desFormCode: e.desFormCode || ""
|
|
174
|
+
});
|
|
175
|
+
}
|
|
176
|
+
function he(e) {
|
|
177
|
+
j = 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: u, fkTable: i, queryTable: g } = c;
|
|
182
|
+
l.value || (yield G(), yield P(1)), l.value.setDataSource(e, t), setTimeout(() => {
|
|
183
|
+
o.value.setDataSource(e, t), u.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 = c.dbTable, l = c[e];
|
|
190
|
+
t.value.tableRef.resetScrollTop(), l.value.syncTable(t);
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
function Fe(e) {
|
|
194
|
+
e === 1 && I({ themeTemplate: "normal" }), c.pageTable.value.changePageType(e == 3);
|
|
195
|
+
}
|
|
196
|
+
function De(e) {
|
|
197
|
+
e === "Y" ? Ae() : Oe();
|
|
198
|
+
}
|
|
199
|
+
function H() {
|
|
200
|
+
V();
|
|
201
|
+
}
|
|
202
|
+
function ke() {
|
|
203
|
+
return F(this, null, function* () {
|
|
204
|
+
let { dbTable: e, pageTable: t, checkTable: l, fkTable: o, queryTable: u } = c;
|
|
205
|
+
yield t.value.syncTable(e), yield l.value.syncTable(e), yield o.value.syncTable(e), yield u.value.syncTable(e);
|
|
206
|
+
});
|
|
207
|
+
}
|
|
208
|
+
function Re() {
|
|
209
|
+
H();
|
|
210
|
+
}
|
|
211
|
+
function we() {
|
|
212
|
+
H();
|
|
213
|
+
}
|
|
214
|
+
function Be(e) {
|
|
215
|
+
let { oldIndex: t, newIndex: l } = e;
|
|
216
|
+
Ie(t, l);
|
|
217
|
+
}
|
|
218
|
+
function _e(e) {
|
|
219
|
+
return F(this, null, function* () {
|
|
220
|
+
let { insertIndex: t, row: l } = e, { pageTable: o, checkTable: u, fkTable: i, queryTable: g } = c;
|
|
221
|
+
o.value.tableRef.insertRows(l, t), u.value.tableRef.insertRows(l, t), i.value.tableRef.insertRows(l, t), g.value.tableRef.insertRows(l, t);
|
|
222
|
+
});
|
|
223
|
+
}
|
|
224
|
+
function Ie(e, t) {
|
|
225
|
+
let { pageTable: l, checkTable: o, fkTable: u, queryTable: i } = c;
|
|
226
|
+
l.value.tableRef.rowResort(e, t), o.value.tableRef.rowResort(e, t), u.value.tableRef.rowResort(e, t), i.value.tableRef.rowResort(e, t);
|
|
227
|
+
}
|
|
228
|
+
function Se(e) {
|
|
229
|
+
c.pageTable.value.syncFieldShowType(e.row);
|
|
230
|
+
}
|
|
231
|
+
function Ee(e) {
|
|
232
|
+
c.pageTable.value.enableQuery(e);
|
|
233
|
+
}
|
|
234
|
+
function Ae() {
|
|
235
|
+
if (!j) {
|
|
236
|
+
let { dbTable: e, pageTable: t, checkTable: l } = c, o = ha();
|
|
237
|
+
o = o.filter((u) => !e.value.tableRef.getTableData().map((g) => g.dbFieldName).includes(u.dbFieldName)), k = [], o.forEach((u) => {
|
|
238
|
+
let i = Da() + "__tempId";
|
|
239
|
+
k.push(i), u.id = i;
|
|
240
|
+
}), e.value.tableRef.addRows(o, { setActive: !1 }), t.value.tableRef.addRows(o, { setActive: !1 }), l.value.tableRef.addRows(o, { setActive: !1 }), G(() => H()), j = !0;
|
|
241
|
+
}
|
|
242
|
+
G(() => {
|
|
243
|
+
w.setFieldsValue({
|
|
244
|
+
treeIdField: "has_child",
|
|
245
|
+
treeParentIdField: "pid"
|
|
246
|
+
});
|
|
247
|
+
});
|
|
248
|
+
}
|
|
249
|
+
function Oe() {
|
|
250
|
+
if (k && k.length > 0) {
|
|
251
|
+
let { dbTable: e } = c;
|
|
252
|
+
e.value.tableDeleteLines(k), k = [], j = !1;
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
function Ne() {
|
|
256
|
+
let e = {};
|
|
257
|
+
return new Promise((t, l) => {
|
|
258
|
+
K().then(
|
|
259
|
+
(o) => t({ values: o }),
|
|
260
|
+
() => l(O)
|
|
261
|
+
);
|
|
262
|
+
}).then((t) => (Object.assign(e, t), Me())).then((t) => {
|
|
263
|
+
Object.assign(e, t);
|
|
264
|
+
let l = je(e);
|
|
265
|
+
return Pe(l);
|
|
266
|
+
}).catch((t) => (t === O || (t == null ? void 0 : t.code) === O ? d.warning("校验未通过") : t != null && t.msg && d.warning(t.msg), Promise.reject(null)));
|
|
267
|
+
}
|
|
268
|
+
function Me() {
|
|
269
|
+
return new Promise((e, t) => F(this, null, function* () {
|
|
270
|
+
let l = Object.keys(c), o = {};
|
|
271
|
+
for (let u = 0; u < l.length; u++) {
|
|
272
|
+
let i = l[u], g = c[i];
|
|
273
|
+
try {
|
|
274
|
+
o[i] = yield g.value.validateData(i);
|
|
275
|
+
} catch (S) {
|
|
276
|
+
S.code === O && (T.value = S.activeKey), t(S);
|
|
277
|
+
return;
|
|
278
|
+
}
|
|
279
|
+
}
|
|
280
|
+
e(o);
|
|
281
|
+
}));
|
|
282
|
+
}
|
|
283
|
+
function je(e) {
|
|
284
|
+
let t = {
|
|
285
|
+
head: {},
|
|
286
|
+
fields: [],
|
|
287
|
+
indexs: [],
|
|
288
|
+
deleteFieldIds: [],
|
|
289
|
+
deleteIndexIds: []
|
|
290
|
+
};
|
|
291
|
+
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) => {
|
|
292
|
+
let u = l.id, i = Object.assign({}, l), g = e.pageTable.tableData[o];
|
|
293
|
+
i = Object.assign(g, i);
|
|
294
|
+
let S = e.checkTable.tableData[o];
|
|
295
|
+
i = Object.assign(S, i);
|
|
296
|
+
let Ke = e.fkTable.tableData[o];
|
|
297
|
+
i = Object.assign(Ke, i);
|
|
298
|
+
let qe = e.queryTable.tableData[o];
|
|
299
|
+
i = Object.assign(qe, i), u == null || u === "" ? delete i.id : i.id = u, [].concat(z, k).includes(i.id) && delete i.id, t.fields.push(i);
|
|
300
|
+
}), t.deleteFieldIds = e.dbTable.deleteIds, t.indexs = e.idxTable.tableData, t.deleteIndexIds = e.idxTable.deleteIds, t;
|
|
301
|
+
}
|
|
302
|
+
function Pe(e) {
|
|
303
|
+
return new Promise((t, l) => {
|
|
304
|
+
let o = e.fields, u = !0;
|
|
305
|
+
if (o && o.length > 0) {
|
|
306
|
+
let i = 0;
|
|
307
|
+
for (let g = 0; g < o.length; g++)
|
|
308
|
+
if ((o[g].mainField || o[g].mainTable) && (i += 1), i > 1) {
|
|
309
|
+
u = !1;
|
|
310
|
+
break;
|
|
311
|
+
}
|
|
312
|
+
}
|
|
313
|
+
u ? t(e) : l({
|
|
314
|
+
code: -1,
|
|
315
|
+
msg: "外键只允许配置一个!",
|
|
316
|
+
error: O
|
|
317
|
+
});
|
|
318
|
+
});
|
|
319
|
+
}
|
|
320
|
+
function Le() {
|
|
321
|
+
C.value = !0, Ne().then(
|
|
322
|
+
(e) => F(this, null, function* () {
|
|
323
|
+
var t;
|
|
324
|
+
if (e.fields && e.fields.length > 0)
|
|
325
|
+
for (let l of e.fields)
|
|
326
|
+
l.dbFieldName = l.dbFieldName.toLowerCase().trim();
|
|
327
|
+
(t = e.head) != null && t.tableName && (e.head.tableName = e.head.tableName.toLowerCase().trim()), yield L.doSaveOrUpdate(e, h.value), pe(M.value, e.head.tableName), n("success"), P(1, () => ee());
|
|
328
|
+
}),
|
|
329
|
+
(e) => {
|
|
330
|
+
}
|
|
331
|
+
).finally(() => {
|
|
332
|
+
C.value = !1;
|
|
333
|
+
});
|
|
334
|
+
}
|
|
335
|
+
const [$e, Qe] = ia();
|
|
336
|
+
function xe(e) {
|
|
337
|
+
return F(this, null, function* () {
|
|
338
|
+
if (N.value = e, e.joinQuery == 0 && w.validateFields(["themeTemplate"]), r = e, h.value == !0) {
|
|
339
|
+
let t = Xe(r);
|
|
340
|
+
const l = {
|
|
341
|
+
id: m.id,
|
|
342
|
+
extConfigJson: JSON.stringify(t)
|
|
343
|
+
};
|
|
344
|
+
yield L.editHead(l), n("success");
|
|
345
|
+
}
|
|
346
|
+
});
|
|
347
|
+
}
|
|
348
|
+
function Je() {
|
|
349
|
+
Qe.openModal(!0, {
|
|
350
|
+
extConfigJson: r
|
|
351
|
+
});
|
|
352
|
+
}
|
|
353
|
+
function ee() {
|
|
354
|
+
_.value = !0, P(1, () => U());
|
|
355
|
+
}
|
|
356
|
+
return le(E({}, c), {
|
|
357
|
+
modalRef: B,
|
|
358
|
+
title: D,
|
|
359
|
+
confirmLoading: C,
|
|
360
|
+
tableLoading: p,
|
|
361
|
+
activeKey: T,
|
|
362
|
+
onCancel: ee,
|
|
363
|
+
extConfigJson: r,
|
|
364
|
+
formAction: w,
|
|
365
|
+
hideTabs: _,
|
|
366
|
+
onSubmit: Le,
|
|
367
|
+
onTabsChange: Ce,
|
|
368
|
+
onTableAdded: Re,
|
|
369
|
+
onTableRemoved: we,
|
|
370
|
+
onTableDragged: Be,
|
|
371
|
+
onTableInserted: _e,
|
|
372
|
+
onTableSyncDbType: Se,
|
|
373
|
+
onTableQuery: Ee,
|
|
374
|
+
onOpenExtConfig: Je,
|
|
375
|
+
onExtConfigOk: xe,
|
|
376
|
+
registerForm: x,
|
|
377
|
+
registerModal: q,
|
|
378
|
+
registerExtendConfigModal: $e,
|
|
379
|
+
// hook OnlineTest
|
|
380
|
+
aiTestMode: de,
|
|
381
|
+
aiTestTable: ce,
|
|
382
|
+
aiTableList: fe,
|
|
383
|
+
initVirtualData: be
|
|
384
|
+
});
|
|
385
|
+
}
|
|
386
|
+
}), Ba = { style: { flex: "1", "text-align": "right" } }, _a = {
|
|
387
|
+
key: 0,
|
|
388
|
+
style: { display: "inline-block", "text-align": "left", position: "absolute", left: "0" }
|
|
389
|
+
};
|
|
390
|
+
function Ia(a, n, d, B, h, m) {
|
|
391
|
+
const D = b("a-button"), C = b("BasicForm"), p = b("DBAttributeTable"), T = b("a-tab-pane"), _ = b("PageAttributeTable"), c = b("CheckDictTable"), $ = b("ForeignKeyTable"), N = b("IndexTable"), Q = b("Icon"), x = b("a-tooltip"), w = b("QueryTable"), J = b("a-tabs"), I = b("a-spin"), K = b("a-select-option"), q = b("a-select"), U = b("ExtendConfigModal"), M = b("BasicModal");
|
|
392
|
+
return A(), Y(M, Ze({
|
|
393
|
+
ref: "modalRef",
|
|
394
|
+
title: a.title,
|
|
395
|
+
width: 1200,
|
|
396
|
+
maskClosable: !1,
|
|
397
|
+
defaultFullscreen: !0,
|
|
398
|
+
confirmLoading: a.confirmLoading
|
|
399
|
+
}, a.$attrs, {
|
|
400
|
+
onCancel: a.onCancel,
|
|
401
|
+
onRegister: a.registerModal
|
|
402
|
+
}), {
|
|
403
|
+
footer: f(() => [
|
|
404
|
+
s(D, { onClick: a.onCancel }, {
|
|
405
|
+
default: f(() => [
|
|
406
|
+
R("关闭")
|
|
407
|
+
]),
|
|
408
|
+
_: 1
|
|
409
|
+
}, 8, ["onClick"]),
|
|
410
|
+
s(D, {
|
|
411
|
+
type: "primary",
|
|
412
|
+
loading: a.confirmLoading,
|
|
413
|
+
preIcon: "ant-design:save",
|
|
414
|
+
onClick: a.onSubmit
|
|
415
|
+
}, {
|
|
416
|
+
default: f(() => [
|
|
417
|
+
R("保存")
|
|
418
|
+
]),
|
|
419
|
+
_: 1
|
|
420
|
+
}, 8, ["loading", "onClick"]),
|
|
421
|
+
a.aiTestMode ? (A(), ie("div", _a, [
|
|
422
|
+
s(q, {
|
|
423
|
+
value: a.aiTestTable,
|
|
424
|
+
"onUpdate:value": n[1] || (n[1] = (r) => a.aiTestTable = r),
|
|
425
|
+
placeholder: "请选择测试的表类型",
|
|
426
|
+
getPopupContainer: (r) => r == null ? void 0 : r.parentElement,
|
|
427
|
+
style: { width: "250px", margin: "0 10px 0 20px" }
|
|
428
|
+
}, {
|
|
429
|
+
default: f(() => [
|
|
430
|
+
(A(!0), ie(ea, null, aa(a.aiTableList, (r, V) => (A(), Y(K, {
|
|
431
|
+
key: V,
|
|
432
|
+
value: r.name
|
|
433
|
+
}, {
|
|
434
|
+
default: f(() => [
|
|
435
|
+
R(ta(r.title + "(" + r.name + ")"), 1)
|
|
436
|
+
]),
|
|
437
|
+
_: 2
|
|
438
|
+
}, 1032, ["value"]))), 128))
|
|
439
|
+
]),
|
|
440
|
+
_: 1
|
|
441
|
+
}, 8, ["value", "getPopupContainer"]),
|
|
442
|
+
s(D, {
|
|
443
|
+
type: "primary",
|
|
444
|
+
ghost: "",
|
|
445
|
+
onClick: a.initVirtualData
|
|
446
|
+
}, {
|
|
447
|
+
default: f(() => [
|
|
448
|
+
R("生成数据>>")
|
|
449
|
+
]),
|
|
450
|
+
_: 1
|
|
451
|
+
}, 8, ["onClick"])
|
|
452
|
+
])) : se("", !0)
|
|
453
|
+
]),
|
|
454
|
+
default: f(() => [
|
|
455
|
+
s(I, {
|
|
456
|
+
wrapperClassName: "p-2",
|
|
457
|
+
spinning: a.confirmLoading
|
|
458
|
+
}, {
|
|
459
|
+
default: f(() => [
|
|
460
|
+
s(C, { onRegister: a.registerForm }, {
|
|
461
|
+
extConfigButton: f(() => [
|
|
462
|
+
re("div", Ba, [
|
|
463
|
+
s(D, {
|
|
464
|
+
preIcon: "ant-design:setting",
|
|
465
|
+
onClick: a.onOpenExtConfig
|
|
466
|
+
}, {
|
|
467
|
+
default: f(() => [
|
|
468
|
+
R("扩展配置")
|
|
469
|
+
]),
|
|
470
|
+
_: 1
|
|
471
|
+
}, 8, ["onClick"])
|
|
472
|
+
])
|
|
473
|
+
]),
|
|
474
|
+
_: 1
|
|
475
|
+
}, 8, ["onRegister"]),
|
|
476
|
+
s(I, {
|
|
477
|
+
spinning: a.tableLoading || a.hideTabs
|
|
478
|
+
}, {
|
|
479
|
+
default: f(() => [
|
|
480
|
+
a.hideTabs ? se("", !0) : (A(), Y(J, {
|
|
481
|
+
key: 0,
|
|
482
|
+
activeKey: a.activeKey,
|
|
483
|
+
"onUpdate:activeKey": n[0] || (n[0] = (r) => a.activeKey = r),
|
|
484
|
+
animated: "",
|
|
485
|
+
onChange: a.onTabsChange
|
|
486
|
+
}, {
|
|
487
|
+
default: f(() => [
|
|
488
|
+
s(T, {
|
|
489
|
+
tab: "数据库属性",
|
|
490
|
+
key: "dbTable",
|
|
491
|
+
forceRender: ""
|
|
492
|
+
}, {
|
|
493
|
+
default: f(() => [
|
|
494
|
+
s(p, {
|
|
495
|
+
ref: "dbTable",
|
|
496
|
+
actionButton: a.actionButton,
|
|
497
|
+
onAdded: a.onTableAdded,
|
|
498
|
+
onRemoved: a.onTableRemoved,
|
|
499
|
+
onDragged: a.onTableDragged,
|
|
500
|
+
onInserted: a.onTableInserted,
|
|
501
|
+
onSyncDbType: a.onTableSyncDbType
|
|
502
|
+
}, null, 8, ["actionButton", "onAdded", "onRemoved", "onDragged", "onInserted", "onSyncDbType"])
|
|
503
|
+
]),
|
|
504
|
+
_: 1
|
|
505
|
+
}),
|
|
506
|
+
s(T, {
|
|
507
|
+
tab: "页面属性",
|
|
508
|
+
key: "pageTable",
|
|
509
|
+
forceRender: ""
|
|
510
|
+
}, {
|
|
511
|
+
default: f(() => [
|
|
512
|
+
s(_, { ref: "pageTable" }, null, 512)
|
|
513
|
+
]),
|
|
514
|
+
_: 1
|
|
515
|
+
}),
|
|
516
|
+
s(T, {
|
|
517
|
+
tab: "校验字段",
|
|
518
|
+
key: "checkTable",
|
|
519
|
+
forceRender: ""
|
|
520
|
+
}, {
|
|
521
|
+
default: f(() => [
|
|
522
|
+
s(c, { ref: "checkTable" }, null, 512)
|
|
523
|
+
]),
|
|
524
|
+
_: 1
|
|
525
|
+
}),
|
|
526
|
+
s(T, {
|
|
527
|
+
tab: "外键",
|
|
528
|
+
key: "fkTable",
|
|
529
|
+
forceRender: ""
|
|
530
|
+
}, {
|
|
531
|
+
default: f(() => [
|
|
532
|
+
s($, {
|
|
533
|
+
ref: "fkTable",
|
|
534
|
+
actionButton: a.actionButton
|
|
535
|
+
}, null, 8, ["actionButton"])
|
|
536
|
+
]),
|
|
537
|
+
_: 1
|
|
538
|
+
}),
|
|
539
|
+
s(T, {
|
|
540
|
+
tab: "索引",
|
|
541
|
+
key: "idxTable",
|
|
542
|
+
forceRender: ""
|
|
543
|
+
}, {
|
|
544
|
+
default: f(() => [
|
|
545
|
+
s(N, {
|
|
546
|
+
ref: "idxTable",
|
|
547
|
+
actionButton: a.actionButton
|
|
548
|
+
}, null, 8, ["actionButton"])
|
|
549
|
+
]),
|
|
550
|
+
_: 1
|
|
551
|
+
}),
|
|
552
|
+
s(T, {
|
|
553
|
+
key: "queryTable",
|
|
554
|
+
forceRender: ""
|
|
555
|
+
}, {
|
|
556
|
+
tab: f(() => [
|
|
557
|
+
re("span", null, [
|
|
558
|
+
R(" 个性查询配置 "),
|
|
559
|
+
s(x, null, {
|
|
560
|
+
title: f(() => [
|
|
561
|
+
R("允许自定义,查询表单字段控件类型!")
|
|
562
|
+
]),
|
|
563
|
+
default: f(() => [
|
|
564
|
+
s(Q, { icon: "bx:help-circle" })
|
|
565
|
+
]),
|
|
566
|
+
_: 1
|
|
567
|
+
})
|
|
568
|
+
])
|
|
569
|
+
]),
|
|
570
|
+
default: f(() => [
|
|
571
|
+
s(w, {
|
|
572
|
+
ref: "queryTable",
|
|
573
|
+
onQuery: a.onTableQuery
|
|
574
|
+
}, null, 8, ["onQuery"])
|
|
575
|
+
]),
|
|
576
|
+
_: 1
|
|
577
|
+
})
|
|
578
|
+
]),
|
|
579
|
+
_: 1
|
|
580
|
+
}, 8, ["activeKey", "onChange"]))
|
|
581
|
+
]),
|
|
582
|
+
_: 1
|
|
583
|
+
}, 8, ["spinning"])
|
|
584
|
+
]),
|
|
585
|
+
_: 1
|
|
586
|
+
}, 8, ["spinning"]),
|
|
587
|
+
s(U, {
|
|
588
|
+
onRegister: a.registerExtendConfigModal,
|
|
589
|
+
parentForm: a.formAction,
|
|
590
|
+
onOk: a.onExtConfigOk
|
|
591
|
+
}, null, 8, ["onRegister", "parentForm", "onOk"])
|
|
592
|
+
]),
|
|
593
|
+
_: 1
|
|
594
|
+
}, 16, ["title", "confirmLoading", "onCancel", "onRegister"]);
|
|
595
|
+
}
|
|
596
|
+
const Sa = /* @__PURE__ */ Ra(wa, [["render", Ia]]), rt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
597
|
+
__proto__: null,
|
|
598
|
+
default: Sa
|
|
599
|
+
}, Symbol.toStringTag, { value: "Module" }));
|
|
600
|
+
export {
|
|
601
|
+
Sa as C,
|
|
602
|
+
nt as a,
|
|
603
|
+
tt as b,
|
|
604
|
+
at as c,
|
|
605
|
+
it as d,
|
|
606
|
+
lt as e,
|
|
607
|
+
ot as f,
|
|
608
|
+
st as g,
|
|
609
|
+
rt as h,
|
|
610
|
+
et as l
|
|
611
|
+
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { _ as o } from "./CgreportModal.vue_vue_type_script_setup_true_lang-
|
|
1
|
+
import { _ as o } from "./CgreportModal.vue_vue_type_script_setup_true_lang-c89d9222.mjs";
|
|
2
2
|
import "vue";
|
|
3
3
|
import "/@/components/Modal";
|
|
4
4
|
import "/@/components/Form/index";
|
|
@@ -7,6 +7,7 @@ import "/@/components/jeecg/JVxeTable/types";
|
|
|
7
7
|
import "/@/views/system/user/user.api";
|
|
8
8
|
import "/@/utils/http/axios";
|
|
9
9
|
import "/@/hooks/web/useMessage";
|
|
10
|
+
import "/@/store/modules/permission";
|
|
10
11
|
export {
|
|
11
12
|
o as default
|
|
12
13
|
};
|