@jeecg/online 3.5.3-beta3 → 3.6.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/AuthButtonConfig-b6a674fa.mjs +125 -0
- package/AuthButtonTree-09e57bc4.mjs +156 -0
- package/AuthDataConfig-6e7e61ec.mjs +212 -0
- package/AuthDataTree-e83286c5.mjs +139 -0
- package/AuthFieldConfig-f1ec2708.mjs +139 -0
- package/AuthFieldTree-bb72e21f.mjs +232 -0
- package/AuthManagerDrawer-28a2d108.mjs +114 -0
- package/AuthSetterModal-2990d553.mjs +261 -0
- package/CgformCopyList-36a4cbf0.mjs +246 -0
- package/CgformModal-7399a5ac.mjs +611 -0
- package/CgreportModal-2eb9c9e1.mjs +13 -0
- package/CgreportModal.vue_vue_type_script_setup_true_lang-c2ceb064.mjs +566 -0
- package/CheckDictTable-3a8a54b3.mjs +211 -0
- package/CodeFileListModal-72f0d3bb.mjs +158 -0
- package/CodeFileViewModal-9eb88c47.mjs +244 -0
- package/CodeGeneratorModal-a89958f5.mjs +233 -0
- package/CustomButtonList-c44aec5a.mjs +363 -0
- package/DBAttributeTable-7d285e8d.mjs +473 -0
- package/DbToOnlineModal-d23cbeb1.mjs +160 -0
- package/DetailForm-2901d215.mjs +461 -0
- package/EnhanceJavaModal-153899a9.mjs +264 -0
- package/EnhanceJsHistory-7f5db3b1.mjs +184 -0
- package/EnhanceJsModal-c2fb75b8.mjs +311 -0
- package/EnhanceSqlModal-965e9b0a.mjs +268 -0
- package/ExtendConfigModal-8f08466f.mjs +111 -0
- package/FieldExtendJsonModal-adfcf5a7.mjs +219 -0
- package/FileSelectModal-432d4521.mjs +103 -0
- package/ForeignKeyTable-faab7ccf.mjs +69 -0
- package/IndexTable-0a2d3718.mjs +89 -0
- package/JModalTip-e1938b49.mjs +46 -0
- package/JOnlineSearchSelect-7e908492.mjs +95 -0
- package/LeftDepart-54f245b3.mjs +82 -0
- package/LeftRole-c138f892.mjs +86 -0
- package/LeftUser-9c812f8a.mjs +105 -0
- package/LinkTableConfigModal-c2c5c7e6.mjs +230 -0
- package/LinkTableFieldConfigModal-a3553b1f.mjs +176 -0
- package/LinkTableListPiece-7f793b08.mjs +34 -0
- package/ModalFormDemo-65685b0e.mjs +78 -0
- package/OnlCgformErpList-52c87ed3.mjs +449 -0
- package/OnlCgformErpSubTable-6e7fb17b.mjs +398 -0
- package/OnlCgformInnerSubTable-f0727b8f.mjs +248 -0
- package/OnlCgformInnerTableList-9f89c173.mjs +430 -0
- package/OnlCgformTabList-15516315.mjs +390 -0
- package/OnlineAutoList-63a0224f.mjs +474 -0
- package/OnlineAutoModal-ffe19c3f.mjs +206 -0
- package/OnlineAutoTreeList-317c7105.mjs +495 -0
- package/OnlineCustomModal-3939ce78.mjs +227 -0
- package/OnlineDetailModal-bfb1375f.mjs +177 -0
- package/OnlineForm-069f6092.mjs +749 -0
- package/OnlineFormDetail-ad5735fb.mjs +296 -0
- package/OnlineQueryForm-0771c80f.mjs +385 -0
- package/OnlineSearchFormItem-0db5834f.mjs +348 -0
- package/OnlineSelectCascade-a05c30f4.mjs +159 -0
- package/OnlineSubFormDetail-583d01eb.mjs +142 -0
- package/OnlineTabAutoModal-747e071d.mjs +253 -0
- package/OnlineTabDetailModal-887f0174.mjs +222 -0
- package/OnlineTabForm-b1dcd4b4.mjs +765 -0
- package/OnlineTabFormDetail-8e494a96.mjs +323 -0
- package/PageAttributeTable-5966b201.mjs +404 -0
- package/ProcessOnlineForm-4382bea7.mjs +177 -0
- package/QueryTable-6e8053ad.mjs +115 -0
- package/README.md +2 -1
- package/SuperQuery-78db6998.mjs +841 -0
- package/SuperQueryValComponent-471110b5.mjs +8 -0
- package/SuperQueryValComponent.vue_vue_type_script_lang-e3ad7ee8.mjs +101 -0
- package/auth.api-d3a6c4b3.mjs +39 -0
- package/auth.data-8be5c9e3.mjs +141 -0
- package/{cgform.data.js → cgform.data-cbdd88c3.mjs} +93 -62
- package/constant-754f1a9d.mjs +9 -0
- package/enhance.api-138e6826.mjs +104 -0
- package/enhance.data-efc7e155.mjs +175 -0
- package/index-0a93652b.mjs +237 -0
- package/index-7e9a23f2.mjs +1494 -0
- package/index-b70302f2.mjs +56 -0
- package/main.index.js +7 -1
- package/package.json +1 -1
- package/style.css +1 -1
- package/useCgformList-0c603af1.mjs +424 -0
- package/useCustomHook-acb00837.mjs +53 -0
- package/useExtendComponent-aa1cdfc8.mjs +3917 -0
- package/useListButton-0f18bf6a.mjs +671 -0
- package/useOnlinePopEvent-687070b7.mjs +19 -0
- package/useOnlineTest-e4bd8be3.mjs +42 -0
- package/useSchemas-43429d80.mjs +685 -0
- package/useTableSync-774c3774.mjs +87 -0
- package/AuthButtonConfig.js +0 -147
- package/AuthButtonTree.js +0 -183
- package/AuthDataConfig.js +0 -246
- package/AuthDataTree.js +0 -160
- package/AuthFieldConfig.js +0 -170
- package/AuthFieldTree.js +0 -281
- package/AuthManagerDrawer.js +0 -125
- package/AuthSetterModal.js +0 -316
- package/CgformCopyList.js +0 -266
- package/CgformModal.js +0 -780
- package/CgreportModal.js +0 -667
- package/CheckDictTable.js +0 -242
- package/CodeFileListModal.js +0 -175
- package/CodeFileViewModal.js +0 -325
- package/CodeGeneratorModal.js +0 -297
- package/CustomButtonList.js +0 -410
- package/DBAttributeTable.js +0 -526
- package/DbToOnlineModal.js +0 -192
- package/DetailForm.js +0 -608
- package/EnhanceJavaModal.js +0 -298
- package/EnhanceJsHistory.js +0 -229
- package/EnhanceJsModal.js +0 -293
- package/EnhanceSqlModal.js +0 -299
- package/ExtendConfigModal.js +0 -151
- package/FieldExtendJsonModal.js +0 -283
- package/FileSelectModal.js +0 -102
- package/ForeignKeyTable.js +0 -79
- package/IndexTable.js +0 -97
- package/JModalTip.js +0 -54
- package/JOnlineSearchSelect.js +0 -115
- package/LICENSE +0 -9
- package/LeftDepart.js +0 -96
- package/LeftRole.js +0 -98
- package/LeftUser.js +0 -117
- package/LinkTableConfigModal.js +0 -289
- package/LinkTableFieldConfigModal.js +0 -218
- package/LinkTableListPiece.js +0 -36
- package/ModalFormDemo.js +0 -85
- package/OnlineAutoList.js +0 -523
- package/OnlineAutoModal.js +0 -226
- package/OnlineAutoTreeList.js +0 -552
- package/OnlineCustomModal.js +0 -286
- package/OnlineDetailModal.js +0 -190
- package/OnlineForm.js +0 -1016
- package/OnlineFormDetail.js +0 -347
- package/OnlineQueryForm.js +0 -484
- package/OnlineSearchFormItem.js +0 -436
- package/OnlineSelectCascade.js +0 -228
- package/OnlineSubFormDetail.js +0 -166
- package/PageAttributeTable.js +0 -486
- package/ProcessOnlineForm.js +0 -208
- package/QueryTable.js +0 -129
- package/SuperQuery.js +0 -1020
- package/SuperQueryValComponent.js +0 -8
- package/SuperQueryValComponent.vue_vue_type_script_lang.js +0 -168
- package/_arrayPush.js +0 -278
- package/_baseClone.js +0 -471
- package/_baseSlice.js +0 -18
- package/_commonjsHelpers.js +0 -5
- package/_flatRest.js +0 -174
- package/auth.api.js +0 -43
- package/auth.data.js +0 -142
- package/clipboard.js +0 -565
- package/enhance.api.js +0 -129
- package/enhance.data.js +0 -196
- package/index.js +0 -87
- package/index2.js +0 -340
- package/index3.js +0 -264
- package/isArray.js +0 -47
- package/omit.js +0 -60
- package/pick.js +0 -68
- package/toString.js +0 -31
- package/useCgformList.js +0 -470
- package/useExtendComponent.js +0 -5205
- package/useListButton.js +0 -923
- package/useOnlineTest.js +0 -44
- package/useSchemas.js +0 -653
- package/useTableSync.js +0 -117
|
@@ -0,0 +1,211 @@
|
|
|
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-b70302f2.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
|
+
};
|
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
var M = (d, l, i) => new Promise((e, m) => {
|
|
2
|
+
var p = (o) => {
|
|
3
|
+
try {
|
|
4
|
+
n(i.next(o));
|
|
5
|
+
} catch (r) {
|
|
6
|
+
m(r);
|
|
7
|
+
}
|
|
8
|
+
}, a = (o) => {
|
|
9
|
+
try {
|
|
10
|
+
n(i.throw(o));
|
|
11
|
+
} catch (r) {
|
|
12
|
+
m(r);
|
|
13
|
+
}
|
|
14
|
+
}, n = (o) => o.done ? e(o.value) : Promise.resolve(o.value).then(p, a);
|
|
15
|
+
n((i = i.apply(d, l)).next());
|
|
16
|
+
});
|
|
17
|
+
import { ref as u, reactive as x, resolveComponent as _, openBlock as C, createElementBlock as h, Fragment as v, createVNode as s, withCtx as c, createTextVNode as f, createElementVNode as y, normalizeStyle as F, renderList as B, toDisplayString as N } from "vue";
|
|
18
|
+
import { defHttp as R } from "/@/utils/http/axios";
|
|
19
|
+
import "/@/components/Form";
|
|
20
|
+
import { BasicModal as T, useModalInner as z, useModal as G } from "/@/components/Modal";
|
|
21
|
+
import { InfoCircleTwoTone as K } from "@ant-design/icons-vue";
|
|
22
|
+
import S from "./CodeFileViewModal-9eb88c47.mjs";
|
|
23
|
+
import { useMessage as H } from "/@/hooks/web/useMessage";
|
|
24
|
+
import { downloadByData as I } from "/@/utils/file/download";
|
|
25
|
+
import { _ as E } from "./index-b70302f2.mjs";
|
|
26
|
+
import "ant-design-vue";
|
|
27
|
+
import "/@/components/jeecg/OnLine/JPopupOnlReport.vue";
|
|
28
|
+
import "vue-router";
|
|
29
|
+
const j = {
|
|
30
|
+
name: "CodeFileListModal",
|
|
31
|
+
components: {
|
|
32
|
+
BasicModal: T,
|
|
33
|
+
InfoCircleTwoTone: K,
|
|
34
|
+
CodeFileViewModal: S
|
|
35
|
+
},
|
|
36
|
+
emits: ["register"],
|
|
37
|
+
setup() {
|
|
38
|
+
const { createMessage: d } = H(), l = u([]), i = window.innerHeight - 150, e = x({
|
|
39
|
+
overflowY: "auto",
|
|
40
|
+
maxHeight: i + "px"
|
|
41
|
+
}), m = u(!1), p = u(""), a = u(""), [n, { closeModal: o }] = z((t) => M(this, null, function* () {
|
|
42
|
+
l.value = t.codeList, p.value = t.tableName, a.value = t.pathKey;
|
|
43
|
+
}));
|
|
44
|
+
function r() {
|
|
45
|
+
o();
|
|
46
|
+
}
|
|
47
|
+
function g() {
|
|
48
|
+
let t = l.value;
|
|
49
|
+
if (!t || t.length == 0) {
|
|
50
|
+
d.warning("无代码!");
|
|
51
|
+
return;
|
|
52
|
+
}
|
|
53
|
+
let V = t.join(",");
|
|
54
|
+
return R.post(
|
|
55
|
+
{
|
|
56
|
+
url: "/online/cgform/api/downGenerateCode",
|
|
57
|
+
params: {
|
|
58
|
+
fileList: encodeURI(V),
|
|
59
|
+
pathKey: a.value
|
|
60
|
+
},
|
|
61
|
+
responseType: "blob"
|
|
62
|
+
},
|
|
63
|
+
{ isTransformResponse: !1 }
|
|
64
|
+
).then((w) => {
|
|
65
|
+
if (!w || w.size == 0) {
|
|
66
|
+
d.warning("导出代码失败!");
|
|
67
|
+
return;
|
|
68
|
+
}
|
|
69
|
+
let b = "导到生成代码_" + p.value + "_" + (/* @__PURE__ */ new Date()).getTime() + ".zip";
|
|
70
|
+
I(w, b, "application/zip");
|
|
71
|
+
});
|
|
72
|
+
}
|
|
73
|
+
const [L, { openModal: k }] = G();
|
|
74
|
+
function D() {
|
|
75
|
+
let t = l.value;
|
|
76
|
+
k(!0, {
|
|
77
|
+
codeList: t,
|
|
78
|
+
pathKey: a.value
|
|
79
|
+
});
|
|
80
|
+
}
|
|
81
|
+
return {
|
|
82
|
+
registerModal: n,
|
|
83
|
+
registerCodeViewModal: L,
|
|
84
|
+
divStyle: e,
|
|
85
|
+
codeList: l,
|
|
86
|
+
onDownloadGenerateCode: g,
|
|
87
|
+
handleClose: r,
|
|
88
|
+
handleView: D,
|
|
89
|
+
loading: m
|
|
90
|
+
};
|
|
91
|
+
}
|
|
92
|
+
}, U = /* @__PURE__ */ y("br", null, null, -1);
|
|
93
|
+
function Y(d, l, i, e, m, p) {
|
|
94
|
+
const a = _("info-circle-two-tone"), n = _("a-button"), o = _("BasicModal"), r = _("code-file-view-modal");
|
|
95
|
+
return C(), h(v, null, [
|
|
96
|
+
s(o, {
|
|
97
|
+
onRegister: e.registerModal,
|
|
98
|
+
width: 1200,
|
|
99
|
+
defaultFullscreen: !1,
|
|
100
|
+
canFullscreen: !1
|
|
101
|
+
}, {
|
|
102
|
+
title: c(() => [
|
|
103
|
+
s(a),
|
|
104
|
+
f(" 代码生成结果 ")
|
|
105
|
+
]),
|
|
106
|
+
footer: c(() => [
|
|
107
|
+
s(n, { onClick: e.handleClose }, {
|
|
108
|
+
default: c(() => [
|
|
109
|
+
f("关闭")
|
|
110
|
+
]),
|
|
111
|
+
_: 1
|
|
112
|
+
}, 8, ["onClick"]),
|
|
113
|
+
s(n, {
|
|
114
|
+
type: "primary",
|
|
115
|
+
ghost: "",
|
|
116
|
+
onClick: e.handleView
|
|
117
|
+
}, {
|
|
118
|
+
default: c(() => [
|
|
119
|
+
f("在线预览")
|
|
120
|
+
]),
|
|
121
|
+
_: 1
|
|
122
|
+
}, 8, ["onClick"]),
|
|
123
|
+
s(n, {
|
|
124
|
+
type: "primary",
|
|
125
|
+
onClick: e.onDownloadGenerateCode,
|
|
126
|
+
loading: e.loading
|
|
127
|
+
}, {
|
|
128
|
+
default: c(() => [
|
|
129
|
+
f("下载到本地")
|
|
130
|
+
]),
|
|
131
|
+
_: 1
|
|
132
|
+
}, 8, ["onClick", "loading"])
|
|
133
|
+
]),
|
|
134
|
+
default: c(() => [
|
|
135
|
+
y("div", {
|
|
136
|
+
style: F(e.divStyle)
|
|
137
|
+
}, [
|
|
138
|
+
y("p", null, [
|
|
139
|
+
(C(!0), h(v, null, B(e.codeList, (g) => (C(), h(v, null, [
|
|
140
|
+
f(N(g), 1),
|
|
141
|
+
U
|
|
142
|
+
], 64))), 256))
|
|
143
|
+
])
|
|
144
|
+
], 4)
|
|
145
|
+
]),
|
|
146
|
+
_: 1
|
|
147
|
+
}, 8, ["onRegister"]),
|
|
148
|
+
s(r, {
|
|
149
|
+
onRegister: e.registerCodeViewModal,
|
|
150
|
+
onDownload: e.onDownloadGenerateCode,
|
|
151
|
+
onClose: e.handleClose
|
|
152
|
+
}, null, 8, ["onRegister", "onDownload", "onClose"])
|
|
153
|
+
], 64);
|
|
154
|
+
}
|
|
155
|
+
const te = /* @__PURE__ */ E(j, [["render", Y]]);
|
|
156
|
+
export {
|
|
157
|
+
te as default
|
|
158
|
+
};
|
|
@@ -0,0 +1,244 @@
|
|
|
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-b70302f2.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
|
+
};
|