@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
|
@@ -1,238 +0,0 @@
|
|
|
1
|
-
var T = (t, i, r) => new Promise((u, c) => {
|
|
2
|
-
var y = (a) => {
|
|
3
|
-
try {
|
|
4
|
-
n(r.next(a));
|
|
5
|
-
} catch (m) {
|
|
6
|
-
c(m);
|
|
7
|
-
}
|
|
8
|
-
}, d = (a) => {
|
|
9
|
-
try {
|
|
10
|
-
n(r.throw(a));
|
|
11
|
-
} catch (m) {
|
|
12
|
-
c(m);
|
|
13
|
-
}
|
|
14
|
-
}, n = (a) => a.done ? u(a.value) : Promise.resolve(a.value).then(y, d);
|
|
15
|
-
n((r = r.apply(t, i)).next());
|
|
16
|
-
});
|
|
17
|
-
import { defineComponent as le, ref as g, computed as O, reactive as w, nextTick as ne, resolveComponent as p, openBlock as B, createElementBlock as se, Fragment as re, createVNode as b, withCtx as F, createBlock as ie, mergeProps as ce, createCommentVNode as me } from "vue";
|
|
18
|
-
import { defHttp as G } from "/@/utils/http/axios";
|
|
19
|
-
import { BasicForm as pe, useForm as ue } from "/@/components/Form";
|
|
20
|
-
import { BasicModal as de, useModalInner as fe, useModal as J } from "/@/components/Modal";
|
|
21
|
-
import { JVxeTypes as P } from "/@/components/jeecg/JVxeTable/types";
|
|
22
|
-
import { b as ge } from "./useSchemas-47e45edc.mjs";
|
|
23
|
-
import { underLine2CamelCase as D } from "/@/utils/common/compUtils";
|
|
24
|
-
import be from "./CodeFileListModal-0e26b7e0.mjs";
|
|
25
|
-
import _e from "./FileSelectModal-38660e3c.mjs";
|
|
26
|
-
import { message as Ce } from "ant-design-vue";
|
|
27
|
-
import { useDesign as he } from "/@/hooks/web/useDesign";
|
|
28
|
-
import { _ as ye } from "./index-173949bb.mjs";
|
|
29
|
-
import "@ant-design/icons-vue";
|
|
30
|
-
import "/@/hooks/web/usePermission";
|
|
31
|
-
import "/@/utils/helper/validator";
|
|
32
|
-
import "./CodeFileViewModal-9d4a5b5f.mjs";
|
|
33
|
-
import "/@/components/jeecg/OnLine/JPopupOnlReport.vue";
|
|
34
|
-
import "/@/hooks/web/useMessage";
|
|
35
|
-
import "vue-router";
|
|
36
|
-
import "/@/utils/file/download";
|
|
37
|
-
const Me = le({
|
|
38
|
-
name: "CodeGenerator",
|
|
39
|
-
components: { BasicForm: pe, BasicModal: de, FileSelectModal: _e, CodeFileListModal: be },
|
|
40
|
-
emits: ["register"],
|
|
41
|
-
setup(t) {
|
|
42
|
-
const i = "JEECG_ONL_PROJECT_PATH", r = "JEECG_ONL_PROJECT_NAME", u = g(!0), c = g(), y = O(() => u.value ? 800 : 1200), d = g("代码生成"), n = g(!1), { prefixCls: a } = he("code-generator-modal"), m = a, _ = g(""), M = w({
|
|
43
|
-
projectPath: "",
|
|
44
|
-
packageStyle: "service",
|
|
45
|
-
jspMode: "",
|
|
46
|
-
jformType: "1",
|
|
47
|
-
tableName_tmp: "",
|
|
48
|
-
ftlDescription: "",
|
|
49
|
-
entityName: "",
|
|
50
|
-
codeTypes: "controller,service,dao,mapper,entity,vue"
|
|
51
|
-
}), o = w({}), S = g([]), N = w({
|
|
52
|
-
dataSource: [],
|
|
53
|
-
columns: [
|
|
54
|
-
{
|
|
55
|
-
title: "子表名",
|
|
56
|
-
key: "tableName",
|
|
57
|
-
type: P.input,
|
|
58
|
-
disabled: !0,
|
|
59
|
-
validateRules: [{ required: !0, message: "请输入${title}" }]
|
|
60
|
-
},
|
|
61
|
-
{
|
|
62
|
-
title: "子表实体",
|
|
63
|
-
key: "entityName",
|
|
64
|
-
type: P.input,
|
|
65
|
-
validateRules: [{ required: !0, message: "请输入${title}" }]
|
|
66
|
-
},
|
|
67
|
-
{
|
|
68
|
-
title: "功能说明",
|
|
69
|
-
key: "ftlDescription",
|
|
70
|
-
type: P.input,
|
|
71
|
-
validateRules: [{ required: !0, message: "请输入${title}" }]
|
|
72
|
-
}
|
|
73
|
-
]
|
|
74
|
-
}), j = O(() => N.dataSource.length > 0), { formSchemas: I } = ge(
|
|
75
|
-
t,
|
|
76
|
-
{
|
|
77
|
-
onProjectPathChange: oe,
|
|
78
|
-
onProjectPathSearch: X,
|
|
79
|
-
jspModeOptions: S
|
|
80
|
-
},
|
|
81
|
-
u
|
|
82
|
-
), [V, { resetFields: $, setFieldsValue: L, validate: A }] = ue({
|
|
83
|
-
schemas: I,
|
|
84
|
-
showActionButtonGroup: !1,
|
|
85
|
-
labelAlign: "right"
|
|
86
|
-
}), [H, { closeModal: R }] = fe((e) => T(this, null, function* () {
|
|
87
|
-
yield $(), _.value = e.code, n.value = !1, N.dataSource = [], S.value = [], te(), Object.assign(o, M), q();
|
|
88
|
-
}));
|
|
89
|
-
function q() {
|
|
90
|
-
return T(this, null, function* () {
|
|
91
|
-
let { main: e, sub: l, jspModeList: f, projectPath: s } = yield G.get({
|
|
92
|
-
url: "/online/cgform/head/tableInfo",
|
|
93
|
-
params: { code: _.value }
|
|
94
|
-
}), C = [];
|
|
95
|
-
for (let h of f) {
|
|
96
|
-
const { code: k, note: ae } = h;
|
|
97
|
-
k == "many" || C.push({
|
|
98
|
-
label: ae,
|
|
99
|
-
value: k
|
|
100
|
-
});
|
|
101
|
-
}
|
|
102
|
-
S.value = C, e.isTree == "Y" ? o.jspMode = "tree" : o.jspMode = C[0].value, u.value = e.tableType == 1, d.value = "代码生成【" + e.tableName + "】", o.projectPath || (o.projectPath = s, window.localStorage.setItem(i, s));
|
|
103
|
-
const v = localStorage.getItem(r);
|
|
104
|
-
v && (o.entityPackage = v), o.jformType = e.tableType + "", o.tableName_tmp = e.tableName, o.ftlDescription = e.tableTxt;
|
|
105
|
-
let E = D(e.tableName);
|
|
106
|
-
o.entityName = E.substring(0, 1).toUpperCase() + E.substring(1), yield ne(), L(o), l && l.length > 0 && (N.dataSource = l.map((h) => ({
|
|
107
|
-
tableName: h.tableName,
|
|
108
|
-
entityName: ee(h.tableName),
|
|
109
|
-
ftlDescription: h.tableTxt
|
|
110
|
-
})));
|
|
111
|
-
});
|
|
112
|
-
}
|
|
113
|
-
const [K, { openModal: U }] = J();
|
|
114
|
-
function W() {
|
|
115
|
-
return T(this, null, function* () {
|
|
116
|
-
try {
|
|
117
|
-
const e = yield A();
|
|
118
|
-
let l = Object.assign({}, e, { code: _.value, tableName: e.tableName_tmp });
|
|
119
|
-
if (j.value) {
|
|
120
|
-
if (yield c.value.validateTable())
|
|
121
|
-
return;
|
|
122
|
-
l.subList = c.value.getTableData();
|
|
123
|
-
}
|
|
124
|
-
n.value = !0;
|
|
125
|
-
let f = yield x(l);
|
|
126
|
-
U(!0, {
|
|
127
|
-
codeList: f.codeList,
|
|
128
|
-
pathKey: f.pathKey,
|
|
129
|
-
tableName: e.tableName_tmp
|
|
130
|
-
}), R(), localStorage.setItem(r, e.entityPackage);
|
|
131
|
-
} catch (e) {
|
|
132
|
-
} finally {
|
|
133
|
-
n.value = !1;
|
|
134
|
-
}
|
|
135
|
-
});
|
|
136
|
-
}
|
|
137
|
-
function x(e) {
|
|
138
|
-
return new Promise((l, f) => {
|
|
139
|
-
G.post({ url: "/online/cgform/api/codeGenerate", params: e }, { isTransformResponse: !1 }).then((s) => {
|
|
140
|
-
if (s.success) {
|
|
141
|
-
let C = s.result, v = s.message;
|
|
142
|
-
l({
|
|
143
|
-
codeList: C,
|
|
144
|
-
pathKey: v
|
|
145
|
-
});
|
|
146
|
-
} else
|
|
147
|
-
Ce.error(s.message), f(s.message);
|
|
148
|
-
});
|
|
149
|
-
});
|
|
150
|
-
}
|
|
151
|
-
function z() {
|
|
152
|
-
R();
|
|
153
|
-
}
|
|
154
|
-
const [Y, Q] = J();
|
|
155
|
-
function X() {
|
|
156
|
-
Q.openModal(!0, {});
|
|
157
|
-
}
|
|
158
|
-
function Z(e) {
|
|
159
|
-
window.localStorage.setItem(i, e), L({ projectPath: e });
|
|
160
|
-
}
|
|
161
|
-
function ee(e) {
|
|
162
|
-
let l = D(e);
|
|
163
|
-
return l.substring(0, 1).toUpperCase() + l.substring(1);
|
|
164
|
-
}
|
|
165
|
-
function te() {
|
|
166
|
-
let e = window.localStorage.getItem(i);
|
|
167
|
-
e && (M.projectPath = e);
|
|
168
|
-
}
|
|
169
|
-
function oe(e) {
|
|
170
|
-
e.target.value && window.localStorage.setItem(i, e.target.value);
|
|
171
|
-
}
|
|
172
|
-
return {
|
|
173
|
-
title: d,
|
|
174
|
-
modalWidth: y,
|
|
175
|
-
confirmLoading: n,
|
|
176
|
-
subTable: N,
|
|
177
|
-
showSubTable: j,
|
|
178
|
-
onSubmit: W,
|
|
179
|
-
onCancel: z,
|
|
180
|
-
onFileSelect: Z,
|
|
181
|
-
registerFileSelectModal: Y,
|
|
182
|
-
subTableRef: c,
|
|
183
|
-
registerForm: V,
|
|
184
|
-
registerModal: H,
|
|
185
|
-
registerCodeFileListModal: K,
|
|
186
|
-
wrapClassName: m
|
|
187
|
-
};
|
|
188
|
-
}
|
|
189
|
-
});
|
|
190
|
-
function Ne(t, i, r, u, c, y) {
|
|
191
|
-
const d = p("BasicForm"), n = p("JVxeTable"), a = p("a-card"), m = p("a-spin"), _ = p("BasicModal"), M = p("FileSelectModal"), o = p("code-file-list-modal");
|
|
192
|
-
return B(), se(re, null, [
|
|
193
|
-
b(_, {
|
|
194
|
-
onRegister: t.registerModal,
|
|
195
|
-
title: t.title,
|
|
196
|
-
width: t.modalWidth,
|
|
197
|
-
confirmLoading: t.confirmLoading,
|
|
198
|
-
okText: "开始生成",
|
|
199
|
-
cancelText: "取消",
|
|
200
|
-
onOk: t.onSubmit,
|
|
201
|
-
onCancel: t.onCancel,
|
|
202
|
-
wrapClassName: t.wrapClassName
|
|
203
|
-
}, {
|
|
204
|
-
default: F(() => [
|
|
205
|
-
b(m, { spinning: t.confirmLoading }, {
|
|
206
|
-
default: F(() => [
|
|
207
|
-
b(d, { onRegister: t.registerForm }, null, 8, ["onRegister"]),
|
|
208
|
-
t.showSubTable ? (B(), ie(a, {
|
|
209
|
-
key: 0,
|
|
210
|
-
title: "子表信息",
|
|
211
|
-
size: "small"
|
|
212
|
-
}, {
|
|
213
|
-
default: F(() => [
|
|
214
|
-
b(n, ce({
|
|
215
|
-
ref: "subTableRef",
|
|
216
|
-
rowNumber: "",
|
|
217
|
-
maxHeight: 580
|
|
218
|
-
}, t.subTable), null, 16)
|
|
219
|
-
]),
|
|
220
|
-
_: 1
|
|
221
|
-
})) : me("", !0)
|
|
222
|
-
]),
|
|
223
|
-
_: 1
|
|
224
|
-
}, 8, ["spinning"])
|
|
225
|
-
]),
|
|
226
|
-
_: 1
|
|
227
|
-
}, 8, ["onRegister", "title", "width", "confirmLoading", "onOk", "onCancel", "wrapClassName"]),
|
|
228
|
-
b(M, {
|
|
229
|
-
onRegister: t.registerFileSelectModal,
|
|
230
|
-
onSelect: t.onFileSelect
|
|
231
|
-
}, null, 8, ["onRegister", "onSelect"]),
|
|
232
|
-
b(o, { onRegister: t.registerCodeFileListModal }, null, 8, ["onRegister"])
|
|
233
|
-
], 64);
|
|
234
|
-
}
|
|
235
|
-
const qe = /* @__PURE__ */ ye(Me, [["render", Ne]]);
|
|
236
|
-
export {
|
|
237
|
-
qe as default
|
|
238
|
-
};
|
|
@@ -1,166 +0,0 @@
|
|
|
1
|
-
import { defineComponent as S, ref as r, resolveComponent as d, openBlock as D, createBlock as H, withCtx as l, createVNode as f, createTextVNode as g, createElementVNode as w } from "vue";
|
|
2
|
-
import { defHttp as _ } from "/@/utils/http/axios";
|
|
3
|
-
import { BasicTable as I } from "/@/components/Table";
|
|
4
|
-
import { BasicModal as $, useModalInner as A } from "/@/components/Modal";
|
|
5
|
-
import { useListTable as P } from "/@/hooks/system/useListPage";
|
|
6
|
-
import { useMessage as q } from "/@/hooks/web/useMessage";
|
|
7
|
-
import { useDesign as O } from "/@/hooks/web/useDesign";
|
|
8
|
-
import { _ as V } from "./index-173949bb.mjs";
|
|
9
|
-
import "/@/components/jeecg/OnLine/JPopupOnlReport.vue";
|
|
10
|
-
import "vue-router";
|
|
11
|
-
const j = S({
|
|
12
|
-
name: "TransDb2Online",
|
|
13
|
-
components: { BasicModal: $, BasicTable: I },
|
|
14
|
-
emits: ["success", "register"],
|
|
15
|
-
setup(e, { emit: h }) {
|
|
16
|
-
const { createMessage: p } = q(), t = r("暂无数据"), u = r(!1), s = r(!1), n = r([]), a = r([]), [c, { closeModal: m }] = A(() => {
|
|
17
|
-
s.value = !1, t.value = "暂无数据", i.value = [], v();
|
|
18
|
-
}), { prefixCls: T } = O("online-db-import-form-modal"), M = T, C = document.documentElement.clientHeight, b = C - 180, L = b > 690 ? 690 : b, [y, { setPagination: B }, { rowSelection: E, selectedRowKeys: i }] = P({
|
|
19
|
-
bordered: !0,
|
|
20
|
-
columns: [{ title: "表名", align: "left", dataIndex: "id" }],
|
|
21
|
-
dataSource: a,
|
|
22
|
-
maxHeight: C - 400,
|
|
23
|
-
locale: { emptyText: t },
|
|
24
|
-
pagination: {
|
|
25
|
-
showQuickJumper: !1,
|
|
26
|
-
showSizeChanger: !1
|
|
27
|
-
},
|
|
28
|
-
clickToRowSelect: !0,
|
|
29
|
-
showIndexColumn: !0,
|
|
30
|
-
showActionColumn: !1,
|
|
31
|
-
formConfig: {
|
|
32
|
-
schemas: [
|
|
33
|
-
{
|
|
34
|
-
label: "表名",
|
|
35
|
-
field: "tableName",
|
|
36
|
-
component: "Input",
|
|
37
|
-
componentProps: {
|
|
38
|
-
style: { width: "100%" },
|
|
39
|
-
placeholder: "请输入表名以模糊筛选",
|
|
40
|
-
onChange: (o) => F(o.target.value)
|
|
41
|
-
},
|
|
42
|
-
disabledLabelWidth: !0,
|
|
43
|
-
itemProps: {
|
|
44
|
-
labelCol: { sm: 0, md: 0 },
|
|
45
|
-
wrapperCol: { sm: 24, md: 20 }
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
],
|
|
49
|
-
baseColProps: { xs: 24, sm: 24, md: 24, lg: 24, xl: 24, xxl: 24 },
|
|
50
|
-
showActionButtonGroup: !1
|
|
51
|
-
}
|
|
52
|
-
});
|
|
53
|
-
function v() {
|
|
54
|
-
return u.value = !0, _.get(
|
|
55
|
-
{
|
|
56
|
-
url: "/online/cgform/head/queryTables"
|
|
57
|
-
/* query */
|
|
58
|
-
},
|
|
59
|
-
{
|
|
60
|
-
errorMessageMode: "none"
|
|
61
|
-
}
|
|
62
|
-
).then(
|
|
63
|
-
(o) => (a.value = o, n.value = [...o], o),
|
|
64
|
-
(o) => {
|
|
65
|
-
o.message == "noadminauth" && (t.value = "非admin用户无权限操作!", p.warn(t.value)), a.value = [], n.value = [];
|
|
66
|
-
}
|
|
67
|
-
).finally(() => {
|
|
68
|
-
u.value = !1;
|
|
69
|
-
});
|
|
70
|
-
}
|
|
71
|
-
function F(o) {
|
|
72
|
-
n.value.length !== 0 && (o ? (a.value = n.value.filter((R) => R.id.toLowerCase().includes(o.toLowerCase())), t.value = a.value.length === 0 ? "无筛选结果" : "暂无数据") : a.value = [...n.value], B({ current: 1 }));
|
|
73
|
-
}
|
|
74
|
-
function N() {
|
|
75
|
-
m();
|
|
76
|
-
}
|
|
77
|
-
function k() {
|
|
78
|
-
if (!i.value || i.value.length == 0) {
|
|
79
|
-
p.warning("请选择一张表");
|
|
80
|
-
return;
|
|
81
|
-
} else {
|
|
82
|
-
s.value = !0;
|
|
83
|
-
let o = i.value.join(",");
|
|
84
|
-
_.post({ url: "/online/cgform/head/transTables/" + o }).then(() => {
|
|
85
|
-
m(), h("success");
|
|
86
|
-
}).finally(() => s.value = !1);
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
return {
|
|
90
|
-
emptyText: t,
|
|
91
|
-
confirmLoading: u,
|
|
92
|
-
btnLoading: s,
|
|
93
|
-
metaSource: n,
|
|
94
|
-
handleTrans: k,
|
|
95
|
-
handleCancel: N,
|
|
96
|
-
queryTables: v,
|
|
97
|
-
registerModal: c,
|
|
98
|
-
registerTable: y,
|
|
99
|
-
rowSelection: E,
|
|
100
|
-
selectedRowKeys: i,
|
|
101
|
-
wrapClassName: M,
|
|
102
|
-
modalHeight: L
|
|
103
|
-
};
|
|
104
|
-
}
|
|
105
|
-
});
|
|
106
|
-
const x = /* @__PURE__ */ w("div", null, [
|
|
107
|
-
/* @__PURE__ */ g(" 注:导入表会排除配置前缀表 "),
|
|
108
|
-
/* @__PURE__ */ w("a", {
|
|
109
|
-
href: "http://doc.jeecg.com/2043924",
|
|
110
|
-
target: "_blank"
|
|
111
|
-
}, " 参考文档")
|
|
112
|
-
], -1);
|
|
113
|
-
function z(e, h, p, t, u, s) {
|
|
114
|
-
const n = d("BasicTable"), a = d("a-spin"), c = d("a-button"), m = d("BasicModal");
|
|
115
|
-
return D(), H(m, {
|
|
116
|
-
onRegister: e.registerModal,
|
|
117
|
-
height: e.modalHeight,
|
|
118
|
-
width: 500,
|
|
119
|
-
title: "从数据库导入表单",
|
|
120
|
-
confirmLoading: e.confirmLoading,
|
|
121
|
-
onCancel: e.handleCancel,
|
|
122
|
-
wrapClassName: e.wrapClassName
|
|
123
|
-
}, {
|
|
124
|
-
footer: l(() => [
|
|
125
|
-
f(c, { onClick: e.handleCancel }, {
|
|
126
|
-
default: l(() => [
|
|
127
|
-
g("关闭")
|
|
128
|
-
]),
|
|
129
|
-
_: 1
|
|
130
|
-
}, 8, ["onClick"]),
|
|
131
|
-
f(c, {
|
|
132
|
-
onClick: e.handleTrans,
|
|
133
|
-
type: "primary",
|
|
134
|
-
preIcon: "ant-design:swap",
|
|
135
|
-
loading: e.confirmLoading || e.btnLoading
|
|
136
|
-
}, {
|
|
137
|
-
default: l(() => [
|
|
138
|
-
g(" 生成表单 ")
|
|
139
|
-
]),
|
|
140
|
-
_: 1
|
|
141
|
-
}, 8, ["onClick", "loading"])
|
|
142
|
-
]),
|
|
143
|
-
default: l(() => [
|
|
144
|
-
f(a, { spinning: e.confirmLoading }, {
|
|
145
|
-
default: l(() => [
|
|
146
|
-
f(n, {
|
|
147
|
-
onRegister: e.registerTable,
|
|
148
|
-
rowSelection: e.rowSelection,
|
|
149
|
-
onTableRedo: e.queryTables
|
|
150
|
-
}, {
|
|
151
|
-
tableTitle: l(() => [
|
|
152
|
-
x
|
|
153
|
-
]),
|
|
154
|
-
_: 1
|
|
155
|
-
}, 8, ["onRegister", "rowSelection", "onTableRedo"])
|
|
156
|
-
]),
|
|
157
|
-
_: 1
|
|
158
|
-
}, 8, ["spinning"])
|
|
159
|
-
]),
|
|
160
|
-
_: 1
|
|
161
|
-
}, 8, ["onRegister", "height", "confirmLoading", "onCancel", "wrapClassName"]);
|
|
162
|
-
}
|
|
163
|
-
const oe = /* @__PURE__ */ V(j, [["render", z]]);
|
|
164
|
-
export {
|
|
165
|
-
oe as default
|
|
166
|
-
};
|
|
@@ -1,95 +0,0 @@
|
|
|
1
|
-
import { useDebounceFn as v } from "@vueuse/core";
|
|
2
|
-
import { defHttp as S } from "/@/utils/http/axios";
|
|
3
|
-
import { useMessage as w } from "/@/hooks/web/useMessage";
|
|
4
|
-
import { ref as d, watch as f, resolveComponent as p, openBlock as c, createBlock as m, withCtx as h, createElementBlock as y, Fragment as C, renderList as x, createTextVNode as k, toDisplayString as O } from "vue";
|
|
5
|
-
import { _ as B } from "./index-173949bb.mjs";
|
|
6
|
-
import "/@/components/jeecg/OnLine/JPopupOnlReport.vue";
|
|
7
|
-
import "vue-router";
|
|
8
|
-
const { createMessage: I } = w(), q = {
|
|
9
|
-
name: "JOnlineSearchSelect",
|
|
10
|
-
props: {
|
|
11
|
-
placeholder: {
|
|
12
|
-
type: String,
|
|
13
|
-
default: "",
|
|
14
|
-
required: !1
|
|
15
|
-
},
|
|
16
|
-
value: {
|
|
17
|
-
type: String,
|
|
18
|
-
required: !1
|
|
19
|
-
},
|
|
20
|
-
// online CgReport item id
|
|
21
|
-
fieldId: {
|
|
22
|
-
type: String,
|
|
23
|
-
required: !0
|
|
24
|
-
}
|
|
25
|
-
},
|
|
26
|
-
emits: ["update:value"],
|
|
27
|
-
setup(r, { emit: i }) {
|
|
28
|
-
let n = d(""), t = d([]);
|
|
29
|
-
f(
|
|
30
|
-
() => r.value,
|
|
31
|
-
(e) => {
|
|
32
|
-
e ? n.value = e : n.value = void 0;
|
|
33
|
-
},
|
|
34
|
-
{ immediate: !0 }
|
|
35
|
-
), f(
|
|
36
|
-
() => r.fieldId,
|
|
37
|
-
() => {
|
|
38
|
-
a();
|
|
39
|
-
},
|
|
40
|
-
{ immediate: !0 }
|
|
41
|
-
);
|
|
42
|
-
const u = v(o, 800);
|
|
43
|
-
function o(e = "") {
|
|
44
|
-
let g = {
|
|
45
|
-
keyword: e
|
|
46
|
-
}, _ = "/online/cgreport/api/getReportDictList?fieldId=" + r.fieldId;
|
|
47
|
-
S.get({ url: _, params: g }, { isTransformResponse: !1 }).then((l) => {
|
|
48
|
-
l.success ? l.result && l.result.length > 0 ? t.value = l.result : t.value = [] : I.warning(l.message);
|
|
49
|
-
});
|
|
50
|
-
}
|
|
51
|
-
function s(e) {
|
|
52
|
-
i("update:value", e), (!e || e == "") && a();
|
|
53
|
-
}
|
|
54
|
-
function a() {
|
|
55
|
-
t.value = [], o();
|
|
56
|
-
}
|
|
57
|
-
return {
|
|
58
|
-
selectOptions: t,
|
|
59
|
-
handleSearch: u,
|
|
60
|
-
handleChange: s,
|
|
61
|
-
selected: n
|
|
62
|
-
};
|
|
63
|
-
}
|
|
64
|
-
};
|
|
65
|
-
function D(r, i, n, t, u, o) {
|
|
66
|
-
const s = p("a-select-option"), a = p("a-select");
|
|
67
|
-
return c(), m(a, {
|
|
68
|
-
value: t.selected,
|
|
69
|
-
placeholder: n.placeholder,
|
|
70
|
-
"show-search": "",
|
|
71
|
-
"default-active-first-option": !1,
|
|
72
|
-
"show-arrow": !0,
|
|
73
|
-
"filter-option": !1,
|
|
74
|
-
"not-found-content": null,
|
|
75
|
-
onSearch: t.handleSearch,
|
|
76
|
-
onChange: t.handleChange,
|
|
77
|
-
allowClear: ""
|
|
78
|
-
}, {
|
|
79
|
-
default: h(() => [
|
|
80
|
-
(c(!0), y(C, null, x(t.selectOptions, (e) => (c(), m(s, {
|
|
81
|
-
key: e.value
|
|
82
|
-
}, {
|
|
83
|
-
default: h(() => [
|
|
84
|
-
k(O(e.text), 1)
|
|
85
|
-
]),
|
|
86
|
-
_: 2
|
|
87
|
-
}, 1024))), 128))
|
|
88
|
-
]),
|
|
89
|
-
_: 1
|
|
90
|
-
}, 8, ["value", "placeholder", "onSearch", "onChange"]);
|
|
91
|
-
}
|
|
92
|
-
const E = /* @__PURE__ */ B(q, [["render", D]]);
|
|
93
|
-
export {
|
|
94
|
-
E as default
|
|
95
|
-
};
|