xto-fronted 0.4.95 → 0.4.97

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.
@@ -0,0 +1,189 @@
1
+ import { defineComponent as g, ref as l, resolveComponent as b, openBlock as i, createElementBlock as o, createElementVNode as s, Fragment as n, renderList as c, normalizeStyle as r, toDisplayString as a, normalizeClass as d, createBlock as w, withCtx as U, createVNode as u, unref as v } from "vue";
2
+ import { Progress as _ } from "@xto/data";
3
+ import { _ as q } from "./index-Ccp6zfq-.js";
4
+ const x = { class: "dashboard" }, C = { class: "stats-section" }, B = { class: "stat-content" }, M = { class: "stat-title" }, I = {
5
+ key: 0,
6
+ viewBox: "0 0 24 24",
7
+ fill: "none",
8
+ stroke: "currentColor",
9
+ "stroke-width": "2"
10
+ }, V = {
11
+ key: 1,
12
+ viewBox: "0 0 24 24",
13
+ fill: "none",
14
+ stroke: "currentColor",
15
+ "stroke-width": "2"
16
+ }, L = { class: "main-section" }, S = { class: "quick-section" }, $ = { class: "quick-grid" }, z = { class: "quick-icon" }, E = { class: "quick-info" }, N = { class: "quick-title" }, P = { class: "quick-desc" }, D = { class: "activity-section" }, F = { class: "activity-list" }, O = { class: "activity-content" }, T = { class: "activity-main" }, X = { class: "activity-user" }, j = { class: "activity-action" }, A = { class: "activity-time" }, G = { class: "system-section" }, H = { class: "system-grid" }, J = { class: "system-info-list" }, K = { class: "info-label" }, Q = { class: "info-value" }, R = { class: "system-status" }, W = { class: "status-item" }, Y = { class: "status-item" }, Z = { class: "status-item" }, ss = /* @__PURE__ */ g({
17
+ __name: "index",
18
+ setup(ts) {
19
+ const p = l([
20
+ { title: "用户总数", value: 1234, icon: "👥", color: "#1677ff", trend: "+12.5%", trendUp: !0 },
21
+ { title: "今日访问", value: 567, icon: "👀", color: "#52c41a", trend: "+8.2%", trendUp: !0 },
22
+ { title: "订单数量", value: 890, icon: "📦", color: "#faad14", trend: "-3.1%", trendUp: !1 },
23
+ { title: "销售金额", value: 123456, icon: "💰", color: "#ff4d4f", trend: "+15.8%", trendUp: !0 }
24
+ ]), m = l([
25
+ { user: "张三", action: "登录系统", time: "2分钟前", type: "success", avatar: "张" },
26
+ { user: "李四", action: "修改了用户信息", time: "5分钟前", type: "warning", avatar: "李" },
27
+ { user: "王五", action: "创建了新订单", time: "10分钟前", type: "info", avatar: "王" },
28
+ { user: "赵六", action: "删除了测试数据", time: "30分钟前", type: "danger", avatar: "赵" },
29
+ { user: "钱七", action: "更新了系统配置", time: "1小时前", type: "primary", avatar: "钱" }
30
+ ]), h = l([
31
+ { title: "用户管理", path: "/system/user", icon: "👤", desc: "管理系统用户" },
32
+ { title: "角色管理", path: "/system/role", icon: "👥", desc: "角色权限配置" },
33
+ { title: "菜单管理", path: "/system/menu", icon: "📋", desc: "菜单路由管理" },
34
+ { title: "系统设置", path: "/system", icon: "⚙️", desc: "系统参数配置" }
35
+ ]), y = l([
36
+ { label: "系统版本", value: "v1.0.0" },
37
+ { label: "Vue 版本", value: "3.4.21" },
38
+ { label: "构建工具", value: "Vite 5" },
39
+ { label: "UI 组件库", value: "XTO UI" }
40
+ ]);
41
+ return (es, e) => {
42
+ const f = b("router-link");
43
+ return i(), o("div", x, [
44
+ s("div", C, [
45
+ (i(!0), o(n, null, c(p.value, (t) => (i(), o("div", {
46
+ key: t.title,
47
+ class: "stat-card"
48
+ }, [
49
+ s("div", {
50
+ class: "stat-icon",
51
+ style: r({ background: `linear-gradient(135deg, ${t.color}20 0%, ${t.color}10 100%)` })
52
+ }, [
53
+ s("span", null, a(t.icon), 1)
54
+ ], 4),
55
+ s("div", B, [
56
+ s("div", M, a(t.title), 1),
57
+ s("div", {
58
+ class: "stat-value",
59
+ style: r({ color: t.color })
60
+ }, a(t.value.toLocaleString()), 5),
61
+ s("div", {
62
+ class: d(["stat-trend", { up: t.trendUp, down: !t.trendUp }])
63
+ }, [
64
+ t.trendUp ? (i(), o("svg", I, [...e[0] || (e[0] = [
65
+ s("path", { d: "M7 17l5-5 5 5M7 7l5 5 5-5" }, null, -1)
66
+ ])])) : (i(), o("svg", V, [...e[1] || (e[1] = [
67
+ s("path", { d: "M7 7l5 5 5-5M7 17l5-5 5 5" }, null, -1)
68
+ ])])),
69
+ s("span", null, a(t.trend), 1)
70
+ ], 2)
71
+ ]),
72
+ s("div", {
73
+ class: "stat-decoration",
74
+ style: r({ background: `linear-gradient(135deg, ${t.color}08 0%, transparent 100%)` })
75
+ }, null, 4)
76
+ ]))), 128))
77
+ ]),
78
+ s("div", L, [
79
+ s("div", S, [
80
+ e[3] || (e[3] = s("div", { class: "section-header" }, [
81
+ s("h3", null, "快捷入口"),
82
+ s("span", { class: "section-badge" }, "4 个入口")
83
+ ], -1)),
84
+ s("div", $, [
85
+ (i(!0), o(n, null, c(h.value, (t) => (i(), w(f, {
86
+ key: t.path,
87
+ to: t.path,
88
+ class: "quick-card"
89
+ }, {
90
+ default: U(() => [
91
+ s("div", z, a(t.icon), 1),
92
+ s("div", E, [
93
+ s("div", N, a(t.title), 1),
94
+ s("div", P, a(t.desc), 1)
95
+ ]),
96
+ e[2] || (e[2] = s("div", { class: "quick-arrow" }, [
97
+ s("svg", {
98
+ viewBox: "0 0 24 24",
99
+ fill: "none",
100
+ stroke: "currentColor",
101
+ "stroke-width": "2"
102
+ }, [
103
+ s("path", { d: "M9 18l6-6-6-6" })
104
+ ])
105
+ ], -1))
106
+ ]),
107
+ _: 2
108
+ }, 1032, ["to"]))), 128))
109
+ ])
110
+ ]),
111
+ s("div", D, [
112
+ e[4] || (e[4] = s("div", { class: "section-header" }, [
113
+ s("h3", null, "最近活动"),
114
+ s("a", {
115
+ href: "#",
116
+ class: "section-link"
117
+ }, "查看全部")
118
+ ], -1)),
119
+ s("div", F, [
120
+ (i(!0), o(n, null, c(m.value, (t, k) => (i(), o("div", {
121
+ key: k,
122
+ class: "activity-item"
123
+ }, [
124
+ s("div", {
125
+ class: d(["activity-avatar", t.type])
126
+ }, a(t.avatar), 3),
127
+ s("div", O, [
128
+ s("div", T, [
129
+ s("span", X, a(t.user), 1),
130
+ s("span", j, a(t.action), 1)
131
+ ]),
132
+ s("div", A, a(t.time), 1)
133
+ ]),
134
+ s("div", {
135
+ class: d(["activity-dot", t.type])
136
+ }, null, 2)
137
+ ]))), 128))
138
+ ])
139
+ ])
140
+ ]),
141
+ s("div", G, [
142
+ e[8] || (e[8] = s("div", { class: "section-header" }, [
143
+ s("h3", null, "系统信息")
144
+ ], -1)),
145
+ s("div", H, [
146
+ s("div", J, [
147
+ (i(!0), o(n, null, c(y.value, (t) => (i(), o("div", {
148
+ key: t.label,
149
+ class: "info-item"
150
+ }, [
151
+ s("span", K, a(t.label), 1),
152
+ s("span", Q, a(t.value), 1)
153
+ ]))), 128))
154
+ ]),
155
+ s("div", R, [
156
+ s("div", W, [
157
+ e[5] || (e[5] = s("div", { class: "status-header" }, [
158
+ s("span", { class: "status-label" }, "服务器状态"),
159
+ s("span", { class: "status-value" }, "75%")
160
+ ], -1)),
161
+ u(v(_), {
162
+ percentage: 75,
163
+ status: "success"
164
+ })
165
+ ]),
166
+ s("div", Y, [
167
+ e[6] || (e[6] = s("div", { class: "status-header" }, [
168
+ s("span", { class: "status-label" }, "内存使用"),
169
+ s("span", { class: "status-value" }, "45%")
170
+ ], -1)),
171
+ u(v(_), { percentage: 45 })
172
+ ]),
173
+ s("div", Z, [
174
+ e[7] || (e[7] = s("div", { class: "status-header" }, [
175
+ s("span", { class: "status-label" }, "CPU 使用率"),
176
+ s("span", { class: "status-value" }, "32%")
177
+ ], -1)),
178
+ u(v(_), { percentage: 32 })
179
+ ])
180
+ ])
181
+ ])
182
+ ])
183
+ ]);
184
+ };
185
+ }
186
+ }), ls = /* @__PURE__ */ q(ss, [["__scopeId", "data-v-fd54abc0"]]);
187
+ export {
188
+ ls as default
189
+ };
@@ -0,0 +1,479 @@
1
+ import { defineComponent as P, ref as m, reactive as A, computed as O, onMounted as j, openBlock as _, createElementBlock as k, createElementVNode as e, createVNode as o, unref as l, withCtx as a, withKeys as q, createTextVNode as u, toDisplayString as c, Fragment as K, renderList as G, normalizeClass as J } from "vue";
2
+ import { Form as N, FormItem as v, Input as x, Select as Q, Switch as S } from "@xto/form";
3
+ import { Tag as W, Pagination as X } from "@xto/data";
4
+ import { Popconfirm as Y, Modal as Z, Message as B } from "@xto/feedback";
5
+ import { Space as L, Button as f } from "@xto/base";
6
+ import { S as d, a as ee, _ as te } from "./index-CVH7bDsl.js";
7
+ const le = { class: "role-page" }, se = { class: "search-section" }, oe = { class: "table-section" }, ae = { class: "table-toolbar" }, ne = { class: "toolbar-left" }, ie = { class: "toolbar-right" }, de = { class: "table-count" }, re = { class: "table-wrapper" }, ue = { class: "data-table" }, ce = { key: 0 }, pe = { key: 1 }, me = { class: "col-id" }, ve = { class: "id-badge" }, fe = { class: "col-name" }, ge = { class: "role-name" }, ye = { class: "col-code" }, _e = { class: "col-desc" }, ke = { class: "desc-text" }, he = { class: "col-status" }, xe = { class: "status-switch" }, Ve = { class: "col-time" }, be = { class: "time-text" }, Ee = { class: "col-actions" }, Ce = { class: "pagination-wrapper" }, Be = { class: "status-field" }, Le = { class: "status-label" }, De = /* @__PURE__ */ P({
8
+ __name: "index",
9
+ setup(we) {
10
+ const z = [
11
+ { id: 1, name: "超级管理员", code: "admin", description: "拥有所有权限", status: d.ENABLED, permissions: ["*"], createTime: "2024-01-01 10:00:00" },
12
+ { id: 2, name: "编辑", code: "editor", description: "内容编辑权限", status: d.ENABLED, permissions: ["user:read", "user:write"], createTime: "2024-01-02 10:00:00" },
13
+ { id: 3, name: "访客", code: "viewer", description: "只读权限", status: d.ENABLED, permissions: ["user:read"], createTime: "2024-01-03 10:00:00" }
14
+ ], V = m(!1), b = m([]), E = m(0), g = m(1), h = m(10), r = A({
15
+ keyword: "",
16
+ status: void 0
17
+ }), y = m(!1), M = O(() => i.id ? "编辑角色" : "新增角色"), i = A({
18
+ id: 0,
19
+ name: "",
20
+ code: "",
21
+ description: "",
22
+ status: d.ENABLED,
23
+ permissions: []
24
+ }), U = {
25
+ name: [
26
+ { required: !0, message: "请输入角色名称", trigger: "blur" }
27
+ ],
28
+ code: [
29
+ { required: !0, message: "请输入角色编码", trigger: "blur" }
30
+ ]
31
+ }, D = m(), p = () => {
32
+ V.value = !0, setTimeout(() => {
33
+ let n = [...z];
34
+ r.keyword && (n = n.filter(
35
+ (t) => t.name.includes(r.keyword) || t.code.includes(r.keyword)
36
+ )), r.status !== void 0 && (n = n.filter((t) => t.status === r.status)), E.value = n.length, b.value = n.slice((g.value - 1) * h.value, g.value * h.value), V.value = !1;
37
+ }, 300);
38
+ }, w = () => {
39
+ g.value = 1, p();
40
+ }, T = () => {
41
+ r.keyword = "", r.status = void 0, g.value = 1, p();
42
+ }, I = () => {
43
+ Object.assign(i, {
44
+ id: 0,
45
+ name: "",
46
+ code: "",
47
+ description: "",
48
+ status: d.ENABLED,
49
+ permissions: []
50
+ }), y.value = !0;
51
+ }, H = (n) => {
52
+ Object.assign(i, n), y.value = !0;
53
+ }, R = (n) => {
54
+ B.success("删除成功"), p();
55
+ }, $ = async () => {
56
+ var n;
57
+ try {
58
+ await ((n = D.value) == null ? void 0 : n.validate()), B.success(i.id ? "编辑成功" : "新增成功"), y.value = !1, p();
59
+ } catch (t) {
60
+ console.error(t);
61
+ }
62
+ }, F = (n) => {
63
+ B.success(`已${n.status === d.ENABLED ? "启用" : "禁用"}角色 ${n.name}`);
64
+ };
65
+ return j(() => {
66
+ p();
67
+ }), (n, t) => (_(), k("div", le, [
68
+ e("div", se, [
69
+ o(l(N), {
70
+ model: r,
71
+ inline: "",
72
+ class: "search-form"
73
+ }, {
74
+ default: a(() => [
75
+ o(l(v), { label: "关键词" }, {
76
+ default: a(() => [
77
+ o(l(x), {
78
+ modelValue: r.keyword,
79
+ "onUpdate:modelValue": t[0] || (t[0] = (s) => r.keyword = s),
80
+ placeholder: "角色名称/编码",
81
+ clearable: "",
82
+ onKeyup: q(w, ["enter"])
83
+ }, null, 8, ["modelValue"])
84
+ ]),
85
+ _: 1
86
+ }),
87
+ o(l(v), { label: "状态" }, {
88
+ default: a(() => [
89
+ o(l(Q), {
90
+ modelValue: r.status,
91
+ "onUpdate:modelValue": t[1] || (t[1] = (s) => r.status = s),
92
+ options: l(ee),
93
+ placeholder: "请选择",
94
+ clearable: ""
95
+ }, null, 8, ["modelValue", "options"])
96
+ ]),
97
+ _: 1
98
+ }),
99
+ o(l(v), null, {
100
+ default: a(() => [
101
+ o(l(L), null, {
102
+ default: a(() => [
103
+ o(l(f), {
104
+ type: "primary",
105
+ onClick: w
106
+ }, {
107
+ icon: a(() => [...t[10] || (t[10] = [
108
+ e("svg", {
109
+ viewBox: "0 0 24 24",
110
+ fill: "none",
111
+ stroke: "currentColor",
112
+ "stroke-width": "2"
113
+ }, [
114
+ e("circle", {
115
+ cx: "11",
116
+ cy: "11",
117
+ r: "8"
118
+ }),
119
+ e("path", { d: "M21 21l-4.35-4.35" })
120
+ ], -1)
121
+ ])]),
122
+ default: a(() => [
123
+ t[11] || (t[11] = u(" 搜索 ", -1))
124
+ ]),
125
+ _: 1
126
+ }),
127
+ o(l(f), { onClick: T }, {
128
+ icon: a(() => [...t[12] || (t[12] = [
129
+ e("svg", {
130
+ viewBox: "0 0 24 24",
131
+ fill: "none",
132
+ stroke: "currentColor",
133
+ "stroke-width": "2"
134
+ }, [
135
+ e("path", { d: "M3 12a9 9 0 109-9 9.75 9.75 0 00-6.74 2.74L3 8" }),
136
+ e("path", { d: "M3 3v5h5" })
137
+ ], -1)
138
+ ])]),
139
+ default: a(() => [
140
+ t[13] || (t[13] = u(" 重置 ", -1))
141
+ ]),
142
+ _: 1
143
+ })
144
+ ]),
145
+ _: 1
146
+ })
147
+ ]),
148
+ _: 1
149
+ })
150
+ ]),
151
+ _: 1
152
+ }, 8, ["model"])
153
+ ]),
154
+ e("div", oe, [
155
+ e("div", ae, [
156
+ e("div", ne, [
157
+ o(l(f), {
158
+ type: "primary",
159
+ onClick: I
160
+ }, {
161
+ icon: a(() => [...t[14] || (t[14] = [
162
+ e("svg", {
163
+ viewBox: "0 0 24 24",
164
+ fill: "none",
165
+ stroke: "currentColor",
166
+ "stroke-width": "2"
167
+ }, [
168
+ e("line", {
169
+ x1: "12",
170
+ y1: "5",
171
+ x2: "12",
172
+ y2: "19"
173
+ }),
174
+ e("line", {
175
+ x1: "5",
176
+ y1: "12",
177
+ x2: "19",
178
+ y2: "12"
179
+ })
180
+ ], -1)
181
+ ])]),
182
+ default: a(() => [
183
+ t[15] || (t[15] = u(" 新增角色 ", -1))
184
+ ]),
185
+ _: 1
186
+ })
187
+ ]),
188
+ e("div", ie, [
189
+ e("span", de, "共 " + c(E.value) + " 条数据", 1)
190
+ ])
191
+ ]),
192
+ e("div", re, [
193
+ e("table", ue, [
194
+ t[22] || (t[22] = e("thead", null, [
195
+ e("tr", null, [
196
+ e("th", { class: "col-id" }, "ID"),
197
+ e("th", { class: "col-name" }, "角色名称"),
198
+ e("th", { class: "col-code" }, "角色编码"),
199
+ e("th", { class: "col-desc" }, "描述"),
200
+ e("th", { class: "col-status" }, "状态"),
201
+ e("th", { class: "col-time" }, "创建时间"),
202
+ e("th", { class: "col-actions" }, "操作")
203
+ ])
204
+ ], -1)),
205
+ e("tbody", null, [
206
+ V.value ? (_(), k("tr", ce, [...t[16] || (t[16] = [
207
+ e("td", {
208
+ colspan: "7",
209
+ class: "loading-cell"
210
+ }, [
211
+ e("div", { class: "loading-content" }, [
212
+ e("div", { class: "loading-spinner" }),
213
+ e("span", null, "加载中...")
214
+ ])
215
+ ], -1)
216
+ ])])) : b.value.length === 0 ? (_(), k("tr", pe, [...t[17] || (t[17] = [
217
+ e("td", {
218
+ colspan: "7",
219
+ class: "empty-cell"
220
+ }, [
221
+ e("div", { class: "empty-content" }, [
222
+ e("svg", {
223
+ viewBox: "0 0 64 41",
224
+ fill: "none"
225
+ }, [
226
+ e("g", { transform: "translate(0 1)" }, [
227
+ e("ellipse", {
228
+ fill: "#f5f5f5",
229
+ cx: "32",
230
+ cy: "33",
231
+ rx: "32",
232
+ ry: "7"
233
+ }),
234
+ e("g", {
235
+ stroke: "var(--color-text-placeholder)",
236
+ "stroke-width": "2"
237
+ }, [
238
+ e("path", { d: "M55 12.76L44.854 1.258C44.367.474 43.656 0 42.907 0H21.093c-.749 0-1.46.474-1.947 1.257L9 12.761V22h46v-9.24z" }),
239
+ e("path", {
240
+ d: "M41.613 15.931c0-1.605.994-2.93 2.227-2.931H55v18.137C55 33.26 53.68 35 52.05 35H11.95C10.32 35 9 33.259 9 31.137V13h11.16c1.233 0 2.227 1.323 2.227 2.928v.022c0 1.605 1.005 2.901 2.237 2.901h14.752c1.232 0 2.237-1.308 2.237-2.913v-.007z",
241
+ fill: "var(--color-fill)"
242
+ })
243
+ ])
244
+ ])
245
+ ]),
246
+ e("span", null, "暂无数据")
247
+ ])
248
+ ], -1)
249
+ ])])) : (_(!0), k(K, { key: 2 }, G(b.value, (s) => (_(), k("tr", {
250
+ key: s.id,
251
+ class: "data-row"
252
+ }, [
253
+ e("td", me, [
254
+ e("span", ve, c(s.id), 1)
255
+ ]),
256
+ e("td", fe, [
257
+ e("span", ge, c(s.name), 1)
258
+ ]),
259
+ e("td", ye, [
260
+ o(l(W), {
261
+ type: "primary",
262
+ size: "small"
263
+ }, {
264
+ default: a(() => [
265
+ u(c(s.code), 1)
266
+ ]),
267
+ _: 2
268
+ }, 1024)
269
+ ]),
270
+ e("td", _e, [
271
+ e("span", ke, c(s.description), 1)
272
+ ]),
273
+ e("td", he, [
274
+ e("div", xe, [
275
+ o(l(S), {
276
+ "model-value": s.status === l(d).ENABLED,
277
+ "onUpdate:modelValue": (C) => {
278
+ s.status = C ? l(d).ENABLED : l(d).DISABLED, F(s);
279
+ }
280
+ }, null, 8, ["model-value", "onUpdate:modelValue"]),
281
+ e("span", {
282
+ class: J(["status-text", { enabled: s.status === l(d).ENABLED }])
283
+ }, c(s.status === l(d).ENABLED ? "已启用" : "已禁用"), 3)
284
+ ])
285
+ ]),
286
+ e("td", Ve, [
287
+ e("span", be, c(s.createTime), 1)
288
+ ]),
289
+ e("td", Ee, [
290
+ o(l(L), { class: "action-buttons" }, {
291
+ default: a(() => [
292
+ o(l(f), {
293
+ type: "primary",
294
+ link: "",
295
+ size: "small",
296
+ onClick: (C) => H(s)
297
+ }, {
298
+ icon: a(() => [...t[18] || (t[18] = [
299
+ e("svg", {
300
+ viewBox: "0 0 24 24",
301
+ fill: "none",
302
+ stroke: "currentColor",
303
+ "stroke-width": "2"
304
+ }, [
305
+ e("path", { d: "M11 4H4a2 2 0 00-2 2v14a2 2 0 002 2h14a2 2 0 002-2v-7" }),
306
+ e("path", { d: "M18.5 2.5a2.121 2.121 0 013 3L12 15l-4 1 1-4 9.5-9.5z" })
307
+ ], -1)
308
+ ])]),
309
+ default: a(() => [
310
+ t[19] || (t[19] = u(" 编辑 ", -1))
311
+ ]),
312
+ _: 1
313
+ }, 8, ["onClick"]),
314
+ o(l(Y), {
315
+ title: "确定删除该角色吗?",
316
+ onConfirm: (C) => R(s.id)
317
+ }, {
318
+ default: a(() => [
319
+ o(l(f), {
320
+ type: "danger",
321
+ link: "",
322
+ size: "small"
323
+ }, {
324
+ icon: a(() => [...t[20] || (t[20] = [
325
+ e("svg", {
326
+ viewBox: "0 0 24 24",
327
+ fill: "none",
328
+ stroke: "currentColor",
329
+ "stroke-width": "2"
330
+ }, [
331
+ e("polyline", { points: "3,6 5,6 21,6" }),
332
+ e("path", { d: "M19 6v14a2 2 0 01-2 2H7a2 2 0 01-2-2V6m3 0V4a2 2 0 012-2h4a2 2 0 012 2v2" }),
333
+ e("line", {
334
+ x1: "10",
335
+ y1: "11",
336
+ x2: "10",
337
+ y2: "17"
338
+ }),
339
+ e("line", {
340
+ x1: "14",
341
+ y1: "11",
342
+ x2: "14",
343
+ y2: "17"
344
+ })
345
+ ], -1)
346
+ ])]),
347
+ default: a(() => [
348
+ t[21] || (t[21] = u(" 删除 ", -1))
349
+ ]),
350
+ _: 1
351
+ })
352
+ ]),
353
+ _: 1
354
+ }, 8, ["onConfirm"])
355
+ ]),
356
+ _: 2
357
+ }, 1024)
358
+ ])
359
+ ]))), 128))
360
+ ])
361
+ ])
362
+ ]),
363
+ e("div", Ce, [
364
+ o(l(X), {
365
+ "current-page": g.value,
366
+ "onUpdate:currentPage": t[2] || (t[2] = (s) => g.value = s),
367
+ "page-size": h.value,
368
+ "onUpdate:pageSize": t[3] || (t[3] = (s) => h.value = s),
369
+ total: E.value,
370
+ "page-sizes": [10, 20, 50, 100],
371
+ layout: "total, sizes, prev, pager, next",
372
+ onCurrentChange: p,
373
+ onSizeChange: p
374
+ }, null, 8, ["current-page", "page-size", "total"])
375
+ ])
376
+ ]),
377
+ o(l(Z), {
378
+ modelValue: y.value,
379
+ "onUpdate:modelValue": t[9] || (t[9] = (s) => y.value = s),
380
+ title: M.value,
381
+ width: "520px",
382
+ class: "role-modal"
383
+ }, {
384
+ footer: a(() => [
385
+ o(l(L), null, {
386
+ default: a(() => [
387
+ o(l(f), {
388
+ onClick: t[8] || (t[8] = (s) => y.value = !1)
389
+ }, {
390
+ default: a(() => [...t[23] || (t[23] = [
391
+ u("取消", -1)
392
+ ])]),
393
+ _: 1
394
+ }),
395
+ o(l(f), {
396
+ type: "primary",
397
+ onClick: $
398
+ }, {
399
+ default: a(() => [...t[24] || (t[24] = [
400
+ u("确定", -1)
401
+ ])]),
402
+ _: 1
403
+ })
404
+ ]),
405
+ _: 1
406
+ })
407
+ ]),
408
+ default: a(() => [
409
+ o(l(N), {
410
+ ref_key: "formRef",
411
+ ref: D,
412
+ model: i,
413
+ rules: U,
414
+ "label-width": "80px",
415
+ class: "role-form"
416
+ }, {
417
+ default: a(() => [
418
+ o(l(v), {
419
+ label: "角色名称",
420
+ prop: "name"
421
+ }, {
422
+ default: a(() => [
423
+ o(l(x), {
424
+ modelValue: i.name,
425
+ "onUpdate:modelValue": t[4] || (t[4] = (s) => i.name = s),
426
+ placeholder: "请输入角色名称"
427
+ }, null, 8, ["modelValue"])
428
+ ]),
429
+ _: 1
430
+ }),
431
+ o(l(v), {
432
+ label: "角色编码",
433
+ prop: "code"
434
+ }, {
435
+ default: a(() => [
436
+ o(l(x), {
437
+ modelValue: i.code,
438
+ "onUpdate:modelValue": t[5] || (t[5] = (s) => i.code = s),
439
+ placeholder: "请输入角色编码"
440
+ }, null, 8, ["modelValue"])
441
+ ]),
442
+ _: 1
443
+ }),
444
+ o(l(v), { label: "描述" }, {
445
+ default: a(() => [
446
+ o(l(x), {
447
+ modelValue: i.description,
448
+ "onUpdate:modelValue": t[6] || (t[6] = (s) => i.description = s),
449
+ placeholder: "请输入描述"
450
+ }, null, 8, ["modelValue"])
451
+ ]),
452
+ _: 1
453
+ }),
454
+ o(l(v), { label: "状态" }, {
455
+ default: a(() => [
456
+ e("div", Be, [
457
+ o(l(S), {
458
+ modelValue: i.status,
459
+ "onUpdate:modelValue": t[7] || (t[7] = (s) => i.status = s),
460
+ "active-value": l(d).ENABLED,
461
+ "inactive-value": l(d).DISABLED
462
+ }, null, 8, ["modelValue", "active-value", "inactive-value"]),
463
+ e("span", Le, c(i.status === l(d).ENABLED ? "启用" : "禁用"), 1)
464
+ ])
465
+ ]),
466
+ _: 1
467
+ })
468
+ ]),
469
+ _: 1
470
+ }, 8, ["model"])
471
+ ]),
472
+ _: 1
473
+ }, 8, ["modelValue", "title"])
474
+ ]));
475
+ }
476
+ }), Te = /* @__PURE__ */ te(De, [["__scopeId", "data-v-935244f1"]]);
477
+ export {
478
+ Te as default
479
+ };