@jeecg/online 3.7.1-RC → 3.7.4
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-d2fed52f.mjs +254 -0
- package/AiModal-fbe4b68a.mjs +84 -0
- package/AppForgetPassword-3b3bec82.mjs +310 -0
- package/AppLogin-cd2e2a87.mjs +287 -0
- package/AppLoginHeader-9b5be678.mjs +27 -0
- package/AppNameEmail-b4e32ae8.mjs +180 -0
- package/AppRegister-7117b66a.mjs +303 -0
- package/AppTenant-5817729b.mjs +373 -0
- package/AppThirdForm-d14fb5e5.mjs +189 -0
- package/AuthButtonConfig-5e3b6d72.mjs +156 -0
- package/AuthButtonTree-7b4ec967.mjs +165 -0
- package/{AuthDataConfig-5c3a8e6b.mjs → AuthDataConfig-48ee9228.mjs} +23 -23
- package/{AuthDataTree-dd7a1240.mjs → AuthDataTree-02b3ba05.mjs} +43 -43
- package/{AuthFieldConfig-9f6fa06c.mjs → AuthFieldConfig-562cc6b6.mjs} +71 -71
- package/AuthFieldTree-2d458c0c.mjs +232 -0
- package/{AuthManagerDrawer-76f15e8d.mjs → AuthManagerDrawer-38299230.mjs} +6 -6
- package/{AuthSetterModal-f5d2e87f.mjs → AuthSetterModal-78b06703.mjs} +9 -9
- package/BuiltInButtonList-bb6cf95c.mjs +10 -0
- package/BuiltInButtonList.vue_vue_type_script_setup_true_lang-07d0b7d0.mjs +338 -0
- package/CgformAddressModal-1b9cbe19.mjs +260 -0
- package/CgformCopyList-580bba0f.mjs +252 -0
- package/{CgformModal-21c5c387.mjs → CgformModal-12951453.mjs} +190 -194
- package/{CgreportModal-edefa8e3.mjs → CgreportModal-bfeb93ed.mjs} +181 -168
- package/{CheckDictTable-1bc8322d.mjs → CheckDictTable-3c1e59e0.mjs} +3 -3
- package/CodeFileListModal-71752603.mjs +159 -0
- package/{CodeFileViewModal-2fe911f4.mjs → CodeFileViewModal-eb803769.mjs} +66 -66
- package/CodeGeneratorModal-2fe1e920.mjs +281 -0
- package/CustomButtonList-22b5cdb3.mjs +274 -0
- package/{DBAttributeTable-285d40db.mjs → DBAttributeTable-eb25565c.mjs} +3 -3
- package/{DbToOnlineModal-5dcb67c3.mjs → DbToOnlineModal-049b4bbd.mjs} +53 -54
- package/{DetailForm-deecbf3d.mjs → DetailForm-c127c27f.mjs} +5 -5
- package/DropMenuItem-b1a8f47d.mjs +44 -0
- package/{EnhanceJavaModal-45c66cd5.mjs → EnhanceJavaModal-1a4d696b.mjs} +62 -62
- package/{EnhanceJsHistory-fab3102e.mjs → EnhanceJsHistory-48cf43ad.mjs} +35 -35
- package/{EnhanceJsModal-175357a1.mjs → EnhanceJsModal-0e1f15f8.mjs} +102 -102
- package/{EnhanceSqlModal-7ea1b300.mjs → EnhanceSqlModal-6a1aa471.mjs} +67 -67
- package/ErrorTip-bb616e32.mjs +7 -0
- package/ErrorTip.vue_vue_type_script_setup_true_lang-49d35987.mjs +60 -0
- package/{ExtendConfigModal-a89ae052.mjs → ExtendConfigModal-37af21a5.mjs} +2 -2
- package/{FieldExtendJsonModal-32135634.mjs → FieldExtendJsonModal-9441e08e.mjs} +2 -2
- package/{FileSelectModal-1643c8b9.mjs → FileSelectModal-04490919.mjs} +23 -23
- package/{ForeignKeyTable-7f7e28a7.mjs → ForeignKeyTable-06300a47.mjs} +3 -3
- package/{IndexTable-cdcc2b48.mjs → IndexTable-79bddd5c.mjs} +3 -3
- package/JModalTip-192fafa1.mjs +49 -0
- package/{JOnlineSearchSelect-22aae934.mjs → JOnlineSearchSelect-9abcf657.mjs} +1 -1
- package/{LeftDepart-d5615ed9.mjs → LeftDepart-35d78655.mjs} +1 -1
- package/LeftRole-9d88976d.mjs +86 -0
- package/{LeftUser-22baa378.mjs → LeftUser-04c89aea.mjs} +30 -30
- package/{LinkTableConfigModal-9242d750.mjs → LinkTableConfigModal-5f94ef13.mjs} +43 -31
- package/{LinkTableFieldConfigModal-24adc50c.mjs → LinkTableFieldConfigModal-40753de5.mjs} +1 -1
- package/{LinkTableListPiece-f3a8e0d7.mjs → LinkTableListPiece-179035c7.mjs} +1 -1
- package/{ModalFormDemo-711418db.mjs → ModalFormDemo-3a85920c.mjs} +1 -1
- package/OnlCgformErpList-8fd15fc1.mjs +488 -0
- package/OnlCgformErpSubTable-3515150b.mjs +441 -0
- package/{OnlCgformInnerSubTable-6c23781f.mjs → OnlCgformInnerSubTable-13e888c6.mjs} +38 -38
- package/OnlCgformInnerTableList-2e8f853c.mjs +474 -0
- package/OnlCgformTabList-583ac15f.mjs +424 -0
- package/OnlineAutoList-36ec0957.mjs +513 -0
- package/OnlineAutoModal-c0743caf.mjs +260 -0
- package/OnlineAutoTreeList-1cd718be.mjs +523 -0
- package/OnlineCustomModal-661ee850.mjs +232 -0
- package/{OnlineDetailModal-d5895734.mjs → OnlineDetailModal-785e848e.mjs} +74 -65
- package/OnlineForm-c1fb38eb.mjs +1012 -0
- package/{OnlineFormDetail-022ca117.mjs → OnlineFormDetail-50186870.mjs} +7 -7
- package/{OnlineFormUrlAdd-9715d70a.mjs → OnlineFormUrlAdd-905bf251.mjs} +9 -9
- package/{OnlineFormUrlDetail-8f864b1a.mjs → OnlineFormUrlDetail-a9dd2bfa.mjs} +11 -11
- package/{OnlineFormUrlEdit-ac985b36.mjs → OnlineFormUrlEdit-b8941f05.mjs} +9 -9
- package/OnlineFormUrlSuccess-ecaf6a21.mjs +59 -0
- package/OnlineQueryForm-ca6186a3.mjs +484 -0
- package/{OnlineSearchFormItem-6c557343.mjs → OnlineSearchFormItem-5c503a51.mjs} +82 -82
- package/{OnlineSelectCascade-05c40fef.mjs → OnlineSelectCascade-a3e686b3.mjs} +1 -1
- package/{OnlineSubFormDetail-58e896ce.mjs → OnlineSubFormDetail-be1ad3b9.mjs} +52 -53
- package/{OnlineTabAutoModal-47b18ad6.mjs → OnlineTabAutoModal-fb59b573.mjs} +108 -95
- package/{OnlineTabDetailModal-82de1465.mjs → OnlineTabDetailModal-4b9c4838.mjs} +36 -36
- package/OnlineTabForm-89389384.mjs +814 -0
- package/{OnlineTabFormDetail-8d0c40c0.mjs → OnlineTabFormDetail-72173ae4.mjs} +17 -17
- package/{PageAttributeTable-25e3b7da.mjs → PageAttributeTable-345b97fe.mjs} +108 -108
- package/PhoneLoginForm-8ca7e2d4.mjs +214 -0
- package/{ProcessOnlineForm-148632fe.mjs → ProcessOnlineForm-485b5679.mjs} +32 -32
- package/{QueryTable-f7bfca7f.mjs → QueryTable-f0a88d78.mjs} +3 -3
- package/SetSwitchOptions-cdcb22a1.mjs +62 -0
- package/ShareAddView-f713c0a5.mjs +86 -0
- package/ShareEditView-691764ad.mjs +92 -0
- package/ShareView-df344a8d.mjs +80 -0
- package/ShareView.vue_vue_type_script_setup_true_lang-560459c9.mjs +162 -0
- package/SingleView-ad0287d6.mjs +68 -0
- package/SingleView.vue_vue_type_style_index_0_lang-ce96670b.mjs +131 -0
- package/SuperQuery-2b293e3b.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-ea1d33d4.mjs → auth.api-53df4c33.mjs} +17 -17
- package/{auth.data-511e5197.mjs → auth.data-626c5083.mjs} +16 -12
- package/{cgform.data-475d4984.mjs → cgform.data-0ca62d09.mjs} +4 -1
- package/{enhance.data-a67572e1.mjs → enhance.data-6601ff44.mjs} +1 -1
- package/index-181f8344.mjs +219 -0
- package/index-19eaef11.mjs +11 -0
- package/{index-30e0e923.mjs → index-3c7392a4.mjs} +272 -262
- package/{index-f30613d1.mjs → index-3ccda826.mjs} +59 -59
- package/index-5e89258d.mjs +8 -0
- package/index-93341e02.mjs +110 -0
- package/index-bef7fe2d.mjs +74 -0
- package/index-d6f9ada7.mjs +135 -0
- package/index-f3683351.mjs +57 -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-13c8aab7.mjs +378 -0
- package/useExtendComponent-3f5734ca.mjs +4459 -0
- package/useListButton-ee23874a.mjs +719 -0
- package/{useSchemas-a9c75b0f.mjs → useSchemas-f1819e54.mjs} +72 -39
- package/{useTableSync-d7e9f18d.mjs → useTableSync-075826a1.mjs} +1 -1
- package/utils-9fce7606.mjs +16 -0
- package/AiModal-6de335e3.mjs +0 -84
- package/AuthButtonConfig-89763932.mjs +0 -154
- package/AuthButtonTree-2d87d0b3.mjs +0 -157
- package/AuthFieldTree-e326fc38.mjs +0 -232
- package/CgformCopyList-365b3e8f.mjs +0 -251
- package/CodeFileListModal-24601898.mjs +0 -159
- package/CodeGeneratorModal-f09fe903.mjs +0 -282
- package/CustomButtonList-f07bc695.mjs +0 -397
- package/JModalTip-b055ab60.mjs +0 -49
- package/LeftRole-2ed8a2bf.mjs +0 -86
- package/OnlCgformErpList-58acdfa0.mjs +0 -470
- package/OnlCgformErpSubTable-9b1e1938.mjs +0 -426
- package/OnlCgformInnerTableList-4b5e14ed.mjs +0 -458
- package/OnlCgformTabList-019ad753.mjs +0 -408
- package/OnlineAutoList-48589d09.mjs +0 -493
- package/OnlineAutoModal-c2928847.mjs +0 -239
- package/OnlineAutoTreeList-3baa1d00.mjs +0 -503
- package/OnlineCustomModal-9e17b6ce.mjs +0 -232
- package/OnlineForm-9f1153ba.mjs +0 -985
- package/OnlineFormUrlSuccess-3dfc54ab.mjs +0 -59
- package/OnlineQueryForm-eedb9a60.mjs +0 -466
- package/OnlineTabForm-27655c83.mjs +0 -817
- package/SetSwitchOptions-b2af757f.mjs +0 -62
- package/SuperQuery-a8592995.mjs +0 -967
- package/index-1d1a6e56.mjs +0 -57
- package/useCgformList-f41d4dc1.mjs +0 -426
- package/useExtendComponent-dcae5c78.mjs +0 -4399
- package/useListButton-bfac4ecf.mjs +0 -697
- /package/{OnlineForm.vue_vue_type_style_index_0_scoped_4657b304_lang-4ed993c7.mjs → OnlineForm.vue_vue_type_style_index_0_scoped_3f26e7bd_lang-4ed993c7.mjs} +0 -0
|
@@ -0,0 +1,281 @@
|
|
|
1
|
+
var E = (t, o, c) => new Promise((F, p) => {
|
|
2
|
+
var T = (n) => {
|
|
3
|
+
try {
|
|
4
|
+
l(c.next(n));
|
|
5
|
+
} catch (f) {
|
|
6
|
+
p(f);
|
|
7
|
+
}
|
|
8
|
+
}, d = (n) => {
|
|
9
|
+
try {
|
|
10
|
+
l(c.throw(n));
|
|
11
|
+
} catch (f) {
|
|
12
|
+
p(f);
|
|
13
|
+
}
|
|
14
|
+
}, l = (n) => n.done ? F(n.value) : Promise.resolve(n.value).then(T, d);
|
|
15
|
+
l((c = c.apply(t, o)).next());
|
|
16
|
+
});
|
|
17
|
+
import { defineComponent as ie, ref as M, computed as G, reactive as P, nextTick as ue, resolveComponent as i, openBlock as L, createElementBlock as me, Fragment as ce, createVNode as u, withCtx as r, createElementVNode as J, createTextVNode as V, createBlock as I, createCommentVNode as $, mergeProps as pe } from "vue";
|
|
18
|
+
import { defHttp as H } from "/@/utils/http/axios";
|
|
19
|
+
import { BasicForm as de, useForm as fe } from "/@/components/Form";
|
|
20
|
+
import { BasicModal as ge, useModalInner as Fe, useModal as U } from "/@/components/Modal";
|
|
21
|
+
import { JVxeTypes as R } from "/@/components/jeecg/JVxeTable/types";
|
|
22
|
+
import { b as be } from "./useSchemas-f1819e54.mjs";
|
|
23
|
+
import { underLine2CamelCase as q } from "/@/utils/common/compUtils";
|
|
24
|
+
import Ce from "./CodeFileListModal-71752603.mjs";
|
|
25
|
+
import _e from "./FileSelectModal-04490919.mjs";
|
|
26
|
+
import { message as ve } from "ant-design-vue";
|
|
27
|
+
import { useDesign as Me } from "/@/hooks/web/useDesign";
|
|
28
|
+
import { _ as Ne } from "./index-f3683351.mjs";
|
|
29
|
+
import "@ant-design/icons-vue";
|
|
30
|
+
import "/@/hooks/web/usePermission";
|
|
31
|
+
import "/@/utils/helper/validator";
|
|
32
|
+
import "./CodeFileViewModal-eb803769.mjs";
|
|
33
|
+
import "/@/components/jeecg/OnLine/JPopupOnlReport.vue";
|
|
34
|
+
import "/@/hooks/web/useMessage";
|
|
35
|
+
import "vue-router";
|
|
36
|
+
import "/@/utils/file/download";
|
|
37
|
+
const ye = ie({
|
|
38
|
+
name: "CodeGenerator",
|
|
39
|
+
components: { BasicForm: de, BasicModal: ge, FileSelectModal: _e, CodeFileListModal: Ce },
|
|
40
|
+
emits: ["register"],
|
|
41
|
+
setup(t) {
|
|
42
|
+
const o = "JEECG_ONL_PROJECT_PATH", c = "JEECG_ONL_PROJECT_NAME", F = M(!0), p = M(), T = G(() => F.value ? 800 : 1200), d = M("代码生成"), l = M(!1), { prefixCls: n } = Me("code-generator-modal"), f = n, N = M(""), h = P({
|
|
43
|
+
projectPath: "",
|
|
44
|
+
packageStyle: "service",
|
|
45
|
+
jspMode: "",
|
|
46
|
+
jformType: "1",
|
|
47
|
+
tableName_tmp: "",
|
|
48
|
+
ftlDescription: "",
|
|
49
|
+
entityName: "",
|
|
50
|
+
codeTypes: "controller,service,dao,mapper,entity,vue"
|
|
51
|
+
}), a = P({}), y = M([]), b = P({
|
|
52
|
+
dataSource: [],
|
|
53
|
+
columns: [
|
|
54
|
+
{
|
|
55
|
+
title: "子表名",
|
|
56
|
+
key: "tableName",
|
|
57
|
+
type: R.input,
|
|
58
|
+
disabled: !0,
|
|
59
|
+
validateRules: [{ required: !0, message: "请输入${title}" }]
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
title: "子表实体",
|
|
63
|
+
key: "entityName",
|
|
64
|
+
type: R.input,
|
|
65
|
+
validateRules: [{ required: !0, message: "请输入${title}" }]
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
title: "功能说明",
|
|
69
|
+
key: "ftlDescription",
|
|
70
|
+
type: R.input,
|
|
71
|
+
validateRules: [{ required: !0, message: "请输入${title}" }]
|
|
72
|
+
}
|
|
73
|
+
]
|
|
74
|
+
}), B = G(() => b.dataSource.length > 0), { formSchemas: C } = be(
|
|
75
|
+
t,
|
|
76
|
+
{
|
|
77
|
+
onProjectPathChange: se,
|
|
78
|
+
onProjectPathSearch: oe,
|
|
79
|
+
jspModeOptions: y
|
|
80
|
+
},
|
|
81
|
+
F
|
|
82
|
+
), [S, { resetFields: j, setFieldsValue: k, validate: K }] = fe({
|
|
83
|
+
schemas: C,
|
|
84
|
+
showActionButtonGroup: !1,
|
|
85
|
+
labelAlign: "right"
|
|
86
|
+
}), [x, { closeModal: O }] = Fe((e) => E(this, null, function* () {
|
|
87
|
+
yield j(), N.value = e.code, l.value = !1, b.dataSource = [], y.value = [], ne(), Object.assign(a, h), W();
|
|
88
|
+
}));
|
|
89
|
+
function W() {
|
|
90
|
+
return E(this, null, function* () {
|
|
91
|
+
let { main: e, sub: s, jspModeList: _, projectPath: m } = yield H.get({
|
|
92
|
+
url: "/online/cgform/head/tableInfo",
|
|
93
|
+
params: { code: N.value }
|
|
94
|
+
}), v = [];
|
|
95
|
+
for (let g of _) {
|
|
96
|
+
const { code: D, note: re } = g;
|
|
97
|
+
D == "many" || v.push({
|
|
98
|
+
label: re,
|
|
99
|
+
value: D
|
|
100
|
+
});
|
|
101
|
+
}
|
|
102
|
+
y.value = v, e.isTree == "Y" ? a.jspMode = "tree" : v.find((g) => g.value === e.themeTemplate) ? a.jspMode = e.themeTemplate : a.jspMode = v[0].value, F.value = e.tableType == 1, d.value = "代码生成【" + e.tableName + "】", a.projectPath || (a.projectPath = m, window.localStorage.setItem(o, m));
|
|
103
|
+
const w = localStorage.getItem(c);
|
|
104
|
+
w && (a.entityPackage = w), a.jformType = e.tableType + "", a.tableName_tmp = e.tableName, a.ftlDescription = e.tableTxt;
|
|
105
|
+
let A = q(e.tableName);
|
|
106
|
+
a.entityName = A.substring(0, 1).toUpperCase() + A.substring(1), yield ue(), k(a), s && s.length > 0 && (b.dataSource = s.map((g) => ({
|
|
107
|
+
tableName: g.tableName,
|
|
108
|
+
entityName: le(g.tableName),
|
|
109
|
+
ftlDescription: g.tableTxt
|
|
110
|
+
})));
|
|
111
|
+
});
|
|
112
|
+
}
|
|
113
|
+
const [z, { openModal: Y }] = U();
|
|
114
|
+
function Q() {
|
|
115
|
+
return E(this, null, function* () {
|
|
116
|
+
try {
|
|
117
|
+
const e = yield K();
|
|
118
|
+
let s = Object.assign({}, e, { code: N.value, tableName: e.tableName_tmp });
|
|
119
|
+
if (B.value) {
|
|
120
|
+
if (yield p.value.validateTable())
|
|
121
|
+
return;
|
|
122
|
+
s.subList = p.value.getTableData();
|
|
123
|
+
}
|
|
124
|
+
l.value = !0;
|
|
125
|
+
let _ = yield X(s);
|
|
126
|
+
Y(!0, {
|
|
127
|
+
codeList: _.codeList,
|
|
128
|
+
pathKey: _.pathKey,
|
|
129
|
+
tableName: e.tableName_tmp
|
|
130
|
+
}), O(), localStorage.setItem(c, e.entityPackage);
|
|
131
|
+
} catch (e) {
|
|
132
|
+
} finally {
|
|
133
|
+
l.value = !1;
|
|
134
|
+
}
|
|
135
|
+
});
|
|
136
|
+
}
|
|
137
|
+
function X(e) {
|
|
138
|
+
return new Promise((s, _) => {
|
|
139
|
+
H.post({ url: "/online/cgform/api/codeGenerate", params: e }, { isTransformResponse: !1 }).then((m) => {
|
|
140
|
+
if (m.success) {
|
|
141
|
+
let v = m.result, w = m.message;
|
|
142
|
+
s({
|
|
143
|
+
codeList: v,
|
|
144
|
+
pathKey: w
|
|
145
|
+
});
|
|
146
|
+
} else
|
|
147
|
+
ve.error(m.message), _(m.message);
|
|
148
|
+
});
|
|
149
|
+
});
|
|
150
|
+
}
|
|
151
|
+
function Z() {
|
|
152
|
+
O();
|
|
153
|
+
}
|
|
154
|
+
const [ee, te] = U();
|
|
155
|
+
function oe() {
|
|
156
|
+
te.openModal(!0, {});
|
|
157
|
+
}
|
|
158
|
+
function ae(e) {
|
|
159
|
+
window.localStorage.setItem(o, e), k({ projectPath: e });
|
|
160
|
+
}
|
|
161
|
+
function le(e) {
|
|
162
|
+
let s = q(e);
|
|
163
|
+
return s.substring(0, 1).toUpperCase() + s.substring(1);
|
|
164
|
+
}
|
|
165
|
+
function ne() {
|
|
166
|
+
let e = window.localStorage.getItem(o);
|
|
167
|
+
e && (h.projectPath = e);
|
|
168
|
+
}
|
|
169
|
+
function se(e) {
|
|
170
|
+
e.target.value && window.localStorage.setItem(o, e.target.value);
|
|
171
|
+
}
|
|
172
|
+
return {
|
|
173
|
+
title: d,
|
|
174
|
+
modalWidth: T,
|
|
175
|
+
confirmLoading: l,
|
|
176
|
+
subTable: b,
|
|
177
|
+
showSubTable: B,
|
|
178
|
+
onSubmit: Q,
|
|
179
|
+
onCancel: Z,
|
|
180
|
+
onFileSelect: ae,
|
|
181
|
+
registerFileSelectModal: ee,
|
|
182
|
+
subTableRef: p,
|
|
183
|
+
registerForm: S,
|
|
184
|
+
registerModal: x,
|
|
185
|
+
registerCodeFileListModal: z,
|
|
186
|
+
wrapClassName: f
|
|
187
|
+
};
|
|
188
|
+
}
|
|
189
|
+
});
|
|
190
|
+
function Te(t, o, c, F, p, T) {
|
|
191
|
+
const d = i("a-radio"), l = i("a-tooltip"), n = i("a-radio-group"), f = i("BasicForm"), N = i("JVxeTable"), h = i("a-card"), a = i("a-spin"), y = i("BasicModal"), b = i("FileSelectModal"), B = i("code-file-list-modal");
|
|
192
|
+
return L(), me(ce, null, [
|
|
193
|
+
u(y, {
|
|
194
|
+
onRegister: t.registerModal,
|
|
195
|
+
title: t.title,
|
|
196
|
+
width: t.modalWidth,
|
|
197
|
+
confirmLoading: t.confirmLoading,
|
|
198
|
+
okText: "开始生成",
|
|
199
|
+
cancelText: "取消",
|
|
200
|
+
onOk: t.onSubmit,
|
|
201
|
+
onCancel: t.onCancel,
|
|
202
|
+
wrapClassName: t.wrapClassName
|
|
203
|
+
}, {
|
|
204
|
+
default: r(() => [
|
|
205
|
+
u(a, { spinning: t.confirmLoading }, {
|
|
206
|
+
default: r(() => [
|
|
207
|
+
u(f, { onRegister: t.registerForm }, {
|
|
208
|
+
pageCode: r(({ model: C, field: S }) => [
|
|
209
|
+
u(n, {
|
|
210
|
+
value: C[S],
|
|
211
|
+
"onUpdate:value": (j) => C[S] = j
|
|
212
|
+
}, {
|
|
213
|
+
default: r(() => [
|
|
214
|
+
u(l, { placement: "top" }, {
|
|
215
|
+
title: r(() => o[0] || (o[0] = [
|
|
216
|
+
J("span", null, "深度封装表单,用户只需定义字段json即可渲染表单,优点简单便捷,缺点扩展有难度", -1)
|
|
217
|
+
])),
|
|
218
|
+
default: r(() => [
|
|
219
|
+
u(d, { value: "vue3" }, {
|
|
220
|
+
default: r(() => o[1] || (o[1] = [
|
|
221
|
+
V("封装表单(BasicForm)")
|
|
222
|
+
])),
|
|
223
|
+
_: 1
|
|
224
|
+
})
|
|
225
|
+
]),
|
|
226
|
+
_: 1
|
|
227
|
+
}),
|
|
228
|
+
u(l, { placement: "top" }, {
|
|
229
|
+
title: r(() => o[2] || (o[2] = [
|
|
230
|
+
J("span", null, "antd的原生表单,所有字段都需要硬编码,缺点编码繁琐,优点扩展容易", -1)
|
|
231
|
+
])),
|
|
232
|
+
default: r(() => [
|
|
233
|
+
C.jspMode == "innerTable" || C.jspMode == "tab" ? $("", !0) : (L(), I(d, {
|
|
234
|
+
key: 0,
|
|
235
|
+
value: "vue3Native"
|
|
236
|
+
}, {
|
|
237
|
+
default: r(() => o[3] || (o[3] = [
|
|
238
|
+
V("原生表单(a-form)")
|
|
239
|
+
])),
|
|
240
|
+
_: 1
|
|
241
|
+
}))
|
|
242
|
+
]),
|
|
243
|
+
_: 2
|
|
244
|
+
}, 1024)
|
|
245
|
+
]),
|
|
246
|
+
_: 2
|
|
247
|
+
}, 1032, ["value", "onUpdate:value"])
|
|
248
|
+
]),
|
|
249
|
+
_: 1
|
|
250
|
+
}, 8, ["onRegister"]),
|
|
251
|
+
t.showSubTable ? (L(), I(h, {
|
|
252
|
+
key: 0,
|
|
253
|
+
title: "子表信息",
|
|
254
|
+
size: "small"
|
|
255
|
+
}, {
|
|
256
|
+
default: r(() => [
|
|
257
|
+
u(N, pe({
|
|
258
|
+
ref: "subTableRef",
|
|
259
|
+
rowNumber: "",
|
|
260
|
+
maxHeight: 580
|
|
261
|
+
}, t.subTable), null, 16)
|
|
262
|
+
]),
|
|
263
|
+
_: 1
|
|
264
|
+
})) : $("", !0)
|
|
265
|
+
]),
|
|
266
|
+
_: 1
|
|
267
|
+
}, 8, ["spinning"])
|
|
268
|
+
]),
|
|
269
|
+
_: 1
|
|
270
|
+
}, 8, ["onRegister", "title", "width", "confirmLoading", "onOk", "onCancel", "wrapClassName"]),
|
|
271
|
+
u(b, {
|
|
272
|
+
onRegister: t.registerFileSelectModal,
|
|
273
|
+
onSelect: t.onFileSelect
|
|
274
|
+
}, null, 8, ["onRegister", "onSelect"]),
|
|
275
|
+
u(B, { onRegister: t.registerCodeFileListModal }, null, 8, ["onRegister"])
|
|
276
|
+
], 64);
|
|
277
|
+
}
|
|
278
|
+
const Ke = /* @__PURE__ */ Ne(ye, [["render", Te]]);
|
|
279
|
+
export {
|
|
280
|
+
Ke as default
|
|
281
|
+
};
|
|
@@ -0,0 +1,274 @@
|
|
|
1
|
+
var Y = Object.defineProperty;
|
|
2
|
+
var I = Object.getOwnPropertySymbols;
|
|
3
|
+
var Z = Object.prototype.hasOwnProperty, x = Object.prototype.propertyIsEnumerable;
|
|
4
|
+
var E = (o, e, t) => e in o ? Y(o, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : o[e] = t, L = (o, e) => {
|
|
5
|
+
for (var t in e || (e = {}))
|
|
6
|
+
Z.call(e, t) && E(o, t, e[t]);
|
|
7
|
+
if (I)
|
|
8
|
+
for (var t of I(e))
|
|
9
|
+
x.call(e, t) && E(o, t, e[t]);
|
|
10
|
+
return o;
|
|
11
|
+
};
|
|
12
|
+
var B = (o, e, t) => new Promise((C, g) => {
|
|
13
|
+
var M = (r) => {
|
|
14
|
+
try {
|
|
15
|
+
u(t.next(r));
|
|
16
|
+
} catch (c) {
|
|
17
|
+
g(c);
|
|
18
|
+
}
|
|
19
|
+
}, l = (r) => {
|
|
20
|
+
try {
|
|
21
|
+
u(t.throw(r));
|
|
22
|
+
} catch (c) {
|
|
23
|
+
g(c);
|
|
24
|
+
}
|
|
25
|
+
}, u = (r) => r.done ? C(r.value) : Promise.resolve(r.value).then(M, l);
|
|
26
|
+
u((t = t.apply(o, e)).next());
|
|
27
|
+
});
|
|
28
|
+
import { defineComponent as ee, ref as F, reactive as oe, computed as ne, nextTick as te, resolveComponent as i, openBlock as A, createElementBlock as O, Fragment as se, createVNode as s, withCtx as a, createTextVNode as f, createCommentVNode as P, createBlock as ae, normalizeProps as re, guardReactiveProps as ie } from "vue";
|
|
29
|
+
import { u as le } from "./useOnlineTest-e4bd8be3.mjs";
|
|
30
|
+
import { useListPage as ue } from "/@/hooks/system/useListPage";
|
|
31
|
+
import { BasicTable as ce, TableAction as de } from "/@/components/Table";
|
|
32
|
+
import { BasicModal as me, useModalInner as pe, useModal as S } from "/@/components/Modal";
|
|
33
|
+
import { BasicForm as fe, useForm as ge } from "/@/components/Form";
|
|
34
|
+
import { _ as Be, l as Ce, c as Me, f as _e, s as we, d as $ } from "./BuiltInButtonList.vue_vue_type_script_setup_true_lang-07d0b7d0.mjs";
|
|
35
|
+
import { useMessage as be } from "/@/hooks/web/useMessage";
|
|
36
|
+
import { _ as ke } from "./index-f3683351.mjs";
|
|
37
|
+
import "/@/utils/http/axios";
|
|
38
|
+
import "/@/components/jeecg/OnLine/JPopupOnlReport.vue";
|
|
39
|
+
import "vue-router";
|
|
40
|
+
const ye = ee({
|
|
41
|
+
name: "CustomButtonList",
|
|
42
|
+
components: { BasicModal: me, BasicTable: ce, TableAction: de, BasicForm: fe, BuiltInButtonList: Be },
|
|
43
|
+
emits: ["register"],
|
|
44
|
+
setup() {
|
|
45
|
+
const { createMessage: o } = be(), e = F(""), t = F(), { doRequest: C, doDeleteRecord: g, tableContext: M } = ue({
|
|
46
|
+
tableProps: {
|
|
47
|
+
api: (n) => Ce(e.value, n),
|
|
48
|
+
columns: Me,
|
|
49
|
+
canResize: !1,
|
|
50
|
+
useSearchForm: !1,
|
|
51
|
+
beforeFetch(n) {
|
|
52
|
+
return Object.assign(n, { column: "orderNum", order: "asc" });
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
}), [l, { reload: u }, { rowSelection: r, selectedRowKeys: c }] = M, [_, { closeModal: w }] = pe((n) => B(this, null, function* () {
|
|
56
|
+
e.value = n.row.id, t.value = n.row, u();
|
|
57
|
+
})), { aiTestMode: b, genButtons: k } = le(), [y, d] = S(), m = F(!1), p = oe({
|
|
58
|
+
onRegister: y,
|
|
59
|
+
title: ne(() => m != null && m.value ? "修改" : "新增"),
|
|
60
|
+
width: 800,
|
|
61
|
+
confirmLoading: !1,
|
|
62
|
+
onOk: K,
|
|
63
|
+
onCancel: d.closeModal
|
|
64
|
+
});
|
|
65
|
+
let v = {};
|
|
66
|
+
const [h, { resetFields: N, setFieldsValue: V, validate: G }] = ge({
|
|
67
|
+
// update-begin--author:liaozhiyang---date:20240618---for:【TV360X-1306】自定义按钮弹窗按钮样式切换是重置弹窗高度
|
|
68
|
+
schemas: _e({ redoModalHeight: d.redoModalHeight }),
|
|
69
|
+
// update-end--author:liaozhiyang---date:20240618---for:【TV360X-1306】自定义按钮弹窗按钮样式切换是重置弹窗高度
|
|
70
|
+
showActionButtonGroup: !1
|
|
71
|
+
});
|
|
72
|
+
function T(n) {
|
|
73
|
+
return B(this, null, function* () {
|
|
74
|
+
var D;
|
|
75
|
+
m.value = n.isUpdate, v = L({}, (D = n.record) != null ? D : {}), d.openModal(), yield te(), yield N(), V(v);
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
function H() {
|
|
79
|
+
T({ isUpdate: !1 });
|
|
80
|
+
}
|
|
81
|
+
function R(n) {
|
|
82
|
+
T({ isUpdate: !0, record: n });
|
|
83
|
+
}
|
|
84
|
+
function U() {
|
|
85
|
+
w();
|
|
86
|
+
}
|
|
87
|
+
function j() {
|
|
88
|
+
k(e.value);
|
|
89
|
+
}
|
|
90
|
+
function z() {
|
|
91
|
+
return B(this, null, function* () {
|
|
92
|
+
C(() => $(c.value));
|
|
93
|
+
});
|
|
94
|
+
}
|
|
95
|
+
function K() {
|
|
96
|
+
return B(this, null, function* () {
|
|
97
|
+
try {
|
|
98
|
+
p.confirmLoading = !0;
|
|
99
|
+
let n = yield G();
|
|
100
|
+
n = Object.assign({ cgformHeadId: e.value }, v, n), yield we(n, m.value), u(), d.closeModal();
|
|
101
|
+
} finally {
|
|
102
|
+
p.confirmLoading = !1;
|
|
103
|
+
}
|
|
104
|
+
});
|
|
105
|
+
}
|
|
106
|
+
const [q, J] = S();
|
|
107
|
+
function Q() {
|
|
108
|
+
var n;
|
|
109
|
+
if (((n = t.value) == null ? void 0 : n.tableType) == 3) {
|
|
110
|
+
o.warn("附表不支持管理内置按钮,请选择对应主表");
|
|
111
|
+
return;
|
|
112
|
+
}
|
|
113
|
+
J.openModal(!0, {});
|
|
114
|
+
}
|
|
115
|
+
function W(n) {
|
|
116
|
+
return [
|
|
117
|
+
{
|
|
118
|
+
label: "编辑",
|
|
119
|
+
onClick: () => R(n)
|
|
120
|
+
}
|
|
121
|
+
];
|
|
122
|
+
}
|
|
123
|
+
function X(n) {
|
|
124
|
+
return [
|
|
125
|
+
{
|
|
126
|
+
label: "删除",
|
|
127
|
+
popConfirm: {
|
|
128
|
+
title: "确定删除吗?",
|
|
129
|
+
placement: "left",
|
|
130
|
+
confirm: () => g(() => $([n.id]))
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
];
|
|
134
|
+
}
|
|
135
|
+
return {
|
|
136
|
+
code: e,
|
|
137
|
+
record: t,
|
|
138
|
+
onAdd: H,
|
|
139
|
+
onEdit: R,
|
|
140
|
+
onBatchDelete: z,
|
|
141
|
+
aiTestMode: b,
|
|
142
|
+
onGenButtons: j,
|
|
143
|
+
registerModal: _,
|
|
144
|
+
registerTable: l,
|
|
145
|
+
selectedRowKeys: c,
|
|
146
|
+
rowSelection: r,
|
|
147
|
+
onCancel: U,
|
|
148
|
+
getTableAction: W,
|
|
149
|
+
getDropDownAction: X,
|
|
150
|
+
registerForm: h,
|
|
151
|
+
formModalProps: p,
|
|
152
|
+
registerBIButtonModal: q,
|
|
153
|
+
onOpenBIButton: Q
|
|
154
|
+
};
|
|
155
|
+
}
|
|
156
|
+
}), ve = {
|
|
157
|
+
key: 0,
|
|
158
|
+
style: { float: "left" }
|
|
159
|
+
};
|
|
160
|
+
function Fe(o, e, t, C, g, M) {
|
|
161
|
+
const l = i("a-button"), u = i("a-icon"), r = i("a-menu-item"), c = i("a-menu"), _ = i("a-dropdown"), w = i("TableAction"), b = i("BasicTable"), k = i("BasicForm"), y = i("a-spin"), d = i("BasicModal"), m = i("BuiltInButtonList");
|
|
162
|
+
return A(), O(se, null, [
|
|
163
|
+
s(d, {
|
|
164
|
+
onRegister: o.registerModal,
|
|
165
|
+
title: "自定义按钮",
|
|
166
|
+
width: 1200,
|
|
167
|
+
defaultFullscreen: "",
|
|
168
|
+
onCancel: o.onCancel
|
|
169
|
+
}, {
|
|
170
|
+
footer: a(() => [
|
|
171
|
+
s(l, { onClick: o.onCancel }, {
|
|
172
|
+
default: a(() => e[0] || (e[0] = [
|
|
173
|
+
f("关闭")
|
|
174
|
+
])),
|
|
175
|
+
_: 1
|
|
176
|
+
}, 8, ["onClick"]),
|
|
177
|
+
o.aiTestMode ? (A(), O("div", ve, [
|
|
178
|
+
s(l, { onClick: o.onGenButtons }, {
|
|
179
|
+
default: a(() => e[1] || (e[1] = [
|
|
180
|
+
f("生成测试数据")
|
|
181
|
+
])),
|
|
182
|
+
_: 1
|
|
183
|
+
}, 8, ["onClick"])
|
|
184
|
+
])) : P("", !0)
|
|
185
|
+
]),
|
|
186
|
+
default: a(() => [
|
|
187
|
+
s(b, {
|
|
188
|
+
onRegister: o.registerTable,
|
|
189
|
+
rowSelection: o.rowSelection
|
|
190
|
+
}, {
|
|
191
|
+
tableTitle: a(() => [
|
|
192
|
+
s(l, {
|
|
193
|
+
onClick: o.onAdd,
|
|
194
|
+
type: "primary",
|
|
195
|
+
preIcon: "ant-design:plus"
|
|
196
|
+
}, {
|
|
197
|
+
default: a(() => e[2] || (e[2] = [
|
|
198
|
+
f("新增")
|
|
199
|
+
])),
|
|
200
|
+
_: 1
|
|
201
|
+
}, 8, ["onClick"]),
|
|
202
|
+
s(l, {
|
|
203
|
+
onClick: o.onOpenBIButton,
|
|
204
|
+
preIcon: "ant-design:setting"
|
|
205
|
+
}, {
|
|
206
|
+
default: a(() => e[3] || (e[3] = [
|
|
207
|
+
f("管理内置按钮")
|
|
208
|
+
])),
|
|
209
|
+
_: 1
|
|
210
|
+
}, 8, ["onClick"]),
|
|
211
|
+
o.selectedRowKeys.length > 0 ? (A(), ae(_, { key: 0 }, {
|
|
212
|
+
overlay: a(() => [
|
|
213
|
+
s(c, null, {
|
|
214
|
+
default: a(() => [
|
|
215
|
+
s(r, {
|
|
216
|
+
key: "1",
|
|
217
|
+
onClick: o.onBatchDelete
|
|
218
|
+
}, {
|
|
219
|
+
default: a(() => [
|
|
220
|
+
s(u, { type: "delete" }),
|
|
221
|
+
e[4] || (e[4] = f(" 删除 "))
|
|
222
|
+
]),
|
|
223
|
+
_: 1
|
|
224
|
+
}, 8, ["onClick"])
|
|
225
|
+
]),
|
|
226
|
+
_: 1
|
|
227
|
+
})
|
|
228
|
+
]),
|
|
229
|
+
default: a(() => [
|
|
230
|
+
s(l, { style: { "margin-left": "8px" } }, {
|
|
231
|
+
default: a(() => [
|
|
232
|
+
e[5] || (e[5] = f(" 批量操作 ")),
|
|
233
|
+
s(u, { type: "down" })
|
|
234
|
+
]),
|
|
235
|
+
_: 1
|
|
236
|
+
})
|
|
237
|
+
]),
|
|
238
|
+
_: 1
|
|
239
|
+
})) : P("", !0)
|
|
240
|
+
]),
|
|
241
|
+
action: a(({ record: p }) => [
|
|
242
|
+
s(w, {
|
|
243
|
+
actions: o.getTableAction(p),
|
|
244
|
+
dropDownActions: o.getDropDownAction(p)
|
|
245
|
+
}, null, 8, ["actions", "dropDownActions"])
|
|
246
|
+
]),
|
|
247
|
+
_: 1
|
|
248
|
+
}, 8, ["onRegister", "rowSelection"]),
|
|
249
|
+
s(d, re(ie(o.formModalProps)), {
|
|
250
|
+
default: a(() => [
|
|
251
|
+
s(y, {
|
|
252
|
+
spinning: o.formModalProps.confirmLoading
|
|
253
|
+
}, {
|
|
254
|
+
default: a(() => [
|
|
255
|
+
s(k, { onRegister: o.registerForm }, null, 8, ["onRegister"])
|
|
256
|
+
]),
|
|
257
|
+
_: 1
|
|
258
|
+
}, 8, ["spinning"])
|
|
259
|
+
]),
|
|
260
|
+
_: 1
|
|
261
|
+
}, 16)
|
|
262
|
+
]),
|
|
263
|
+
_: 1
|
|
264
|
+
}, 8, ["onRegister", "onCancel"]),
|
|
265
|
+
s(m, {
|
|
266
|
+
onRegister: o.registerBIButtonModal,
|
|
267
|
+
record: o.record
|
|
268
|
+
}, null, 8, ["onRegister", "record"])
|
|
269
|
+
], 64);
|
|
270
|
+
}
|
|
271
|
+
const Ve = /* @__PURE__ */ ke(ye, [["render", Fe]]);
|
|
272
|
+
export {
|
|
273
|
+
Ve as default
|
|
274
|
+
};
|
|
@@ -12,9 +12,9 @@ var c = (e, a, d) => a in e ? Y(e, a, { enumerable: !0, configurable: !0, writab
|
|
|
12
12
|
}, S = (e, a) => $(e, k(a));
|
|
13
13
|
import { defineComponent as X, getCurrentInstance as Q, ref as f, resolveComponent as q, openBlock as J, createBlock as Z, mergeProps as z } from "vue";
|
|
14
14
|
import { JVxeTypes as E } from "/@/components/jeecg/JVxeTable/types";
|
|
15
|
-
import { u as j } from "./useTableSync-
|
|
16
|
-
import { _ as ee } from "./index-
|
|
17
|
-
import "./cgform.data-
|
|
15
|
+
import { u as j } from "./useTableSync-075826a1.mjs";
|
|
16
|
+
import { _ as ee } from "./index-f3683351.mjs";
|
|
17
|
+
import "./cgform.data-0ca62d09.mjs";
|
|
18
18
|
import "/@/utils/dict";
|
|
19
19
|
import "/@/utils/dict/JDictSelectUtil";
|
|
20
20
|
import "/@/utils/uuid";
|