@jeecg/online 3.7.0-beta → 3.7.4-beta
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AccountLoginForm-84cbd344.mjs +254 -0
- package/AiModal-26903538.mjs +84 -0
- package/AppForgetPassword-52443f23.mjs +310 -0
- package/AppLogin-ecf798fa.mjs +287 -0
- package/AppLoginHeader-4432c584.mjs +27 -0
- package/AppNameEmail-3303a037.mjs +180 -0
- package/AppRegister-79a62c59.mjs +303 -0
- package/AppTenant-f0bef7ca.mjs +373 -0
- package/AppThirdForm-fd8b4604.mjs +189 -0
- package/AuthButtonConfig-d5bffca0.mjs +156 -0
- package/AuthButtonTree-b0bd6c40.mjs +165 -0
- package/{AuthDataConfig-7bb0cd85.mjs → AuthDataConfig-d3b7afa4.mjs} +30 -29
- package/{AuthDataTree-6e3bb86f.mjs → AuthDataTree-f14a98d9.mjs} +47 -47
- package/AuthFieldConfig-f1e224cc.mjs +245 -0
- package/AuthFieldTree-5cc0da05.mjs +232 -0
- package/{AuthManagerDrawer-5e2ed5ce.mjs → AuthManagerDrawer-32556109.mjs} +9 -8
- package/{AuthSetterModal-6f74449c.mjs → AuthSetterModal-364f1f67.mjs} +12 -11
- package/BuiltInButtonList-bb6cf95c.mjs +10 -0
- package/BuiltInButtonList.vue_vue_type_script_setup_true_lang-07d0b7d0.mjs +338 -0
- package/CgformAddressModal-1131274c.mjs +260 -0
- package/CgformCopyList-5fba0810.mjs +252 -0
- package/CgformModal-c4a4e0c2.mjs +667 -0
- package/{CgreportModal-5a23d089.mjs → CgreportModal-8a84aae5.mjs} +186 -172
- package/{CheckDictTable-b5cb0e2b.mjs → CheckDictTable-8a938e3a.mjs} +37 -34
- package/CodeFileListModal-a924902a.mjs +159 -0
- package/CodeFileViewModal-405e2b58.mjs +253 -0
- package/CodeGeneratorModal-2e1dc13d.mjs +281 -0
- package/CustomButtonList-c453b654.mjs +274 -0
- package/{DBAttributeTable-95dc66c1.mjs → DBAttributeTable-1a45c7b7.mjs} +80 -72
- package/DbToOnlineModal-f28ff0a3.mjs +168 -0
- package/{DetailForm-4aa2570b.mjs → DetailForm-c592b8d8.mjs} +50 -49
- package/DropMenuItem-1e49abea.mjs +44 -0
- package/{EnhanceJavaModal-98934198.mjs → EnhanceJavaModal-d5a93f2a.mjs} +62 -62
- package/{EnhanceJsHistory-9c4acdaf.mjs → EnhanceJsHistory-8ddb0657.mjs} +35 -35
- package/{EnhanceJsModal-247f640d.mjs → EnhanceJsModal-dc4f9ade.mjs} +154 -138
- package/{EnhanceSqlModal-65b74b0f.mjs → EnhanceSqlModal-984f045d.mjs} +67 -67
- package/ErrorTip-bb616e32.mjs +7 -0
- package/ErrorTip.vue_vue_type_script_setup_true_lang-49d35987.mjs +60 -0
- package/{ExtendConfigModal-00f2fb55.mjs → ExtendConfigModal-7d70f362.mjs} +2 -2
- package/{FieldExtendJsonModal-cc7fce26.mjs → FieldExtendJsonModal-bf04d70e.mjs} +2 -2
- package/{FileSelectModal-38660e3c.mjs → FileSelectModal-ffc69d4a.mjs} +23 -23
- package/{ForeignKeyTable-a78cb5ad.mjs → ForeignKeyTable-92decaea.mjs} +3 -3
- package/{IndexTable-1b496559.mjs → IndexTable-2ded2014.mjs} +28 -20
- package/JModalTip-a927f85d.mjs +49 -0
- package/JOnlineSearchSelect-04ec87d0.mjs +128 -0
- package/{LeftDepart-8ade4bf7.mjs → LeftDepart-52cb6743.mjs} +1 -1
- package/LeftRole-b0e0b496.mjs +86 -0
- package/{LeftUser-b4d1372a.mjs → LeftUser-dd4b10e2.mjs} +30 -30
- package/{LinkTableConfigModal-a138c85e.mjs → LinkTableConfigModal-7eeb3e58.mjs} +43 -31
- package/{LinkTableFieldConfigModal-17b413b0.mjs → LinkTableFieldConfigModal-b078fcef.mjs} +1 -1
- package/{LinkTableListPiece-2660d709.mjs → LinkTableListPiece-e016b8e6.mjs} +1 -1
- package/{ModalFormDemo-0544737d.mjs → ModalFormDemo-aaa719a7.mjs} +1 -1
- package/OnlCgformErpList-5c5acdaa.mjs +488 -0
- package/OnlCgformErpSubTable-e1b88312.mjs +441 -0
- package/{OnlCgformInnerSubTable-290ace5d.mjs → OnlCgformInnerSubTable-6b6fa15a.mjs} +106 -107
- package/OnlCgformInnerTableList-b283a525.mjs +474 -0
- package/OnlCgformTabList-91e3dd78.mjs +424 -0
- package/OnlineAutoList-84475f1b.mjs +513 -0
- package/OnlineAutoModal-95f46901.mjs +260 -0
- package/OnlineAutoTreeList-20b9ce04.mjs +523 -0
- package/OnlineCustomModal-c8b1e780.mjs +232 -0
- package/{OnlineDetailModal-2a271e0b.mjs → OnlineDetailModal-5b412bb9.mjs} +74 -65
- package/OnlineForm-58282699.mjs +1012 -0
- package/{OnlineFormDetail-e036cd11.mjs → OnlineFormDetail-fc087725.mjs} +7 -7
- package/{OnlineFormUrlAdd-7fb3dcca.mjs → OnlineFormUrlAdd-bc9105bb.mjs} +10 -10
- package/{OnlineFormUrlDetail-b2292137.mjs → OnlineFormUrlDetail-ad912560.mjs} +12 -12
- package/{OnlineFormUrlEdit-44080fb3.mjs → OnlineFormUrlEdit-f2fa79ff.mjs} +10 -10
- package/OnlineFormUrlSuccess-76813d45.mjs +59 -0
- package/OnlineQueryForm-9248341f.mjs +484 -0
- package/{OnlineSearchFormItem-6feacae6.mjs → OnlineSearchFormItem-1e437bd3.mjs} +82 -82
- package/{OnlineSelectCascade-471fcc76.mjs → OnlineSelectCascade-d631ed72.mjs} +1 -1
- package/{OnlineSubFormDetail-03f8ee5c.mjs → OnlineSubFormDetail-8be879b9.mjs} +53 -54
- package/{OnlineTabAutoModal-7b9bcd0b.mjs → OnlineTabAutoModal-c9ca3c24.mjs} +108 -95
- package/{OnlineTabDetailModal-88143301.mjs → OnlineTabDetailModal-fd4c9a72.mjs} +36 -36
- package/OnlineTabForm-1940e88b.mjs +814 -0
- package/{OnlineTabFormDetail-bbf23caa.mjs → OnlineTabFormDetail-2aa67564.mjs} +17 -17
- package/{PageAttributeTable-6c23547b.mjs → PageAttributeTable-66e7b485.mjs} +169 -149
- package/PhoneLoginForm-86437a9d.mjs +214 -0
- package/{ProcessOnlineForm-b42198f5.mjs → ProcessOnlineForm-98ede18d.mjs} +64 -58
- package/{QueryTable-96b3dbd0.mjs → QueryTable-65d3f54f.mjs} +40 -37
- package/SetSwitchOptions-f914bc17.mjs +62 -0
- package/ShareAddView-657f0f8b.mjs +86 -0
- package/ShareEditView-1b945fd3.mjs +92 -0
- package/ShareView-222ed3d8.mjs +80 -0
- package/ShareView.vue_vue_type_script_setup_true_lang-44fbeaff.mjs +162 -0
- package/SingleView-23b0cb4e.mjs +68 -0
- package/SingleView.vue_vue_type_style_index_0_lang-e0f2f6c0.mjs +131 -0
- package/SuperQuery-46032e66.mjs +974 -0
- package/{SuperQueryValComponent-7ad86d4b.mjs → SuperQueryValComponent-5a9ccfd4.mjs} +1 -1
- package/{SuperQueryValComponent.vue_vue_type_script_lang-e9196096.mjs → SuperQueryValComponent.vue_vue_type_script_lang-8fe34917.mjs} +11 -11
- package/auth.api-53df4c33.mjs +41 -0
- package/{auth.data-22948e87.mjs → auth.data-626c5083.mjs} +68 -30
- package/button.data-fe45d43b.mjs +12 -0
- package/{cgform.data-475d4984.mjs → cgform.data-0ca62d09.mjs} +4 -1
- package/{enhance.data-3304d553.mjs → enhance.data-6601ff44.mjs} +9 -8
- package/index-19eaef11.mjs +11 -0
- package/index-1a2e8832.mjs +135 -0
- package/{index-581bef24.mjs → index-2fb8e07f.mjs} +59 -59
- package/index-5e89258d.mjs +8 -0
- package/index-9e1e1e53.mjs +57 -0
- package/{index-d2abb8a0.mjs → index-a039036e.mjs} +273 -262
- package/index-c5a79b0b.mjs +219 -0
- package/index-cce225be.mjs +110 -0
- package/index-f2c2d1cf.mjs +74 -0
- package/main.index.js +1 -1
- package/package.json +1 -1
- package/shareStore-7de6c7a6.mjs +67 -0
- package/style.css +1 -1
- package/useCgformList-f3cb9156.mjs +378 -0
- package/useExtendComponent-bb98e568.mjs +4460 -0
- package/useListButton-98908683.mjs +719 -0
- package/{useSchemas-47e45edc.mjs → useSchemas-b074f3a1.mjs} +88 -46
- package/useTableSync-075826a1.mjs +89 -0
- package/utils-9fce7606.mjs +16 -0
- package/AiModal-fe3988fb.mjs +0 -84
- package/AuthButtonConfig-d50a0a65.mjs +0 -134
- package/AuthButtonTree-589395ed.mjs +0 -156
- package/AuthFieldConfig-490fc0ab.mjs +0 -139
- package/AuthFieldTree-b7cd091e.mjs +0 -232
- package/CgformCopyList-8077ccc6.mjs +0 -250
- package/CgformModal-36faf29a.mjs +0 -621
- package/CodeFileListModal-0e26b7e0.mjs +0 -158
- package/CodeFileViewModal-9d4a5b5f.mjs +0 -248
- package/CodeGeneratorModal-b722d976.mjs +0 -238
- package/CustomButtonList-37639061.mjs +0 -381
- package/DbToOnlineModal-f49b9530.mjs +0 -166
- package/JModalTip-4a83aaed.mjs +0 -49
- package/JOnlineSearchSelect-34a37ec9.mjs +0 -95
- package/LeftRole-7d8c5acc.mjs +0 -86
- package/OnlCgformErpList-30e416c8.mjs +0 -470
- package/OnlCgformErpSubTable-9a876058.mjs +0 -427
- package/OnlCgformInnerTableList-f89b6687.mjs +0 -458
- package/OnlCgformTabList-7a2f2c03.mjs +0 -408
- package/OnlineAutoList-46c6c8b9.mjs +0 -493
- package/OnlineAutoModal-971bef13.mjs +0 -236
- package/OnlineAutoTreeList-3b92454c.mjs +0 -502
- package/OnlineCustomModal-594244f3.mjs +0 -232
- package/OnlineForm-018981b2.mjs +0 -924
- package/OnlineFormUrlSuccess-af285b02.mjs +0 -59
- package/OnlineQueryForm-998c12a4.mjs +0 -444
- package/OnlineTabForm-9ad7d29a.mjs +0 -805
- package/SetSwitchOptions-a452fa0f.mjs +0 -62
- package/SuperQuery-cbfba908.mjs +0 -975
- package/auth.api-d3a6c4b3.mjs +0 -39
- package/index-173949bb.mjs +0 -57
- package/useCgformList-8755a94e.mjs +0 -426
- package/useExtendComponent-bb7cca20.mjs +0 -4295
- package/useListButton-7ddb9a46.mjs +0 -697
- package/useTableSync-f6089e8a.mjs +0 -87
- /package/{OnlineForm.vue_vue_type_style_index_0_scoped_0f9f2964_lang-4ed993c7.mjs → OnlineForm.vue_vue_type_style_index_0_scoped_3f26e7bd_lang-4ed993c7.mjs} +0 -0
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
var D = Object.defineProperty, I = Object.defineProperties;
|
|
2
2
|
var M = Object.getOwnPropertyDescriptors;
|
|
3
|
-
var
|
|
3
|
+
var F = Object.getOwnPropertySymbols;
|
|
4
4
|
var O = Object.prototype.hasOwnProperty, P = Object.prototype.propertyIsEnumerable;
|
|
5
|
-
var
|
|
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
6
|
for (var a in t || (t = {}))
|
|
7
|
-
O.call(t, a) &&
|
|
8
|
-
if (
|
|
9
|
-
for (var a of
|
|
10
|
-
P.call(t, a) &&
|
|
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
11
|
return e;
|
|
12
|
-
},
|
|
13
|
-
import { defineComponent as S, ref as
|
|
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
14
|
import { JVxeTypes as n } from "/@/components/jeecg/JVxeTable/types";
|
|
15
|
-
import { u as K } from "./useTableSync-
|
|
15
|
+
import { u as K } from "./useTableSync-075826a1.mjs";
|
|
16
16
|
import { useMessage as G } from "/@/hooks/web/useMessage";
|
|
17
17
|
import { useJPrompt as L } from "/@/components/jeecg/JPrompt";
|
|
18
18
|
import { useDesign as Q } from "/@/hooks/web/useDesign";
|
|
19
|
-
import { _ as U } from "./index-
|
|
20
|
-
import "./cgform.data-
|
|
19
|
+
import { _ as U } from "./index-9e1e1e53.mjs";
|
|
20
|
+
import "./cgform.data-0ca62d09.mjs";
|
|
21
21
|
import "/@/utils/dict";
|
|
22
22
|
import "/@/utils/dict/JDictSelectUtil";
|
|
23
23
|
import "/@/utils/uuid";
|
|
@@ -30,7 +30,7 @@ const W = S({
|
|
|
30
30
|
VNodes: (e, { attrs: t }) => t.vnodes
|
|
31
31
|
},
|
|
32
32
|
setup() {
|
|
33
|
-
const { prefixCls: e } = Q("cgform-check-dict-table"), { createMessage: t } = G(), a =
|
|
33
|
+
const { prefixCls: e } = Q("cgform-check-dict-table"), { createMessage: t } = G(), a = E([
|
|
34
34
|
{ title: "字段名称", key: "dbFieldName", width: 100 },
|
|
35
35
|
{ title: "字段备注", key: "dbFieldTxt", width: 100 },
|
|
36
36
|
{
|
|
@@ -82,7 +82,7 @@ const W = S({
|
|
|
82
82
|
defaultValue: "",
|
|
83
83
|
validateRules: [{ handler: r }]
|
|
84
84
|
}
|
|
85
|
-
]), v = K(a), { tableRef:
|
|
85
|
+
]), v = K(a), { tableRef: k, tables: w } = v, p = E([
|
|
86
86
|
{ label: "空", value: "" },
|
|
87
87
|
{ label: "唯一校验", value: "only" },
|
|
88
88
|
{ label: "6到16位数字", value: "n6-16" },
|
|
@@ -126,7 +126,7 @@ const W = S({
|
|
|
126
126
|
return f(u) ? Promise.resolve() : Promise.reject("当前校验已存在");
|
|
127
127
|
}
|
|
128
128
|
function h(l) {
|
|
129
|
-
l.dbIsNull === "0" &&
|
|
129
|
+
l.dbIsNull === "0" && k.value.setValues([
|
|
130
130
|
{
|
|
131
131
|
rowKey: l.id,
|
|
132
132
|
values: { fieldMustInput: "1" }
|
|
@@ -134,10 +134,10 @@ const W = S({
|
|
|
134
134
|
]);
|
|
135
135
|
}
|
|
136
136
|
function r({ cellValue: l, row: u }, _) {
|
|
137
|
-
const { dbFieldName: A } = u, y =
|
|
137
|
+
const { dbFieldName: A } = u, y = w.pageTable.value.tableRef.getTableData(), C = y == null ? void 0 : y.find((B) => B.dbFieldName === A);
|
|
138
138
|
(C == null ? void 0 : C.fieldShowType) === "popup_dict" ? l.indexOf(",") == -1 ? _(!0) : _(!1, "popup字典组件只允许填写一个字段") : _(!0);
|
|
139
139
|
}
|
|
140
|
-
return x(
|
|
140
|
+
return R(x({}, v), {
|
|
141
141
|
prefixCls: e,
|
|
142
142
|
columns: a,
|
|
143
143
|
isCustomRegexp: f,
|
|
@@ -149,12 +149,12 @@ const W = S({
|
|
|
149
149
|
});
|
|
150
150
|
}
|
|
151
151
|
});
|
|
152
|
-
const X = {
|
|
152
|
+
const X = { class: "menu" }, Y = {
|
|
153
153
|
class: "custom-option-list rc-virtual-list-holder-inner",
|
|
154
154
|
style: { "border-top": "1px solid #dfdfdf" }
|
|
155
|
-
},
|
|
156
|
-
function
|
|
157
|
-
const p =
|
|
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
158
|
return H(), J(g, q({
|
|
159
159
|
ref: "tableRef",
|
|
160
160
|
rowNumber: "",
|
|
@@ -167,31 +167,34 @@ function Z(e, t, a, v, T, k) {
|
|
|
167
167
|
disabledRows: { dbFieldName: ["id", "has_child"] }
|
|
168
168
|
}, e.tableProps), {
|
|
169
169
|
fieldValidType: c((o) => [
|
|
170
|
-
|
|
170
|
+
i(b, {
|
|
171
171
|
type: "flex",
|
|
172
|
-
class:
|
|
172
|
+
class: N(["row-valid-type", { full: !e.isCustomRegexp(o.value) }])
|
|
173
173
|
}, {
|
|
174
174
|
default: c(() => [
|
|
175
|
-
|
|
176
|
-
class:
|
|
175
|
+
i(d, {
|
|
176
|
+
class: N(["left"])
|
|
177
177
|
}, {
|
|
178
178
|
default: c(() => [
|
|
179
|
-
|
|
179
|
+
i(m, {
|
|
180
180
|
value: o.value,
|
|
181
181
|
options: e.validTypeOptions,
|
|
182
182
|
placeholder: "空",
|
|
183
183
|
style: { width: "100%" },
|
|
184
|
-
onChange: o.triggerChange
|
|
184
|
+
onChange: o.triggerChange,
|
|
185
|
+
virtual: !1
|
|
185
186
|
}, {
|
|
186
187
|
dropdownRender: c(({ menuNode: h }) => [
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
188
|
+
T("div", X, [
|
|
189
|
+
i(p, { vnodes: h }, null, 8, ["vnodes"])
|
|
190
|
+
]),
|
|
191
|
+
z(T("div", Y, [
|
|
192
|
+
T("div", {
|
|
190
193
|
class: "ant-select-item ant-select-item-option",
|
|
191
194
|
title: "使用自定义正则表达式作为校验规则",
|
|
192
195
|
onClick: (r) => e.onAddCustomRegexp(o),
|
|
193
196
|
onMousedown: t[0] || (t[0] = (r) => r.preventDefault())
|
|
194
|
-
}, " 正则表达式 ", 40,
|
|
197
|
+
}, " 正则表达式 ", 40, Z)
|
|
195
198
|
], 512), [
|
|
196
199
|
[j, !e.isCustomRegexp(o.value)]
|
|
197
200
|
])
|
|
@@ -201,12 +204,12 @@ function Z(e, t, a, v, T, k) {
|
|
|
201
204
|
]),
|
|
202
205
|
_: 2
|
|
203
206
|
}, 1024),
|
|
204
|
-
|
|
207
|
+
i(d, {
|
|
205
208
|
class: "right",
|
|
206
209
|
title: "修改自定义正则表达式"
|
|
207
210
|
}, {
|
|
208
211
|
default: c(() => [
|
|
209
|
-
|
|
212
|
+
i(f, {
|
|
210
213
|
preIcon: "ant-design:edit",
|
|
211
214
|
onClick: () => e.onChangeCustomRegexp(o)
|
|
212
215
|
}, null, 8, ["onClick"])
|
|
@@ -220,7 +223,7 @@ function Z(e, t, a, v, T, k) {
|
|
|
220
223
|
_: 1
|
|
221
224
|
}, 16, ["class", "maxHeight", "loading", "columns", "dataSource"]);
|
|
222
225
|
}
|
|
223
|
-
const
|
|
226
|
+
const be = /* @__PURE__ */ U(W, [["render", ee], ["__scopeId", "data-v-272f2c52"]]);
|
|
224
227
|
export {
|
|
225
|
-
|
|
228
|
+
be as default
|
|
226
229
|
};
|
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
var h = (m, e, i) => new Promise((o, c) => {
|
|
2
|
+
var p = (n) => {
|
|
3
|
+
try {
|
|
4
|
+
t(i.next(n));
|
|
5
|
+
} catch (a) {
|
|
6
|
+
c(a);
|
|
7
|
+
}
|
|
8
|
+
}, r = (n) => {
|
|
9
|
+
try {
|
|
10
|
+
t(i.throw(n));
|
|
11
|
+
} catch (a) {
|
|
12
|
+
c(a);
|
|
13
|
+
}
|
|
14
|
+
}, t = (n) => n.done ? o(n.value) : Promise.resolve(n.value).then(p, r);
|
|
15
|
+
t((i = i.apply(m, e)).next());
|
|
16
|
+
});
|
|
17
|
+
import { ref as u, reactive as x, resolveComponent as g, openBlock as _, createElementBlock as v, Fragment as y, createVNode as s, withCtx as d, createTextVNode as f, createElementVNode as M, 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-405e2b58.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-9e1e1e53.mjs";
|
|
26
|
+
import "ant-design-vue";
|
|
27
|
+
import "/@/hooks/web/useDesign";
|
|
28
|
+
import "/@/components/jeecg/OnLine/JPopupOnlReport.vue";
|
|
29
|
+
import "vue-router";
|
|
30
|
+
const j = {
|
|
31
|
+
name: "CodeFileListModal",
|
|
32
|
+
components: {
|
|
33
|
+
BasicModal: T,
|
|
34
|
+
InfoCircleTwoTone: K,
|
|
35
|
+
CodeFileViewModal: S
|
|
36
|
+
},
|
|
37
|
+
emits: ["register"],
|
|
38
|
+
setup() {
|
|
39
|
+
const { createMessage: m } = H(), e = u([]), i = window.innerHeight - 150, o = x({
|
|
40
|
+
overflowY: "auto",
|
|
41
|
+
maxHeight: i + "px"
|
|
42
|
+
}), c = u(!1), p = u(""), r = u(""), [t, { closeModal: n }] = z((l) => h(this, null, function* () {
|
|
43
|
+
e.value = l.codeList, p.value = l.tableName, r.value = l.pathKey;
|
|
44
|
+
}));
|
|
45
|
+
function a() {
|
|
46
|
+
n();
|
|
47
|
+
}
|
|
48
|
+
function w() {
|
|
49
|
+
let l = e.value;
|
|
50
|
+
if (!l || l.length == 0) {
|
|
51
|
+
m.warning("无代码!");
|
|
52
|
+
return;
|
|
53
|
+
}
|
|
54
|
+
let V = l.join(",");
|
|
55
|
+
return R.post(
|
|
56
|
+
{
|
|
57
|
+
url: "/online/cgform/api/downGenerateCode",
|
|
58
|
+
params: {
|
|
59
|
+
fileList: encodeURI(V),
|
|
60
|
+
pathKey: r.value
|
|
61
|
+
},
|
|
62
|
+
responseType: "blob"
|
|
63
|
+
},
|
|
64
|
+
{ isTransformResponse: !1 }
|
|
65
|
+
).then((C) => {
|
|
66
|
+
if (!C || C.size == 0) {
|
|
67
|
+
m.warning("导出代码失败!");
|
|
68
|
+
return;
|
|
69
|
+
}
|
|
70
|
+
let b = "导到生成代码_" + p.value + "_" + (/* @__PURE__ */ new Date()).getTime() + ".zip";
|
|
71
|
+
I(C, b, "application/zip");
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
const [L, { openModal: k }] = G();
|
|
75
|
+
function D() {
|
|
76
|
+
let l = e.value;
|
|
77
|
+
k(!0, {
|
|
78
|
+
codeList: l,
|
|
79
|
+
pathKey: r.value
|
|
80
|
+
});
|
|
81
|
+
}
|
|
82
|
+
return {
|
|
83
|
+
registerModal: t,
|
|
84
|
+
registerCodeViewModal: L,
|
|
85
|
+
divStyle: o,
|
|
86
|
+
codeList: e,
|
|
87
|
+
onDownloadGenerateCode: w,
|
|
88
|
+
handleClose: a,
|
|
89
|
+
handleView: D,
|
|
90
|
+
loading: c
|
|
91
|
+
};
|
|
92
|
+
}
|
|
93
|
+
};
|
|
94
|
+
function U(m, e, i, o, c, p) {
|
|
95
|
+
const r = g("info-circle-two-tone"), t = g("a-button"), n = g("BasicModal"), a = g("code-file-view-modal");
|
|
96
|
+
return _(), v(y, null, [
|
|
97
|
+
s(n, {
|
|
98
|
+
onRegister: o.registerModal,
|
|
99
|
+
width: 1200,
|
|
100
|
+
defaultFullscreen: !1,
|
|
101
|
+
canFullscreen: !1
|
|
102
|
+
}, {
|
|
103
|
+
title: d(() => [
|
|
104
|
+
s(r),
|
|
105
|
+
e[0] || (e[0] = f(" 代码生成结果 "))
|
|
106
|
+
]),
|
|
107
|
+
footer: d(() => [
|
|
108
|
+
s(t, { onClick: o.handleClose }, {
|
|
109
|
+
default: d(() => e[2] || (e[2] = [
|
|
110
|
+
f("关闭")
|
|
111
|
+
])),
|
|
112
|
+
_: 1
|
|
113
|
+
}, 8, ["onClick"]),
|
|
114
|
+
s(t, {
|
|
115
|
+
type: "primary",
|
|
116
|
+
ghost: "",
|
|
117
|
+
onClick: o.handleView
|
|
118
|
+
}, {
|
|
119
|
+
default: d(() => e[3] || (e[3] = [
|
|
120
|
+
f("在线预览")
|
|
121
|
+
])),
|
|
122
|
+
_: 1
|
|
123
|
+
}, 8, ["onClick"]),
|
|
124
|
+
s(t, {
|
|
125
|
+
type: "primary",
|
|
126
|
+
onClick: o.onDownloadGenerateCode,
|
|
127
|
+
loading: o.loading
|
|
128
|
+
}, {
|
|
129
|
+
default: d(() => e[4] || (e[4] = [
|
|
130
|
+
f("下载到本地")
|
|
131
|
+
])),
|
|
132
|
+
_: 1
|
|
133
|
+
}, 8, ["onClick", "loading"])
|
|
134
|
+
]),
|
|
135
|
+
default: d(() => [
|
|
136
|
+
M("div", {
|
|
137
|
+
style: F(o.divStyle)
|
|
138
|
+
}, [
|
|
139
|
+
M("p", null, [
|
|
140
|
+
(_(!0), v(y, null, B(o.codeList, (w) => (_(), v(y, null, [
|
|
141
|
+
f(N(w), 1),
|
|
142
|
+
e[1] || (e[1] = M("br", null, null, -1))
|
|
143
|
+
], 64))), 256))
|
|
144
|
+
])
|
|
145
|
+
], 4)
|
|
146
|
+
]),
|
|
147
|
+
_: 1
|
|
148
|
+
}, 8, ["onRegister"]),
|
|
149
|
+
s(a, {
|
|
150
|
+
onRegister: o.registerCodeViewModal,
|
|
151
|
+
onDownload: o.onDownloadGenerateCode,
|
|
152
|
+
onClose: o.handleClose
|
|
153
|
+
}, null, 8, ["onRegister", "onDownload", "onClose"])
|
|
154
|
+
], 64);
|
|
155
|
+
}
|
|
156
|
+
const te = /* @__PURE__ */ E(j, [["render", U]]);
|
|
157
|
+
export {
|
|
158
|
+
te as default
|
|
159
|
+
};
|
|
@@ -0,0 +1,253 @@
|
|
|
1
|
+
var F = (o, r, u) => new Promise((w, g) => {
|
|
2
|
+
var v = (i) => {
|
|
3
|
+
try {
|
|
4
|
+
d(u.next(i));
|
|
5
|
+
} catch (s) {
|
|
6
|
+
g(s);
|
|
7
|
+
}
|
|
8
|
+
}, y = (i) => {
|
|
9
|
+
try {
|
|
10
|
+
d(u.throw(i));
|
|
11
|
+
} catch (s) {
|
|
12
|
+
g(s);
|
|
13
|
+
}
|
|
14
|
+
}, d = (i) => i.done ? w(i.value) : Promise.resolve(i.value).then(v, y);
|
|
15
|
+
d((u = u.apply(o, r)).next());
|
|
16
|
+
});
|
|
17
|
+
import { defineComponent as P, ref as h, reactive as H, resolveComponent as p, openBlock as k, createBlock as x, withCtx as m, createVNode as C, createTextVNode as V, createElementVNode as W, normalizeStyle as j, createCommentVNode as q } from "vue";
|
|
18
|
+
import { defHttp as z } from "/@/utils/http/axios";
|
|
19
|
+
import { BasicModal as U, useModalInner as Y } from "/@/components/Modal";
|
|
20
|
+
import { InfoCircleTwoTone as Q } from "@ant-design/icons-vue";
|
|
21
|
+
import { message as $ } from "ant-design-vue";
|
|
22
|
+
import { JCodeEditor as X } from "/@/components/Form";
|
|
23
|
+
import { useDesign as Z } from "/@/hooks/web/useDesign";
|
|
24
|
+
import { _ as ee } from "./index-9e1e1e53.mjs";
|
|
25
|
+
import "/@/components/jeecg/OnLine/JPopupOnlReport.vue";
|
|
26
|
+
import "/@/hooks/web/useMessage";
|
|
27
|
+
import "vue-router";
|
|
28
|
+
const te = P({
|
|
29
|
+
name: "CodeFileViewModal",
|
|
30
|
+
components: {
|
|
31
|
+
BasicModal: U,
|
|
32
|
+
InfoCircleTwoTone: Q,
|
|
33
|
+
JCodeEditor: X
|
|
34
|
+
},
|
|
35
|
+
emits: ["download", "register", "close"],
|
|
36
|
+
setup(o, { emit: r }) {
|
|
37
|
+
const u = h([]), w = h(""), g = h([]), v = h(!1), y = window.innerHeight - 142, d = h("java"), i = h("");
|
|
38
|
+
let s = H({});
|
|
39
|
+
const [D, { closeModal: M }] = Y((t) => F(this, null, function* () {
|
|
40
|
+
s = H({}), i.value = "", u.value = t.codeList, w.value = t.pathKey, T(), v.value = !0;
|
|
41
|
+
})), { prefixCls: _ } = Z("online-codeFileViewModal");
|
|
42
|
+
function T() {
|
|
43
|
+
let t = G(), l = t[0];
|
|
44
|
+
N(l, t);
|
|
45
|
+
let n = [];
|
|
46
|
+
const e = function(c) {
|
|
47
|
+
if (c.children) {
|
|
48
|
+
let a = c.children;
|
|
49
|
+
a.length == 1 ? e(a[0]) : a.length > 1 && n.push(c);
|
|
50
|
+
}
|
|
51
|
+
};
|
|
52
|
+
e(l), g.value = n, setTimeout(() => {
|
|
53
|
+
b(l);
|
|
54
|
+
}, 300);
|
|
55
|
+
}
|
|
56
|
+
function b(t) {
|
|
57
|
+
return F(this, null, function* () {
|
|
58
|
+
const l = function(e) {
|
|
59
|
+
if (e.isLeaf === !0)
|
|
60
|
+
return e;
|
|
61
|
+
if (e.children)
|
|
62
|
+
return l(e.children[0]);
|
|
63
|
+
};
|
|
64
|
+
let n = l(t);
|
|
65
|
+
if (n && n.isLeaf === !0) {
|
|
66
|
+
let e = n.path;
|
|
67
|
+
s[e] || (yield K(e)), d.value = A(e), i.value = s[e];
|
|
68
|
+
}
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
function N(t, l) {
|
|
72
|
+
for (let n of l)
|
|
73
|
+
t.key == n.pid && (t.children || (t.children = []), t.children.push(n), N(n, l));
|
|
74
|
+
}
|
|
75
|
+
function R(t, l) {
|
|
76
|
+
let n = 0, e = "";
|
|
77
|
+
for (; n <= l; )
|
|
78
|
+
e += t[n], n++;
|
|
79
|
+
return e;
|
|
80
|
+
}
|
|
81
|
+
function G() {
|
|
82
|
+
let t = [], l = [], n = u.value;
|
|
83
|
+
for (let e of n) {
|
|
84
|
+
let c = e.replace(new RegExp("\\\\", "g"), "/").replace("生成成功:", "").trim();
|
|
85
|
+
if (c) {
|
|
86
|
+
let a = c.split("/");
|
|
87
|
+
for (let f = 0; f < a.length; f++) {
|
|
88
|
+
let B = a[f], L = R(a, f);
|
|
89
|
+
if (B) {
|
|
90
|
+
let E = {
|
|
91
|
+
title: B,
|
|
92
|
+
key: L
|
|
93
|
+
};
|
|
94
|
+
if (B != 0) {
|
|
95
|
+
let S = R(a, f - 1);
|
|
96
|
+
S && (E.pid = S);
|
|
97
|
+
}
|
|
98
|
+
f == a.length - 1 && (E.isLeaf = !0, E.path = c), (l.indexOf(L) < 0 || f == a.length - 1) && (t.push(E), l.push(L));
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
return t;
|
|
104
|
+
}
|
|
105
|
+
function I() {
|
|
106
|
+
M(), r("close");
|
|
107
|
+
}
|
|
108
|
+
function J() {
|
|
109
|
+
r("download");
|
|
110
|
+
}
|
|
111
|
+
function A(t) {
|
|
112
|
+
return t.endsWith("xml") ? "application/xml" : t.endsWith("sql") ? "text/x-sql" : t.endsWith("vue") ? "text/x-vue" : t.endsWith("ts") ? "text/typescript" : "text/x-java";
|
|
113
|
+
}
|
|
114
|
+
function O(t, l) {
|
|
115
|
+
return F(this, null, function* () {
|
|
116
|
+
let n = l.node.dataRef;
|
|
117
|
+
if (n.isLeaf) {
|
|
118
|
+
let e = n.path;
|
|
119
|
+
s[e] || (yield K(e)), d.value = A(e), i.value = s[e];
|
|
120
|
+
}
|
|
121
|
+
});
|
|
122
|
+
}
|
|
123
|
+
function K(t) {
|
|
124
|
+
return new Promise((l) => {
|
|
125
|
+
let n = {
|
|
126
|
+
path: encodeURI(t),
|
|
127
|
+
pathKey: w.value
|
|
128
|
+
};
|
|
129
|
+
z.get({ url: "/online/cgform/api/codeView", params: n }, { isTransformResponse: !1 }).then((e) => {
|
|
130
|
+
if (!e || e.size === 0) {
|
|
131
|
+
$.warning("文件下载失败");
|
|
132
|
+
return;
|
|
133
|
+
} else if (e.message) {
|
|
134
|
+
$.warning(e.message);
|
|
135
|
+
return;
|
|
136
|
+
}
|
|
137
|
+
let c = new Blob([e]), a = new FileReader();
|
|
138
|
+
a.readAsText(c, "utf8"), a.onload = function() {
|
|
139
|
+
let f = this.result;
|
|
140
|
+
s[t] = f, l(1);
|
|
141
|
+
};
|
|
142
|
+
});
|
|
143
|
+
});
|
|
144
|
+
}
|
|
145
|
+
return {
|
|
146
|
+
registerModal: D,
|
|
147
|
+
codeList: u,
|
|
148
|
+
onDownloadGenerateCode: J,
|
|
149
|
+
handleClose: I,
|
|
150
|
+
treeData: g,
|
|
151
|
+
showCodeContent: O,
|
|
152
|
+
activeCodeContent: i,
|
|
153
|
+
expandStatus: v,
|
|
154
|
+
height: y,
|
|
155
|
+
language: d,
|
|
156
|
+
prefixCls: _,
|
|
157
|
+
modalHeight: 1e3
|
|
158
|
+
};
|
|
159
|
+
}
|
|
160
|
+
});
|
|
161
|
+
function ne(o, r, u, w, g, v) {
|
|
162
|
+
const y = p("info-circle-two-tone"), d = p("a-directory-tree"), i = p("a-col"), s = p("JCodeEditor"), D = p("a-empty"), M = p("a-row"), _ = p("a-button"), T = p("BasicModal");
|
|
163
|
+
return k(), x(T, {
|
|
164
|
+
height: o.modalHeight,
|
|
165
|
+
onRegister: o.registerModal,
|
|
166
|
+
okText: "",
|
|
167
|
+
cancelText: "关闭",
|
|
168
|
+
width: 1200,
|
|
169
|
+
defaultFullscreen: !0,
|
|
170
|
+
canFullscreen: !1,
|
|
171
|
+
onOk: o.onDownloadGenerateCode,
|
|
172
|
+
wrapClassName: o.prefixCls
|
|
173
|
+
}, {
|
|
174
|
+
title: m(() => [
|
|
175
|
+
C(y),
|
|
176
|
+
r[1] || (r[1] = V(" 代码在线预览 "))
|
|
177
|
+
]),
|
|
178
|
+
footer: m(() => [
|
|
179
|
+
C(_, { onClick: o.handleClose }, {
|
|
180
|
+
default: m(() => r[2] || (r[2] = [
|
|
181
|
+
V("关闭")
|
|
182
|
+
])),
|
|
183
|
+
_: 1
|
|
184
|
+
}, 8, ["onClick"]),
|
|
185
|
+
C(_, {
|
|
186
|
+
type: "primary",
|
|
187
|
+
onClick: o.onDownloadGenerateCode
|
|
188
|
+
}, {
|
|
189
|
+
default: m(() => r[3] || (r[3] = [
|
|
190
|
+
V("下载到本地")
|
|
191
|
+
])),
|
|
192
|
+
_: 1
|
|
193
|
+
}, 8, ["onClick"])
|
|
194
|
+
]),
|
|
195
|
+
default: m(() => [
|
|
196
|
+
W("div", null, [
|
|
197
|
+
C(M, null, {
|
|
198
|
+
default: m(() => [
|
|
199
|
+
C(i, {
|
|
200
|
+
span: 6,
|
|
201
|
+
gutter: 3,
|
|
202
|
+
style: { "border-right": "1px solid #eee" }
|
|
203
|
+
}, {
|
|
204
|
+
default: m(() => [
|
|
205
|
+
W("div", {
|
|
206
|
+
style: j({ height: o.height + "px", overflowY: "auto" })
|
|
207
|
+
}, [
|
|
208
|
+
o.treeData.length ? (k(), x(d, {
|
|
209
|
+
key: 0,
|
|
210
|
+
defaultExpandAll: !0,
|
|
211
|
+
"tree-data": o.treeData,
|
|
212
|
+
onSelect: o.showCodeContent
|
|
213
|
+
}, null, 8, ["tree-data", "onSelect"])) : q("", !0)
|
|
214
|
+
], 4)
|
|
215
|
+
]),
|
|
216
|
+
_: 1
|
|
217
|
+
}),
|
|
218
|
+
C(i, {
|
|
219
|
+
span: 18,
|
|
220
|
+
gutter: 3
|
|
221
|
+
}, {
|
|
222
|
+
default: m(() => [
|
|
223
|
+
o.activeCodeContent ? (k(), x(s, {
|
|
224
|
+
key: 0,
|
|
225
|
+
value: o.activeCodeContent,
|
|
226
|
+
"onUpdate:value": r[0] || (r[0] = (b) => o.activeCodeContent = b),
|
|
227
|
+
theme: "idea",
|
|
228
|
+
language: o.language,
|
|
229
|
+
fullScreen: !1,
|
|
230
|
+
lineNumbers: !0,
|
|
231
|
+
height: o.height + "px",
|
|
232
|
+
disabled: !0,
|
|
233
|
+
"language-change": !0
|
|
234
|
+
}, null, 8, ["value", "language", "height"])) : (k(), x(D, {
|
|
235
|
+
key: 1,
|
|
236
|
+
style: { "margin-top": "50px" },
|
|
237
|
+
description: "请选择左侧文件,显示详细代码"
|
|
238
|
+
}))
|
|
239
|
+
]),
|
|
240
|
+
_: 1
|
|
241
|
+
})
|
|
242
|
+
]),
|
|
243
|
+
_: 1
|
|
244
|
+
})
|
|
245
|
+
])
|
|
246
|
+
]),
|
|
247
|
+
_: 1
|
|
248
|
+
}, 8, ["height", "onRegister", "onOk", "wrapClassName"]);
|
|
249
|
+
}
|
|
250
|
+
const ge = /* @__PURE__ */ ee(te, [["render", ne]]);
|
|
251
|
+
export {
|
|
252
|
+
ge as default
|
|
253
|
+
};
|