@jeecg/online 3.6.2-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-6de335e3.mjs +84 -0
- package/AuthButtonConfig-89763932.mjs +154 -0
- package/{AuthButtonTree-3aa0ed49.mjs → AuthButtonTree-2d87d0b3.mjs} +6 -5
- package/AuthDataConfig-5c3a8e6b.mjs +238 -0
- package/{AuthDataTree-94e026e3.mjs → AuthDataTree-dd7a1240.mjs} +6 -6
- package/AuthFieldConfig-9f6fa06c.mjs +245 -0
- package/{AuthFieldTree-69864163.mjs → AuthFieldTree-e326fc38.mjs} +2 -2
- package/AuthManagerDrawer-76f15e8d.mjs +119 -0
- package/AuthSetterModal-f5d2e87f.mjs +274 -0
- package/{CgformCopyList-14b76108.mjs → CgformCopyList-365b3e8f.mjs} +49 -46
- package/CgformModal-21c5c387.mjs +671 -0
- package/{CgreportModal.vue_vue_type_script_setup_true_lang-c89d9222.mjs → CgreportModal-edefa8e3.mjs} +153 -129
- package/CheckDictTable-1bc8322d.mjs +229 -0
- package/{CodeFileListModal-a6d3290d.mjs → CodeFileListModal-24601898.mjs} +5 -4
- package/CodeFileViewModal-2fe911f4.mjs +253 -0
- package/CodeGeneratorModal-f09fe903.mjs +282 -0
- package/CustomButtonList-f07bc695.mjs +397 -0
- package/{DBAttributeTable-370de07b.mjs → DBAttributeTable-285d40db.mjs} +118 -89
- package/DbToOnlineModal-5dcb67c3.mjs +169 -0
- package/DetailForm-deecbf3d.mjs +486 -0
- package/{EnhanceJavaModal-f63aa2d3.mjs → EnhanceJavaModal-45c66cd5.mjs} +3 -3
- package/{EnhanceJsHistory-352b46b1.mjs → EnhanceJsHistory-fab3102e.mjs} +2 -2
- package/EnhanceJsModal-175357a1.mjs +548 -0
- package/{EnhanceSqlModal-5e4ae84f.mjs → EnhanceSqlModal-7ea1b300.mjs} +3 -3
- package/ExtendConfigModal-a89ae052.mjs +117 -0
- package/FieldExtendJsonModal-32135634.mjs +277 -0
- package/{FileSelectModal-9a02560b.mjs → FileSelectModal-1643c8b9.mjs} +1 -1
- package/{ForeignKeyTable-6a843c4b.mjs → ForeignKeyTable-7f7e28a7.mjs} +3 -3
- package/{IndexTable-f8af9d44.mjs → IndexTable-cdcc2b48.mjs} +28 -20
- package/{JModalTip-33c7dc44.mjs → JModalTip-b055ab60.mjs} +1 -1
- package/JOnlineSearchSelect-22aae934.mjs +128 -0
- package/{LeftDepart-fa85523d.mjs → LeftDepart-d5615ed9.mjs} +1 -1
- package/{LeftRole-8b8dfe21.mjs → LeftRole-2ed8a2bf.mjs} +1 -1
- package/{LeftUser-dc24ef2f.mjs → LeftUser-22baa378.mjs} +3 -3
- package/LinkTableConfigModal-9242d750.mjs +240 -0
- package/{LinkTableFieldConfigModal-787bc55c.mjs → LinkTableFieldConfigModal-24adc50c.mjs} +41 -41
- package/{LinkTableListPiece-8499a318.mjs → LinkTableListPiece-f3a8e0d7.mjs} +1 -1
- package/{ModalFormDemo-977a49eb.mjs → ModalFormDemo-711418db.mjs} +1 -1
- package/OnlCgformErpList-58acdfa0.mjs +470 -0
- package/OnlCgformErpSubTable-9b1e1938.mjs +426 -0
- package/OnlCgformInnerSubTable-6c23781f.mjs +265 -0
- package/OnlCgformInnerTableList-4b5e14ed.mjs +458 -0
- package/OnlCgformTabList-019ad753.mjs +408 -0
- package/OnlineAutoList-48589d09.mjs +493 -0
- package/OnlineAutoModal-c2928847.mjs +239 -0
- package/{OnlineAutoTreeList-89265688.mjs → OnlineAutoTreeList-3baa1d00.mjs} +207 -204
- package/{OnlineCustomModal-518ad33c.mjs → OnlineCustomModal-9e17b6ce.mjs} +16 -12
- package/{OnlineDetailModal-9675390d.mjs → OnlineDetailModal-d5895734.mjs} +74 -64
- package/OnlineForm-9f1153ba.mjs +985 -0
- package/OnlineForm.vue_vue_type_style_index_0_scoped_4657b304_lang-4ed993c7.mjs +1 -0
- package/OnlineFormDetail-022ca117.mjs +342 -0
- package/OnlineFormUrlAdd-9715d70a.mjs +115 -0
- package/OnlineFormUrlDetail-8f864b1a.mjs +119 -0
- package/OnlineFormUrlEdit-ac985b36.mjs +113 -0
- package/OnlineFormUrlSuccess-3dfc54ab.mjs +59 -0
- package/OnlineQueryForm-eedb9a60.mjs +466 -0
- package/{OnlineSearchFormItem-0cc85a8a.mjs → OnlineSearchFormItem-6c557343.mjs} +2 -2
- package/{OnlineSelectCascade-4265c95d.mjs → OnlineSelectCascade-05c40fef.mjs} +1 -1
- package/{OnlineSubFormDetail-f0d2c016.mjs → OnlineSubFormDetail-58e896ce.mjs} +30 -28
- package/OnlineTabAutoModal-47b18ad6.mjs +306 -0
- package/{OnlineTabDetailModal-7356d3a8.mjs → OnlineTabDetailModal-82de1465.mjs} +22 -20
- package/OnlineTabForm-27655c83.mjs +817 -0
- package/OnlineTabFormDetail-8d0c40c0.mjs +327 -0
- package/PageAttributeTable-25e3b7da.mjs +466 -0
- package/{ProcessOnlineForm-67558898.mjs → ProcessOnlineForm-148632fe.mjs} +66 -56
- package/QueryTable-f7bfca7f.mjs +147 -0
- package/SetSwitchOptions-b2af757f.mjs +62 -0
- package/SuperQuery-a8592995.mjs +967 -0
- package/auth.api-ea1d33d4.mjs +41 -0
- package/auth.data-511e5197.mjs +217 -0
- package/{cgform.data-cbdd88c3.mjs → cgform.data-475d4984.mjs} +5 -1
- package/constant-fa63bd66.mjs +10 -0
- package/{enhance.data-efc7e155.mjs → enhance.data-a67572e1.mjs} +11 -10
- package/index-1d1a6e56.mjs +57 -0
- package/{index-b7a05eef.mjs → index-30e0e923.mjs} +396 -362
- package/{index-49508cad.mjs → index-f30613d1.mjs} +29 -27
- package/main.index.js +1 -1
- package/package.json +1 -1
- package/style.css +1 -1
- package/useCgformList-f41d4dc1.mjs +426 -0
- package/useExtendComponent-dcae5c78.mjs +4399 -0
- package/useFormUrl-2ee1a82d.mjs +24 -0
- package/useListButton-bfac4ecf.mjs +697 -0
- package/{useSchemas-0433a403.mjs → useSchemas-a9c75b0f.mjs} +191 -101
- package/useTableSync-d7e9f18d.mjs +89 -0
- package/AuthButtonConfig-244ec09f.mjs +0 -125
- package/AuthDataConfig-83891eea.mjs +0 -212
- package/AuthFieldConfig-6b21915c.mjs +0 -139
- package/AuthManagerDrawer-300dd4e4.mjs +0 -114
- package/AuthSetterModal-a414fb35.mjs +0 -267
- package/CgformModal-eccfc38e.mjs +0 -611
- package/CgreportModal-2065f5a9.mjs +0 -13
- package/CheckDictTable-134cbb83.mjs +0 -211
- package/CodeFileViewModal-373e8058.mjs +0 -244
- package/CodeGeneratorModal-f08a89cd.mjs +0 -233
- package/CustomButtonList-02e3d897.mjs +0 -363
- package/DbToOnlineModal-9f13956f.mjs +0 -160
- package/DetailForm-424638eb.mjs +0 -462
- package/EnhanceJsModal-05c73a59.mjs +0 -311
- package/ExtendConfigModal-1dde390a.mjs +0 -111
- package/FieldExtendJsonModal-a70a9ccd.mjs +0 -219
- package/JOnlineSearchSelect-c287af12.mjs +0 -95
- package/LinkTableConfigModal-d4fbdef2.mjs +0 -230
- package/OnlCgformErpList-db45e22b.mjs +0 -454
- package/OnlCgformErpSubTable-54b50eec.mjs +0 -403
- package/OnlCgformInnerSubTable-fbca73e0.mjs +0 -253
- package/OnlCgformInnerTableList-782eaf04.mjs +0 -444
- package/OnlCgformTabList-a9e1e36a.mjs +0 -395
- package/OnlineAutoList-0583a910.mjs +0 -479
- package/OnlineAutoModal-510991eb.mjs +0 -207
- package/OnlineForm-1fa2d893.mjs +0 -750
- package/OnlineFormDetail-0e7294ca.mjs +0 -297
- package/OnlineQueryForm-1bfc8320.mjs +0 -386
- package/OnlineTabAutoModal-6f636ee2.mjs +0 -254
- package/OnlineTabForm-512d3951.mjs +0 -766
- package/OnlineTabFormDetail-5a70219d.mjs +0 -324
- package/PageAttributeTable-965dc58e.mjs +0 -404
- package/QueryTable-eb9a5b21.mjs +0 -115
- package/SuperQuery-5d1ca957.mjs +0 -843
- package/auth.api-d3a6c4b3.mjs +0 -39
- package/auth.data-8be5c9e3.mjs +0 -141
- package/constant-754f1a9d.mjs +0 -9
- package/index-0e3ab3af.mjs +0 -56
- package/useCgformList-423282b7.mjs +0 -400
- package/useExtendComponent-325fe3f1.mjs +0 -3926
- package/useListButton-cdbab702.mjs +0 -676
- package/useTableSync-774c3774.mjs +0 -87
|
@@ -1,211 +0,0 @@
|
|
|
1
|
-
var F = Object.defineProperty, x = Object.defineProperties;
|
|
2
|
-
var E = Object.getOwnPropertyDescriptors;
|
|
3
|
-
var h = Object.getOwnPropertySymbols;
|
|
4
|
-
var R = Object.prototype.hasOwnProperty, A = Object.prototype.propertyIsEnumerable;
|
|
5
|
-
var _ = (e, t, l) => t in e ? F(e, t, { enumerable: !0, configurable: !0, writable: !0, value: l }) : e[t] = l, C = (e, t) => {
|
|
6
|
-
for (var l in t || (t = {}))
|
|
7
|
-
R.call(t, l) && _(e, l, t[l]);
|
|
8
|
-
if (h)
|
|
9
|
-
for (var l of h(t))
|
|
10
|
-
A.call(t, l) && _(e, l, t[l]);
|
|
11
|
-
return e;
|
|
12
|
-
}, y = (e, t) => x(e, E(t));
|
|
13
|
-
import { defineComponent as B, ref as k, computed as N, resolveComponent as u, openBlock as D, createBlock as P, mergeProps as $, withCtx as s, createVNode as n, normalizeClass as w, withDirectives as H, createElementVNode as T, vShow as J } from "vue";
|
|
14
|
-
import { JVxeTypes as i } from "/@/components/jeecg/JVxeTable/types";
|
|
15
|
-
import { u as S } from "./useTableSync-774c3774.mjs";
|
|
16
|
-
import { useMessage as I } from "/@/hooks/web/useMessage";
|
|
17
|
-
import { useJPrompt as M } from "/@/components/jeecg/JPrompt";
|
|
18
|
-
import { useDesign as O } from "/@/hooks/web/useDesign";
|
|
19
|
-
import { _ as q } from "./index-0e3ab3af.mjs";
|
|
20
|
-
import "./cgform.data-cbdd88c3.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 z = B({
|
|
28
|
-
name: "CheckDictTable",
|
|
29
|
-
components: {
|
|
30
|
-
VNodes: (e, { attrs: t }) => t.vnodes
|
|
31
|
-
},
|
|
32
|
-
setup() {
|
|
33
|
-
const { prefixCls: e } = O("cgform-check-dict-table"), { createMessage: t } = I(), l = k([
|
|
34
|
-
{ title: "字段名称", key: "dbFieldName", width: 100 },
|
|
35
|
-
{ title: "字段备注", key: "dbFieldTxt", width: 100 },
|
|
36
|
-
{
|
|
37
|
-
title: "字段Href",
|
|
38
|
-
key: "fieldHref",
|
|
39
|
-
width: 130,
|
|
40
|
-
type: i.input,
|
|
41
|
-
defaultValue: ""
|
|
42
|
-
},
|
|
43
|
-
{
|
|
44
|
-
title: "验证规则",
|
|
45
|
-
key: "fieldValidType",
|
|
46
|
-
width: 170,
|
|
47
|
-
type: i.slot,
|
|
48
|
-
slotName: "fieldValidType",
|
|
49
|
-
allowInput: !0,
|
|
50
|
-
defaultValue: "",
|
|
51
|
-
placeholder: "空"
|
|
52
|
-
},
|
|
53
|
-
{
|
|
54
|
-
title: "校验必填",
|
|
55
|
-
key: "fieldMustInput",
|
|
56
|
-
width: 80,
|
|
57
|
-
type: i.checkbox,
|
|
58
|
-
align: "center",
|
|
59
|
-
customValue: ["1", "0"],
|
|
60
|
-
defaultChecked: !1
|
|
61
|
-
},
|
|
62
|
-
{
|
|
63
|
-
title: "字典Table",
|
|
64
|
-
key: "dictTable",
|
|
65
|
-
width: 280,
|
|
66
|
-
type: i.textarea,
|
|
67
|
-
defaultValue: ""
|
|
68
|
-
},
|
|
69
|
-
{
|
|
70
|
-
title: "字典Code",
|
|
71
|
-
key: "dictField",
|
|
72
|
-
width: 280,
|
|
73
|
-
type: i.input,
|
|
74
|
-
defaultValue: ""
|
|
75
|
-
},
|
|
76
|
-
{
|
|
77
|
-
title: "字典Text",
|
|
78
|
-
key: "dictText",
|
|
79
|
-
width: 280,
|
|
80
|
-
type: i.input,
|
|
81
|
-
defaultValue: ""
|
|
82
|
-
}
|
|
83
|
-
]), g = S(l), m = k([
|
|
84
|
-
{ label: "空", value: "" },
|
|
85
|
-
{ label: "唯一校验", value: "only" },
|
|
86
|
-
{ label: "6到16位数字", value: "n6-16" },
|
|
87
|
-
{ label: "6到18位字母", value: "s6-18" },
|
|
88
|
-
{ label: "6到16位任意字符", value: "*6-16" },
|
|
89
|
-
{ label: "网址", value: "url" },
|
|
90
|
-
{ label: "电子邮件", value: "e" },
|
|
91
|
-
{ label: "手机号码", value: "m" },
|
|
92
|
-
{ label: "邮政编码", value: "p" },
|
|
93
|
-
{ label: "字母", value: "s" },
|
|
94
|
-
{ label: "数字", value: "n" },
|
|
95
|
-
{ label: "整数", value: "z" },
|
|
96
|
-
{ label: "非空", value: "*" },
|
|
97
|
-
{ label: "金额", value: "money" }
|
|
98
|
-
]), f = N(() => m.value.map((o) => o.value)), { createJPrompt: d } = M();
|
|
99
|
-
function r(o) {
|
|
100
|
-
return o != null && !f.value.includes(o);
|
|
101
|
-
}
|
|
102
|
-
function c(o) {
|
|
103
|
-
d({
|
|
104
|
-
title: "自定义正则表达式",
|
|
105
|
-
placeholder: "请输入正则表达式",
|
|
106
|
-
rules: [{ required: !0, message: "正则表达式不能为空!" }, { validator: p }],
|
|
107
|
-
onOk: (a) => {
|
|
108
|
-
o.triggerChange(a), t.success("添加成功");
|
|
109
|
-
}
|
|
110
|
-
});
|
|
111
|
-
}
|
|
112
|
-
function v(o) {
|
|
113
|
-
d({
|
|
114
|
-
title: "修改自定义正则表达式",
|
|
115
|
-
defaultValue: o.value,
|
|
116
|
-
placeholder: "请输入正则表达式",
|
|
117
|
-
rules: [{ required: !0, message: "正则表达式不能为空!" }, { validator: p }],
|
|
118
|
-
onOk: (a) => {
|
|
119
|
-
o.triggerChange(a), a !== o.value && t.success("修改成功");
|
|
120
|
-
}
|
|
121
|
-
});
|
|
122
|
-
}
|
|
123
|
-
function p(o, a) {
|
|
124
|
-
return r(a) ? Promise.resolve() : Promise.reject("当前校验已存在");
|
|
125
|
-
}
|
|
126
|
-
return y(C({}, g), {
|
|
127
|
-
prefixCls: e,
|
|
128
|
-
columns: l,
|
|
129
|
-
isCustomRegexp: r,
|
|
130
|
-
validTypeOptions: m,
|
|
131
|
-
validTypeValues: f,
|
|
132
|
-
onAddCustomRegexp: c,
|
|
133
|
-
onChangeCustomRegexp: v
|
|
134
|
-
});
|
|
135
|
-
}
|
|
136
|
-
});
|
|
137
|
-
const j = {
|
|
138
|
-
class: "custom-option-list rc-virtual-list-holder-inner",
|
|
139
|
-
style: { "border-top": "1px solid #dfdfdf" }
|
|
140
|
-
}, G = ["onClick"];
|
|
141
|
-
function K(e, t, l, g, m, f) {
|
|
142
|
-
const d = u("VNodes"), r = u("a-select"), c = u("a-col"), v = u("a-button"), p = u("a-row"), o = u("JVxeTable");
|
|
143
|
-
return D(), P(o, $({
|
|
144
|
-
ref: "tableRef",
|
|
145
|
-
rowNumber: "",
|
|
146
|
-
keyboardEdit: "",
|
|
147
|
-
class: [e.prefixCls],
|
|
148
|
-
maxHeight: e.tableHeight.noToolbar,
|
|
149
|
-
loading: e.loading,
|
|
150
|
-
columns: e.columns,
|
|
151
|
-
dataSource: e.dataSource,
|
|
152
|
-
disabledRows: { dbFieldName: ["id", "has_child"] }
|
|
153
|
-
}, e.tableProps), {
|
|
154
|
-
fieldValidType: s((a) => [
|
|
155
|
-
n(p, {
|
|
156
|
-
type: "flex",
|
|
157
|
-
class: w(["row-valid-type", { full: !e.isCustomRegexp(a.value) }])
|
|
158
|
-
}, {
|
|
159
|
-
default: s(() => [
|
|
160
|
-
n(c, {
|
|
161
|
-
class: w(["left"])
|
|
162
|
-
}, {
|
|
163
|
-
default: s(() => [
|
|
164
|
-
n(r, {
|
|
165
|
-
value: a.value,
|
|
166
|
-
options: e.validTypeOptions,
|
|
167
|
-
placeholder: "空",
|
|
168
|
-
style: { width: "100%" },
|
|
169
|
-
onChange: a.triggerChange
|
|
170
|
-
}, {
|
|
171
|
-
dropdownRender: s(({ menuNode: V }) => [
|
|
172
|
-
n(d, { vnodes: V }, null, 8, ["vnodes"]),
|
|
173
|
-
H(T("div", j, [
|
|
174
|
-
T("div", {
|
|
175
|
-
class: "ant-select-item ant-select-item-option",
|
|
176
|
-
title: "使用自定义正则表达式作为校验规则",
|
|
177
|
-
onClick: (b) => e.onAddCustomRegexp(a),
|
|
178
|
-
onMousedown: t[0] || (t[0] = (b) => b.preventDefault())
|
|
179
|
-
}, " 正则表达式 ", 40, G)
|
|
180
|
-
], 512), [
|
|
181
|
-
[J, !e.isCustomRegexp(a.value)]
|
|
182
|
-
])
|
|
183
|
-
]),
|
|
184
|
-
_: 2
|
|
185
|
-
}, 1032, ["value", "options", "onChange"])
|
|
186
|
-
]),
|
|
187
|
-
_: 2
|
|
188
|
-
}, 1024),
|
|
189
|
-
n(c, {
|
|
190
|
-
class: "right",
|
|
191
|
-
title: "修改自定义正则表达式"
|
|
192
|
-
}, {
|
|
193
|
-
default: s(() => [
|
|
194
|
-
n(v, {
|
|
195
|
-
preIcon: "ant-design:edit",
|
|
196
|
-
onClick: () => e.onChangeCustomRegexp(a)
|
|
197
|
-
}, null, 8, ["onClick"])
|
|
198
|
-
]),
|
|
199
|
-
_: 2
|
|
200
|
-
}, 1024)
|
|
201
|
-
]),
|
|
202
|
-
_: 2
|
|
203
|
-
}, 1032, ["class"])
|
|
204
|
-
]),
|
|
205
|
-
_: 1
|
|
206
|
-
}, 16, ["class", "maxHeight", "loading", "columns", "dataSource"]);
|
|
207
|
-
}
|
|
208
|
-
const se = /* @__PURE__ */ q(z, [["render", K], ["__scopeId", "data-v-592747d8"]]);
|
|
209
|
-
export {
|
|
210
|
-
se as default
|
|
211
|
-
};
|
|
@@ -1,244 +0,0 @@
|
|
|
1
|
-
var k = (l, h, u) => new Promise((w, m) => {
|
|
2
|
-
var v = (i) => {
|
|
3
|
-
try {
|
|
4
|
-
s(u.next(i));
|
|
5
|
-
} catch (r) {
|
|
6
|
-
m(r);
|
|
7
|
-
}
|
|
8
|
-
}, _ = (i) => {
|
|
9
|
-
try {
|
|
10
|
-
s(u.throw(i));
|
|
11
|
-
} catch (r) {
|
|
12
|
-
m(r);
|
|
13
|
-
}
|
|
14
|
-
}, s = (i) => i.done ? w(i.value) : Promise.resolve(i.value).then(v, _);
|
|
15
|
-
s((u = u.apply(l, h)).next());
|
|
16
|
-
});
|
|
17
|
-
import { defineComponent as O, 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 P, createCommentVNode as j } from "vue";
|
|
18
|
-
import { defHttp as q } from "/@/utils/http/axios";
|
|
19
|
-
import { BasicModal as z, useModalInner as H } from "/@/components/Modal";
|
|
20
|
-
import { InfoCircleTwoTone as U } from "@ant-design/icons-vue";
|
|
21
|
-
import { message as Y } from "ant-design-vue";
|
|
22
|
-
import { JCodeEditor as Q } from "/@/components/Form";
|
|
23
|
-
import { _ as X } from "./index-0e3ab3af.mjs";
|
|
24
|
-
import "/@/components/jeecg/OnLine/JPopupOnlReport.vue";
|
|
25
|
-
import "/@/hooks/web/useMessage";
|
|
26
|
-
import "vue-router";
|
|
27
|
-
const Z = O({
|
|
28
|
-
name: "CodeFileViewModal",
|
|
29
|
-
components: {
|
|
30
|
-
BasicModal: z,
|
|
31
|
-
InfoCircleTwoTone: U,
|
|
32
|
-
JCodeEditor: Q
|
|
33
|
-
},
|
|
34
|
-
emits: ["download", "register", "close"],
|
|
35
|
-
setup(l, { emit: h }) {
|
|
36
|
-
const u = g([]), w = g(""), m = g([]), v = g(!1), _ = window.innerHeight - 160, s = g("java"), i = g("");
|
|
37
|
-
let r = S({});
|
|
38
|
-
const [T, { closeModal: B }] = H((t) => k(this, null, function* () {
|
|
39
|
-
r = S({}), i.value = "", u.value = t.codeList, w.value = t.pathKey, y(), v.value = !0;
|
|
40
|
-
}));
|
|
41
|
-
function y() {
|
|
42
|
-
let t = $(), o = t[0];
|
|
43
|
-
E(o, t);
|
|
44
|
-
let n = [];
|
|
45
|
-
const e = function(d) {
|
|
46
|
-
if (d.children) {
|
|
47
|
-
let a = d.children;
|
|
48
|
-
a.length == 1 ? e(a[0]) : a.length > 1 && n.push(d);
|
|
49
|
-
}
|
|
50
|
-
};
|
|
51
|
-
e(o), m.value = n, setTimeout(() => {
|
|
52
|
-
M(o);
|
|
53
|
-
}, 300);
|
|
54
|
-
}
|
|
55
|
-
function M(t) {
|
|
56
|
-
return k(this, null, function* () {
|
|
57
|
-
const o = function(e) {
|
|
58
|
-
if (e.isLeaf === !0)
|
|
59
|
-
return e;
|
|
60
|
-
if (e.children)
|
|
61
|
-
return o(e.children[0]);
|
|
62
|
-
};
|
|
63
|
-
let n = o(t);
|
|
64
|
-
if (n && n.isLeaf === !0) {
|
|
65
|
-
let e = n.path;
|
|
66
|
-
r[e] || (yield K(e)), s.value = A(e), i.value = r[e];
|
|
67
|
-
}
|
|
68
|
-
});
|
|
69
|
-
}
|
|
70
|
-
function E(t, o) {
|
|
71
|
-
for (let n of o)
|
|
72
|
-
t.key == n.pid && (t.children || (t.children = []), t.children.push(n), E(n, o));
|
|
73
|
-
}
|
|
74
|
-
function V(t, o) {
|
|
75
|
-
let n = 0, e = "";
|
|
76
|
-
for (; n <= o; )
|
|
77
|
-
e += t[n], n++;
|
|
78
|
-
return e;
|
|
79
|
-
}
|
|
80
|
-
function $() {
|
|
81
|
-
let t = [], o = [], n = u.value;
|
|
82
|
-
for (let e of n) {
|
|
83
|
-
let d = e.replace(new RegExp("\\\\", "g"), "/").replace("生成成功:", "").trim();
|
|
84
|
-
if (d) {
|
|
85
|
-
let a = d.split("/");
|
|
86
|
-
for (let c = 0; c < a.length; c++) {
|
|
87
|
-
let b = a[c], L = V(a, c);
|
|
88
|
-
if (b) {
|
|
89
|
-
let F = {
|
|
90
|
-
title: b,
|
|
91
|
-
key: L
|
|
92
|
-
};
|
|
93
|
-
if (b != 0) {
|
|
94
|
-
let N = V(a, c - 1);
|
|
95
|
-
N && (F.pid = N);
|
|
96
|
-
}
|
|
97
|
-
c == a.length - 1 && (F.isLeaf = !0, F.path = d), (o.indexOf(L) < 0 || c == a.length - 1) && (t.push(F), o.push(L));
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
return t;
|
|
103
|
-
}
|
|
104
|
-
function G() {
|
|
105
|
-
B(), h("close");
|
|
106
|
-
}
|
|
107
|
-
function I() {
|
|
108
|
-
h("download");
|
|
109
|
-
}
|
|
110
|
-
function A(t) {
|
|
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
|
-
}
|
|
113
|
-
function J(t, o) {
|
|
114
|
-
return k(this, null, function* () {
|
|
115
|
-
let n = o.node.dataRef;
|
|
116
|
-
if (n.isLeaf) {
|
|
117
|
-
let e = n.path;
|
|
118
|
-
r[e] || (yield K(e)), s.value = A(e), i.value = r[e];
|
|
119
|
-
}
|
|
120
|
-
});
|
|
121
|
-
}
|
|
122
|
-
function K(t) {
|
|
123
|
-
return new Promise((o) => {
|
|
124
|
-
let n = {
|
|
125
|
-
path: encodeURI(t),
|
|
126
|
-
pathKey: w.value
|
|
127
|
-
};
|
|
128
|
-
q.get({ url: "/online/cgform/api/codeView", params: n }, { isTransformResponse: !1 }).then((e) => {
|
|
129
|
-
if (!e || e.size === 0) {
|
|
130
|
-
Y.warning("文件下载失败");
|
|
131
|
-
return;
|
|
132
|
-
}
|
|
133
|
-
let d = new Blob([e]), a = new FileReader();
|
|
134
|
-
a.readAsText(d, "utf8"), a.onload = function() {
|
|
135
|
-
let c = this.result;
|
|
136
|
-
r[t] = c, o(1);
|
|
137
|
-
};
|
|
138
|
-
});
|
|
139
|
-
});
|
|
140
|
-
}
|
|
141
|
-
return {
|
|
142
|
-
registerModal: T,
|
|
143
|
-
codeList: u,
|
|
144
|
-
onDownloadGenerateCode: I,
|
|
145
|
-
handleClose: G,
|
|
146
|
-
treeData: m,
|
|
147
|
-
showCodeContent: J,
|
|
148
|
-
activeCodeContent: i,
|
|
149
|
-
expandStatus: v,
|
|
150
|
-
height: _,
|
|
151
|
-
language: s
|
|
152
|
-
};
|
|
153
|
-
}
|
|
154
|
-
});
|
|
155
|
-
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"), B = f("a-row"), y = f("a-button"), M = f("BasicModal");
|
|
157
|
-
return x(), D(M, {
|
|
158
|
-
onRegister: l.registerModal,
|
|
159
|
-
okText: "",
|
|
160
|
-
cancelText: "关闭",
|
|
161
|
-
width: 1200,
|
|
162
|
-
defaultFullscreen: !0,
|
|
163
|
-
canFullscreen: !1,
|
|
164
|
-
onOk: l.onDownloadGenerateCode
|
|
165
|
-
}, {
|
|
166
|
-
title: p(() => [
|
|
167
|
-
C(_),
|
|
168
|
-
R(" 代码在线预览 ")
|
|
169
|
-
]),
|
|
170
|
-
footer: p(() => [
|
|
171
|
-
C(y, { onClick: l.handleClose }, {
|
|
172
|
-
default: p(() => [
|
|
173
|
-
R("关闭")
|
|
174
|
-
]),
|
|
175
|
-
_: 1
|
|
176
|
-
}, 8, ["onClick"]),
|
|
177
|
-
C(y, {
|
|
178
|
-
type: "primary",
|
|
179
|
-
onClick: l.onDownloadGenerateCode
|
|
180
|
-
}, {
|
|
181
|
-
default: p(() => [
|
|
182
|
-
R("下载到本地")
|
|
183
|
-
]),
|
|
184
|
-
_: 1
|
|
185
|
-
}, 8, ["onClick"])
|
|
186
|
-
]),
|
|
187
|
-
default: p(() => [
|
|
188
|
-
W("div", null, [
|
|
189
|
-
C(B, null, {
|
|
190
|
-
default: p(() => [
|
|
191
|
-
C(i, {
|
|
192
|
-
span: 6,
|
|
193
|
-
gutter: 3,
|
|
194
|
-
style: { "border-right": "1px solid #eee" }
|
|
195
|
-
}, {
|
|
196
|
-
default: p(() => [
|
|
197
|
-
W("div", {
|
|
198
|
-
style: P({ height: l.height + "px", overflowY: "auto" })
|
|
199
|
-
}, [
|
|
200
|
-
l.treeData.length ? (x(), D(s, {
|
|
201
|
-
key: 0,
|
|
202
|
-
defaultExpandAll: !0,
|
|
203
|
-
"tree-data": l.treeData,
|
|
204
|
-
onSelect: l.showCodeContent
|
|
205
|
-
}, null, 8, ["tree-data", "onSelect"])) : j("", !0)
|
|
206
|
-
], 4)
|
|
207
|
-
]),
|
|
208
|
-
_: 1
|
|
209
|
-
}),
|
|
210
|
-
C(i, {
|
|
211
|
-
span: 18,
|
|
212
|
-
gutter: 3
|
|
213
|
-
}, {
|
|
214
|
-
default: p(() => [
|
|
215
|
-
l.activeCodeContent ? (x(), D(r, {
|
|
216
|
-
key: 0,
|
|
217
|
-
value: l.activeCodeContent,
|
|
218
|
-
"onUpdate:value": h[0] || (h[0] = (E) => l.activeCodeContent = E),
|
|
219
|
-
theme: "idea",
|
|
220
|
-
language: l.language,
|
|
221
|
-
fullScreen: !1,
|
|
222
|
-
lineNumbers: !0,
|
|
223
|
-
height: l.height + "px",
|
|
224
|
-
"language-change": !0
|
|
225
|
-
}, null, 8, ["value", "language", "height"])) : (x(), D(T, {
|
|
226
|
-
key: 1,
|
|
227
|
-
style: { "margin-top": "50px" },
|
|
228
|
-
description: "请选择左侧文件,显示详细代码"
|
|
229
|
-
}))
|
|
230
|
-
]),
|
|
231
|
-
_: 1
|
|
232
|
-
})
|
|
233
|
-
]),
|
|
234
|
-
_: 1
|
|
235
|
-
})
|
|
236
|
-
])
|
|
237
|
-
]),
|
|
238
|
-
_: 1
|
|
239
|
-
}, 8, ["onRegister", "onOk"]);
|
|
240
|
-
}
|
|
241
|
-
const fe = /* @__PURE__ */ X(Z, [["render", ee]]);
|
|
242
|
-
export {
|
|
243
|
-
fe as default
|
|
244
|
-
};
|
|
@@ -1,233 +0,0 @@
|
|
|
1
|
-
var C = (t, c, n) => new Promise((u, b) => {
|
|
2
|
-
var h = (a) => {
|
|
3
|
-
try {
|
|
4
|
-
i(n.next(a));
|
|
5
|
-
} catch (o) {
|
|
6
|
-
b(o);
|
|
7
|
-
}
|
|
8
|
-
}, s = (a) => {
|
|
9
|
-
try {
|
|
10
|
-
i(n.throw(a));
|
|
11
|
-
} catch (o) {
|
|
12
|
-
b(o);
|
|
13
|
-
}
|
|
14
|
-
}, i = (a) => a.done ? u(a.value) : Promise.resolve(a.value).then(h, s);
|
|
15
|
-
i((n = n.apply(t, c)).next());
|
|
16
|
-
});
|
|
17
|
-
import { defineComponent as ee, ref as f, computed as P, reactive as S, nextTick as te, resolveComponent as m, openBlock as R, createElementBlock as oe, Fragment as ae, createVNode as g, withCtx as F, createBlock as le, mergeProps as ne, createCommentVNode as ie } from "vue";
|
|
18
|
-
import { defHttp as k } from "/@/utils/http/axios";
|
|
19
|
-
import { BasicForm as re, useForm as se } from "/@/components/Form";
|
|
20
|
-
import { BasicModal as ce, useModalInner as me, useModal as B } from "/@/components/Modal";
|
|
21
|
-
import { JVxeTypes as N } from "/@/components/jeecg/JVxeTable/types";
|
|
22
|
-
import { b as ue } from "./useSchemas-0433a403.mjs";
|
|
23
|
-
import { underLine2CamelCase as O } from "/@/utils/common/compUtils";
|
|
24
|
-
import pe from "./CodeFileListModal-a6d3290d.mjs";
|
|
25
|
-
import de from "./FileSelectModal-9a02560b.mjs";
|
|
26
|
-
import { _ as fe } from "./index-0e3ab3af.mjs";
|
|
27
|
-
import "ant-design-vue";
|
|
28
|
-
import "@ant-design/icons-vue";
|
|
29
|
-
import "/@/hooks/web/usePermission";
|
|
30
|
-
import "/@/utils/helper/validator";
|
|
31
|
-
import "./CodeFileViewModal-373e8058.mjs";
|
|
32
|
-
import "/@/components/jeecg/OnLine/JPopupOnlReport.vue";
|
|
33
|
-
import "/@/hooks/web/useMessage";
|
|
34
|
-
import "vue-router";
|
|
35
|
-
import "/@/utils/file/download";
|
|
36
|
-
const ge = ee({
|
|
37
|
-
name: "CodeGenerator",
|
|
38
|
-
components: { BasicForm: re, BasicModal: ce, FileSelectModal: de, CodeFileListModal: pe },
|
|
39
|
-
emits: ["register"],
|
|
40
|
-
setup(t) {
|
|
41
|
-
const c = "JEECG_ONL_PROJECT_PATH", n = f(!0), u = f(), b = P(() => n.value ? 800 : 1200), h = f("代码生成"), s = f(!1), i = f(""), a = S({
|
|
42
|
-
projectPath: "",
|
|
43
|
-
packageStyle: "service",
|
|
44
|
-
jspMode: "",
|
|
45
|
-
jformType: "1",
|
|
46
|
-
tableName_tmp: "",
|
|
47
|
-
ftlDescription: "",
|
|
48
|
-
entityName: "",
|
|
49
|
-
codeTypes: "controller,service,dao,mapper,entity,vue"
|
|
50
|
-
}), o = S({}), M = f([]), p = S({
|
|
51
|
-
dataSource: [],
|
|
52
|
-
columns: [
|
|
53
|
-
{
|
|
54
|
-
title: "子表名",
|
|
55
|
-
key: "tableName",
|
|
56
|
-
type: N.input,
|
|
57
|
-
disabled: !0,
|
|
58
|
-
validateRules: [{ required: !0, message: "请输入${title}" }]
|
|
59
|
-
},
|
|
60
|
-
{
|
|
61
|
-
title: "子表实体",
|
|
62
|
-
key: "entityName",
|
|
63
|
-
type: N.input,
|
|
64
|
-
validateRules: [{ required: !0, message: "请输入${title}" }]
|
|
65
|
-
},
|
|
66
|
-
{
|
|
67
|
-
title: "功能说明",
|
|
68
|
-
key: "ftlDescription",
|
|
69
|
-
type: N.input,
|
|
70
|
-
validateRules: [{ required: !0, message: "请输入${title}" }]
|
|
71
|
-
}
|
|
72
|
-
]
|
|
73
|
-
}), T = P(() => p.dataSource.length > 0), { formSchemas: D } = ue(
|
|
74
|
-
t,
|
|
75
|
-
{
|
|
76
|
-
onProjectPathChange: X,
|
|
77
|
-
onProjectPathSearch: z,
|
|
78
|
-
jspModeOptions: M
|
|
79
|
-
},
|
|
80
|
-
n
|
|
81
|
-
), [E, { resetFields: G, setFieldsValue: w, validate: $ }] = se({
|
|
82
|
-
schemas: D,
|
|
83
|
-
showActionButtonGroup: !1,
|
|
84
|
-
labelAlign: "right"
|
|
85
|
-
}), [J, { closeModal: j }] = me((e) => C(this, null, function* () {
|
|
86
|
-
yield G(), i.value = e.code, s.value = !1, p.dataSource = [], M.value = [], Q(), Object.assign(o, a), V();
|
|
87
|
-
}));
|
|
88
|
-
function V() {
|
|
89
|
-
return C(this, null, function* () {
|
|
90
|
-
let { main: e, sub: l, jspModeList: d, projectPath: r } = yield k.get({
|
|
91
|
-
url: "/online/cgform/head/tableInfo",
|
|
92
|
-
params: { code: i.value }
|
|
93
|
-
}), v = [];
|
|
94
|
-
for (let y of d) {
|
|
95
|
-
const { code: L, note: Z } = y;
|
|
96
|
-
L == "many" || v.push({
|
|
97
|
-
label: Z,
|
|
98
|
-
value: L
|
|
99
|
-
});
|
|
100
|
-
}
|
|
101
|
-
M.value = v, e.isTree == "Y" ? o.jspMode = "tree" : o.jspMode = v[0].value, n.value = e.tableType == 1, h.value = "代码生成【" + e.tableName + "】", o.projectPath || (o.projectPath = r, window.localStorage.setItem(c, r)), o.jformType = e.tableType + "", o.tableName_tmp = e.tableName, o.ftlDescription = e.tableTxt;
|
|
102
|
-
let _ = O(e.tableName);
|
|
103
|
-
o.entityName = _.substring(0, 1).toUpperCase() + _.substring(1), yield te(), w(o), l && l.length > 0 && (p.dataSource = l.map((y) => ({
|
|
104
|
-
tableName: y.tableName,
|
|
105
|
-
entityName: x(y.tableName),
|
|
106
|
-
ftlDescription: y.tableTxt
|
|
107
|
-
})));
|
|
108
|
-
});
|
|
109
|
-
}
|
|
110
|
-
const [I, { openModal: A }] = B();
|
|
111
|
-
function H() {
|
|
112
|
-
return C(this, null, function* () {
|
|
113
|
-
try {
|
|
114
|
-
const e = yield $();
|
|
115
|
-
let l = Object.assign({}, e, { code: i.value, tableName: e.tableName_tmp });
|
|
116
|
-
if (T.value) {
|
|
117
|
-
if (yield u.value.validateTable())
|
|
118
|
-
return;
|
|
119
|
-
l.subList = u.value.getTableData();
|
|
120
|
-
}
|
|
121
|
-
s.value = !0;
|
|
122
|
-
let d = yield q(l);
|
|
123
|
-
A(!0, {
|
|
124
|
-
codeList: d.codeList,
|
|
125
|
-
pathKey: d.pathKey,
|
|
126
|
-
tableName: e.tableName_tmp
|
|
127
|
-
}), j();
|
|
128
|
-
} catch (e) {
|
|
129
|
-
} finally {
|
|
130
|
-
s.value = !1;
|
|
131
|
-
}
|
|
132
|
-
});
|
|
133
|
-
}
|
|
134
|
-
function q(e) {
|
|
135
|
-
return new Promise((l, d) => {
|
|
136
|
-
k.post({ url: "/online/cgform/api/codeGenerate", params: e }, { isTransformResponse: !1 }).then((r) => {
|
|
137
|
-
if (r.success) {
|
|
138
|
-
let v = r.result, _ = r.message;
|
|
139
|
-
l({
|
|
140
|
-
codeList: v,
|
|
141
|
-
pathKey: _
|
|
142
|
-
});
|
|
143
|
-
} else
|
|
144
|
-
this.$message.error(r.message), d(r.message);
|
|
145
|
-
});
|
|
146
|
-
});
|
|
147
|
-
}
|
|
148
|
-
function K() {
|
|
149
|
-
j();
|
|
150
|
-
}
|
|
151
|
-
const [U, W] = B();
|
|
152
|
-
function z() {
|
|
153
|
-
W.openModal(!0, {});
|
|
154
|
-
}
|
|
155
|
-
function Y(e) {
|
|
156
|
-
window.localStorage.setItem(c, e), w({ projectPath: e });
|
|
157
|
-
}
|
|
158
|
-
function x(e) {
|
|
159
|
-
let l = O(e);
|
|
160
|
-
return l.substring(0, 1).toUpperCase() + l.substring(1);
|
|
161
|
-
}
|
|
162
|
-
function Q() {
|
|
163
|
-
let e = window.localStorage.getItem(c);
|
|
164
|
-
e && (a.projectPath = e);
|
|
165
|
-
}
|
|
166
|
-
function X(e) {
|
|
167
|
-
e.target.value && window.localStorage.setItem(c, e.target.value);
|
|
168
|
-
}
|
|
169
|
-
return {
|
|
170
|
-
title: h,
|
|
171
|
-
modalWidth: b,
|
|
172
|
-
confirmLoading: s,
|
|
173
|
-
subTable: p,
|
|
174
|
-
showSubTable: T,
|
|
175
|
-
onSubmit: H,
|
|
176
|
-
onCancel: K,
|
|
177
|
-
onFileSelect: Y,
|
|
178
|
-
registerFileSelectModal: U,
|
|
179
|
-
subTableRef: u,
|
|
180
|
-
registerForm: E,
|
|
181
|
-
registerModal: J,
|
|
182
|
-
registerCodeFileListModal: I
|
|
183
|
-
};
|
|
184
|
-
}
|
|
185
|
-
});
|
|
186
|
-
function be(t, c, n, u, b, h) {
|
|
187
|
-
const s = m("BasicForm"), i = m("JVxeTable"), a = m("a-card"), o = m("a-spin"), M = m("BasicModal"), p = m("FileSelectModal"), T = m("code-file-list-modal");
|
|
188
|
-
return R(), oe(ae, null, [
|
|
189
|
-
g(M, {
|
|
190
|
-
onRegister: t.registerModal,
|
|
191
|
-
title: t.title,
|
|
192
|
-
width: t.modalWidth,
|
|
193
|
-
confirmLoading: t.confirmLoading,
|
|
194
|
-
okText: "开始生成",
|
|
195
|
-
cancelText: "取消",
|
|
196
|
-
onOk: t.onSubmit,
|
|
197
|
-
onCancel: t.onCancel
|
|
198
|
-
}, {
|
|
199
|
-
default: F(() => [
|
|
200
|
-
g(o, { spinning: t.confirmLoading }, {
|
|
201
|
-
default: F(() => [
|
|
202
|
-
g(s, { onRegister: t.registerForm }, null, 8, ["onRegister"]),
|
|
203
|
-
t.showSubTable ? (R(), le(a, {
|
|
204
|
-
key: 0,
|
|
205
|
-
title: "子表信息",
|
|
206
|
-
size: "small"
|
|
207
|
-
}, {
|
|
208
|
-
default: F(() => [
|
|
209
|
-
g(i, ne({
|
|
210
|
-
ref: "subTableRef",
|
|
211
|
-
rowNumber: "",
|
|
212
|
-
maxHeight: 580
|
|
213
|
-
}, t.subTable), null, 16)
|
|
214
|
-
]),
|
|
215
|
-
_: 1
|
|
216
|
-
})) : ie("", !0)
|
|
217
|
-
]),
|
|
218
|
-
_: 1
|
|
219
|
-
}, 8, ["spinning"])
|
|
220
|
-
]),
|
|
221
|
-
_: 1
|
|
222
|
-
}, 8, ["onRegister", "title", "width", "confirmLoading", "onOk", "onCancel"]),
|
|
223
|
-
g(p, {
|
|
224
|
-
onRegister: t.registerFileSelectModal,
|
|
225
|
-
onSelect: t.onFileSelect
|
|
226
|
-
}, null, 8, ["onRegister", "onSelect"]),
|
|
227
|
-
g(T, { onRegister: t.registerCodeFileListModal }, null, 8, ["onRegister"])
|
|
228
|
-
], 64);
|
|
229
|
-
}
|
|
230
|
-
const Ge = /* @__PURE__ */ fe(ge, [["render", be]]);
|
|
231
|
-
export {
|
|
232
|
-
Ge as default
|
|
233
|
-
};
|