@jeecg/online 3.6.2-GA → 3.7.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/AiModal-fe3988fb.mjs +84 -0
- package/AuthButtonConfig-d50a0a65.mjs +134 -0
- package/{AuthButtonTree-c2602a7c.mjs → AuthButtonTree-589395ed.mjs} +2 -2
- package/AuthDataConfig-7bb0cd85.mjs +237 -0
- package/{AuthDataTree-9dc58b20.mjs → AuthDataTree-6e3bb86f.mjs} +1 -1
- package/AuthFieldConfig-490fc0ab.mjs +139 -0
- package/{AuthFieldTree-d836be59.mjs → AuthFieldTree-b7cd091e.mjs} +1 -1
- package/AuthManagerDrawer-5e2ed5ce.mjs +118 -0
- package/AuthSetterModal-6f74449c.mjs +273 -0
- package/{CgformCopyList-86157923.mjs → CgformCopyList-8077ccc6.mjs} +47 -45
- package/{CgformModal-5cf02d51.mjs → CgformModal-36faf29a.mjs} +256 -246
- package/{CgreportModal.vue_vue_type_script_setup_true_lang-c2ceb064.mjs → CgreportModal-5a23d089.mjs} +140 -117
- package/CheckDictTable-b5cb0e2b.mjs +226 -0
- package/{CodeFileListModal-f747daae.mjs → CodeFileListModal-0e26b7e0.mjs} +2 -2
- package/{CodeFileViewModal-a9fb2900.mjs → CodeFileViewModal-9d4a5b5f.mjs} +36 -32
- package/CodeGeneratorModal-b722d976.mjs +238 -0
- package/{CustomButtonList-b9b27a93.mjs → CustomButtonList-37639061.mjs} +118 -100
- package/{DBAttributeTable-6bdcb1e8.mjs → DBAttributeTable-95dc66c1.mjs} +110 -89
- package/{DbToOnlineModal-3705e91a.mjs → DbToOnlineModal-f49b9530.mjs} +56 -50
- package/DetailForm-4aa2570b.mjs +485 -0
- package/{EnhanceJavaModal-c13de6e0.mjs → EnhanceJavaModal-98934198.mjs} +3 -3
- package/{EnhanceJsHistory-154101f0.mjs → EnhanceJsHistory-9c4acdaf.mjs} +2 -2
- package/EnhanceJsModal-247f640d.mjs +532 -0
- package/{EnhanceSqlModal-221c22dc.mjs → EnhanceSqlModal-65b74b0f.mjs} +3 -3
- package/ExtendConfigModal-00f2fb55.mjs +117 -0
- package/FieldExtendJsonModal-cc7fce26.mjs +277 -0
- package/{FileSelectModal-de40a706.mjs → FileSelectModal-38660e3c.mjs} +1 -1
- package/{ForeignKeyTable-22989042.mjs → ForeignKeyTable-a78cb5ad.mjs} +3 -3
- package/{IndexTable-833d34ff.mjs → IndexTable-1b496559.mjs} +10 -10
- package/{JModalTip-0413ad6a.mjs → JModalTip-4a83aaed.mjs} +1 -1
- package/{JOnlineSearchSelect-9ea89e13.mjs → JOnlineSearchSelect-34a37ec9.mjs} +1 -1
- package/{LeftDepart-b0a535c0.mjs → LeftDepart-8ade4bf7.mjs} +1 -1
- package/{LeftRole-22c90d6b.mjs → LeftRole-7d8c5acc.mjs} +1 -1
- package/{LeftUser-a44d63dd.mjs → LeftUser-b4d1372a.mjs} +3 -3
- package/LinkTableConfigModal-a138c85e.mjs +240 -0
- package/{LinkTableFieldConfigModal-06693eaa.mjs → LinkTableFieldConfigModal-17b413b0.mjs} +41 -41
- package/{LinkTableListPiece-46e8af51.mjs → LinkTableListPiece-2660d709.mjs} +1 -1
- package/{ModalFormDemo-d107fa87.mjs → ModalFormDemo-0544737d.mjs} +1 -1
- package/OnlCgformErpList-30e416c8.mjs +470 -0
- package/OnlCgformErpSubTable-9a876058.mjs +427 -0
- package/OnlCgformInnerSubTable-290ace5d.mjs +266 -0
- package/OnlCgformInnerTableList-f89b6687.mjs +458 -0
- package/OnlCgformTabList-7a2f2c03.mjs +408 -0
- package/OnlineAutoList-46c6c8b9.mjs +493 -0
- package/OnlineAutoModal-971bef13.mjs +236 -0
- package/{OnlineAutoTreeList-ec27d271.mjs → OnlineAutoTreeList-3b92454c.mjs} +206 -204
- package/{OnlineCustomModal-3e6792d3.mjs → OnlineCustomModal-594244f3.mjs} +15 -11
- package/{OnlineDetailModal-f40e37e1.mjs → OnlineDetailModal-2a271e0b.mjs} +74 -64
- package/OnlineForm-018981b2.mjs +924 -0
- package/OnlineForm.vue_vue_type_style_index_0_scoped_0f9f2964_lang-4ed993c7.mjs +1 -0
- package/OnlineFormDetail-e036cd11.mjs +342 -0
- package/OnlineFormUrlAdd-7fb3dcca.mjs +115 -0
- package/OnlineFormUrlDetail-b2292137.mjs +119 -0
- package/OnlineFormUrlEdit-44080fb3.mjs +113 -0
- package/OnlineFormUrlSuccess-af285b02.mjs +59 -0
- package/OnlineQueryForm-998c12a4.mjs +444 -0
- package/{OnlineSearchFormItem-fe308194.mjs → OnlineSearchFormItem-6feacae6.mjs} +2 -2
- package/{OnlineSelectCascade-abc345f9.mjs → OnlineSelectCascade-471fcc76.mjs} +1 -1
- package/{OnlineSubFormDetail-02326a8c.mjs → OnlineSubFormDetail-03f8ee5c.mjs} +29 -27
- package/OnlineTabAutoModal-7b9bcd0b.mjs +306 -0
- package/{OnlineTabDetailModal-d23bd4c9.mjs → OnlineTabDetailModal-88143301.mjs} +22 -20
- package/OnlineTabForm-9ad7d29a.mjs +805 -0
- package/OnlineTabFormDetail-bbf23caa.mjs +327 -0
- package/PageAttributeTable-6c23547b.mjs +446 -0
- package/{ProcessOnlineForm-84f4d02d.mjs → ProcessOnlineForm-b42198f5.mjs} +32 -28
- package/QueryTable-96b3dbd0.mjs +144 -0
- package/SetSwitchOptions-a452fa0f.mjs +62 -0
- package/SuperQuery-cbfba908.mjs +975 -0
- package/{auth.data-8be5c9e3.mjs → auth.data-22948e87.mjs} +56 -14
- package/{cgform.data-cbdd88c3.mjs → cgform.data-475d4984.mjs} +5 -1
- package/constant-fa63bd66.mjs +10 -0
- package/{enhance.data-efc7e155.mjs → enhance.data-3304d553.mjs} +3 -3
- package/index-173949bb.mjs +57 -0
- package/{index-0a93652b.mjs → index-581bef24.mjs} +29 -27
- package/{index-e1bda35b.mjs → index-d2abb8a0.mjs} +394 -361
- package/main.index.js +1 -1
- package/package.json +1 -1
- package/style.css +1 -1
- package/useCgformList-8755a94e.mjs +426 -0
- package/useExtendComponent-bb7cca20.mjs +4295 -0
- package/useFormUrl-2ee1a82d.mjs +24 -0
- package/useListButton-7ddb9a46.mjs +697 -0
- package/{useSchemas-0433a403.mjs → useSchemas-47e45edc.mjs} +167 -86
- package/{useTableSync-774c3774.mjs → useTableSync-f6089e8a.mjs} +1 -1
- package/AuthButtonConfig-f142147a.mjs +0 -125
- package/AuthDataConfig-8e5c7b0c.mjs +0 -212
- package/AuthFieldConfig-e9a45f94.mjs +0 -139
- package/AuthManagerDrawer-5b558c23.mjs +0 -114
- package/AuthSetterModal-0cc557cf.mjs +0 -267
- package/CgreportModal-2eb9c9e1.mjs +0 -13
- package/CheckDictTable-27102064.mjs +0 -211
- package/CodeGeneratorModal-3a0e9f0e.mjs +0 -233
- package/DetailForm-cdeb54e3.mjs +0 -462
- package/EnhanceJsModal-6158804c.mjs +0 -311
- package/ExtendConfigModal-0564ef83.mjs +0 -111
- package/FieldExtendJsonModal-40d961c1.mjs +0 -219
- package/LinkTableConfigModal-5edaa08d.mjs +0 -230
- package/OnlCgformErpList-4c51cdb3.mjs +0 -454
- package/OnlCgformErpSubTable-d7081b9f.mjs +0 -403
- package/OnlCgformInnerSubTable-4c3925bb.mjs +0 -253
- package/OnlCgformInnerTableList-1e5014fa.mjs +0 -444
- package/OnlCgformTabList-c59c7cc7.mjs +0 -395
- package/OnlineAutoList-a7a9de5d.mjs +0 -479
- package/OnlineAutoModal-a33f1a63.mjs +0 -207
- package/OnlineForm-fb3a2379.mjs +0 -750
- package/OnlineFormDetail-52b1c303.mjs +0 -297
- package/OnlineQueryForm-7c70734e.mjs +0 -386
- package/OnlineTabAutoModal-6d9da8b0.mjs +0 -254
- package/OnlineTabForm-29ca07f7.mjs +0 -766
- package/OnlineTabFormDetail-aa7e1144.mjs +0 -324
- package/PageAttributeTable-d82946c5.mjs +0 -404
- package/QueryTable-d4599fca.mjs +0 -115
- package/SuperQuery-07162778.mjs +0 -843
- package/constant-754f1a9d.mjs +0 -9
- package/index-73993b18.mjs +0 -56
- package/useCgformList-b135794d.mjs +0 -400
- package/useExtendComponent-f4e29152.mjs +0 -3926
- package/useListButton-4dd33e7a.mjs +0 -676
|
@@ -0,0 +1,226 @@
|
|
|
1
|
+
var D = Object.defineProperty, I = Object.defineProperties;
|
|
2
|
+
var M = Object.getOwnPropertyDescriptors;
|
|
3
|
+
var w = Object.getOwnPropertySymbols;
|
|
4
|
+
var O = Object.prototype.hasOwnProperty, P = Object.prototype.propertyIsEnumerable;
|
|
5
|
+
var F = (e, t, a) => t in e ? D(e, t, { enumerable: !0, configurable: !0, writable: !0, value: a }) : e[t] = a, V = (e, t) => {
|
|
6
|
+
for (var a in t || (t = {}))
|
|
7
|
+
O.call(t, a) && F(e, a, t[a]);
|
|
8
|
+
if (w)
|
|
9
|
+
for (var a of w(t))
|
|
10
|
+
P.call(t, a) && F(e, a, t[a]);
|
|
11
|
+
return e;
|
|
12
|
+
}, x = (e, t) => I(e, M(t));
|
|
13
|
+
import { defineComponent as S, ref as R, computed as $, resolveComponent as i, openBlock as H, createBlock as J, mergeProps as q, withCtx as c, createVNode as s, normalizeClass as E, withDirectives as z, createElementVNode as N, vShow as j } from "vue";
|
|
14
|
+
import { JVxeTypes as n } from "/@/components/jeecg/JVxeTable/types";
|
|
15
|
+
import { u as K } from "./useTableSync-f6089e8a.mjs";
|
|
16
|
+
import { useMessage as G } from "/@/hooks/web/useMessage";
|
|
17
|
+
import { useJPrompt as L } from "/@/components/jeecg/JPrompt";
|
|
18
|
+
import { useDesign as Q } from "/@/hooks/web/useDesign";
|
|
19
|
+
import { _ as U } from "./index-173949bb.mjs";
|
|
20
|
+
import "./cgform.data-475d4984.mjs";
|
|
21
|
+
import "/@/utils/dict";
|
|
22
|
+
import "/@/utils/dict/JDictSelectUtil";
|
|
23
|
+
import "/@/utils/uuid";
|
|
24
|
+
import "lodash-es";
|
|
25
|
+
import "/@/components/jeecg/OnLine/JPopupOnlReport.vue";
|
|
26
|
+
import "vue-router";
|
|
27
|
+
const W = S({
|
|
28
|
+
name: "CheckDictTable",
|
|
29
|
+
components: {
|
|
30
|
+
VNodes: (e, { attrs: t }) => t.vnodes
|
|
31
|
+
},
|
|
32
|
+
setup() {
|
|
33
|
+
const { prefixCls: e } = Q("cgform-check-dict-table"), { createMessage: t } = G(), a = R([
|
|
34
|
+
{ title: "字段名称", key: "dbFieldName", width: 100 },
|
|
35
|
+
{ title: "字段备注", key: "dbFieldTxt", width: 100 },
|
|
36
|
+
{
|
|
37
|
+
title: "字段Href",
|
|
38
|
+
key: "fieldHref",
|
|
39
|
+
width: 130,
|
|
40
|
+
type: n.textarea,
|
|
41
|
+
defaultValue: ""
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
title: "验证规则",
|
|
45
|
+
key: "fieldValidType",
|
|
46
|
+
width: 170,
|
|
47
|
+
type: n.slot,
|
|
48
|
+
slotName: "fieldValidType",
|
|
49
|
+
allowInput: !0,
|
|
50
|
+
defaultValue: "",
|
|
51
|
+
placeholder: "空"
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
title: "校验必填",
|
|
55
|
+
key: "fieldMustInput",
|
|
56
|
+
width: 80,
|
|
57
|
+
type: n.checkbox,
|
|
58
|
+
align: "center",
|
|
59
|
+
customValue: ["1", "0"],
|
|
60
|
+
defaultChecked: !1
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
title: "字典Table",
|
|
64
|
+
key: "dictTable",
|
|
65
|
+
width: 280,
|
|
66
|
+
type: n.textarea,
|
|
67
|
+
defaultValue: ""
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
title: "字典Code",
|
|
71
|
+
key: "dictField",
|
|
72
|
+
width: 280,
|
|
73
|
+
type: n.input,
|
|
74
|
+
defaultValue: "",
|
|
75
|
+
validateRules: [{ handler: r }]
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
title: "字典Text",
|
|
79
|
+
key: "dictText",
|
|
80
|
+
width: 280,
|
|
81
|
+
type: n.input,
|
|
82
|
+
defaultValue: "",
|
|
83
|
+
validateRules: [{ handler: r }]
|
|
84
|
+
}
|
|
85
|
+
]), v = K(a), { tableRef: T, tables: k } = v, p = R([
|
|
86
|
+
{ label: "空", value: "" },
|
|
87
|
+
{ label: "唯一校验", value: "only" },
|
|
88
|
+
{ label: "6到16位数字", value: "n6-16" },
|
|
89
|
+
{ label: "6到18位字母", value: "s6-18" },
|
|
90
|
+
{ label: "6到16位任意字符", value: "*6-16" },
|
|
91
|
+
{ label: "网址", value: "url" },
|
|
92
|
+
{ label: "电子邮件", value: "e" },
|
|
93
|
+
{ label: "手机号码", value: "m" },
|
|
94
|
+
{ label: "邮政编码", value: "p" },
|
|
95
|
+
{ label: "字母", value: "s" },
|
|
96
|
+
{ label: "数字", value: "n" },
|
|
97
|
+
{ label: "整数", value: "z" },
|
|
98
|
+
{ label: "非空", value: "*" },
|
|
99
|
+
{ label: "金额", value: "money" }
|
|
100
|
+
]), m = $(() => p.value.map((l) => l.value)), { createJPrompt: d } = L();
|
|
101
|
+
function f(l) {
|
|
102
|
+
return l != null && !m.value.includes(l);
|
|
103
|
+
}
|
|
104
|
+
function b(l) {
|
|
105
|
+
d({
|
|
106
|
+
title: "自定义正则表达式",
|
|
107
|
+
placeholder: "请输入正则表达式",
|
|
108
|
+
rules: [{ required: !0, message: "正则表达式不能为空!" }, { validator: o }],
|
|
109
|
+
onOk: (u) => {
|
|
110
|
+
l.triggerChange(u), t.success("添加成功");
|
|
111
|
+
}
|
|
112
|
+
});
|
|
113
|
+
}
|
|
114
|
+
function g(l) {
|
|
115
|
+
d({
|
|
116
|
+
title: "修改自定义正则表达式",
|
|
117
|
+
defaultValue: l.value,
|
|
118
|
+
placeholder: "请输入正则表达式",
|
|
119
|
+
rules: [{ required: !0, message: "正则表达式不能为空!" }, { validator: o }],
|
|
120
|
+
onOk: (u) => {
|
|
121
|
+
l.triggerChange(u), u !== l.value && t.success("修改成功");
|
|
122
|
+
}
|
|
123
|
+
});
|
|
124
|
+
}
|
|
125
|
+
function o(l, u) {
|
|
126
|
+
return f(u) ? Promise.resolve() : Promise.reject("当前校验已存在");
|
|
127
|
+
}
|
|
128
|
+
function h(l) {
|
|
129
|
+
l.dbIsNull === "0" && T.value.setValues([
|
|
130
|
+
{
|
|
131
|
+
rowKey: l.id,
|
|
132
|
+
values: { fieldMustInput: "1" }
|
|
133
|
+
}
|
|
134
|
+
]);
|
|
135
|
+
}
|
|
136
|
+
function r({ cellValue: l, row: u }, _) {
|
|
137
|
+
const { dbFieldName: A } = u, y = k.pageTable.value.tableRef.getTableData(), C = y == null ? void 0 : y.find((B) => B.dbFieldName === A);
|
|
138
|
+
(C == null ? void 0 : C.fieldShowType) === "popup_dict" ? l.indexOf(",") == -1 ? _(!0) : _(!1, "popup字典组件只允许填写一个字段") : _(!0);
|
|
139
|
+
}
|
|
140
|
+
return x(V({}, v), {
|
|
141
|
+
prefixCls: e,
|
|
142
|
+
columns: a,
|
|
143
|
+
isCustomRegexp: f,
|
|
144
|
+
validTypeOptions: p,
|
|
145
|
+
validTypeValues: m,
|
|
146
|
+
onAddCustomRegexp: b,
|
|
147
|
+
onChangeCustomRegexp: g,
|
|
148
|
+
syncFieldMustInput: h
|
|
149
|
+
});
|
|
150
|
+
}
|
|
151
|
+
});
|
|
152
|
+
const X = {
|
|
153
|
+
class: "custom-option-list rc-virtual-list-holder-inner",
|
|
154
|
+
style: { "border-top": "1px solid #dfdfdf" }
|
|
155
|
+
}, Y = ["onClick"];
|
|
156
|
+
function Z(e, t, a, v, T, k) {
|
|
157
|
+
const p = i("VNodes"), m = i("a-select"), d = i("a-col"), f = i("a-button"), b = i("a-row"), g = i("JVxeTable");
|
|
158
|
+
return H(), J(g, q({
|
|
159
|
+
ref: "tableRef",
|
|
160
|
+
rowNumber: "",
|
|
161
|
+
keyboardEdit: "",
|
|
162
|
+
class: [e.prefixCls],
|
|
163
|
+
maxHeight: e.tableHeight.noToolbar,
|
|
164
|
+
loading: e.loading,
|
|
165
|
+
columns: e.columns,
|
|
166
|
+
dataSource: e.dataSource,
|
|
167
|
+
disabledRows: { dbFieldName: ["id", "has_child"] }
|
|
168
|
+
}, e.tableProps), {
|
|
169
|
+
fieldValidType: c((o) => [
|
|
170
|
+
s(b, {
|
|
171
|
+
type: "flex",
|
|
172
|
+
class: E(["row-valid-type", { full: !e.isCustomRegexp(o.value) }])
|
|
173
|
+
}, {
|
|
174
|
+
default: c(() => [
|
|
175
|
+
s(d, {
|
|
176
|
+
class: E(["left"])
|
|
177
|
+
}, {
|
|
178
|
+
default: c(() => [
|
|
179
|
+
s(m, {
|
|
180
|
+
value: o.value,
|
|
181
|
+
options: e.validTypeOptions,
|
|
182
|
+
placeholder: "空",
|
|
183
|
+
style: { width: "100%" },
|
|
184
|
+
onChange: o.triggerChange
|
|
185
|
+
}, {
|
|
186
|
+
dropdownRender: c(({ menuNode: h }) => [
|
|
187
|
+
s(p, { vnodes: h }, null, 8, ["vnodes"]),
|
|
188
|
+
z(N("div", X, [
|
|
189
|
+
N("div", {
|
|
190
|
+
class: "ant-select-item ant-select-item-option",
|
|
191
|
+
title: "使用自定义正则表达式作为校验规则",
|
|
192
|
+
onClick: (r) => e.onAddCustomRegexp(o),
|
|
193
|
+
onMousedown: t[0] || (t[0] = (r) => r.preventDefault())
|
|
194
|
+
}, " 正则表达式 ", 40, Y)
|
|
195
|
+
], 512), [
|
|
196
|
+
[j, !e.isCustomRegexp(o.value)]
|
|
197
|
+
])
|
|
198
|
+
]),
|
|
199
|
+
_: 2
|
|
200
|
+
}, 1032, ["value", "options", "onChange"])
|
|
201
|
+
]),
|
|
202
|
+
_: 2
|
|
203
|
+
}, 1024),
|
|
204
|
+
s(d, {
|
|
205
|
+
class: "right",
|
|
206
|
+
title: "修改自定义正则表达式"
|
|
207
|
+
}, {
|
|
208
|
+
default: c(() => [
|
|
209
|
+
s(f, {
|
|
210
|
+
preIcon: "ant-design:edit",
|
|
211
|
+
onClick: () => e.onChangeCustomRegexp(o)
|
|
212
|
+
}, null, 8, ["onClick"])
|
|
213
|
+
]),
|
|
214
|
+
_: 2
|
|
215
|
+
}, 1024)
|
|
216
|
+
]),
|
|
217
|
+
_: 2
|
|
218
|
+
}, 1032, ["class"])
|
|
219
|
+
]),
|
|
220
|
+
_: 1
|
|
221
|
+
}, 16, ["class", "maxHeight", "loading", "columns", "dataSource"]);
|
|
222
|
+
}
|
|
223
|
+
const ve = /* @__PURE__ */ U(W, [["render", Z], ["__scopeId", "data-v-4a65d99e"]]);
|
|
224
|
+
export {
|
|
225
|
+
ve as default
|
|
226
|
+
};
|
|
@@ -19,10 +19,10 @@ import { defHttp as R } from "/@/utils/http/axios";
|
|
|
19
19
|
import "/@/components/Form";
|
|
20
20
|
import { BasicModal as T, useModalInner as z, useModal as G } from "/@/components/Modal";
|
|
21
21
|
import { InfoCircleTwoTone as K } from "@ant-design/icons-vue";
|
|
22
|
-
import S from "./CodeFileViewModal-
|
|
22
|
+
import S from "./CodeFileViewModal-9d4a5b5f.mjs";
|
|
23
23
|
import { useMessage as H } from "/@/hooks/web/useMessage";
|
|
24
24
|
import { downloadByData as I } from "/@/utils/file/download";
|
|
25
|
-
import { _ as E } from "./index-
|
|
25
|
+
import { _ as E } from "./index-173949bb.mjs";
|
|
26
26
|
import "ant-design-vue";
|
|
27
27
|
import "/@/components/jeecg/OnLine/JPopupOnlReport.vue";
|
|
28
28
|
import "vue-router";
|
|
@@ -14,32 +14,32 @@ var k = (l, h, u) => new Promise((w, m) => {
|
|
|
14
14
|
}, s = (i) => i.done ? w(i.value) : Promise.resolve(i.value).then(v, _);
|
|
15
15
|
s((u = u.apply(l, h)).next());
|
|
16
16
|
});
|
|
17
|
-
import { defineComponent as
|
|
18
|
-
import { defHttp as
|
|
19
|
-
import { BasicModal as
|
|
20
|
-
import { InfoCircleTwoTone as
|
|
21
|
-
import { message as
|
|
17
|
+
import { defineComponent as P, ref as g, reactive as S, resolveComponent as f, openBlock as x, createBlock as D, withCtx as p, createVNode as C, createTextVNode as R, createElementVNode as W, normalizeStyle as j, createCommentVNode as q } from "vue";
|
|
18
|
+
import { defHttp as z } from "/@/utils/http/axios";
|
|
19
|
+
import { BasicModal as H, useModalInner as U } from "/@/components/Modal";
|
|
20
|
+
import { InfoCircleTwoTone as Y } from "@ant-design/icons-vue";
|
|
21
|
+
import { message as $ } from "ant-design-vue";
|
|
22
22
|
import { JCodeEditor as Q } from "/@/components/Form";
|
|
23
|
-
import { _ as X } from "./index-
|
|
23
|
+
import { _ as X } from "./index-173949bb.mjs";
|
|
24
24
|
import "/@/components/jeecg/OnLine/JPopupOnlReport.vue";
|
|
25
25
|
import "/@/hooks/web/useMessage";
|
|
26
26
|
import "vue-router";
|
|
27
|
-
const Z =
|
|
27
|
+
const Z = P({
|
|
28
28
|
name: "CodeFileViewModal",
|
|
29
29
|
components: {
|
|
30
|
-
BasicModal:
|
|
31
|
-
InfoCircleTwoTone:
|
|
30
|
+
BasicModal: H,
|
|
31
|
+
InfoCircleTwoTone: Y,
|
|
32
32
|
JCodeEditor: Q
|
|
33
33
|
},
|
|
34
34
|
emits: ["download", "register", "close"],
|
|
35
35
|
setup(l, { emit: h }) {
|
|
36
36
|
const u = g([]), w = g(""), m = g([]), v = g(!1), _ = window.innerHeight - 160, s = g("java"), i = g("");
|
|
37
37
|
let r = S({});
|
|
38
|
-
const [T, { closeModal:
|
|
38
|
+
const [T, { closeModal: b }] = U((t) => k(this, null, function* () {
|
|
39
39
|
r = S({}), i.value = "", u.value = t.codeList, w.value = t.pathKey, y(), v.value = !0;
|
|
40
40
|
}));
|
|
41
41
|
function y() {
|
|
42
|
-
let t =
|
|
42
|
+
let t = G(), o = t[0];
|
|
43
43
|
E(o, t);
|
|
44
44
|
let n = [];
|
|
45
45
|
const e = function(d) {
|
|
@@ -49,10 +49,10 @@ const Z = O({
|
|
|
49
49
|
}
|
|
50
50
|
};
|
|
51
51
|
e(o), m.value = n, setTimeout(() => {
|
|
52
|
-
|
|
52
|
+
B(o);
|
|
53
53
|
}, 300);
|
|
54
54
|
}
|
|
55
|
-
function
|
|
55
|
+
function B(t) {
|
|
56
56
|
return k(this, null, function* () {
|
|
57
57
|
const o = function(e) {
|
|
58
58
|
if (e.isLeaf === !0)
|
|
@@ -77,20 +77,20 @@ const Z = O({
|
|
|
77
77
|
e += t[n], n++;
|
|
78
78
|
return e;
|
|
79
79
|
}
|
|
80
|
-
function
|
|
80
|
+
function G() {
|
|
81
81
|
let t = [], o = [], n = u.value;
|
|
82
82
|
for (let e of n) {
|
|
83
83
|
let d = e.replace(new RegExp("\\\\", "g"), "/").replace("生成成功:", "").trim();
|
|
84
84
|
if (d) {
|
|
85
85
|
let a = d.split("/");
|
|
86
86
|
for (let c = 0; c < a.length; c++) {
|
|
87
|
-
let
|
|
88
|
-
if (
|
|
87
|
+
let M = a[c], L = V(a, c);
|
|
88
|
+
if (M) {
|
|
89
89
|
let F = {
|
|
90
|
-
title:
|
|
90
|
+
title: M,
|
|
91
91
|
key: L
|
|
92
92
|
};
|
|
93
|
-
if (
|
|
93
|
+
if (M != 0) {
|
|
94
94
|
let N = V(a, c - 1);
|
|
95
95
|
N && (F.pid = N);
|
|
96
96
|
}
|
|
@@ -101,16 +101,16 @@ const Z = O({
|
|
|
101
101
|
}
|
|
102
102
|
return t;
|
|
103
103
|
}
|
|
104
|
-
function G() {
|
|
105
|
-
B(), h("close");
|
|
106
|
-
}
|
|
107
104
|
function I() {
|
|
105
|
+
b(), h("close");
|
|
106
|
+
}
|
|
107
|
+
function J() {
|
|
108
108
|
h("download");
|
|
109
109
|
}
|
|
110
110
|
function A(t) {
|
|
111
111
|
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";
|
|
112
112
|
}
|
|
113
|
-
function
|
|
113
|
+
function O(t, o) {
|
|
114
114
|
return k(this, null, function* () {
|
|
115
115
|
let n = o.node.dataRef;
|
|
116
116
|
if (n.isLeaf) {
|
|
@@ -125,9 +125,12 @@ const Z = O({
|
|
|
125
125
|
path: encodeURI(t),
|
|
126
126
|
pathKey: w.value
|
|
127
127
|
};
|
|
128
|
-
|
|
128
|
+
z.get({ url: "/online/cgform/api/codeView", params: n }, { isTransformResponse: !1 }).then((e) => {
|
|
129
129
|
if (!e || e.size === 0) {
|
|
130
|
-
|
|
130
|
+
$.warning("文件下载失败");
|
|
131
|
+
return;
|
|
132
|
+
} else if (e.message) {
|
|
133
|
+
$.warning(e.message);
|
|
131
134
|
return;
|
|
132
135
|
}
|
|
133
136
|
let d = new Blob([e]), a = new FileReader();
|
|
@@ -141,10 +144,10 @@ const Z = O({
|
|
|
141
144
|
return {
|
|
142
145
|
registerModal: T,
|
|
143
146
|
codeList: u,
|
|
144
|
-
onDownloadGenerateCode:
|
|
145
|
-
handleClose:
|
|
147
|
+
onDownloadGenerateCode: J,
|
|
148
|
+
handleClose: I,
|
|
146
149
|
treeData: m,
|
|
147
|
-
showCodeContent:
|
|
150
|
+
showCodeContent: O,
|
|
148
151
|
activeCodeContent: i,
|
|
149
152
|
expandStatus: v,
|
|
150
153
|
height: _,
|
|
@@ -153,8 +156,8 @@ const Z = O({
|
|
|
153
156
|
}
|
|
154
157
|
});
|
|
155
158
|
function ee(l, h, u, w, m, v) {
|
|
156
|
-
const _ = f("info-circle-two-tone"), s = f("a-directory-tree"), i = f("a-col"), r = f("JCodeEditor"), T = f("a-empty"),
|
|
157
|
-
return x(), D(
|
|
159
|
+
const _ = f("info-circle-two-tone"), s = f("a-directory-tree"), i = f("a-col"), r = f("JCodeEditor"), T = f("a-empty"), b = f("a-row"), y = f("a-button"), B = f("BasicModal");
|
|
160
|
+
return x(), D(B, {
|
|
158
161
|
onRegister: l.registerModal,
|
|
159
162
|
okText: "",
|
|
160
163
|
cancelText: "关闭",
|
|
@@ -186,7 +189,7 @@ function ee(l, h, u, w, m, v) {
|
|
|
186
189
|
]),
|
|
187
190
|
default: p(() => [
|
|
188
191
|
W("div", null, [
|
|
189
|
-
C(
|
|
192
|
+
C(b, null, {
|
|
190
193
|
default: p(() => [
|
|
191
194
|
C(i, {
|
|
192
195
|
span: 6,
|
|
@@ -195,14 +198,14 @@ function ee(l, h, u, w, m, v) {
|
|
|
195
198
|
}, {
|
|
196
199
|
default: p(() => [
|
|
197
200
|
W("div", {
|
|
198
|
-
style:
|
|
201
|
+
style: j({ height: l.height + "px", overflowY: "auto" })
|
|
199
202
|
}, [
|
|
200
203
|
l.treeData.length ? (x(), D(s, {
|
|
201
204
|
key: 0,
|
|
202
205
|
defaultExpandAll: !0,
|
|
203
206
|
"tree-data": l.treeData,
|
|
204
207
|
onSelect: l.showCodeContent
|
|
205
|
-
}, null, 8, ["tree-data", "onSelect"])) :
|
|
208
|
+
}, null, 8, ["tree-data", "onSelect"])) : q("", !0)
|
|
206
209
|
], 4)
|
|
207
210
|
]),
|
|
208
211
|
_: 1
|
|
@@ -221,6 +224,7 @@ function ee(l, h, u, w, m, v) {
|
|
|
221
224
|
fullScreen: !1,
|
|
222
225
|
lineNumbers: !0,
|
|
223
226
|
height: l.height + "px",
|
|
227
|
+
disabled: !0,
|
|
224
228
|
"language-change": !0
|
|
225
229
|
}, null, 8, ["value", "language", "height"])) : (x(), D(T, {
|
|
226
230
|
key: 1,
|
|
@@ -0,0 +1,238 @@
|
|
|
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
|
+
};
|