@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,282 @@
|
|
|
1
|
+
var E = (t, m, c) => new Promise((_, p) => {
|
|
2
|
+
var y = (l) => {
|
|
3
|
+
try {
|
|
4
|
+
a(c.next(l));
|
|
5
|
+
} catch (f) {
|
|
6
|
+
p(f);
|
|
7
|
+
}
|
|
8
|
+
}, d = (l) => {
|
|
9
|
+
try {
|
|
10
|
+
a(c.throw(l));
|
|
11
|
+
} catch (f) {
|
|
12
|
+
p(f);
|
|
13
|
+
}
|
|
14
|
+
}, a = (l) => l.done ? _(l.value) : Promise.resolve(l.value).then(y, d);
|
|
15
|
+
a((c = c.apply(t, m)).next());
|
|
16
|
+
});
|
|
17
|
+
import { defineComponent as ie, ref as h, computed as G, reactive as P, nextTick as ue, resolveComponent as r, openBlock as L, createElementBlock as ce, Fragment as me, createVNode as i, withCtx as s, createTextVNode as J, createBlock as V, createCommentVNode as I, mergeProps as pe, createElementVNode as q } from "vue";
|
|
18
|
+
import { defHttp as $ } from "/@/utils/http/axios";
|
|
19
|
+
import { BasicForm as de, useForm as fe } from "/@/components/Form";
|
|
20
|
+
import { BasicModal as ge, useModalInner as _e, useModal as H } from "/@/components/Modal";
|
|
21
|
+
import { JVxeTypes as R } from "/@/components/jeecg/JVxeTable/types";
|
|
22
|
+
import { b as Fe } from "./useSchemas-a9c75b0f.mjs";
|
|
23
|
+
import { underLine2CamelCase as U } from "/@/utils/common/compUtils";
|
|
24
|
+
import be from "./CodeFileListModal-24601898.mjs";
|
|
25
|
+
import Ce from "./FileSelectModal-1643c8b9.mjs";
|
|
26
|
+
import { message as ve } from "ant-design-vue";
|
|
27
|
+
import { useDesign as he } from "/@/hooks/web/useDesign";
|
|
28
|
+
import { _ as Me } from "./index-1d1a6e56.mjs";
|
|
29
|
+
import "@ant-design/icons-vue";
|
|
30
|
+
import "/@/hooks/web/usePermission";
|
|
31
|
+
import "/@/utils/helper/validator";
|
|
32
|
+
import "./CodeFileViewModal-2fe911f4.mjs";
|
|
33
|
+
import "/@/components/jeecg/OnLine/JPopupOnlReport.vue";
|
|
34
|
+
import "/@/hooks/web/useMessage";
|
|
35
|
+
import "vue-router";
|
|
36
|
+
import "/@/utils/file/download";
|
|
37
|
+
const Ne = ie({
|
|
38
|
+
name: "CodeGenerator",
|
|
39
|
+
components: { BasicForm: de, BasicModal: ge, FileSelectModal: Ce, CodeFileListModal: be },
|
|
40
|
+
emits: ["register"],
|
|
41
|
+
setup(t) {
|
|
42
|
+
const m = "JEECG_ONL_PROJECT_PATH", c = "JEECG_ONL_PROJECT_NAME", _ = h(!0), p = h(), y = G(() => _.value ? 800 : 1200), d = h("代码生成"), a = h(!1), { prefixCls: l } = he("code-generator-modal"), f = l, M = h(""), T = 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
|
+
}), o = P({}), N = h([]), F = 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(() => F.dataSource.length > 0), { formSchemas: b } = Fe(
|
|
75
|
+
t,
|
|
76
|
+
{
|
|
77
|
+
onProjectPathChange: se,
|
|
78
|
+
onProjectPathSearch: oe,
|
|
79
|
+
jspModeOptions: N
|
|
80
|
+
},
|
|
81
|
+
_
|
|
82
|
+
), [S, { resetFields: j, setFieldsValue: k, validate: K }] = fe({
|
|
83
|
+
schemas: b,
|
|
84
|
+
showActionButtonGroup: !1,
|
|
85
|
+
labelAlign: "right"
|
|
86
|
+
}), [x, { closeModal: O }] = _e((e) => E(this, null, function* () {
|
|
87
|
+
yield j(), M.value = e.code, a.value = !1, F.dataSource = [], N.value = [], ne(), Object.assign(o, T), W();
|
|
88
|
+
}));
|
|
89
|
+
function W() {
|
|
90
|
+
return E(this, null, function* () {
|
|
91
|
+
let { main: e, sub: n, jspModeList: C, projectPath: u } = yield $.get({
|
|
92
|
+
url: "/online/cgform/head/tableInfo",
|
|
93
|
+
params: { code: M.value }
|
|
94
|
+
}), v = [];
|
|
95
|
+
for (let g of C) {
|
|
96
|
+
const { code: D, note: re } = g;
|
|
97
|
+
D == "many" || v.push({
|
|
98
|
+
label: re,
|
|
99
|
+
value: D
|
|
100
|
+
});
|
|
101
|
+
}
|
|
102
|
+
N.value = v, e.isTree == "Y" ? o.jspMode = "tree" : v.find((g) => g.value === e.themeTemplate) ? o.jspMode = e.themeTemplate : o.jspMode = v[0].value, _.value = e.tableType == 1, d.value = "代码生成【" + e.tableName + "】", o.projectPath || (o.projectPath = u, window.localStorage.setItem(m, u));
|
|
103
|
+
const w = localStorage.getItem(c);
|
|
104
|
+
w && (o.entityPackage = w), o.jformType = e.tableType + "", o.tableName_tmp = e.tableName, o.ftlDescription = e.tableTxt;
|
|
105
|
+
let A = U(e.tableName);
|
|
106
|
+
o.entityName = A.substring(0, 1).toUpperCase() + A.substring(1), yield ue(), k(o), n && n.length > 0 && (F.dataSource = n.map((g) => ({
|
|
107
|
+
tableName: g.tableName,
|
|
108
|
+
entityName: le(g.tableName),
|
|
109
|
+
ftlDescription: g.tableTxt
|
|
110
|
+
})));
|
|
111
|
+
});
|
|
112
|
+
}
|
|
113
|
+
const [z, { openModal: Y }] = H();
|
|
114
|
+
function Q() {
|
|
115
|
+
return E(this, null, function* () {
|
|
116
|
+
try {
|
|
117
|
+
const e = yield K();
|
|
118
|
+
let n = Object.assign({}, e, { code: M.value, tableName: e.tableName_tmp });
|
|
119
|
+
if (B.value) {
|
|
120
|
+
if (yield p.value.validateTable())
|
|
121
|
+
return;
|
|
122
|
+
n.subList = p.value.getTableData();
|
|
123
|
+
}
|
|
124
|
+
a.value = !0;
|
|
125
|
+
let C = yield X(n);
|
|
126
|
+
Y(!0, {
|
|
127
|
+
codeList: C.codeList,
|
|
128
|
+
pathKey: C.pathKey,
|
|
129
|
+
tableName: e.tableName_tmp
|
|
130
|
+
}), O(), localStorage.setItem(c, e.entityPackage);
|
|
131
|
+
} catch (e) {
|
|
132
|
+
} finally {
|
|
133
|
+
a.value = !1;
|
|
134
|
+
}
|
|
135
|
+
});
|
|
136
|
+
}
|
|
137
|
+
function X(e) {
|
|
138
|
+
return new Promise((n, C) => {
|
|
139
|
+
$.post({ url: "/online/cgform/api/codeGenerate", params: e }, { isTransformResponse: !1 }).then((u) => {
|
|
140
|
+
if (u.success) {
|
|
141
|
+
let v = u.result, w = u.message;
|
|
142
|
+
n({
|
|
143
|
+
codeList: v,
|
|
144
|
+
pathKey: w
|
|
145
|
+
});
|
|
146
|
+
} else
|
|
147
|
+
ve.error(u.message), C(u.message);
|
|
148
|
+
});
|
|
149
|
+
});
|
|
150
|
+
}
|
|
151
|
+
function Z() {
|
|
152
|
+
O();
|
|
153
|
+
}
|
|
154
|
+
const [ee, te] = H();
|
|
155
|
+
function oe() {
|
|
156
|
+
te.openModal(!0, {});
|
|
157
|
+
}
|
|
158
|
+
function ae(e) {
|
|
159
|
+
window.localStorage.setItem(m, e), k({ projectPath: e });
|
|
160
|
+
}
|
|
161
|
+
function le(e) {
|
|
162
|
+
let n = U(e);
|
|
163
|
+
return n.substring(0, 1).toUpperCase() + n.substring(1);
|
|
164
|
+
}
|
|
165
|
+
function ne() {
|
|
166
|
+
let e = window.localStorage.getItem(m);
|
|
167
|
+
e && (T.projectPath = e);
|
|
168
|
+
}
|
|
169
|
+
function se(e) {
|
|
170
|
+
e.target.value && window.localStorage.setItem(m, e.target.value);
|
|
171
|
+
}
|
|
172
|
+
return {
|
|
173
|
+
title: d,
|
|
174
|
+
modalWidth: y,
|
|
175
|
+
confirmLoading: a,
|
|
176
|
+
subTable: F,
|
|
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
|
+
const ye = /* @__PURE__ */ q("span", null, "深度封装表单,用户只需定义字段json即可渲染表单,优点简单便捷,缺点扩展有难度", -1), Te = /* @__PURE__ */ q("span", null, "antd的原生表单,所有字段都需要硬编码,缺点编码繁琐,优点扩展容易", -1);
|
|
191
|
+
function Be(t, m, c, _, p, y) {
|
|
192
|
+
const d = r("a-radio"), a = r("a-tooltip"), l = r("a-radio-group"), f = r("BasicForm"), M = r("JVxeTable"), T = r("a-card"), o = r("a-spin"), N = r("BasicModal"), F = r("FileSelectModal"), B = r("code-file-list-modal");
|
|
193
|
+
return L(), ce(me, null, [
|
|
194
|
+
i(N, {
|
|
195
|
+
onRegister: t.registerModal,
|
|
196
|
+
title: t.title,
|
|
197
|
+
width: t.modalWidth,
|
|
198
|
+
confirmLoading: t.confirmLoading,
|
|
199
|
+
okText: "开始生成",
|
|
200
|
+
cancelText: "取消",
|
|
201
|
+
onOk: t.onSubmit,
|
|
202
|
+
onCancel: t.onCancel,
|
|
203
|
+
wrapClassName: t.wrapClassName
|
|
204
|
+
}, {
|
|
205
|
+
default: s(() => [
|
|
206
|
+
i(o, { spinning: t.confirmLoading }, {
|
|
207
|
+
default: s(() => [
|
|
208
|
+
i(f, { onRegister: t.registerForm }, {
|
|
209
|
+
pageCode: s(({ model: b, field: S }) => [
|
|
210
|
+
i(l, {
|
|
211
|
+
value: b[S],
|
|
212
|
+
"onUpdate:value": (j) => b[S] = j
|
|
213
|
+
}, {
|
|
214
|
+
default: s(() => [
|
|
215
|
+
i(a, { placement: "top" }, {
|
|
216
|
+
title: s(() => [
|
|
217
|
+
ye
|
|
218
|
+
]),
|
|
219
|
+
default: s(() => [
|
|
220
|
+
i(d, { value: "vue3" }, {
|
|
221
|
+
default: s(() => [
|
|
222
|
+
J("封装表单(BasicForm)")
|
|
223
|
+
]),
|
|
224
|
+
_: 1
|
|
225
|
+
})
|
|
226
|
+
]),
|
|
227
|
+
_: 1
|
|
228
|
+
}),
|
|
229
|
+
i(a, { placement: "top" }, {
|
|
230
|
+
title: s(() => [
|
|
231
|
+
Te
|
|
232
|
+
]),
|
|
233
|
+
default: s(() => [
|
|
234
|
+
b.jspMode == "innerTable" || b.jspMode == "tab" ? I("", !0) : (L(), V(d, {
|
|
235
|
+
key: 0,
|
|
236
|
+
value: "vue3Native"
|
|
237
|
+
}, {
|
|
238
|
+
default: s(() => [
|
|
239
|
+
J("原生表单(a-form)")
|
|
240
|
+
]),
|
|
241
|
+
_: 1
|
|
242
|
+
}))
|
|
243
|
+
]),
|
|
244
|
+
_: 2
|
|
245
|
+
}, 1024)
|
|
246
|
+
]),
|
|
247
|
+
_: 2
|
|
248
|
+
}, 1032, ["value", "onUpdate:value"])
|
|
249
|
+
]),
|
|
250
|
+
_: 1
|
|
251
|
+
}, 8, ["onRegister"]),
|
|
252
|
+
t.showSubTable ? (L(), V(T, {
|
|
253
|
+
key: 0,
|
|
254
|
+
title: "子表信息",
|
|
255
|
+
size: "small"
|
|
256
|
+
}, {
|
|
257
|
+
default: s(() => [
|
|
258
|
+
i(M, pe({
|
|
259
|
+
ref: "subTableRef",
|
|
260
|
+
rowNumber: "",
|
|
261
|
+
maxHeight: 580
|
|
262
|
+
}, t.subTable), null, 16)
|
|
263
|
+
]),
|
|
264
|
+
_: 1
|
|
265
|
+
})) : I("", !0)
|
|
266
|
+
]),
|
|
267
|
+
_: 1
|
|
268
|
+
}, 8, ["spinning"])
|
|
269
|
+
]),
|
|
270
|
+
_: 1
|
|
271
|
+
}, 8, ["onRegister", "title", "width", "confirmLoading", "onOk", "onCancel", "wrapClassName"]),
|
|
272
|
+
i(F, {
|
|
273
|
+
onRegister: t.registerFileSelectModal,
|
|
274
|
+
onSelect: t.onFileSelect
|
|
275
|
+
}, null, 8, ["onRegister", "onSelect"]),
|
|
276
|
+
i(B, { onRegister: t.registerCodeFileListModal }, null, 8, ["onRegister"])
|
|
277
|
+
], 64);
|
|
278
|
+
}
|
|
279
|
+
const We = /* @__PURE__ */ Me(Ne, [["render", Be]]);
|
|
280
|
+
export {
|
|
281
|
+
We as default
|
|
282
|
+
};
|
|
@@ -0,0 +1,397 @@
|
|
|
1
|
+
var U = Object.defineProperty;
|
|
2
|
+
var P = Object.getOwnPropertySymbols;
|
|
3
|
+
var K = Object.prototype.hasOwnProperty, Z = Object.prototype.propertyIsEnumerable;
|
|
4
|
+
var T = (e, o, t) => o in e ? U(e, o, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[o] = t, A = (e, o) => {
|
|
5
|
+
for (var t in o || (o = {}))
|
|
6
|
+
K.call(o, t) && T(e, t, o[t]);
|
|
7
|
+
if (P)
|
|
8
|
+
for (var t of P(o))
|
|
9
|
+
Z.call(o, t) && T(e, t, o[t]);
|
|
10
|
+
return e;
|
|
11
|
+
};
|
|
12
|
+
var C = (e, o, t) => new Promise((c, s) => {
|
|
13
|
+
var m = (r) => {
|
|
14
|
+
try {
|
|
15
|
+
u(t.next(r));
|
|
16
|
+
} catch (p) {
|
|
17
|
+
s(p);
|
|
18
|
+
}
|
|
19
|
+
}, d = (r) => {
|
|
20
|
+
try {
|
|
21
|
+
u(t.throw(r));
|
|
22
|
+
} catch (p) {
|
|
23
|
+
s(p);
|
|
24
|
+
}
|
|
25
|
+
}, u = (r) => r.done ? c(r.value) : Promise.resolve(r.value).then(m, d);
|
|
26
|
+
u((t = t.apply(e, o)).next());
|
|
27
|
+
});
|
|
28
|
+
import { defineComponent as J, ref as I, reactive as Q, computed as W, nextTick as X, resolveComponent as i, openBlock as k, createBlock as R, withCtx as l, createVNode as a, createTextVNode as w, createElementBlock as Y, createCommentVNode as F, normalizeProps as ee, guardReactiveProps as oe } from "vue";
|
|
29
|
+
import { u as te } from "./useOnlineTest-e4bd8be3.mjs";
|
|
30
|
+
import { useListPage as ne } from "/@/hooks/system/useListPage";
|
|
31
|
+
import { BasicTable as le, TableAction as ae } from "/@/components/Table";
|
|
32
|
+
import { BasicModal as re, useModalInner as ie, useModal as se } from "/@/components/Modal";
|
|
33
|
+
import { BasicForm as ue, useForm as ce } from "/@/components/Form";
|
|
34
|
+
import { defHttp as y } from "/@/utils/http/axios";
|
|
35
|
+
import { _ as de } from "./index-1d1a6e56.mjs";
|
|
36
|
+
import "/@/components/jeecg/OnLine/JPopupOnlReport.vue";
|
|
37
|
+
import "/@/hooks/web/useMessage";
|
|
38
|
+
import "vue-router";
|
|
39
|
+
const me = (e, o) => y.get({ url: "/online/cgform/button/list/" + e, params: o });
|
|
40
|
+
function D(e) {
|
|
41
|
+
return y.delete(
|
|
42
|
+
{
|
|
43
|
+
url: "/online/cgform/button/deleteBatch",
|
|
44
|
+
params: {
|
|
45
|
+
ids: e.join(",")
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
{ joinParamsToUrl: !0 }
|
|
49
|
+
);
|
|
50
|
+
}
|
|
51
|
+
const pe = (e, o) => o ? y.put({ url: "/online/cgform/button/edit", params: e }) : y.post({ url: "/online/cgform/button/add", params: e }), fe = [
|
|
52
|
+
{ title: "按钮编码", align: "center", dataIndex: "buttonCode" },
|
|
53
|
+
{ title: "按钮名称", align: "center", dataIndex: "buttonName" },
|
|
54
|
+
{
|
|
55
|
+
title: "按钮样式",
|
|
56
|
+
align: "center",
|
|
57
|
+
dataIndex: "buttonStyle",
|
|
58
|
+
customRender({ text: e, record: o }) {
|
|
59
|
+
if (e === "form") {
|
|
60
|
+
let t = o.optPosition;
|
|
61
|
+
return e + "(" + (t == "2" ? "底部" : "侧面") + ")";
|
|
62
|
+
} else
|
|
63
|
+
return e;
|
|
64
|
+
}
|
|
65
|
+
},
|
|
66
|
+
{ title: "按钮类型", align: "center", dataIndex: "optType" },
|
|
67
|
+
{ title: "排序", align: "center", dataIndex: "orderNum" },
|
|
68
|
+
{ title: "按钮图标", align: "center", dataIndex: "buttonIcon" },
|
|
69
|
+
{ title: "表达式", align: "center", dataIndex: "exp" },
|
|
70
|
+
{
|
|
71
|
+
title: "按钮状态",
|
|
72
|
+
align: "center",
|
|
73
|
+
dataIndex: "buttonStatus",
|
|
74
|
+
customRender({ text: e }) {
|
|
75
|
+
return e == 1 ? "激活" : "未激活";
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
], be = ({ redoModalHeight: e }) => [
|
|
79
|
+
{
|
|
80
|
+
label: "按钮编码",
|
|
81
|
+
field: "buttonCode",
|
|
82
|
+
component: "Input",
|
|
83
|
+
required: !0,
|
|
84
|
+
// update-begin--author:liaozhiyang---date:20240521---for:【TV360X-139】按钮编码加上正则校验
|
|
85
|
+
dynamicRules: () => [
|
|
86
|
+
{
|
|
87
|
+
validator: (o, t) => new Promise((c, s) => {
|
|
88
|
+
/^[a-zA-Z_$][a-zA-Z0-9_$]*$/.test(t) ? c() : s("编码只能包含字母、数字、下划线 (_) 和美元符号 ($)且不能以数字开头");
|
|
89
|
+
})
|
|
90
|
+
},
|
|
91
|
+
// update-begin--author:liaozhiyang---date:20240701---for:【TV360X-1693】自定义按钮编码排除sql和java系统内置编码
|
|
92
|
+
{
|
|
93
|
+
validator: (o, t) => new Promise((c, s) => {
|
|
94
|
+
["add", "edit", "delete", "import", "export", "query"].includes(t) ? s("属于系统内置编码") : c();
|
|
95
|
+
})
|
|
96
|
+
}
|
|
97
|
+
// update-end--author:liaozhiyang---date:20240701---for:【TV360X-1693】自定义按钮编码排除sql和java系统内置编码
|
|
98
|
+
]
|
|
99
|
+
// update-end--author:liaozhiyang---date:20240521---for:【TV360X-139】按钮编码加上正则校验
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
label: "按钮名称",
|
|
103
|
+
field: "buttonName",
|
|
104
|
+
component: "Input",
|
|
105
|
+
required: !0
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
label: "按钮样式",
|
|
109
|
+
field: "buttonStyle",
|
|
110
|
+
component: "Select",
|
|
111
|
+
componentProps: {
|
|
112
|
+
options: [
|
|
113
|
+
{ label: "Link", value: "link" },
|
|
114
|
+
{ label: "Button", value: "button" },
|
|
115
|
+
{ label: "Form", value: "form" }
|
|
116
|
+
],
|
|
117
|
+
// update-begin--author:liaozhiyang---date:20240618---for:【TV360X-1306】自定义按钮弹窗按钮样式切换是重置弹窗高度
|
|
118
|
+
onChange: () => {
|
|
119
|
+
e();
|
|
120
|
+
}
|
|
121
|
+
// update-end--author:liaozhiyang---date:20240618---for:【TV360X-1306】自定义按钮弹窗按钮样式切换是重置弹窗高度
|
|
122
|
+
},
|
|
123
|
+
defaultValue: "link"
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
label: "按钮位置",
|
|
127
|
+
field: "optPosition",
|
|
128
|
+
component: "Select",
|
|
129
|
+
componentProps: {
|
|
130
|
+
allowClear: !1,
|
|
131
|
+
options: [
|
|
132
|
+
// { label: '侧面', value: '1' },
|
|
133
|
+
{ label: "底部", value: "2" }
|
|
134
|
+
]
|
|
135
|
+
},
|
|
136
|
+
defaultValue: "2",
|
|
137
|
+
show: ({ model: o }) => o.buttonStyle === "form"
|
|
138
|
+
},
|
|
139
|
+
{
|
|
140
|
+
label: "按钮类型",
|
|
141
|
+
field: "optType",
|
|
142
|
+
component: "Select",
|
|
143
|
+
componentProps: {
|
|
144
|
+
allowClear: !1,
|
|
145
|
+
options: [
|
|
146
|
+
{ label: "Js", value: "js" },
|
|
147
|
+
{ label: "Action", value: "action" }
|
|
148
|
+
]
|
|
149
|
+
},
|
|
150
|
+
defaultValue: "js"
|
|
151
|
+
},
|
|
152
|
+
{
|
|
153
|
+
label: "排序",
|
|
154
|
+
field: "orderNum",
|
|
155
|
+
component: "InputNumber",
|
|
156
|
+
componentProps: {
|
|
157
|
+
style: "width: 100%"
|
|
158
|
+
}
|
|
159
|
+
},
|
|
160
|
+
{
|
|
161
|
+
label: "按钮图标",
|
|
162
|
+
field: "buttonIcon",
|
|
163
|
+
// update-begin--author:liaozhiyang---date:20240528---for:【TV360X-136】按钮图标改成图标组件选择
|
|
164
|
+
component: "IconPicker",
|
|
165
|
+
componentProps: {
|
|
166
|
+
clearSelect: !0,
|
|
167
|
+
iconPrefixSave: !1
|
|
168
|
+
},
|
|
169
|
+
// update-end--author:liaozhiyang---date:20240528---for:【TV360X-136】按钮图标改成图标组件选择
|
|
170
|
+
ifShow: ({ values: o, model: t }) => o.buttonStyle == "button" || o.buttonStyle == "form"
|
|
171
|
+
},
|
|
172
|
+
{
|
|
173
|
+
label: "表达式",
|
|
174
|
+
field: "exp",
|
|
175
|
+
component: "Input",
|
|
176
|
+
// update-begin--author:liaozhiyang---date:20240603---for:【TV360X-89】自定义按钮样式是link时,展示表达式配置
|
|
177
|
+
ifShow: ({ values: o, model: t }) => o.buttonStyle == "link" ? !0 : (t.exp = "", !1)
|
|
178
|
+
// update-end--author:liaozhiyang---date:20240603---for:【TV360X-89】自定义按钮样式是link时,展示表达式配置
|
|
179
|
+
},
|
|
180
|
+
{
|
|
181
|
+
label: "按钮状态",
|
|
182
|
+
field: "buttonStatus",
|
|
183
|
+
component: "RadioButtonGroup",
|
|
184
|
+
componentProps: {
|
|
185
|
+
options: [
|
|
186
|
+
{ label: "激活", value: "1" },
|
|
187
|
+
{ label: "未激活", value: "0" }
|
|
188
|
+
]
|
|
189
|
+
},
|
|
190
|
+
defaultValue: "1"
|
|
191
|
+
}
|
|
192
|
+
], ge = J({
|
|
193
|
+
name: "CustomButtonList",
|
|
194
|
+
components: { BasicModal: re, BasicTable: le, TableAction: ae, BasicForm: ue },
|
|
195
|
+
emits: ["register"],
|
|
196
|
+
setup() {
|
|
197
|
+
const e = I(""), { doRequest: o, doDeleteRecord: t, tableContext: c } = ne({
|
|
198
|
+
tableProps: {
|
|
199
|
+
api: (n) => me(e.value, n),
|
|
200
|
+
columns: fe,
|
|
201
|
+
canResize: !1,
|
|
202
|
+
useSearchForm: !1,
|
|
203
|
+
beforeFetch(n) {
|
|
204
|
+
return Object.assign(n, { column: "orderNum", order: "asc" });
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
}), [s, { reload: m }, { rowSelection: d, selectedRowKeys: u }] = c, [r, { closeModal: p }] = ie((n) => C(this, null, function* () {
|
|
208
|
+
e.value = n.row.id, m();
|
|
209
|
+
})), { aiTestMode: B, genButtons: v } = te(), [h, b] = se(), f = I(!1), g = Q({
|
|
210
|
+
onRegister: h,
|
|
211
|
+
title: W(() => f != null && f.value ? "修改" : "新增"),
|
|
212
|
+
width: 800,
|
|
213
|
+
confirmLoading: !1,
|
|
214
|
+
onOk: z,
|
|
215
|
+
onCancel: b.closeModal
|
|
216
|
+
});
|
|
217
|
+
let _ = {};
|
|
218
|
+
const [N, { resetFields: E, setFieldsValue: L, validate: V }] = ce({
|
|
219
|
+
// update-begin--author:liaozhiyang---date:20240618---for:【TV360X-1306】自定义按钮弹窗按钮样式切换是重置弹窗高度
|
|
220
|
+
schemas: be({ redoModalHeight: b.redoModalHeight }),
|
|
221
|
+
// update-end--author:liaozhiyang---date:20240618---for:【TV360X-1306】自定义按钮弹窗按钮样式切换是重置弹窗高度
|
|
222
|
+
showActionButtonGroup: !1
|
|
223
|
+
});
|
|
224
|
+
function S(n) {
|
|
225
|
+
return C(this, null, function* () {
|
|
226
|
+
var M;
|
|
227
|
+
f.value = n.isUpdate, _ = A({}, (M = n.record) != null ? M : {}), b.openModal(), yield X(), yield E(), L(_);
|
|
228
|
+
});
|
|
229
|
+
}
|
|
230
|
+
function $() {
|
|
231
|
+
S({ isUpdate: !1 });
|
|
232
|
+
}
|
|
233
|
+
function j(n) {
|
|
234
|
+
S({ isUpdate: !0, record: n });
|
|
235
|
+
}
|
|
236
|
+
function x() {
|
|
237
|
+
p();
|
|
238
|
+
}
|
|
239
|
+
function O() {
|
|
240
|
+
v(e.value);
|
|
241
|
+
}
|
|
242
|
+
function q() {
|
|
243
|
+
return C(this, null, function* () {
|
|
244
|
+
o(() => D(u.value));
|
|
245
|
+
});
|
|
246
|
+
}
|
|
247
|
+
function z() {
|
|
248
|
+
return C(this, null, function* () {
|
|
249
|
+
try {
|
|
250
|
+
g.confirmLoading = !0;
|
|
251
|
+
let n = yield V();
|
|
252
|
+
n = Object.assign({ cgformHeadId: e.value }, _, n), yield pe(n, f.value), m(), b.closeModal();
|
|
253
|
+
} finally {
|
|
254
|
+
g.confirmLoading = !1;
|
|
255
|
+
}
|
|
256
|
+
});
|
|
257
|
+
}
|
|
258
|
+
function G(n) {
|
|
259
|
+
return [
|
|
260
|
+
{
|
|
261
|
+
label: "编辑",
|
|
262
|
+
onClick: () => j(n)
|
|
263
|
+
}
|
|
264
|
+
];
|
|
265
|
+
}
|
|
266
|
+
function H(n) {
|
|
267
|
+
return [
|
|
268
|
+
{
|
|
269
|
+
label: "删除",
|
|
270
|
+
popConfirm: {
|
|
271
|
+
title: "确定删除吗?",
|
|
272
|
+
placement: "left",
|
|
273
|
+
confirm: () => t(() => D([n.id]))
|
|
274
|
+
}
|
|
275
|
+
}
|
|
276
|
+
];
|
|
277
|
+
}
|
|
278
|
+
return {
|
|
279
|
+
onAdd: $,
|
|
280
|
+
onBatchDelete: q,
|
|
281
|
+
aiTestMode: B,
|
|
282
|
+
onGenButtons: O,
|
|
283
|
+
registerModal: r,
|
|
284
|
+
registerTable: s,
|
|
285
|
+
selectedRowKeys: u,
|
|
286
|
+
rowSelection: d,
|
|
287
|
+
onCancel: x,
|
|
288
|
+
getTableAction: G,
|
|
289
|
+
getDropDownAction: H,
|
|
290
|
+
registerForm: N,
|
|
291
|
+
formModalProps: g
|
|
292
|
+
};
|
|
293
|
+
}
|
|
294
|
+
}), _e = {
|
|
295
|
+
key: 0,
|
|
296
|
+
style: { float: "left" }
|
|
297
|
+
};
|
|
298
|
+
function Ce(e, o, t, c, s, m) {
|
|
299
|
+
const d = i("a-button"), u = i("a-icon"), r = i("a-menu-item"), p = i("a-menu"), B = i("a-dropdown"), v = i("TableAction"), h = i("BasicTable"), b = i("BasicForm"), f = i("a-spin"), g = i("BasicModal");
|
|
300
|
+
return k(), R(g, {
|
|
301
|
+
onRegister: e.registerModal,
|
|
302
|
+
title: "自定义按钮",
|
|
303
|
+
width: 1200,
|
|
304
|
+
defaultFullscreen: "",
|
|
305
|
+
onCancel: e.onCancel
|
|
306
|
+
}, {
|
|
307
|
+
footer: l(() => [
|
|
308
|
+
a(d, { onClick: e.onCancel }, {
|
|
309
|
+
default: l(() => [
|
|
310
|
+
w("关闭")
|
|
311
|
+
]),
|
|
312
|
+
_: 1
|
|
313
|
+
}, 8, ["onClick"]),
|
|
314
|
+
e.aiTestMode ? (k(), Y("div", _e, [
|
|
315
|
+
a(d, { onClick: e.onGenButtons }, {
|
|
316
|
+
default: l(() => [
|
|
317
|
+
w("生成测试数据")
|
|
318
|
+
]),
|
|
319
|
+
_: 1
|
|
320
|
+
}, 8, ["onClick"])
|
|
321
|
+
])) : F("", !0)
|
|
322
|
+
]),
|
|
323
|
+
default: l(() => [
|
|
324
|
+
a(h, {
|
|
325
|
+
onRegister: e.registerTable,
|
|
326
|
+
rowSelection: e.rowSelection
|
|
327
|
+
}, {
|
|
328
|
+
tableTitle: l(() => [
|
|
329
|
+
a(d, {
|
|
330
|
+
onClick: e.onAdd,
|
|
331
|
+
type: "primary",
|
|
332
|
+
preIcon: "ant-design:plus"
|
|
333
|
+
}, {
|
|
334
|
+
default: l(() => [
|
|
335
|
+
w("新增")
|
|
336
|
+
]),
|
|
337
|
+
_: 1
|
|
338
|
+
}, 8, ["onClick"]),
|
|
339
|
+
e.selectedRowKeys.length > 0 ? (k(), R(B, { key: 0 }, {
|
|
340
|
+
overlay: l(() => [
|
|
341
|
+
a(p, null, {
|
|
342
|
+
default: l(() => [
|
|
343
|
+
a(r, {
|
|
344
|
+
key: "1",
|
|
345
|
+
onClick: e.onBatchDelete
|
|
346
|
+
}, {
|
|
347
|
+
default: l(() => [
|
|
348
|
+
a(u, { type: "delete" }),
|
|
349
|
+
w(" 删除 ")
|
|
350
|
+
]),
|
|
351
|
+
_: 1
|
|
352
|
+
}, 8, ["onClick"])
|
|
353
|
+
]),
|
|
354
|
+
_: 1
|
|
355
|
+
})
|
|
356
|
+
]),
|
|
357
|
+
default: l(() => [
|
|
358
|
+
a(d, { style: { "margin-left": "8px" } }, {
|
|
359
|
+
default: l(() => [
|
|
360
|
+
w(" 批量操作 "),
|
|
361
|
+
a(u, { type: "down" })
|
|
362
|
+
]),
|
|
363
|
+
_: 1
|
|
364
|
+
})
|
|
365
|
+
]),
|
|
366
|
+
_: 1
|
|
367
|
+
})) : F("", !0)
|
|
368
|
+
]),
|
|
369
|
+
action: l(({ record: _ }) => [
|
|
370
|
+
a(v, {
|
|
371
|
+
actions: e.getTableAction(_),
|
|
372
|
+
dropDownActions: e.getDropDownAction(_)
|
|
373
|
+
}, null, 8, ["actions", "dropDownActions"])
|
|
374
|
+
]),
|
|
375
|
+
_: 1
|
|
376
|
+
}, 8, ["onRegister", "rowSelection"]),
|
|
377
|
+
a(g, ee(oe(e.formModalProps)), {
|
|
378
|
+
default: l(() => [
|
|
379
|
+
a(f, {
|
|
380
|
+
spinning: e.formModalProps.confirmLoading
|
|
381
|
+
}, {
|
|
382
|
+
default: l(() => [
|
|
383
|
+
a(b, { onRegister: e.registerForm }, null, 8, ["onRegister"])
|
|
384
|
+
]),
|
|
385
|
+
_: 1
|
|
386
|
+
}, 8, ["spinning"])
|
|
387
|
+
]),
|
|
388
|
+
_: 1
|
|
389
|
+
}, 16)
|
|
390
|
+
]),
|
|
391
|
+
_: 1
|
|
392
|
+
}, 8, ["onRegister", "onCancel"]);
|
|
393
|
+
}
|
|
394
|
+
const Re = /* @__PURE__ */ de(ge, [["render", Ce]]);
|
|
395
|
+
export {
|
|
396
|
+
Re as default
|
|
397
|
+
};
|