jmash-core 0.0.2 → 0.0.4
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-DoLCxv3l.mjs +103 -0
- package/dist/404-D1KiG-19.mjs +37 -0
- package/dist/BarChart-C1VgkGMN.mjs +203 -0
- package/dist/FileSaver.min-CbZYb_R2.mjs +77 -0
- package/dist/FunnelChart-Czy2TVI1.mjs +106 -0
- package/dist/PieChart-D4hXD0SH.mjs +4 -0
- package/dist/PieChart.vue_vue_type_script_setup_true_lang-BzbbPmOh.mjs +90 -0
- package/dist/RadarChart-BIL7VT1H.mjs +4 -0
- package/dist/RadarChart.vue_vue_type_script_setup_true_lang-DcuctIiI.mjs +109 -0
- package/dist/_plugin-vue_export-helper-CHgC5LLL.mjs +9 -0
- package/dist/caret-bottom-Cm1qBSrY.mjs +59 -0
- package/dist/common-DuVBTwAv.mjs +36 -0
- package/dist/debounce-C0G0JMal.mjs +81 -0
- package/dist/dropdown2-BiRFTrOq.mjs +160 -0
- package/dist/edit-Bpt21Eir.mjs +833 -0
- package/dist/edit-CYWeo3RE.mjs +4 -0
- package/dist/edit-Cde8RIRN.mjs +4 -0
- package/dist/edit-D3-EslTs.mjs +4 -0
- package/dist/edit-DLx0iRHQ.mjs +469 -0
- package/dist/edit-NICINRFG.mjs +4 -0
- package/dist/edit-Vk23bJyE.mjs +4 -0
- package/dist/edit-sqzPOfBX.mjs +4 -0
- package/dist/edit.vue_vue_type_script_setup_true_lang-BYoUZaYJ.mjs +157 -0
- package/dist/edit.vue_vue_type_script_setup_true_lang-CFHGaytm.mjs +137 -0
- package/dist/edit.vue_vue_type_script_setup_true_lang-C_NNjRjK.mjs +622 -0
- package/dist/edit.vue_vue_type_script_setup_true_lang-DBxZMZyS.mjs +222 -0
- package/dist/edit.vue_vue_type_script_setup_true_lang-_tHqd9tg.mjs +226 -0
- package/dist/edit.vue_vue_type_script_setup_true_lang-mM66jf9N.mjs +288 -0
- package/dist/el-card-BIRVdEQY.mjs +61 -0
- package/dist/el-checkbox-group-l0sNRNKZ.mjs +1 -0
- package/dist/el-checkbox-miY6QbQ8.mjs +548 -0
- package/dist/el-col-BOgRUJYE.mjs +135 -0
- package/dist/el-date-picker-D9yvdcj2.mjs +3349 -0
- package/dist/el-dialog-BSTwker5.mjs +378 -0
- package/dist/el-dropdown-item-YDb2-w9y.mjs +675 -0
- package/dist/el-form-item-BzKoZc6I.mjs +1489 -0
- package/dist/el-icon-l0sNRNKZ.mjs +1 -0
- package/dist/el-popover-DuRdut0P.mjs +159 -0
- package/dist/el-popper-AjIjI4wK.mjs +1656 -0
- package/dist/el-progress-BPv5gfee.mjs +898 -0
- package/dist/el-radio-NC-gfUsx.mjs +251 -0
- package/dist/el-scrollbar-p0O6uID0.mjs +607 -0
- package/dist/el-select-DAMII7lv.mjs +1040 -0
- package/dist/el-switch-C2AFgHGW.mjs +254 -0
- package/dist/el-table-IQFrP3zv.mjs +3168 -0
- package/dist/el-tag-l0sNRNKZ.mjs +1 -0
- package/dist/el-tooltip-l0sNRNKZ.mjs +1 -0
- package/dist/el-tree-select-CyDKS6nF.mjs +1316 -0
- package/dist/importUpload.vue_vue_type_script_setup_true_lang-DWWbxFGH.mjs +117 -0
- package/dist/index-A3UILhe-.mjs +279 -0
- package/dist/index-Ax_8ZsXK.mjs +3163 -0
- package/dist/index-B46NFfoE.mjs +487 -0
- package/dist/index-BWx4KWAY.mjs +282 -0
- package/dist/index-BWyb1bu2.mjs +505 -0
- package/dist/index-BjqMDjBg.mjs +43994 -0
- package/dist/index-BnbEfNmI.mjs +134 -0
- package/dist/index-BpAihYhN.mjs +280 -0
- package/dist/index-Bs3AcT6R.mjs +107 -0
- package/dist/index-BvixCbHl.mjs +329 -0
- package/dist/index-C0UgbyoZ.mjs +452 -0
- package/dist/index-C0vV2_4K.mjs +63 -0
- package/dist/index-CBB_r4G5.mjs +965 -0
- package/dist/index-CCFtIl_h.mjs +516 -0
- package/dist/index-Cd3TOW5i.mjs +93 -0
- package/dist/index-CgNPGcHv.mjs +292 -0
- package/dist/index-CoOFKDgw.mjs +74 -0
- package/dist/index-CrNYgyNm.mjs +8800 -0
- package/dist/index-CurzO9C6.mjs +248 -0
- package/dist/index-DJ08yxAP.mjs +11 -0
- package/dist/index-DjkMA-Wh.mjs +40 -0
- package/dist/index-Url6hMpl.mjs +483 -0
- package/dist/index-eT2JltVa.mjs +55 -0
- package/dist/index-mkT_dTWL.mjs +13 -0
- package/dist/index-uykKwY2Z.mjs +12 -0
- package/dist/index-xtDIXRPY.mjs +633 -0
- package/dist/index.mjs +19 -273
- package/dist/index.vue_vue_type_script_setup_true_lang-BoxqootF.mjs +58 -0
- package/dist/index.vue_vue_type_script_setup_true_lang-C6yk_vUt.mjs +286 -0
- package/dist/isUndefined-CUQZk6oB.mjs +6 -0
- package/dist/moment-CMYwqyVT.mjs +2579 -0
- package/dist/picture-kPnmHaoS.mjs +599 -0
- package/dist/profile-RVQuIwXg.mjs +319 -0
- package/dist/refs-S3PYDmaW.mjs +9 -0
- package/dist/style.css +1 -1
- package/dist/types-CCG3Dvqs.mjs +205 -0
- package/dist/updatePwd-2UsTmJa5.mjs +4 -0
- package/dist/updatePwd.vue_vue_type_script_setup_true_lang-_Uadc2g3.mjs +151 -0
- package/dist/useColumnToggleTable-D_QF8Uy9.mjs +272 -0
- package/dist/vue-i18n-CE6tUbcO.mjs +3808 -0
- package/dts/tsconfig.tsbuildinfo +1 -1
- package/package.json +31 -2
|
@@ -0,0 +1,469 @@
|
|
|
1
|
+
import { c as O, ao as ie, aW as ce, an as fe, aX as ye, E as L, aY as _e, e as he, y as be, f as Re } from "./index-CrNYgyNm.mjs";
|
|
2
|
+
import { E as ge } from "./el-dialog-BSTwker5.mjs";
|
|
3
|
+
import { a as Ce, E as Ve } from "./el-form-item-BzKoZc6I.mjs";
|
|
4
|
+
import { E as ve, a as Ee } from "./el-table-IQFrP3zv.mjs";
|
|
5
|
+
import { E as Ie, a as De } from "./el-checkbox-miY6QbQ8.mjs";
|
|
6
|
+
import "./el-tooltip-l0sNRNKZ.mjs";
|
|
7
|
+
import "./el-popper-AjIjI4wK.mjs";
|
|
8
|
+
import "./el-scrollbar-p0O6uID0.mjs";
|
|
9
|
+
import "./el-checkbox-group-l0sNRNKZ.mjs";
|
|
10
|
+
import "./el-tag-l0sNRNKZ.mjs";
|
|
11
|
+
import { E as ke, a as we } from "./el-select-DAMII7lv.mjs";
|
|
12
|
+
import "./el-icon-l0sNRNKZ.mjs";
|
|
13
|
+
import { _ as $e } from "./index.vue_vue_type_script_setup_true_lang-BoxqootF.mjs";
|
|
14
|
+
import { E as qe } from "./el-tree-select-CyDKS6nF.mjs";
|
|
15
|
+
import { E as Ne, a as Te } from "./el-col-BOgRUJYE.mjs";
|
|
16
|
+
import { defineComponent as Ue, ref as i, reactive as G, toRef as Fe, resolveComponent as W, 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 w, renderList as $, createCommentVNode as Me } from "vue";
|
|
17
|
+
import { u as Ae } from "./vue-i18n-CE6tUbcO.mjs";
|
|
18
|
+
import { m as Se } from "./index-Cd3TOW5i.mjs";
|
|
19
|
+
import { p as Be } from "./index-CoOFKDgw.mjs";
|
|
20
|
+
import { _ as Pe } from "./_plugin-vue_export-helper-CHgC5LLL.mjs";
|
|
21
|
+
const je = { class: "positon_name" }, ze = { class: "plus-position" }, Oe = { class: "dialog-footer" }, Le = /* @__PURE__ */ Ue({
|
|
22
|
+
__name: "edit",
|
|
23
|
+
props: {
|
|
24
|
+
formData: {
|
|
25
|
+
type: Object,
|
|
26
|
+
default: () => {
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
dialog: {
|
|
30
|
+
type: Object,
|
|
31
|
+
default: () => {
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
emits: ["dialogEvent", "refresh"],
|
|
36
|
+
setup(X, { emit: Y }) {
|
|
37
|
+
var A;
|
|
38
|
+
const { t: c } = Ae(), q = i();
|
|
39
|
+
let N = i([]);
|
|
40
|
+
const V = i(), T = i(), v = i(!1), E = i(!1);
|
|
41
|
+
let f = i([]), l = G({
|
|
42
|
+
tenant: O().user.tenant,
|
|
43
|
+
requestId: Math.random() * 10 + "",
|
|
44
|
+
roleType: "role",
|
|
45
|
+
updateMask: "roleCode,roleName,parentId,description",
|
|
46
|
+
roleCode: "",
|
|
47
|
+
roleName: "",
|
|
48
|
+
parentId: "",
|
|
49
|
+
description: "",
|
|
50
|
+
permCodes: [],
|
|
51
|
+
roleDuty: [
|
|
52
|
+
{
|
|
53
|
+
roleId: "",
|
|
54
|
+
dutyType: ""
|
|
55
|
+
}
|
|
56
|
+
]
|
|
57
|
+
});
|
|
58
|
+
const H = G({
|
|
59
|
+
roleCode: [{ required: !0, validator: (e, o, s) => {
|
|
60
|
+
if (o === "")
|
|
61
|
+
s(new Error(c("sysRole.codeRequired")));
|
|
62
|
+
else {
|
|
63
|
+
const m = {
|
|
64
|
+
tenant: O().user.tenant,
|
|
65
|
+
roleCode: o,
|
|
66
|
+
addFlag: !l.roleId,
|
|
67
|
+
roleId: l.roleId
|
|
68
|
+
};
|
|
69
|
+
ie(m).then(({ data: u }) => {
|
|
70
|
+
u === !0 ? s(new Error(c("sysRole.codeExist"))) : s();
|
|
71
|
+
});
|
|
72
|
+
}
|
|
73
|
+
}, trigger: "blur" }],
|
|
74
|
+
roleName: [
|
|
75
|
+
{ required: !0, message: c("sysRole.nameRequired"), trigger: "blur" }
|
|
76
|
+
]
|
|
77
|
+
}), y = Y, R = X, I = Fe(R, "dialog");
|
|
78
|
+
function J() {
|
|
79
|
+
var e;
|
|
80
|
+
ce((e = R.formData) == null ? void 0 : e.roleId).then(({ data: o }) => {
|
|
81
|
+
V.value = o.results;
|
|
82
|
+
}), Se().then(({ data: o }) => {
|
|
83
|
+
N.value = o.results;
|
|
84
|
+
});
|
|
85
|
+
}
|
|
86
|
+
function K(e) {
|
|
87
|
+
fe(e).then(({ data: o }) => {
|
|
88
|
+
console.log(o), l.permCodes = o.permCodes;
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
function Q() {
|
|
92
|
+
U();
|
|
93
|
+
}
|
|
94
|
+
function U() {
|
|
95
|
+
Be(l.moduleId).then(({ data: e }) => {
|
|
96
|
+
T.value = e.results, F(e.results);
|
|
97
|
+
});
|
|
98
|
+
}
|
|
99
|
+
function Z() {
|
|
100
|
+
var e;
|
|
101
|
+
l.roleDuty && l.roleDuty.length < 5 && ((e = l.roleDuty) == null || e.push({
|
|
102
|
+
roleId: "",
|
|
103
|
+
dutyType: ""
|
|
104
|
+
}));
|
|
105
|
+
}
|
|
106
|
+
function x(e) {
|
|
107
|
+
var o;
|
|
108
|
+
(o = l.roleDuty) == null || o.splice(e, 1);
|
|
109
|
+
}
|
|
110
|
+
function F(e) {
|
|
111
|
+
for (let o = 0; o < e.length; o++) {
|
|
112
|
+
for (let s = 0; s < e[o].perms.length; s++)
|
|
113
|
+
f.value.push(e[o].perms[s].permCode);
|
|
114
|
+
F(e[o].children);
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
function ee(e) {
|
|
118
|
+
console.log(e, f.value), l.permCodes = e ? f.value : [], E.value = !1;
|
|
119
|
+
}
|
|
120
|
+
function le(e) {
|
|
121
|
+
console.log(e), l.permCodes = e, console.log(l.permCodes);
|
|
122
|
+
const o = e.length;
|
|
123
|
+
v.value = o === f.length, E.value = o > 0 && o < f.length;
|
|
124
|
+
}
|
|
125
|
+
const oe = async () => {
|
|
126
|
+
var e;
|
|
127
|
+
await ((e = q.value) == null ? void 0 : e.validate((o) => {
|
|
128
|
+
o && (l.roleId ? ye(l).then((s) => {
|
|
129
|
+
console.log(s), s.status === 200 && (L({
|
|
130
|
+
message: c("common.submitSuccess"),
|
|
131
|
+
type: "success"
|
|
132
|
+
}), y("dialogEvent", !1), y("refresh", s.status === 200));
|
|
133
|
+
}) : _e(l).then((s) => {
|
|
134
|
+
console.log(s), s.status === 200 && (L({
|
|
135
|
+
message: c("common.submitSuccess"),
|
|
136
|
+
type: "success"
|
|
137
|
+
}), y("dialogEvent", !1), y("refresh", s.status === 200));
|
|
138
|
+
}));
|
|
139
|
+
}));
|
|
140
|
+
};
|
|
141
|
+
function M() {
|
|
142
|
+
y("dialogEvent", !1);
|
|
143
|
+
}
|
|
144
|
+
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 = [
|
|
145
|
+
{
|
|
146
|
+
roleId: "",
|
|
147
|
+
dutyType: ""
|
|
148
|
+
}
|
|
149
|
+
], l.parentId === "00000000-0000-0000-0000-000000000000" && (l.parentId = "")), J(), U(), (e, o) => {
|
|
150
|
+
const s = he, m = Ce, u = Ne, _ = Te, S = qe, te = $e, ae = W("Remove"), B = be, re = W("CirclePlus"), se = ke, ne = we, P = Ie, j = ve, de = De, ue = Ee, me = Ve, z = Re, pe = ge;
|
|
151
|
+
return p(), h(pe, {
|
|
152
|
+
modelValue: I.value.visible,
|
|
153
|
+
"onUpdate:modelValue": o[7] || (o[7] = (r) => I.value.visible = r),
|
|
154
|
+
title: I.value.title,
|
|
155
|
+
width: "1000px",
|
|
156
|
+
onClose: M
|
|
157
|
+
}, {
|
|
158
|
+
footer: a(() => [
|
|
159
|
+
D("div", Oe, [
|
|
160
|
+
t(z, { onClick: M }, {
|
|
161
|
+
default: a(() => [
|
|
162
|
+
C(b(e.$t("common.cancel")), 1)
|
|
163
|
+
]),
|
|
164
|
+
_: 1
|
|
165
|
+
}),
|
|
166
|
+
t(z, {
|
|
167
|
+
type: "primary",
|
|
168
|
+
onClick: oe
|
|
169
|
+
}, {
|
|
170
|
+
default: a(() => [
|
|
171
|
+
C(b(e.$t("common.confirm")), 1)
|
|
172
|
+
]),
|
|
173
|
+
_: 1
|
|
174
|
+
})
|
|
175
|
+
])
|
|
176
|
+
]),
|
|
177
|
+
default: a(() => [
|
|
178
|
+
t(me, {
|
|
179
|
+
ref_key: "roleFormRef",
|
|
180
|
+
ref: q,
|
|
181
|
+
model: n(l),
|
|
182
|
+
rules: H,
|
|
183
|
+
"label-width": "170"
|
|
184
|
+
}, {
|
|
185
|
+
default: a(() => [
|
|
186
|
+
t(_, null, {
|
|
187
|
+
default: a(() => [
|
|
188
|
+
t(u, { span: 12 }, {
|
|
189
|
+
default: a(() => [
|
|
190
|
+
t(m, {
|
|
191
|
+
label: e.$t("sysRole.code"),
|
|
192
|
+
prop: "roleCode"
|
|
193
|
+
}, {
|
|
194
|
+
default: a(() => [
|
|
195
|
+
t(s, {
|
|
196
|
+
modelValue: n(l).roleCode,
|
|
197
|
+
"onUpdate:modelValue": o[0] || (o[0] = (r) => n(l).roleCode = r),
|
|
198
|
+
maxlength: "30",
|
|
199
|
+
"show-word-limit": "",
|
|
200
|
+
clearable: "",
|
|
201
|
+
placeholder: e.$t("sysRole.codeRequired")
|
|
202
|
+
}, null, 8, ["modelValue", "placeholder"])
|
|
203
|
+
]),
|
|
204
|
+
_: 1
|
|
205
|
+
}, 8, ["label"])
|
|
206
|
+
]),
|
|
207
|
+
_: 1
|
|
208
|
+
}),
|
|
209
|
+
t(u, { span: 12 }, {
|
|
210
|
+
default: a(() => [
|
|
211
|
+
t(m, {
|
|
212
|
+
label: e.$t("sysRole.name"),
|
|
213
|
+
prop: "roleName"
|
|
214
|
+
}, {
|
|
215
|
+
default: a(() => [
|
|
216
|
+
t(s, {
|
|
217
|
+
modelValue: n(l).roleName,
|
|
218
|
+
"onUpdate:modelValue": o[1] || (o[1] = (r) => n(l).roleName = r),
|
|
219
|
+
clearable: "",
|
|
220
|
+
maxlength: "30",
|
|
221
|
+
"show-word-limit": "",
|
|
222
|
+
placeholder: e.$t("sysRole.nameRequired")
|
|
223
|
+
}, null, 8, ["modelValue", "placeholder"])
|
|
224
|
+
]),
|
|
225
|
+
_: 1
|
|
226
|
+
}, 8, ["label"])
|
|
227
|
+
]),
|
|
228
|
+
_: 1
|
|
229
|
+
})
|
|
230
|
+
]),
|
|
231
|
+
_: 1
|
|
232
|
+
}),
|
|
233
|
+
t(_, null, {
|
|
234
|
+
default: a(() => [
|
|
235
|
+
t(u, { span: 24 }, {
|
|
236
|
+
default: a(() => [
|
|
237
|
+
t(m, {
|
|
238
|
+
label: e.$t("sysRole.parent"),
|
|
239
|
+
prop: "parentId"
|
|
240
|
+
}, {
|
|
241
|
+
default: a(() => [
|
|
242
|
+
t(S, {
|
|
243
|
+
modelValue: n(l).parentId,
|
|
244
|
+
"onUpdate:modelValue": o[2] || (o[2] = (r) => n(l).parentId = r),
|
|
245
|
+
data: V.value,
|
|
246
|
+
"render-after-expand": !1,
|
|
247
|
+
filterable: "",
|
|
248
|
+
clearable: "",
|
|
249
|
+
"check-strictly": "",
|
|
250
|
+
style: { width: "100%" },
|
|
251
|
+
placeholder: e.$t("sysRole.parentRequired"),
|
|
252
|
+
onChange: K
|
|
253
|
+
}, null, 8, ["modelValue", "data", "placeholder"])
|
|
254
|
+
]),
|
|
255
|
+
_: 1
|
|
256
|
+
}, 8, ["label"])
|
|
257
|
+
]),
|
|
258
|
+
_: 1
|
|
259
|
+
})
|
|
260
|
+
]),
|
|
261
|
+
_: 1
|
|
262
|
+
}),
|
|
263
|
+
D("div", je, [
|
|
264
|
+
(p(!0), k(w, null, $(n(l).roleDuty, (r, d) => (p(), h(_, {
|
|
265
|
+
key: d,
|
|
266
|
+
style: { width: "100%" }
|
|
267
|
+
}, {
|
|
268
|
+
default: a(() => [
|
|
269
|
+
t(u, { span: 12 }, {
|
|
270
|
+
default: a(() => [
|
|
271
|
+
t(m, {
|
|
272
|
+
label: e.$t("sysRole.mutualType"),
|
|
273
|
+
prop: `roleDuty.${d}.dutyType`
|
|
274
|
+
}, {
|
|
275
|
+
default: a(() => [
|
|
276
|
+
t(te, {
|
|
277
|
+
modelValue: n(l).roleDuty[d].dutyType,
|
|
278
|
+
"onUpdate:modelValue": (g) => n(l).roleDuty[d].dutyType = g,
|
|
279
|
+
clearable: !0,
|
|
280
|
+
placeholder: e.$t("sysRole.mutualTypeRequired"),
|
|
281
|
+
"dict-type": "jmash.rbac.protobuf.DutyType"
|
|
282
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue", "placeholder"])
|
|
283
|
+
]),
|
|
284
|
+
_: 2
|
|
285
|
+
}, 1032, ["label", "prop"])
|
|
286
|
+
]),
|
|
287
|
+
_: 2
|
|
288
|
+
}, 1024),
|
|
289
|
+
t(u, { span: 11 }, {
|
|
290
|
+
default: a(() => [
|
|
291
|
+
t(m, {
|
|
292
|
+
label: e.$t("sysRole.mutualRole"),
|
|
293
|
+
prop: `roleDuty.${d}.roleId`
|
|
294
|
+
}, {
|
|
295
|
+
default: a(() => [
|
|
296
|
+
t(S, {
|
|
297
|
+
modelValue: n(l).roleDuty[d].roleId,
|
|
298
|
+
"onUpdate:modelValue": (g) => n(l).roleDuty[d].roleId = g,
|
|
299
|
+
data: V.value,
|
|
300
|
+
filterable: "",
|
|
301
|
+
clearable: "",
|
|
302
|
+
"check-strictly": "",
|
|
303
|
+
"render-after-expand": !1,
|
|
304
|
+
style: { width: "100%" },
|
|
305
|
+
placeholder: e.$t("sysRole.mutualRoleRequired")
|
|
306
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue", "data", "placeholder"])
|
|
307
|
+
]),
|
|
308
|
+
_: 2
|
|
309
|
+
}, 1032, ["label", "prop"])
|
|
310
|
+
]),
|
|
311
|
+
_: 2
|
|
312
|
+
}, 1024),
|
|
313
|
+
d !== 0 ? (p(), h(u, {
|
|
314
|
+
key: 0,
|
|
315
|
+
span: 1,
|
|
316
|
+
class: "position-center"
|
|
317
|
+
}, {
|
|
318
|
+
default: a(() => [
|
|
319
|
+
t(B, {
|
|
320
|
+
size: "16",
|
|
321
|
+
onClick: (g) => x(d)
|
|
322
|
+
}, {
|
|
323
|
+
default: a(() => [
|
|
324
|
+
t(ae)
|
|
325
|
+
]),
|
|
326
|
+
_: 2
|
|
327
|
+
}, 1032, ["onClick"])
|
|
328
|
+
]),
|
|
329
|
+
_: 2
|
|
330
|
+
}, 1024)) : Me("", !0)
|
|
331
|
+
]),
|
|
332
|
+
_: 2
|
|
333
|
+
}, 1024))), 128)),
|
|
334
|
+
D("div", ze, [
|
|
335
|
+
t(B, {
|
|
336
|
+
size: "16",
|
|
337
|
+
onClick: Z
|
|
338
|
+
}, {
|
|
339
|
+
default: a(() => [
|
|
340
|
+
t(re)
|
|
341
|
+
]),
|
|
342
|
+
_: 1
|
|
343
|
+
})
|
|
344
|
+
])
|
|
345
|
+
]),
|
|
346
|
+
t(_, null, {
|
|
347
|
+
default: a(() => [
|
|
348
|
+
t(u, { span: 24 }, {
|
|
349
|
+
default: a(() => [
|
|
350
|
+
t(m, {
|
|
351
|
+
label: e.$t("sysRole.operatePerm"),
|
|
352
|
+
prop: "permCodes"
|
|
353
|
+
}, {
|
|
354
|
+
default: a(() => [
|
|
355
|
+
t(ne, {
|
|
356
|
+
modelValue: n(l).moduleId,
|
|
357
|
+
"onUpdate:modelValue": o[3] || (o[3] = (r) => n(l).moduleId = r),
|
|
358
|
+
placeholder: e.$t("sysRole.moduleRequired"),
|
|
359
|
+
clearable: "",
|
|
360
|
+
style: { width: "100%" },
|
|
361
|
+
onChange: Q
|
|
362
|
+
}, {
|
|
363
|
+
default: a(() => [
|
|
364
|
+
(p(!0), k(w, null, $(n(N), (r) => (p(), h(se, {
|
|
365
|
+
key: r.moduleId,
|
|
366
|
+
label: r.moduleName,
|
|
367
|
+
value: r.moduleId
|
|
368
|
+
}, null, 8, ["label", "value"]))), 128))
|
|
369
|
+
]),
|
|
370
|
+
_: 1
|
|
371
|
+
}, 8, ["modelValue", "placeholder"]),
|
|
372
|
+
t(P, {
|
|
373
|
+
modelValue: v.value,
|
|
374
|
+
"onUpdate:modelValue": o[4] || (o[4] = (r) => v.value = r),
|
|
375
|
+
indeterminate: E.value,
|
|
376
|
+
onChange: ee
|
|
377
|
+
}, {
|
|
378
|
+
default: a(() => [
|
|
379
|
+
C(b(e.$t("sysRole.checkAll")) + "/" + b(e.$t("sysRole.checkNoAll")), 1)
|
|
380
|
+
]),
|
|
381
|
+
_: 1
|
|
382
|
+
}, 8, ["modelValue", "indeterminate"]),
|
|
383
|
+
t(ue, {
|
|
384
|
+
data: T.value,
|
|
385
|
+
"row-key": "resourceId",
|
|
386
|
+
border: "",
|
|
387
|
+
"show-header": !1,
|
|
388
|
+
"tree-props": { children: "children", hasChildren: "hasChildren" }
|
|
389
|
+
}, {
|
|
390
|
+
default: a(() => [
|
|
391
|
+
t(j, {
|
|
392
|
+
prop: "resourceName",
|
|
393
|
+
width: "230"
|
|
394
|
+
}),
|
|
395
|
+
t(j, null, {
|
|
396
|
+
default: a((r) => [
|
|
397
|
+
t(de, {
|
|
398
|
+
modelValue: n(l).permCodes,
|
|
399
|
+
"onUpdate:modelValue": o[5] || (o[5] = (d) => n(l).permCodes = d),
|
|
400
|
+
onChange: le
|
|
401
|
+
}, {
|
|
402
|
+
default: a(() => [
|
|
403
|
+
(p(!0), k(w, null, $(r.row.perms, (d) => (p(), h(P, {
|
|
404
|
+
label: d.permCode,
|
|
405
|
+
key: d.permId
|
|
406
|
+
}, {
|
|
407
|
+
default: a(() => [
|
|
408
|
+
C(b(d.permName), 1)
|
|
409
|
+
]),
|
|
410
|
+
_: 2
|
|
411
|
+
}, 1032, ["label"]))), 128))
|
|
412
|
+
]),
|
|
413
|
+
_: 2
|
|
414
|
+
}, 1032, ["modelValue"])
|
|
415
|
+
]),
|
|
416
|
+
_: 1
|
|
417
|
+
})
|
|
418
|
+
]),
|
|
419
|
+
_: 1
|
|
420
|
+
}, 8, ["data"])
|
|
421
|
+
]),
|
|
422
|
+
_: 1
|
|
423
|
+
}, 8, ["label"])
|
|
424
|
+
]),
|
|
425
|
+
_: 1
|
|
426
|
+
})
|
|
427
|
+
]),
|
|
428
|
+
_: 1
|
|
429
|
+
}),
|
|
430
|
+
t(_, null, {
|
|
431
|
+
default: a(() => [
|
|
432
|
+
t(u, { span: 24 }, {
|
|
433
|
+
default: a(() => [
|
|
434
|
+
t(m, {
|
|
435
|
+
label: e.$t("sysRole.description"),
|
|
436
|
+
prop: "description"
|
|
437
|
+
}, {
|
|
438
|
+
default: a(() => [
|
|
439
|
+
t(s, {
|
|
440
|
+
modelValue: n(l).description,
|
|
441
|
+
"onUpdate:modelValue": o[6] || (o[6] = (r) => n(l).description = r),
|
|
442
|
+
type: "textarea",
|
|
443
|
+
autosize: { minRows: 2 },
|
|
444
|
+
maxlength: "200",
|
|
445
|
+
"show-word-limit": "",
|
|
446
|
+
placeholder: e.$t("sysRole.descriptionRequired"),
|
|
447
|
+
clearable: ""
|
|
448
|
+
}, null, 8, ["modelValue", "placeholder"])
|
|
449
|
+
]),
|
|
450
|
+
_: 1
|
|
451
|
+
}, 8, ["label"])
|
|
452
|
+
]),
|
|
453
|
+
_: 1
|
|
454
|
+
})
|
|
455
|
+
]),
|
|
456
|
+
_: 1
|
|
457
|
+
})
|
|
458
|
+
]),
|
|
459
|
+
_: 1
|
|
460
|
+
}, 8, ["model", "rules"])
|
|
461
|
+
]),
|
|
462
|
+
_: 1
|
|
463
|
+
}, 8, ["modelValue", "title"]);
|
|
464
|
+
};
|
|
465
|
+
}
|
|
466
|
+
}), pl = /* @__PURE__ */ Pe(Le, [["__scopeId", "data-v-8ff1839c"]]);
|
|
467
|
+
export {
|
|
468
|
+
pl as default
|
|
469
|
+
};
|
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
import { c as R, E as y, e as q, f as $ } from "./index-CrNYgyNm.mjs";
|
|
2
|
+
import { E as w } from "./el-dialog-BSTwker5.mjs";
|
|
3
|
+
import { a as D, E as F } from "./el-form-item-BzKoZc6I.mjs";
|
|
4
|
+
import { defineComponent as U, toRef as k, ref as S, reactive as V, openBlock as j, createBlock as B, withCtx as a, createElementVNode as O, createVNode as d, createTextVNode as _, toDisplayString as E, unref as s } from "vue";
|
|
5
|
+
import { u as z } from "./vue-i18n-CE6tUbcO.mjs";
|
|
6
|
+
import { e as A, f as T, h as G } from "./index-Cd3TOW5i.mjs";
|
|
7
|
+
const H = { class: "dialog-footer" }, Y = /* @__PURE__ */ U({
|
|
8
|
+
__name: "edit",
|
|
9
|
+
props: {
|
|
10
|
+
formData: {
|
|
11
|
+
type: Object,
|
|
12
|
+
default: () => {
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
dialog: {
|
|
16
|
+
type: Object,
|
|
17
|
+
default: () => {
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
emits: ["dialogEvent", "refresh"],
|
|
22
|
+
setup(M, { emit: v }) {
|
|
23
|
+
var g;
|
|
24
|
+
const { t: i } = z(), n = M, p = k(n, "dialog"), f = S();
|
|
25
|
+
let o = V({
|
|
26
|
+
tenant: R().user.tenant,
|
|
27
|
+
moduleId: "",
|
|
28
|
+
moduleCode: "",
|
|
29
|
+
moduleName: "",
|
|
30
|
+
description: "",
|
|
31
|
+
updateMask: "moduleCode,moduleName,description",
|
|
32
|
+
requestId: Math.random() * 10 + ""
|
|
33
|
+
});
|
|
34
|
+
const C = V({
|
|
35
|
+
moduleCode: [
|
|
36
|
+
{ required: !0, validator: (t, l, e) => {
|
|
37
|
+
l === "" ? e(new Error(i("sysModule.codeRequired"))) : o.moduleId ? e() : A(l).then(({ data: m }) => {
|
|
38
|
+
m === !0 ? e(new Error("该编码已存在")) : e();
|
|
39
|
+
});
|
|
40
|
+
}, trigger: "blur" }
|
|
41
|
+
],
|
|
42
|
+
moduleName: [
|
|
43
|
+
{ required: !0, message: i("sysModule.nameRequired"), trigger: "blur" }
|
|
44
|
+
]
|
|
45
|
+
}), r = v, h = async () => {
|
|
46
|
+
var t;
|
|
47
|
+
await ((t = f.value) == null ? void 0 : t.validate((l) => {
|
|
48
|
+
l && (o.moduleId ? T(o).then((e) => {
|
|
49
|
+
console.log(e), e.status === 200 && (y({
|
|
50
|
+
message: i("common.submitSuccess"),
|
|
51
|
+
type: "success"
|
|
52
|
+
}), r("dialogEvent", !1), r("refresh", e.status === 200));
|
|
53
|
+
}) : G(o).then((e) => {
|
|
54
|
+
console.log(e), e.status === 200 && (y({
|
|
55
|
+
message: i("common.submitSuccess"),
|
|
56
|
+
type: "success"
|
|
57
|
+
}), r("dialogEvent", !1), r("refresh", e.status === 200));
|
|
58
|
+
}));
|
|
59
|
+
}));
|
|
60
|
+
};
|
|
61
|
+
function c() {
|
|
62
|
+
r("dialogEvent", !1);
|
|
63
|
+
}
|
|
64
|
+
return (g = n.formData) != null && g.moduleId && (o = Object.assign(o, n.formData)), (t, l) => {
|
|
65
|
+
const e = q, m = D, I = F, b = $, N = w;
|
|
66
|
+
return j(), B(N, {
|
|
67
|
+
modelValue: p.value.visible,
|
|
68
|
+
"onUpdate:modelValue": l[3] || (l[3] = (u) => p.value.visible = u),
|
|
69
|
+
title: p.value.title,
|
|
70
|
+
width: "600px",
|
|
71
|
+
onClose: c
|
|
72
|
+
}, {
|
|
73
|
+
footer: a(() => [
|
|
74
|
+
O("div", H, [
|
|
75
|
+
d(b, { onClick: c }, {
|
|
76
|
+
default: a(() => [
|
|
77
|
+
_(E(t.$t("common.cancel")), 1)
|
|
78
|
+
]),
|
|
79
|
+
_: 1
|
|
80
|
+
}),
|
|
81
|
+
d(b, {
|
|
82
|
+
type: "primary",
|
|
83
|
+
onClick: h
|
|
84
|
+
}, {
|
|
85
|
+
default: a(() => [
|
|
86
|
+
_(E(t.$t("common.confirm")), 1)
|
|
87
|
+
]),
|
|
88
|
+
_: 1
|
|
89
|
+
})
|
|
90
|
+
])
|
|
91
|
+
]),
|
|
92
|
+
default: a(() => [
|
|
93
|
+
d(I, {
|
|
94
|
+
ref_key: "moduleFormRef",
|
|
95
|
+
ref: f,
|
|
96
|
+
model: s(o),
|
|
97
|
+
rules: C,
|
|
98
|
+
"label-width": "160px"
|
|
99
|
+
}, {
|
|
100
|
+
default: a(() => [
|
|
101
|
+
d(m, {
|
|
102
|
+
label: t.$t("sysModule.code"),
|
|
103
|
+
prop: "moduleCode"
|
|
104
|
+
}, {
|
|
105
|
+
default: a(() => [
|
|
106
|
+
d(e, {
|
|
107
|
+
modelValue: s(o).moduleCode,
|
|
108
|
+
"onUpdate:modelValue": l[0] || (l[0] = (u) => s(o).moduleCode = u),
|
|
109
|
+
placeholder: t.$t("sysModule.codeRequired"),
|
|
110
|
+
disabled: !!s(o).moduleId,
|
|
111
|
+
clearable: ""
|
|
112
|
+
}, null, 8, ["modelValue", "placeholder", "disabled"])
|
|
113
|
+
]),
|
|
114
|
+
_: 1
|
|
115
|
+
}, 8, ["label"]),
|
|
116
|
+
d(m, {
|
|
117
|
+
label: t.$t("sysModule.name"),
|
|
118
|
+
prop: "moduleName"
|
|
119
|
+
}, {
|
|
120
|
+
default: a(() => [
|
|
121
|
+
d(e, {
|
|
122
|
+
modelValue: s(o).moduleName,
|
|
123
|
+
"onUpdate:modelValue": l[1] || (l[1] = (u) => s(o).moduleName = u),
|
|
124
|
+
placeholder: t.$t("sysModule.nameRequired"),
|
|
125
|
+
clearable: ""
|
|
126
|
+
}, null, 8, ["modelValue", "placeholder"])
|
|
127
|
+
]),
|
|
128
|
+
_: 1
|
|
129
|
+
}, 8, ["label"]),
|
|
130
|
+
d(m, {
|
|
131
|
+
label: t.$t("sysModule.description"),
|
|
132
|
+
prop: "description"
|
|
133
|
+
}, {
|
|
134
|
+
default: a(() => [
|
|
135
|
+
d(e, {
|
|
136
|
+
modelValue: s(o).description,
|
|
137
|
+
"onUpdate:modelValue": l[2] || (l[2] = (u) => s(o).description = u),
|
|
138
|
+
type: "textarea",
|
|
139
|
+
autosize: { minRows: 2 },
|
|
140
|
+
placeholder: t.$t("sysModule.descriptionRequired"),
|
|
141
|
+
clearable: ""
|
|
142
|
+
}, null, 8, ["modelValue", "placeholder"])
|
|
143
|
+
]),
|
|
144
|
+
_: 1
|
|
145
|
+
}, 8, ["label"])
|
|
146
|
+
]),
|
|
147
|
+
_: 1
|
|
148
|
+
}, 8, ["model", "rules"])
|
|
149
|
+
]),
|
|
150
|
+
_: 1
|
|
151
|
+
}, 8, ["modelValue", "title"]);
|
|
152
|
+
};
|
|
153
|
+
}
|
|
154
|
+
});
|
|
155
|
+
export {
|
|
156
|
+
Y as _
|
|
157
|
+
};
|