jmash-core 0.0.40 → 0.0.42
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{401-CEl3xZ9U.mjs → 401-CJFCHgSZ.mjs} +2 -2
- package/dist/{404-BJI4jQGp.mjs → 404-CIMxkP9D.mjs} +1 -1
- package/dist/{BarChart-DdL2YjH9.mjs → BarChart-DU09mkLm.mjs} +2 -2
- package/dist/{PieChart-DpRLzU_D.mjs → PieChart-CoqFm60I.mjs} +1 -1
- package/dist/{PieChart.vue_vue_type_script_setup_true_lang-Db-lqTD8.mjs → PieChart.vue_vue_type_script_setup_true_lang-sfYOFNKO.mjs} +2 -2
- package/dist/{RadarChart-2a1QGb0r.mjs → RadarChart-0WISsxpt.mjs} +1 -1
- package/dist/{RadarChart.vue_vue_type_script_setup_true_lang-CwF9slnO.mjs → RadarChart.vue_vue_type_script_setup_true_lang-BIOHXswr.mjs} +2 -2
- package/dist/{el-card-FMIPeWk6.mjs → el-card-DTXS4SWb.mjs} +1 -1
- package/dist/{el-col-8K1Xv7aq.mjs → el-col-C1oER81S.mjs} +1 -1
- package/dist/{el-form-item-J_27GFln.mjs → el-form-item-CJcAbcqr.mjs} +76 -76
- package/dist/{index-BB9i38wB.mjs → index-BAk-5oG9.mjs} +1 -1
- package/dist/{index--oHFkGGF.mjs → index-BwIx8FCt.mjs} +32 -32
- package/dist/{index-C_arFWKZ.mjs → index-C195Pa7c.mjs} +9759 -11332
- package/dist/{index-Ca93omwQ.mjs → index-DB4OW-7Q.mjs} +980 -944
- package/dist/{index-BUndPokw.mjs → index-ORr19rEl.mjs} +42 -42
- package/dist/index.mjs +36 -36
- package/dist/index.vue_vue_type_script_setup_true_lang-fPrQh0lj.mjs +720 -0
- package/dist/{picture-BQKPWIIU.mjs → picture-Cpgh-vo-.mjs} +106 -106
- package/dist/{position-DZbY0x3r.mjs → position-M0AZIV5D.mjs} +1 -1
- package/dist/profile-DBegP-cF.mjs +4904 -0
- package/dist/{runAs-DSfasz8M.mjs → runAs-xhA9mf-i.mjs} +1 -1
- package/dist/runAs.vue_vue_type_script_setup_true_lang-DLfQ0lsg.mjs +610 -0
- package/dist/style.css +1 -1
- package/dist/{types-BHZ78WKD.mjs → types-FkPgztcJ.mjs} +4 -3
- package/dist/{updatePwd-D2U2rq9Q.mjs → updatePwd-D1EnTbTY.mjs} +1 -1
- package/dist/{updatePwd.vue_vue_type_script_setup_true_lang-HlhGZun3.mjs → updatePwd.vue_vue_type_script_setup_true_lang-DkH3J5K0.mjs} +20 -20
- package/dts/src/api/auth/index.d.ts +27 -2
- package/dts/src/api/auth/types.d.ts +42 -34
- package/dts/src/index.d.ts +3 -4
- package/dts/src/lang/package/zh-cn.d.ts +2 -0
- package/dts/src/types/index.d.ts +7 -0
- package/dts/src/utils/request.d.ts +2 -0
- package/package.json +1 -1
- package/dist/edit-BEz2CGVA.mjs +0 -4
- package/dist/edit-BfCUuHU7.mjs +0 -823
- package/dist/edit-BjIGOyRY.mjs +0 -4
- package/dist/edit-ByyeESA7.mjs +0 -4
- package/dist/edit-DCqdRa7R.mjs +0 -4
- package/dist/edit-DaPZ7RSc.mjs +0 -4
- package/dist/edit-Mg7mOWDc.mjs +0 -4
- package/dist/edit-voW3EO87.mjs +0 -459
- package/dist/edit.vue_vue_type_script_setup_true_lang-BCgNC4mY.mjs +0 -136
- package/dist/edit.vue_vue_type_script_setup_true_lang-BMYBrnHy.mjs +0 -280
- package/dist/edit.vue_vue_type_script_setup_true_lang-C-WS99W7.mjs +0 -157
- package/dist/edit.vue_vue_type_script_setup_true_lang-CylQxP9Z.mjs +0 -226
- package/dist/edit.vue_vue_type_script_setup_true_lang-DDCQNqdc.mjs +0 -593
- package/dist/edit.vue_vue_type_script_setup_true_lang-DyO-f1Lc.mjs +0 -216
- package/dist/el-checkbox-group-l0sNRNKZ.mjs +0 -1
- package/dist/el-date-picker-CHigi6WN.mjs +0 -3345
- package/dist/el-divider-Cg4Mgsu-.mjs +0 -45
- package/dist/el-dropdown-item-DHcRJ-Fg.mjs +0 -671
- package/dist/el-tree-select-C4cU2Ot7.mjs +0 -1313
- package/dist/index-9e59vbzb.mjs +0 -949
- package/dist/index-B5IfrzOt.mjs +0 -63
- package/dist/index-BcxeqvFF.mjs +0 -505
- package/dist/index-BoT8a4D9.mjs +0 -480
- package/dist/index-BzsE8aZb.mjs +0 -280
- package/dist/index-CKu3Vm7Y.mjs +0 -246
- package/dist/index-CPi9CcGt.mjs +0 -134
- package/dist/index-CdarTP7Q.mjs +0 -471
- package/dist/index-D3kdKwxs.mjs +0 -292
- package/dist/index-D7uxePGV.mjs +0 -501
- package/dist/index-DSwTLzp1.mjs +0 -74
- package/dist/index-Dd9wDjLG.mjs +0 -280
- package/dist/index-DdnQhmYX.mjs +0 -502
- package/dist/index-DsmvLyNJ.mjs +0 -93
- package/dist/index-VD2Oa87u.mjs +0 -280
- package/dist/index.vue_vue_type_script_setup_true_lang-BUTwLlja.mjs +0 -55
- package/dist/moment-CMYwqyVT.mjs +0 -2579
- package/dist/profile-Blgfj6Pw.mjs +0 -262
- package/dist/runAs.vue_vue_type_script_setup_true_lang-xOMc-WaC.mjs +0 -114
package/dist/edit-BjIGOyRY.mjs
DELETED
package/dist/edit-ByyeESA7.mjs
DELETED
package/dist/edit-DCqdRa7R.mjs
DELETED
package/dist/edit-DaPZ7RSc.mjs
DELETED
package/dist/edit-Mg7mOWDc.mjs
DELETED
package/dist/edit-voW3EO87.mjs
DELETED
|
@@ -1,459 +0,0 @@
|
|
|
1
|
-
import { $ as O, b0 as ie, bG as ce, a$ as fe, bH as ye, bI as _e, s as he, aM as be, E as Re, as as ge, at as Ce, b1 as ve, b2 as Ve, b3 as Ie, b4 as Ee, t as De, al as ke, a4 as $e } from "./index-C_arFWKZ.mjs";
|
|
2
|
-
import "./el-checkbox-group-l0sNRNKZ.mjs";
|
|
3
|
-
import { E as we } from "./el-tree-select-C4cU2Ot7.mjs";
|
|
4
|
-
import { E as qe, a as Ne } from "./el-col-8K1Xv7aq.mjs";
|
|
5
|
-
import { E as Te, a as Ue } from "./el-form-item-J_27GFln.mjs";
|
|
6
|
-
import { defineComponent as Me, ref as i, reactive as L, toRef as Fe, resolveComponent as G, openBlock as p, createBlock as h, withCtx as a, createElementVNode as D, createVNode as t, createTextVNode as C, toDisplayString as b, unref as n, createElementBlock as k, Fragment as $, renderList as w, createCommentVNode as Ae } from "vue";
|
|
7
|
-
import { ElMessage as H } from "element-plus";
|
|
8
|
-
import { useI18n as Se } from "vue-i18n";
|
|
9
|
-
import { m as Be } from "./index-DsmvLyNJ.mjs";
|
|
10
|
-
import { p as Pe } from "./index-DSwTLzp1.mjs";
|
|
11
|
-
const je = { class: "positon_name" }, ze = { class: "plus-position" }, Oe = { class: "dialog-footer" }, Le = /* @__PURE__ */ Me({
|
|
12
|
-
__name: "edit",
|
|
13
|
-
props: {
|
|
14
|
-
formData: {
|
|
15
|
-
type: Object,
|
|
16
|
-
default: () => {
|
|
17
|
-
}
|
|
18
|
-
},
|
|
19
|
-
dialog: {
|
|
20
|
-
type: Object,
|
|
21
|
-
default: () => {
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
},
|
|
25
|
-
emits: ["dialogEvent", "refresh"],
|
|
26
|
-
setup(J, { emit: K }) {
|
|
27
|
-
var A;
|
|
28
|
-
const { t: c } = Se(), q = i();
|
|
29
|
-
let N = i([]);
|
|
30
|
-
const v = i(), T = i(), V = i(!1), I = i(!1);
|
|
31
|
-
let f = i([]), l = L({
|
|
32
|
-
tenant: O().user.tenant,
|
|
33
|
-
requestId: Math.random() * 10 + "",
|
|
34
|
-
roleType: "role",
|
|
35
|
-
updateMask: "roleCode,roleName,parentId,description",
|
|
36
|
-
roleCode: "",
|
|
37
|
-
roleName: "",
|
|
38
|
-
parentId: "",
|
|
39
|
-
description: "",
|
|
40
|
-
permCodes: [],
|
|
41
|
-
roleDuty: [
|
|
42
|
-
{
|
|
43
|
-
roleId: "",
|
|
44
|
-
dutyType: ""
|
|
45
|
-
}
|
|
46
|
-
]
|
|
47
|
-
});
|
|
48
|
-
const Q = L({
|
|
49
|
-
roleCode: [{ required: !0, validator: (e, o, s) => {
|
|
50
|
-
if (o === "")
|
|
51
|
-
s(new Error(c("sysRole.codeRequired")));
|
|
52
|
-
else {
|
|
53
|
-
const m = {
|
|
54
|
-
tenant: O().user.tenant,
|
|
55
|
-
roleCode: o,
|
|
56
|
-
addFlag: !l.roleId,
|
|
57
|
-
roleId: l.roleId
|
|
58
|
-
};
|
|
59
|
-
ie(m).then(({ data: u }) => {
|
|
60
|
-
u === !0 ? s(new Error(c("sysRole.codeExist"))) : s();
|
|
61
|
-
});
|
|
62
|
-
}
|
|
63
|
-
}, trigger: "blur" }],
|
|
64
|
-
roleName: [
|
|
65
|
-
{ required: !0, message: c("sysRole.nameRequired"), trigger: "blur" }
|
|
66
|
-
]
|
|
67
|
-
}), y = K, R = J, E = Fe(R, "dialog");
|
|
68
|
-
function W() {
|
|
69
|
-
var e;
|
|
70
|
-
ce((e = R.formData) == null ? void 0 : e.roleId).then(({ data: o }) => {
|
|
71
|
-
v.value = o.results;
|
|
72
|
-
}), Be().then(({ data: o }) => {
|
|
73
|
-
N.value = o.results;
|
|
74
|
-
});
|
|
75
|
-
}
|
|
76
|
-
function X(e) {
|
|
77
|
-
fe(e).then(({ data: o }) => {
|
|
78
|
-
console.log(o), l.permCodes = o.permCodes;
|
|
79
|
-
});
|
|
80
|
-
}
|
|
81
|
-
function Y() {
|
|
82
|
-
U();
|
|
83
|
-
}
|
|
84
|
-
function U() {
|
|
85
|
-
Pe(l.moduleId).then(({ data: e }) => {
|
|
86
|
-
T.value = e.results, M(e.results);
|
|
87
|
-
});
|
|
88
|
-
}
|
|
89
|
-
function Z() {
|
|
90
|
-
var e;
|
|
91
|
-
l.roleDuty && l.roleDuty.length < 5 && ((e = l.roleDuty) == null || e.push({
|
|
92
|
-
roleId: "",
|
|
93
|
-
dutyType: ""
|
|
94
|
-
}));
|
|
95
|
-
}
|
|
96
|
-
function x(e) {
|
|
97
|
-
var o;
|
|
98
|
-
(o = l.roleDuty) == null || o.splice(e, 1);
|
|
99
|
-
}
|
|
100
|
-
function M(e) {
|
|
101
|
-
for (let o = 0; o < e.length; o++) {
|
|
102
|
-
for (let s = 0; s < e[o].perms.length; s++)
|
|
103
|
-
f.value.push(e[o].perms[s].permCode);
|
|
104
|
-
M(e[o].children);
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
function ee(e) {
|
|
108
|
-
console.log(e, f.value), l.permCodes = e ? f.value : [], I.value = !1;
|
|
109
|
-
}
|
|
110
|
-
function le(e) {
|
|
111
|
-
console.log(e), l.permCodes = e, console.log(l.permCodes);
|
|
112
|
-
const o = e.length;
|
|
113
|
-
V.value = o === f.value.length, I.value = o > 0 && o < f.value.length;
|
|
114
|
-
}
|
|
115
|
-
const oe = async () => {
|
|
116
|
-
var e;
|
|
117
|
-
await ((e = q.value) == null ? void 0 : e.validate((o) => {
|
|
118
|
-
o && (l.roleId ? ye(l).then((s) => {
|
|
119
|
-
console.log(s), s.status === 200 && (H({
|
|
120
|
-
message: c("common.submitSuccess"),
|
|
121
|
-
type: "success"
|
|
122
|
-
}), y("dialogEvent", !1), y("refresh", s.status === 200));
|
|
123
|
-
}) : _e(l).then((s) => {
|
|
124
|
-
console.log(s), s.status === 200 && (H({
|
|
125
|
-
message: c("common.submitSuccess"),
|
|
126
|
-
type: "success"
|
|
127
|
-
}), y("dialogEvent", !1), y("refresh", s.status === 200));
|
|
128
|
-
}));
|
|
129
|
-
}));
|
|
130
|
-
};
|
|
131
|
-
function F() {
|
|
132
|
-
y("dialogEvent", !1);
|
|
133
|
-
}
|
|
134
|
-
return (A = R.formData) != null && A.roleId && (l = Object.assign(l, R.formData), l.roleDuty = l.roleDutyModel && l.roleDutyModel.length > 0 ? l.roleDutyModel : l.roleDuty = [
|
|
135
|
-
{
|
|
136
|
-
roleId: "",
|
|
137
|
-
dutyType: ""
|
|
138
|
-
}
|
|
139
|
-
], l.parentId === "00000000-0000-0000-0000-000000000000" && (l.parentId = "")), W(), U(), (e, o) => {
|
|
140
|
-
const s = he, m = Te, u = qe, _ = Ne, S = we, te = be, ae = G("Remove"), B = Re, re = G("CirclePlus"), se = ge, ne = Ce, P = ve, j = Ve, de = Ie, ue = Ee, me = Ue, z = De, pe = ke;
|
|
141
|
-
return p(), h(pe, {
|
|
142
|
-
modelValue: E.value.visible,
|
|
143
|
-
"onUpdate:modelValue": o[7] || (o[7] = (r) => E.value.visible = r),
|
|
144
|
-
title: E.value.title,
|
|
145
|
-
width: "1000px",
|
|
146
|
-
onClose: F
|
|
147
|
-
}, {
|
|
148
|
-
footer: a(() => [
|
|
149
|
-
D("div", Oe, [
|
|
150
|
-
t(z, { onClick: F }, {
|
|
151
|
-
default: a(() => [
|
|
152
|
-
C(b(e.$t("common.cancel")), 1)
|
|
153
|
-
]),
|
|
154
|
-
_: 1
|
|
155
|
-
}),
|
|
156
|
-
t(z, {
|
|
157
|
-
type: "primary",
|
|
158
|
-
onClick: oe
|
|
159
|
-
}, {
|
|
160
|
-
default: a(() => [
|
|
161
|
-
C(b(e.$t("common.confirm")), 1)
|
|
162
|
-
]),
|
|
163
|
-
_: 1
|
|
164
|
-
})
|
|
165
|
-
])
|
|
166
|
-
]),
|
|
167
|
-
default: a(() => [
|
|
168
|
-
t(me, {
|
|
169
|
-
ref_key: "roleFormRef",
|
|
170
|
-
ref: q,
|
|
171
|
-
model: n(l),
|
|
172
|
-
rules: Q,
|
|
173
|
-
"label-width": "170"
|
|
174
|
-
}, {
|
|
175
|
-
default: a(() => [
|
|
176
|
-
t(_, null, {
|
|
177
|
-
default: a(() => [
|
|
178
|
-
t(u, { span: 12 }, {
|
|
179
|
-
default: a(() => [
|
|
180
|
-
t(m, {
|
|
181
|
-
label: e.$t("sysRole.code"),
|
|
182
|
-
prop: "roleCode"
|
|
183
|
-
}, {
|
|
184
|
-
default: a(() => [
|
|
185
|
-
t(s, {
|
|
186
|
-
modelValue: n(l).roleCode,
|
|
187
|
-
"onUpdate:modelValue": o[0] || (o[0] = (r) => n(l).roleCode = r),
|
|
188
|
-
maxlength: "30",
|
|
189
|
-
"show-word-limit": "",
|
|
190
|
-
clearable: "",
|
|
191
|
-
placeholder: e.$t("sysRole.codeRequired")
|
|
192
|
-
}, null, 8, ["modelValue", "placeholder"])
|
|
193
|
-
]),
|
|
194
|
-
_: 1
|
|
195
|
-
}, 8, ["label"])
|
|
196
|
-
]),
|
|
197
|
-
_: 1
|
|
198
|
-
}),
|
|
199
|
-
t(u, { span: 12 }, {
|
|
200
|
-
default: a(() => [
|
|
201
|
-
t(m, {
|
|
202
|
-
label: e.$t("sysRole.name"),
|
|
203
|
-
prop: "roleName"
|
|
204
|
-
}, {
|
|
205
|
-
default: a(() => [
|
|
206
|
-
t(s, {
|
|
207
|
-
modelValue: n(l).roleName,
|
|
208
|
-
"onUpdate:modelValue": o[1] || (o[1] = (r) => n(l).roleName = r),
|
|
209
|
-
clearable: "",
|
|
210
|
-
maxlength: "30",
|
|
211
|
-
"show-word-limit": "",
|
|
212
|
-
placeholder: e.$t("sysRole.nameRequired")
|
|
213
|
-
}, null, 8, ["modelValue", "placeholder"])
|
|
214
|
-
]),
|
|
215
|
-
_: 1
|
|
216
|
-
}, 8, ["label"])
|
|
217
|
-
]),
|
|
218
|
-
_: 1
|
|
219
|
-
})
|
|
220
|
-
]),
|
|
221
|
-
_: 1
|
|
222
|
-
}),
|
|
223
|
-
t(_, null, {
|
|
224
|
-
default: a(() => [
|
|
225
|
-
t(u, { span: 24 }, {
|
|
226
|
-
default: a(() => [
|
|
227
|
-
t(m, {
|
|
228
|
-
label: e.$t("sysRole.parent"),
|
|
229
|
-
prop: "parentId"
|
|
230
|
-
}, {
|
|
231
|
-
default: a(() => [
|
|
232
|
-
t(S, {
|
|
233
|
-
modelValue: n(l).parentId,
|
|
234
|
-
"onUpdate:modelValue": o[2] || (o[2] = (r) => n(l).parentId = r),
|
|
235
|
-
data: v.value,
|
|
236
|
-
"render-after-expand": !1,
|
|
237
|
-
filterable: "",
|
|
238
|
-
clearable: "",
|
|
239
|
-
"check-strictly": "",
|
|
240
|
-
style: { width: "100%" },
|
|
241
|
-
placeholder: e.$t("sysRole.parentRequired"),
|
|
242
|
-
onChange: X
|
|
243
|
-
}, null, 8, ["modelValue", "data", "placeholder"])
|
|
244
|
-
]),
|
|
245
|
-
_: 1
|
|
246
|
-
}, 8, ["label"])
|
|
247
|
-
]),
|
|
248
|
-
_: 1
|
|
249
|
-
})
|
|
250
|
-
]),
|
|
251
|
-
_: 1
|
|
252
|
-
}),
|
|
253
|
-
D("div", je, [
|
|
254
|
-
(p(!0), k($, null, w(n(l).roleDuty, (r, d) => (p(), h(_, {
|
|
255
|
-
key: d,
|
|
256
|
-
style: { width: "100%" }
|
|
257
|
-
}, {
|
|
258
|
-
default: a(() => [
|
|
259
|
-
t(u, { span: 12 }, {
|
|
260
|
-
default: a(() => [
|
|
261
|
-
t(m, {
|
|
262
|
-
label: e.$t("sysRole.mutualType"),
|
|
263
|
-
prop: `roleDuty.${d}.dutyType`
|
|
264
|
-
}, {
|
|
265
|
-
default: a(() => [
|
|
266
|
-
t(te, {
|
|
267
|
-
modelValue: n(l).roleDuty[d].dutyType,
|
|
268
|
-
"onUpdate:modelValue": (g) => n(l).roleDuty[d].dutyType = g,
|
|
269
|
-
clearable: !0,
|
|
270
|
-
placeholder: e.$t("sysRole.mutualTypeRequired"),
|
|
271
|
-
"dict-type": "jmash.rbac.protobuf.DutyType"
|
|
272
|
-
}, null, 8, ["modelValue", "onUpdate:modelValue", "placeholder"])
|
|
273
|
-
]),
|
|
274
|
-
_: 2
|
|
275
|
-
}, 1032, ["label", "prop"])
|
|
276
|
-
]),
|
|
277
|
-
_: 2
|
|
278
|
-
}, 1024),
|
|
279
|
-
t(u, { span: 11 }, {
|
|
280
|
-
default: a(() => [
|
|
281
|
-
t(m, {
|
|
282
|
-
label: e.$t("sysRole.mutualRole"),
|
|
283
|
-
prop: `roleDuty.${d}.roleId`
|
|
284
|
-
}, {
|
|
285
|
-
default: a(() => [
|
|
286
|
-
t(S, {
|
|
287
|
-
modelValue: n(l).roleDuty[d].roleId,
|
|
288
|
-
"onUpdate:modelValue": (g) => n(l).roleDuty[d].roleId = g,
|
|
289
|
-
data: v.value,
|
|
290
|
-
filterable: "",
|
|
291
|
-
clearable: "",
|
|
292
|
-
"check-strictly": "",
|
|
293
|
-
"render-after-expand": !1,
|
|
294
|
-
style: { width: "100%" },
|
|
295
|
-
placeholder: e.$t("sysRole.mutualRoleRequired")
|
|
296
|
-
}, null, 8, ["modelValue", "onUpdate:modelValue", "data", "placeholder"])
|
|
297
|
-
]),
|
|
298
|
-
_: 2
|
|
299
|
-
}, 1032, ["label", "prop"])
|
|
300
|
-
]),
|
|
301
|
-
_: 2
|
|
302
|
-
}, 1024),
|
|
303
|
-
d !== 0 ? (p(), h(u, {
|
|
304
|
-
key: 0,
|
|
305
|
-
span: 1,
|
|
306
|
-
class: "position-center"
|
|
307
|
-
}, {
|
|
308
|
-
default: a(() => [
|
|
309
|
-
t(B, {
|
|
310
|
-
size: "16",
|
|
311
|
-
onClick: (g) => x(d)
|
|
312
|
-
}, {
|
|
313
|
-
default: a(() => [
|
|
314
|
-
t(ae)
|
|
315
|
-
]),
|
|
316
|
-
_: 2
|
|
317
|
-
}, 1032, ["onClick"])
|
|
318
|
-
]),
|
|
319
|
-
_: 2
|
|
320
|
-
}, 1024)) : Ae("", !0)
|
|
321
|
-
]),
|
|
322
|
-
_: 2
|
|
323
|
-
}, 1024))), 128)),
|
|
324
|
-
D("div", ze, [
|
|
325
|
-
t(B, {
|
|
326
|
-
size: "16",
|
|
327
|
-
onClick: Z
|
|
328
|
-
}, {
|
|
329
|
-
default: a(() => [
|
|
330
|
-
t(re)
|
|
331
|
-
]),
|
|
332
|
-
_: 1
|
|
333
|
-
})
|
|
334
|
-
])
|
|
335
|
-
]),
|
|
336
|
-
t(_, null, {
|
|
337
|
-
default: a(() => [
|
|
338
|
-
t(u, { span: 24 }, {
|
|
339
|
-
default: a(() => [
|
|
340
|
-
t(m, {
|
|
341
|
-
label: e.$t("sysRole.operatePerm"),
|
|
342
|
-
prop: "permCodes"
|
|
343
|
-
}, {
|
|
344
|
-
default: a(() => [
|
|
345
|
-
t(ne, {
|
|
346
|
-
modelValue: n(l).moduleId,
|
|
347
|
-
"onUpdate:modelValue": o[3] || (o[3] = (r) => n(l).moduleId = r),
|
|
348
|
-
placeholder: e.$t("sysRole.moduleRequired"),
|
|
349
|
-
clearable: "",
|
|
350
|
-
style: { width: "100%" },
|
|
351
|
-
onChange: Y
|
|
352
|
-
}, {
|
|
353
|
-
default: a(() => [
|
|
354
|
-
(p(!0), k($, null, w(n(N), (r) => (p(), h(se, {
|
|
355
|
-
key: r.moduleId,
|
|
356
|
-
label: r.moduleName,
|
|
357
|
-
value: r.moduleId
|
|
358
|
-
}, null, 8, ["label", "value"]))), 128))
|
|
359
|
-
]),
|
|
360
|
-
_: 1
|
|
361
|
-
}, 8, ["modelValue", "placeholder"]),
|
|
362
|
-
t(P, {
|
|
363
|
-
modelValue: V.value,
|
|
364
|
-
"onUpdate:modelValue": o[4] || (o[4] = (r) => V.value = r),
|
|
365
|
-
indeterminate: I.value,
|
|
366
|
-
onChange: ee
|
|
367
|
-
}, {
|
|
368
|
-
default: a(() => [
|
|
369
|
-
C(b(e.$t("sysRole.checkAll")) + "/" + b(e.$t("sysRole.checkNoAll")), 1)
|
|
370
|
-
]),
|
|
371
|
-
_: 1
|
|
372
|
-
}, 8, ["modelValue", "indeterminate"]),
|
|
373
|
-
t(ue, {
|
|
374
|
-
data: T.value,
|
|
375
|
-
"row-key": "resourceId",
|
|
376
|
-
border: "",
|
|
377
|
-
"show-header": !1,
|
|
378
|
-
"tree-props": { children: "children", hasChildren: "hasChildren" }
|
|
379
|
-
}, {
|
|
380
|
-
default: a(() => [
|
|
381
|
-
t(j, {
|
|
382
|
-
prop: "resourceName",
|
|
383
|
-
width: "230"
|
|
384
|
-
}),
|
|
385
|
-
t(j, null, {
|
|
386
|
-
default: a((r) => [
|
|
387
|
-
t(de, {
|
|
388
|
-
modelValue: n(l).permCodes,
|
|
389
|
-
"onUpdate:modelValue": o[5] || (o[5] = (d) => n(l).permCodes = d),
|
|
390
|
-
onChange: le
|
|
391
|
-
}, {
|
|
392
|
-
default: a(() => [
|
|
393
|
-
(p(!0), k($, null, w(r.row.perms, (d) => (p(), h(P, {
|
|
394
|
-
label: d.permCode,
|
|
395
|
-
key: d.permId
|
|
396
|
-
}, {
|
|
397
|
-
default: a(() => [
|
|
398
|
-
C(b(d.permName), 1)
|
|
399
|
-
]),
|
|
400
|
-
_: 2
|
|
401
|
-
}, 1032, ["label"]))), 128))
|
|
402
|
-
]),
|
|
403
|
-
_: 2
|
|
404
|
-
}, 1032, ["modelValue"])
|
|
405
|
-
]),
|
|
406
|
-
_: 1
|
|
407
|
-
})
|
|
408
|
-
]),
|
|
409
|
-
_: 1
|
|
410
|
-
}, 8, ["data"])
|
|
411
|
-
]),
|
|
412
|
-
_: 1
|
|
413
|
-
}, 8, ["label"])
|
|
414
|
-
]),
|
|
415
|
-
_: 1
|
|
416
|
-
})
|
|
417
|
-
]),
|
|
418
|
-
_: 1
|
|
419
|
-
}),
|
|
420
|
-
t(_, null, {
|
|
421
|
-
default: a(() => [
|
|
422
|
-
t(u, { span: 24 }, {
|
|
423
|
-
default: a(() => [
|
|
424
|
-
t(m, {
|
|
425
|
-
label: e.$t("sysRole.description"),
|
|
426
|
-
prop: "description"
|
|
427
|
-
}, {
|
|
428
|
-
default: a(() => [
|
|
429
|
-
t(s, {
|
|
430
|
-
modelValue: n(l).description,
|
|
431
|
-
"onUpdate:modelValue": o[6] || (o[6] = (r) => n(l).description = r),
|
|
432
|
-
type: "textarea",
|
|
433
|
-
autosize: { minRows: 2 },
|
|
434
|
-
maxlength: "200",
|
|
435
|
-
"show-word-limit": "",
|
|
436
|
-
placeholder: e.$t("sysRole.descriptionRequired"),
|
|
437
|
-
clearable: ""
|
|
438
|
-
}, null, 8, ["modelValue", "placeholder"])
|
|
439
|
-
]),
|
|
440
|
-
_: 1
|
|
441
|
-
}, 8, ["label"])
|
|
442
|
-
]),
|
|
443
|
-
_: 1
|
|
444
|
-
})
|
|
445
|
-
]),
|
|
446
|
-
_: 1
|
|
447
|
-
})
|
|
448
|
-
]),
|
|
449
|
-
_: 1
|
|
450
|
-
}, 8, ["model", "rules"])
|
|
451
|
-
]),
|
|
452
|
-
_: 1
|
|
453
|
-
}, 8, ["modelValue", "title"]);
|
|
454
|
-
};
|
|
455
|
-
}
|
|
456
|
-
}), ll = /* @__PURE__ */ $e(Le, [["__scopeId", "data-v-3b8d3293"]]);
|
|
457
|
-
export {
|
|
458
|
-
ll as default
|
|
459
|
-
};
|
|
@@ -1,136 +0,0 @@
|
|
|
1
|
-
import { $ as q, X as b, s as R, t as $, al as w } from "./index-C_arFWKZ.mjs";
|
|
2
|
-
import { E as D, a as F } from "./el-form-item-J_27GFln.mjs";
|
|
3
|
-
import { defineComponent as k, ref as S, reactive as y, toRef as U, openBlock as j, createBlock as B, unref as l, withCtx as a, createElementVNode as M, createVNode as s, createTextVNode as E, toDisplayString as V } from "vue";
|
|
4
|
-
import { useI18n as O } from "vue-i18n";
|
|
5
|
-
import { c as A, e as T, a as X } from "./index-DSwTLzp1.mjs";
|
|
6
|
-
const x = { class: "dialog-footer" }, Q = /* @__PURE__ */ k({
|
|
7
|
-
__name: "edit",
|
|
8
|
-
props: {
|
|
9
|
-
formData: {
|
|
10
|
-
type: Object,
|
|
11
|
-
default: () => {
|
|
12
|
-
}
|
|
13
|
-
},
|
|
14
|
-
dialog: {
|
|
15
|
-
type: Object,
|
|
16
|
-
default: () => {
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
},
|
|
20
|
-
emits: ["dialogEvent", "refresh"],
|
|
21
|
-
setup(C, { emit: h }) {
|
|
22
|
-
var g;
|
|
23
|
-
const { t: i } = O(), f = S();
|
|
24
|
-
let o = y({
|
|
25
|
-
tenant: q().user.tenant,
|
|
26
|
-
requestId: Math.random() * 10 + "",
|
|
27
|
-
permCode: "",
|
|
28
|
-
permName: "",
|
|
29
|
-
updateMask: "permCode,permName"
|
|
30
|
-
});
|
|
31
|
-
const v = y({
|
|
32
|
-
permCode: [{ required: !0, validator: (r, t, e) => {
|
|
33
|
-
t === "" ? e(new Error(i("sysPerm.codeRequired"))) : o.permId ? e() : A(t).then(({ data: n }) => {
|
|
34
|
-
n === !0 ? e(new Error("该编码已存在")) : e();
|
|
35
|
-
});
|
|
36
|
-
}, trigger: "blur" }],
|
|
37
|
-
permName: [
|
|
38
|
-
{ required: !0, message: i("sysPerm.nameRequired"), trigger: "blur" }
|
|
39
|
-
]
|
|
40
|
-
}), u = C, p = U(u, "dialog"), m = h, N = async () => {
|
|
41
|
-
var r;
|
|
42
|
-
await ((r = f.value) == null ? void 0 : r.validate((t) => {
|
|
43
|
-
t && (o.permId ? T(o).then((e) => {
|
|
44
|
-
console.log(e), e.status === 200 && (b({
|
|
45
|
-
message: i("common.submitSuccess"),
|
|
46
|
-
type: "success"
|
|
47
|
-
}), m("dialogEvent", !1), m("refresh", e.status === 200));
|
|
48
|
-
}) : X(o).then((e) => {
|
|
49
|
-
console.log(e), e.status === 200 && (b({
|
|
50
|
-
message: i("common.submitSuccess"),
|
|
51
|
-
type: "success"
|
|
52
|
-
}), m("dialogEvent", !1), m("refresh", e.status === 200));
|
|
53
|
-
}));
|
|
54
|
-
}));
|
|
55
|
-
};
|
|
56
|
-
function c() {
|
|
57
|
-
m("dialogEvent", !1);
|
|
58
|
-
}
|
|
59
|
-
return (g = u.formData) != null && g.permId && (o = Object.assign(o, u.formData)), (r, t) => {
|
|
60
|
-
const e = R, n = D, P = F, _ = $, I = w;
|
|
61
|
-
return j(), B(I, {
|
|
62
|
-
modelValue: l(p).visible,
|
|
63
|
-
"onUpdate:modelValue": t[2] || (t[2] = (d) => l(p).visible = d),
|
|
64
|
-
title: l(p).title,
|
|
65
|
-
width: "600px",
|
|
66
|
-
onClose: c
|
|
67
|
-
}, {
|
|
68
|
-
footer: a(() => [
|
|
69
|
-
M("div", x, [
|
|
70
|
-
s(_, { onClick: c }, {
|
|
71
|
-
default: a(() => [
|
|
72
|
-
E(V(r.$t("common.cancel")), 1)
|
|
73
|
-
]),
|
|
74
|
-
_: 1
|
|
75
|
-
}),
|
|
76
|
-
s(_, {
|
|
77
|
-
type: "primary",
|
|
78
|
-
onClick: N
|
|
79
|
-
}, {
|
|
80
|
-
default: a(() => [
|
|
81
|
-
E(V(r.$t("common.confirm")), 1)
|
|
82
|
-
]),
|
|
83
|
-
_: 1
|
|
84
|
-
})
|
|
85
|
-
])
|
|
86
|
-
]),
|
|
87
|
-
default: a(() => [
|
|
88
|
-
s(P, {
|
|
89
|
-
ref_key: "permissionFormRef",
|
|
90
|
-
ref: f,
|
|
91
|
-
model: l(o),
|
|
92
|
-
"label-width": "160px",
|
|
93
|
-
rules: l(v)
|
|
94
|
-
}, {
|
|
95
|
-
default: a(() => [
|
|
96
|
-
s(n, {
|
|
97
|
-
label: r.$t("sysPerm.code"),
|
|
98
|
-
prop: "permCode"
|
|
99
|
-
}, {
|
|
100
|
-
default: a(() => [
|
|
101
|
-
s(e, {
|
|
102
|
-
modelValue: l(o).permCode,
|
|
103
|
-
"onUpdate:modelValue": t[0] || (t[0] = (d) => l(o).permCode = d),
|
|
104
|
-
placeholder: r.$t("sysPerm.codeRequired"),
|
|
105
|
-
disabled: !!l(o).permId,
|
|
106
|
-
clearable: ""
|
|
107
|
-
}, null, 8, ["modelValue", "placeholder", "disabled"])
|
|
108
|
-
]),
|
|
109
|
-
_: 1
|
|
110
|
-
}, 8, ["label"]),
|
|
111
|
-
s(n, {
|
|
112
|
-
label: r.$t("sysPerm.name"),
|
|
113
|
-
prop: "permName"
|
|
114
|
-
}, {
|
|
115
|
-
default: a(() => [
|
|
116
|
-
s(e, {
|
|
117
|
-
modelValue: l(o).permName,
|
|
118
|
-
"onUpdate:modelValue": t[1] || (t[1] = (d) => l(o).permName = d),
|
|
119
|
-
placeholder: r.$t("sysPerm.nameRequired"),
|
|
120
|
-
clearable: ""
|
|
121
|
-
}, null, 8, ["modelValue", "placeholder"])
|
|
122
|
-
]),
|
|
123
|
-
_: 1
|
|
124
|
-
}, 8, ["label"])
|
|
125
|
-
]),
|
|
126
|
-
_: 1
|
|
127
|
-
}, 8, ["model", "rules"])
|
|
128
|
-
]),
|
|
129
|
-
_: 1
|
|
130
|
-
}, 8, ["modelValue", "title"]);
|
|
131
|
-
};
|
|
132
|
-
}
|
|
133
|
-
});
|
|
134
|
-
export {
|
|
135
|
-
Q as _
|
|
136
|
-
};
|