@jeecg/online 3.7.4 → 3.9.0-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/{AccountLoginForm-d2fed52f.mjs → AccountLoginForm-cbc75a49.mjs} +1 -1
- package/{AiModal-fbe4b68a.mjs → AiModal-5bec5218.mjs} +1 -1
- package/{AppForgetPassword-3b3bec82.mjs → AppForgetPassword-dbc8377e.mjs} +2 -2
- package/{AppLogin-cd2e2a87.mjs → AppLogin-786949d3.mjs} +9 -9
- package/{AppLoginHeader-9b5be678.mjs → AppLoginHeader-37034b2f.mjs} +1 -1
- package/{AppNameEmail-b4e32ae8.mjs → AppNameEmail-7c6a1406.mjs} +2 -2
- package/{AppRegister-7117b66a.mjs → AppRegister-29a00a9d.mjs} +3 -3
- package/{AppTenant-5817729b.mjs → AppTenant-92890383.mjs} +2 -2
- package/{AppThirdForm-d14fb5e5.mjs → AppThirdForm-760064e5.mjs} +1 -1
- package/{AuthButtonConfig-5e3b6d72.mjs → AuthButtonConfig-78180aec.mjs} +50 -46
- package/{AuthButtonTree-7b4ec967.mjs → AuthButtonTree-62c8e70c.mjs} +2 -2
- package/{AuthDataConfig-48ee9228.mjs → AuthDataConfig-c978c469.mjs} +2 -2
- package/{AuthDataTree-02b3ba05.mjs → AuthDataTree-0647a06c.mjs} +1 -1
- package/{AuthFieldConfig-562cc6b6.mjs → AuthFieldConfig-558283bc.mjs} +2 -2
- package/{AuthFieldTree-2d458c0c.mjs → AuthFieldTree-106db4e2.mjs} +1 -1
- package/{AuthManagerDrawer-38299230.mjs → AuthManagerDrawer-ec5190d2.mjs} +5 -5
- package/{AuthSetterModal-78b06703.mjs → AuthSetterModal-90a76886.mjs} +8 -8
- package/CgformAddressModal-690b8940.mjs +263 -0
- package/CgformCopyList-af9c99a4.mjs +260 -0
- package/{CgformModal-12951453.mjs → CgformModal-b04a492a.mjs} +73 -70
- package/CgreportAigcModal-8fdcbd31.mjs +211 -0
- package/{CgreportModal-bfeb93ed.mjs → CgreportModal-da62724c.mjs} +123 -119
- package/{CheckDictTable-3c1e59e0.mjs → CheckDictTable-7320189b.mjs} +2 -2
- package/{CodeFileListModal-71752603.mjs → CodeFileListModal-e5ec210d.mjs} +2 -2
- package/CodeFileViewModal-09053f3a.mjs +269 -0
- package/CodeGeneratorModal-aba790e3.mjs +298 -0
- package/{CustomButtonList-22b5cdb3.mjs → CustomButtonList-704e6d1c.mjs} +1 -1
- package/{DBAttributeTable-eb25565c.mjs → DBAttributeTable-4a65c897.mjs} +176 -131
- package/{DbToOnlineModal-049b4bbd.mjs → DbToOnlineModal-cc398c70.mjs} +1 -1
- package/{DetailForm-c127c27f.mjs → DetailForm-a2bf8c33.mjs} +165 -153
- package/{DropMenuItem-b1a8f47d.mjs → DropMenuItem-884f9464.mjs} +1 -1
- package/{EnhanceJavaModal-1a4d696b.mjs → EnhanceJavaModal-fe8d475d.mjs} +1 -1
- package/{EnhanceJsHistory-48cf43ad.mjs → EnhanceJsHistory-95ca545c.mjs} +2 -2
- package/{EnhanceJsModal-0e1f15f8.mjs → EnhanceJsModal-742b0ee2.mjs} +17 -16
- package/{EnhanceSqlModal-6a1aa471.mjs → EnhanceSqlModal-6e36bc4f.mjs} +1 -1
- package/{ExtendConfigModal-37af21a5.mjs → ExtendConfigModal-74d657c7.mjs} +2 -2
- package/{FieldExtendJsonModal-9441e08e.mjs → FieldExtendJsonModal-fe7f7902.mjs} +2 -2
- package/{FileSelectModal-04490919.mjs → FileSelectModal-cf41604b.mjs} +1 -1
- package/{ForeignKeyTable-06300a47.mjs → ForeignKeyTable-4a59ded1.mjs} +2 -2
- package/{IndexTable-79bddd5c.mjs → IndexTable-87d67830.mjs} +2 -2
- package/{JModalTip-192fafa1.mjs → JModalTip-5401f43d.mjs} +1 -1
- package/{JOnlineSearchSelect-9abcf657.mjs → JOnlineSearchSelect-d8c57973.mjs} +1 -1
- package/{LeftDepart-35d78655.mjs → LeftDepart-463bf432.mjs} +1 -1
- package/{LeftRole-9d88976d.mjs → LeftRole-1631d3d4.mjs} +1 -1
- package/{LeftUser-04c89aea.mjs → LeftUser-5774a5db.mjs} +1 -1
- package/{LinkTableConfigModal-5f94ef13.mjs → LinkTableConfigModal-1bab1423.mjs} +1 -1
- package/{LinkTableFieldConfigModal-40753de5.mjs → LinkTableFieldConfigModal-49470140.mjs} +1 -1
- package/{LinkTableListPiece-179035c7.mjs → LinkTableListPiece-47f4286c.mjs} +1 -1
- package/{ModalFormDemo-3a85920c.mjs → ModalFormDemo-dbd0aa28.mjs} +1 -1
- package/OnlCgformErpList-35ad1d6e.mjs +528 -0
- package/{OnlCgformErpSubTable-3515150b.mjs → OnlCgformErpSubTable-5093d438.mjs} +45 -42
- package/{OnlCgformInnerSubTable-13e888c6.mjs → OnlCgformInnerSubTable-f1dc90db.mjs} +108 -103
- package/{OnlCgformInnerTableList-2e8f853c.mjs → OnlCgformInnerTableList-1b82a7da.mjs} +163 -155
- package/{OnlCgformTabList-583ac15f.mjs → OnlCgformTabList-d66d1261.mjs} +163 -155
- package/OnlineAutoList-fbba2a52.mjs +559 -0
- package/{OnlineAutoModal-c0743caf.mjs → OnlineAutoModal-68909692.mjs} +11 -10
- package/OnlineAutoTreeList-5153f09d.mjs +533 -0
- package/OnlineCustomModal-b5f8c799.mjs +247 -0
- package/{OnlineDetailModal-785e848e.mjs → OnlineDetailModal-ac078a9a.mjs} +45 -43
- package/OnlineForm-20604e4f.mjs +1080 -0
- package/OnlineFormDetail-719118b6.mjs +350 -0
- package/{OnlineFormUrlAdd-905bf251.mjs → OnlineFormUrlAdd-5b675f48.mjs} +14 -12
- package/{OnlineFormUrlDetail-a9dd2bfa.mjs → OnlineFormUrlDetail-91156bf2.mjs} +22 -19
- package/{OnlineFormUrlEdit-b8941f05.mjs → OnlineFormUrlEdit-fb810de6.mjs} +14 -12
- package/{OnlineFormUrlSuccess-ecaf6a21.mjs → OnlineFormUrlSuccess-302ecb21.mjs} +1 -1
- package/{OnlineQueryForm-ca6186a3.mjs → OnlineQueryForm-5eeceb51.mjs} +120 -120
- package/{OnlineSearchFormItem-5c503a51.mjs → OnlineSearchFormItem-5536a1a6.mjs} +2 -2
- package/{OnlineSelectCascade-a3e686b3.mjs → OnlineSelectCascade-180e8c9a.mjs} +61 -55
- package/{OnlineSubFormDetail-be1ad3b9.mjs → OnlineSubFormDetail-4d64e7be.mjs} +48 -44
- package/{OnlineTabAutoModal-fb59b573.mjs → OnlineTabAutoModal-c127ed50.mjs} +10 -9
- package/{OnlineTabDetailModal-4b9c4838.mjs → OnlineTabDetailModal-e4e9f7e3.mjs} +39 -37
- package/{OnlineTabForm-89389384.mjs → OnlineTabForm-827e7089.mjs} +26 -25
- package/OnlineTabFormDetail-0f96377e.mjs +329 -0
- package/{PageAttributeTable-345b97fe.mjs → PageAttributeTable-5703e2f1.mjs} +6 -6
- package/{PhoneLoginForm-8ca7e2d4.mjs → PhoneLoginForm-15dc68ed.mjs} +52 -52
- package/ProcessOnlineForm-1fcbe0af.mjs +219 -0
- package/{QueryTable-f0a88d78.mjs → QueryTable-26c9ee22.mjs} +2 -2
- package/{SetSwitchOptions-cdcb22a1.mjs → SetSwitchOptions-a3428177.mjs} +1 -1
- package/{ShareAddView-f713c0a5.mjs → ShareAddView-0512e884.mjs} +25 -22
- package/{ShareEditView-691764ad.mjs → ShareEditView-b89dfbd3.mjs} +25 -22
- package/{ShareView-df344a8d.mjs → ShareView-faf1a0ab.mjs} +23 -20
- package/{ShareView.vue_vue_type_script_setup_true_lang-560459c9.mjs → ShareView.vue_vue_type_script_setup_true_lang-d1597c0d.mjs} +2 -2
- package/{SingleView-ad0287d6.mjs → SingleView-21d3a558.mjs} +18 -15
- package/{SingleView.vue_vue_type_style_index_0_lang-ce96670b.mjs → SingleView.vue_vue_type_style_index_0_lang-914483d0.mjs} +4 -4
- package/{SuperQuery-2b293e3b.mjs → SuperQuery-c95f86ee.mjs} +69 -67
- package/TaskOpinionList-73ecb3c8.mjs +101 -0
- package/aiModal-b44fa135.mjs +175 -0
- package/{auth.data-626c5083.mjs → auth.data-e44c7975.mjs} +10 -9
- package/button.data-fe45d43b.mjs +12 -0
- package/dayjs.min-eea532a3.mjs +301 -0
- package/{index-d6f9ada7.mjs → index-02f6dc7d.mjs} +2 -2
- package/{index-bef7fe2d.mjs → index-22a99f2e.mjs} +1 -1
- package/{index-181f8344.mjs → index-26940246.mjs} +3 -3
- package/{index-3c7392a4.mjs → index-30da2fc0.mjs} +136 -128
- package/index-391aec04.mjs +268 -0
- package/index-94b6319e.mjs +57 -0
- package/{index-93341e02.mjs → index-abbfd327.mjs} +2 -2
- package/main.index.js +1 -1
- package/package.json +1 -1
- package/style.css +1 -1
- package/useCgformList-aaa30c8c.mjs +410 -0
- package/{useCustomHook-acb00837.mjs → useCustomHook-3a17a690.mjs} +11 -9
- package/useExtendComponent-ad499dff.mjs +4164 -0
- package/useListButton-308458cd.mjs +765 -0
- package/{useSchemas-f1819e54.mjs → useSchemas-b074f3a1.mjs} +72 -72
- package/{useTableSync-075826a1.mjs → useTableSync-dbfba20e.mjs} +31 -31
- package/CgformAddressModal-1b9cbe19.mjs +0 -260
- package/CgformCopyList-580bba0f.mjs +0 -252
- package/CodeFileViewModal-eb803769.mjs +0 -253
- package/CodeGeneratorModal-2fe1e920.mjs +0 -281
- package/OnlCgformErpList-8fd15fc1.mjs +0 -488
- package/OnlineAutoList-36ec0957.mjs +0 -513
- package/OnlineAutoTreeList-1cd718be.mjs +0 -523
- package/OnlineCustomModal-661ee850.mjs +0 -232
- package/OnlineForm-c1fb38eb.mjs +0 -1012
- package/OnlineFormDetail-50186870.mjs +0 -342
- package/OnlineTabFormDetail-72173ae4.mjs +0 -327
- package/ProcessOnlineForm-485b5679.mjs +0 -188
- package/README.md +0 -26
- package/index-3ccda826.mjs +0 -239
- package/index-f3683351.mjs +0 -57
- package/useCgformList-13c8aab7.mjs +0 -378
- package/useExtendComponent-3f5734ca.mjs +0 -4459
- package/useListButton-ee23874a.mjs +0 -719
- /package/{OnlineForm.vue_vue_type_style_index_0_scoped_3f26e7bd_lang-4ed993c7.mjs → OnlineForm.vue_vue_type_style_index_0_scoped_60bd1850_lang-4ed993c7.mjs} +0 -0
|
@@ -1,253 +0,0 @@
|
|
|
1
|
-
var F = (o, r, u) => new Promise((w, g) => {
|
|
2
|
-
var v = (i) => {
|
|
3
|
-
try {
|
|
4
|
-
d(u.next(i));
|
|
5
|
-
} catch (s) {
|
|
6
|
-
g(s);
|
|
7
|
-
}
|
|
8
|
-
}, y = (i) => {
|
|
9
|
-
try {
|
|
10
|
-
d(u.throw(i));
|
|
11
|
-
} catch (s) {
|
|
12
|
-
g(s);
|
|
13
|
-
}
|
|
14
|
-
}, d = (i) => i.done ? w(i.value) : Promise.resolve(i.value).then(v, y);
|
|
15
|
-
d((u = u.apply(o, r)).next());
|
|
16
|
-
});
|
|
17
|
-
import { defineComponent as P, ref as h, reactive as H, resolveComponent as p, openBlock as k, createBlock as x, withCtx as m, createVNode as C, createTextVNode as V, createElementVNode as W, normalizeStyle as j, createCommentVNode as q } from "vue";
|
|
18
|
-
import { defHttp as z } from "/@/utils/http/axios";
|
|
19
|
-
import { BasicModal as U, useModalInner as Y } from "/@/components/Modal";
|
|
20
|
-
import { InfoCircleTwoTone as Q } from "@ant-design/icons-vue";
|
|
21
|
-
import { message as $ } from "ant-design-vue";
|
|
22
|
-
import { JCodeEditor as X } from "/@/components/Form";
|
|
23
|
-
import { useDesign as Z } from "/@/hooks/web/useDesign";
|
|
24
|
-
import { _ as ee } from "./index-f3683351.mjs";
|
|
25
|
-
import "/@/components/jeecg/OnLine/JPopupOnlReport.vue";
|
|
26
|
-
import "/@/hooks/web/useMessage";
|
|
27
|
-
import "vue-router";
|
|
28
|
-
const te = P({
|
|
29
|
-
name: "CodeFileViewModal",
|
|
30
|
-
components: {
|
|
31
|
-
BasicModal: U,
|
|
32
|
-
InfoCircleTwoTone: Q,
|
|
33
|
-
JCodeEditor: X
|
|
34
|
-
},
|
|
35
|
-
emits: ["download", "register", "close"],
|
|
36
|
-
setup(o, { emit: r }) {
|
|
37
|
-
const u = h([]), w = h(""), g = h([]), v = h(!1), y = window.innerHeight - 142, d = h("java"), i = h("");
|
|
38
|
-
let s = H({});
|
|
39
|
-
const [D, { closeModal: M }] = Y((t) => F(this, null, function* () {
|
|
40
|
-
s = H({}), i.value = "", u.value = t.codeList, w.value = t.pathKey, T(), v.value = !0;
|
|
41
|
-
})), { prefixCls: _ } = Z("online-codeFileViewModal");
|
|
42
|
-
function T() {
|
|
43
|
-
let t = G(), l = t[0];
|
|
44
|
-
N(l, t);
|
|
45
|
-
let n = [];
|
|
46
|
-
const e = function(c) {
|
|
47
|
-
if (c.children) {
|
|
48
|
-
let a = c.children;
|
|
49
|
-
a.length == 1 ? e(a[0]) : a.length > 1 && n.push(c);
|
|
50
|
-
}
|
|
51
|
-
};
|
|
52
|
-
e(l), g.value = n, setTimeout(() => {
|
|
53
|
-
b(l);
|
|
54
|
-
}, 300);
|
|
55
|
-
}
|
|
56
|
-
function b(t) {
|
|
57
|
-
return F(this, null, function* () {
|
|
58
|
-
const l = function(e) {
|
|
59
|
-
if (e.isLeaf === !0)
|
|
60
|
-
return e;
|
|
61
|
-
if (e.children)
|
|
62
|
-
return l(e.children[0]);
|
|
63
|
-
};
|
|
64
|
-
let n = l(t);
|
|
65
|
-
if (n && n.isLeaf === !0) {
|
|
66
|
-
let e = n.path;
|
|
67
|
-
s[e] || (yield K(e)), d.value = A(e), i.value = s[e];
|
|
68
|
-
}
|
|
69
|
-
});
|
|
70
|
-
}
|
|
71
|
-
function N(t, l) {
|
|
72
|
-
for (let n of l)
|
|
73
|
-
t.key == n.pid && (t.children || (t.children = []), t.children.push(n), N(n, l));
|
|
74
|
-
}
|
|
75
|
-
function R(t, l) {
|
|
76
|
-
let n = 0, e = "";
|
|
77
|
-
for (; n <= l; )
|
|
78
|
-
e += t[n], n++;
|
|
79
|
-
return e;
|
|
80
|
-
}
|
|
81
|
-
function G() {
|
|
82
|
-
let t = [], l = [], n = u.value;
|
|
83
|
-
for (let e of n) {
|
|
84
|
-
let c = e.replace(new RegExp("\\\\", "g"), "/").replace("生成成功:", "").trim();
|
|
85
|
-
if (c) {
|
|
86
|
-
let a = c.split("/");
|
|
87
|
-
for (let f = 0; f < a.length; f++) {
|
|
88
|
-
let B = a[f], L = R(a, f);
|
|
89
|
-
if (B) {
|
|
90
|
-
let E = {
|
|
91
|
-
title: B,
|
|
92
|
-
key: L
|
|
93
|
-
};
|
|
94
|
-
if (B != 0) {
|
|
95
|
-
let S = R(a, f - 1);
|
|
96
|
-
S && (E.pid = S);
|
|
97
|
-
}
|
|
98
|
-
f == a.length - 1 && (E.isLeaf = !0, E.path = c), (l.indexOf(L) < 0 || f == a.length - 1) && (t.push(E), l.push(L));
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
return t;
|
|
104
|
-
}
|
|
105
|
-
function I() {
|
|
106
|
-
M(), r("close");
|
|
107
|
-
}
|
|
108
|
-
function J() {
|
|
109
|
-
r("download");
|
|
110
|
-
}
|
|
111
|
-
function A(t) {
|
|
112
|
-
return t.endsWith("xml") ? "application/xml" : t.endsWith("sql") ? "text/x-sql" : t.endsWith("vue") ? "text/x-vue" : t.endsWith("ts") ? "text/typescript" : "text/x-java";
|
|
113
|
-
}
|
|
114
|
-
function O(t, l) {
|
|
115
|
-
return F(this, null, function* () {
|
|
116
|
-
let n = l.node.dataRef;
|
|
117
|
-
if (n.isLeaf) {
|
|
118
|
-
let e = n.path;
|
|
119
|
-
s[e] || (yield K(e)), d.value = A(e), i.value = s[e];
|
|
120
|
-
}
|
|
121
|
-
});
|
|
122
|
-
}
|
|
123
|
-
function K(t) {
|
|
124
|
-
return new Promise((l) => {
|
|
125
|
-
let n = {
|
|
126
|
-
path: encodeURI(t),
|
|
127
|
-
pathKey: w.value
|
|
128
|
-
};
|
|
129
|
-
z.get({ url: "/online/cgform/api/codeView", params: n }, { isTransformResponse: !1 }).then((e) => {
|
|
130
|
-
if (!e || e.size === 0) {
|
|
131
|
-
$.warning("文件下载失败");
|
|
132
|
-
return;
|
|
133
|
-
} else if (e.message) {
|
|
134
|
-
$.warning(e.message);
|
|
135
|
-
return;
|
|
136
|
-
}
|
|
137
|
-
let c = new Blob([e]), a = new FileReader();
|
|
138
|
-
a.readAsText(c, "utf8"), a.onload = function() {
|
|
139
|
-
let f = this.result;
|
|
140
|
-
s[t] = f, l(1);
|
|
141
|
-
};
|
|
142
|
-
});
|
|
143
|
-
});
|
|
144
|
-
}
|
|
145
|
-
return {
|
|
146
|
-
registerModal: D,
|
|
147
|
-
codeList: u,
|
|
148
|
-
onDownloadGenerateCode: J,
|
|
149
|
-
handleClose: I,
|
|
150
|
-
treeData: g,
|
|
151
|
-
showCodeContent: O,
|
|
152
|
-
activeCodeContent: i,
|
|
153
|
-
expandStatus: v,
|
|
154
|
-
height: y,
|
|
155
|
-
language: d,
|
|
156
|
-
prefixCls: _,
|
|
157
|
-
modalHeight: 1e3
|
|
158
|
-
};
|
|
159
|
-
}
|
|
160
|
-
});
|
|
161
|
-
function ne(o, r, u, w, g, v) {
|
|
162
|
-
const y = p("info-circle-two-tone"), d = p("a-directory-tree"), i = p("a-col"), s = p("JCodeEditor"), D = p("a-empty"), M = p("a-row"), _ = p("a-button"), T = p("BasicModal");
|
|
163
|
-
return k(), x(T, {
|
|
164
|
-
height: o.modalHeight,
|
|
165
|
-
onRegister: o.registerModal,
|
|
166
|
-
okText: "",
|
|
167
|
-
cancelText: "关闭",
|
|
168
|
-
width: 1200,
|
|
169
|
-
defaultFullscreen: !0,
|
|
170
|
-
canFullscreen: !1,
|
|
171
|
-
onOk: o.onDownloadGenerateCode,
|
|
172
|
-
wrapClassName: o.prefixCls
|
|
173
|
-
}, {
|
|
174
|
-
title: m(() => [
|
|
175
|
-
C(y),
|
|
176
|
-
r[1] || (r[1] = V(" 代码在线预览 "))
|
|
177
|
-
]),
|
|
178
|
-
footer: m(() => [
|
|
179
|
-
C(_, { onClick: o.handleClose }, {
|
|
180
|
-
default: m(() => r[2] || (r[2] = [
|
|
181
|
-
V("关闭")
|
|
182
|
-
])),
|
|
183
|
-
_: 1
|
|
184
|
-
}, 8, ["onClick"]),
|
|
185
|
-
C(_, {
|
|
186
|
-
type: "primary",
|
|
187
|
-
onClick: o.onDownloadGenerateCode
|
|
188
|
-
}, {
|
|
189
|
-
default: m(() => r[3] || (r[3] = [
|
|
190
|
-
V("下载到本地")
|
|
191
|
-
])),
|
|
192
|
-
_: 1
|
|
193
|
-
}, 8, ["onClick"])
|
|
194
|
-
]),
|
|
195
|
-
default: m(() => [
|
|
196
|
-
W("div", null, [
|
|
197
|
-
C(M, null, {
|
|
198
|
-
default: m(() => [
|
|
199
|
-
C(i, {
|
|
200
|
-
span: 6,
|
|
201
|
-
gutter: 3,
|
|
202
|
-
style: { "border-right": "1px solid #eee" }
|
|
203
|
-
}, {
|
|
204
|
-
default: m(() => [
|
|
205
|
-
W("div", {
|
|
206
|
-
style: j({ height: o.height + "px", overflowY: "auto" })
|
|
207
|
-
}, [
|
|
208
|
-
o.treeData.length ? (k(), x(d, {
|
|
209
|
-
key: 0,
|
|
210
|
-
defaultExpandAll: !0,
|
|
211
|
-
"tree-data": o.treeData,
|
|
212
|
-
onSelect: o.showCodeContent
|
|
213
|
-
}, null, 8, ["tree-data", "onSelect"])) : q("", !0)
|
|
214
|
-
], 4)
|
|
215
|
-
]),
|
|
216
|
-
_: 1
|
|
217
|
-
}),
|
|
218
|
-
C(i, {
|
|
219
|
-
span: 18,
|
|
220
|
-
gutter: 3
|
|
221
|
-
}, {
|
|
222
|
-
default: m(() => [
|
|
223
|
-
o.activeCodeContent ? (k(), x(s, {
|
|
224
|
-
key: 0,
|
|
225
|
-
value: o.activeCodeContent,
|
|
226
|
-
"onUpdate:value": r[0] || (r[0] = (b) => o.activeCodeContent = b),
|
|
227
|
-
theme: "idea",
|
|
228
|
-
language: o.language,
|
|
229
|
-
fullScreen: !1,
|
|
230
|
-
lineNumbers: !0,
|
|
231
|
-
height: o.height + "px",
|
|
232
|
-
disabled: !0,
|
|
233
|
-
"language-change": !0
|
|
234
|
-
}, null, 8, ["value", "language", "height"])) : (k(), x(D, {
|
|
235
|
-
key: 1,
|
|
236
|
-
style: { "margin-top": "50px" },
|
|
237
|
-
description: "请选择左侧文件,显示详细代码"
|
|
238
|
-
}))
|
|
239
|
-
]),
|
|
240
|
-
_: 1
|
|
241
|
-
})
|
|
242
|
-
]),
|
|
243
|
-
_: 1
|
|
244
|
-
})
|
|
245
|
-
])
|
|
246
|
-
]),
|
|
247
|
-
_: 1
|
|
248
|
-
}, 8, ["height", "onRegister", "onOk", "wrapClassName"]);
|
|
249
|
-
}
|
|
250
|
-
const ge = /* @__PURE__ */ ee(te, [["render", ne]]);
|
|
251
|
-
export {
|
|
252
|
-
ge as default
|
|
253
|
-
};
|
|
@@ -1,281 +0,0 @@
|
|
|
1
|
-
var E = (t, o, c) => new Promise((F, p) => {
|
|
2
|
-
var T = (n) => {
|
|
3
|
-
try {
|
|
4
|
-
l(c.next(n));
|
|
5
|
-
} catch (f) {
|
|
6
|
-
p(f);
|
|
7
|
-
}
|
|
8
|
-
}, d = (n) => {
|
|
9
|
-
try {
|
|
10
|
-
l(c.throw(n));
|
|
11
|
-
} catch (f) {
|
|
12
|
-
p(f);
|
|
13
|
-
}
|
|
14
|
-
}, l = (n) => n.done ? F(n.value) : Promise.resolve(n.value).then(T, d);
|
|
15
|
-
l((c = c.apply(t, o)).next());
|
|
16
|
-
});
|
|
17
|
-
import { defineComponent as ie, ref as M, computed as G, reactive as P, nextTick as ue, resolveComponent as i, openBlock as L, createElementBlock as me, Fragment as ce, createVNode as u, withCtx as r, createElementVNode as J, createTextVNode as V, createBlock as I, createCommentVNode as $, mergeProps as pe } from "vue";
|
|
18
|
-
import { defHttp as H } from "/@/utils/http/axios";
|
|
19
|
-
import { BasicForm as de, useForm as fe } from "/@/components/Form";
|
|
20
|
-
import { BasicModal as ge, useModalInner as Fe, useModal as U } from "/@/components/Modal";
|
|
21
|
-
import { JVxeTypes as R } from "/@/components/jeecg/JVxeTable/types";
|
|
22
|
-
import { b as be } from "./useSchemas-f1819e54.mjs";
|
|
23
|
-
import { underLine2CamelCase as q } from "/@/utils/common/compUtils";
|
|
24
|
-
import Ce from "./CodeFileListModal-71752603.mjs";
|
|
25
|
-
import _e from "./FileSelectModal-04490919.mjs";
|
|
26
|
-
import { message as ve } from "ant-design-vue";
|
|
27
|
-
import { useDesign as Me } from "/@/hooks/web/useDesign";
|
|
28
|
-
import { _ as Ne } from "./index-f3683351.mjs";
|
|
29
|
-
import "@ant-design/icons-vue";
|
|
30
|
-
import "/@/hooks/web/usePermission";
|
|
31
|
-
import "/@/utils/helper/validator";
|
|
32
|
-
import "./CodeFileViewModal-eb803769.mjs";
|
|
33
|
-
import "/@/components/jeecg/OnLine/JPopupOnlReport.vue";
|
|
34
|
-
import "/@/hooks/web/useMessage";
|
|
35
|
-
import "vue-router";
|
|
36
|
-
import "/@/utils/file/download";
|
|
37
|
-
const ye = ie({
|
|
38
|
-
name: "CodeGenerator",
|
|
39
|
-
components: { BasicForm: de, BasicModal: ge, FileSelectModal: _e, CodeFileListModal: Ce },
|
|
40
|
-
emits: ["register"],
|
|
41
|
-
setup(t) {
|
|
42
|
-
const o = "JEECG_ONL_PROJECT_PATH", c = "JEECG_ONL_PROJECT_NAME", F = M(!0), p = M(), T = G(() => F.value ? 800 : 1200), d = M("代码生成"), l = M(!1), { prefixCls: n } = Me("code-generator-modal"), f = n, N = M(""), h = P({
|
|
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
|
-
}), a = P({}), y = M([]), b = P({
|
|
52
|
-
dataSource: [],
|
|
53
|
-
columns: [
|
|
54
|
-
{
|
|
55
|
-
title: "子表名",
|
|
56
|
-
key: "tableName",
|
|
57
|
-
type: R.input,
|
|
58
|
-
disabled: !0,
|
|
59
|
-
validateRules: [{ required: !0, message: "请输入${title}" }]
|
|
60
|
-
},
|
|
61
|
-
{
|
|
62
|
-
title: "子表实体",
|
|
63
|
-
key: "entityName",
|
|
64
|
-
type: R.input,
|
|
65
|
-
validateRules: [{ required: !0, message: "请输入${title}" }]
|
|
66
|
-
},
|
|
67
|
-
{
|
|
68
|
-
title: "功能说明",
|
|
69
|
-
key: "ftlDescription",
|
|
70
|
-
type: R.input,
|
|
71
|
-
validateRules: [{ required: !0, message: "请输入${title}" }]
|
|
72
|
-
}
|
|
73
|
-
]
|
|
74
|
-
}), B = G(() => b.dataSource.length > 0), { formSchemas: C } = be(
|
|
75
|
-
t,
|
|
76
|
-
{
|
|
77
|
-
onProjectPathChange: se,
|
|
78
|
-
onProjectPathSearch: oe,
|
|
79
|
-
jspModeOptions: y
|
|
80
|
-
},
|
|
81
|
-
F
|
|
82
|
-
), [S, { resetFields: j, setFieldsValue: k, validate: K }] = fe({
|
|
83
|
-
schemas: C,
|
|
84
|
-
showActionButtonGroup: !1,
|
|
85
|
-
labelAlign: "right"
|
|
86
|
-
}), [x, { closeModal: O }] = Fe((e) => E(this, null, function* () {
|
|
87
|
-
yield j(), N.value = e.code, l.value = !1, b.dataSource = [], y.value = [], ne(), Object.assign(a, h), W();
|
|
88
|
-
}));
|
|
89
|
-
function W() {
|
|
90
|
-
return E(this, null, function* () {
|
|
91
|
-
let { main: e, sub: s, jspModeList: _, projectPath: m } = yield H.get({
|
|
92
|
-
url: "/online/cgform/head/tableInfo",
|
|
93
|
-
params: { code: N.value }
|
|
94
|
-
}), v = [];
|
|
95
|
-
for (let g of _) {
|
|
96
|
-
const { code: D, note: re } = g;
|
|
97
|
-
D == "many" || v.push({
|
|
98
|
-
label: re,
|
|
99
|
-
value: D
|
|
100
|
-
});
|
|
101
|
-
}
|
|
102
|
-
y.value = v, e.isTree == "Y" ? a.jspMode = "tree" : v.find((g) => g.value === e.themeTemplate) ? a.jspMode = e.themeTemplate : a.jspMode = v[0].value, F.value = e.tableType == 1, d.value = "代码生成【" + e.tableName + "】", a.projectPath || (a.projectPath = m, window.localStorage.setItem(o, m));
|
|
103
|
-
const w = localStorage.getItem(c);
|
|
104
|
-
w && (a.entityPackage = w), a.jformType = e.tableType + "", a.tableName_tmp = e.tableName, a.ftlDescription = e.tableTxt;
|
|
105
|
-
let A = q(e.tableName);
|
|
106
|
-
a.entityName = A.substring(0, 1).toUpperCase() + A.substring(1), yield ue(), k(a), s && s.length > 0 && (b.dataSource = s.map((g) => ({
|
|
107
|
-
tableName: g.tableName,
|
|
108
|
-
entityName: le(g.tableName),
|
|
109
|
-
ftlDescription: g.tableTxt
|
|
110
|
-
})));
|
|
111
|
-
});
|
|
112
|
-
}
|
|
113
|
-
const [z, { openModal: Y }] = U();
|
|
114
|
-
function Q() {
|
|
115
|
-
return E(this, null, function* () {
|
|
116
|
-
try {
|
|
117
|
-
const e = yield K();
|
|
118
|
-
let s = Object.assign({}, e, { code: N.value, tableName: e.tableName_tmp });
|
|
119
|
-
if (B.value) {
|
|
120
|
-
if (yield p.value.validateTable())
|
|
121
|
-
return;
|
|
122
|
-
s.subList = p.value.getTableData();
|
|
123
|
-
}
|
|
124
|
-
l.value = !0;
|
|
125
|
-
let _ = yield X(s);
|
|
126
|
-
Y(!0, {
|
|
127
|
-
codeList: _.codeList,
|
|
128
|
-
pathKey: _.pathKey,
|
|
129
|
-
tableName: e.tableName_tmp
|
|
130
|
-
}), O(), localStorage.setItem(c, e.entityPackage);
|
|
131
|
-
} catch (e) {
|
|
132
|
-
} finally {
|
|
133
|
-
l.value = !1;
|
|
134
|
-
}
|
|
135
|
-
});
|
|
136
|
-
}
|
|
137
|
-
function X(e) {
|
|
138
|
-
return new Promise((s, _) => {
|
|
139
|
-
H.post({ url: "/online/cgform/api/codeGenerate", params: e }, { isTransformResponse: !1 }).then((m) => {
|
|
140
|
-
if (m.success) {
|
|
141
|
-
let v = m.result, w = m.message;
|
|
142
|
-
s({
|
|
143
|
-
codeList: v,
|
|
144
|
-
pathKey: w
|
|
145
|
-
});
|
|
146
|
-
} else
|
|
147
|
-
ve.error(m.message), _(m.message);
|
|
148
|
-
});
|
|
149
|
-
});
|
|
150
|
-
}
|
|
151
|
-
function Z() {
|
|
152
|
-
O();
|
|
153
|
-
}
|
|
154
|
-
const [ee, te] = U();
|
|
155
|
-
function oe() {
|
|
156
|
-
te.openModal(!0, {});
|
|
157
|
-
}
|
|
158
|
-
function ae(e) {
|
|
159
|
-
window.localStorage.setItem(o, e), k({ projectPath: e });
|
|
160
|
-
}
|
|
161
|
-
function le(e) {
|
|
162
|
-
let s = q(e);
|
|
163
|
-
return s.substring(0, 1).toUpperCase() + s.substring(1);
|
|
164
|
-
}
|
|
165
|
-
function ne() {
|
|
166
|
-
let e = window.localStorage.getItem(o);
|
|
167
|
-
e && (h.projectPath = e);
|
|
168
|
-
}
|
|
169
|
-
function se(e) {
|
|
170
|
-
e.target.value && window.localStorage.setItem(o, e.target.value);
|
|
171
|
-
}
|
|
172
|
-
return {
|
|
173
|
-
title: d,
|
|
174
|
-
modalWidth: T,
|
|
175
|
-
confirmLoading: l,
|
|
176
|
-
subTable: b,
|
|
177
|
-
showSubTable: B,
|
|
178
|
-
onSubmit: Q,
|
|
179
|
-
onCancel: Z,
|
|
180
|
-
onFileSelect: ae,
|
|
181
|
-
registerFileSelectModal: ee,
|
|
182
|
-
subTableRef: p,
|
|
183
|
-
registerForm: S,
|
|
184
|
-
registerModal: x,
|
|
185
|
-
registerCodeFileListModal: z,
|
|
186
|
-
wrapClassName: f
|
|
187
|
-
};
|
|
188
|
-
}
|
|
189
|
-
});
|
|
190
|
-
function Te(t, o, c, F, p, T) {
|
|
191
|
-
const d = i("a-radio"), l = i("a-tooltip"), n = i("a-radio-group"), f = i("BasicForm"), N = i("JVxeTable"), h = i("a-card"), a = i("a-spin"), y = i("BasicModal"), b = i("FileSelectModal"), B = i("code-file-list-modal");
|
|
192
|
-
return L(), me(ce, null, [
|
|
193
|
-
u(y, {
|
|
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: r(() => [
|
|
205
|
-
u(a, { spinning: t.confirmLoading }, {
|
|
206
|
-
default: r(() => [
|
|
207
|
-
u(f, { onRegister: t.registerForm }, {
|
|
208
|
-
pageCode: r(({ model: C, field: S }) => [
|
|
209
|
-
u(n, {
|
|
210
|
-
value: C[S],
|
|
211
|
-
"onUpdate:value": (j) => C[S] = j
|
|
212
|
-
}, {
|
|
213
|
-
default: r(() => [
|
|
214
|
-
u(l, { placement: "top" }, {
|
|
215
|
-
title: r(() => o[0] || (o[0] = [
|
|
216
|
-
J("span", null, "深度封装表单,用户只需定义字段json即可渲染表单,优点简单便捷,缺点扩展有难度", -1)
|
|
217
|
-
])),
|
|
218
|
-
default: r(() => [
|
|
219
|
-
u(d, { value: "vue3" }, {
|
|
220
|
-
default: r(() => o[1] || (o[1] = [
|
|
221
|
-
V("封装表单(BasicForm)")
|
|
222
|
-
])),
|
|
223
|
-
_: 1
|
|
224
|
-
})
|
|
225
|
-
]),
|
|
226
|
-
_: 1
|
|
227
|
-
}),
|
|
228
|
-
u(l, { placement: "top" }, {
|
|
229
|
-
title: r(() => o[2] || (o[2] = [
|
|
230
|
-
J("span", null, "antd的原生表单,所有字段都需要硬编码,缺点编码繁琐,优点扩展容易", -1)
|
|
231
|
-
])),
|
|
232
|
-
default: r(() => [
|
|
233
|
-
C.jspMode == "innerTable" || C.jspMode == "tab" ? $("", !0) : (L(), I(d, {
|
|
234
|
-
key: 0,
|
|
235
|
-
value: "vue3Native"
|
|
236
|
-
}, {
|
|
237
|
-
default: r(() => o[3] || (o[3] = [
|
|
238
|
-
V("原生表单(a-form)")
|
|
239
|
-
])),
|
|
240
|
-
_: 1
|
|
241
|
-
}))
|
|
242
|
-
]),
|
|
243
|
-
_: 2
|
|
244
|
-
}, 1024)
|
|
245
|
-
]),
|
|
246
|
-
_: 2
|
|
247
|
-
}, 1032, ["value", "onUpdate:value"])
|
|
248
|
-
]),
|
|
249
|
-
_: 1
|
|
250
|
-
}, 8, ["onRegister"]),
|
|
251
|
-
t.showSubTable ? (L(), I(h, {
|
|
252
|
-
key: 0,
|
|
253
|
-
title: "子表信息",
|
|
254
|
-
size: "small"
|
|
255
|
-
}, {
|
|
256
|
-
default: r(() => [
|
|
257
|
-
u(N, pe({
|
|
258
|
-
ref: "subTableRef",
|
|
259
|
-
rowNumber: "",
|
|
260
|
-
maxHeight: 580
|
|
261
|
-
}, t.subTable), null, 16)
|
|
262
|
-
]),
|
|
263
|
-
_: 1
|
|
264
|
-
})) : $("", !0)
|
|
265
|
-
]),
|
|
266
|
-
_: 1
|
|
267
|
-
}, 8, ["spinning"])
|
|
268
|
-
]),
|
|
269
|
-
_: 1
|
|
270
|
-
}, 8, ["onRegister", "title", "width", "confirmLoading", "onOk", "onCancel", "wrapClassName"]),
|
|
271
|
-
u(b, {
|
|
272
|
-
onRegister: t.registerFileSelectModal,
|
|
273
|
-
onSelect: t.onFileSelect
|
|
274
|
-
}, null, 8, ["onRegister", "onSelect"]),
|
|
275
|
-
u(B, { onRegister: t.registerCodeFileListModal }, null, 8, ["onRegister"])
|
|
276
|
-
], 64);
|
|
277
|
-
}
|
|
278
|
-
const Ke = /* @__PURE__ */ Ne(ye, [["render", Te]]);
|
|
279
|
-
export {
|
|
280
|
-
Ke as default
|
|
281
|
-
};
|