auto-vue-basic 0.0.39 → 0.0.41

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