yc-project-template 1.0.0
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/README.md +48 -0
- package/dist/AppManage-yJ4SOsDj.js +77 -0
- package/dist/DeptTree-BJ-YyoZO.js +88 -0
- package/dist/DictionaryModal-jyoOTJD4.js +157 -0
- package/dist/DictionaryValueModal-D6wJ04-c.js +173 -0
- package/dist/Login-CorWfiLZ.js +169 -0
- package/dist/NotFound-B_crl8rg.js +21 -0
- package/dist/OrgModal-DgTQN71P.js +114 -0
- package/dist/PageTemplate-BXwP32sO.js +149 -0
- package/dist/RoleModal-QaUkdPyy.js +126 -0
- package/dist/UserModal-MQeOVpvt.js +200 -0
- package/dist/YcSearchForm-BWweEnqG.js +326 -0
- package/dist/YcTree-COox_XNx.js +124 -0
- package/dist/el-col-B8XtMrKy.js +135 -0
- package/dist/el-dropdown-item-zXcF1C0U.js +862 -0
- package/dist/el-form-item-DGYKf4A6.js +1178 -0
- package/dist/favicon.ico +0 -0
- package/dist/globalComponents-NGC1jMmM.js +112761 -0
- package/dist/index-CMXoxgLU.js +1062 -0
- package/dist/index-Cc-Qq-qP.js +17 -0
- package/dist/index-DBq96lnF.js +393 -0
- package/dist/index-zZ1bb-CY.js +278 -0
- package/dist/rsaCrypto-B9Iz2FB1.js +2084 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/useMenu-CCb03now.js +18 -0
- package/dist/yc-project-template.css +1 -0
- package/dist/yc-project-template.es.js +5 -0
- package/dist/yc-project-template.umd.js +746 -0
- package/package.json +123 -0
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { r as o } from "./globalComponents-NGC1jMmM.js";
|
|
2
|
+
const s = (e) => o.get("/form/queryForm", {
|
|
3
|
+
params: e,
|
|
4
|
+
responseType: "json"
|
|
5
|
+
}), r = (e) => o.post("/common/pageQuery", e), t = (e) => o.post("/common/merge", e), m = (e) => o.post("/common/delete", e), n = (e) => o.post("/common/export", e, {
|
|
6
|
+
responseType: "blob",
|
|
7
|
+
headers: {
|
|
8
|
+
"Content-Type": "application/json"
|
|
9
|
+
}
|
|
10
|
+
});
|
|
11
|
+
export {
|
|
12
|
+
m as d,
|
|
13
|
+
n as e,
|
|
14
|
+
t as m,
|
|
15
|
+
r as p,
|
|
16
|
+
s as q
|
|
17
|
+
};
|
|
@@ -0,0 +1,393 @@
|
|
|
1
|
+
import { _ as j, a as $ } from "./YcSearchForm-BWweEnqG.js";
|
|
2
|
+
import { x as J, d as K, s as X, f as Z, y as ee, _ as ne } from "./globalComponents-NGC1jMmM.js";
|
|
3
|
+
import { _ as oe } from "./YcTree-COox_XNx.js";
|
|
4
|
+
import { E as te, a as ae } from "./el-col-B8XtMrKy.js";
|
|
5
|
+
import { reactive as N, ref as t, defineComponent as le, createElementBlock as pe, openBlock as re, createElementVNode as T, createVNode as l, withCtx as f, createTextVNode as x, unref as o, isRef as Y } from "vue";
|
|
6
|
+
import { u as ie } from "./useMenu-CCb03now.js";
|
|
7
|
+
import { q as ue } from "./index-Cc-Qq-qP.js";
|
|
8
|
+
import { ElMessageBox as se, ElMessage as p } from "element-plus";
|
|
9
|
+
function ce() {
|
|
10
|
+
const S = [
|
|
11
|
+
{
|
|
12
|
+
component: "YcSelect",
|
|
13
|
+
label: "菜单类别",
|
|
14
|
+
prop: "type",
|
|
15
|
+
span: 8,
|
|
16
|
+
dictionaryCode: "menu_type"
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
component: "YcInput",
|
|
20
|
+
label: "菜单名称",
|
|
21
|
+
prop: "menuName",
|
|
22
|
+
span: 8,
|
|
23
|
+
requiredRules: [
|
|
24
|
+
{
|
|
25
|
+
prop: "type",
|
|
26
|
+
op: "eq",
|
|
27
|
+
value: "group"
|
|
28
|
+
}
|
|
29
|
+
]
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
component: "YcInput",
|
|
33
|
+
label: "菜单图标",
|
|
34
|
+
prop: "icon",
|
|
35
|
+
span: 8
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
component: "YcInput",
|
|
39
|
+
label: "显示排序",
|
|
40
|
+
prop: "serialNumber",
|
|
41
|
+
span: 8
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
component: "YcInput",
|
|
45
|
+
label: "路由名称",
|
|
46
|
+
prop: "name",
|
|
47
|
+
span: 8,
|
|
48
|
+
showRule: [
|
|
49
|
+
{
|
|
50
|
+
prop: "type",
|
|
51
|
+
op: "eq",
|
|
52
|
+
value: "group"
|
|
53
|
+
}
|
|
54
|
+
]
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
component: "YcInput",
|
|
58
|
+
label: "路由地址",
|
|
59
|
+
prop: "path",
|
|
60
|
+
span: 8,
|
|
61
|
+
showRule: [
|
|
62
|
+
{
|
|
63
|
+
prop: "type",
|
|
64
|
+
op: "eq",
|
|
65
|
+
value: "group"
|
|
66
|
+
}
|
|
67
|
+
]
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
component: "YcInput",
|
|
71
|
+
label: "组件路径",
|
|
72
|
+
prop: "component",
|
|
73
|
+
span: 8,
|
|
74
|
+
showRule: [
|
|
75
|
+
{
|
|
76
|
+
prop: "type",
|
|
77
|
+
op: "eq",
|
|
78
|
+
value: "group"
|
|
79
|
+
}
|
|
80
|
+
]
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
component: "YcInput",
|
|
84
|
+
label: "权限",
|
|
85
|
+
prop: "permission",
|
|
86
|
+
span: 8
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
component: "YcSwitch",
|
|
90
|
+
label: "菜单状态",
|
|
91
|
+
prop: "status",
|
|
92
|
+
span: 8
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
component: "YcObjectTree",
|
|
96
|
+
label: "路由参数",
|
|
97
|
+
prop: "query",
|
|
98
|
+
span: 8,
|
|
99
|
+
showRule: [
|
|
100
|
+
{
|
|
101
|
+
prop: "type",
|
|
102
|
+
op: "eq",
|
|
103
|
+
value: "group"
|
|
104
|
+
}
|
|
105
|
+
]
|
|
106
|
+
}
|
|
107
|
+
], y = N({
|
|
108
|
+
loading: !1
|
|
109
|
+
}), s = t([
|
|
110
|
+
{
|
|
111
|
+
isQuery: !0,
|
|
112
|
+
prop: "label",
|
|
113
|
+
label: "标题",
|
|
114
|
+
fieldType: "STRING",
|
|
115
|
+
component: "YcInput",
|
|
116
|
+
align: "center",
|
|
117
|
+
width: "180",
|
|
118
|
+
fixed: "left",
|
|
119
|
+
isShow: !0,
|
|
120
|
+
minWidth: "120"
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
isQuery: !0,
|
|
124
|
+
prop: "prop",
|
|
125
|
+
label: "prop值",
|
|
126
|
+
fieldType: "STRING",
|
|
127
|
+
component: "YcInput",
|
|
128
|
+
minWidth: "120"
|
|
129
|
+
},
|
|
130
|
+
{
|
|
131
|
+
isQuery: !0,
|
|
132
|
+
prop: "component",
|
|
133
|
+
label: "组件名称",
|
|
134
|
+
fieldType: "STRING",
|
|
135
|
+
component: "YcInput",
|
|
136
|
+
minWidth: "120"
|
|
137
|
+
},
|
|
138
|
+
{
|
|
139
|
+
isQuery: !0,
|
|
140
|
+
prop: "show",
|
|
141
|
+
label: "是否显示",
|
|
142
|
+
fieldType: "STRING",
|
|
143
|
+
component: "YcInput",
|
|
144
|
+
minWidth: "120"
|
|
145
|
+
},
|
|
146
|
+
{
|
|
147
|
+
isQuery: !0,
|
|
148
|
+
prop: "query",
|
|
149
|
+
label: "是否查询条件",
|
|
150
|
+
fieldType: "STRING",
|
|
151
|
+
component: "YcInput",
|
|
152
|
+
minWidth: "120"
|
|
153
|
+
},
|
|
154
|
+
{
|
|
155
|
+
isQuery: !0,
|
|
156
|
+
prop: "required",
|
|
157
|
+
label: "是否必填",
|
|
158
|
+
fieldType: "STRING",
|
|
159
|
+
component: "YcInput",
|
|
160
|
+
minWidth: "120"
|
|
161
|
+
},
|
|
162
|
+
{
|
|
163
|
+
isQuery: !0,
|
|
164
|
+
prop: "dictionaryCode",
|
|
165
|
+
label: "字典编码",
|
|
166
|
+
fieldType: "STRING",
|
|
167
|
+
component: "YcInput",
|
|
168
|
+
minWidth: "120"
|
|
169
|
+
},
|
|
170
|
+
{
|
|
171
|
+
isQuery: !0,
|
|
172
|
+
prop: "align",
|
|
173
|
+
label: "对齐方式",
|
|
174
|
+
fieldType: "STRING",
|
|
175
|
+
component: "YcSelect",
|
|
176
|
+
minWidth: "120",
|
|
177
|
+
dictionaryCode: "align"
|
|
178
|
+
},
|
|
179
|
+
{
|
|
180
|
+
isQuery: !0,
|
|
181
|
+
prop: "minWidth",
|
|
182
|
+
label: "最小列宽",
|
|
183
|
+
fieldType: "STRING",
|
|
184
|
+
component: "YcInput",
|
|
185
|
+
minWidth: "120"
|
|
186
|
+
},
|
|
187
|
+
{
|
|
188
|
+
isQuery: !0,
|
|
189
|
+
prop: "fixed",
|
|
190
|
+
label: "固定位置",
|
|
191
|
+
fieldType: "STRING",
|
|
192
|
+
component: "YcSelect",
|
|
193
|
+
minWidth: "120",
|
|
194
|
+
dictionaryCode: "fixed"
|
|
195
|
+
}
|
|
196
|
+
]), b = t([]);
|
|
197
|
+
return { menuConfig: S, tableConfig: y, tableColumn: s, tableData: b };
|
|
198
|
+
}
|
|
199
|
+
const me = { class: "menu-manage" }, de = { class: "menu-manage-left" }, fe = { class: "search" }, ge = { class: "menu-manage-right" }, _e = /* @__PURE__ */ le({
|
|
200
|
+
name: "MenuManage",
|
|
201
|
+
__name: "index",
|
|
202
|
+
setup(S) {
|
|
203
|
+
const { menuList: y } = ie(), { menuConfig: s, tableConfig: b, tableColumn: v } = ce(), C = t(""), g = t("编辑菜单"), r = t(!1), h = t(!1), k = t(), u = t({}), c = t([]), _ = t([]), R = t({}), D = () => {
|
|
204
|
+
g.value = "新增菜单", c.value = s, r.value = !0, u.value = {
|
|
205
|
+
type: "group"
|
|
206
|
+
};
|
|
207
|
+
}, G = () => {
|
|
208
|
+
g.value = "新增菜单", c.value = s, r.value = !0, u.value = {
|
|
209
|
+
type: "item"
|
|
210
|
+
};
|
|
211
|
+
}, I = (n, e, a, i) => {
|
|
212
|
+
g.value = n, r.value = !0, k.value = i, u.value = a;
|
|
213
|
+
}, q = t(), E = async (n) => {
|
|
214
|
+
h.value = !0;
|
|
215
|
+
const e = await ee(n);
|
|
216
|
+
if (e.code !== "ok") {
|
|
217
|
+
p.error(e.message || "新增失败");
|
|
218
|
+
return;
|
|
219
|
+
}
|
|
220
|
+
h.value = !1, n.menuId ? p.success("编辑成功") : p.success("新增成功"), r.value = !1;
|
|
221
|
+
}, M = async (n) => {
|
|
222
|
+
if (c.value = s, n.type === "group") {
|
|
223
|
+
R.value = {}, _.value = [], m.value.total = 0;
|
|
224
|
+
return;
|
|
225
|
+
}
|
|
226
|
+
const e = await ue({ formId: n.menuId });
|
|
227
|
+
if (e.code !== "ok") {
|
|
228
|
+
p.error(e.message || "请求失败");
|
|
229
|
+
return;
|
|
230
|
+
}
|
|
231
|
+
if (!e.data) {
|
|
232
|
+
p.error("未获取到表单配置数据");
|
|
233
|
+
return;
|
|
234
|
+
}
|
|
235
|
+
R.value = e.data, _.value = e.data.formComponentList, m.value.total = _.value.length || 0;
|
|
236
|
+
}, W = N([
|
|
237
|
+
{
|
|
238
|
+
label: "新增分组",
|
|
239
|
+
command: "addGroup",
|
|
240
|
+
onClick: (n, e, a) => {
|
|
241
|
+
I("新增分组", n, e, a);
|
|
242
|
+
}
|
|
243
|
+
},
|
|
244
|
+
{
|
|
245
|
+
label: "新增子菜单",
|
|
246
|
+
command: "addMenu",
|
|
247
|
+
onClick: (n, e, a) => {
|
|
248
|
+
I("新增菜单", n, e, a);
|
|
249
|
+
}
|
|
250
|
+
},
|
|
251
|
+
{
|
|
252
|
+
label: "编辑",
|
|
253
|
+
command: "editMenu",
|
|
254
|
+
onClick: (n, e, a) => {
|
|
255
|
+
I("编辑菜单", n, e, a);
|
|
256
|
+
}
|
|
257
|
+
},
|
|
258
|
+
{
|
|
259
|
+
label: "删除",
|
|
260
|
+
command: "deleteData",
|
|
261
|
+
onClick: (n, e, a) => {
|
|
262
|
+
se.confirm("确定要删除这个菜单吗?", "警告", {
|
|
263
|
+
confirmButtonText: "确定",
|
|
264
|
+
cancelButtonText: "取消",
|
|
265
|
+
type: "warning"
|
|
266
|
+
}).then(() => {
|
|
267
|
+
J({
|
|
268
|
+
menuId: e.menuId
|
|
269
|
+
}).then((i) => {
|
|
270
|
+
if (i.code !== "ok") {
|
|
271
|
+
p.error(i.message || "删除失败");
|
|
272
|
+
return;
|
|
273
|
+
}
|
|
274
|
+
setTimeout(() => {
|
|
275
|
+
a.remove(e), p.success("删除成功");
|
|
276
|
+
}, 0);
|
|
277
|
+
}).catch((i) => {
|
|
278
|
+
p.error("删除菜单失败");
|
|
279
|
+
});
|
|
280
|
+
}).catch(() => {
|
|
281
|
+
p.info("已取消删除");
|
|
282
|
+
});
|
|
283
|
+
}
|
|
284
|
+
}
|
|
285
|
+
]), m = t({
|
|
286
|
+
pageSizes: [10, 20, 30],
|
|
287
|
+
pageSize: 10,
|
|
288
|
+
currentPage: 1,
|
|
289
|
+
total: 0
|
|
290
|
+
});
|
|
291
|
+
function Q(n) {
|
|
292
|
+
m.value.pageSize = n;
|
|
293
|
+
}
|
|
294
|
+
function V(n) {
|
|
295
|
+
m.value.currentPage = n;
|
|
296
|
+
}
|
|
297
|
+
const B = () => {
|
|
298
|
+
}, z = () => {
|
|
299
|
+
}, w = (n) => {
|
|
300
|
+
c.value = v.value, r.value = !0, u.value = n;
|
|
301
|
+
}, A = () => {
|
|
302
|
+
};
|
|
303
|
+
return (n, e) => {
|
|
304
|
+
const a = K, i = ae, F = te, L = X, P = oe, U = j, H = Z, O = $;
|
|
305
|
+
return re(), pe("div", me, [
|
|
306
|
+
T("div", de, [
|
|
307
|
+
l(F, { class: "operation" }, {
|
|
308
|
+
default: f(() => [
|
|
309
|
+
l(i, { span: 12 }, {
|
|
310
|
+
default: f(() => [
|
|
311
|
+
l(a, {
|
|
312
|
+
type: "primary",
|
|
313
|
+
link: "",
|
|
314
|
+
onClick: D
|
|
315
|
+
}, {
|
|
316
|
+
default: f(() => [...e[3] || (e[3] = [
|
|
317
|
+
x("新增分组", -1)
|
|
318
|
+
])]),
|
|
319
|
+
_: 1
|
|
320
|
+
})
|
|
321
|
+
]),
|
|
322
|
+
_: 1
|
|
323
|
+
}),
|
|
324
|
+
l(i, { span: 12 }, {
|
|
325
|
+
default: f(() => [
|
|
326
|
+
l(a, {
|
|
327
|
+
type: "primary",
|
|
328
|
+
link: "",
|
|
329
|
+
onClick: G
|
|
330
|
+
}, {
|
|
331
|
+
default: f(() => [...e[4] || (e[4] = [
|
|
332
|
+
x("新增菜单", -1)
|
|
333
|
+
])]),
|
|
334
|
+
_: 1
|
|
335
|
+
})
|
|
336
|
+
]),
|
|
337
|
+
_: 1
|
|
338
|
+
})
|
|
339
|
+
]),
|
|
340
|
+
_: 1
|
|
341
|
+
}),
|
|
342
|
+
T("div", fe, [
|
|
343
|
+
l(L, {
|
|
344
|
+
placeholder: "请输入内容",
|
|
345
|
+
modelValue: o(C),
|
|
346
|
+
"onUpdate:modelValue": e[0] || (e[0] = (d) => Y(C) ? C.value = d : null),
|
|
347
|
+
class: "input-with-select"
|
|
348
|
+
}, null, 8, ["modelValue"])
|
|
349
|
+
]),
|
|
350
|
+
l(P, {
|
|
351
|
+
ref_key: "menuTreeRef",
|
|
352
|
+
ref: q,
|
|
353
|
+
data: o(y),
|
|
354
|
+
operationButs: o(W),
|
|
355
|
+
onCurrentChange: M
|
|
356
|
+
}, null, 8, ["data", "operationButs"])
|
|
357
|
+
]),
|
|
358
|
+
T("div", ge, [
|
|
359
|
+
l(U, {
|
|
360
|
+
config: o(v),
|
|
361
|
+
onSearch: B,
|
|
362
|
+
onAddData: w,
|
|
363
|
+
onExport: z
|
|
364
|
+
}, null, 8, ["config"]),
|
|
365
|
+
l(H, {
|
|
366
|
+
"table-config": o(b),
|
|
367
|
+
"table-data": o(_),
|
|
368
|
+
tableColumn: o(v),
|
|
369
|
+
paginationConfig: o(m),
|
|
370
|
+
onHandleEdit: w,
|
|
371
|
+
onHandleDelete: A,
|
|
372
|
+
onPageSizeChange: Q,
|
|
373
|
+
onCurrentChange: V
|
|
374
|
+
}, null, 8, ["table-config", "table-data", "tableColumn", "paginationConfig"])
|
|
375
|
+
]),
|
|
376
|
+
l(O, {
|
|
377
|
+
title: o(g),
|
|
378
|
+
width: "60%",
|
|
379
|
+
loading: o(h),
|
|
380
|
+
formData: o(u),
|
|
381
|
+
"onUpdate:formData": e[1] || (e[1] = (d) => Y(u) ? u.value = d : null),
|
|
382
|
+
editVisible: o(r),
|
|
383
|
+
"onUpdate:editVisible": e[2] || (e[2] = (d) => Y(r) ? r.value = d : null),
|
|
384
|
+
config: o(c),
|
|
385
|
+
onConfirm: E
|
|
386
|
+
}, null, 8, ["title", "loading", "formData", "editVisible", "config"])
|
|
387
|
+
]);
|
|
388
|
+
};
|
|
389
|
+
}
|
|
390
|
+
}), Se = /* @__PURE__ */ ne(_e, [["__scopeId", "data-v-915b46f4"]]);
|
|
391
|
+
export {
|
|
392
|
+
Se as default
|
|
393
|
+
};
|
|
@@ -0,0 +1,278 @@
|
|
|
1
|
+
import { _ as J, a as X } from "./YcSearchForm-BWweEnqG.js";
|
|
2
|
+
import { d as Z, s as ee, f as ne, t as te, m as oe, k as ae, w as ie, _ as le } from "./globalComponents-NGC1jMmM.js";
|
|
3
|
+
import { _ as re } from "./YcTree-COox_XNx.js";
|
|
4
|
+
import { E as ce, a as se } from "./el-col-B8XtMrKy.js";
|
|
5
|
+
import { reactive as A, ref as o, defineComponent as ue, createElementBlock as pe, openBlock as de, createElementVNode as h, createVNode as a, withCtx as u, createTextVNode as E, unref as t, isRef as S } from "vue";
|
|
6
|
+
import { ElMessageBox as me, ElMessage as p } from "element-plus";
|
|
7
|
+
function fe() {
|
|
8
|
+
const T = [
|
|
9
|
+
{
|
|
10
|
+
component: "YcInput",
|
|
11
|
+
label: "字典名称",
|
|
12
|
+
prop: "name",
|
|
13
|
+
span: 24
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
component: "YcInput",
|
|
17
|
+
label: "字典编码",
|
|
18
|
+
prop: "code",
|
|
19
|
+
span: 24
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
component: "YcInput",
|
|
23
|
+
label: "字典描述",
|
|
24
|
+
prop: "description",
|
|
25
|
+
span: 24
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
component: "YcSwitch",
|
|
29
|
+
label: "状态",
|
|
30
|
+
prop: "status",
|
|
31
|
+
span: 24
|
|
32
|
+
}
|
|
33
|
+
], m = A({
|
|
34
|
+
loading: !1
|
|
35
|
+
}), f = o([
|
|
36
|
+
{
|
|
37
|
+
isQuery: !0,
|
|
38
|
+
prop: "name",
|
|
39
|
+
label: "选项名称",
|
|
40
|
+
fieldType: "STRING",
|
|
41
|
+
component: "YcInput",
|
|
42
|
+
align: "center",
|
|
43
|
+
width: "180",
|
|
44
|
+
fixed: "left",
|
|
45
|
+
isShow: !0,
|
|
46
|
+
minWidth: "120"
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
isQuery: !0,
|
|
50
|
+
prop: "code",
|
|
51
|
+
label: "选项编码",
|
|
52
|
+
fieldType: "STRING",
|
|
53
|
+
component: "YcInput",
|
|
54
|
+
minWidth: "120"
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
isQuery: !0,
|
|
58
|
+
prop: "displayOrder",
|
|
59
|
+
label: "显示顺序",
|
|
60
|
+
fieldType: "STRING",
|
|
61
|
+
component: "YcInput",
|
|
62
|
+
minWidth: "120"
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
isQuery: !0,
|
|
66
|
+
prop: "description",
|
|
67
|
+
label: "备注",
|
|
68
|
+
fieldType: "STRING",
|
|
69
|
+
component: "YcInput",
|
|
70
|
+
minWidth: "120"
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
isQuery: !0,
|
|
74
|
+
prop: "status",
|
|
75
|
+
label: "状态",
|
|
76
|
+
fieldType: "STRING",
|
|
77
|
+
component: "YcSwitch",
|
|
78
|
+
minWidth: "120"
|
|
79
|
+
}
|
|
80
|
+
]);
|
|
81
|
+
return { dictionaryConfig: T, tableConfig: m, tableColumn: f };
|
|
82
|
+
}
|
|
83
|
+
const ge = { class: "menu-manage" }, _e = { class: "menu-manage-left" }, ye = { class: "search" }, ve = { class: "menu-manage-right" }, be = /* @__PURE__ */ ue({
|
|
84
|
+
name: "DictionaryManage",
|
|
85
|
+
__name: "index",
|
|
86
|
+
setup(T) {
|
|
87
|
+
const { dictionaryConfig: m, tableConfig: f, tableColumn: g } = fe(), _ = o(""), y = o(""), l = o(!1), v = o(!1), w = o(), r = o({}), b = o([]), I = o([]), V = o([]), C = o("mergeDictionaryApi"), D = o({
|
|
88
|
+
id: "",
|
|
89
|
+
name: "",
|
|
90
|
+
code: "",
|
|
91
|
+
status: ""
|
|
92
|
+
}), B = o({
|
|
93
|
+
label: "name",
|
|
94
|
+
nodeKey: "code"
|
|
95
|
+
}), x = async () => {
|
|
96
|
+
const e = await te({
|
|
97
|
+
page: 1,
|
|
98
|
+
pageSize: 20
|
|
99
|
+
});
|
|
100
|
+
if (e.code !== "ok") {
|
|
101
|
+
p.error(e.message || "查询失败");
|
|
102
|
+
return;
|
|
103
|
+
}
|
|
104
|
+
V.value = e.table ?? [];
|
|
105
|
+
};
|
|
106
|
+
x();
|
|
107
|
+
const z = async () => {
|
|
108
|
+
}, N = () => {
|
|
109
|
+
y.value = "新增字典", C.value = "mergeDictionaryApi", b.value = m, l.value = !0, r.value = {};
|
|
110
|
+
}, R = (e, n, i, d) => {
|
|
111
|
+
y.value = e, l.value = !0, w.value = d, r.value = i;
|
|
112
|
+
}, Q = async (e) => {
|
|
113
|
+
v.value = !0;
|
|
114
|
+
try {
|
|
115
|
+
let n;
|
|
116
|
+
if (C.value == "mergeDictionaryApi")
|
|
117
|
+
n = await oe(e);
|
|
118
|
+
else {
|
|
119
|
+
const i = {
|
|
120
|
+
dictionaryId: D.value.id,
|
|
121
|
+
...e
|
|
122
|
+
};
|
|
123
|
+
n = await ae(i);
|
|
124
|
+
}
|
|
125
|
+
if (n.code !== "ok") {
|
|
126
|
+
p.error(n.message || "新增失败");
|
|
127
|
+
return;
|
|
128
|
+
}
|
|
129
|
+
l.value = !1, x(), w?.value?.reload(), p.success("新增成功");
|
|
130
|
+
} finally {
|
|
131
|
+
v.value = !1;
|
|
132
|
+
}
|
|
133
|
+
}, G = async (e) => {
|
|
134
|
+
D.value = e, Y();
|
|
135
|
+
}, Y = async () => {
|
|
136
|
+
const e = await ie({
|
|
137
|
+
dictionaryCode: D.value.code,
|
|
138
|
+
page: c.value.currentPage,
|
|
139
|
+
pageSize: c.value.pageSize
|
|
140
|
+
});
|
|
141
|
+
if (e.code !== "ok") {
|
|
142
|
+
p.error(e.message || "查询失败");
|
|
143
|
+
return;
|
|
144
|
+
}
|
|
145
|
+
I.value = e.table ?? [];
|
|
146
|
+
}, M = A([
|
|
147
|
+
{
|
|
148
|
+
label: "编辑",
|
|
149
|
+
command: "editMenu",
|
|
150
|
+
onClick: (e, n, i) => {
|
|
151
|
+
R("编辑菜单", e, n, i);
|
|
152
|
+
}
|
|
153
|
+
},
|
|
154
|
+
{
|
|
155
|
+
label: "删除",
|
|
156
|
+
command: "deleteData",
|
|
157
|
+
onClick: (e, n, i) => {
|
|
158
|
+
me.confirm("确定要删除这个菜单吗?", "警告", {
|
|
159
|
+
confirmButtonText: "确定",
|
|
160
|
+
cancelButtonText: "取消",
|
|
161
|
+
type: "warning"
|
|
162
|
+
}).then(() => {
|
|
163
|
+
}).catch(() => {
|
|
164
|
+
p.info("已取消删除");
|
|
165
|
+
});
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
]), c = o({
|
|
169
|
+
pageSizes: [10, 20, 30],
|
|
170
|
+
pageSize: 10,
|
|
171
|
+
currentPage: 1,
|
|
172
|
+
total: 0
|
|
173
|
+
});
|
|
174
|
+
function W(e) {
|
|
175
|
+
c.value.pageSize = e;
|
|
176
|
+
}
|
|
177
|
+
function L(e) {
|
|
178
|
+
c.value.currentPage = e;
|
|
179
|
+
}
|
|
180
|
+
const P = () => {
|
|
181
|
+
Y();
|
|
182
|
+
}, F = () => {
|
|
183
|
+
}, k = (e) => {
|
|
184
|
+
b.value = g.value, C.value = "mergeDictionaryValueApi", r.value = e || {}, l.value = !0;
|
|
185
|
+
}, U = (e) => {
|
|
186
|
+
};
|
|
187
|
+
return (e, n) => {
|
|
188
|
+
const i = Z, d = se, H = ce, O = ee, K = re, $ = J, j = ne, q = X;
|
|
189
|
+
return de(), pe("div", ge, [
|
|
190
|
+
h("div", _e, [
|
|
191
|
+
a(H, { class: "operation" }, {
|
|
192
|
+
default: u(() => [
|
|
193
|
+
a(d, { span: 12 }, {
|
|
194
|
+
default: u(() => [
|
|
195
|
+
a(i, {
|
|
196
|
+
type: "primary",
|
|
197
|
+
link: "",
|
|
198
|
+
onClick: N
|
|
199
|
+
}, {
|
|
200
|
+
default: u(() => [...n[3] || (n[3] = [
|
|
201
|
+
E("新增字典", -1)
|
|
202
|
+
])]),
|
|
203
|
+
_: 1
|
|
204
|
+
})
|
|
205
|
+
]),
|
|
206
|
+
_: 1
|
|
207
|
+
}),
|
|
208
|
+
a(d, { span: 12 }, {
|
|
209
|
+
default: u(() => [
|
|
210
|
+
a(i, {
|
|
211
|
+
type: "primary",
|
|
212
|
+
link: "",
|
|
213
|
+
onClick: z
|
|
214
|
+
}, {
|
|
215
|
+
default: u(() => [...n[4] || (n[4] = [
|
|
216
|
+
E("导入字典", -1)
|
|
217
|
+
])]),
|
|
218
|
+
_: 1
|
|
219
|
+
})
|
|
220
|
+
]),
|
|
221
|
+
_: 1
|
|
222
|
+
})
|
|
223
|
+
]),
|
|
224
|
+
_: 1
|
|
225
|
+
}),
|
|
226
|
+
h("div", ye, [
|
|
227
|
+
a(O, {
|
|
228
|
+
placeholder: "请输入内容",
|
|
229
|
+
modelValue: t(_),
|
|
230
|
+
"onUpdate:modelValue": n[0] || (n[0] = (s) => S(_) ? _.value = s : null),
|
|
231
|
+
class: "input-with-select"
|
|
232
|
+
}, null, 8, ["modelValue"])
|
|
233
|
+
]),
|
|
234
|
+
a(K, {
|
|
235
|
+
ref: "menuTreeRef",
|
|
236
|
+
data: t(V),
|
|
237
|
+
format: t(B),
|
|
238
|
+
operationButs: t(M),
|
|
239
|
+
onCurrentChange: G
|
|
240
|
+
}, null, 8, ["data", "format", "operationButs"])
|
|
241
|
+
]),
|
|
242
|
+
h("div", ve, [
|
|
243
|
+
a($, {
|
|
244
|
+
config: t(g),
|
|
245
|
+
onSearch: P,
|
|
246
|
+
onAddData: k,
|
|
247
|
+
onExport: F
|
|
248
|
+
}, null, 8, ["config"]),
|
|
249
|
+
a(j, {
|
|
250
|
+
"table-config": t(f),
|
|
251
|
+
"table-data": t(I),
|
|
252
|
+
tableColumn: t(g),
|
|
253
|
+
paginationConfig: t(c),
|
|
254
|
+
onPageSizeChange: W,
|
|
255
|
+
onCurrentChange: L,
|
|
256
|
+
onHandleEdit: k,
|
|
257
|
+
onHandleDelete: U
|
|
258
|
+
}, null, 8, ["table-config", "table-data", "tableColumn", "paginationConfig"])
|
|
259
|
+
]),
|
|
260
|
+
a(q, {
|
|
261
|
+
title: t(y),
|
|
262
|
+
width: 400,
|
|
263
|
+
loading: t(v),
|
|
264
|
+
formData: t(r),
|
|
265
|
+
"onUpdate:formData": n[1] || (n[1] = (s) => S(r) ? r.value = s : null),
|
|
266
|
+
editVisible: t(l),
|
|
267
|
+
"onUpdate:editVisible": n[2] || (n[2] = (s) => S(l) ? l.value = s : null),
|
|
268
|
+
config: t(b),
|
|
269
|
+
span: 24,
|
|
270
|
+
onConfirm: Q
|
|
271
|
+
}, null, 8, ["title", "loading", "formData", "editVisible", "config"])
|
|
272
|
+
]);
|
|
273
|
+
};
|
|
274
|
+
}
|
|
275
|
+
}), Ie = /* @__PURE__ */ le(be, [["__scopeId", "data-v-0dc9f5fd"]]);
|
|
276
|
+
export {
|
|
277
|
+
Ie as default
|
|
278
|
+
};
|