auto-vue-basic 0.0.12 → 0.0.14

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.
@@ -1,10 +1,618 @@
1
- import { defineComponent as C, toRef as N, resolveComponent as p, createBlock as A, openBlock as R, unref as l, isRef as M, withCtx as n, createVNode as e, reactive as j, createElementVNode as z, normalizeClass as F, ref as T, Fragment as L, withKeys as I, createElementBlock as $, renderList as Y, isVNode as G } from "vue";
2
- import { createAutoApi as B, useLoading as W, useSelect as H, Translate as o, RefreshButton as P, useForm as J, FormDialog as Q, DEFAULT_STATUS_KEY as X, ProTable as Z, DEFAULT_PAGE_KEY as ee, OpenButton as le, SearchButton as ae, ResetButton as oe } from "auto-vue-manual";
3
- const te = /* @__PURE__ */ C({
4
- __name: "menuSelect",
1
+ import { defineComponent as z, reactive as N, computed as ce, ref as te, resolveComponent as d, createBlock as E, openBlock as O, unref as e, isRef as T, withCtx as n, createVNode as l, createTextVNode as K, createElementBlock as I, Fragment as B, renderList as j, toDisplayString as ae, withKeys as H, createElementVNode as W, toRef as ne, normalizeClass as be, onMounted as fe, watch as _e, nextTick as ge, createCommentVNode as he } from "vue";
2
+ import { createAutoApi as G, Translate as a, RulesUtils as Ve, useForm as F, FormDialog as Y, ModifyButton as J, useTablePage as P, ProTable as Q, DEFAULT_PAGE_KEY as X, RefreshButton as D, OpenButton as Z, SearchButton as ee, ResetButton as le, DEFAULT_STATUS_KEY as pe, AutoApiUtils as ye, useLoading as re, useSelect as ue } from "auto-vue-manual";
3
+ const ie = G("admin", {}, "key"), de = G("role", {}, "key"), ke = /* @__PURE__ */ z({
4
+ __name: "info",
5
+ emits: ["refresh"],
6
+ setup(S, { expose: R, emit: w }) {
7
+ const A = w, o = N({
8
+ key: "",
9
+ avatar: "",
10
+ username: "",
11
+ password: "",
12
+ salt: "",
13
+ phone: "",
14
+ email: "",
15
+ language: "zh-CN",
16
+ remark: "",
17
+ roles: []
18
+ }), s = ce(() => !o.key), c = {
19
+ username: [
20
+ { required: !0, message: a("base.placeholder.input base.username"), trigger: "blur" }
21
+ ],
22
+ phone: [
23
+ { required: !0, validator: Ve.phoneRule, message: a("base.placeholder.input base.phone"), trigger: "blur" }
24
+ ],
25
+ password: [
26
+ { required: s, message: a("base.placeholder.input base.password"), trigger: "blur" }
27
+ ],
28
+ email: [
29
+ { required: !0, message: a("base.placeholder.input base.email"), trigger: "blur" }
30
+ ],
31
+ language: [
32
+ { required: !0, message: a("base.placeholder.select base.language"), trigger: "change" }
33
+ ],
34
+ roles: [
35
+ { required: !0, type: "array", message: a("base.placeholder.select base.roles"), trigger: "change" }
36
+ ]
37
+ }, p = te([]), g = async () => {
38
+ const u = await de.list();
39
+ p.value = Array.isArray(u == null ? void 0 : u.data) ? u.data : [];
40
+ }, { modal: x, title: C, form: b, requesting: V, executing: y, open: U, modify: k, submit: i, closed: t } = F(
41
+ A,
42
+ o,
43
+ ie
44
+ );
45
+ return R({
46
+ openOrModify: async (u) => {
47
+ p.value.length || await g(), u ? (o.key = u, k()) : U();
48
+ }
49
+ }), (u, m) => {
50
+ const M = d("el-input"), h = d("el-form-item"), _ = d("el-radio-button"), v = d("el-radio-group"), f = d("el-checkbox"), L = d("el-checkbox-group"), me = d("el-form");
51
+ return O(), E(e(Y), {
52
+ modelValue: e(x),
53
+ "onUpdate:modelValue": m[7] || (m[7] = (q) => T(x) ? x.value = q : null),
54
+ title: e(C)(),
55
+ width: "900px",
56
+ executing: e(y),
57
+ onClosed: e(t),
58
+ onSubmit: e(i)
59
+ }, {
60
+ default: n(() => [
61
+ l(me, {
62
+ ref_key: "form",
63
+ ref: b,
64
+ model: o,
65
+ "label-width": "auto",
66
+ rules: c,
67
+ disabled: e(V) || e(y)
68
+ }, {
69
+ default: n(() => [
70
+ l(h, {
71
+ label: e(a)("base.username"),
72
+ prop: "username"
73
+ }, {
74
+ default: n(() => [
75
+ l(M, {
76
+ modelValue: o.username,
77
+ "onUpdate:modelValue": m[0] || (m[0] = (q) => o.username = q),
78
+ placeholder: e(a)("base.placeholder.input"),
79
+ autocomplete: "off"
80
+ }, null, 8, ["modelValue", "placeholder"])
81
+ ]),
82
+ _: 1
83
+ }, 8, ["label"]),
84
+ l(h, {
85
+ label: e(a)("base.phone"),
86
+ prop: "phone"
87
+ }, {
88
+ default: n(() => [
89
+ l(M, {
90
+ modelValue: o.phone,
91
+ "onUpdate:modelValue": m[1] || (m[1] = (q) => o.phone = q),
92
+ placeholder: e(a)("base.placeholder.input"),
93
+ autocomplete: "off"
94
+ }, null, 8, ["modelValue", "placeholder"])
95
+ ]),
96
+ _: 1
97
+ }, 8, ["label"]),
98
+ l(h, {
99
+ label: e(a)("base.password"),
100
+ prop: "password",
101
+ required: s.value
102
+ }, {
103
+ default: n(() => [
104
+ l(M, {
105
+ modelValue: o.password,
106
+ "onUpdate:modelValue": m[2] || (m[2] = (q) => o.password = q),
107
+ placeholder: e(a)("base.placeholder.input"),
108
+ "show-password": "",
109
+ autocomplete: "off"
110
+ }, null, 8, ["modelValue", "placeholder"])
111
+ ]),
112
+ _: 1
113
+ }, 8, ["label", "required"]),
114
+ l(h, {
115
+ label: e(a)("base.email"),
116
+ prop: "email"
117
+ }, {
118
+ default: n(() => [
119
+ l(M, {
120
+ modelValue: o.email,
121
+ "onUpdate:modelValue": m[3] || (m[3] = (q) => o.email = q),
122
+ placeholder: e(a)("base.placeholder.input")
123
+ }, null, 8, ["modelValue", "placeholder"])
124
+ ]),
125
+ _: 1
126
+ }, 8, ["label"]),
127
+ l(h, {
128
+ label: e(a)("base.language"),
129
+ prop: "language"
130
+ }, {
131
+ default: n(() => [
132
+ l(v, {
133
+ modelValue: o.language,
134
+ "onUpdate:modelValue": m[4] || (m[4] = (q) => o.language = q)
135
+ }, {
136
+ default: n(() => [
137
+ l(_, { label: "zh-CN" }, {
138
+ default: n(() => m[8] || (m[8] = [
139
+ K("zh-CN")
140
+ ])),
141
+ _: 1,
142
+ __: [8]
143
+ }),
144
+ l(_, { label: "en-US" }, {
145
+ default: n(() => m[9] || (m[9] = [
146
+ K("en-US")
147
+ ])),
148
+ _: 1,
149
+ __: [9]
150
+ })
151
+ ]),
152
+ _: 1
153
+ }, 8, ["modelValue"])
154
+ ]),
155
+ _: 1
156
+ }, 8, ["label"]),
157
+ l(h, {
158
+ label: e(a)("base.roles"),
159
+ prop: "roles"
160
+ }, {
161
+ default: n(() => [
162
+ l(L, {
163
+ modelValue: o.roles,
164
+ "onUpdate:modelValue": m[5] || (m[5] = (q) => o.roles = q)
165
+ }, {
166
+ default: n(() => [
167
+ (O(!0), I(B, null, j(p.value, (q) => (O(), E(f, {
168
+ key: q.key,
169
+ label: q.key
170
+ }, {
171
+ default: n(() => [
172
+ K(ae(q.translate), 1)
173
+ ]),
174
+ _: 2
175
+ }, 1032, ["label"]))), 128))
176
+ ]),
177
+ _: 1
178
+ }, 8, ["modelValue"])
179
+ ]),
180
+ _: 1
181
+ }, 8, ["label"]),
182
+ l(h, {
183
+ label: e(a)("base.remark"),
184
+ prop: "remark"
185
+ }, {
186
+ default: n(() => [
187
+ l(M, {
188
+ modelValue: o.remark,
189
+ "onUpdate:modelValue": m[6] || (m[6] = (q) => o.remark = q),
190
+ placeholder: e(a)("base.placeholder.input")
191
+ }, null, 8, ["modelValue", "placeholder"])
192
+ ]),
193
+ _: 1
194
+ }, 8, ["label"])
195
+ ]),
196
+ _: 1
197
+ }, 8, ["model", "disabled"])
198
+ ]),
199
+ _: 1
200
+ }, 8, ["modelValue", "title", "executing", "onClosed", "onSubmit"]);
201
+ };
202
+ }
203
+ }), ve = /* @__PURE__ */ z({
204
+ __name: "index",
205
+ setup(S) {
206
+ const R = {
207
+ keyword: ""
208
+ }, w = [{
209
+ label: a("base.avatar"),
210
+ prop: "avatar",
211
+ width: 60,
212
+ render: ({
213
+ row: b
214
+ }) => l(d("el-avatar"), {
215
+ size: "default",
216
+ src: b.avatar
217
+ }, null)
218
+ }, {
219
+ label: a("base.user"),
220
+ width: 200,
221
+ align: "left",
222
+ render: ({
223
+ row: b
224
+ }) => l(d("el-space"), {
225
+ direction: "vertical",
226
+ alignment: "start"
227
+ }, {
228
+ default: () => [l("div", null, [b.username]), l("div", null, [b.email])]
229
+ })
230
+ }, {
231
+ label: a("base.phone"),
232
+ prop: "phone",
233
+ width: 140
234
+ }, {
235
+ label: a("base.remark"),
236
+ prop: "remark",
237
+ width: 0
238
+ }, {
239
+ label: a("base.login_at"),
240
+ prop: "login_at",
241
+ width: 160
242
+ }, {
243
+ label: a("base.created_at"),
244
+ prop: "created_at",
245
+ width: 160
246
+ }, {
247
+ label: a("base.updated_at"),
248
+ prop: "updated_at",
249
+ width: 160
250
+ }, {
251
+ prop: "action",
252
+ label: a("base.action"),
253
+ width: 80,
254
+ align: "center",
255
+ render: ({
256
+ row: b
257
+ }) => l(J, {
258
+ onModify: () => C(b.key)
259
+ }, null)
260
+ }], {
261
+ tableRef: A,
262
+ infoRef: o,
263
+ keyword: s,
264
+ search: c,
265
+ refresh: p,
266
+ reset: g,
267
+ openInfo: x,
268
+ modifyInfo: C
269
+ } = P(R);
270
+ return (b, V) => {
271
+ const y = d("el-input"), U = d("el-space"), k = d("el-card");
272
+ return O(), E(k, {
273
+ class: "basic-card flex-full",
274
+ "body-class": "flex-1"
275
+ }, {
276
+ header: n(() => [l(U, {
277
+ class: "search-bar"
278
+ }, {
279
+ default: n(() => [l(e(D), {
280
+ onRefresh: e(p)
281
+ }, null, 8, ["onRefresh"]), l(e(Z), {
282
+ onOpen: e(x)
283
+ }, null, 8, ["onOpen"]), l(y, {
284
+ class: "basic-search-input",
285
+ modelValue: e(s).keyword,
286
+ "onUpdate:modelValue": V[0] || (V[0] = (i) => e(s).keyword = i),
287
+ placeholder: e(a)("base.placeholder.keyword"),
288
+ clearable: "",
289
+ onKeyup: H(e(c), ["enter"]),
290
+ onClear: e(c)
291
+ }, null, 8, ["modelValue", "placeholder", "onKeyup", "onClear"]), l(e(ee), {
292
+ onSearch: e(c)
293
+ }, null, 8, ["onSearch"]), l(e(le), {
294
+ onReset: e(g)
295
+ }, null, 8, ["onReset"])]),
296
+ _: 1
297
+ })]),
298
+ default: n(() => [l(e(Q), {
299
+ ref_key: "tableRef",
300
+ ref: A,
301
+ size: "small",
302
+ columns: w,
303
+ url: e(ie).urls[e(X)],
304
+ "search-param": e(s),
305
+ autoSearch: ""
306
+ }, null, 8, ["url", "search-param"]), l(ke, {
307
+ ref_key: "infoRef",
308
+ ref: o,
309
+ onRefresh: e(g)
310
+ }, null, 8, ["onRefresh"])]),
311
+ _: 1
312
+ });
313
+ };
314
+ }
315
+ }), we = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
316
+ __proto__: null,
317
+ default: ve
318
+ }, Symbol.toStringTag, { value: "Module" })), oe = G("translate", {}, "key"), xe = /* @__PURE__ */ z({
319
+ __name: "info",
320
+ emits: ["refresh"],
321
+ setup(S, { expose: R, emit: w }) {
322
+ const A = w, o = N({
323
+ module: "",
324
+ key: "",
325
+ language: "",
326
+ result: "",
327
+ status: 1,
328
+ remark: "",
329
+ created_at: "",
330
+ updated_at: ""
331
+ }), s = {
332
+ module: [
333
+ { required: !0, message: a("language.placeholder.module"), trigger: "blur" }
334
+ ],
335
+ key: [
336
+ { required: !0, message: a("language.placeholder.key"), trigger: "blur" }
337
+ ],
338
+ language: [
339
+ { required: !0, message: a("language.placeholder.language"), trigger: "change" }
340
+ ],
341
+ result: [
342
+ { required: !0, message: a("language.placeholder.result"), trigger: "blur" }
343
+ ]
344
+ }, { modal: c, title: p, form: g, requesting: x, executing: C, open: b, modify: V, submit: y, closed: U } = F(
345
+ A,
346
+ o,
347
+ oe
348
+ );
349
+ return R({
350
+ openOrModify: (i) => {
351
+ i ? (o.key = i, V()) : b();
352
+ }
353
+ }), (i, t) => {
354
+ const r = d("el-input"), u = d("el-form-item"), m = d("el-radio-button"), M = d("el-radio-group"), h = d("el-form");
355
+ return O(), E(e(Y), {
356
+ modelValue: e(c),
357
+ "onUpdate:modelValue": t[5] || (t[5] = (_) => T(c) ? c.value = _ : null),
358
+ title: e(p)(),
359
+ width: "900px",
360
+ executing: e(C),
361
+ onClosed: e(U),
362
+ onSubmit: e(y)
363
+ }, {
364
+ default: n(() => [
365
+ l(h, {
366
+ ref_key: "form",
367
+ ref: g,
368
+ model: o,
369
+ "label-width": "auto",
370
+ rules: s,
371
+ disabled: e(x) || e(C)
372
+ }, {
373
+ default: n(() => [
374
+ l(u, {
375
+ label: e(a)("language.module"),
376
+ prop: "module",
377
+ required: ""
378
+ }, {
379
+ default: n(() => [
380
+ l(r, {
381
+ modelValue: o.module,
382
+ "onUpdate:modelValue": t[0] || (t[0] = (_) => o.module = _),
383
+ placeholder: e(a)("language.placeholder.module")
384
+ }, null, 8, ["modelValue", "placeholder"])
385
+ ]),
386
+ _: 1
387
+ }, 8, ["label"]),
388
+ l(u, {
389
+ label: e(a)("language.key"),
390
+ prop: "key",
391
+ required: ""
392
+ }, {
393
+ default: n(() => [
394
+ l(r, {
395
+ modelValue: o.key,
396
+ "onUpdate:modelValue": t[1] || (t[1] = (_) => o.key = _),
397
+ placeholder: e(a)("language.placeholder.key")
398
+ }, null, 8, ["modelValue", "placeholder"])
399
+ ]),
400
+ _: 1
401
+ }, 8, ["label"]),
402
+ l(u, {
403
+ label: e(a)("language.language"),
404
+ prop: "language",
405
+ required: ""
406
+ }, {
407
+ default: n(() => [
408
+ l(M, {
409
+ modelValue: o.language,
410
+ "onUpdate:modelValue": t[2] || (t[2] = (_) => o.language = _)
411
+ }, {
412
+ default: n(() => [
413
+ l(m, { label: "zh-CN" }, {
414
+ default: n(() => t[6] || (t[6] = [
415
+ K("zh-CN")
416
+ ])),
417
+ _: 1,
418
+ __: [6]
419
+ }),
420
+ l(m, { label: "en-US" }, {
421
+ default: n(() => t[7] || (t[7] = [
422
+ K("en-US")
423
+ ])),
424
+ _: 1,
425
+ __: [7]
426
+ })
427
+ ]),
428
+ _: 1
429
+ }, 8, ["modelValue"])
430
+ ]),
431
+ _: 1
432
+ }, 8, ["label"]),
433
+ l(u, {
434
+ label: e(a)("language.result"),
435
+ prop: "result",
436
+ required: ""
437
+ }, {
438
+ default: n(() => [
439
+ l(r, {
440
+ modelValue: o.result,
441
+ "onUpdate:modelValue": t[3] || (t[3] = (_) => o.result = _),
442
+ placeholder: e(a)("language.placeholder.result")
443
+ }, null, 8, ["modelValue", "placeholder"])
444
+ ]),
445
+ _: 1
446
+ }, 8, ["label"]),
447
+ l(u, {
448
+ label: e(a)("base.remark"),
449
+ prop: "remark"
450
+ }, {
451
+ default: n(() => [
452
+ l(r, {
453
+ modelValue: o.remark,
454
+ "onUpdate:modelValue": t[4] || (t[4] = (_) => o.remark = _),
455
+ placeholder: e(a)("base.placeholder.input")
456
+ }, null, 8, ["modelValue", "placeholder"])
457
+ ]),
458
+ _: 1
459
+ }, 8, ["label"])
460
+ ]),
461
+ _: 1
462
+ }, 8, ["model", "disabled"])
463
+ ]),
464
+ _: 1
465
+ }, 8, ["modelValue", "title", "executing", "onClosed", "onSubmit"]);
466
+ };
467
+ }
468
+ }), Ue = /* @__PURE__ */ z({
469
+ __name: "index",
470
+ setup(S) {
471
+ const R = {
472
+ keyword: "",
473
+ status: 0
474
+ }, w = [{
475
+ label: a("base.module"),
476
+ prop: "module",
477
+ width: 120
478
+ }, {
479
+ label: a("base.language"),
480
+ prop: "language",
481
+ width: 100
482
+ }, {
483
+ label: a("base.key"),
484
+ prop: "key",
485
+ width: 200
486
+ }, {
487
+ label: a("base.result"),
488
+ prop: "result",
489
+ width: 200
490
+ }, {
491
+ label: a("base.status"),
492
+ prop: "status",
493
+ width: 80,
494
+ type: "switch",
495
+ props: {
496
+ activeValue: 1,
497
+ inactiveValue: 2,
498
+ api: oe.urls[pe],
499
+ refresh: !0
500
+ }
501
+ }, {
502
+ label: a("base.remark"),
503
+ prop: "remark",
504
+ width: 0
505
+ }, {
506
+ label: a("base.created_at"),
507
+ prop: "created_at",
508
+ width: 160
509
+ }, {
510
+ label: a("base.updated_at"),
511
+ prop: "updated_at",
512
+ width: 160
513
+ }, {
514
+ prop: "action",
515
+ label: a("base.action"),
516
+ width: 80,
517
+ align: "center",
518
+ render: ({
519
+ row: b
520
+ }) => l(J, {
521
+ onModify: () => C(b.key)
522
+ }, null)
523
+ }], {
524
+ tableRef: A,
525
+ infoRef: o,
526
+ keyword: s,
527
+ search: c,
528
+ refresh: p,
529
+ reset: g,
530
+ openInfo: x,
531
+ modifyInfo: C
532
+ } = P(R);
533
+ return (b, V) => {
534
+ const y = d("el-input"), U = d("el-radio-button"), k = d("el-radio-group"), i = d("el-space"), t = d("el-card");
535
+ return O(), E(t, {
536
+ class: "basic-card flex-full",
537
+ "body-class": "flex-1"
538
+ }, {
539
+ header: n(() => [l(i, {
540
+ class: "search-bar"
541
+ }, {
542
+ default: n(() => [l(e(D), {
543
+ onRefresh: e(p)
544
+ }, null, 8, ["onRefresh"]), l(e(Z), {
545
+ onOpen: e(x)
546
+ }, null, 8, ["onOpen"]), l(y, {
547
+ class: "basic-search-input",
548
+ modelValue: e(s).keyword,
549
+ "onUpdate:modelValue": V[0] || (V[0] = (r) => e(s).keyword = r),
550
+ placeholder: e(a)("base.placeholder.keyword"),
551
+ clearable: "",
552
+ onKeyup: H(e(c), ["enter"]),
553
+ onClear: e(c)
554
+ }, null, 8, ["modelValue", "placeholder", "onKeyup", "onClear"]), l(k, {
555
+ modelValue: e(s).status,
556
+ "onUpdate:modelValue": V[1] || (V[1] = (r) => e(s).status = r),
557
+ onChange: e(c)
558
+ }, {
559
+ default: n(() => [(O(), I(B, null, j([0, 1, 2], (r) => l(U, {
560
+ key: r,
561
+ label: e(a)(`base.DISABLE_ENABLE.${r}`),
562
+ value: r
563
+ }, null, 8, ["label", "value"])), 64))]),
564
+ _: 1
565
+ }, 8, ["modelValue", "onChange"]), l(e(ee), {
566
+ onSearch: e(c)
567
+ }, null, 8, ["onSearch"]), l(e(le), {
568
+ onReset: e(g)
569
+ }, null, 8, ["onReset"])]),
570
+ _: 1
571
+ })]),
572
+ default: n(() => [l(e(Q), {
573
+ ref: "proTableRef",
574
+ size: "small",
575
+ columns: w,
576
+ url: e(oe).urls[e(X)],
577
+ "search-param": e(s),
578
+ autoSearch: ""
579
+ }, null, 8, ["url", "search-param"]), l(xe, {
580
+ ref_key: "infoRef",
581
+ ref: o,
582
+ onRefresh: e(g)
583
+ }, null, 8, ["onRefresh"])]),
584
+ _: 1
585
+ });
586
+ };
587
+ }
588
+ }), Re = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
589
+ __proto__: null,
590
+ default: Ue
591
+ }, Symbol.toStringTag, { value: "Module" })), se = {
592
+ tops: "tops",
593
+ rules: "rules"
594
+ }, $ = ye.createAutoApi("menu", se, "id", Object.keys(se));
595
+ /*! Element Plus Icons Vue v2.3.1 */
596
+ var Ce = /* @__PURE__ */ z({
597
+ name: "Key",
598
+ __name: "key",
599
+ setup(S) {
600
+ return (R, w) => (O(), I("svg", {
601
+ xmlns: "http://www.w3.org/2000/svg",
602
+ viewBox: "0 0 1024 1024"
603
+ }, [
604
+ W("path", {
605
+ fill: "currentColor",
606
+ d: "M448 456.064V96a32 32 0 0 1 32-32.064L672 64a32 32 0 0 1 0 64H512v128h160a32 32 0 0 1 0 64H512v128a256 256 0 1 1-64 8.064M512 896a192 192 0 1 0 0-384 192 192 0 0 0 0 384"
607
+ })
608
+ ]));
609
+ }
610
+ }), Me = Ce;
611
+ const Se = /* @__PURE__ */ z({
612
+ __name: "topMenuSelect",
5
613
  props: {
6
614
  modelValue: {
7
- type: Number,
615
+ type: [Number, Array],
8
616
  required: !0
9
617
  },
10
618
  multiple: {
@@ -13,53 +621,51 @@ const te = /* @__PURE__ */ C({
13
621
  }
14
622
  },
15
623
  emits: ["update:modelValue", "change"],
16
- setup(m, {
17
- emit: g
624
+ setup(S, {
625
+ emit: R
18
626
  }) {
19
- const i = g, h = m, _ = B("menu", {
20
- tops: "tops"
21
- }), {
22
- requesting: a
23
- } = W(_), {
24
- value: v,
25
- options: y,
26
- change: V,
27
- refresh: k,
28
- filterOptions: w
29
- } = H(N(h, "modelValue"), i, {
627
+ const w = R, A = S, {
628
+ requesting: o
629
+ } = re($), {
630
+ value: s,
631
+ options: c,
632
+ change: p,
633
+ refresh: g,
634
+ filterOptions: x
635
+ } = ue(ne(A, "modelValue"), w, {
30
636
  key: "MENU_LIST",
31
- api: _,
32
- url: _.urls.tops,
637
+ api: $,
638
+ url: $.urls.tops,
33
639
  isArray: !0
34
640
  });
35
- return (x, r) => {
36
- const s = p("el-select-v2");
37
- return R(), A(s, {
38
- modelValue: l(v),
39
- "onUpdate:modelValue": r[0] || (r[0] = (f) => M(v) ? v.value = f : null),
40
- options: l(y),
41
- multiple: m.multiple,
42
- disabled: l(a),
43
- placeholder: l(o)("base.placeholder.select"),
641
+ return (C, b) => {
642
+ const V = d("el-select-v2");
643
+ return O(), E(V, {
644
+ modelValue: e(s),
645
+ "onUpdate:modelValue": b[1] || (b[1] = (y) => T(s) ? s.value = y : null),
646
+ options: e(c),
647
+ multiple: S.multiple,
648
+ disabled: e(o),
649
+ placeholder: e(a)("base.placeholder.select"),
44
650
  filterable: "",
45
- filterOptions: l(w),
46
- onChange: l(V)
651
+ filterOptions: e(x),
652
+ onChange: e(p)
47
653
  }, {
48
- prefix: n(() => [e(l(P), {
49
- loading: l(a),
654
+ prefix: n(() => [l(e(D), {
655
+ loading: e(o),
50
656
  text: "",
51
657
  size: "small",
52
- onRefresh: l(k)
53
- }, null, 8, ["loading", "onRefresh"])]),
658
+ onRefresh: b[0] || (b[0] = (y) => e(g)(!0))
659
+ }, null, 8, ["loading"])]),
54
660
  _: 1
55
661
  }, 8, ["modelValue", "options", "multiple", "disabled", "placeholder", "filterOptions", "onChange"]);
56
662
  };
57
663
  }
58
- }), ne = /* @__PURE__ */ C({
664
+ }), Ae = /* @__PURE__ */ z({
59
665
  __name: "info",
60
666
  emits: ["refresh"],
61
- setup(m, { expose: g, emit: i }) {
62
- const h = i, _ = B("menu"), a = j({
667
+ setup(S, { expose: R, emit: w }) {
668
+ const A = w, o = N({
63
669
  id: 0,
64
670
  menu_id: 0,
65
671
  level: 0,
@@ -82,71 +688,71 @@ const te = /* @__PURE__ */ C({
82
688
  keep_alive: !1,
83
689
  link: !1
84
690
  }
85
- }), v = {
691
+ }), s = {
86
692
  sort: [
87
- { required: !0, type: "number", message: o("base.placeholder.input base.sort"), trigger: "blur" }
693
+ { required: !0, type: "number", message: a("base.placeholder.input base.sort"), trigger: "blur" }
88
694
  ],
89
695
  module: [
90
- { required: !0, message: o("base.placeholder.input menu.module"), trigger: "blur" }
696
+ { required: !0, message: a("base.placeholder.input menu.module"), trigger: "blur" }
91
697
  ],
92
698
  name: [
93
- { required: !0, message: o("base.placeholder.input base.name"), trigger: "blur" }
699
+ { required: !0, message: a("base.placeholder.input base.name"), trigger: "blur" }
94
700
  ],
95
701
  en_name: [
96
- { required: !0, message: o("base.placeholder.input base.en_name"), trigger: "blur" }
702
+ { required: !0, message: a("base.placeholder.input base.en_name"), trigger: "blur" }
97
703
  ],
98
704
  url: [
99
- { required: !0, message: o("base.placeholder.input base.url"), trigger: "blur" }
705
+ { required: !0, message: a("base.placeholder.input base.url"), trigger: "blur" }
100
706
  ],
101
707
  component: [
102
- { required: !0, message: o("base.placeholder.input menu.component"), trigger: "blur" }
708
+ { required: !0, message: a("base.placeholder.input menu.component"), trigger: "blur" }
103
709
  ]
104
- }, { modal: y, title: V, form: k, requesting: w, executing: x, open: r, modify: s, submit: f, closed: O } = J(
105
- h,
106
- a,
107
- _
710
+ }, { modal: c, title: p, form: g, requesting: x, executing: C, open: b, modify: V, submit: y, closed: U } = F(
711
+ A,
712
+ o,
713
+ $
108
714
  );
109
- return g({
110
- openOrModify: (U) => {
111
- U ? (a.id = U, s()) : r();
715
+ return R({
716
+ openOrModify: (i) => {
717
+ i ? (o.id = i, V()) : b();
112
718
  }
113
- }), (U, t) => {
114
- const d = p("el-form-item"), b = p("el-col"), D = p("el-input-number"), E = p("el-row"), c = p("el-input"), S = p("el-switch"), K = p("el-form");
115
- return R(), A(l(Q), {
116
- modelValue: l(y),
117
- "onUpdate:modelValue": t[17] || (t[17] = (u) => M(y) ? y.value = u : null),
118
- title: l(V)(),
719
+ }), (i, t) => {
720
+ const r = d("el-form-item"), u = d("el-col"), m = d("el-input-number"), M = d("el-row"), h = d("el-input"), _ = d("el-switch"), v = d("el-form");
721
+ return O(), E(e(Y), {
722
+ modelValue: e(c),
723
+ "onUpdate:modelValue": t[17] || (t[17] = (f) => T(c) ? c.value = f : null),
724
+ title: e(p)(),
119
725
  width: "900px",
120
- executing: l(x),
121
- onClosed: l(O),
122
- onSubmit: l(f)
726
+ executing: e(C),
727
+ onClosed: e(U),
728
+ onSubmit: e(y)
123
729
  }, {
124
730
  default: n(() => [
125
- e(K, {
731
+ l(v, {
126
732
  ref_key: "form",
127
- ref: k,
128
- model: a,
733
+ ref: g,
734
+ model: o,
129
735
  "label-width": "auto",
130
- rules: v,
131
- disabled: l(w) || l(x)
736
+ rules: s,
737
+ disabled: e(x) || e(C)
132
738
  }, {
133
739
  default: n(() => [
134
- e(E, { gutter: 20 }, {
740
+ l(M, { gutter: 20 }, {
135
741
  default: n(() => [
136
- e(b, { span: 12 }, {
742
+ l(u, { span: 12 }, {
137
743
  default: n(() => [
138
- e(E, { gutter: 10 }, {
744
+ l(M, { gutter: 10 }, {
139
745
  default: n(() => [
140
- e(b, { span: 12 }, {
746
+ l(u, { span: 12 }, {
141
747
  default: n(() => [
142
- e(d, {
143
- label: l(o)("base.parent"),
748
+ l(r, {
749
+ label: e(a)("base.parent"),
144
750
  prop: "menu_id"
145
751
  }, {
146
752
  default: n(() => [
147
- e(te, {
148
- modelValue: a.menu_id,
149
- "onUpdate:modelValue": t[0] || (t[0] = (u) => a.menu_id = u)
753
+ l(Se, {
754
+ modelValue: o.menu_id,
755
+ "onUpdate:modelValue": t[0] || (t[0] = (f) => o.menu_id = f)
150
756
  }, null, 8, ["modelValue"])
151
757
  ]),
152
758
  _: 1
@@ -154,18 +760,18 @@ const te = /* @__PURE__ */ C({
154
760
  ]),
155
761
  _: 1
156
762
  }),
157
- e(b, { span: 12 }, {
763
+ l(u, { span: 12 }, {
158
764
  default: n(() => [
159
- e(d, {
160
- label: l(o)("base.sort"),
765
+ l(r, {
766
+ label: e(a)("base.sort"),
161
767
  prop: "sort"
162
768
  }, {
163
769
  default: n(() => [
164
- e(D, {
165
- modelValue: a.sort,
166
- "onUpdate:modelValue": t[1] || (t[1] = (u) => a.sort = u),
770
+ l(m, {
771
+ modelValue: o.sort,
772
+ "onUpdate:modelValue": t[1] || (t[1] = (f) => o.sort = f),
167
773
  min: 0,
168
- placeholder: l(o)("base.placeholder.input")
774
+ placeholder: e(a)("base.placeholder.input")
169
775
  }, null, 8, ["modelValue", "placeholder"])
170
776
  ]),
171
777
  _: 1
@@ -176,80 +782,80 @@ const te = /* @__PURE__ */ C({
176
782
  ]),
177
783
  _: 1
178
784
  }),
179
- e(d, {
180
- label: l(o)("menu.module"),
785
+ l(r, {
786
+ label: e(a)("menu.module"),
181
787
  prop: "module"
182
788
  }, {
183
789
  default: n(() => [
184
- e(c, {
185
- modelValue: a.module,
186
- "onUpdate:modelValue": t[2] || (t[2] = (u) => a.module = u),
187
- placeholder: l(o)("base.placeholder.input")
790
+ l(h, {
791
+ modelValue: o.module,
792
+ "onUpdate:modelValue": t[2] || (t[2] = (f) => o.module = f),
793
+ placeholder: e(a)("base.placeholder.input")
188
794
  }, null, 8, ["modelValue", "placeholder"])
189
795
  ]),
190
796
  _: 1
191
797
  }, 8, ["label"]),
192
- e(d, {
193
- label: l(o)("base.name"),
798
+ l(r, {
799
+ label: e(a)("base.name"),
194
800
  prop: "name"
195
801
  }, {
196
802
  default: n(() => [
197
- e(c, {
198
- modelValue: a.name,
199
- "onUpdate:modelValue": t[3] || (t[3] = (u) => a.name = u),
200
- placeholder: l(o)("base.placeholder.input")
803
+ l(h, {
804
+ modelValue: o.name,
805
+ "onUpdate:modelValue": t[3] || (t[3] = (f) => o.name = f),
806
+ placeholder: e(a)("base.placeholder.input")
201
807
  }, null, 8, ["modelValue", "placeholder"])
202
808
  ]),
203
809
  _: 1
204
810
  }, 8, ["label"]),
205
- e(d, {
206
- label: l(o)("base.en_name"),
811
+ l(r, {
812
+ label: e(a)("base.en_name"),
207
813
  prop: "en_name"
208
814
  }, {
209
815
  default: n(() => [
210
- e(c, {
211
- modelValue: a.en_name,
212
- "onUpdate:modelValue": t[4] || (t[4] = (u) => a.en_name = u),
213
- placeholder: l(o)("base.placeholder.input")
816
+ l(h, {
817
+ modelValue: o.en_name,
818
+ "onUpdate:modelValue": t[4] || (t[4] = (f) => o.en_name = f),
819
+ placeholder: e(a)("base.placeholder.input")
214
820
  }, null, 8, ["modelValue", "placeholder"])
215
821
  ]),
216
822
  _: 1
217
823
  }, 8, ["label"]),
218
- e(d, {
219
- label: l(o)("menu.component"),
824
+ l(r, {
825
+ label: e(a)("menu.component"),
220
826
  prop: "component"
221
827
  }, {
222
828
  default: n(() => [
223
- e(c, {
224
- modelValue: a.component,
225
- "onUpdate:modelValue": t[5] || (t[5] = (u) => a.component = u),
226
- placeholder: l(o)("base.placeholder.input")
829
+ l(h, {
830
+ modelValue: o.component,
831
+ "onUpdate:modelValue": t[5] || (t[5] = (f) => o.component = f),
832
+ placeholder: e(a)("base.placeholder.input")
227
833
  }, null, 8, ["modelValue", "placeholder"])
228
834
  ]),
229
835
  _: 1
230
836
  }, 8, ["label"]),
231
- e(d, {
232
- label: l(o)("base.url"),
837
+ l(r, {
838
+ label: e(a)("base.url"),
233
839
  prop: "url"
234
840
  }, {
235
841
  default: n(() => [
236
- e(c, {
237
- modelValue: a.url,
238
- "onUpdate:modelValue": t[6] || (t[6] = (u) => a.url = u),
239
- placeholder: l(o)("base.placeholder.input")
842
+ l(h, {
843
+ modelValue: o.url,
844
+ "onUpdate:modelValue": t[6] || (t[6] = (f) => o.url = f),
845
+ placeholder: e(a)("base.placeholder.input")
240
846
  }, null, 8, ["modelValue", "placeholder"])
241
847
  ]),
242
848
  _: 1
243
849
  }, 8, ["label"]),
244
- e(d, {
245
- label: l(o)("base.remark"),
850
+ l(r, {
851
+ label: e(a)("base.remark"),
246
852
  prop: "remark"
247
853
  }, {
248
854
  default: n(() => [
249
- e(c, {
250
- modelValue: a.remark,
251
- "onUpdate:modelValue": t[7] || (t[7] = (u) => a.remark = u),
252
- placeholder: l(o)("base.placeholder.input")
855
+ l(h, {
856
+ modelValue: o.remark,
857
+ "onUpdate:modelValue": t[7] || (t[7] = (f) => o.remark = f),
858
+ placeholder: e(a)("base.placeholder.input")
253
859
  }, null, 8, ["modelValue", "placeholder"])
254
860
  ]),
255
861
  _: 1
@@ -257,24 +863,24 @@ const te = /* @__PURE__ */ C({
257
863
  ]),
258
864
  _: 1
259
865
  }),
260
- e(b, { span: 12 }, {
866
+ l(u, { span: 12 }, {
261
867
  default: n(() => [
262
- e(d, {
263
- label: l(o)("base.icon"),
868
+ l(r, {
869
+ label: e(a)("base.icon"),
264
870
  prop: "icon"
265
871
  }, {
266
872
  default: n(() => [
267
- e(c, {
268
- modelValue: a.icon,
269
- "onUpdate:modelValue": t[8] || (t[8] = (u) => a.icon = u),
270
- placeholder: l(o)("base.placeholder.input"),
271
- onInput: t[9] || (t[9] = (u) => {
272
- a.meta.icon = u;
873
+ l(h, {
874
+ modelValue: o.icon,
875
+ "onUpdate:modelValue": t[8] || (t[8] = (f) => o.icon = f),
876
+ placeholder: e(a)("base.placeholder.input"),
877
+ onInput: t[9] || (t[9] = (f) => {
878
+ o.meta.icon = f;
273
879
  })
274
880
  }, {
275
881
  prepend: n(() => [
276
- z("span", {
277
- class: F("iconfont " + a.icon)
882
+ W("span", {
883
+ class: be("iconfont " + o.icon)
278
884
  }, null, 2)
279
885
  ]),
280
886
  _: 1
@@ -282,44 +888,44 @@ const te = /* @__PURE__ */ C({
282
888
  ]),
283
889
  _: 1
284
890
  }, 8, ["label"]),
285
- e(d, {
286
- label: l(o)("base.title"),
891
+ l(r, {
892
+ label: e(a)("base.title"),
287
893
  prop: "meta.title"
288
894
  }, {
289
895
  default: n(() => [
290
- e(c, {
291
- modelValue: a.meta.title,
292
- "onUpdate:modelValue": t[10] || (t[10] = (u) => a.meta.title = u),
293
- placeholder: l(o)("base.placeholder.input")
896
+ l(h, {
897
+ modelValue: o.meta.title,
898
+ "onUpdate:modelValue": t[10] || (t[10] = (f) => o.meta.title = f),
899
+ placeholder: e(a)("base.placeholder.input")
294
900
  }, null, 8, ["modelValue", "placeholder"])
295
901
  ]),
296
902
  _: 1
297
903
  }, 8, ["label"]),
298
- e(d, {
299
- label: l(o)("menu.active"),
904
+ l(r, {
905
+ label: e(a)("menu.active"),
300
906
  prop: "meta.active"
301
907
  }, {
302
908
  default: n(() => [
303
- e(c, {
304
- modelValue: a.meta.active,
305
- "onUpdate:modelValue": t[11] || (t[11] = (u) => a.meta.active = u),
306
- placeholder: l(o)("base.placeholder.input")
909
+ l(h, {
910
+ modelValue: o.meta.active,
911
+ "onUpdate:modelValue": t[11] || (t[11] = (f) => o.meta.active = f),
912
+ placeholder: e(a)("base.placeholder.input")
307
913
  }, null, 8, ["modelValue", "placeholder"])
308
914
  ]),
309
915
  _: 1
310
916
  }, 8, ["label"]),
311
- e(E, null, {
917
+ l(M, null, {
312
918
  default: n(() => [
313
- e(b, { span: 12 }, {
919
+ l(u, { span: 12 }, {
314
920
  default: n(() => [
315
- e(d, {
316
- label: l(o)("menu.link"),
921
+ l(r, {
922
+ label: e(a)("menu.link"),
317
923
  prop: "meta.link"
318
924
  }, {
319
925
  default: n(() => [
320
- e(S, {
321
- modelValue: a.meta.link,
322
- "onUpdate:modelValue": t[12] || (t[12] = (u) => a.meta.link = u)
926
+ l(_, {
927
+ modelValue: o.meta.link,
928
+ "onUpdate:modelValue": t[12] || (t[12] = (f) => o.meta.link = f)
323
929
  }, null, 8, ["modelValue"])
324
930
  ]),
325
931
  _: 1
@@ -327,16 +933,16 @@ const te = /* @__PURE__ */ C({
327
933
  ]),
328
934
  _: 1
329
935
  }),
330
- e(b, { span: 12 }, {
936
+ l(u, { span: 12 }, {
331
937
  default: n(() => [
332
- e(d, {
333
- label: l(o)("menu.keep_alive"),
938
+ l(r, {
939
+ label: e(a)("menu.keep_alive"),
334
940
  prop: "meta.keep_alive"
335
941
  }, {
336
942
  default: n(() => [
337
- e(S, {
338
- modelValue: a.meta.keep_alive,
339
- "onUpdate:modelValue": t[13] || (t[13] = (u) => a.meta.keep_alive = u)
943
+ l(_, {
944
+ modelValue: o.meta.keep_alive,
945
+ "onUpdate:modelValue": t[13] || (t[13] = (f) => o.meta.keep_alive = f)
340
946
  }, null, 8, ["modelValue"])
341
947
  ]),
342
948
  _: 1
@@ -344,16 +950,16 @@ const te = /* @__PURE__ */ C({
344
950
  ]),
345
951
  _: 1
346
952
  }),
347
- e(b, { span: 12 }, {
953
+ l(u, { span: 12 }, {
348
954
  default: n(() => [
349
- e(d, {
350
- label: l(o)("menu.hide"),
955
+ l(r, {
956
+ label: e(a)("menu.hide"),
351
957
  prop: "meta.hide"
352
958
  }, {
353
959
  default: n(() => [
354
- e(S, {
355
- modelValue: a.meta.hide,
356
- "onUpdate:modelValue": t[14] || (t[14] = (u) => a.meta.hide = u)
960
+ l(_, {
961
+ modelValue: o.meta.hide,
962
+ "onUpdate:modelValue": t[14] || (t[14] = (f) => o.meta.hide = f)
357
963
  }, null, 8, ["modelValue"])
358
964
  ]),
359
965
  _: 1
@@ -361,16 +967,16 @@ const te = /* @__PURE__ */ C({
361
967
  ]),
362
968
  _: 1
363
969
  }),
364
- e(b, { span: 12 }, {
970
+ l(u, { span: 12 }, {
365
971
  default: n(() => [
366
- e(d, {
367
- label: l(o)("menu.full"),
972
+ l(r, {
973
+ label: e(a)("menu.full"),
368
974
  prop: "meta.full"
369
975
  }, {
370
976
  default: n(() => [
371
- e(S, {
372
- modelValue: a.meta.full,
373
- "onUpdate:modelValue": t[15] || (t[15] = (u) => a.meta.full = u)
977
+ l(_, {
978
+ modelValue: o.meta.full,
979
+ "onUpdate:modelValue": t[15] || (t[15] = (f) => o.meta.full = f)
374
980
  }, null, 8, ["modelValue"])
375
981
  ]),
376
982
  _: 1
@@ -378,16 +984,16 @@ const te = /* @__PURE__ */ C({
378
984
  ]),
379
985
  _: 1
380
986
  }),
381
- e(b, { span: 12 }, {
987
+ l(u, { span: 12 }, {
382
988
  default: n(() => [
383
- e(d, {
384
- label: l(o)("menu.affix"),
989
+ l(r, {
990
+ label: e(a)("menu.affix"),
385
991
  prop: "meta.affix"
386
992
  }, {
387
993
  default: n(() => [
388
- e(S, {
389
- modelValue: a.meta.affix,
390
- "onUpdate:modelValue": t[16] || (t[16] = (u) => a.meta.affix = u)
994
+ l(_, {
995
+ modelValue: o.meta.affix,
996
+ "onUpdate:modelValue": t[16] || (t[16] = (f) => o.meta.affix = f)
391
997
  }, null, 8, ["modelValue"])
392
998
  ]),
393
999
  _: 1
@@ -412,203 +1018,823 @@ const te = /* @__PURE__ */ C({
412
1018
  }, 8, ["modelValue", "title", "executing", "onClosed", "onSubmit"]);
413
1019
  };
414
1020
  }
415
- });
416
- function ue(m) {
417
- return typeof m == "function" || Object.prototype.toString.call(m) === "[object Object]" && !G(m);
418
- }
419
- const re = /* @__PURE__ */ C({
1021
+ }), Oe = G("rule", {}, "key"), qe = /* @__PURE__ */ z({
1022
+ __name: "menuSelect",
1023
+ props: {
1024
+ modelValue: {
1025
+ type: [Number, Array],
1026
+ required: !0
1027
+ },
1028
+ multiple: {
1029
+ type: Boolean,
1030
+ default: !1
1031
+ }
1032
+ },
1033
+ emits: ["update:modelValue", "change"],
1034
+ setup(S, {
1035
+ emit: R
1036
+ }) {
1037
+ const w = R, A = S, {
1038
+ requesting: o
1039
+ } = re($), {
1040
+ value: s,
1041
+ options: c,
1042
+ change: p,
1043
+ refresh: g,
1044
+ filterOptions: x
1045
+ } = ue(ne(A, "modelValue"), w, {
1046
+ key: "MENU_LIST",
1047
+ api: $,
1048
+ isArray: !0
1049
+ });
1050
+ return (C, b) => {
1051
+ const V = d("el-select-v2");
1052
+ return O(), E(V, {
1053
+ modelValue: e(s),
1054
+ "onUpdate:modelValue": b[1] || (b[1] = (y) => T(s) ? s.value = y : null),
1055
+ options: e(c),
1056
+ multiple: S.multiple,
1057
+ disabled: e(o),
1058
+ placeholder: e(a)("base.placeholder.select"),
1059
+ filterable: "",
1060
+ filterOptions: e(x),
1061
+ onChange: e(p)
1062
+ }, {
1063
+ prefix: n(() => [l(e(D), {
1064
+ loading: e(o),
1065
+ text: "",
1066
+ size: "small",
1067
+ onRefresh: b[0] || (b[0] = (y) => e(g)(!0))
1068
+ }, null, 8, ["loading"])]),
1069
+ _: 1
1070
+ }, 8, ["modelValue", "options", "multiple", "disabled", "placeholder", "filterOptions", "onChange"]);
1071
+ };
1072
+ }
1073
+ }), Le = /* @__PURE__ */ z({
1074
+ __name: "rule",
1075
+ emits: ["refresh"],
1076
+ setup(S, { expose: R, emit: w }) {
1077
+ const A = w, o = N({
1078
+ key: "",
1079
+ menu_id: 0,
1080
+ sort: 0,
1081
+ name: "",
1082
+ en_name: "",
1083
+ urls: "",
1084
+ remark: ""
1085
+ }), s = {
1086
+ menu_id: [
1087
+ { required: !0, type: "number", message: a("base.placeholder.select menu.Menu"), trigger: "blur" }
1088
+ ],
1089
+ sort: [
1090
+ { required: !0, type: "number", message: a("base.placeholder.input base.sort"), trigger: "blur" }
1091
+ ],
1092
+ name: [
1093
+ { required: !0, message: a("base.placeholder.input base.name"), trigger: "blur" }
1094
+ ],
1095
+ en_name: [
1096
+ { required: !0, message: a("base.placeholder.input base.en_name"), trigger: "blur" }
1097
+ ],
1098
+ urls: [
1099
+ { required: !0, message: a("base.placeholder.input base.rules"), trigger: "blur" }
1100
+ ]
1101
+ }, { modal: c, title: p, form: g, requesting: x, executing: C, open: b, modify: V, submit: y, closed: U } = F(
1102
+ A,
1103
+ o,
1104
+ Oe
1105
+ );
1106
+ return R({
1107
+ openOrModify: (i) => {
1108
+ i ? (o.key = i, V()) : b();
1109
+ }
1110
+ }), (i, t) => {
1111
+ const r = d("el-form-item"), u = d("el-input-number"), m = d("el-input"), M = d("el-col"), h = d("el-row"), _ = d("el-form");
1112
+ return O(), E(e(Y), {
1113
+ modelValue: e(c),
1114
+ "onUpdate:modelValue": t[6] || (t[6] = (v) => T(c) ? c.value = v : null),
1115
+ title: e(p)(),
1116
+ width: "700px",
1117
+ executing: e(C),
1118
+ onClosed: e(U),
1119
+ onSubmit: e(y)
1120
+ }, {
1121
+ default: n(() => [
1122
+ l(_, {
1123
+ ref_key: "form",
1124
+ ref: g,
1125
+ model: o,
1126
+ "label-width": "auto",
1127
+ rules: s,
1128
+ disabled: e(x) || e(C)
1129
+ }, {
1130
+ default: n(() => [
1131
+ l(h, { gutter: 20 }, {
1132
+ default: n(() => [
1133
+ l(M, { span: 10 }, {
1134
+ default: n(() => [
1135
+ l(r, {
1136
+ label: e(a)("menu.Menu"),
1137
+ prop: "menu_id"
1138
+ }, {
1139
+ default: n(() => [
1140
+ l(qe, {
1141
+ modelValue: o.menu_id,
1142
+ "onUpdate:modelValue": t[0] || (t[0] = (v) => o.menu_id = v)
1143
+ }, null, 8, ["modelValue"])
1144
+ ]),
1145
+ _: 1
1146
+ }, 8, ["label"]),
1147
+ l(r, {
1148
+ label: e(a)("base.sort"),
1149
+ prop: "sort"
1150
+ }, {
1151
+ default: n(() => [
1152
+ l(u, {
1153
+ modelValue: o.sort,
1154
+ "onUpdate:modelValue": t[1] || (t[1] = (v) => o.sort = v),
1155
+ min: 0,
1156
+ placeholder: e(a)("base.placeholder.input")
1157
+ }, null, 8, ["modelValue", "placeholder"])
1158
+ ]),
1159
+ _: 1
1160
+ }, 8, ["label"]),
1161
+ l(r, {
1162
+ label: e(a)("base.name"),
1163
+ prop: "name"
1164
+ }, {
1165
+ default: n(() => [
1166
+ l(m, {
1167
+ modelValue: o.name,
1168
+ "onUpdate:modelValue": t[2] || (t[2] = (v) => o.name = v),
1169
+ placeholder: e(a)("base.placeholder.input")
1170
+ }, null, 8, ["modelValue", "placeholder"])
1171
+ ]),
1172
+ _: 1
1173
+ }, 8, ["label"]),
1174
+ l(r, {
1175
+ label: e(a)("base.en_name"),
1176
+ prop: "en_name"
1177
+ }, {
1178
+ default: n(() => [
1179
+ l(m, {
1180
+ modelValue: o.en_name,
1181
+ "onUpdate:modelValue": t[3] || (t[3] = (v) => o.en_name = v),
1182
+ placeholder: e(a)("base.placeholder.input")
1183
+ }, null, 8, ["modelValue", "placeholder"])
1184
+ ]),
1185
+ _: 1
1186
+ }, 8, ["label"]),
1187
+ l(r, {
1188
+ label: e(a)("base.remark"),
1189
+ prop: "remark"
1190
+ }, {
1191
+ default: n(() => [
1192
+ l(m, {
1193
+ modelValue: o.remark,
1194
+ "onUpdate:modelValue": t[4] || (t[4] = (v) => o.remark = v),
1195
+ placeholder: e(a)("base.placeholder.input")
1196
+ }, null, 8, ["modelValue", "placeholder"])
1197
+ ]),
1198
+ _: 1
1199
+ }, 8, ["label"])
1200
+ ]),
1201
+ _: 1
1202
+ }),
1203
+ l(M, { span: 14 }, {
1204
+ default: n(() => [
1205
+ l(r, {
1206
+ label: e(a)("base.rules"),
1207
+ prop: "urls"
1208
+ }, {
1209
+ default: n(() => [
1210
+ l(m, {
1211
+ modelValue: o.urls,
1212
+ "onUpdate:modelValue": t[5] || (t[5] = (v) => o.urls = v),
1213
+ type: "textarea",
1214
+ rows: 11,
1215
+ placeholder: e(a)("base.placeholder.input")
1216
+ }, null, 8, ["modelValue", "placeholder"])
1217
+ ]),
1218
+ _: 1
1219
+ }, 8, ["label"])
1220
+ ]),
1221
+ _: 1
1222
+ })
1223
+ ]),
1224
+ _: 1
1225
+ })
1226
+ ]),
1227
+ _: 1
1228
+ }, 8, ["model", "disabled"])
1229
+ ]),
1230
+ _: 1
1231
+ }, 8, ["modelValue", "title", "executing", "onClosed", "onSubmit"]);
1232
+ };
1233
+ }
1234
+ }), Ee = /* @__PURE__ */ z({
420
1235
  __name: "index",
421
- setup(m) {
422
- const g = {
1236
+ setup(S) {
1237
+ const R = {
423
1238
  keyword: "",
424
1239
  status: 0
425
- }, i = T(), h = T(), _ = B("menu"), a = T({
426
- ...g
427
- }), v = [
1240
+ }, w = [
428
1241
  {
429
- label: o("base.index"),
1242
+ label: a("base.index"),
430
1243
  type: "index",
431
1244
  width: 60
432
1245
  },
433
1246
  {
434
- label: o("base.icon"),
1247
+ label: a("base.icon"),
435
1248
  prop: "icon",
436
1249
  width: 60,
437
1250
  render: ({
438
- row: r
439
- }) => e("span", {
440
- class: "iconfont " + r.icon,
1251
+ row: U
1252
+ }) => l("span", {
1253
+ class: "iconfont " + U.icon,
441
1254
  style: "font-size: 16px;"
442
1255
  }, null)
443
1256
  },
444
1257
  {
445
- label: o("menu.module"),
1258
+ label: a("base.module"),
446
1259
  prop: "module",
447
1260
  width: 120
448
1261
  },
449
1262
  {
450
- label: o("base.parent"),
1263
+ label: a("base.parent"),
451
1264
  prop: "parent",
452
1265
  width: 120,
453
1266
  render: ({
454
- row: r
1267
+ row: U
455
1268
  }) => {
456
- var s;
457
- return e(L, null, [(s = r.menu) == null ? void 0 : s.name]);
1269
+ var k;
1270
+ return l(B, null, [(k = U.menu) == null ? void 0 : k.name]);
458
1271
  }
459
1272
  },
460
1273
  {
461
- label: o("base.name"),
1274
+ label: a("base.name"),
462
1275
  prop: "translate",
463
1276
  width: 120
464
1277
  },
465
1278
  // name 字段优先查看实体内是否有 translate 无则使用name
466
1279
  {
467
- label: o("base.url"),
1280
+ label: a("base.url"),
468
1281
  prop: "url",
469
1282
  width: 200
470
1283
  },
471
1284
  {
472
- label: o("menu.component"),
1285
+ label: a("menu.component"),
473
1286
  prop: "component",
474
1287
  width: 200
475
1288
  },
476
1289
  {
477
- label: o("menu.rules"),
1290
+ label: a("menu.rules"),
478
1291
  prop: "rules",
479
1292
  width: 0,
480
1293
  align: "left",
481
1294
  render: ({
482
- row: r
483
- }) => e(p("el-space"), null, {
1295
+ row: U
1296
+ }) => l(d("el-space"), null, {
484
1297
  default: () => {
485
- var s;
486
- return [(s = r.rules) == null ? void 0 : s.map((f) => e(p("el-tag"), {
487
- key: f.key
1298
+ var k;
1299
+ return [(k = U.rules) == null ? void 0 : k.map((i) => l(d("el-tag"), {
1300
+ key: i.key,
1301
+ onClick: () => y(i.key)
488
1302
  }, {
489
- default: () => [f.translate]
1303
+ default: () => [i.translate]
490
1304
  }))];
491
1305
  }
492
1306
  })
493
1307
  },
494
1308
  {
495
- label: o("base.status"),
1309
+ label: a("base.status"),
496
1310
  prop: "status",
497
1311
  width: 80,
498
1312
  type: "switch",
499
1313
  props: {
500
1314
  activeValue: 1,
501
1315
  inactiveValue: 2,
502
- api: _.urls[X],
1316
+ api: $.urls[pe],
503
1317
  refresh: !0
504
1318
  }
505
1319
  },
506
1320
  {
507
1321
  prop: "action",
508
- label: o("base.action"),
1322
+ label: a("base.action"),
509
1323
  width: 60,
510
1324
  align: "center",
511
1325
  render: ({
512
- row: r
513
- }) => {
514
- let s;
515
- return e(p("el-button"), {
516
- type: "primary",
517
- size: "small",
518
- link: !0,
519
- onClick: (f) => {
520
- f.stopPropagation(), x(r.id);
521
- }
522
- }, ue(s = o("base.modify")) ? s : {
523
- default: () => [s]
524
- });
525
- }
1326
+ row: U
1327
+ }) => l(J, {
1328
+ onModify: () => C(U.id)
1329
+ }, null)
526
1330
  }
527
- ], y = () => {
528
- var r;
529
- (r = i.value) == null || r.getTableList();
530
- }, V = () => {
531
- var r;
532
- (r = i.value) == null || r.search();
533
- }, k = () => {
534
- var r;
535
- a.value = {
536
- ...g
537
- }, (r = i.value) == null || r.reset();
538
- }, w = () => {
539
- var r;
540
- (r = h.value) == null || r.openOrModify();
541
- }, x = (r) => {
542
- var s;
543
- (s = h.value) == null || s.openOrModify(r);
544
- };
545
- return (r, s) => {
546
- const f = p("el-input"), O = p("el-radio-button"), q = p("el-radio-group"), U = p("el-space"), t = p("el-card");
547
- return R(), A(t, {
1331
+ ], {
1332
+ tableRef: A,
1333
+ infoRef: o,
1334
+ keyword: s,
1335
+ search: c,
1336
+ refresh: p,
1337
+ reset: g,
1338
+ openInfo: x,
1339
+ modifyInfo: C
1340
+ } = P(R), {
1341
+ infoRef: b,
1342
+ openInfo: V,
1343
+ modifyInfo: y
1344
+ } = P();
1345
+ return (U, k) => {
1346
+ const i = d("el-button"), t = d("el-input"), r = d("el-radio-button"), u = d("el-radio-group"), m = d("el-space"), M = d("el-card");
1347
+ return O(), E(M, {
548
1348
  class: "basic-card flex-full",
549
1349
  "body-class": "flex-1"
550
1350
  }, {
551
- header: n(() => [e(U, {
1351
+ header: n(() => [l(m, {
552
1352
  class: "search-bar"
553
1353
  }, {
554
- default: n(() => [e(l(P), {
555
- onRefresh: y
556
- }), e(l(le), {
557
- onOpen: w
558
- }), e(f, {
1354
+ default: n(() => [l(e(D), {
1355
+ onRefresh: e(p)
1356
+ }, null, 8, ["onRefresh"]), l(e(Z), {
1357
+ onOpen: e(x)
1358
+ }, null, 8, ["onOpen"]), l(i, {
1359
+ circle: "",
1360
+ onClick: e(V),
1361
+ icon: e(Me)
1362
+ }, null, 8, ["onClick", "icon"]), l(t, {
559
1363
  class: "basic-search-input",
560
- modelValue: a.value.keyword,
561
- "onUpdate:modelValue": s[0] || (s[0] = (d) => a.value.keyword = d),
562
- placeholder: l(o)("menu.keyword"),
1364
+ modelValue: e(s).keyword,
1365
+ "onUpdate:modelValue": k[0] || (k[0] = (h) => e(s).keyword = h),
1366
+ placeholder: e(a)("base.placeholder.keyword"),
563
1367
  clearable: "",
564
- onKeyup: I(V, ["enter"]),
565
- onClear: V
566
- }, null, 8, ["modelValue", "placeholder"]), e(q, {
567
- modelValue: a.value.status,
568
- "onUpdate:modelValue": s[1] || (s[1] = (d) => a.value.status = d),
569
- onChange: V
1368
+ onKeyup: H(e(c), ["enter"]),
1369
+ onClear: e(c)
1370
+ }, null, 8, ["modelValue", "placeholder", "onKeyup", "onClear"]), l(u, {
1371
+ modelValue: e(s).status,
1372
+ "onUpdate:modelValue": k[1] || (k[1] = (h) => e(s).status = h),
1373
+ onChange: e(c)
570
1374
  }, {
571
- default: n(() => [(R(), $(L, null, Y([0, 1, 2], (d) => e(O, {
572
- key: d,
573
- label: l(o)(`base.DISABLE_ENABLE.${d}`),
574
- value: d
1375
+ default: n(() => [(O(), I(B, null, j([0, 1, 2], (h) => l(r, {
1376
+ key: h,
1377
+ label: e(a)(`base.DISABLE_ENABLE.${h}`),
1378
+ value: h
575
1379
  }, null, 8, ["label", "value"])), 64))]),
576
1380
  _: 1
577
- }, 8, ["modelValue"]), e(l(ae), {
578
- onSearch: V
579
- }), e(l(oe), {
580
- onReset: k
581
- })]),
1381
+ }, 8, ["modelValue", "onChange"]), l(e(ee), {
1382
+ onSearch: e(c)
1383
+ }, null, 8, ["onSearch"]), l(e(le), {
1384
+ onReset: e(g)
1385
+ }, null, 8, ["onReset"])]),
1386
+ _: 1
1387
+ })]),
1388
+ default: n(() => [l(e(Q), {
1389
+ ref_key: "tableRef",
1390
+ ref: A,
1391
+ size: "small",
1392
+ columns: w,
1393
+ url: e($).urls[e(X)],
1394
+ "search-param": e(s),
1395
+ autoSearch: ""
1396
+ }, null, 8, ["url", "search-param"]), l(Ae, {
1397
+ ref_key: "infoRef",
1398
+ ref: o,
1399
+ onRefresh: e(g)
1400
+ }, null, 8, ["onRefresh"]), l(Le, {
1401
+ ref_key: "ruleRef",
1402
+ ref: b,
1403
+ onRefresh: e(p)
1404
+ }, null, 8, ["onRefresh"])]),
1405
+ _: 1
1406
+ });
1407
+ };
1408
+ }
1409
+ }), ze = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1410
+ __proto__: null,
1411
+ default: Ee
1412
+ }, Symbol.toStringTag, { value: "Module" })), $e = { class: "rule-check" }, Ie = { style: { width: "80px", "line-height": "36px" } }, Te = /* @__PURE__ */ z({
1413
+ __name: "rulesCheck",
1414
+ props: {
1415
+ modelValue: { type: Array, required: !0 },
1416
+ disabled: { type: Boolean, default: !1 }
1417
+ },
1418
+ emits: ["update:modelValue"],
1419
+ setup(S, { expose: R, emit: w }) {
1420
+ const { requesting: A } = re($), o = S, s = w, c = te(!1), p = N({
1421
+ checkAll: !1,
1422
+ indeterminate: !1,
1423
+ MenuAll: {},
1424
+ MenuList: {},
1425
+ MenuIndeterminate: {}
1426
+ }), { options: g, refresh: x } = ue(
1427
+ ne(o, "modelValue"),
1428
+ s,
1429
+ { key: "RULE_CHECK", api: $, url: $.urls.rules, isArray: !0 },
1430
+ !1
1431
+ );
1432
+ function C() {
1433
+ g.value.forEach((i) => {
1434
+ var t;
1435
+ (t = i.rules) != null && t.length && (p.MenuAll[i.id] = !1, p.MenuIndeterminate[i.id] = !1, p.MenuList[i.id] = []);
1436
+ });
1437
+ }
1438
+ function b(i) {
1439
+ g.value.forEach((t) => {
1440
+ var r;
1441
+ (r = t.rules) != null && r.length && (p.MenuList[t.id] = i ? t.rules.map((u) => u.key) : []);
1442
+ }), y();
1443
+ }
1444
+ function V(i, t) {
1445
+ const r = g.value.find((u) => u.id === t);
1446
+ p.MenuList[t] = i && r ? r.rules.map((u) => u.key) : [], y();
1447
+ }
1448
+ function y() {
1449
+ g.value.forEach((i) => {
1450
+ var u, m;
1451
+ const t = ((u = i.rules) == null ? void 0 : u.length) || 0, r = ((m = p.MenuList[i.id]) == null ? void 0 : m.length) || 0;
1452
+ p.MenuAll[i.id] = r === t && t > 0, p.MenuIndeterminate[i.id] = r > 0 && r < t;
1453
+ }), p.checkAll = Object.values(p.MenuAll).every(Boolean), p.indeterminate = !p.checkAll && Object.values(p.MenuList).some((i) => i.length > 0), s("update:modelValue", Object.values(p.MenuList).flat());
1454
+ }
1455
+ function U() {
1456
+ p.checkAll = !1, p.indeterminate = !1, p.MenuAll = {}, p.MenuList = {}, p.MenuIndeterminate = {}, C(), s("update:modelValue", []), c.value = !1;
1457
+ }
1458
+ function k(i) {
1459
+ var t;
1460
+ if (Array.isArray(g.value) && g.value.length > 0) {
1461
+ for (let r of g.value)
1462
+ if (Array.isArray(r.rules) && r.rules.length > 0)
1463
+ for (let u of r.rules)
1464
+ i.some((m) => m === u.key) && (p.MenuList[r.id] = (((t = p.MenuList) == null ? void 0 : t[r.id]) || []).concat([u.key]));
1465
+ y(), c.value = !0;
1466
+ }
1467
+ }
1468
+ return fe(async () => {
1469
+ var i;
1470
+ (i = g.value) != null && i.length || await x(), !c.value && o.modelValue && k(o.modelValue);
1471
+ }), _e(
1472
+ () => o.modelValue,
1473
+ (i) => {
1474
+ ge(() => {
1475
+ var t;
1476
+ c.value || !((t = g.value) != null && t.length) || i && i.length > 0 && k(i);
1477
+ });
1478
+ },
1479
+ { deep: !0, immediate: !0 }
1480
+ ), R({
1481
+ generateOption: k,
1482
+ cleanChecked: U
1483
+ }), (i, t) => {
1484
+ const r = d("el-checkbox"), u = d("el-space"), m = d("el-text"), M = d("el-divider"), h = d("el-checkbox-group");
1485
+ return O(), I("div", $e, [
1486
+ l(u, { style: { "margin-bottom": "6px" } }, {
1487
+ default: n(() => [
1488
+ l(r, {
1489
+ "model-value": p.checkAll,
1490
+ indeterminate: p.indeterminate,
1491
+ id: "all",
1492
+ disabled: S.disabled,
1493
+ onChange: b
1494
+ }, {
1495
+ default: n(() => t[1] || (t[1] = [
1496
+ W("span", null, "全选", -1)
1497
+ ])),
1498
+ _: 1,
1499
+ __: [1]
1500
+ }, 8, ["model-value", "indeterminate", "disabled"]),
1501
+ l(e(D), {
1502
+ loading: e(A),
1503
+ text: "",
1504
+ size: "small",
1505
+ onRefresh: t[0] || (t[0] = (_) => e(x)(!0))
1506
+ }, null, 8, ["loading"])
1507
+ ]),
1508
+ _: 1
1509
+ }),
1510
+ l(u, {
1511
+ direction: "vertical",
1512
+ alignment: "start"
1513
+ }, {
1514
+ default: n(() => [
1515
+ (O(!0), I(B, null, j(e(g), (_) => (O(), I("div", {
1516
+ key: _.id
1517
+ }, [
1518
+ l(u, {
1519
+ direction: "horizontal",
1520
+ size: 2
1521
+ }, {
1522
+ default: n(() => [
1523
+ l(r, {
1524
+ style: { "min-width": "150px" },
1525
+ "model-value": p.MenuAll[_.id],
1526
+ disabled: S.disabled || !_.rules || _.rules.length <= 0,
1527
+ indeterminate: p.MenuIndeterminate[_.id],
1528
+ onChange: (v) => V(v, _.id)
1529
+ }, {
1530
+ default: n(() => [
1531
+ l(m, { style: { "font-size": "15px" } }, {
1532
+ default: n(() => [
1533
+ K(ae(_.translate), 1)
1534
+ ]),
1535
+ _: 2
1536
+ }, 1024)
1537
+ ]),
1538
+ _: 2
1539
+ }, 1032, ["model-value", "disabled", "indeterminate", "onChange"]),
1540
+ l(M, { direction: "vertical" }),
1541
+ _.rules ? (O(), E(h, {
1542
+ key: 0,
1543
+ modelValue: p.MenuList[_.id],
1544
+ "onUpdate:modelValue": (v) => p.MenuList[_.id] = v,
1545
+ disabled: S.disabled,
1546
+ style: { margin: "auto" }
1547
+ }, {
1548
+ default: n(() => [
1549
+ (O(!0), I(B, null, j(_.rules, (v) => (O(), E(r, {
1550
+ key: v.key,
1551
+ value: v.key
1552
+ }, {
1553
+ default: n(() => [
1554
+ W("div", Ie, ae(v.translate), 1)
1555
+ ]),
1556
+ _: 2
1557
+ }, 1032, ["value"]))), 128))
1558
+ ]),
1559
+ _: 2
1560
+ }, 1032, ["modelValue", "onUpdate:modelValue", "disabled"])) : he("", !0)
1561
+ ]),
1562
+ _: 2
1563
+ }, 1024)
1564
+ ]))), 128))
1565
+ ]),
1566
+ _: 1
1567
+ })
1568
+ ]);
1569
+ };
1570
+ }
1571
+ }), De = /* @__PURE__ */ z({
1572
+ __name: "info",
1573
+ emits: ["refresh"],
1574
+ setup(S, { expose: R, emit: w }) {
1575
+ const A = w, o = te(), s = N({
1576
+ key: "",
1577
+ module: "",
1578
+ sort: 0,
1579
+ name: "",
1580
+ en_name: "",
1581
+ translate: "",
1582
+ remark: "",
1583
+ rules: []
1584
+ }), c = {
1585
+ name: [
1586
+ { required: !0, message: a("base.placeholder.input base.name"), trigger: "blur" }
1587
+ ],
1588
+ en_name: [
1589
+ { required: !0, message: a("base.placeholder.input base.en_name"), trigger: "blur" }
1590
+ ]
1591
+ }, { modal: p, title: g, form: x, requesting: C, executing: b, open: V, modify: y, submit: U, closed: k } = F(
1592
+ A,
1593
+ s,
1594
+ de
1595
+ ), i = (r) => {
1596
+ r ? (s.key = r, y()) : V();
1597
+ }, t = () => {
1598
+ var r;
1599
+ (r = o.value) == null || r.cleanChecked(), k();
1600
+ };
1601
+ return R({
1602
+ openOrModify: i
1603
+ }), (r, u) => {
1604
+ const m = d("el-input"), M = d("el-form-item"), h = d("el-col"), _ = d("el-input-number"), v = d("el-row"), f = d("el-form");
1605
+ return O(), E(e(Y), {
1606
+ modelValue: e(p),
1607
+ "onUpdate:modelValue": u[6] || (u[6] = (L) => T(p) ? p.value = L : null),
1608
+ title: e(g)(),
1609
+ width: "900px",
1610
+ executing: e(b),
1611
+ onClosed: t,
1612
+ onSubmit: e(U)
1613
+ }, {
1614
+ default: n(() => [
1615
+ l(f, {
1616
+ ref_key: "form",
1617
+ ref: x,
1618
+ model: s,
1619
+ "label-width": "auto",
1620
+ rules: c,
1621
+ disabled: e(C) || e(b)
1622
+ }, {
1623
+ default: n(() => [
1624
+ l(v, { gutter: 20 }, {
1625
+ default: n(() => [
1626
+ l(h, { span: 12 }, {
1627
+ default: n(() => [
1628
+ l(M, {
1629
+ label: e(a)("base.module"),
1630
+ prop: "module"
1631
+ }, {
1632
+ default: n(() => [
1633
+ l(m, {
1634
+ modelValue: s.module,
1635
+ "onUpdate:modelValue": u[0] || (u[0] = (L) => s.module = L),
1636
+ placeholder: e(a)("base.placeholder.input")
1637
+ }, null, 8, ["modelValue", "placeholder"])
1638
+ ]),
1639
+ _: 1
1640
+ }, 8, ["label"])
1641
+ ]),
1642
+ _: 1
1643
+ }),
1644
+ l(h, { span: 12 }, {
1645
+ default: n(() => [
1646
+ l(M, {
1647
+ label: e(a)("base.sort"),
1648
+ prop: "sort"
1649
+ }, {
1650
+ default: n(() => [
1651
+ l(_, {
1652
+ modelValue: s.sort,
1653
+ "onUpdate:modelValue": u[1] || (u[1] = (L) => s.sort = L),
1654
+ min: 0,
1655
+ placeholder: e(a)("base.placeholder.input")
1656
+ }, null, 8, ["modelValue", "placeholder"])
1657
+ ]),
1658
+ _: 1
1659
+ }, 8, ["label"])
1660
+ ]),
1661
+ _: 1
1662
+ })
1663
+ ]),
1664
+ _: 1
1665
+ }),
1666
+ l(M, {
1667
+ label: e(a)("base.name"),
1668
+ prop: "name"
1669
+ }, {
1670
+ default: n(() => [
1671
+ l(m, {
1672
+ modelValue: s.name,
1673
+ "onUpdate:modelValue": u[2] || (u[2] = (L) => s.name = L),
1674
+ placeholder: e(a)("base.placeholder.input")
1675
+ }, null, 8, ["modelValue", "placeholder"])
1676
+ ]),
1677
+ _: 1
1678
+ }, 8, ["label"]),
1679
+ l(M, {
1680
+ label: e(a)("base.en_name"),
1681
+ prop: "en_name"
1682
+ }, {
1683
+ default: n(() => [
1684
+ l(m, {
1685
+ modelValue: s.en_name,
1686
+ "onUpdate:modelValue": u[3] || (u[3] = (L) => s.en_name = L),
1687
+ placeholder: e(a)("base.placeholder.input")
1688
+ }, null, 8, ["modelValue", "placeholder"])
1689
+ ]),
1690
+ _: 1
1691
+ }, 8, ["label"]),
1692
+ l(M, {
1693
+ label: e(a)("base.remark"),
1694
+ prop: "remark"
1695
+ }, {
1696
+ default: n(() => [
1697
+ l(m, {
1698
+ modelValue: s.remark,
1699
+ "onUpdate:modelValue": u[4] || (u[4] = (L) => s.remark = L),
1700
+ placeholder: e(a)("base.placeholder.input")
1701
+ }, null, 8, ["modelValue", "placeholder"])
1702
+ ]),
1703
+ _: 1
1704
+ }, 8, ["label"]),
1705
+ l(M, {
1706
+ label: e(a)("base.rules"),
1707
+ prop: "rules"
1708
+ }, {
1709
+ default: n(() => [
1710
+ l(Te, {
1711
+ ref_key: "rulesCheck",
1712
+ ref: o,
1713
+ modelValue: s.rules,
1714
+ "onUpdate:modelValue": u[5] || (u[5] = (L) => s.rules = L),
1715
+ disabled: e(C) || e(b)
1716
+ }, null, 8, ["modelValue", "disabled"])
1717
+ ]),
1718
+ _: 1
1719
+ }, 8, ["label"])
1720
+ ]),
1721
+ _: 1
1722
+ }, 8, ["model", "disabled"])
1723
+ ]),
1724
+ _: 1
1725
+ }, 8, ["modelValue", "title", "executing", "onSubmit"]);
1726
+ };
1727
+ }
1728
+ }), Ke = /* @__PURE__ */ z({
1729
+ __name: "index",
1730
+ setup(S) {
1731
+ const R = {
1732
+ keyword: ""
1733
+ }, w = [
1734
+ {
1735
+ label: a("base.sort"),
1736
+ prop: "sort",
1737
+ width: 80
1738
+ },
1739
+ {
1740
+ label: a("base.module"),
1741
+ prop: "module",
1742
+ width: 120
1743
+ },
1744
+ {
1745
+ label: a("base.name"),
1746
+ prop: "translate",
1747
+ width: 120
1748
+ },
1749
+ // name 字段优先查看实体内是否有 translate 无则使用name
1750
+ {
1751
+ label: a("base.remark"),
1752
+ prop: "remark",
1753
+ width: 0
1754
+ },
1755
+ {
1756
+ label: a("base.created_at"),
1757
+ prop: "created_at",
1758
+ width: 180
1759
+ },
1760
+ {
1761
+ prop: "action",
1762
+ label: a("base.action"),
1763
+ width: 60,
1764
+ align: "center",
1765
+ render: ({
1766
+ row: b
1767
+ }) => l(J, {
1768
+ onModify: () => C(b.key)
1769
+ }, null)
1770
+ }
1771
+ ], {
1772
+ tableRef: A,
1773
+ infoRef: o,
1774
+ keyword: s,
1775
+ search: c,
1776
+ refresh: p,
1777
+ reset: g,
1778
+ openInfo: x,
1779
+ modifyInfo: C
1780
+ } = P(R);
1781
+ return (b, V) => {
1782
+ const y = d("el-input"), U = d("el-space"), k = d("el-card");
1783
+ return O(), E(k, {
1784
+ class: "basic-card flex-full",
1785
+ "body-class": "flex-1"
1786
+ }, {
1787
+ header: n(() => [l(U, {
1788
+ class: "search-bar"
1789
+ }, {
1790
+ default: n(() => [l(e(D), {
1791
+ onRefresh: e(p)
1792
+ }, null, 8, ["onRefresh"]), l(e(Z), {
1793
+ onOpen: e(x)
1794
+ }, null, 8, ["onOpen"]), l(y, {
1795
+ class: "basic-search-input",
1796
+ modelValue: e(s).keyword,
1797
+ "onUpdate:modelValue": V[0] || (V[0] = (i) => e(s).keyword = i),
1798
+ placeholder: e(a)("base.placeholder.keyword"),
1799
+ clearable: "",
1800
+ onKeyup: H(e(c), ["enter"]),
1801
+ onClear: e(c)
1802
+ }, null, 8, ["modelValue", "placeholder", "onKeyup", "onClear"]), l(e(ee), {
1803
+ onSearch: e(c)
1804
+ }, null, 8, ["onSearch"]), l(e(le), {
1805
+ onReset: e(g)
1806
+ }, null, 8, ["onReset"])]),
582
1807
  _: 1
583
1808
  })]),
584
- default: n(() => [e(l(Z), {
585
- ref_key: "proTableRef",
586
- ref: i,
1809
+ default: n(() => [l(e(Q), {
1810
+ ref_key: "tableRef",
1811
+ ref: A,
587
1812
  size: "small",
588
- columns: v,
589
- url: l(_).urls[l(ee)],
590
- "search-param": a.value,
1813
+ columns: w,
1814
+ url: e(de).urls[e(X)],
1815
+ "search-param": e(s),
591
1816
  autoSearch: ""
592
- }, null, 8, ["url", "search-param"]), e(ne, {
1817
+ }, null, 8, ["url", "search-param"]), l(De, {
593
1818
  ref_key: "infoRef",
594
- ref: h,
595
- onRefresh: k
596
- }, null, 512)]),
1819
+ ref: o,
1820
+ onRefresh: e(g)
1821
+ }, null, 8, ["onRefresh"])]),
597
1822
  _: 1
598
1823
  });
599
1824
  };
600
1825
  }
601
- }), de = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1826
+ }), Be = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
602
1827
  __proto__: null,
603
- default: re
604
- }, Symbol.toStringTag, { value: "Module" })), me = {
605
- install: (m, g) => {
606
- Reflect.ownKeys(m._context.provides).some((i) => String(i) === "Symbol(pinia)") || console.warn("Pinia is not provided. Please install and provide Pinia in your app."), console.log(Reflect.ownKeys(m._context.provides));
1828
+ default: Ke
1829
+ }, Symbol.toStringTag, { value: "Module" })), Pe = {
1830
+ install: (S, R) => {
1831
+ Reflect.ownKeys(S._context.provides).some((w) => String(w) === "Symbol(pinia)") || console.warn("Pinia is not provided. Please install and provide Pinia in your app."), console.log(Reflect.ownKeys(S._context.provides));
607
1832
  },
608
1833
  version: "__VERSION__"
609
- }, ie = /* @__PURE__ */ Object.assign({ "./views/menus/index.vue": de });
1834
+ }, Fe = /* @__PURE__ */ Object.assign({ "./views/admin/index.vue": we, "./views/language/index.vue": Re, "./views/menu/index.vue": ze, "./views/role/index.vue": Be });
610
1835
  export {
611
- re as MenusPage,
612
- ie as basicModules,
613
- me as default
1836
+ Ee as MenusPage,
1837
+ Ke as RolesPage,
1838
+ Fe as basicModules,
1839
+ Pe as default
614
1840
  };