auto-vue-basic 0.0.37 → 0.0.39

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