gds-plus-design-vue 1.2.2 → 1.2.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/lib/{chartbi.06e48153.js → chartbi.5eded588.js} +20 -20
- package/lib/{chartbi.cdd1e365.mjs → chartbi.c3bc6adb.mjs} +17 -9
- package/lib/gd-initial.js +17 -15
- package/lib/gd-initial.mjs +27181 -19838
- package/lib/main.00e2ba37.mjs +123 -0
- package/lib/main.55fab1ce.mjs +198 -0
- package/lib/main.7e1495ec.js +1 -0
- package/lib/{main.2415a49a.js → main.9c85b10c.js} +1 -1
- package/lib/main.a27e1e54.js +1 -0
- package/lib/main.a794f7cf.js +1 -0
- package/lib/{main.b2d0a309.mjs → main.b25a9b4c.mjs} +15 -15
- package/lib/{main.2cddfbbd.mjs → main.b4ad6d81.mjs} +3 -3
- package/lib/{messages.d8abe18d.mjs → messages.bc3bc0e8.mjs} +187 -172
- package/lib/{messages.2fff74f3.js → messages.fa3d97b5.js} +5 -5
- package/lib/style.css +2 -2
- package/lib/{system.account.9bc40d08.mjs → system.account.868f96f9.mjs} +26 -26
- package/lib/{system.account.8ea53681.js → system.account.e82580de.js} +1 -1
- package/lib/{system.config.c6e30213.js → system.config.6aae9ea6.js} +1 -1
- package/lib/{system.config.8223d495.mjs → system.config.71615d2b.mjs} +2 -2
- package/lib/{system.datasource.57233650.mjs → system.datasource.009a1673.mjs} +2 -2
- package/lib/{system.datasource.fd6a4e76.js → system.datasource.523ae242.js} +1 -1
- package/lib/{system.dict.a24f33b0.js → system.dict.0111a3bc.js} +1 -1
- package/lib/{system.dict.8f95218b.mjs → system.dict.8f562e89.mjs} +4 -4
- package/lib/{system.duplicatechecking.39293985.js → system.duplicatechecking.1865e065.js} +1 -1
- package/lib/{system.duplicatechecking.6b706948.mjs → system.duplicatechecking.f517abed.mjs} +2 -2
- package/lib/{system.email.dae988be.mjs → system.email.4c484530.mjs} +2 -2
- package/lib/{system.email.a2d9a307.js → system.email.70351605.js} +1 -1
- package/lib/{system.fieldsecurity.02627a7a.mjs → system.fieldsecurity.9f9f73df.mjs} +127 -79
- package/lib/system.fieldsecurity.d11088e3.js +1 -0
- package/lib/system.file.001a01bc.js +1 -0
- package/lib/{system.file.0fa095a9.mjs → system.file.96b3ce1e.mjs} +4 -4
- package/lib/{system.log.acb64505.mjs → system.log.80feb1c4.mjs} +2 -2
- package/lib/{system.log.c07ae5db.js → system.log.f7afb251.js} +1 -1
- package/lib/{system.machine.fc392d7f.mjs → system.machine.52e8a4f3.mjs} +1 -1
- package/lib/{system.machine.7fa3e3d1.js → system.machine.6e46b7a3.js} +1 -1
- package/lib/system.notice.365ddd35.js +1 -0
- package/lib/system.notice.b4247147.mjs +1690 -0
- package/lib/system.noticereceived.5545acf8.js +1 -0
- package/lib/{system.noticereceived.1aa70b65.mjs → system.noticereceived.eef2cf6e.mjs} +33 -24
- package/lib/{system.onlineuser.3d848a32.mjs → system.onlineuser.de5f62bf.mjs} +2 -2
- package/lib/{system.onlineuser.1c428d05.js → system.onlineuser.fd9fdc66.js} +1 -1
- package/lib/{system.org.fcf96d1e.mjs → system.org.94393315.mjs} +17 -68
- package/lib/system.org.d22168d6.js +1 -0
- package/lib/{system.permissions.a1a9505c.js → system.permissions.3c5c3573.js} +1 -1
- package/lib/{system.permissions.23f5b097.mjs → system.permissions.ccbe352d.mjs} +3 -3
- package/lib/{system.plugin.b6de4673.js → system.plugin.5d47e679.js} +1 -1
- package/lib/{system.plugin.e37f9dbc.mjs → system.plugin.8caa5d1f.mjs} +2 -2
- package/lib/{system.pos.a4fb19b0.js → system.pos.caaef4fc.js} +1 -1
- package/lib/{system.pos.1a01fc97.mjs → system.pos.e4be69c4.mjs} +2 -2
- package/lib/{system.promptmanagement.36a65c51.mjs → system.promptmanagement.1ad89863.mjs} +2 -2
- package/lib/{system.promptmanagement.290958b1.js → system.promptmanagement.e73f64a2.js} +1 -1
- package/lib/system.role.0323ddd5.mjs +2048 -0
- package/lib/system.role.b5b55ddd.js +1 -0
- package/lib/{system.sumberrules.dd6299e8.js → system.sumberrules.2babdd81.js} +1 -1
- package/lib/{system.sumberrules.cdef9308.mjs → system.sumberrules.42965c1e.mjs} +2 -2
- package/lib/{system.team.ee652fe4.mjs → system.team.28168433.mjs} +80 -49
- package/lib/system.team.a3527834.js +1 -0
- package/lib/{system.teammembers.26a2ba81.mjs → system.teammembers.08f3ce38.mjs} +3 -3
- package/lib/{system.teammembers.4a3dc336.js → system.teammembers.4b11e49b.js} +1 -1
- package/lib/{system.timers.4efa8a7d.mjs → system.timers.040b9bce.mjs} +2 -2
- package/lib/{system.timers.b9424204.js → system.timers.310b3710.js} +1 -1
- package/lib/{system.translation.21d2fd8b.js → system.translation.a4396166.js} +1 -1
- package/lib/{system.translation.0a9399b4.mjs → system.translation.c0068d8f.mjs} +3 -3
- package/lib/{system.user.d48a08db.js → system.user.20a5e7b4.js} +5 -5
- package/lib/{system.user.4fcfdf99.mjs → system.user.84e77277.mjs} +53 -23
- package/lib/{system.useraffiliation.a59ce45b.js → system.useraffiliation.307e3cd7.js} +1 -1
- package/lib/{system.useraffiliation.fb002239.mjs → system.useraffiliation.fb961d98.mjs} +3 -3
- package/lib/{system.webresource.3366cc29.js → system.webresource.0382b6b1.js} +1 -1
- package/lib/{system.webresource.4df01c92.mjs → system.webresource.2d0ab7a6.mjs} +3 -3
- package/lib/{system.welcome.472f099b.js → system.welcome.67d20fa4.js} +1 -1
- package/lib/{system.welcome.120f4b50.mjs → system.welcome.aaac4a40.mjs} +1 -1
- package/locale/en_US.js +109 -20
- package/locale/id_ID.js +107 -19
- package/locale/vi_VN.js +107 -19
- package/locale/zh_CN.js +106 -18
- package/package.json +1 -1
- package/lib/main.4c447fc3.js +0 -1
- package/lib/main.86fe06d4.mjs +0 -87
- package/lib/main.d091d06d.js +0 -1
- package/lib/system.fieldsecurity.a0cec24d.js +0 -1
- package/lib/system.file.d695ab37.js +0 -1
- package/lib/system.notice.5ae50bd4.mjs +0 -641
- package/lib/system.notice.f18578ae.js +0 -1
- package/lib/system.noticereceived.bfa98a9b.js +0 -1
- package/lib/system.org.5bb36f9c.js +0 -1
- package/lib/system.role.68de93ef.mjs +0 -1543
- package/lib/system.role.88100f66.js +0 -1
- package/lib/system.team.53d64006.js +0 -1
|
@@ -0,0 +1,2048 @@
|
|
|
1
|
+
import { s as w, b as $, d as K, c as T, e as C, f as R, h as m, i as S, j as L, g as I, k as x, l as D, m as N, n as P } from "./system.fieldsecurity.9f9f73df.mjs";
|
|
2
|
+
import { m as h, n as u } from "./chartbi.c3bc6adb.mjs";
|
|
3
|
+
import { t as b } from "./messages.bc3bc0e8.mjs";
|
|
4
|
+
import { a as v, e as B, f as F } from "./system.notice.b4247147.mjs";
|
|
5
|
+
import { S as A, b as M, d as E, p as O, e as z, f as y } from "./system.account.868f96f9.mjs";
|
|
6
|
+
const j = {
|
|
7
|
+
data() {
|
|
8
|
+
return {
|
|
9
|
+
tableColumns: [
|
|
10
|
+
{
|
|
11
|
+
type: "selection",
|
|
12
|
+
width: "60",
|
|
13
|
+
fixed: !0
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
transKey: "gd.user.roleName",
|
|
17
|
+
prop: "name",
|
|
18
|
+
label: "\u89D2\u8272\u540D\u79F0",
|
|
19
|
+
type: "slot",
|
|
20
|
+
slotType: "name",
|
|
21
|
+
align: "left",
|
|
22
|
+
fixed: !0,
|
|
23
|
+
renderHeader: (s, ...e) => this.renderHeader(s, ...e, {
|
|
24
|
+
effectType: "input"
|
|
25
|
+
}),
|
|
26
|
+
showOverflowTooltip: !0
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
transKey: "gd.org.code",
|
|
30
|
+
prop: "code",
|
|
31
|
+
label: "\u552F\u4E00\u7F16\u7801",
|
|
32
|
+
align: "left",
|
|
33
|
+
renderHeader: (s, ...e) => this.renderHeader(s, ...e, {
|
|
34
|
+
effectType: "input"
|
|
35
|
+
}),
|
|
36
|
+
showOverflowTooltip: !0
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
transKey: "gd.org.sort",
|
|
40
|
+
prop: "sort",
|
|
41
|
+
width: "200",
|
|
42
|
+
label: "\u6392\u5E8F",
|
|
43
|
+
align: "left"
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
transKey: "gd.org.remark",
|
|
47
|
+
prop: "remark",
|
|
48
|
+
label: "\u5907\u6CE8",
|
|
49
|
+
align: "left",
|
|
50
|
+
showOverflowTooltip: !0
|
|
51
|
+
}
|
|
52
|
+
],
|
|
53
|
+
formColumns: [{
|
|
54
|
+
transKey: "gd.user.roleName",
|
|
55
|
+
effectType: "input",
|
|
56
|
+
prop: "name",
|
|
57
|
+
label: "\u89D2\u8272\u540D\u79F0",
|
|
58
|
+
placeholder: "\u8BF7\u8F93\u5165",
|
|
59
|
+
placeholderTransKey: "gd.placeholder.input",
|
|
60
|
+
rules: [{
|
|
61
|
+
required: !0,
|
|
62
|
+
message: "\u8BF7\u8F93\u5165",
|
|
63
|
+
transKey: "gd.placeholder.input",
|
|
64
|
+
trigger: "change"
|
|
65
|
+
}]
|
|
66
|
+
}, {
|
|
67
|
+
transKey: "gd.org.code",
|
|
68
|
+
prop: "code",
|
|
69
|
+
effectType: "input",
|
|
70
|
+
label: "\u552F\u4E00\u7F16\u7801",
|
|
71
|
+
placeholder: "\u8BF7\u8F93\u5165",
|
|
72
|
+
disabled: !1,
|
|
73
|
+
placeholderTransKey: "gd.placeholder.input",
|
|
74
|
+
rules: [{
|
|
75
|
+
required: !0,
|
|
76
|
+
message: "\u8BF7\u8F93\u5165",
|
|
77
|
+
transKey: "gd.placeholder.input",
|
|
78
|
+
trigger: "change"
|
|
79
|
+
}]
|
|
80
|
+
}, {
|
|
81
|
+
transKey: "gd.org.sort",
|
|
82
|
+
prop: "sort",
|
|
83
|
+
effectType: "inputnumber",
|
|
84
|
+
label: "\u6392\u5E8F",
|
|
85
|
+
defaultValue: 100,
|
|
86
|
+
placeholder: "\u8BF7\u8F93\u5165",
|
|
87
|
+
placeholderTransKey: "gd.placeholder.input",
|
|
88
|
+
rules: [{
|
|
89
|
+
required: !0,
|
|
90
|
+
message: "\u8BF7\u8F93\u5165",
|
|
91
|
+
transKey: "gd.placeholder.input",
|
|
92
|
+
trigger: "change",
|
|
93
|
+
type: "number"
|
|
94
|
+
}]
|
|
95
|
+
}, {
|
|
96
|
+
transKey: "gd.org.remark",
|
|
97
|
+
effectType: "textarea",
|
|
98
|
+
prop: "remark",
|
|
99
|
+
label: "\u5907\u6CE8",
|
|
100
|
+
placeholder: "\u8BF7\u8F93\u5165",
|
|
101
|
+
placeholderTransKey: "gd.placeholder.input",
|
|
102
|
+
rules: [],
|
|
103
|
+
autosize: {
|
|
104
|
+
minRows: 4,
|
|
105
|
+
maxRows: 6
|
|
106
|
+
}
|
|
107
|
+
}],
|
|
108
|
+
tableButtons: [
|
|
109
|
+
{
|
|
110
|
+
displayName: "\u65B0\u589E",
|
|
111
|
+
functionName: "add",
|
|
112
|
+
show: !0,
|
|
113
|
+
transKey: "gd.btn.add",
|
|
114
|
+
icon: "el-icon-plus",
|
|
115
|
+
name: "sysRole:add"
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
displayName: "\u590D\u5236\u89D2\u8272",
|
|
119
|
+
functionName: "copy",
|
|
120
|
+
show: !0,
|
|
121
|
+
transKey: "gd.user.copyRole",
|
|
122
|
+
icon: "el-icon-plus",
|
|
123
|
+
name: "sysRole:add"
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
displayName: "\u7F16\u8F91",
|
|
127
|
+
functionName: "edit",
|
|
128
|
+
show: !0,
|
|
129
|
+
transKey: "gd.btn.edit",
|
|
130
|
+
icon: "el-icon-edit",
|
|
131
|
+
name: "sysRole:edit"
|
|
132
|
+
},
|
|
133
|
+
{
|
|
134
|
+
displayName: "\u5220\u9664",
|
|
135
|
+
functionName: "del",
|
|
136
|
+
show: !0,
|
|
137
|
+
transKey: "gd.btn.del",
|
|
138
|
+
icon: "el-icon-delete",
|
|
139
|
+
btnType: "danger",
|
|
140
|
+
name: "sysRole:delete"
|
|
141
|
+
},
|
|
142
|
+
{
|
|
143
|
+
displayName: "\u6388\u6743\u7528\u6237",
|
|
144
|
+
functionName: "userAuthorizationMenu",
|
|
145
|
+
show: !0,
|
|
146
|
+
transKey: "gd.user.userAuthorization",
|
|
147
|
+
icon: "el-icon-user",
|
|
148
|
+
name: "sysRole:userMenu"
|
|
149
|
+
},
|
|
150
|
+
{
|
|
151
|
+
displayName: "\u6388\u6743\u6587\u6863",
|
|
152
|
+
functionName: "documentAuthorizationMenu",
|
|
153
|
+
show: !0,
|
|
154
|
+
transKey: "gd.user.documentAuthorization",
|
|
155
|
+
icon: "el-icon-document",
|
|
156
|
+
name: "sysRole:documentMenu"
|
|
157
|
+
},
|
|
158
|
+
{
|
|
159
|
+
displayName: "\u6388\u6743\u83DC\u5355",
|
|
160
|
+
functionName: "grantRoleMenu",
|
|
161
|
+
show: !0,
|
|
162
|
+
transKey: "gd.user.menuRole",
|
|
163
|
+
icon: "el-icon-monitor",
|
|
164
|
+
name: "sysRole:grantMenu"
|
|
165
|
+
},
|
|
166
|
+
{
|
|
167
|
+
displayName: "\u6388\u6743APP\u83DC\u5355",
|
|
168
|
+
functionName: "grantRoleAppMenu",
|
|
169
|
+
show: !0,
|
|
170
|
+
transKey: "gd.user.menuRoleApp",
|
|
171
|
+
icon: "el-icon-mobile-phone",
|
|
172
|
+
name: "sysRole:grantMenu"
|
|
173
|
+
},
|
|
174
|
+
{
|
|
175
|
+
displayName: "\u6388\u6743\u6570\u636E",
|
|
176
|
+
functionName: "grantRoleGrant",
|
|
177
|
+
show: !0,
|
|
178
|
+
transKey: "gd.user.dataRole",
|
|
179
|
+
icon: "el-icon-tickets",
|
|
180
|
+
name: "sysRole:grantData"
|
|
181
|
+
},
|
|
182
|
+
{
|
|
183
|
+
displayName: "\u6388\u6743\u89C6\u56FE/\u8868\u5355",
|
|
184
|
+
functionName: "grantRoleVF",
|
|
185
|
+
show: !0,
|
|
186
|
+
transKey: "gd.user.menuRolevf",
|
|
187
|
+
icon: "el-icon-setting",
|
|
188
|
+
name: "sysRole:grantMenu"
|
|
189
|
+
}
|
|
190
|
+
],
|
|
191
|
+
formButtons: [{
|
|
192
|
+
displayName: "\u786E\u5B9A",
|
|
193
|
+
functionName: "handleSubmit",
|
|
194
|
+
show: !0,
|
|
195
|
+
transKey: "gd.btn.confirm",
|
|
196
|
+
icon: "el-icon-document-checked",
|
|
197
|
+
validate: !0
|
|
198
|
+
}],
|
|
199
|
+
tableQueries: [{
|
|
200
|
+
transKey: "gd.user.roleName",
|
|
201
|
+
prop: "name",
|
|
202
|
+
label: "\u89D2\u8272\u540D\u79F0",
|
|
203
|
+
effectType: "input",
|
|
204
|
+
rules: []
|
|
205
|
+
}, {
|
|
206
|
+
transKey: "gd.org.code",
|
|
207
|
+
prop: "code",
|
|
208
|
+
label: "\u552F\u4E00\u7F16\u7801",
|
|
209
|
+
effectType: "input",
|
|
210
|
+
rules: []
|
|
211
|
+
}]
|
|
212
|
+
};
|
|
213
|
+
}
|
|
214
|
+
};
|
|
215
|
+
const q = {
|
|
216
|
+
data() {
|
|
217
|
+
return {
|
|
218
|
+
defaultProps: {
|
|
219
|
+
children: "children",
|
|
220
|
+
label: "title"
|
|
221
|
+
},
|
|
222
|
+
buttons: [
|
|
223
|
+
{
|
|
224
|
+
displayName: "\u786E\u5B9A",
|
|
225
|
+
functionName: "handleSubmit",
|
|
226
|
+
show: !0,
|
|
227
|
+
transKey: "gd.btn.confirm",
|
|
228
|
+
icon: "el-icon-document-checked"
|
|
229
|
+
}
|
|
230
|
+
],
|
|
231
|
+
record: {},
|
|
232
|
+
visible: !1,
|
|
233
|
+
confirmLoading: !1,
|
|
234
|
+
fullscreen: !1,
|
|
235
|
+
width: "800px",
|
|
236
|
+
orgTreeData: [],
|
|
237
|
+
checkedKeys: []
|
|
238
|
+
};
|
|
239
|
+
},
|
|
240
|
+
computed: {
|
|
241
|
+
...h(["screenHeight", "tableLists"])
|
|
242
|
+
},
|
|
243
|
+
methods: {
|
|
244
|
+
handleSubmit() {
|
|
245
|
+
const s = this.$refs.tree.getCheckedKeys();
|
|
246
|
+
this.$emit(
|
|
247
|
+
"ok",
|
|
248
|
+
Object.assign(
|
|
249
|
+
{ ...this.record },
|
|
250
|
+
{
|
|
251
|
+
checkedKeys: s
|
|
252
|
+
}
|
|
253
|
+
)
|
|
254
|
+
), this.closed();
|
|
255
|
+
},
|
|
256
|
+
getOrgData() {
|
|
257
|
+
this.confirmLoading = !0, v().then((s) => {
|
|
258
|
+
s.success && (this.orgTreeData = s.data, this.confirmLoading = !1);
|
|
259
|
+
});
|
|
260
|
+
},
|
|
261
|
+
open(s) {
|
|
262
|
+
this.record = s, this.checkedKeys = s.checkedKeys, this.visible = !0, this.getOrgData();
|
|
263
|
+
},
|
|
264
|
+
closed() {
|
|
265
|
+
this.fullscreen = !1, this.visible = !1;
|
|
266
|
+
},
|
|
267
|
+
toggleFullscreen() {
|
|
268
|
+
this.fullscreen = !this.fullscreen;
|
|
269
|
+
},
|
|
270
|
+
doEvent(s) {
|
|
271
|
+
const e = s.item.functionName;
|
|
272
|
+
this[e] && this[e]();
|
|
273
|
+
}
|
|
274
|
+
}
|
|
275
|
+
};
|
|
276
|
+
var G = function() {
|
|
277
|
+
var e = this, t = e._self._c;
|
|
278
|
+
return t("div", [t("el-dialog", { directives: [{ name: "drag", rawName: "v-drag" }], ref: "dialog", class: e.fullscreen ? "gd-dialog gd-dialog-fangda" : "gd-dialog", attrs: { fullscreen: e.fullscreen, visible: e.visible, width: e.width, center: !0, "close-on-click-modal": !1, "append-to-body": !0, "modal-append-to-body": !1, top: "80px", "show-close": !1 }, on: { "update:visible": function(i) {
|
|
279
|
+
e.visible = i;
|
|
280
|
+
}, closed: e.closed } }, [t("template", { slot: "title" }, [t("gd-modal-title", { attrs: { title: e.$i18nt("gd.user.rangeRole", "\u6388\u6743\u8303\u56F4"), fullscreen: e.fullscreen, buttons: e.buttons, confirmLoading: e.confirmLoading, showClose: !0 }, on: { changeEvent: e.doEvent, toggleFullscreen: e.toggleFullscreen } })], 1), t("div", { directives: [{ name: "loading", rawName: "v-loading", value: e.confirmLoading, expression: "confirmLoading" }] }, [e.visible ? t("el-tree", { ref: "tree", attrs: { data: e.orgTreeData, "show-checkbox": "", "node-key": "id", "default-expand-all": "", "default-checked-keys": e.checkedKeys, props: e.defaultProps } }) : e._e()], 1)], 2)], 1);
|
|
281
|
+
}, V = [], H = /* @__PURE__ */ u(
|
|
282
|
+
q,
|
|
283
|
+
G,
|
|
284
|
+
V,
|
|
285
|
+
!1,
|
|
286
|
+
null,
|
|
287
|
+
"2b164094",
|
|
288
|
+
null,
|
|
289
|
+
null
|
|
290
|
+
);
|
|
291
|
+
const U = H.exports;
|
|
292
|
+
const J = {
|
|
293
|
+
data() {
|
|
294
|
+
return {
|
|
295
|
+
buttons: [
|
|
296
|
+
{
|
|
297
|
+
displayName: "\u786E\u5B9A",
|
|
298
|
+
functionName: "handleSubmit",
|
|
299
|
+
show: !0,
|
|
300
|
+
transKey: "gd.btn.confirm",
|
|
301
|
+
icon: "el-icon-document-checked"
|
|
302
|
+
}
|
|
303
|
+
],
|
|
304
|
+
record: {},
|
|
305
|
+
visible: !1,
|
|
306
|
+
confirmLoading: !1,
|
|
307
|
+
fullscreen: !1,
|
|
308
|
+
width: "94%",
|
|
309
|
+
loadData: [],
|
|
310
|
+
submitData: {},
|
|
311
|
+
loadSoData: (s) => (this.confirmLoading = !0, new Promise((e, t) => {
|
|
312
|
+
this.confirmLoading = !1, e({ pageNo: 1, pageSize: 500, totalRows: 0, rows: this.loadData });
|
|
313
|
+
})),
|
|
314
|
+
columns: [
|
|
315
|
+
{
|
|
316
|
+
transKey: "gd.btn.entity",
|
|
317
|
+
prop: "sysCodeGenName",
|
|
318
|
+
label: "\u5B9E\u4F53",
|
|
319
|
+
align: "left",
|
|
320
|
+
type: "slot",
|
|
321
|
+
slotType: "sysCodeGenName",
|
|
322
|
+
width: 120
|
|
323
|
+
},
|
|
324
|
+
{
|
|
325
|
+
transKey: "gd.btn.query",
|
|
326
|
+
prop: "getgrantd",
|
|
327
|
+
label: "\u67E5\u8BE2",
|
|
328
|
+
align: "left",
|
|
329
|
+
type: "slot",
|
|
330
|
+
slotType: "getgrantd",
|
|
331
|
+
width: 270,
|
|
332
|
+
showTooltip: !1
|
|
333
|
+
},
|
|
334
|
+
{
|
|
335
|
+
transKey: "gd.btn.add",
|
|
336
|
+
prop: "addgrantd",
|
|
337
|
+
label: "\u65B0\u589E",
|
|
338
|
+
align: "left",
|
|
339
|
+
type: "slot",
|
|
340
|
+
slotType: "addgrantd",
|
|
341
|
+
width: 270,
|
|
342
|
+
showTooltip: !1
|
|
343
|
+
},
|
|
344
|
+
{
|
|
345
|
+
transKey: "gd.btn.edit",
|
|
346
|
+
prop: "editgrantd",
|
|
347
|
+
label: "\u7F16\u8F91",
|
|
348
|
+
align: "left",
|
|
349
|
+
type: "slot",
|
|
350
|
+
slotType: "editgrantd",
|
|
351
|
+
width: 270,
|
|
352
|
+
showTooltip: !1
|
|
353
|
+
},
|
|
354
|
+
{
|
|
355
|
+
transKey: "gd.btn.del",
|
|
356
|
+
prop: "delgrantd",
|
|
357
|
+
label: "\u5220\u9664",
|
|
358
|
+
align: "left",
|
|
359
|
+
type: "slot",
|
|
360
|
+
slotType: "delgrantd",
|
|
361
|
+
width: 270,
|
|
362
|
+
showTooltip: !1
|
|
363
|
+
},
|
|
364
|
+
{
|
|
365
|
+
transKey: "gd.relation.assignment",
|
|
366
|
+
prop: "allocationgrantd",
|
|
367
|
+
label: "\u5206\u6D3E",
|
|
368
|
+
align: "left",
|
|
369
|
+
type: "slot",
|
|
370
|
+
slotType: "allocationgrantd",
|
|
371
|
+
width: 270,
|
|
372
|
+
showTooltip: !1
|
|
373
|
+
},
|
|
374
|
+
{
|
|
375
|
+
transKey: "gd.btn.share",
|
|
376
|
+
prop: "sharegrantd",
|
|
377
|
+
label: "\u5171\u4EAB",
|
|
378
|
+
align: "left",
|
|
379
|
+
type: "slot",
|
|
380
|
+
slotType: "sharegrantd",
|
|
381
|
+
width: 270,
|
|
382
|
+
showTooltip: !1
|
|
383
|
+
}
|
|
384
|
+
],
|
|
385
|
+
currentList: {}
|
|
386
|
+
};
|
|
387
|
+
},
|
|
388
|
+
components: { RoleScope: U },
|
|
389
|
+
computed: {
|
|
390
|
+
height() {
|
|
391
|
+
return this.screenHeight - (this.fullscreen ? 120 : 310);
|
|
392
|
+
},
|
|
393
|
+
...h(["primaryColor", "screenHeight", "tableLists", "tableSize", "tablePageSize"])
|
|
394
|
+
},
|
|
395
|
+
methods: {
|
|
396
|
+
handleSubmit() {
|
|
397
|
+
this.confirmLoading = !0;
|
|
398
|
+
let s = this.$refs.table.tableData;
|
|
399
|
+
s.map((e) => (e.addgrant = e.addgrantd.length > 0 ? e.addgrantd.join(",") : null, e.delgrant = e.delgrantd.length > 0 ? e.delgrantd.join(",") : null, e.editgrant = e.editgrantd.length > 0 ? e.editgrantd.join(",") : null, e.getgrant = e.getgrantd.length > 0 ? e.getgrantd.join(",") : null, e.sharegrant = e.sharegrantd.length > 0 ? e.sharegrantd.join(",") : null, e.allocationgrant = e.allocationgrantd.length > 0 ? e.allocationgrantd.join(",") : null, e)), B(
|
|
400
|
+
Object.assign(
|
|
401
|
+
{ ...this.submitData },
|
|
402
|
+
{
|
|
403
|
+
grants: s
|
|
404
|
+
}
|
|
405
|
+
)
|
|
406
|
+
).then((e) => {
|
|
407
|
+
this.confirmLoading = !1, e.success ? (this.$message.success(this.$i18nt("gd.https.operateSucc", "\u64CD\u4F5C\u6210\u529F")), this.closed()) : this.$message.error(this.$i18nt("gd.https.operateFail", "\u64CD\u4F5C\u5931\u8D25") + e.message);
|
|
408
|
+
});
|
|
409
|
+
},
|
|
410
|
+
setRoleScop(s) {
|
|
411
|
+
this.confirmLoading = !0;
|
|
412
|
+
const e = this.$refs.table.tableData;
|
|
413
|
+
e[s.index][s.name] = [...s.checkedKeys].join(","), this.loadData = [...e], this.refresh(), this.$message.success(this.$i18nt("gd.https.operateSucc", "\u64CD\u4F5C\u6210\u529F"));
|
|
414
|
+
},
|
|
415
|
+
openList(s, e, t) {
|
|
416
|
+
const i = this.$refs.table.tableData, n = `${s.prop.replace("grantd", "")}custom`, a = i[t][n], l = a ? a.split(",").map(Number) : [];
|
|
417
|
+
this.$refs.roleScope.open({ index: t, item: s, checkedKeys: l, data: e, name: n });
|
|
418
|
+
},
|
|
419
|
+
getUserControlData() {
|
|
420
|
+
this.confirmLoading = !0, F({ roleId: this.record.id }).then((s) => {
|
|
421
|
+
s.success ? (s.data.grants.map((e) => (e.addgrantd = e.addgrant ? e.addgrant.split(",") : [], e.delgrantd = e.delgrant ? e.delgrant.split(",") : [], e.editgrantd = e.editgrant ? e.editgrant.split(",") : [], e.getgrantd = e.getgrant ? e.getgrant.split(",") : [], e.sharegrantd = e.sharegrant ? e.sharegrant.split(",") : [], e.allocationgrantd = e.allocationgrant ? e.allocationgrant.split(",") : [], e)), this.loadData = s.data.grants, this.submitData = s.data, this.$nextTick(() => {
|
|
422
|
+
setTimeout(() => {
|
|
423
|
+
this.refresh(), this.confirmLoading = !0;
|
|
424
|
+
}, 1e3), setTimeout(() => {
|
|
425
|
+
this.confirmLoading = !1;
|
|
426
|
+
}, 1200);
|
|
427
|
+
})) : (this.$message.error(s.message), this.confirmLoading = !1);
|
|
428
|
+
});
|
|
429
|
+
},
|
|
430
|
+
open(s) {
|
|
431
|
+
this.record = s, this.visible = !0, this.getUserControlData();
|
|
432
|
+
},
|
|
433
|
+
closed() {
|
|
434
|
+
this.fullscreen = !1, this.visible = !1;
|
|
435
|
+
},
|
|
436
|
+
refresh(s = !0) {
|
|
437
|
+
this.$refs.table ? this.$refs.table.refresh(s) : console.log("err:\u89C6\u56FE\u672A\u52A0\u8F7D\uFF0C\u8BF7\u7B49\u5F85\u52A0\u8F7D\u5B8C\u6210\uFF01");
|
|
438
|
+
},
|
|
439
|
+
getDictionary(s) {
|
|
440
|
+
return this.$options.filters.dictData(s);
|
|
441
|
+
},
|
|
442
|
+
toggleFullscreen() {
|
|
443
|
+
this.fullscreen = !this.fullscreen;
|
|
444
|
+
},
|
|
445
|
+
doEvent(s) {
|
|
446
|
+
const e = s.item.functionName;
|
|
447
|
+
this[e] && this[e]();
|
|
448
|
+
}
|
|
449
|
+
}
|
|
450
|
+
};
|
|
451
|
+
var Q = function() {
|
|
452
|
+
var e = this, t = e._self._c;
|
|
453
|
+
return t("div", [t("el-dialog", { directives: [{ name: "drag", rawName: "v-drag" }], ref: "dialog", class: e.fullscreen ? "gd-dialog gd-dialog-fangda" : "gd-dialog", attrs: { fullscreen: e.fullscreen, visible: e.visible, width: e.width, center: !0, "close-on-click-modal": !1, "append-to-body": !0, "modal-append-to-body": !1, top: "80px", "show-close": !1 }, on: { "update:visible": function(i) {
|
|
454
|
+
e.visible = i;
|
|
455
|
+
}, closed: e.closed } }, [t("template", { slot: "title" }, [t("gd-modal-title", { attrs: { title: e.$i18nt("gd.user.dataRole", "\u6388\u6743\u6570\u636E"), fullscreen: e.fullscreen, buttons: e.buttons, confirmLoading: e.confirmLoading, showClose: !0 }, on: { changeEvent: e.doEvent, toggleFullscreen: e.toggleFullscreen } })], 1), t("div", { directives: [{ name: "loading", rawName: "v-loading", value: e.confirmLoading, expression: "confirmLoading" }], staticStyle: { "margin-top": "-12px" } }, [e.visible ? t("gd-tables", { ref: "table", attrs: { dataSource: e.loadSoData, size: e.tableSize, pageSize: e.tablePageSize, columns: e.columns, height: e.height, filtering: !1, initialLoading: !1, showPagination: !1, rowKey: "sysCodeGenId", disabledRefresh: "", disabledColumnSettings: "" }, scopedSlots: e._u([e._l(e.columns, function(i) {
|
|
456
|
+
return { key: i.prop, fn: function({ column: n, row: a, index: l }) {
|
|
457
|
+
return [i.prop === "sysCodeGenName" ? t("div", [e._v(" " + e._s(e.$i18nt(`Dynamics.${a.transkey}`, a.syscodegenname)) + " ")]) : t("div", { staticClass: "grant-select" }, [t("el-select", { staticStyle: { flex: "1" }, attrs: { placeholder: e.$i18nt("gd.xlsxImport.mapFieldsTip", "\u8BF7\u9009\u62E9\u6620\u5C04\u5B57\u6BB5"), filterable: "", clearable: "", multiple: "" }, model: { value: a[i.prop], callback: function(r) {
|
|
458
|
+
e.$set(a, i.prop, r);
|
|
459
|
+
}, expression: "row[item.prop]" } }, [e._l(e.getDictionary("data_scope_type"), function(r) {
|
|
460
|
+
return [t("el-option", { attrs: { label: e.$i18nt(`Dynamics.${r.transkey}`, r.name), value: r.code } })];
|
|
461
|
+
})], 2), a[i.prop].includes("5") ? t("el-button", { staticClass: "active-color flex-center", attrs: { type: "text" }, on: { click: function(r) {
|
|
462
|
+
return e.openList(i, a, l);
|
|
463
|
+
} } }, [e._v(" " + e._s(e.$i18nt("gd.btn.view", "\u67E5\u770B")) + " ")]) : e._e()], 1)];
|
|
464
|
+
} };
|
|
465
|
+
})], null, !0) }) : e._e()], 1)], 2), t("RoleScope", { ref: "roleScope", on: { ok: e.setRoleScop } })], 1);
|
|
466
|
+
}, W = [], X = /* @__PURE__ */ u(
|
|
467
|
+
J,
|
|
468
|
+
Q,
|
|
469
|
+
W,
|
|
470
|
+
!1,
|
|
471
|
+
null,
|
|
472
|
+
"39b91bb5",
|
|
473
|
+
null,
|
|
474
|
+
null
|
|
475
|
+
);
|
|
476
|
+
const Y = X.exports;
|
|
477
|
+
const Z = {
|
|
478
|
+
name: "LayoutItem",
|
|
479
|
+
props: {
|
|
480
|
+
record: {
|
|
481
|
+
type: Array,
|
|
482
|
+
default: () => []
|
|
483
|
+
},
|
|
484
|
+
checkedKeys: {
|
|
485
|
+
type: Array,
|
|
486
|
+
default: () => []
|
|
487
|
+
}
|
|
488
|
+
},
|
|
489
|
+
data() {
|
|
490
|
+
return {};
|
|
491
|
+
},
|
|
492
|
+
computed: {
|
|
493
|
+
fadeColord() {
|
|
494
|
+
return this.fadeColor(this.primaryColor, 0.1);
|
|
495
|
+
},
|
|
496
|
+
menusType() {
|
|
497
|
+
return this.record[0] ? this.record[0].menusType : 0;
|
|
498
|
+
},
|
|
499
|
+
...h(["primaryColor"])
|
|
500
|
+
},
|
|
501
|
+
methods: {
|
|
502
|
+
hasAll(s) {
|
|
503
|
+
return !(this.checkedKeys.filter((t) => s.menuBtnIds.includes(t)).length >= s.menuBtnIds.length);
|
|
504
|
+
},
|
|
505
|
+
checkedBtn(s, e) {
|
|
506
|
+
this.$emit("checkedBtn", s, e);
|
|
507
|
+
},
|
|
508
|
+
change(s, e) {
|
|
509
|
+
this.$emit("change", s, e);
|
|
510
|
+
},
|
|
511
|
+
open(s) {
|
|
512
|
+
this.$emit("open", s);
|
|
513
|
+
},
|
|
514
|
+
checked(s) {
|
|
515
|
+
return !!this.checkedKeys.filter((t) => t === s.id)[0];
|
|
516
|
+
},
|
|
517
|
+
fadeColor(s, e) {
|
|
518
|
+
let t = parseInt(s.substring(1, 3), 16), i = parseInt(s.substring(3, 5), 16), n = parseInt(s.substring(5, 7), 16);
|
|
519
|
+
return `rgba(${t},${i},${n},${e})`;
|
|
520
|
+
}
|
|
521
|
+
}
|
|
522
|
+
};
|
|
523
|
+
var ee = function() {
|
|
524
|
+
var e = this, t = e._self._c;
|
|
525
|
+
return t("div", { style: { "--fadecolor": e.fadeColord } }, [e._l(e.record, function(i) {
|
|
526
|
+
return [t("div", { staticClass: "list-item" }, [e.menusType === 0 ? t("i", { class: i.open ? "el-icon-caret-bottom" : "el-icon-caret-right", on: { click: function(n) {
|
|
527
|
+
return e.open(i);
|
|
528
|
+
} } }) : e._e(), e.menusType !== 2 ? t("div", { staticClass: "item-name" }, [t("el-checkbox", { attrs: { indeterminate: i.isIndeterminate }, on: { change: function(n) {
|
|
529
|
+
return e.change(n, [i.id]);
|
|
530
|
+
} }, model: { value: i.checked, callback: function(n) {
|
|
531
|
+
e.$set(i, "checked", n);
|
|
532
|
+
}, expression: "item.checked" } }, [i.iconClass ? t("i", { staticClass: "gd-icons", class: i.iconClass, staticStyle: { "font-size": "15px" } }) : e._e(), e._v(" " + e._s(e.$i18nt(`Dynamics.${i.transkey}`, i.title)) + " ")]), i.children && i.children.length > 0 && e.menusType === 1 ? t("el-button", { staticStyle: { "margin-left": "12px", padding: "5px 15px" }, attrs: { size: "mini" } }, [e.hasAll(i) ? t("span", { on: { click: function(n) {
|
|
533
|
+
return e.checkedBtn(i, 1);
|
|
534
|
+
} } }, [e._v(" " + e._s(e.$i18nt("gd.btn.selectAll", "\u5168\u9009")) + " ")]) : t("span", { on: { click: function(n) {
|
|
535
|
+
return e.checkedBtn(i, 0);
|
|
536
|
+
} } }, [e._v(" " + e._s(e.$i18nt("gd.btn.cancel", "\u53D6\u6D88")) + " ")])]) : e._e()], 1) : e._e(), t("div", { staticClass: "item-data" }, [i.children && i.children.length > 0 && i.children[0].menusType === 2 ? t("div", { staticClass: "item-data-list" }, [e._l(i.children, function(n) {
|
|
537
|
+
return [t("div", { staticClass: "item-name item-named", on: { click: function(a) {
|
|
538
|
+
return e.change(!n.checked, [n.id]);
|
|
539
|
+
} } }, [n.checked ? t("i", { staticClass: "gd-icons gd-icon-quanxuan active-color" }) : t("div", { staticClass: "item-named-kuang" }), t("div", { staticClass: "item-named-title", class: n.checked ? "active-color" : "" }, [e._v(" " + e._s(e.$i18nt(`Dynamics.${n.transkey}`, n.title)) + " ")])])];
|
|
540
|
+
})], 2) : e._e()])]), i.children && i.children.length > 0 && i.children[0].menusType !== 2 ? t("div", { staticClass: "list-more" }, [i.open ? t("LayoutItem", { attrs: { record: i.children, checkedKeys: e.checkedKeys }, on: { open: e.open, change: e.change, checkedBtn: e.checkedBtn } }) : e._e()], 1) : e._e()];
|
|
541
|
+
})], 2);
|
|
542
|
+
}, te = [], se = /* @__PURE__ */ u(
|
|
543
|
+
Z,
|
|
544
|
+
ee,
|
|
545
|
+
te,
|
|
546
|
+
!1,
|
|
547
|
+
null,
|
|
548
|
+
"53cbc9f1",
|
|
549
|
+
null,
|
|
550
|
+
null
|
|
551
|
+
);
|
|
552
|
+
const _ = se.exports;
|
|
553
|
+
const ie = {
|
|
554
|
+
data() {
|
|
555
|
+
return {
|
|
556
|
+
buttons: [
|
|
557
|
+
{
|
|
558
|
+
displayName: "\u786E\u5B9A",
|
|
559
|
+
functionName: "handleSubmit",
|
|
560
|
+
show: !0,
|
|
561
|
+
transKey: "gd.btn.confirm",
|
|
562
|
+
icon: "el-icon-document-checked"
|
|
563
|
+
}
|
|
564
|
+
],
|
|
565
|
+
record: {},
|
|
566
|
+
visible: !1,
|
|
567
|
+
confirmLoading: !1,
|
|
568
|
+
fullscreen: !1,
|
|
569
|
+
width: "94%",
|
|
570
|
+
menuTreeData: [],
|
|
571
|
+
checkedKeys: [],
|
|
572
|
+
list: [],
|
|
573
|
+
allClose: !1,
|
|
574
|
+
menuAll: [],
|
|
575
|
+
systemMenuAll: [],
|
|
576
|
+
allCheckedKeys: [],
|
|
577
|
+
appsId: ""
|
|
578
|
+
};
|
|
579
|
+
},
|
|
580
|
+
computed: {
|
|
581
|
+
isIndeterminate() {
|
|
582
|
+
return this.allClose ? !1 : this.checkedKeys.length > 0;
|
|
583
|
+
},
|
|
584
|
+
...h(["screenHeight", "tableLists"])
|
|
585
|
+
},
|
|
586
|
+
components: { LayoutItem: _ },
|
|
587
|
+
methods: {
|
|
588
|
+
handleSubmit() {
|
|
589
|
+
this.confirmLoading = !0, w({
|
|
590
|
+
id: this.record.id,
|
|
591
|
+
grantmenuidlist: this.checkedKeys
|
|
592
|
+
}).then((s) => {
|
|
593
|
+
s.success ? (this.$message.success(this.$i18nt("gd.https.operateSucc", "\u64CD\u4F5C\u6210\u529F")), this.$emit("ok"), this.closed()) : this.$message.error(this.$i18nt("gd.https.operateFail", "\u64CD\u4F5C\u5931\u8D25") + s.message), this.confirmLoading = !1;
|
|
594
|
+
});
|
|
595
|
+
},
|
|
596
|
+
checkedItemBtn(s, e) {
|
|
597
|
+
let t = [...this.checkedKeys].filter((i) => !s.menuBtnIds.includes(i));
|
|
598
|
+
e === 1 && (t = t.concat(s.menuBtnIds)), this.checkedKeys = [...t], this.handleItem();
|
|
599
|
+
},
|
|
600
|
+
openItem(s) {
|
|
601
|
+
let e = [...this.menuTreeData];
|
|
602
|
+
const t = (i) => (i = i.filter((n, a) => (n.id === s.id && (n.open = !n.open), n.children && n.children.length > 0 && (n.children = t(n.children)), !0)), i);
|
|
603
|
+
t(e), this.menuTreeData = [...e];
|
|
604
|
+
},
|
|
605
|
+
changeItem(s, e, t = !0) {
|
|
606
|
+
let i = [...this.checkedKeys];
|
|
607
|
+
this.checkedKeys.filter((o) => e.includes(o))[0];
|
|
608
|
+
const n = this.list.filter((o) => e.includes(o.id))[0], a = t && n ? n.menuIds : [];
|
|
609
|
+
if (s ? i = this.checkedKeys.concat(e).concat(a) : i = this.checkedKeys.filter((o) => !e.includes(o)).filter((o) => !a.includes(o)), this.checkedKeys = [...i], this.handleItem(), n.menusType === 2)
|
|
610
|
+
return;
|
|
611
|
+
let l = [];
|
|
612
|
+
this.findParent(this.menuTreeData, n, l);
|
|
613
|
+
let r = [], d = [];
|
|
614
|
+
l.forEach((o) => {
|
|
615
|
+
this.checkedKeys.filter((g) => o.menuIds.includes(g)).length === o.menuIds.length && o.menuIds.length > 0 && !o.checked ? r.push(o.id) : d.push(o.id);
|
|
616
|
+
}), r.forEach((o) => {
|
|
617
|
+
this.changeItem(!0, [o], !1);
|
|
618
|
+
}), d.forEach((o) => {
|
|
619
|
+
this.changeItem(!1, [o], !1);
|
|
620
|
+
});
|
|
621
|
+
},
|
|
622
|
+
handleItem() {
|
|
623
|
+
let s = [...this.menuTreeData];
|
|
624
|
+
const e = (t) => (t = t.filter((i, n) => {
|
|
625
|
+
const a = this.checkedKeys.filter((l) => i.menuIds.includes(l));
|
|
626
|
+
return this.checkedKeys.includes(i.id) ? (i.checked = !0, i.isIndeterminate = !1) : (i.checked = !1, i.isIndeterminate = a.length > 0 && i.menuIds.length > 0), i.children && i.children.length > 0 && (i.children = e(i.children)), !0;
|
|
627
|
+
}), t);
|
|
628
|
+
e(s), this.menuTreeData = [...s], this.allClose = this.checkedKeys.length === this.allCheckedKeys.length && this.allCheckedKeys.length > 0;
|
|
629
|
+
},
|
|
630
|
+
changeAll(s) {
|
|
631
|
+
s ? this.checkedKeys = [...this.allCheckedKeys] : this.checkedKeys = [], this.handleItem();
|
|
632
|
+
},
|
|
633
|
+
init() {
|
|
634
|
+
this.confirmLoading = !0, Promise.all([this.getMenuTree(), this.expandedMenuKeys(), this.getMenuList()]).then(async (s) => {
|
|
635
|
+
let e = [], t = [];
|
|
636
|
+
const i = (r) => (r = r.filter((d, o) => {
|
|
637
|
+
const c = this.checkedKeys.filter((f) => d.id === f)[0];
|
|
638
|
+
return d.open = !0, d.checked = d.type === 1 ? !!c : !1, d.isIndeterminate = !1, d.menusType = d.type, e.push(d.id), t.push(d), d.children && d.children.length > 0 && (d.children = i(d.children)), !0;
|
|
639
|
+
}), r);
|
|
640
|
+
let n = this.menuAll.filter((r) => !!this.systemMenuAll.filter((o) => o.id === r.id)[0]);
|
|
641
|
+
await i(n), this.allCheckedKeys = e;
|
|
642
|
+
let a = [];
|
|
643
|
+
t.forEach((r, d) => {
|
|
644
|
+
const o = this.getMenuIds(r);
|
|
645
|
+
t[d].menuIds = o.arr, t[d].menuBtnIds = o.btn, !(this.checkedKeys.filter((g) => o.arr.includes(g)).length === o.arr.length) && o.arr.length > 0 && a.push(r.id);
|
|
646
|
+
}), this.list = t;
|
|
647
|
+
const l = this.checkedKeys.filter((r) => e.includes(r)).filter((r) => !a.includes(r)).filter((r, d, o) => o.indexOf(r) === d);
|
|
648
|
+
this.checkedKeys = l, this.allClose = this.checkedKeys.length === e.length && e.length > 0, this.menuTreeData = [...n], this.handleItem(), this.confirmLoading = !1;
|
|
649
|
+
});
|
|
650
|
+
},
|
|
651
|
+
open(s, e) {
|
|
652
|
+
this.record = s, this.appsId = e || window.$systemInfo.id, this.visible = !0, this.init();
|
|
653
|
+
},
|
|
654
|
+
getMenuTree() {
|
|
655
|
+
return A({ roleId: this.record.id }).then((s) => (s.code === 200 && (this.menuAll = s.data), s));
|
|
656
|
+
},
|
|
657
|
+
expandedMenuKeys() {
|
|
658
|
+
return $({
|
|
659
|
+
id: this.record.id
|
|
660
|
+
}).then((s) => (s.code === 200 && (this.checkedKeys = s.data), s));
|
|
661
|
+
},
|
|
662
|
+
getMenuList() {
|
|
663
|
+
let s = { AppsId: this.appsId };
|
|
664
|
+
return M(s).then((e) => (e.code === 200 && (this.systemMenuAll = e.data), e));
|
|
665
|
+
},
|
|
666
|
+
getMenuIds(s) {
|
|
667
|
+
let e = [], t = [];
|
|
668
|
+
const i = (n) => (n = n.filter((a, l) => (a.menusType !== 2 ? e.push(a.id) : t.push(a.id), a.children && a.children.length > 0 && (a.children = i(a.children)), !0)), n);
|
|
669
|
+
return s.children && i(s.children), { arr: e, btn: t };
|
|
670
|
+
},
|
|
671
|
+
findParent(s, e, t) {
|
|
672
|
+
for (let i of s)
|
|
673
|
+
if (i.id === e.parentId || i.children && i.children.length > 0 && this.findParent(i.children, e, t))
|
|
674
|
+
return t.unshift(i), !0;
|
|
675
|
+
return !1;
|
|
676
|
+
},
|
|
677
|
+
closed() {
|
|
678
|
+
this.fullscreen = !1, this.visible = !1, this.menuTreeData = [], this.checkedKeys = [];
|
|
679
|
+
},
|
|
680
|
+
toggleFullscreen() {
|
|
681
|
+
this.fullscreen = !this.fullscreen;
|
|
682
|
+
},
|
|
683
|
+
doEvent(s) {
|
|
684
|
+
const e = s.item.functionName;
|
|
685
|
+
this[e] && this[e]();
|
|
686
|
+
}
|
|
687
|
+
}
|
|
688
|
+
};
|
|
689
|
+
var ne = function() {
|
|
690
|
+
var e = this, t = e._self._c;
|
|
691
|
+
return t("div", [t("el-dialog", { directives: [{ name: "drag", rawName: "v-drag" }], ref: "dialog", class: e.fullscreen ? "gd-dialog gd-dialog-fangda" : "gd-dialog", attrs: { fullscreen: e.fullscreen, visible: e.visible, width: e.width, center: !0, "close-on-click-modal": !1, "append-to-body": !0, "modal-append-to-body": !1, top: "80px", "show-close": !1 }, on: { "update:visible": function(i) {
|
|
692
|
+
e.visible = i;
|
|
693
|
+
}, closed: e.closed } }, [t("template", { slot: "title" }, [t("gd-modal-title", { attrs: { title: e.$i18nt("gd.user.dataRole", "\u6388\u6743\u6570\u636E"), fullscreen: e.fullscreen, buttons: e.buttons, confirmLoading: e.confirmLoading, showClose: !0 }, on: { changeEvent: e.doEvent, toggleFullscreen: e.toggleFullscreen } })], 1), t("div", { directives: [{ name: "loading", rawName: "v-loading", value: e.confirmLoading, expression: "confirmLoading" }], staticStyle: { "min-height": "400px" } }, [e.visible ? t("LayoutItem", { attrs: { record: e.menuTreeData, checkedKeys: e.checkedKeys }, on: { open: e.openItem, change: e.changeItem, checkedBtn: e.checkedItemBtn } }) : e._e()], 1), t("template", { slot: "footer" }, [t("div", { staticClass: "btoms" }, [t("el-checkbox", { attrs: { disabled: e.confirmLoading, indeterminate: e.isIndeterminate }, on: { change: e.changeAll }, model: { value: e.allClose, callback: function(i) {
|
|
694
|
+
e.allClose = i;
|
|
695
|
+
}, expression: "allClose" } }, [e._v(" " + e._s(e.$i18nt("gd.btn.selectAll", "\u5168\u9009")) + " ")])], 1)])], 2)], 1);
|
|
696
|
+
}, ae = [], re = /* @__PURE__ */ u(
|
|
697
|
+
ie,
|
|
698
|
+
ne,
|
|
699
|
+
ae,
|
|
700
|
+
!1,
|
|
701
|
+
null,
|
|
702
|
+
"d82ecaae",
|
|
703
|
+
null,
|
|
704
|
+
null
|
|
705
|
+
);
|
|
706
|
+
const le = re.exports;
|
|
707
|
+
const oe = {
|
|
708
|
+
name: "GdUserRole",
|
|
709
|
+
props: {
|
|
710
|
+
height: {
|
|
711
|
+
type: Number,
|
|
712
|
+
default: 100
|
|
713
|
+
},
|
|
714
|
+
openSelecteKeys: {
|
|
715
|
+
type: Array,
|
|
716
|
+
default: () => []
|
|
717
|
+
},
|
|
718
|
+
openMode: {
|
|
719
|
+
type: String,
|
|
720
|
+
default: "page"
|
|
721
|
+
}
|
|
722
|
+
},
|
|
723
|
+
mixins: [b],
|
|
724
|
+
data() {
|
|
725
|
+
return {
|
|
726
|
+
transKey: "gd.btn.add",
|
|
727
|
+
formLoading: !1,
|
|
728
|
+
currentNode: null,
|
|
729
|
+
loading: !0,
|
|
730
|
+
orgTree: [],
|
|
731
|
+
selectedRowKeys: [],
|
|
732
|
+
selectedRows: [],
|
|
733
|
+
queryParam: {},
|
|
734
|
+
defaultProps: {
|
|
735
|
+
children: "children",
|
|
736
|
+
label: "title",
|
|
737
|
+
value: "value"
|
|
738
|
+
},
|
|
739
|
+
defaultExpandedKeys: "",
|
|
740
|
+
loadData: (s) => E({ roleId: this.openSelecteKeys[0] }).then((e) => (this.getRowId(e.data), { pageNo: 1, pageSize: 1e3, totalRows: 0, rows: e.data })),
|
|
741
|
+
disableBtn: [],
|
|
742
|
+
fileList: [],
|
|
743
|
+
needLoad: !1,
|
|
744
|
+
infoData: {},
|
|
745
|
+
isSendEmail: "",
|
|
746
|
+
isSendEmailed: "",
|
|
747
|
+
tableColumns: [
|
|
748
|
+
{
|
|
749
|
+
type: "selection",
|
|
750
|
+
width: "60",
|
|
751
|
+
fixed: !0
|
|
752
|
+
},
|
|
753
|
+
{
|
|
754
|
+
transKey: "gd.user.name",
|
|
755
|
+
prop: "name",
|
|
756
|
+
label: "\u59D3\u540D",
|
|
757
|
+
type: "slot",
|
|
758
|
+
slotType: "name",
|
|
759
|
+
align: "left",
|
|
760
|
+
showOverflowTooltip: !0
|
|
761
|
+
},
|
|
762
|
+
{
|
|
763
|
+
transKey: "gd.user.nickname",
|
|
764
|
+
prop: "nickname",
|
|
765
|
+
label: "\u6635\u79F0",
|
|
766
|
+
align: "left",
|
|
767
|
+
type: "slot",
|
|
768
|
+
slotType: "nickname",
|
|
769
|
+
showOverflowTooltip: !0
|
|
770
|
+
},
|
|
771
|
+
{
|
|
772
|
+
transKey: "gd.user.sex",
|
|
773
|
+
prop: "sex",
|
|
774
|
+
label: "\u6027\u522B",
|
|
775
|
+
align: "left",
|
|
776
|
+
type: "slot",
|
|
777
|
+
slotType: "sex",
|
|
778
|
+
showOverflowTooltip: !0
|
|
779
|
+
},
|
|
780
|
+
{
|
|
781
|
+
transKey: "gd.user.organization",
|
|
782
|
+
prop: "orgname",
|
|
783
|
+
label: "\u6240\u5C5E\u673A\u6784",
|
|
784
|
+
align: "left",
|
|
785
|
+
type: "slot",
|
|
786
|
+
slotType: "orgname",
|
|
787
|
+
showOverflowTooltip: !0
|
|
788
|
+
},
|
|
789
|
+
{
|
|
790
|
+
transKey: "gd.user.status",
|
|
791
|
+
prop: "status",
|
|
792
|
+
label: "\u72B6\u6001",
|
|
793
|
+
align: "left",
|
|
794
|
+
type: "slot",
|
|
795
|
+
slotType: "status",
|
|
796
|
+
showOverflowTooltip: !0
|
|
797
|
+
}
|
|
798
|
+
],
|
|
799
|
+
formColumnsuser: [{
|
|
800
|
+
transKey: "gd.user.account",
|
|
801
|
+
effectType: "input",
|
|
802
|
+
prop: "account",
|
|
803
|
+
label: "\u8D26\u53F7",
|
|
804
|
+
placeholder: "\u8BF7\u8F93\u5165",
|
|
805
|
+
placeholderTransKey: "gd.placeholder.input",
|
|
806
|
+
rules: [{
|
|
807
|
+
required: !0,
|
|
808
|
+
message: "\u8BF7\u8F93\u5165",
|
|
809
|
+
transKey: "gd.placeholder.input",
|
|
810
|
+
trigger: "change",
|
|
811
|
+
min: 2
|
|
812
|
+
}]
|
|
813
|
+
}, {
|
|
814
|
+
transKey: "gd.user.name",
|
|
815
|
+
prop: "name",
|
|
816
|
+
effectType: "input",
|
|
817
|
+
label: "\u59D3\u540D",
|
|
818
|
+
placeholder: "\u8BF7\u8F93\u5165",
|
|
819
|
+
placeholderTransKey: "gd.placeholder.input",
|
|
820
|
+
rules: [{
|
|
821
|
+
required: !0,
|
|
822
|
+
message: "\u8BF7\u8F93\u5165",
|
|
823
|
+
transKey: "gd.placeholder.input",
|
|
824
|
+
trigger: "change"
|
|
825
|
+
}]
|
|
826
|
+
}, {
|
|
827
|
+
transKey: "gd.user.sex",
|
|
828
|
+
prop: "gender",
|
|
829
|
+
effectType: "radio",
|
|
830
|
+
label: "\u6027\u522B",
|
|
831
|
+
placeholder: "\u8BF7\u8F93\u5165",
|
|
832
|
+
placeholderTransKey: "gd.placeholder.input",
|
|
833
|
+
dictTypeCode: "gender",
|
|
834
|
+
rules: [{
|
|
835
|
+
required: !0,
|
|
836
|
+
message: "\u8BF7\u8F93\u5165",
|
|
837
|
+
transKey: "gd.placeholder.input",
|
|
838
|
+
trigger: "change"
|
|
839
|
+
}]
|
|
840
|
+
}, {
|
|
841
|
+
transKey: "gd.user.birthday",
|
|
842
|
+
prop: "birthday",
|
|
843
|
+
effectType: "date",
|
|
844
|
+
label: "\u751F\u65E5",
|
|
845
|
+
placeholder: "\u8BF7\u8F93\u5165",
|
|
846
|
+
valueFormat: "yyyy-MM-dd",
|
|
847
|
+
placeholderTransKey: "gd.placeholder.select",
|
|
848
|
+
rules: []
|
|
849
|
+
}, {
|
|
850
|
+
transKey: "gd.user.phone",
|
|
851
|
+
effectType: "input",
|
|
852
|
+
prop: "phone",
|
|
853
|
+
label: "\u624B\u673A\u53F7",
|
|
854
|
+
placeholder: "\u8BF7\u8F93\u5165",
|
|
855
|
+
placeholderTransKey: "gd.placeholder.input",
|
|
856
|
+
rules: [{
|
|
857
|
+
required: !0,
|
|
858
|
+
message: "\u8BF7\u8F93\u5165",
|
|
859
|
+
transKey: "gd.placeholder.input",
|
|
860
|
+
trigger: "change"
|
|
861
|
+
}]
|
|
862
|
+
}, {
|
|
863
|
+
transKey: "gd.user.email",
|
|
864
|
+
effectType: "input",
|
|
865
|
+
prop: "email",
|
|
866
|
+
label: "\u90AE\u7BB1",
|
|
867
|
+
placeholder: "\u8BF7\u8F93\u5165",
|
|
868
|
+
placeholderTransKey: "gd.placeholder.input",
|
|
869
|
+
rules: [{
|
|
870
|
+
required: !0,
|
|
871
|
+
message: "\u8BF7\u8F93\u5165",
|
|
872
|
+
transKey: "gd.placeholder.input",
|
|
873
|
+
trigger: "change"
|
|
874
|
+
}, {
|
|
875
|
+
type: "email",
|
|
876
|
+
message: "\u8BF7\u8F93\u5165\u6B63\u786E\u7684\u90AE\u7BB1\u53F7!",
|
|
877
|
+
transKey: "gd.account.emailTip"
|
|
878
|
+
}]
|
|
879
|
+
}, {
|
|
880
|
+
transKey: "gd.user.nickname",
|
|
881
|
+
prop: "nickname",
|
|
882
|
+
effectType: "input",
|
|
883
|
+
label: "\u6635\u79F0",
|
|
884
|
+
placeholder: "\u8BF7\u8F93\u5165",
|
|
885
|
+
placeholderTransKey: "gd.placeholder.input",
|
|
886
|
+
rules: []
|
|
887
|
+
}, {
|
|
888
|
+
transKey: "gd.user.tel",
|
|
889
|
+
prop: "tel",
|
|
890
|
+
effectType: "input",
|
|
891
|
+
label: "\u7535\u8BDD",
|
|
892
|
+
placeholder: "\u8BF7\u8F93\u5165",
|
|
893
|
+
placeholderTransKey: "gd.placeholder.input",
|
|
894
|
+
rules: []
|
|
895
|
+
}, {
|
|
896
|
+
transKey: "gd.org.displayName",
|
|
897
|
+
prop: "orgid",
|
|
898
|
+
effectType: "selectTree",
|
|
899
|
+
label: "\u6240\u5C5E\u673A\u6784",
|
|
900
|
+
placeholder: "\u8BF7\u9009\u62E9",
|
|
901
|
+
placeholderTransKey: "gd.placeholder.select",
|
|
902
|
+
treeOptions: [],
|
|
903
|
+
rules: [{
|
|
904
|
+
required: !0,
|
|
905
|
+
message: "\u8BF7\u9009\u62E9",
|
|
906
|
+
transKey: "gd.placeholder.select",
|
|
907
|
+
trigger: "change"
|
|
908
|
+
}]
|
|
909
|
+
}, {
|
|
910
|
+
transKey: "gd.user.PSDNeverExpire",
|
|
911
|
+
prop: "psdneverexpire",
|
|
912
|
+
effectType: "switch",
|
|
913
|
+
label: "\u5BC6\u7801\u6C38\u4E0D\u8FC7\u671F",
|
|
914
|
+
placeholder: "\u8BF7\u8F93\u5165",
|
|
915
|
+
placeholderTransKey: "gd.placeholder.input",
|
|
916
|
+
rules: []
|
|
917
|
+
}],
|
|
918
|
+
tableButtons: [
|
|
919
|
+
{
|
|
920
|
+
displayName: "\u65B0\u589E",
|
|
921
|
+
functionName: "add",
|
|
922
|
+
show: !0,
|
|
923
|
+
transKey: "gd.btn.add",
|
|
924
|
+
icon: "el-icon-plus",
|
|
925
|
+
name: "sysRole:add"
|
|
926
|
+
},
|
|
927
|
+
{
|
|
928
|
+
displayName: "\u5220\u9664",
|
|
929
|
+
functionName: "del",
|
|
930
|
+
show: !0,
|
|
931
|
+
transKey: "gd.btn.del",
|
|
932
|
+
icon: "el-icon-delete",
|
|
933
|
+
btnType: "danger",
|
|
934
|
+
name: "sysRole:delete"
|
|
935
|
+
}
|
|
936
|
+
],
|
|
937
|
+
disabledRowId: [],
|
|
938
|
+
sysCodeGenName: "sys_user"
|
|
939
|
+
};
|
|
940
|
+
},
|
|
941
|
+
components: {},
|
|
942
|
+
computed: {
|
|
943
|
+
initialLoading() {
|
|
944
|
+
return this.openMode === "page";
|
|
945
|
+
},
|
|
946
|
+
selectedKeep() {
|
|
947
|
+
return this.openMode !== "page";
|
|
948
|
+
},
|
|
949
|
+
getQueryParam() {
|
|
950
|
+
let s = /* @__PURE__ */ new Map();
|
|
951
|
+
for (let e in this.queryParam)
|
|
952
|
+
s.set(e === "statecodes" ? "searchctatus" : e, this.queryParam[e]);
|
|
953
|
+
return Object.fromEntries(s);
|
|
954
|
+
},
|
|
955
|
+
getFormColumns() {
|
|
956
|
+
return this.formColumnsuser.filter((e) => (e.prop === "orgid" && (e.treeOptions = [...this.orgTree]), !0));
|
|
957
|
+
},
|
|
958
|
+
getTableButtons() {
|
|
959
|
+
return this.tableButtons.filter((s) => (s.show = !this.disableBtn.includes(s.displayName), !0));
|
|
960
|
+
},
|
|
961
|
+
getHeight() {
|
|
962
|
+
return this.height;
|
|
963
|
+
},
|
|
964
|
+
styled() {
|
|
965
|
+
return `height:${this.height + 76}px`;
|
|
966
|
+
},
|
|
967
|
+
...h(["tablePageSize", "tableSize", "labelPosition", "formMode"])
|
|
968
|
+
},
|
|
969
|
+
methods: {
|
|
970
|
+
getRowId(s) {
|
|
971
|
+
let e = [];
|
|
972
|
+
s.filter((t) => !this.disabledRowId.includes(t.id)).forEach((t) => {
|
|
973
|
+
e.push(t.id);
|
|
974
|
+
}), this.disabledRowId = this.disabledRowId.concat(e);
|
|
975
|
+
},
|
|
976
|
+
saveQueries(s) {
|
|
977
|
+
this.queryParam = {
|
|
978
|
+
...s
|
|
979
|
+
}, this.refresh();
|
|
980
|
+
},
|
|
981
|
+
refresh() {
|
|
982
|
+
this.$refs.table.refresh();
|
|
983
|
+
},
|
|
984
|
+
getOrgTree() {
|
|
985
|
+
v({}).then((s) => {
|
|
986
|
+
if (s.code === 200) {
|
|
987
|
+
const e = (t) => (t = t.filter((i, n) => (i.value = String(i.value), i.children && i.children.length > 0 && (i.children = e(i.children)), !0)), t);
|
|
988
|
+
this.orgTree = e(s.data);
|
|
989
|
+
}
|
|
990
|
+
this.loading = !1;
|
|
991
|
+
});
|
|
992
|
+
},
|
|
993
|
+
handleNodeClick(s) {
|
|
994
|
+
this.queryParam.orgId === s.id ? (delete this.queryParam.orgId, this.$nextTick(() => {
|
|
995
|
+
setTimeout(() => {
|
|
996
|
+
this.$refs.tree.setCurrentKey(null);
|
|
997
|
+
}, 0);
|
|
998
|
+
})) : this.queryParam = Object.assign(
|
|
999
|
+
{
|
|
1000
|
+
...this.queryParam
|
|
1001
|
+
},
|
|
1002
|
+
{
|
|
1003
|
+
orgId: s.id
|
|
1004
|
+
}
|
|
1005
|
+
), this.refresh();
|
|
1006
|
+
},
|
|
1007
|
+
handleOk() {
|
|
1008
|
+
this.$refs.table.refresh();
|
|
1009
|
+
},
|
|
1010
|
+
onSelectChange(s, e) {
|
|
1011
|
+
this.selectedRowKeys = s, this.selectedRows = e;
|
|
1012
|
+
},
|
|
1013
|
+
doEvent(s) {
|
|
1014
|
+
let e = s.item.functionName;
|
|
1015
|
+
this[e] && this[e]();
|
|
1016
|
+
},
|
|
1017
|
+
lookupSeled(s) {
|
|
1018
|
+
if (s.fkData.length === 0) {
|
|
1019
|
+
this.$refs.engineSearch.closed();
|
|
1020
|
+
return;
|
|
1021
|
+
}
|
|
1022
|
+
this.$refs.engineSearch.confirmLoading = !0, O({
|
|
1023
|
+
roleId: this.openSelecteKeys[0],
|
|
1024
|
+
userIdList: s.data
|
|
1025
|
+
}).then((e) => {
|
|
1026
|
+
e.success ? (this.$message.success(this.$i18nt("gd.https.operateSucc", "\u64CD\u4F5C\u6210\u529F")), this.$refs.engineSearch.closed(), this.refresh()) : this.$message.error(this.$i18nt("gd.https.operateFail", "\u64CD\u4F5C\u5931\u8D25") + e.message), this.$refs.engineSearch.confirmLoading = !1;
|
|
1027
|
+
});
|
|
1028
|
+
},
|
|
1029
|
+
add() {
|
|
1030
|
+
this.$refs.engineSearch.open({
|
|
1031
|
+
fkEntityName: this.sysCodeGenName,
|
|
1032
|
+
val: [],
|
|
1033
|
+
effectType: "participants",
|
|
1034
|
+
isRelevance: !0
|
|
1035
|
+
});
|
|
1036
|
+
},
|
|
1037
|
+
del() {
|
|
1038
|
+
let s = this;
|
|
1039
|
+
if (this.selectedRowKeys.length === 0) {
|
|
1040
|
+
this.$message.warning(this.$i18nt("gd.https.delTip", "\u8BF7\u9009\u62E9\u8981\u5220\u9664\u7684\u6570\u636E!"));
|
|
1041
|
+
return;
|
|
1042
|
+
}
|
|
1043
|
+
this.$confirm(this.$i18nt("gd.https.delContent", "\u662F\u5426\u5220\u9664\u9009\u4E2D\u6570\u636E?"), this.$i18nt("gd.https.delTitle", "\u6E29\u99A8\u63D0\u793A"), {
|
|
1044
|
+
confirmButtonText: this.$i18nt("gd.https.delOk", "\u786E\u5B9A\u5220\u9664"),
|
|
1045
|
+
cancelButtonText: this.$i18nt("gd.https.delCancel", "\u53D6\u6D88"),
|
|
1046
|
+
showClose: !1,
|
|
1047
|
+
confirmButtonLoading: !1,
|
|
1048
|
+
cancelButtonLoading: !1,
|
|
1049
|
+
closeOnClickModal: !1,
|
|
1050
|
+
type: "warning",
|
|
1051
|
+
confirmButtonClass: "el-button--danger",
|
|
1052
|
+
customClass: "custom-alert",
|
|
1053
|
+
callback: () => {
|
|
1054
|
+
},
|
|
1055
|
+
beforeClose: (e, t, i) => {
|
|
1056
|
+
if (e !== "confirm") {
|
|
1057
|
+
i();
|
|
1058
|
+
return;
|
|
1059
|
+
}
|
|
1060
|
+
t.confirmButtonLoading = !0, t.cancelButtonLoading = !0, t.showCancelButton = !1, z({
|
|
1061
|
+
roleId: s.openSelecteKeys[0],
|
|
1062
|
+
userIdList: s.selectedRowKeys
|
|
1063
|
+
}).then((n) => {
|
|
1064
|
+
n.success ? (s.$message.success(s.$i18nt("gd.https.delSucc", "\u5220\u9664\u6210\u529F")), s.disabledRowId = s.disabledRowId.filter((a) => !s.selectedRows.filter((r) => r.id === a)[0]), t.confirmButtonLoading = !1, t.cancelButtonLoading = !1, t.showCancelButton = !0, i(), s.refresh()) : s.$message.error(s.$i18nt("gd.https.delFail", "\u5220\u9664\u5931\u8D25") + n.message);
|
|
1065
|
+
});
|
|
1066
|
+
}
|
|
1067
|
+
});
|
|
1068
|
+
}
|
|
1069
|
+
},
|
|
1070
|
+
created() {
|
|
1071
|
+
}
|
|
1072
|
+
};
|
|
1073
|
+
var de = function() {
|
|
1074
|
+
var e = this, t = e._self._c;
|
|
1075
|
+
return t("div", { staticClass: "gd-page-view", staticStyle: { display: "flex", background: "rgb(245, 245, 245)" } }, [t("div", { staticClass: "page-view-list" }, [t("gd-tables", { ref: "table", attrs: { dataSource: e.loadData, size: e.tableSize, pageSize: e.tablePageSize, columns: e.tableColumns, showPagination: !1, selectedRowKeys: e.selectedRowKeys, height: e.height, initialLoading: !1 }, on: { onChange: e.onSelectChange }, scopedSlots: e._u([{ key: "operator", fn: function() {
|
|
1076
|
+
return [t("div", { staticClass: "gd-table-operator" }, [t("div", { staticClass: "gd-table-operatorr" }, [t("gd-btn-list", { attrs: { sysViewButtons: e.tableButtons }, on: { functionName: e.doEvent } })], 1)])];
|
|
1077
|
+
}, proxy: !0 }, { key: "name", fn: function({ column: i, row: n }) {
|
|
1078
|
+
return [t("span", { staticClass: "active-color", staticStyle: { cursor: "pointer" } }, [e._v(" " + e._s(n.name) + " ")])];
|
|
1079
|
+
} }, { key: "nickname", fn: function({ column: i, row: n }) {
|
|
1080
|
+
return [t("span", { staticStyle: { cursor: "pointer" } }, [e._v(" " + e._s(n.nickname) + " ")])];
|
|
1081
|
+
} }, { key: "orgname", fn: function({ column: i, row: n }) {
|
|
1082
|
+
return [t("span", { staticStyle: { cursor: "pointer" } }, [e._v(" " + e._s(n.orgname) + " ")])];
|
|
1083
|
+
} }, { key: "sex", fn: function({ column: i, row: n }) {
|
|
1084
|
+
return [t("span", [e._v(" " + e._s(e._f("dictType")("gender", n.gender)) + " ")])];
|
|
1085
|
+
} }, { key: "status", fn: function({ column: i, row: n }) {
|
|
1086
|
+
return [t("span", [e._v(" " + e._s(e._f("dictType")("state_code", n.statecodes)) + " ")])];
|
|
1087
|
+
} }]) }), t("gd-search", { ref: "engineSearch", attrs: { appendToBody: !0, disabledRowId: e.disabledRowId }, on: { lookupSeled: e.lookupSeled } })], 1)]);
|
|
1088
|
+
}, ce = [], he = /* @__PURE__ */ u(
|
|
1089
|
+
oe,
|
|
1090
|
+
de,
|
|
1091
|
+
ce,
|
|
1092
|
+
!1,
|
|
1093
|
+
null,
|
|
1094
|
+
"e9dd56ab",
|
|
1095
|
+
null,
|
|
1096
|
+
null
|
|
1097
|
+
);
|
|
1098
|
+
const k = he.exports;
|
|
1099
|
+
const ue = {
|
|
1100
|
+
data() {
|
|
1101
|
+
return {
|
|
1102
|
+
buttons: [],
|
|
1103
|
+
record: {},
|
|
1104
|
+
visible: !1,
|
|
1105
|
+
confirmLoading: !1,
|
|
1106
|
+
fullscreen: !1,
|
|
1107
|
+
width: "90%",
|
|
1108
|
+
selectedRowKeys: []
|
|
1109
|
+
};
|
|
1110
|
+
},
|
|
1111
|
+
components: { UserFormDate: k },
|
|
1112
|
+
computed: {
|
|
1113
|
+
height() {
|
|
1114
|
+
return this.screenHeight - (this.fullscreen ? 160 : 340);
|
|
1115
|
+
},
|
|
1116
|
+
...h(["screenHeight"])
|
|
1117
|
+
},
|
|
1118
|
+
methods: {
|
|
1119
|
+
handleSubmit() {
|
|
1120
|
+
this.closed(), this.$emit("ok");
|
|
1121
|
+
},
|
|
1122
|
+
open(s) {
|
|
1123
|
+
this.record = s, this.visible = !0, this.selectedRowKeys = [s.id], this.$nextTick(() => {
|
|
1124
|
+
setTimeout(() => {
|
|
1125
|
+
this.$refs.userForm.refresh();
|
|
1126
|
+
}, 0);
|
|
1127
|
+
});
|
|
1128
|
+
},
|
|
1129
|
+
closed() {
|
|
1130
|
+
this.fullscreen = !1, this.visible = !1;
|
|
1131
|
+
},
|
|
1132
|
+
toggleFullscreen() {
|
|
1133
|
+
this.fullscreen = !this.fullscreen;
|
|
1134
|
+
},
|
|
1135
|
+
onSelectChange(s) {
|
|
1136
|
+
this.selectedRowKeys = s;
|
|
1137
|
+
},
|
|
1138
|
+
doEvent(s) {
|
|
1139
|
+
const e = s.item.functionName;
|
|
1140
|
+
this[e] && this[e]();
|
|
1141
|
+
}
|
|
1142
|
+
}
|
|
1143
|
+
};
|
|
1144
|
+
var ge = function() {
|
|
1145
|
+
var e = this, t = e._self._c;
|
|
1146
|
+
return t("el-dialog", { directives: [{ name: "drag", rawName: "v-drag" }], ref: "dialog", class: e.fullscreen ? "gd-dialog gd-dialog-fangda" : "gd-dialog", attrs: { fullscreen: e.fullscreen, visible: e.visible, width: e.width, center: !0, "close-on-click-modal": !1, "modal-append-to-body": !0, "append-to-body": !1, top: "80px", "show-close": !1 }, on: { "update:visible": function(i) {
|
|
1147
|
+
e.visible = i;
|
|
1148
|
+
}, closed: e.closed } }, [t("template", { slot: "title" }, [t("gd-modal-title", { attrs: { title: e.$i18nt("gd.user.userAuthorization", "\u6388\u6743\u7528\u6237"), fullscreen: e.fullscreen, buttons: e.buttons, confirmLoading: e.confirmLoading, showClose: !0 }, on: { changeEvent: e.doEvent, toggleFullscreen: e.toggleFullscreen } })], 1), t("div", { directives: [{ name: "loading", rawName: "v-loading", value: e.confirmLoading, expression: "confirmLoading" }] }, [e.visible ? t("UserFormDate", { ref: "userForm", attrs: { height: e.height, openMode: "components", openSelecteKeys: e.selectedRowKeys }, on: { onSelectChange: e.onSelectChange } }) : e._e()], 1)], 2);
|
|
1149
|
+
}, fe = [], pe = /* @__PURE__ */ u(
|
|
1150
|
+
ue,
|
|
1151
|
+
ge,
|
|
1152
|
+
fe,
|
|
1153
|
+
!1,
|
|
1154
|
+
null,
|
|
1155
|
+
"46b57430",
|
|
1156
|
+
null,
|
|
1157
|
+
null
|
|
1158
|
+
);
|
|
1159
|
+
const me = pe.exports;
|
|
1160
|
+
const ye = {
|
|
1161
|
+
data() {
|
|
1162
|
+
return {
|
|
1163
|
+
buttons: [
|
|
1164
|
+
{
|
|
1165
|
+
displayName: "\u786E\u5B9A",
|
|
1166
|
+
functionName: "handleSubmit",
|
|
1167
|
+
show: !0,
|
|
1168
|
+
transKey: "gd.btn.confirm",
|
|
1169
|
+
icon: "el-icon-document-checked"
|
|
1170
|
+
}
|
|
1171
|
+
],
|
|
1172
|
+
record: {},
|
|
1173
|
+
visible: !1,
|
|
1174
|
+
confirmLoading: !1,
|
|
1175
|
+
fullscreen: !1,
|
|
1176
|
+
width: "80%",
|
|
1177
|
+
selectedPath: "/",
|
|
1178
|
+
pathDialogVisible: !1,
|
|
1179
|
+
tempSelectedPath: "",
|
|
1180
|
+
folderTree: [],
|
|
1181
|
+
treeProps: {
|
|
1182
|
+
label: "name",
|
|
1183
|
+
children: "children"
|
|
1184
|
+
},
|
|
1185
|
+
permissions: {
|
|
1186
|
+
ReadMetaData: "allow",
|
|
1187
|
+
ManagePrem: "deny"
|
|
1188
|
+
},
|
|
1189
|
+
cardList: [
|
|
1190
|
+
{
|
|
1191
|
+
name: "\u901A\u7528\u6743\u9650",
|
|
1192
|
+
transkey: "gd.user.generalPermissions",
|
|
1193
|
+
id: "1",
|
|
1194
|
+
list: [
|
|
1195
|
+
{
|
|
1196
|
+
value: "",
|
|
1197
|
+
name: "\u67E5\u770B",
|
|
1198
|
+
transkey: "Sys_Tables_sys_doc_role_premissions_Fields_readmetadata_Name",
|
|
1199
|
+
code: "readmetadata",
|
|
1200
|
+
icon: "el-icon-view"
|
|
1201
|
+
},
|
|
1202
|
+
{
|
|
1203
|
+
value: "",
|
|
1204
|
+
name: "\u91CD\u547D\u540D",
|
|
1205
|
+
code: "rename",
|
|
1206
|
+
transkey: "Sys_Tables_sys_doc_role_premissions_Fields_rename_Name",
|
|
1207
|
+
icon: "el-icon-edit"
|
|
1208
|
+
},
|
|
1209
|
+
{
|
|
1210
|
+
value: "",
|
|
1211
|
+
name: "\u5220\u9664",
|
|
1212
|
+
code: "delete",
|
|
1213
|
+
transkey: "Sys_Tables_sys_doc_role_premissions_Fields_delete_Name",
|
|
1214
|
+
icon: "el-icon-delete-solid"
|
|
1215
|
+
},
|
|
1216
|
+
{
|
|
1217
|
+
value: "",
|
|
1218
|
+
name: "\u7BA1\u7406\u6743\u9650",
|
|
1219
|
+
code: "manageprem",
|
|
1220
|
+
transkey: "Sys_Tables_sys_doc_role_premissions_Fields_manageprem_Name",
|
|
1221
|
+
icon: "el-icon-user-solid"
|
|
1222
|
+
},
|
|
1223
|
+
{
|
|
1224
|
+
value: "",
|
|
1225
|
+
name: "\u79FB\u52A8",
|
|
1226
|
+
code: "move",
|
|
1227
|
+
transkey: "Sys_Tables_sys_doc_role_premissions_Fields_move_Name",
|
|
1228
|
+
icon: "el-icon-rank"
|
|
1229
|
+
}
|
|
1230
|
+
]
|
|
1231
|
+
},
|
|
1232
|
+
{
|
|
1233
|
+
name: "\u6587\u4EF6\u5939\u7279\u6B8A\u6743\u9650",
|
|
1234
|
+
transkey: "gd.user.folderSpecialPermissions",
|
|
1235
|
+
id: "2",
|
|
1236
|
+
list: [
|
|
1237
|
+
{
|
|
1238
|
+
value: "",
|
|
1239
|
+
name: "\u521B\u5EFA\u6587\u4EF6",
|
|
1240
|
+
code: "createfile",
|
|
1241
|
+
transkey: "Sys_Tables_sys_doc_role_premissions_Fields_createfile_Name",
|
|
1242
|
+
icon: "el-icon-document-add"
|
|
1243
|
+
},
|
|
1244
|
+
{
|
|
1245
|
+
value: "",
|
|
1246
|
+
name: "\u521B\u5EFA\u5B50\u6587\u4EF6\u5939",
|
|
1247
|
+
code: "createsubfolder",
|
|
1248
|
+
transkey: "Sys_Tables_sys_doc_role_premissions_Fields_createsubfolder_Name",
|
|
1249
|
+
icon: "el-icon-folder-add"
|
|
1250
|
+
}
|
|
1251
|
+
]
|
|
1252
|
+
},
|
|
1253
|
+
{
|
|
1254
|
+
name: "\u6587\u4EF6\u7279\u6B8A\u6743\u9650",
|
|
1255
|
+
transkey: "gd.user.fileSpecialPermissions",
|
|
1256
|
+
id: "3",
|
|
1257
|
+
list: [
|
|
1258
|
+
{
|
|
1259
|
+
value: "",
|
|
1260
|
+
name: "\u4E0B\u8F7D",
|
|
1261
|
+
code: "download",
|
|
1262
|
+
transkey: "Sys_Tables_sys_doc_role_premissions_Fields_download_Name",
|
|
1263
|
+
icon: "el-icon-download"
|
|
1264
|
+
}
|
|
1265
|
+
]
|
|
1266
|
+
}
|
|
1267
|
+
],
|
|
1268
|
+
restaurants: [],
|
|
1269
|
+
objectId: "0",
|
|
1270
|
+
currentPermissions: [],
|
|
1271
|
+
id: ""
|
|
1272
|
+
};
|
|
1273
|
+
},
|
|
1274
|
+
components: { UserFormDate: k },
|
|
1275
|
+
computed: {
|
|
1276
|
+
height() {
|
|
1277
|
+
return this.screenHeight - (this.fullscreen ? 160 : 340);
|
|
1278
|
+
},
|
|
1279
|
+
...h(["screenHeight"])
|
|
1280
|
+
},
|
|
1281
|
+
methods: {
|
|
1282
|
+
querySearch(s, e) {
|
|
1283
|
+
},
|
|
1284
|
+
createFilter(s) {
|
|
1285
|
+
return (e) => e.name.toLowerCase().indexOf(s.toLowerCase()) === 0;
|
|
1286
|
+
},
|
|
1287
|
+
handleSelect(s) {
|
|
1288
|
+
console.log(s);
|
|
1289
|
+
},
|
|
1290
|
+
keyuprefresh() {
|
|
1291
|
+
},
|
|
1292
|
+
buildTree(s) {
|
|
1293
|
+
const e = s.find((a) => a.parentid === null);
|
|
1294
|
+
if (!e)
|
|
1295
|
+
throw new Error("No root node found (parentid: null)");
|
|
1296
|
+
const t = {};
|
|
1297
|
+
s.forEach((a) => {
|
|
1298
|
+
t[a.id] = {
|
|
1299
|
+
name: a.name,
|
|
1300
|
+
id: a.id,
|
|
1301
|
+
children: []
|
|
1302
|
+
};
|
|
1303
|
+
}), s.forEach((a) => {
|
|
1304
|
+
if (a.parentid === null)
|
|
1305
|
+
return;
|
|
1306
|
+
const l = t[a.parentid];
|
|
1307
|
+
l ? l.children.some((r) => r.id === a.id) || l.children.push(t[a.id]) : t[e.id].children.push(t[a.id]);
|
|
1308
|
+
});
|
|
1309
|
+
function i(a) {
|
|
1310
|
+
a.children && a.children.length > 0 && (a.children.sort((l, r) => l.name.localeCompare(r.name)), a.children.forEach((l) => i(l)));
|
|
1311
|
+
}
|
|
1312
|
+
const n = {
|
|
1313
|
+
name: e.name,
|
|
1314
|
+
id: e.id,
|
|
1315
|
+
children: t[e.id].children
|
|
1316
|
+
};
|
|
1317
|
+
return i(n), [n];
|
|
1318
|
+
},
|
|
1319
|
+
handleSubmit() {
|
|
1320
|
+
this.id != "" ? this.edit() : this.add();
|
|
1321
|
+
},
|
|
1322
|
+
add() {
|
|
1323
|
+
const e = this.currentPermissions.map((t) => {
|
|
1324
|
+
const i = t.list.reduce((n, a) => (n[a.code] = a.value, n), {});
|
|
1325
|
+
return {
|
|
1326
|
+
...t,
|
|
1327
|
+
...i
|
|
1328
|
+
};
|
|
1329
|
+
}).map(({ list: t, ...i }) => i);
|
|
1330
|
+
this.confirmLoading = !0, K(e).then((t) => {
|
|
1331
|
+
t.success ? (this.$message.success(this.$i18nt("gd.https.operateSucc", "\u64CD\u4F5C\u6210\u529F")), this.$emit("ok"), this.closed()) : this.$message.error(
|
|
1332
|
+
this.$i18nt("gd.https.operateFail", "\u64CD\u4F5C\u5931\u8D25") + t.message
|
|
1333
|
+
), this.confirmLoading = !1;
|
|
1334
|
+
});
|
|
1335
|
+
},
|
|
1336
|
+
edit() {
|
|
1337
|
+
const e = this.currentPermissions.map((t) => {
|
|
1338
|
+
const i = t.list.reduce((n, a) => (n[a.code] = a.value, n), {});
|
|
1339
|
+
return {
|
|
1340
|
+
...t,
|
|
1341
|
+
...i
|
|
1342
|
+
};
|
|
1343
|
+
}).map(({ list: t, ...i }) => i);
|
|
1344
|
+
console.log(e), this.confirmLoading = !0, T(e).then((t) => {
|
|
1345
|
+
t.success ? (this.$message.success(this.$i18nt("gd.https.operateSucc", "\u64CD\u4F5C\u6210\u529F")), this.$emit("ok"), this.closed()) : this.$message.error(
|
|
1346
|
+
this.$i18nt("gd.https.operateFail", "\u64CD\u4F5C\u5931\u8D25") + t.message
|
|
1347
|
+
), this.confirmLoading = !1;
|
|
1348
|
+
});
|
|
1349
|
+
},
|
|
1350
|
+
open(s) {
|
|
1351
|
+
this.record = s, this.visible = !0, this.getallTree(), this.getDetail(s);
|
|
1352
|
+
},
|
|
1353
|
+
getDetail(s) {
|
|
1354
|
+
C({ roleId: s.id }).then((e) => {
|
|
1355
|
+
if (e.code == 200 && (this.currentPermissions = [], this.$refs.elTreeRef && this.$refs.elTreeRef.setCheckedKeys([]), e.data.length > 0)) {
|
|
1356
|
+
this.id = e.data[0].id, this.currentPermissions = [];
|
|
1357
|
+
const t = e.data.map((n) => {
|
|
1358
|
+
const a = [
|
|
1359
|
+
{ name: "\u67E5\u770B", code: "readmetadata", value: n.readmetadata },
|
|
1360
|
+
{ name: "\u91CD\u547D\u540D", code: "rename", value: n.rename },
|
|
1361
|
+
{ name: "\u5220\u9664", code: "delete", value: n.delete },
|
|
1362
|
+
{ name: "\u7BA1\u7406\u6743\u9650", code: "manageprem", value: n.manageprem },
|
|
1363
|
+
{ name: "\u79FB\u52A8", code: "move", value: n.move },
|
|
1364
|
+
{ name: "\u521B\u5EFA\u6587\u4EF6", code: "createfile", value: n.createfile },
|
|
1365
|
+
{ name: "\u521B\u5EFA\u5B50\u6587\u4EF6\u5939", code: "createsubfolder", value: n.createsubfolder },
|
|
1366
|
+
{ name: "\u4E0B\u8F7D", code: "download", value: n.download }
|
|
1367
|
+
];
|
|
1368
|
+
return {
|
|
1369
|
+
id: n.id,
|
|
1370
|
+
name: n.name,
|
|
1371
|
+
ischeck: !1,
|
|
1372
|
+
sysdocobjectid: n.sysdocobjectid,
|
|
1373
|
+
sysroleid: n.sysroleid,
|
|
1374
|
+
list: a
|
|
1375
|
+
};
|
|
1376
|
+
});
|
|
1377
|
+
this.currentPermissions = t, this.handlePermissionClick(this.currentPermissions[0]);
|
|
1378
|
+
const i = t.map((n) => n.sysdocobjectid);
|
|
1379
|
+
this.$refs.elTreeRef && this.$refs.elTreeRef.setCheckedKeys(i);
|
|
1380
|
+
}
|
|
1381
|
+
});
|
|
1382
|
+
},
|
|
1383
|
+
getallTree() {
|
|
1384
|
+
R().then((s) => {
|
|
1385
|
+
if (s.code == 200) {
|
|
1386
|
+
this.restaurants = JSON.parse(JSON.stringify(s.data));
|
|
1387
|
+
const e = this.buildTree(JSON.parse(JSON.stringify(s.data)));
|
|
1388
|
+
this.folderTree = e, this.selectedPath = "/" + s.data[0].name;
|
|
1389
|
+
}
|
|
1390
|
+
});
|
|
1391
|
+
},
|
|
1392
|
+
closed() {
|
|
1393
|
+
this.cardList.forEach((s) => {
|
|
1394
|
+
Array.isArray(s.list) && s.list.forEach((e) => {
|
|
1395
|
+
e.value = "";
|
|
1396
|
+
});
|
|
1397
|
+
}), this.fullscreen = !1, this.visible = !1;
|
|
1398
|
+
},
|
|
1399
|
+
toggleFullscreen() {
|
|
1400
|
+
this.fullscreen = !this.fullscreen;
|
|
1401
|
+
},
|
|
1402
|
+
doEvent(s) {
|
|
1403
|
+
const e = s.item.functionName;
|
|
1404
|
+
this[e] && this[e]();
|
|
1405
|
+
},
|
|
1406
|
+
openPathDialog() {
|
|
1407
|
+
this.pathDialogVisible = !0, this.tempSelectedPath = this.selectedPath;
|
|
1408
|
+
},
|
|
1409
|
+
delList(s) {
|
|
1410
|
+
console.log(s);
|
|
1411
|
+
let e = this;
|
|
1412
|
+
this.$confirm(this.$i18nt("gd.https.delContent", "\u662F\u5426\u5220\u9664\u9009\u4E2D\u6570\u636E?"), this.$i18nt("gd.https.delTitle", "\u6E29\u99A8\u63D0\u793A"), {
|
|
1413
|
+
confirmButtonText: this.$i18nt("gd.https.delOk", "\u786E\u5B9A\u5220\u9664"),
|
|
1414
|
+
cancelButtonText: this.$i18nt("gd.https.delCancel", "\u53D6\u6D88"),
|
|
1415
|
+
showClose: !1,
|
|
1416
|
+
confirmButtonLoading: !1,
|
|
1417
|
+
cancelButtonLoading: !1,
|
|
1418
|
+
closeOnClickModal: !1,
|
|
1419
|
+
type: "warning",
|
|
1420
|
+
confirmButtonClass: "el-button--danger",
|
|
1421
|
+
customClass: "custom-alert",
|
|
1422
|
+
callback: () => {
|
|
1423
|
+
},
|
|
1424
|
+
beforeClose: (t, i, n) => {
|
|
1425
|
+
if (t !== "confirm") {
|
|
1426
|
+
n();
|
|
1427
|
+
return;
|
|
1428
|
+
}
|
|
1429
|
+
i.confirmButtonLoading = !0, i.cancelButtonLoading = !0, i.showCancelButton = !1, s.id === 0 ? e.$message.success(e.$i18nt("gd.https.delSucc", "\u5220\u9664\u6210\u529F")) : m({
|
|
1430
|
+
ids: s.id
|
|
1431
|
+
}).then((a) => {
|
|
1432
|
+
i.confirmButtonLoading = !1, i.cancelButtonLoading = !1, i.showCancelButton = !0, a.success ? e.$message.success(e.$i18nt("gd.https.delSucc", "\u5220\u9664\u6210\u529F")) : e.$message.error(e.$i18nt("gd.https.delFail", "\u5220\u9664\u5931\u8D25") + a.message);
|
|
1433
|
+
}), n(), e.currentPermissions = e.currentPermissions.filter((a) => a.sysdocobjectid !== s.sysdocobjectid), e.currentPermissions.length == 0 && e.cardList.forEach((a) => {
|
|
1434
|
+
Array.isArray(a.list) && a.list.forEach((l) => {
|
|
1435
|
+
l.value = "";
|
|
1436
|
+
});
|
|
1437
|
+
}), e.cancelNodeCheck(s.sysdocobjectid);
|
|
1438
|
+
}
|
|
1439
|
+
});
|
|
1440
|
+
},
|
|
1441
|
+
cancelNodeCheck(s) {
|
|
1442
|
+
const e = this.$refs.elTreeRef;
|
|
1443
|
+
e && e.setChecked(s, !1);
|
|
1444
|
+
},
|
|
1445
|
+
handlecheck(s) {
|
|
1446
|
+
console.log(s);
|
|
1447
|
+
},
|
|
1448
|
+
handleDirectoryCheck(s, e) {
|
|
1449
|
+
let t = s.name;
|
|
1450
|
+
if (e) {
|
|
1451
|
+
const a = this.restaurants.find((r) => r.id === s.id);
|
|
1452
|
+
let l = a ? a.parentid : "";
|
|
1453
|
+
(l != "" || l == 0) && this.restaurants.forEach((r) => {
|
|
1454
|
+
r.id == l && (t = r.name + "/" + s.name);
|
|
1455
|
+
});
|
|
1456
|
+
}
|
|
1457
|
+
const i = s.id, n = JSON.parse(JSON.stringify(this.currentPermissions)).filter((a) => a.sysdocobjectid === s.id);
|
|
1458
|
+
if (e && n.length === 0) {
|
|
1459
|
+
const a = {
|
|
1460
|
+
sysdocobjectid: i,
|
|
1461
|
+
sysroleid: this.record.id,
|
|
1462
|
+
name: t,
|
|
1463
|
+
ischeck: !0,
|
|
1464
|
+
id: 0,
|
|
1465
|
+
list: [
|
|
1466
|
+
{
|
|
1467
|
+
name: "\u67E5\u770B",
|
|
1468
|
+
code: "readmetadata",
|
|
1469
|
+
value: ""
|
|
1470
|
+
},
|
|
1471
|
+
{
|
|
1472
|
+
name: "\u91CD\u547D\u540D",
|
|
1473
|
+
code: "rename",
|
|
1474
|
+
value: ""
|
|
1475
|
+
},
|
|
1476
|
+
{
|
|
1477
|
+
name: "\u5220\u9664",
|
|
1478
|
+
code: "delete",
|
|
1479
|
+
value: ""
|
|
1480
|
+
},
|
|
1481
|
+
{
|
|
1482
|
+
name: "\u7BA1\u7406\u6743\u9650",
|
|
1483
|
+
code: "manageprem",
|
|
1484
|
+
value: ""
|
|
1485
|
+
},
|
|
1486
|
+
{
|
|
1487
|
+
name: "\u79FB\u52A8",
|
|
1488
|
+
code: "move",
|
|
1489
|
+
value: ""
|
|
1490
|
+
},
|
|
1491
|
+
{
|
|
1492
|
+
name: "\u521B\u5EFA\u6587\u4EF6",
|
|
1493
|
+
code: "createfile",
|
|
1494
|
+
value: ""
|
|
1495
|
+
},
|
|
1496
|
+
{
|
|
1497
|
+
name: "\u521B\u5EFA\u5B50\u6587\u4EF6\u5939",
|
|
1498
|
+
code: "createsubfolder",
|
|
1499
|
+
value: ""
|
|
1500
|
+
},
|
|
1501
|
+
{
|
|
1502
|
+
name: "\u4E0B\u8F7D",
|
|
1503
|
+
code: "download",
|
|
1504
|
+
value: ""
|
|
1505
|
+
}
|
|
1506
|
+
]
|
|
1507
|
+
};
|
|
1508
|
+
this.currentPermissions.push(a), this.currentPermissions.forEach((l) => {
|
|
1509
|
+
l.ischeck = !1, l.sysdocobjectid === i && (l.ischeck = !0);
|
|
1510
|
+
}), this.cardList.forEach((l) => {
|
|
1511
|
+
Array.isArray(l.list) && l.list.forEach((r) => {
|
|
1512
|
+
r.value = "";
|
|
1513
|
+
});
|
|
1514
|
+
});
|
|
1515
|
+
} else if (!e && n.length > 0 && this.currentPermissions.length > 0) {
|
|
1516
|
+
let a = this;
|
|
1517
|
+
this.$confirm(this.$i18nt("gd.https.delContent", "\u662F\u5426\u5220\u9664\u9009\u4E2D\u6570\u636E?"), this.$i18nt("gd.https.delTitle", "\u6E29\u99A8\u63D0\u793A"), {
|
|
1518
|
+
confirmButtonText: this.$i18nt("gd.https.delOk", "\u786E\u5B9A\u5220\u9664"),
|
|
1519
|
+
cancelButtonText: this.$i18nt("gd.https.delCancel", "\u53D6\u6D88"),
|
|
1520
|
+
showClose: !1,
|
|
1521
|
+
confirmButtonLoading: !1,
|
|
1522
|
+
cancelButtonLoading: !1,
|
|
1523
|
+
closeOnClickModal: !1,
|
|
1524
|
+
type: "warning",
|
|
1525
|
+
confirmButtonClass: "el-button--danger",
|
|
1526
|
+
customClass: "custom-alert",
|
|
1527
|
+
callback: () => {
|
|
1528
|
+
},
|
|
1529
|
+
beforeClose: (l, r, d) => {
|
|
1530
|
+
if (l !== "confirm") {
|
|
1531
|
+
d(), setTimeout(() => {
|
|
1532
|
+
this.$nextTick(() => {
|
|
1533
|
+
this.$refs.elTreeRef.setChecked(s.id, !0);
|
|
1534
|
+
});
|
|
1535
|
+
});
|
|
1536
|
+
return;
|
|
1537
|
+
}
|
|
1538
|
+
r.confirmButtonLoading = !0, r.cancelButtonLoading = !0, r.showCancelButton = !1, n[0].id === 0 ? a.$message.success(a.$i18nt("gd.https.delSucc", "\u5220\u9664\u6210\u529F")) : m({
|
|
1539
|
+
ids: n[0].id
|
|
1540
|
+
}).then((o) => {
|
|
1541
|
+
r.confirmButtonLoading = !1, r.cancelButtonLoading = !1, r.showCancelButton = !0, o.success ? a.$message.success(a.$i18nt("gd.https.delSucc", "\u5220\u9664\u6210\u529F")) : a.$message.error(a.$i18nt("gd.https.delFail", "\u5220\u9664\u5931\u8D25") + o.message);
|
|
1542
|
+
}), d(), this.nextclickdel(i);
|
|
1543
|
+
}
|
|
1544
|
+
});
|
|
1545
|
+
}
|
|
1546
|
+
},
|
|
1547
|
+
nextclickdel(s) {
|
|
1548
|
+
this.currentPermissions = this.currentPermissions.filter((t) => t.sysdocobjectid !== s), this.currentPermissions.forEach((t) => {
|
|
1549
|
+
t.ischeck = !1;
|
|
1550
|
+
}), this.currentPermissions[this.currentPermissions.length - 1].ischeck = !0;
|
|
1551
|
+
const e = {};
|
|
1552
|
+
this.currentPermissions[this.currentPermissions.length - 1].list.forEach((t) => {
|
|
1553
|
+
e[t.name] = t.value;
|
|
1554
|
+
}), this.cardList.forEach((t) => {
|
|
1555
|
+
Array.isArray(t.list) && t.list.forEach((i) => {
|
|
1556
|
+
i.value = "";
|
|
1557
|
+
});
|
|
1558
|
+
}), this.cardList.forEach((t) => {
|
|
1559
|
+
Array.isArray(t.list) && t.list.forEach((i) => {
|
|
1560
|
+
const n = e[i.name];
|
|
1561
|
+
n !== void 0 && n !== "" && n !== null && (i.value = n.toString());
|
|
1562
|
+
});
|
|
1563
|
+
});
|
|
1564
|
+
},
|
|
1565
|
+
handleNodeClick(s, e) {
|
|
1566
|
+
this.objectId = s.id;
|
|
1567
|
+
let t = [], i = e;
|
|
1568
|
+
for (; i; )
|
|
1569
|
+
t.unshift(i.data.name), i = i.parent;
|
|
1570
|
+
this.tempSelectedPath = "" + t.join("/");
|
|
1571
|
+
},
|
|
1572
|
+
handlePermissionClick(s) {
|
|
1573
|
+
this.currentPermissions.forEach((t) => {
|
|
1574
|
+
t.ischeck = !1;
|
|
1575
|
+
}), s.ischeck = !0;
|
|
1576
|
+
const e = {};
|
|
1577
|
+
s.list.forEach((t) => {
|
|
1578
|
+
e[t.name] = t.value;
|
|
1579
|
+
}), this.cardList.forEach((t) => {
|
|
1580
|
+
Array.isArray(t.list) && t.list.forEach((i) => {
|
|
1581
|
+
i.value = "";
|
|
1582
|
+
});
|
|
1583
|
+
}), this.cardList.forEach((t) => {
|
|
1584
|
+
Array.isArray(t.list) && t.list.forEach((i) => {
|
|
1585
|
+
const n = e[i.name];
|
|
1586
|
+
n != null && (i.value = n.toString());
|
|
1587
|
+
});
|
|
1588
|
+
});
|
|
1589
|
+
},
|
|
1590
|
+
confirmPath() {
|
|
1591
|
+
this.selectedPath = this.tempSelectedPath, this.pathDialogVisible = !1;
|
|
1592
|
+
},
|
|
1593
|
+
handleReadMetaDataChange(s, e) {
|
|
1594
|
+
s.target.tagName === "INPUT" && s.target.type === "radio" && (e.value === "" ? e.value = s.target.value : e.value = null, setTimeout(() => {
|
|
1595
|
+
if (this.currentPermissions.length > 0) {
|
|
1596
|
+
const t = this.currentPermissions.find((i) => i.ischeck);
|
|
1597
|
+
if (t) {
|
|
1598
|
+
const i = t.list.find((n) => n.name === e.name);
|
|
1599
|
+
i && (i.value = e.value);
|
|
1600
|
+
}
|
|
1601
|
+
}
|
|
1602
|
+
}, 10));
|
|
1603
|
+
}
|
|
1604
|
+
}
|
|
1605
|
+
};
|
|
1606
|
+
var be = function() {
|
|
1607
|
+
var e = this, t = e._self._c;
|
|
1608
|
+
return t("div", [t("el-dialog", { directives: [{ name: "drag", rawName: "v-drag" }], ref: "dialog", class: e.fullscreen ? "gd-dialog gd-dialog-fangda" : "gd-dialog", attrs: { fullscreen: e.fullscreen, visible: e.visible, width: e.width, center: !0, "close-on-click-modal": !1, "modal-append-to-body": !0, "append-to-body": !1, top: "30px", "show-close": !1 }, on: { "update:visible": function(i) {
|
|
1609
|
+
e.visible = i;
|
|
1610
|
+
}, closed: e.closed } }, [t("template", { slot: "title" }, [t("gd-modal-title", { attrs: { title: e.$i18nt("gd.user.documentAuthorization", "\u6388\u6743\u6587\u6863"), fullscreen: e.fullscreen, buttons: e.buttons, confirmLoading: e.confirmLoading, showClose: !0 }, on: { changeEvent: e.doEvent, toggleFullscreen: e.toggleFullscreen } })], 1), t("div", { staticClass: "main-layout" }, [t("div", { staticClass: "directory-tree-section" }, [t("div", { staticClass: "section-header" }, [e._v(e._s(e.$i18nt("gd.user.selectDirectory", "\u9009\u62E9\u76EE\u5F55")))]), t("el-tree", { ref: "elTreeRef", attrs: { "check-strictly": "", data: e.folderTree, "node-key": "id", "show-checkbox": "", props: e.treeProps }, on: { "check-change": e.handleDirectoryCheck, "node-click": e.handleNodeClick } })], 1), t("div", { staticStyle: { width: "100%" } }, [t("div", { staticClass: "preview-card" }, [t("div", { staticClass: "card-header" }, [t("span", [e._v(e._s(e.$i18nt("gd.user.permissionPreview", "\u6743\u9650\u9884\u89C8")))])]), t("div", { staticClass: "permission-tags" }, e._l(e.currentPermissions, function(i) {
|
|
1611
|
+
return t("div", { key: i.sysdocobjectid, staticClass: "permission-tags-item", class: { checked: i.ischeck }, on: { click: function(n) {
|
|
1612
|
+
return e.handlePermissionClick(i);
|
|
1613
|
+
} } }, [e._v(" " + e._s(i.name) + " "), t("div", { staticClass: "permission-tags-item-content" }, e._l(i.list, function(n, a) {
|
|
1614
|
+
return t("div", { key: a }, [t("span", [e._v(e._s(n.name))]), n.value == "1" ? t("el-tag", [e._v(e._s(e.$i18nt("gd.user.allow", "\u5141\u8BB8")))]) : e._e(), n.value == "2" ? t("el-tag", { attrs: { type: "danger" } }, [e._v(e._s(e.$i18nt("gd.user.refuse", "\u62D2\u7EDD")))]) : e._e()], 1);
|
|
1615
|
+
}), 0), t("i", { staticClass: "el-icon-close del-btn", on: { click: function(n) {
|
|
1616
|
+
return e.delList(i);
|
|
1617
|
+
} } })]);
|
|
1618
|
+
}), 0)]), t("div", [t("div", { staticClass: "permission-section" }, [t("h3", [e._v(e._s(e.$i18nt("gd.user.setOperationPermissions", "\u8BBE\u7F6E\u64CD\u4F5C\u6743\u9650")))]), e._l(e.cardList, function(i, n) {
|
|
1619
|
+
return t("div", { key: n }, [t("div", { staticClass: "clearfix", attrs: { slot: "header" }, slot: "header" }, [t("h4", [e._v(e._s(e.$i18nt(i.transkey, i.name)))])]), t("div", { staticClass: "permission-list" }, [t("div", { staticClass: "permission-category" }, e._l(i.list, function(a, l) {
|
|
1620
|
+
return t("el-card", { key: l, staticClass: "permission-item", attrs: { shadow: "hover" } }, [t("div", { staticClass: "perm-info" }, [t("i", { staticClass: "gd-icons active-color", class: a.icon, staticStyle: { "font-size": "14px", "margin-right": "10px" } }), t("div", { staticClass: "perm-name" }, [e._v(e._s(e.$i18nt(`Dynamics.${a.transkey}`, a.name)) + " ")])]), t("div", { staticClass: "perm-actions" }, [t("el-radio-group", { nativeOn: { click: function(r) {
|
|
1621
|
+
return e.handleReadMetaDataChange(r, a);
|
|
1622
|
+
} }, model: { value: a.value, callback: function(r) {
|
|
1623
|
+
e.$set(a, "value", r);
|
|
1624
|
+
}, expression: "items.value" } }, [t("el-radio", { attrs: { label: "1" } }, [e._v(e._s(e.$i18nt("gd.user.allow", "\u5141\u8BB8")))]), t("el-radio", { attrs: { label: "2" } }, [e._v(e._s(e.$i18nt("gd.user.refuse", "\u62D2\u7EDD")))])], 1)], 1)]);
|
|
1625
|
+
}), 1)])]);
|
|
1626
|
+
})], 2)])])])], 2)], 1);
|
|
1627
|
+
}, ve = [], _e = /* @__PURE__ */ u(
|
|
1628
|
+
ye,
|
|
1629
|
+
be,
|
|
1630
|
+
ve,
|
|
1631
|
+
!1,
|
|
1632
|
+
null,
|
|
1633
|
+
"daca70b3",
|
|
1634
|
+
null,
|
|
1635
|
+
null
|
|
1636
|
+
);
|
|
1637
|
+
const ke = _e.exports;
|
|
1638
|
+
const we = {
|
|
1639
|
+
data() {
|
|
1640
|
+
return {
|
|
1641
|
+
buttons: [
|
|
1642
|
+
{
|
|
1643
|
+
displayName: "\u786E\u5B9A",
|
|
1644
|
+
functionName: "handleSubmit",
|
|
1645
|
+
show: !0,
|
|
1646
|
+
transKey: "gd.btn.confirm",
|
|
1647
|
+
icon: "el-icon-document-checked"
|
|
1648
|
+
}
|
|
1649
|
+
],
|
|
1650
|
+
record: {},
|
|
1651
|
+
visible: !1,
|
|
1652
|
+
confirmLoading: !1,
|
|
1653
|
+
fullscreen: !1,
|
|
1654
|
+
width: "94%",
|
|
1655
|
+
menuTreeData: [],
|
|
1656
|
+
menuTreeDatad: [],
|
|
1657
|
+
checkedKeys: [],
|
|
1658
|
+
list: [],
|
|
1659
|
+
allClose: !1,
|
|
1660
|
+
menuAll: [],
|
|
1661
|
+
systemMenuAll: [],
|
|
1662
|
+
allCheckedKeys: []
|
|
1663
|
+
};
|
|
1664
|
+
},
|
|
1665
|
+
computed: {
|
|
1666
|
+
isIndeterminate() {
|
|
1667
|
+
return this.allClose ? !1 : this.checkedKeys.length > 0;
|
|
1668
|
+
},
|
|
1669
|
+
...h(["screenHeight", "tableLists"])
|
|
1670
|
+
},
|
|
1671
|
+
components: { LayoutItem: _ },
|
|
1672
|
+
methods: {
|
|
1673
|
+
async handleSubmit() {
|
|
1674
|
+
const s = (e) => (e = e.filter((t, i) => {
|
|
1675
|
+
const n = this.checkedKeys.filter((a) => t.id === a)[0];
|
|
1676
|
+
return t.type = n ? 1 : 0, t.formlist && t.formlist.length > 0 && (t.formlist = s(t.formlist)), t.viewlist && t.viewlist.length > 0 && (t.viewlist = s(t.viewlist)), t.btnlist && t.btnlist.length > 0 && (t.btnlist = s(t.btnlist)), !0;
|
|
1677
|
+
}), e);
|
|
1678
|
+
this.confirmLoading = !0, await s(this.menuAll), S({
|
|
1679
|
+
roleid: this.record.id,
|
|
1680
|
+
list: this.menuAll
|
|
1681
|
+
}).then((e) => {
|
|
1682
|
+
e.success ? (this.$message.success(this.$i18nt("gd.https.operateSucc", "\u64CD\u4F5C\u6210\u529F")), this.$emit("ok"), this.closed()) : this.$message.error(
|
|
1683
|
+
this.$i18nt("gd.https.operateFail", "\u64CD\u4F5C\u5931\u8D25") + e.message
|
|
1684
|
+
), this.confirmLoading = !1;
|
|
1685
|
+
});
|
|
1686
|
+
},
|
|
1687
|
+
checkedItemBtn(s, e) {
|
|
1688
|
+
let t = [...this.checkedKeys].filter((i) => !s.menuBtnIds.includes(i));
|
|
1689
|
+
e === 1 && (t = t.concat(s.menuBtnIds)), this.checkedKeys = [...t], this.handleItem();
|
|
1690
|
+
},
|
|
1691
|
+
openItem(s) {
|
|
1692
|
+
let e = [...this.menuTreeData];
|
|
1693
|
+
const t = (i) => (i = i.filter((n, a) => (n.id === s.id && (n.open = !n.open), n.children && n.children.length > 0 && (n.children = t(n.children)), !0)), i);
|
|
1694
|
+
t(e), this.menuTreeData = [...e];
|
|
1695
|
+
},
|
|
1696
|
+
changeItem(s, e, t = !0) {
|
|
1697
|
+
let i = [...this.checkedKeys];
|
|
1698
|
+
this.checkedKeys.filter((o) => e.includes(o))[0];
|
|
1699
|
+
const n = this.list.filter((o) => e.includes(o.id))[0], a = t && n ? n.menuIds : [];
|
|
1700
|
+
if (s ? i = this.checkedKeys.concat(e).concat(a) : i = this.checkedKeys.filter((o) => !e.includes(o)).filter((o) => !a.includes(o)), this.checkedKeys = [...i], this.handleItem(), n.menusType === 2)
|
|
1701
|
+
return;
|
|
1702
|
+
let l = [];
|
|
1703
|
+
this.findParent(this.menuTreeData, n, l);
|
|
1704
|
+
let r = [], d = [];
|
|
1705
|
+
l.forEach((o) => {
|
|
1706
|
+
this.checkedKeys.filter((g) => o.menuIds.includes(g)).length === o.menuIds.length && o.menuIds.length > 0 && !o.checked ? r.push(o.id) : d.push(o.id);
|
|
1707
|
+
}), r.forEach((o) => {
|
|
1708
|
+
this.changeItem(!0, [o], !1);
|
|
1709
|
+
}), d.forEach((o) => {
|
|
1710
|
+
this.changeItem(!1, [o], !1);
|
|
1711
|
+
});
|
|
1712
|
+
},
|
|
1713
|
+
handleItem() {
|
|
1714
|
+
let s = [...this.menuTreeData];
|
|
1715
|
+
const e = (t) => (t = t.filter((i, n) => {
|
|
1716
|
+
const a = this.checkedKeys.filter((l) => i.menuIds.includes(l));
|
|
1717
|
+
return this.checkedKeys.includes(i.id) ? (i.checked = !0, i.isIndeterminate = !1) : (i.checked = !1, i.isIndeterminate = a.length > 0 && i.menuIds.length > 0), i.children && i.children.length > 0 && (i.children = e(i.children)), !0;
|
|
1718
|
+
}), t);
|
|
1719
|
+
e(s), this.menuTreeData = [...s], this.allClose = this.checkedKeys.length === this.allCheckedKeys.length && this.allCheckedKeys.length > 0;
|
|
1720
|
+
},
|
|
1721
|
+
changeAll(s) {
|
|
1722
|
+
s ? this.checkedKeys = [...this.allCheckedKeys] : this.checkedKeys = [], this.handleItem();
|
|
1723
|
+
},
|
|
1724
|
+
init() {
|
|
1725
|
+
this.confirmLoading = !0, Promise.all([this.getList()]).then(async (s) => {
|
|
1726
|
+
this.confirmLoading = !1;
|
|
1727
|
+
let e = JSON.parse(JSON.stringify(this.menuTreeDatad)), t = [];
|
|
1728
|
+
const i = (a) => (a = a.filter((l, r) => {
|
|
1729
|
+
const d = this.checkedKeys.filter((o) => l.id === o)[0];
|
|
1730
|
+
return l.open = !0, l.checked = l.menusType === 1 ? !!d : !1, l.isIndeterminate = !1, t.push(l), l.children && l.children.length > 0 && (l.children = i(l.children)), !0;
|
|
1731
|
+
}), a);
|
|
1732
|
+
await i(e);
|
|
1733
|
+
let n = [];
|
|
1734
|
+
t.forEach((a, l) => {
|
|
1735
|
+
const r = this.getMenuIds(a);
|
|
1736
|
+
t[l].menuIds = r.arr, t[l].menuBtnIds = r.btn, !(this.checkedKeys.filter((c) => r.arr.includes(c)).length === r.arr.length) && r.arr.length > 0 && n.push(a.id);
|
|
1737
|
+
}), this.list = t, this.allClose = this.checkedKeys.length === this.allCheckedKeys.length && this.allCheckedKeys.length > 0, this.menuTreeData = [...e], this.handleItem(), console.log(this.menuAll, "123");
|
|
1738
|
+
});
|
|
1739
|
+
},
|
|
1740
|
+
getList() {
|
|
1741
|
+
return L({ roleId: this.record.id }).then((s) => {
|
|
1742
|
+
if (s.code === 200) {
|
|
1743
|
+
let e = [], t = [];
|
|
1744
|
+
const i = (a, l) => (a = a.filter((r, d) => {
|
|
1745
|
+
r.parentId = l, r.open = !0, r.checked = !1, r.isIndeterminate = !1, r.transkey = r.transkey ? r.transkey : null, r.title = r.name, r.menusType = r.formlist && r.viewlist ? 0 : r.btnlist ? 1 : 2, t.push(r.id), r.type === 1 && e.push(r.id);
|
|
1746
|
+
let o = [];
|
|
1747
|
+
return r.viewlist && r.viewlist.length > 0 && (r.viewlist.map((c) => (c.iconClass = "gd-icon-shitumoshi", c)), o = o.concat(r.viewlist)), r.formlist && r.formlist.length > 0 && (r.formlist.map((c) => (c.iconClass = "gd-icon-biaodanmoshi", c)), o = o.concat(r.formlist)), r.btnlist && r.btnlist.length > 0 && (o = o.concat(r.btnlist)), o.length > 0 && (r.children = i(o, r.id)), !0;
|
|
1748
|
+
}), a);
|
|
1749
|
+
this.menuAll = s.data.list;
|
|
1750
|
+
let n = JSON.parse(JSON.stringify(this.menuAll));
|
|
1751
|
+
i(n, 0), this.checkedKeys = e, this.allCheckedKeys = t, this.menuTreeDatad = [...n];
|
|
1752
|
+
}
|
|
1753
|
+
return s;
|
|
1754
|
+
});
|
|
1755
|
+
},
|
|
1756
|
+
getMenuIds(s) {
|
|
1757
|
+
let e = [], t = [];
|
|
1758
|
+
const i = (n) => (n = n.filter((a, l) => (a.menusType !== 2 ? e.push(a.id) : t.push(a.id), a.children && a.children.length > 0 && (a.children = i(a.children)), !0)), n);
|
|
1759
|
+
return s.children && i(s.children), { arr: e, btn: t };
|
|
1760
|
+
},
|
|
1761
|
+
findParent(s, e, t) {
|
|
1762
|
+
for (let i of s)
|
|
1763
|
+
if (i.id === e.parentId || i.children && i.children.length > 0 && this.findParent(i.children, e, t))
|
|
1764
|
+
return t.unshift(i), !0;
|
|
1765
|
+
return !1;
|
|
1766
|
+
},
|
|
1767
|
+
open(s) {
|
|
1768
|
+
this.record = s, this.visible = !0, this.init();
|
|
1769
|
+
},
|
|
1770
|
+
closed() {
|
|
1771
|
+
this.fullscreen = !1, this.visible = !1, this.menuTreeData = [], this.checkedKeys = [];
|
|
1772
|
+
},
|
|
1773
|
+
toggleFullscreen() {
|
|
1774
|
+
this.fullscreen = !this.fullscreen;
|
|
1775
|
+
},
|
|
1776
|
+
doEvent(s) {
|
|
1777
|
+
const e = s.item.functionName;
|
|
1778
|
+
this[e] && this[e]();
|
|
1779
|
+
}
|
|
1780
|
+
}
|
|
1781
|
+
};
|
|
1782
|
+
var $e = function() {
|
|
1783
|
+
var e = this, t = e._self._c;
|
|
1784
|
+
return t("div", [t("el-dialog", { directives: [{ name: "drag", rawName: "v-drag" }], ref: "dialog", class: e.fullscreen ? "gd-dialog gd-dialog-fangda" : "gd-dialog", attrs: { fullscreen: e.fullscreen, visible: e.visible, width: e.width, center: !0, "close-on-click-modal": !1, "append-to-body": !0, "modal-append-to-body": !1, top: "80px", "show-close": !1 }, on: { "update:visible": function(i) {
|
|
1785
|
+
e.visible = i;
|
|
1786
|
+
}, closed: e.closed } }, [t("template", { slot: "title" }, [t("gd-modal-title", { attrs: { title: e.$i18nt("gd.user.dataRole", "\u6388\u6743\u6570\u636E"), buttons: e.buttons, confirmLoading: e.confirmLoading, showClose: !0 }, on: { changeEvent: e.doEvent, toggleFullscreen: e.toggleFullscreen } })], 1), t("div", { directives: [{ name: "loading", rawName: "v-loading", value: e.confirmLoading, expression: "confirmLoading" }], staticStyle: { "min-height": "400px" } }, [e.visible ? t("LayoutItem", { attrs: { record: e.menuTreeData, checkedKeys: e.checkedKeys }, on: { open: e.openItem, change: e.changeItem, checkedBtn: e.checkedItemBtn } }) : e._e()], 1), t("template", { slot: "footer" }, [t("div", { staticClass: "btoms" }, [t("el-checkbox", { attrs: { disabled: e.confirmLoading, indeterminate: e.isIndeterminate }, on: { change: e.changeAll }, model: { value: e.allClose, callback: function(i) {
|
|
1787
|
+
e.allClose = i;
|
|
1788
|
+
}, expression: "allClose" } }, [e._v(" " + e._s(e.$i18nt("gd.btn.selectAll", "\u5168\u9009")) + " ")])], 1)])], 2)], 1);
|
|
1789
|
+
}, Ke = [], Te = /* @__PURE__ */ u(
|
|
1790
|
+
we,
|
|
1791
|
+
$e,
|
|
1792
|
+
Ke,
|
|
1793
|
+
!1,
|
|
1794
|
+
null,
|
|
1795
|
+
"e6593396",
|
|
1796
|
+
null,
|
|
1797
|
+
null
|
|
1798
|
+
);
|
|
1799
|
+
const Ce = Te.exports;
|
|
1800
|
+
const Re = {
|
|
1801
|
+
name: "GdRole",
|
|
1802
|
+
props: {
|
|
1803
|
+
height: {
|
|
1804
|
+
type: Number,
|
|
1805
|
+
default: 100
|
|
1806
|
+
},
|
|
1807
|
+
openMode: {
|
|
1808
|
+
type: String,
|
|
1809
|
+
default: "page"
|
|
1810
|
+
},
|
|
1811
|
+
openSelecteKeys: {
|
|
1812
|
+
type: Array,
|
|
1813
|
+
default: () => []
|
|
1814
|
+
}
|
|
1815
|
+
},
|
|
1816
|
+
mixins: [b, j],
|
|
1817
|
+
data() {
|
|
1818
|
+
return {
|
|
1819
|
+
appsId: "",
|
|
1820
|
+
transKey: "gd.btn.add",
|
|
1821
|
+
formLoading: !1,
|
|
1822
|
+
loading: !0,
|
|
1823
|
+
selectedRowKeys: [],
|
|
1824
|
+
selectedRows: [],
|
|
1825
|
+
queryParam: {},
|
|
1826
|
+
allRowData: [],
|
|
1827
|
+
loadData: (s) => (this.selectedKeep && (this.selectedRowKeys = [...this.openSelecteKeys]), I(Object.assign(s, this.queryParam, { sysAppsId: window.$systemInfo.id })).then((e) => (this.allRowData = e.data, e.data))),
|
|
1828
|
+
isDoc: ""
|
|
1829
|
+
};
|
|
1830
|
+
},
|
|
1831
|
+
components: { RoleGrant: Y, RoleMenu: le, RoleMenuViewForm: Ce, UserAuthorization: me, DocumentAuthorization: ke },
|
|
1832
|
+
computed: {
|
|
1833
|
+
getTableButtons() {
|
|
1834
|
+
return this.tableButtons.filter((s) => s.functionName === "grantRoleAppMenu" ? !!this.appsId : s.functionName === "documentAuthorizationMenu" ? this.isDoc == 1 : !0);
|
|
1835
|
+
},
|
|
1836
|
+
initialLoading() {
|
|
1837
|
+
return this.openMode === "page";
|
|
1838
|
+
},
|
|
1839
|
+
selectedKeep() {
|
|
1840
|
+
return this.openMode !== "page";
|
|
1841
|
+
},
|
|
1842
|
+
getFormColumns() {
|
|
1843
|
+
return this.formColumns.filter((s) => (s.prop === "code" && (s.disabled = this.transKey !== "gd.btn.add"), !(this.transKey === "gd.https.copy" && s.prop === "code")));
|
|
1844
|
+
},
|
|
1845
|
+
getHeight() {
|
|
1846
|
+
return this.height;
|
|
1847
|
+
},
|
|
1848
|
+
...h(["tablePageSize", "tableSize", "labelPosition", "formMode"])
|
|
1849
|
+
},
|
|
1850
|
+
methods: {
|
|
1851
|
+
getConfigInfo() {
|
|
1852
|
+
y({
|
|
1853
|
+
code: "GDS_Enable_Doc_Premissions"
|
|
1854
|
+
}).then((e) => {
|
|
1855
|
+
e.code === 200 && (this.isDoc = e.data.value);
|
|
1856
|
+
});
|
|
1857
|
+
},
|
|
1858
|
+
getAppId() {
|
|
1859
|
+
y({ code: "App_Id" }).then((s) => {
|
|
1860
|
+
s.code === 200 && (this.appsId = s.data ? s.data.value : "");
|
|
1861
|
+
});
|
|
1862
|
+
},
|
|
1863
|
+
documentAuthorizationMenu() {
|
|
1864
|
+
if (this.selectedRowKeys.length === 0) {
|
|
1865
|
+
this.$message.warning(this.$i18nt("gd.https.editTip", "\u8BF7\u9009\u62E9\u9700\u8981\u7F16\u8F91\u7684\u6570\u636E!"));
|
|
1866
|
+
return;
|
|
1867
|
+
}
|
|
1868
|
+
if (this.selectedRowKeys.length > 1) {
|
|
1869
|
+
this.$message.warning(this.$i18nt("gd.https.editTipOne", "\u53EA\u80FD\u9009\u62E9\u4E00\u6761\u6570\u636E\u7F16\u8F91!"));
|
|
1870
|
+
return;
|
|
1871
|
+
}
|
|
1872
|
+
this.$refs.documentAuthorization.open(this.selectedRows[0]);
|
|
1873
|
+
},
|
|
1874
|
+
userAuthorizationMenu() {
|
|
1875
|
+
if (this.selectedRowKeys.length === 0) {
|
|
1876
|
+
this.$message.warning(this.$i18nt("gd.https.editTip", "\u8BF7\u9009\u62E9\u9700\u8981\u7F16\u8F91\u7684\u6570\u636E!"));
|
|
1877
|
+
return;
|
|
1878
|
+
}
|
|
1879
|
+
if (this.selectedRowKeys.length > 1) {
|
|
1880
|
+
this.$message.warning(this.$i18nt("gd.https.editTipOne", "\u53EA\u80FD\u9009\u62E9\u4E00\u6761\u6570\u636E\u7F16\u8F91!"));
|
|
1881
|
+
return;
|
|
1882
|
+
}
|
|
1883
|
+
this.$refs.userAuthorization.open(this.selectedRows[0]);
|
|
1884
|
+
},
|
|
1885
|
+
grantRoleMenu() {
|
|
1886
|
+
if (this.selectedRowKeys.length === 0) {
|
|
1887
|
+
this.$message.warning(this.$i18nt("gd.https.editTip", "\u8BF7\u9009\u62E9\u9700\u8981\u7F16\u8F91\u7684\u6570\u636E!"));
|
|
1888
|
+
return;
|
|
1889
|
+
}
|
|
1890
|
+
if (this.selectedRowKeys.length > 1) {
|
|
1891
|
+
this.$message.warning(this.$i18nt("gd.https.editTipOne", "\u53EA\u80FD\u9009\u62E9\u4E00\u6761\u6570\u636E\u7F16\u8F91!"));
|
|
1892
|
+
return;
|
|
1893
|
+
}
|
|
1894
|
+
this.$refs.roleMenu.open(this.selectedRows[0]);
|
|
1895
|
+
},
|
|
1896
|
+
grantRoleAppMenu() {
|
|
1897
|
+
if (this.selectedRowKeys.length === 0) {
|
|
1898
|
+
this.$message.warning(this.$i18nt("gd.https.editTip", "\u8BF7\u9009\u62E9\u9700\u8981\u7F16\u8F91\u7684\u6570\u636E!"));
|
|
1899
|
+
return;
|
|
1900
|
+
}
|
|
1901
|
+
if (this.selectedRowKeys.length > 1) {
|
|
1902
|
+
this.$message.warning(this.$i18nt("gd.https.editTipOne", "\u53EA\u80FD\u9009\u62E9\u4E00\u6761\u6570\u636E\u7F16\u8F91!"));
|
|
1903
|
+
return;
|
|
1904
|
+
}
|
|
1905
|
+
this.$refs.roleMenu.open(this.selectedRows[0], this.appsId);
|
|
1906
|
+
},
|
|
1907
|
+
grantRoleGrant() {
|
|
1908
|
+
if (this.selectedRowKeys.length === 0) {
|
|
1909
|
+
this.$message.warning(this.$i18nt("gd.https.editTip", "\u8BF7\u9009\u62E9\u9700\u8981\u7F16\u8F91\u7684\u6570\u636E!"));
|
|
1910
|
+
return;
|
|
1911
|
+
}
|
|
1912
|
+
if (this.selectedRowKeys.length > 1) {
|
|
1913
|
+
this.$message.warning(this.$i18nt("gd.https.editTipOne", "\u53EA\u80FD\u9009\u62E9\u4E00\u6761\u6570\u636E\u7F16\u8F91!"));
|
|
1914
|
+
return;
|
|
1915
|
+
}
|
|
1916
|
+
this.$refs.roleGrant.open(this.selectedRows[0]);
|
|
1917
|
+
},
|
|
1918
|
+
grantRoleVF() {
|
|
1919
|
+
if (this.selectedRowKeys.length === 0) {
|
|
1920
|
+
this.$message.warning(this.$i18nt("gd.https.editTip", "\u8BF7\u9009\u62E9\u9700\u8981\u7F16\u8F91\u7684\u6570\u636E!"));
|
|
1921
|
+
return;
|
|
1922
|
+
}
|
|
1923
|
+
if (this.selectedRowKeys.length > 1) {
|
|
1924
|
+
this.$message.warning(this.$i18nt("gd.https.editTipOne", "\u53EA\u80FD\u9009\u62E9\u4E00\u6761\u6570\u636E\u7F16\u8F91!"));
|
|
1925
|
+
return;
|
|
1926
|
+
}
|
|
1927
|
+
this.$refs.roleMenuViewForm.open(this.selectedRows[0]);
|
|
1928
|
+
},
|
|
1929
|
+
saveQueries(s) {
|
|
1930
|
+
this.queryParam = { ...s }, this.refresh();
|
|
1931
|
+
},
|
|
1932
|
+
refresh() {
|
|
1933
|
+
this.$refs.table.refresh();
|
|
1934
|
+
},
|
|
1935
|
+
editForm(s) {
|
|
1936
|
+
this.transKey = "gd.btn.edit", this.$refs.editForm.open(s);
|
|
1937
|
+
},
|
|
1938
|
+
del() {
|
|
1939
|
+
if (this.selectedRowKeys.length === 0) {
|
|
1940
|
+
this.$message.warning(this.$i18nt("gd.https.delTip", "\u8BF7\u9009\u62E9\u8981\u5220\u9664\u7684\u6570\u636E!"));
|
|
1941
|
+
return;
|
|
1942
|
+
}
|
|
1943
|
+
this.$confirm(this.$i18nt("gd.https.delContent", "\u662F\u5426\u5220\u9664\u9009\u4E2D\u6570\u636E?"), this.$i18nt("gd.https.delTitle", "\u6E29\u99A8\u63D0\u793A"), {
|
|
1944
|
+
confirmButtonText: this.$i18nt("gd.https.delOk", "\u786E\u5B9A\u5220\u9664"),
|
|
1945
|
+
cancelButtonText: this.$i18nt("gd.https.delCancel", "\u53D6\u6D88"),
|
|
1946
|
+
showClose: !1,
|
|
1947
|
+
confirmButtonLoading: !1,
|
|
1948
|
+
cancelButtonLoading: !1,
|
|
1949
|
+
closeOnClickModal: !1,
|
|
1950
|
+
type: "warning",
|
|
1951
|
+
confirmButtonClass: "el-button--danger",
|
|
1952
|
+
customClass: "custom-alert",
|
|
1953
|
+
callback: () => {
|
|
1954
|
+
},
|
|
1955
|
+
beforeClose: (s, e, t) => {
|
|
1956
|
+
this.delHand(s, e, t);
|
|
1957
|
+
}
|
|
1958
|
+
});
|
|
1959
|
+
},
|
|
1960
|
+
delHand(s, e, t) {
|
|
1961
|
+
if (s !== "confirm") {
|
|
1962
|
+
t();
|
|
1963
|
+
return;
|
|
1964
|
+
}
|
|
1965
|
+
let i = [];
|
|
1966
|
+
this.selectedRows.forEach((n) => {
|
|
1967
|
+
let a = x(n).then((l) => l);
|
|
1968
|
+
i.push(a);
|
|
1969
|
+
}), e.confirmButtonLoading = !0, e.cancelButtonLoading = !0, e.showCancelButton = !1, Promise.all(i).then((n) => {
|
|
1970
|
+
const a = n.filter((l) => !l.success);
|
|
1971
|
+
a.length === 0 ? this.$message.success(this.$i18nt("gd.https.delSucc", "\u5220\u9664\u6210\u529F")) : this.$message.error(this.$i18nt("gd.https.delFail", "\u5220\u9664\u5931\u8D25") + a[0].message), t(), this.refresh(), e.confirmButtonLoading = !1, e.cancelButtonLoading = !1, e.showCancelButton = !0;
|
|
1972
|
+
});
|
|
1973
|
+
},
|
|
1974
|
+
add() {
|
|
1975
|
+
this.transKey = "gd.btn.add", this.$refs.editForm.open(null);
|
|
1976
|
+
},
|
|
1977
|
+
edit() {
|
|
1978
|
+
if (this.selectedRowKeys.length === 0) {
|
|
1979
|
+
this.$message.warning(this.$i18nt("gd.https.editTip", "\u8BF7\u9009\u62E9\u9700\u8981\u7F16\u8F91\u7684\u6570\u636E!"));
|
|
1980
|
+
return;
|
|
1981
|
+
}
|
|
1982
|
+
if (this.selectedRowKeys.length > 1) {
|
|
1983
|
+
this.$message.warning(this.$i18nt("gd.https.editTipOne", "\u53EA\u80FD\u9009\u62E9\u4E00\u6761\u6570\u636E\u7F16\u8F91!"));
|
|
1984
|
+
return;
|
|
1985
|
+
}
|
|
1986
|
+
this.editForm(this.selectedRows[0]);
|
|
1987
|
+
},
|
|
1988
|
+
copy() {
|
|
1989
|
+
if (this.selectedRowKeys.length === 0) {
|
|
1990
|
+
this.$message.warning(this.$i18nt("gd.https.editTip", "\u8BF7\u9009\u62E9\u9700\u8981\u7F16\u8F91\u7684\u6570\u636E!"));
|
|
1991
|
+
return;
|
|
1992
|
+
}
|
|
1993
|
+
if (this.selectedRowKeys.length > 1) {
|
|
1994
|
+
this.$message.warning(this.$i18nt("gd.https.editTipOne", "\u53EA\u80FD\u9009\u62E9\u4E00\u6761\u6570\u636E\u7F16\u8F91!"));
|
|
1995
|
+
return;
|
|
1996
|
+
}
|
|
1997
|
+
this.transKey = "gd.https.copy", this.$refs.editForm.open(Object.assign({ ...this.selectedRows[0] }, { roleId: this.selectedRows[0].id }));
|
|
1998
|
+
},
|
|
1999
|
+
sbumit({ data: s, record: e, btn: t }, i, n) {
|
|
2000
|
+
this.formLoading = !0;
|
|
2001
|
+
let a = e ? this.transKey === "gd.https.copy" ? D : N : P;
|
|
2002
|
+
const l = this.transKey !== "gd.https.edit" ? Object.assign(s, { sysappsid: window.$systemInfo.id }) : s;
|
|
2003
|
+
a(l).then((r) => {
|
|
2004
|
+
r.success ? (this.$message.success(this.$i18nt("gd.https.operateSucc", "\u64CD\u4F5C\u6210\u529F")), n(), this.refresh()) : this.$message.error(this.$i18nt("gd.https.operateFail", "\u64CD\u4F5C\u5931\u8D25") + r.message), this.formLoading = !1;
|
|
2005
|
+
});
|
|
2006
|
+
},
|
|
2007
|
+
onSelectChange(s, e) {
|
|
2008
|
+
this.selectedRowKeys = s, this.selectedRows = e, this.$emit("onSelectChange", s, e, this.allRowData);
|
|
2009
|
+
},
|
|
2010
|
+
doEvent(s) {
|
|
2011
|
+
let e = s.item.functionName;
|
|
2012
|
+
this[e] && this[e]();
|
|
2013
|
+
}
|
|
2014
|
+
},
|
|
2015
|
+
created() {
|
|
2016
|
+
this.getAppId(), this.getConfigInfo();
|
|
2017
|
+
}
|
|
2018
|
+
};
|
|
2019
|
+
var Se = function() {
|
|
2020
|
+
var e = this, t = e._self._c;
|
|
2021
|
+
return t("div", { staticClass: "gd-page-view" }, [t("div", { staticClass: "page-view-list", staticStyle: { padding: "0px" } }, [t("gd-tables", { ref: "table", attrs: { dataSource: e.loadData, size: e.tableSize, pageSize: e.tablePageSize, columns: e.tableColumns, selectedRowKeys: e.selectedRowKeys, height: e.getHeight, filtering: !0, selectedKeep: e.selectedKeep, initialLoading: e.initialLoading }, on: { onChange: e.onSelectChange }, scopedSlots: e._u([{ key: "name", fn: function({ column: i, row: n }) {
|
|
2022
|
+
return [t("gd-tooltip", { attrs: { rowKey: "name", row: n, highlight: "" }, on: { click: e.editForm } })];
|
|
2023
|
+
} }, { key: "operator", fn: function() {
|
|
2024
|
+
return [t("div", { staticClass: "gd-table-operator" }, [t("div", { staticClass: "gd-table-operatorl" }, [t("el-input", { staticClass: "table-operator-input", attrs: { placeholder: e.$i18nt("gd.user.roleName", "\u89D2\u8272\u540D"), clearable: "" }, nativeOn: { keyup: function(i) {
|
|
2025
|
+
return !i.type.indexOf("key") && e._k(i.keyCode, "enter", 13, i.key, "Enter") ? null : e.refresh.apply(null, arguments);
|
|
2026
|
+
} }, model: { value: e.queryParam.name, callback: function(i) {
|
|
2027
|
+
e.$set(e.queryParam, "name", i);
|
|
2028
|
+
}, expression: "queryParam.name" } }), t("div", { staticClass: "table-operator-search", on: { click: e.refresh } }, [t("i", { staticClass: "el-input__icon el-icon-search" })])], 1), t("div", { staticClass: "gd-table-operatorr" }, [e.openMode === "page" ? t("gd-btn-list", { attrs: { sysViewButtons: e.getTableButtons }, on: { functionName: e.doEvent } }) : e._e()], 1)])];
|
|
2029
|
+
}, proxy: !0 }, { key: "filtering", fn: function({ colse: i, visible: n }) {
|
|
2030
|
+
return [t("gd-table-queries-field", { attrs: { columns: e.tableQueries, height: e.getHeight, queryParam: e.queryParam, colse: i, visible: n }, on: { save: e.saveQueries } })];
|
|
2031
|
+
} }]) })], 1), t("gd-edit-form", { ref: "editForm", attrs: { formItemWidth: "90%", loading: e.formLoading, transKey: e.transKey, buttons: e.formButtons, columns: e.getFormColumns, labelPosition: e.labelPosition, formMode: e.formMode }, on: { sbumit: e.sbumit } }), t("RoleGrant", { ref: "roleGrant", on: { ok: e.refresh } }), t("RoleMenu", { ref: "roleMenu", on: { ok: e.refresh } }), t("RoleMenuViewForm", { ref: "roleMenuViewForm", on: { ok: e.refresh } }), t("UserAuthorization", { ref: "userAuthorization", on: { ok: e.refresh } }), t("DocumentAuthorization", { ref: "documentAuthorization", on: { ok: e.refresh } })], 1);
|
|
2032
|
+
}, Le = [], Ie = /* @__PURE__ */ u(
|
|
2033
|
+
Re,
|
|
2034
|
+
Se,
|
|
2035
|
+
Le,
|
|
2036
|
+
!1,
|
|
2037
|
+
null,
|
|
2038
|
+
"00f39bc6",
|
|
2039
|
+
null,
|
|
2040
|
+
null
|
|
2041
|
+
);
|
|
2042
|
+
const p = Ie.exports;
|
|
2043
|
+
p.install = function(s) {
|
|
2044
|
+
s.component(p.name, p);
|
|
2045
|
+
};
|
|
2046
|
+
export {
|
|
2047
|
+
p as G
|
|
2048
|
+
};
|