@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
|
@@ -0,0 +1,229 @@
|
|
|
1
|
+
var D = Object.defineProperty, I = Object.defineProperties;
|
|
2
|
+
var M = Object.getOwnPropertyDescriptors;
|
|
3
|
+
var F = Object.getOwnPropertySymbols;
|
|
4
|
+
var O = Object.prototype.hasOwnProperty, P = Object.prototype.propertyIsEnumerable;
|
|
5
|
+
var V = (e, t, a) => t in e ? D(e, t, { enumerable: !0, configurable: !0, writable: !0, value: a }) : e[t] = a, x = (e, t) => {
|
|
6
|
+
for (var a in t || (t = {}))
|
|
7
|
+
O.call(t, a) && V(e, a, t[a]);
|
|
8
|
+
if (F)
|
|
9
|
+
for (var a of F(t))
|
|
10
|
+
P.call(t, a) && V(e, a, t[a]);
|
|
11
|
+
return e;
|
|
12
|
+
}, R = (e, t) => I(e, M(t));
|
|
13
|
+
import { defineComponent as S, ref as E, computed as $, resolveComponent as s, openBlock as H, createBlock as J, mergeProps as q, withCtx as c, createVNode as i, normalizeClass as N, createElementVNode as T, withDirectives as z, vShow as j } from "vue";
|
|
14
|
+
import { JVxeTypes as n } from "/@/components/jeecg/JVxeTable/types";
|
|
15
|
+
import { u as K } from "./useTableSync-d7e9f18d.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-1d1a6e56.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 = E([
|
|
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: k, tables: w } = v, p = E([
|
|
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" && k.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 = w.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 R(x({}, 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 = { class: "menu" }, Y = {
|
|
153
|
+
class: "custom-option-list rc-virtual-list-holder-inner",
|
|
154
|
+
style: { "border-top": "1px solid #dfdfdf" }
|
|
155
|
+
}, Z = ["onClick"];
|
|
156
|
+
function ee(e, t, a, v, k, w) {
|
|
157
|
+
const p = s("VNodes"), m = s("a-select"), d = s("a-col"), f = s("a-button"), b = s("a-row"), g = s("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
|
+
i(b, {
|
|
171
|
+
type: "flex",
|
|
172
|
+
class: N(["row-valid-type", { full: !e.isCustomRegexp(o.value) }])
|
|
173
|
+
}, {
|
|
174
|
+
default: c(() => [
|
|
175
|
+
i(d, {
|
|
176
|
+
class: N(["left"])
|
|
177
|
+
}, {
|
|
178
|
+
default: c(() => [
|
|
179
|
+
i(m, {
|
|
180
|
+
value: o.value,
|
|
181
|
+
options: e.validTypeOptions,
|
|
182
|
+
placeholder: "空",
|
|
183
|
+
style: { width: "100%" },
|
|
184
|
+
onChange: o.triggerChange,
|
|
185
|
+
virtual: !1
|
|
186
|
+
}, {
|
|
187
|
+
dropdownRender: c(({ menuNode: h }) => [
|
|
188
|
+
T("div", X, [
|
|
189
|
+
i(p, { vnodes: h }, null, 8, ["vnodes"])
|
|
190
|
+
]),
|
|
191
|
+
z(T("div", Y, [
|
|
192
|
+
T("div", {
|
|
193
|
+
class: "ant-select-item ant-select-item-option",
|
|
194
|
+
title: "使用自定义正则表达式作为校验规则",
|
|
195
|
+
onClick: (r) => e.onAddCustomRegexp(o),
|
|
196
|
+
onMousedown: t[0] || (t[0] = (r) => r.preventDefault())
|
|
197
|
+
}, " 正则表达式 ", 40, Z)
|
|
198
|
+
], 512), [
|
|
199
|
+
[j, !e.isCustomRegexp(o.value)]
|
|
200
|
+
])
|
|
201
|
+
]),
|
|
202
|
+
_: 2
|
|
203
|
+
}, 1032, ["value", "options", "onChange"])
|
|
204
|
+
]),
|
|
205
|
+
_: 2
|
|
206
|
+
}, 1024),
|
|
207
|
+
i(d, {
|
|
208
|
+
class: "right",
|
|
209
|
+
title: "修改自定义正则表达式"
|
|
210
|
+
}, {
|
|
211
|
+
default: c(() => [
|
|
212
|
+
i(f, {
|
|
213
|
+
preIcon: "ant-design:edit",
|
|
214
|
+
onClick: () => e.onChangeCustomRegexp(o)
|
|
215
|
+
}, null, 8, ["onClick"])
|
|
216
|
+
]),
|
|
217
|
+
_: 2
|
|
218
|
+
}, 1024)
|
|
219
|
+
]),
|
|
220
|
+
_: 2
|
|
221
|
+
}, 1032, ["class"])
|
|
222
|
+
]),
|
|
223
|
+
_: 1
|
|
224
|
+
}, 16, ["class", "maxHeight", "loading", "columns", "dataSource"]);
|
|
225
|
+
}
|
|
226
|
+
const be = /* @__PURE__ */ U(W, [["render", ee], ["__scopeId", "data-v-272f2c52"]]);
|
|
227
|
+
export {
|
|
228
|
+
be as default
|
|
229
|
+
};
|
|
@@ -19,11 +19,12 @@ 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-2fe911f4.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-1d1a6e56.mjs";
|
|
26
26
|
import "ant-design-vue";
|
|
27
|
+
import "/@/hooks/web/useDesign";
|
|
27
28
|
import "/@/components/jeecg/OnLine/JPopupOnlReport.vue";
|
|
28
29
|
import "vue-router";
|
|
29
30
|
const j = {
|
|
@@ -152,7 +153,7 @@ function Y(d, l, i, e, m, p) {
|
|
|
152
153
|
}, null, 8, ["onRegister", "onDownload", "onClose"])
|
|
153
154
|
], 64);
|
|
154
155
|
}
|
|
155
|
-
const
|
|
156
|
+
const le = /* @__PURE__ */ E(j, [["render", Y]]);
|
|
156
157
|
export {
|
|
157
|
-
|
|
158
|
+
le as default
|
|
158
159
|
};
|
|
@@ -0,0 +1,253 @@
|
|
|
1
|
+
var F = (o, h, s) => new Promise((w, m) => {
|
|
2
|
+
var _ = (i) => {
|
|
3
|
+
try {
|
|
4
|
+
u(s.next(i));
|
|
5
|
+
} catch (r) {
|
|
6
|
+
m(r);
|
|
7
|
+
}
|
|
8
|
+
}, v = (i) => {
|
|
9
|
+
try {
|
|
10
|
+
u(s.throw(i));
|
|
11
|
+
} catch (r) {
|
|
12
|
+
m(r);
|
|
13
|
+
}
|
|
14
|
+
}, u = (i) => i.done ? w(i.value) : Promise.resolve(i.value).then(_, v);
|
|
15
|
+
u((s = s.apply(o, h)).next());
|
|
16
|
+
});
|
|
17
|
+
import { defineComponent as P, ref as g, reactive as H, resolveComponent as f, openBlock as k, createBlock as x, withCtx as p, createVNode as C, createTextVNode as V, createElementVNode as W, normalizeStyle as j, createCommentVNode as q } from "vue";
|
|
18
|
+
import { defHttp as z } from "/@/utils/http/axios";
|
|
19
|
+
import { BasicModal as U, useModalInner as Y } from "/@/components/Modal";
|
|
20
|
+
import { InfoCircleTwoTone as Q } from "@ant-design/icons-vue";
|
|
21
|
+
import { message as $ } from "ant-design-vue";
|
|
22
|
+
import { JCodeEditor as X } from "/@/components/Form";
|
|
23
|
+
import { useDesign as Z } from "/@/hooks/web/useDesign";
|
|
24
|
+
import { _ as ee } from "./index-1d1a6e56.mjs";
|
|
25
|
+
import "/@/components/jeecg/OnLine/JPopupOnlReport.vue";
|
|
26
|
+
import "/@/hooks/web/useMessage";
|
|
27
|
+
import "vue-router";
|
|
28
|
+
const te = P({
|
|
29
|
+
name: "CodeFileViewModal",
|
|
30
|
+
components: {
|
|
31
|
+
BasicModal: U,
|
|
32
|
+
InfoCircleTwoTone: Q,
|
|
33
|
+
JCodeEditor: X
|
|
34
|
+
},
|
|
35
|
+
emits: ["download", "register", "close"],
|
|
36
|
+
setup(o, { emit: h }) {
|
|
37
|
+
const s = g([]), w = g(""), m = g([]), _ = g(!1), v = window.innerHeight - 142, u = g("java"), i = g("");
|
|
38
|
+
let r = H({});
|
|
39
|
+
const [D, { closeModal: M }] = Y((t) => F(this, null, function* () {
|
|
40
|
+
r = H({}), i.value = "", s.value = t.codeList, w.value = t.pathKey, T(), _.value = !0;
|
|
41
|
+
})), { prefixCls: y } = Z("online-codeFileViewModal");
|
|
42
|
+
function T() {
|
|
43
|
+
let t = G(), l = t[0];
|
|
44
|
+
N(l, t);
|
|
45
|
+
let n = [];
|
|
46
|
+
const e = function(d) {
|
|
47
|
+
if (d.children) {
|
|
48
|
+
let a = d.children;
|
|
49
|
+
a.length == 1 ? e(a[0]) : a.length > 1 && n.push(d);
|
|
50
|
+
}
|
|
51
|
+
};
|
|
52
|
+
e(l), m.value = n, setTimeout(() => {
|
|
53
|
+
b(l);
|
|
54
|
+
}, 300);
|
|
55
|
+
}
|
|
56
|
+
function b(t) {
|
|
57
|
+
return F(this, null, function* () {
|
|
58
|
+
const l = function(e) {
|
|
59
|
+
if (e.isLeaf === !0)
|
|
60
|
+
return e;
|
|
61
|
+
if (e.children)
|
|
62
|
+
return l(e.children[0]);
|
|
63
|
+
};
|
|
64
|
+
let n = l(t);
|
|
65
|
+
if (n && n.isLeaf === !0) {
|
|
66
|
+
let e = n.path;
|
|
67
|
+
r[e] || (yield K(e)), u.value = A(e), i.value = r[e];
|
|
68
|
+
}
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
function N(t, l) {
|
|
72
|
+
for (let n of l)
|
|
73
|
+
t.key == n.pid && (t.children || (t.children = []), t.children.push(n), N(n, l));
|
|
74
|
+
}
|
|
75
|
+
function R(t, l) {
|
|
76
|
+
let n = 0, e = "";
|
|
77
|
+
for (; n <= l; )
|
|
78
|
+
e += t[n], n++;
|
|
79
|
+
return e;
|
|
80
|
+
}
|
|
81
|
+
function G() {
|
|
82
|
+
let t = [], l = [], n = s.value;
|
|
83
|
+
for (let e of n) {
|
|
84
|
+
let d = e.replace(new RegExp("\\\\", "g"), "/").replace("生成成功:", "").trim();
|
|
85
|
+
if (d) {
|
|
86
|
+
let a = d.split("/");
|
|
87
|
+
for (let c = 0; c < a.length; c++) {
|
|
88
|
+
let B = a[c], L = R(a, c);
|
|
89
|
+
if (B) {
|
|
90
|
+
let E = {
|
|
91
|
+
title: B,
|
|
92
|
+
key: L
|
|
93
|
+
};
|
|
94
|
+
if (B != 0) {
|
|
95
|
+
let S = R(a, c - 1);
|
|
96
|
+
S && (E.pid = S);
|
|
97
|
+
}
|
|
98
|
+
c == a.length - 1 && (E.isLeaf = !0, E.path = d), (l.indexOf(L) < 0 || c == a.length - 1) && (t.push(E), l.push(L));
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
return t;
|
|
104
|
+
}
|
|
105
|
+
function I() {
|
|
106
|
+
M(), h("close");
|
|
107
|
+
}
|
|
108
|
+
function J() {
|
|
109
|
+
h("download");
|
|
110
|
+
}
|
|
111
|
+
function A(t) {
|
|
112
|
+
return t.endsWith("xml") ? "application/xml" : t.endsWith("sql") ? "text/x-sql" : t.endsWith("vue") ? "text/x-vue" : t.endsWith("ts") ? "text/typescript" : "text/x-java";
|
|
113
|
+
}
|
|
114
|
+
function O(t, l) {
|
|
115
|
+
return F(this, null, function* () {
|
|
116
|
+
let n = l.node.dataRef;
|
|
117
|
+
if (n.isLeaf) {
|
|
118
|
+
let e = n.path;
|
|
119
|
+
r[e] || (yield K(e)), u.value = A(e), i.value = r[e];
|
|
120
|
+
}
|
|
121
|
+
});
|
|
122
|
+
}
|
|
123
|
+
function K(t) {
|
|
124
|
+
return new Promise((l) => {
|
|
125
|
+
let n = {
|
|
126
|
+
path: encodeURI(t),
|
|
127
|
+
pathKey: w.value
|
|
128
|
+
};
|
|
129
|
+
z.get({ url: "/online/cgform/api/codeView", params: n }, { isTransformResponse: !1 }).then((e) => {
|
|
130
|
+
if (!e || e.size === 0) {
|
|
131
|
+
$.warning("文件下载失败");
|
|
132
|
+
return;
|
|
133
|
+
} else if (e.message) {
|
|
134
|
+
$.warning(e.message);
|
|
135
|
+
return;
|
|
136
|
+
}
|
|
137
|
+
let d = new Blob([e]), a = new FileReader();
|
|
138
|
+
a.readAsText(d, "utf8"), a.onload = function() {
|
|
139
|
+
let c = this.result;
|
|
140
|
+
r[t] = c, l(1);
|
|
141
|
+
};
|
|
142
|
+
});
|
|
143
|
+
});
|
|
144
|
+
}
|
|
145
|
+
return {
|
|
146
|
+
registerModal: D,
|
|
147
|
+
codeList: s,
|
|
148
|
+
onDownloadGenerateCode: J,
|
|
149
|
+
handleClose: I,
|
|
150
|
+
treeData: m,
|
|
151
|
+
showCodeContent: O,
|
|
152
|
+
activeCodeContent: i,
|
|
153
|
+
expandStatus: _,
|
|
154
|
+
height: v,
|
|
155
|
+
language: u,
|
|
156
|
+
prefixCls: y,
|
|
157
|
+
modalHeight: 1e3
|
|
158
|
+
};
|
|
159
|
+
}
|
|
160
|
+
});
|
|
161
|
+
function ne(o, h, s, w, m, _) {
|
|
162
|
+
const v = f("info-circle-two-tone"), u = f("a-directory-tree"), i = f("a-col"), r = f("JCodeEditor"), D = f("a-empty"), M = f("a-row"), y = f("a-button"), T = f("BasicModal");
|
|
163
|
+
return k(), x(T, {
|
|
164
|
+
height: o.modalHeight,
|
|
165
|
+
onRegister: o.registerModal,
|
|
166
|
+
okText: "",
|
|
167
|
+
cancelText: "关闭",
|
|
168
|
+
width: 1200,
|
|
169
|
+
defaultFullscreen: !0,
|
|
170
|
+
canFullscreen: !1,
|
|
171
|
+
onOk: o.onDownloadGenerateCode,
|
|
172
|
+
wrapClassName: o.prefixCls
|
|
173
|
+
}, {
|
|
174
|
+
title: p(() => [
|
|
175
|
+
C(v),
|
|
176
|
+
V(" 代码在线预览 ")
|
|
177
|
+
]),
|
|
178
|
+
footer: p(() => [
|
|
179
|
+
C(y, { onClick: o.handleClose }, {
|
|
180
|
+
default: p(() => [
|
|
181
|
+
V("关闭")
|
|
182
|
+
]),
|
|
183
|
+
_: 1
|
|
184
|
+
}, 8, ["onClick"]),
|
|
185
|
+
C(y, {
|
|
186
|
+
type: "primary",
|
|
187
|
+
onClick: o.onDownloadGenerateCode
|
|
188
|
+
}, {
|
|
189
|
+
default: p(() => [
|
|
190
|
+
V("下载到本地")
|
|
191
|
+
]),
|
|
192
|
+
_: 1
|
|
193
|
+
}, 8, ["onClick"])
|
|
194
|
+
]),
|
|
195
|
+
default: p(() => [
|
|
196
|
+
W("div", null, [
|
|
197
|
+
C(M, null, {
|
|
198
|
+
default: p(() => [
|
|
199
|
+
C(i, {
|
|
200
|
+
span: 6,
|
|
201
|
+
gutter: 3,
|
|
202
|
+
style: { "border-right": "1px solid #eee" }
|
|
203
|
+
}, {
|
|
204
|
+
default: p(() => [
|
|
205
|
+
W("div", {
|
|
206
|
+
style: j({ height: o.height + "px", overflowY: "auto" })
|
|
207
|
+
}, [
|
|
208
|
+
o.treeData.length ? (k(), x(u, {
|
|
209
|
+
key: 0,
|
|
210
|
+
defaultExpandAll: !0,
|
|
211
|
+
"tree-data": o.treeData,
|
|
212
|
+
onSelect: o.showCodeContent
|
|
213
|
+
}, null, 8, ["tree-data", "onSelect"])) : q("", !0)
|
|
214
|
+
], 4)
|
|
215
|
+
]),
|
|
216
|
+
_: 1
|
|
217
|
+
}),
|
|
218
|
+
C(i, {
|
|
219
|
+
span: 18,
|
|
220
|
+
gutter: 3
|
|
221
|
+
}, {
|
|
222
|
+
default: p(() => [
|
|
223
|
+
o.activeCodeContent ? (k(), x(r, {
|
|
224
|
+
key: 0,
|
|
225
|
+
value: o.activeCodeContent,
|
|
226
|
+
"onUpdate:value": h[0] || (h[0] = (b) => o.activeCodeContent = b),
|
|
227
|
+
theme: "idea",
|
|
228
|
+
language: o.language,
|
|
229
|
+
fullScreen: !1,
|
|
230
|
+
lineNumbers: !0,
|
|
231
|
+
height: o.height + "px",
|
|
232
|
+
disabled: !0,
|
|
233
|
+
"language-change": !0
|
|
234
|
+
}, null, 8, ["value", "language", "height"])) : (k(), x(D, {
|
|
235
|
+
key: 1,
|
|
236
|
+
style: { "margin-top": "50px" },
|
|
237
|
+
description: "请选择左侧文件,显示详细代码"
|
|
238
|
+
}))
|
|
239
|
+
]),
|
|
240
|
+
_: 1
|
|
241
|
+
})
|
|
242
|
+
]),
|
|
243
|
+
_: 1
|
|
244
|
+
})
|
|
245
|
+
])
|
|
246
|
+
]),
|
|
247
|
+
_: 1
|
|
248
|
+
}, 8, ["height", "onRegister", "onOk", "wrapClassName"]);
|
|
249
|
+
}
|
|
250
|
+
const me = /* @__PURE__ */ ee(te, [["render", ne]]);
|
|
251
|
+
export {
|
|
252
|
+
me as default
|
|
253
|
+
};
|