gds-plus-design-vue 1.1.64 → 1.1.72
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.48631362.mjs +44076 -0
- package/lib/chartbi.afd83839.js +80 -0
- package/lib/element-theme-chalk.ae828c17.js +2 -0
- package/lib/gd-initial.js +34 -0
- package/lib/gd-initial.mjs +80400 -101
- package/lib/main.03b24a05.js +1 -0
- package/lib/{main.665d9127.mjs → main.3cd24320.mjs} +27 -18
- package/lib/main.4cafc3eb.mjs +68 -0
- package/lib/main.eea30a23.js +1 -0
- package/lib/main.efd6b228.mjs +87 -0
- package/lib/main.f1e3ba71.js +1 -0
- package/lib/messages.083c4ede.js +9 -0
- package/lib/messages.7e85146d.mjs +5802 -0
- package/lib/style.css +2 -2
- package/lib/system.account.78b852cd.js +216 -0
- package/lib/system.account.ae0822f1.mjs +2552 -0
- package/lib/system.config.327aded6.js +1 -0
- package/lib/system.config.9c46f279.mjs +373 -0
- package/lib/system.datasource.4b0951ba.mjs +511 -0
- package/lib/system.datasource.8a0c7e0f.js +1 -0
- package/lib/system.dict.65f25e4e.mjs +996 -0
- package/lib/system.dict.72594c98.js +1 -0
- package/lib/system.duplicatechecking.2e9b8df8.js +1 -0
- package/lib/system.duplicatechecking.b05f1617.mjs +2130 -0
- package/lib/system.email.0899621c.js +41 -0
- package/lib/system.email.a4d6d622.mjs +7432 -0
- package/lib/system.fieldsecurity.7de4ee1d.mjs +1745 -0
- package/lib/system.fieldsecurity.d57edb47.js +1 -0
- package/lib/system.file.b3558a8b.js +1 -0
- package/lib/system.file.f152d4fe.mjs +489 -0
- package/lib/system.log.30e5157c.mjs +1450 -0
- package/lib/system.log.f243e7d0.js +1 -0
- package/lib/system.machine.325b256e.mjs +94 -0
- package/lib/system.machine.332fb31c.js +1 -0
- package/lib/system.notice.234d5e47.mjs +636 -0
- package/lib/system.notice.540e97ca.js +1 -0
- package/lib/system.noticereceived.1fb75290.js +1 -0
- package/lib/system.noticereceived.c22372df.mjs +158 -0
- package/lib/system.onlineuser.90c08aef.mjs +184 -0
- package/lib/system.onlineuser.e0c261ed.js +1 -0
- package/lib/system.org.65452f67.js +1 -0
- package/lib/system.org.b8d59e5d.mjs +421 -0
- package/lib/system.permissions.8b0d3c8c.js +9 -0
- package/lib/system.permissions.cba8bd58.mjs +212 -0
- package/lib/system.plugin.07b3c38e.js +1 -0
- package/lib/system.plugin.4911a33d.mjs +946 -0
- package/lib/system.pos.6ed35c39.js +1 -0
- package/lib/system.pos.c274f13c.mjs +312 -0
- package/lib/system.promptmanagement.67475aac.js +1 -0
- package/lib/system.promptmanagement.e9976712.mjs +805 -0
- package/lib/system.role.53778e38.mjs +1509 -0
- package/lib/system.role.c3d74603.js +1 -0
- package/lib/system.timers.69f1792a.mjs +3160 -0
- package/lib/system.timers.ef6b6796.js +38 -0
- package/lib/system.translation.48ff0b03.mjs +665 -0
- package/lib/system.translation.8f7e4144.js +1 -0
- package/lib/system.user.01a55993.mjs +1425 -0
- package/lib/system.user.ea18a84c.js +14 -0
- package/lib/system.useraffiliation.1e74fa9e.mjs +1025 -0
- package/lib/system.useraffiliation.f3c88a51.js +1 -0
- package/lib/system.webresource.5049d97b.js +1 -0
- package/lib/system.webresource.e9518d87.mjs +723 -0
- package/lib/system.welcome.3f1cce96.mjs +45 -0
- package/lib/system.welcome.b109df88.js +1 -0
- package/locale/en_US.js +67 -9
- package/locale/id_ID.js +66 -8
- package/locale/vi_VN.js +66 -8
- package/locale/zh_CN.js +65 -8
- package/package.json +105 -105
- package/lib/gd-initial.umd.js +0 -435
- package/lib/index.32120001.mjs +0 -157708
|
@@ -0,0 +1,1509 @@
|
|
|
1
|
+
import { s as v, a as _, b as K, c as k, g as w, d as $, e as T, f as C, h as R } from "./system.fieldsecurity.7de4ee1d.mjs";
|
|
2
|
+
import { m as h, n as u } from "./chartbi.48631362.mjs";
|
|
3
|
+
import { t as m } from "./messages.7e85146d.mjs";
|
|
4
|
+
import { g as y, s as I, a as L } from "./system.org.b8d59e5d.mjs";
|
|
5
|
+
import { S, b as x, g as N, p as D, d as F } from "./system.account.ae0822f1.mjs";
|
|
6
|
+
const B = {
|
|
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: (t, ...e) => this.renderHeader(t, ...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: (t, ...e) => this.renderHeader(t, ...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-setting",
|
|
148
|
+
name: "sysRole:userMenu"
|
|
149
|
+
},
|
|
150
|
+
{
|
|
151
|
+
displayName: "\u6388\u6743\u83DC\u5355",
|
|
152
|
+
functionName: "grantRoleMenu",
|
|
153
|
+
show: !0,
|
|
154
|
+
transKey: "gd.user.menuRole",
|
|
155
|
+
icon: "el-icon-setting",
|
|
156
|
+
name: "sysRole:grantMenu"
|
|
157
|
+
},
|
|
158
|
+
{
|
|
159
|
+
displayName: "\u6388\u6743\u6570\u636E",
|
|
160
|
+
functionName: "grantRoleGrant",
|
|
161
|
+
show: !0,
|
|
162
|
+
transKey: "gd.user.dataRole",
|
|
163
|
+
icon: "el-icon-setting",
|
|
164
|
+
name: "sysRole:grantData"
|
|
165
|
+
},
|
|
166
|
+
{
|
|
167
|
+
displayName: "\u6388\u6743\u89C6\u56FE/\u8868\u5355",
|
|
168
|
+
functionName: "grantRoleVF",
|
|
169
|
+
show: !0,
|
|
170
|
+
transKey: "gd.user.menuRolevf",
|
|
171
|
+
icon: "el-icon-setting",
|
|
172
|
+
name: "sysRole:grantMenu"
|
|
173
|
+
}
|
|
174
|
+
],
|
|
175
|
+
formButtons: [{
|
|
176
|
+
displayName: "\u786E\u5B9A",
|
|
177
|
+
functionName: "handleSubmit",
|
|
178
|
+
show: !0,
|
|
179
|
+
transKey: "gd.btn.confirm",
|
|
180
|
+
icon: "el-icon-document-checked",
|
|
181
|
+
validate: !0
|
|
182
|
+
}],
|
|
183
|
+
tableQueries: [{
|
|
184
|
+
transKey: "gd.user.roleName",
|
|
185
|
+
prop: "name",
|
|
186
|
+
label: "\u89D2\u8272\u540D\u79F0",
|
|
187
|
+
effectType: "input",
|
|
188
|
+
rules: []
|
|
189
|
+
}, {
|
|
190
|
+
transKey: "gd.org.code",
|
|
191
|
+
prop: "code",
|
|
192
|
+
label: "\u552F\u4E00\u7F16\u7801",
|
|
193
|
+
effectType: "input",
|
|
194
|
+
rules: []
|
|
195
|
+
}]
|
|
196
|
+
};
|
|
197
|
+
}
|
|
198
|
+
};
|
|
199
|
+
const M = {
|
|
200
|
+
data() {
|
|
201
|
+
return {
|
|
202
|
+
defaultProps: {
|
|
203
|
+
children: "children",
|
|
204
|
+
label: "title"
|
|
205
|
+
},
|
|
206
|
+
buttons: [
|
|
207
|
+
{
|
|
208
|
+
displayName: "\u786E\u5B9A",
|
|
209
|
+
functionName: "handleSubmit",
|
|
210
|
+
show: !0,
|
|
211
|
+
transKey: "gd.btn.confirm",
|
|
212
|
+
icon: "el-icon-document-checked"
|
|
213
|
+
}
|
|
214
|
+
],
|
|
215
|
+
record: {},
|
|
216
|
+
visible: !1,
|
|
217
|
+
confirmLoading: !1,
|
|
218
|
+
fullscreen: !1,
|
|
219
|
+
width: "800px",
|
|
220
|
+
orgTreeData: [],
|
|
221
|
+
checkedKeys: []
|
|
222
|
+
};
|
|
223
|
+
},
|
|
224
|
+
computed: {
|
|
225
|
+
...h(["screenHeight", "tableLists"])
|
|
226
|
+
},
|
|
227
|
+
methods: {
|
|
228
|
+
handleSubmit() {
|
|
229
|
+
const t = this.$refs.tree.getCheckedKeys();
|
|
230
|
+
this.$emit(
|
|
231
|
+
"ok",
|
|
232
|
+
Object.assign(
|
|
233
|
+
{ ...this.record },
|
|
234
|
+
{
|
|
235
|
+
checkedKeys: t
|
|
236
|
+
}
|
|
237
|
+
)
|
|
238
|
+
), this.closed();
|
|
239
|
+
},
|
|
240
|
+
getOrgData() {
|
|
241
|
+
this.confirmLoading = !0, y().then((t) => {
|
|
242
|
+
t.success && (this.orgTreeData = t.data, this.confirmLoading = !1);
|
|
243
|
+
});
|
|
244
|
+
},
|
|
245
|
+
open(t) {
|
|
246
|
+
this.record = t, this.checkedKeys = t.checkedKeys, this.visible = !0, this.getOrgData();
|
|
247
|
+
},
|
|
248
|
+
closed() {
|
|
249
|
+
this.fullscreen = !1, this.visible = !1;
|
|
250
|
+
},
|
|
251
|
+
toggleFullscreen() {
|
|
252
|
+
this.fullscreen = !this.fullscreen;
|
|
253
|
+
},
|
|
254
|
+
doEvent(t) {
|
|
255
|
+
const e = t.item.functionName;
|
|
256
|
+
this[e] && this[e]();
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
};
|
|
260
|
+
var O = function() {
|
|
261
|
+
var e = this, s = e._self._c;
|
|
262
|
+
return s("div", [s("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(n) {
|
|
263
|
+
e.visible = n;
|
|
264
|
+
}, closed: e.closed } }, [s("template", { slot: "title" }, [s("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), s("div", { directives: [{ name: "loading", rawName: "v-loading", value: e.confirmLoading, expression: "confirmLoading" }] }, [e.visible ? s("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);
|
|
265
|
+
}, P = [], A = /* @__PURE__ */ u(
|
|
266
|
+
M,
|
|
267
|
+
O,
|
|
268
|
+
P,
|
|
269
|
+
!1,
|
|
270
|
+
null,
|
|
271
|
+
"1aca9ef6",
|
|
272
|
+
null,
|
|
273
|
+
null
|
|
274
|
+
);
|
|
275
|
+
const E = A.exports;
|
|
276
|
+
const z = {
|
|
277
|
+
data() {
|
|
278
|
+
return {
|
|
279
|
+
buttons: [
|
|
280
|
+
{
|
|
281
|
+
displayName: "\u786E\u5B9A",
|
|
282
|
+
functionName: "handleSubmit",
|
|
283
|
+
show: !0,
|
|
284
|
+
transKey: "gd.btn.confirm",
|
|
285
|
+
icon: "el-icon-document-checked"
|
|
286
|
+
}
|
|
287
|
+
],
|
|
288
|
+
record: {},
|
|
289
|
+
visible: !1,
|
|
290
|
+
confirmLoading: !1,
|
|
291
|
+
fullscreen: !1,
|
|
292
|
+
width: "94%",
|
|
293
|
+
loadData: [],
|
|
294
|
+
submitData: {},
|
|
295
|
+
loadSoData: (t) => (this.confirmLoading = !0, new Promise((e, s) => {
|
|
296
|
+
this.confirmLoading = !1, e({ pageNo: 1, pageSize: 500, totalRows: 0, rows: this.loadData });
|
|
297
|
+
})),
|
|
298
|
+
columns: [
|
|
299
|
+
{
|
|
300
|
+
transKey: "gd.btn.entity",
|
|
301
|
+
prop: "sysCodeGenName",
|
|
302
|
+
label: "\u5B9E\u4F53",
|
|
303
|
+
align: "left",
|
|
304
|
+
type: "slot",
|
|
305
|
+
slotType: "sysCodeGenName",
|
|
306
|
+
width: 120
|
|
307
|
+
},
|
|
308
|
+
{
|
|
309
|
+
transKey: "gd.btn.query",
|
|
310
|
+
prop: "getgrantd",
|
|
311
|
+
label: "\u67E5\u8BE2",
|
|
312
|
+
align: "left",
|
|
313
|
+
type: "slot",
|
|
314
|
+
slotType: "getgrantd",
|
|
315
|
+
width: 270,
|
|
316
|
+
showTooltip: !1
|
|
317
|
+
},
|
|
318
|
+
{
|
|
319
|
+
transKey: "gd.btn.add",
|
|
320
|
+
prop: "addgrantd",
|
|
321
|
+
label: "\u65B0\u589E",
|
|
322
|
+
align: "left",
|
|
323
|
+
type: "slot",
|
|
324
|
+
slotType: "addgrantd",
|
|
325
|
+
width: 270,
|
|
326
|
+
showTooltip: !1
|
|
327
|
+
},
|
|
328
|
+
{
|
|
329
|
+
transKey: "gd.btn.edit",
|
|
330
|
+
prop: "editgrantd",
|
|
331
|
+
label: "\u7F16\u8F91",
|
|
332
|
+
align: "left",
|
|
333
|
+
type: "slot",
|
|
334
|
+
slotType: "editgrantd",
|
|
335
|
+
width: 270,
|
|
336
|
+
showTooltip: !1
|
|
337
|
+
},
|
|
338
|
+
{
|
|
339
|
+
transKey: "gd.btn.del",
|
|
340
|
+
prop: "delgrantd",
|
|
341
|
+
label: "\u5220\u9664",
|
|
342
|
+
align: "left",
|
|
343
|
+
type: "slot",
|
|
344
|
+
slotType: "delgrantd",
|
|
345
|
+
width: 270,
|
|
346
|
+
showTooltip: !1
|
|
347
|
+
},
|
|
348
|
+
{
|
|
349
|
+
transKey: "gd.relation.assignment",
|
|
350
|
+
prop: "allocationgrantd",
|
|
351
|
+
label: "\u5206\u6D3E",
|
|
352
|
+
align: "left",
|
|
353
|
+
type: "slot",
|
|
354
|
+
slotType: "allocationgrantd",
|
|
355
|
+
width: 270,
|
|
356
|
+
showTooltip: !1
|
|
357
|
+
},
|
|
358
|
+
{
|
|
359
|
+
transKey: "gd.btn.share",
|
|
360
|
+
prop: "sharegrantd",
|
|
361
|
+
label: "\u5171\u4EAB",
|
|
362
|
+
align: "left",
|
|
363
|
+
type: "slot",
|
|
364
|
+
slotType: "sharegrantd",
|
|
365
|
+
width: 270,
|
|
366
|
+
showTooltip: !1
|
|
367
|
+
}
|
|
368
|
+
],
|
|
369
|
+
currentList: {}
|
|
370
|
+
};
|
|
371
|
+
},
|
|
372
|
+
components: { RoleScope: E },
|
|
373
|
+
computed: {
|
|
374
|
+
height() {
|
|
375
|
+
return this.screenHeight - (this.fullscreen ? 120 : 310);
|
|
376
|
+
},
|
|
377
|
+
...h(["primaryColor", "screenHeight", "tableLists", "tableSize", "tablePageSize"])
|
|
378
|
+
},
|
|
379
|
+
methods: {
|
|
380
|
+
handleSubmit() {
|
|
381
|
+
this.confirmLoading = !0;
|
|
382
|
+
let t = this.$refs.table.tableData;
|
|
383
|
+
t.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)), I(
|
|
384
|
+
Object.assign(
|
|
385
|
+
{ ...this.submitData },
|
|
386
|
+
{
|
|
387
|
+
grants: t
|
|
388
|
+
}
|
|
389
|
+
)
|
|
390
|
+
).then((e) => {
|
|
391
|
+
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);
|
|
392
|
+
});
|
|
393
|
+
},
|
|
394
|
+
setRoleScop(t) {
|
|
395
|
+
this.confirmLoading = !0;
|
|
396
|
+
const e = this.$refs.table.tableData;
|
|
397
|
+
e[t.index][t.name] = [...t.checkedKeys].join(","), this.loadData = [...e], this.refresh(), this.$message.success(this.$i18nt("gd.https.operateSucc", "\u64CD\u4F5C\u6210\u529F"));
|
|
398
|
+
},
|
|
399
|
+
openList(t, e, s) {
|
|
400
|
+
const n = this.$refs.table.tableData, i = `${t.prop.replace("grantd", "")}custom`, r = n[s][i], o = r ? r.split(",").map(Number) : [];
|
|
401
|
+
this.$refs.roleScope.open({ index: s, item: t, checkedKeys: o, data: e, name: i });
|
|
402
|
+
},
|
|
403
|
+
getUserControlData() {
|
|
404
|
+
this.confirmLoading = !0, L({ roleId: this.record.id }).then((t) => {
|
|
405
|
+
t.success ? (t.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 = t.data.grants, this.submitData = t.data, this.$nextTick(() => {
|
|
406
|
+
setTimeout(() => {
|
|
407
|
+
this.refresh(), this.confirmLoading = !0;
|
|
408
|
+
}, 1e3), setTimeout(() => {
|
|
409
|
+
this.confirmLoading = !1;
|
|
410
|
+
}, 1200);
|
|
411
|
+
})) : (this.$message.error(t.message), this.confirmLoading = !1);
|
|
412
|
+
});
|
|
413
|
+
},
|
|
414
|
+
open(t) {
|
|
415
|
+
this.record = t, this.visible = !0, this.getUserControlData();
|
|
416
|
+
},
|
|
417
|
+
closed() {
|
|
418
|
+
this.fullscreen = !1, this.visible = !1;
|
|
419
|
+
},
|
|
420
|
+
refresh(t = !0) {
|
|
421
|
+
this.$refs.table ? this.$refs.table.refresh(t) : console.log("err:\u89C6\u56FE\u672A\u52A0\u8F7D\uFF0C\u8BF7\u7B49\u5F85\u52A0\u8F7D\u5B8C\u6210\uFF01");
|
|
422
|
+
},
|
|
423
|
+
getDictionary(t) {
|
|
424
|
+
return this.$options.filters.dictData(t);
|
|
425
|
+
},
|
|
426
|
+
toggleFullscreen() {
|
|
427
|
+
this.fullscreen = !this.fullscreen;
|
|
428
|
+
},
|
|
429
|
+
doEvent(t) {
|
|
430
|
+
const e = t.item.functionName;
|
|
431
|
+
this[e] && this[e]();
|
|
432
|
+
}
|
|
433
|
+
}
|
|
434
|
+
};
|
|
435
|
+
var q = function() {
|
|
436
|
+
var e = this, s = e._self._c;
|
|
437
|
+
return s("div", [s("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(n) {
|
|
438
|
+
e.visible = n;
|
|
439
|
+
}, closed: e.closed } }, [s("template", { slot: "title" }, [s("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), s("div", { directives: [{ name: "loading", rawName: "v-loading", value: e.confirmLoading, expression: "confirmLoading" }], staticStyle: { "margin-top": "-12px" } }, [e.visible ? s("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(n) {
|
|
440
|
+
return { key: n.prop, fn: function({ column: i, row: r, index: o }) {
|
|
441
|
+
return [n.prop === "sysCodeGenName" ? s("div", [e._v(" " + e._s(e.$i18nt(`Dynamics.${r.transkey}`, r.syscodegenname)) + " ")]) : s("div", { staticClass: "grant-select" }, [s("el-select", { staticStyle: { flex: "1" }, attrs: { placeholder: e.$i18nt("gd.xlsxImport.mapFieldsTip", "\u8BF7\u9009\u62E9\u6620\u5C04\u5B57\u6BB5"), filterable: "", clearable: "", multiple: "" }, model: { value: r[n.prop], callback: function(a) {
|
|
442
|
+
e.$set(r, n.prop, a);
|
|
443
|
+
}, expression: "row[item.prop]" } }, [e._l(e.getDictionary("data_scope_type"), function(a) {
|
|
444
|
+
return [s("el-option", { attrs: { label: e.$i18nt(`Dynamics.${a.transkey}`, a.name), value: a.code } })];
|
|
445
|
+
})], 2), r[n.prop].includes("5") ? s("el-button", { staticClass: "active-color flex-center", attrs: { type: "text" }, on: { click: function(a) {
|
|
446
|
+
return e.openList(n, r, o);
|
|
447
|
+
} } }, [e._v(" " + e._s(e.$i18nt("gd.btn.view", "\u67E5\u770B")) + " ")]) : e._e()], 1)];
|
|
448
|
+
} };
|
|
449
|
+
})], null, !0) }) : e._e()], 1)], 2), s("RoleScope", { ref: "roleScope", on: { ok: e.setRoleScop } })], 1);
|
|
450
|
+
}, G = [], j = /* @__PURE__ */ u(
|
|
451
|
+
z,
|
|
452
|
+
q,
|
|
453
|
+
G,
|
|
454
|
+
!1,
|
|
455
|
+
null,
|
|
456
|
+
"c46bea75",
|
|
457
|
+
null,
|
|
458
|
+
null
|
|
459
|
+
);
|
|
460
|
+
const H = j.exports;
|
|
461
|
+
const V = {
|
|
462
|
+
name: "LayoutItem",
|
|
463
|
+
props: {
|
|
464
|
+
record: {
|
|
465
|
+
type: Array,
|
|
466
|
+
default: () => []
|
|
467
|
+
},
|
|
468
|
+
checkedKeys: {
|
|
469
|
+
type: Array,
|
|
470
|
+
default: () => []
|
|
471
|
+
}
|
|
472
|
+
},
|
|
473
|
+
data() {
|
|
474
|
+
return {};
|
|
475
|
+
},
|
|
476
|
+
computed: {
|
|
477
|
+
fadeColord() {
|
|
478
|
+
return this.fadeColor(this.primaryColor, 0.1);
|
|
479
|
+
},
|
|
480
|
+
menusType() {
|
|
481
|
+
return this.record[0] ? this.record[0].menusType : 0;
|
|
482
|
+
},
|
|
483
|
+
...h(["primaryColor"])
|
|
484
|
+
},
|
|
485
|
+
methods: {
|
|
486
|
+
hasAll(t) {
|
|
487
|
+
return !(this.checkedKeys.filter((s) => t.menuBtnIds.includes(s)).length >= t.menuBtnIds.length);
|
|
488
|
+
},
|
|
489
|
+
checkedBtn(t, e) {
|
|
490
|
+
this.$emit("checkedBtn", t, e);
|
|
491
|
+
},
|
|
492
|
+
change(t, e) {
|
|
493
|
+
this.$emit("change", t, e);
|
|
494
|
+
},
|
|
495
|
+
open(t) {
|
|
496
|
+
this.$emit("open", t);
|
|
497
|
+
},
|
|
498
|
+
checked(t) {
|
|
499
|
+
return !!this.checkedKeys.filter((s) => s === t.id)[0];
|
|
500
|
+
},
|
|
501
|
+
fadeColor(t, e) {
|
|
502
|
+
let s = parseInt(t.substring(1, 3), 16), n = parseInt(t.substring(3, 5), 16), i = parseInt(t.substring(5, 7), 16);
|
|
503
|
+
return `rgba(${s},${n},${i},${e})`;
|
|
504
|
+
}
|
|
505
|
+
}
|
|
506
|
+
};
|
|
507
|
+
var U = function() {
|
|
508
|
+
var e = this, s = e._self._c;
|
|
509
|
+
return s("div", { style: { "--fadecolor": e.fadeColord } }, [e._l(e.record, function(n) {
|
|
510
|
+
return [s("div", { staticClass: "list-item" }, [e.menusType === 0 ? s("i", { class: n.open ? "el-icon-caret-bottom" : "el-icon-caret-right", on: { click: function(i) {
|
|
511
|
+
return e.open(n);
|
|
512
|
+
} } }) : e._e(), e.menusType !== 2 ? s("div", { staticClass: "item-name" }, [s("el-checkbox", { attrs: { indeterminate: n.isIndeterminate }, on: { change: function(i) {
|
|
513
|
+
return e.change(i, [n.id]);
|
|
514
|
+
} }, model: { value: n.checked, callback: function(i) {
|
|
515
|
+
e.$set(n, "checked", i);
|
|
516
|
+
}, expression: "item.checked" } }, [n.iconClass ? s("i", { staticClass: "gd-icons", class: n.iconClass, staticStyle: { "font-size": "15px" } }) : e._e(), e._v(" " + e._s(e.$i18nt(`Dynamics.${n.transkey}`, n.title)) + " ")]), n.children && n.children.length > 0 && e.menusType === 1 ? s("el-button", { staticStyle: { "margin-left": "12px", padding: "5px 15px" }, attrs: { size: "mini" } }, [e.hasAll(n) ? s("span", { on: { click: function(i) {
|
|
517
|
+
return e.checkedBtn(n, 1);
|
|
518
|
+
} } }, [e._v(" " + e._s(e.$i18nt("gd.btn.selectAll", "\u5168\u9009")) + " ")]) : s("span", { on: { click: function(i) {
|
|
519
|
+
return e.checkedBtn(n, 0);
|
|
520
|
+
} } }, [e._v(" " + e._s(e.$i18nt("gd.btn.cancel", "\u53D6\u6D88")) + " ")])]) : e._e()], 1) : e._e(), s("div", { staticClass: "item-data" }, [n.children && n.children.length > 0 && n.children[0].menusType === 2 ? s("div", { staticClass: "item-data-list" }, [e._l(n.children, function(i) {
|
|
521
|
+
return [s("div", { staticClass: "item-name item-named", on: { click: function(r) {
|
|
522
|
+
return e.change(!i.checked, [i.id]);
|
|
523
|
+
} } }, [i.checked ? s("i", { staticClass: "gd-icons gd-icon-quanxuan active-color" }) : s("div", { staticClass: "item-named-kuang" }), s("div", { staticClass: "item-named-title", class: i.checked ? "active-color" : "" }, [e._v(" " + e._s(e.$i18nt(`Dynamics.${i.transkey}`, i.title)) + " ")])])];
|
|
524
|
+
})], 2) : e._e()])]), n.children && n.children.length > 0 && n.children[0].menusType !== 2 ? s("div", { staticClass: "list-more" }, [n.open ? s("LayoutItem", { attrs: { record: n.children, checkedKeys: e.checkedKeys }, on: { open: e.open, change: e.change, checkedBtn: e.checkedBtn } }) : e._e()], 1) : e._e()];
|
|
525
|
+
})], 2);
|
|
526
|
+
}, Q = [], J = /* @__PURE__ */ u(
|
|
527
|
+
V,
|
|
528
|
+
U,
|
|
529
|
+
Q,
|
|
530
|
+
!1,
|
|
531
|
+
null,
|
|
532
|
+
"d151fae1",
|
|
533
|
+
null,
|
|
534
|
+
null
|
|
535
|
+
);
|
|
536
|
+
const b = J.exports;
|
|
537
|
+
const W = {
|
|
538
|
+
data() {
|
|
539
|
+
return {
|
|
540
|
+
buttons: [
|
|
541
|
+
{
|
|
542
|
+
displayName: "\u786E\u5B9A",
|
|
543
|
+
functionName: "handleSubmit",
|
|
544
|
+
show: !0,
|
|
545
|
+
transKey: "gd.btn.confirm",
|
|
546
|
+
icon: "el-icon-document-checked"
|
|
547
|
+
}
|
|
548
|
+
],
|
|
549
|
+
record: {},
|
|
550
|
+
visible: !1,
|
|
551
|
+
confirmLoading: !1,
|
|
552
|
+
fullscreen: !1,
|
|
553
|
+
width: "94%",
|
|
554
|
+
menuTreeData: [],
|
|
555
|
+
checkedKeys: [],
|
|
556
|
+
list: [],
|
|
557
|
+
allClose: !1,
|
|
558
|
+
menuAll: [],
|
|
559
|
+
systemMenuAll: [],
|
|
560
|
+
allCheckedKeys: []
|
|
561
|
+
};
|
|
562
|
+
},
|
|
563
|
+
computed: {
|
|
564
|
+
isIndeterminate() {
|
|
565
|
+
return this.allClose ? !1 : this.checkedKeys.length > 0;
|
|
566
|
+
},
|
|
567
|
+
...h(["screenHeight", "tableLists"])
|
|
568
|
+
},
|
|
569
|
+
components: { LayoutItem: b },
|
|
570
|
+
methods: {
|
|
571
|
+
handleSubmit() {
|
|
572
|
+
this.confirmLoading = !0, v({
|
|
573
|
+
id: this.record.id,
|
|
574
|
+
grantmenuidlist: this.checkedKeys
|
|
575
|
+
}).then((t) => {
|
|
576
|
+
t.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") + t.message), this.confirmLoading = !1;
|
|
577
|
+
});
|
|
578
|
+
},
|
|
579
|
+
checkedItemBtn(t, e) {
|
|
580
|
+
let s = [...this.checkedKeys].filter((n) => !t.menuBtnIds.includes(n));
|
|
581
|
+
e === 1 && (s = s.concat(t.menuBtnIds)), this.checkedKeys = [...s], this.handleItem();
|
|
582
|
+
},
|
|
583
|
+
openItem(t) {
|
|
584
|
+
let e = [...this.menuTreeData];
|
|
585
|
+
const s = (n) => (n = n.filter((i, r) => (i.id === t.id && (i.open = !i.open), i.children && i.children.length > 0 && (i.children = s(i.children)), !0)), n);
|
|
586
|
+
s(e), this.menuTreeData = [...e];
|
|
587
|
+
},
|
|
588
|
+
changeItem(t, e, s = !0) {
|
|
589
|
+
let n = [...this.checkedKeys];
|
|
590
|
+
this.checkedKeys.filter((l) => e.includes(l))[0];
|
|
591
|
+
const i = this.list.filter((l) => e.includes(l.id))[0], r = s && i ? i.menuIds : [];
|
|
592
|
+
if (t ? n = this.checkedKeys.concat(e).concat(r) : n = this.checkedKeys.filter((l) => !e.includes(l)).filter((l) => !r.includes(l)), this.checkedKeys = [...n], this.handleItem(), i.menusType === 2)
|
|
593
|
+
return;
|
|
594
|
+
let o = [];
|
|
595
|
+
this.findParent(this.menuTreeData, i, o);
|
|
596
|
+
let a = [], d = [];
|
|
597
|
+
o.forEach((l) => {
|
|
598
|
+
this.checkedKeys.filter((g) => l.menuIds.includes(g)).length === l.menuIds.length && l.menuIds.length > 0 && !l.checked ? a.push(l.id) : d.push(l.id);
|
|
599
|
+
}), a.forEach((l) => {
|
|
600
|
+
this.changeItem(!0, [l], !1);
|
|
601
|
+
}), d.forEach((l) => {
|
|
602
|
+
this.changeItem(!1, [l], !1);
|
|
603
|
+
});
|
|
604
|
+
},
|
|
605
|
+
handleItem() {
|
|
606
|
+
let t = [...this.menuTreeData];
|
|
607
|
+
const e = (s) => (s = s.filter((n, i) => {
|
|
608
|
+
const r = this.checkedKeys.filter((o) => n.menuIds.includes(o));
|
|
609
|
+
return this.checkedKeys.includes(n.id) ? (n.checked = !0, n.isIndeterminate = !1) : (n.checked = !1, n.isIndeterminate = r.length > 0 && n.menuIds.length > 0), n.children && n.children.length > 0 && (n.children = e(n.children)), !0;
|
|
610
|
+
}), s);
|
|
611
|
+
e(t), this.menuTreeData = [...t], this.allClose = this.checkedKeys.length === this.allCheckedKeys.length && this.allCheckedKeys.length > 0;
|
|
612
|
+
},
|
|
613
|
+
changeAll(t) {
|
|
614
|
+
t ? this.checkedKeys = [...this.allCheckedKeys] : this.checkedKeys = [], this.handleItem();
|
|
615
|
+
},
|
|
616
|
+
init() {
|
|
617
|
+
this.confirmLoading = !0, Promise.all([this.getMenuTree(), this.expandedMenuKeys(), this.getMenuList()]).then(async (t) => {
|
|
618
|
+
let e = [], s = [];
|
|
619
|
+
const n = (a) => (a = a.filter((d, l) => {
|
|
620
|
+
const c = this.checkedKeys.filter((f) => d.id === f)[0];
|
|
621
|
+
return d.open = !0, d.checked = d.type === 1 ? !!c : !1, d.isIndeterminate = !1, d.menusType = d.type, e.push(d.id), s.push(d), d.children && d.children.length > 0 && (d.children = n(d.children)), !0;
|
|
622
|
+
}), a);
|
|
623
|
+
let i = this.menuAll.filter((a) => !!this.systemMenuAll.filter((l) => l.id === a.id)[0]);
|
|
624
|
+
await n(i), this.allCheckedKeys = e;
|
|
625
|
+
let r = [];
|
|
626
|
+
s.forEach((a, d) => {
|
|
627
|
+
const l = this.getMenuIds(a);
|
|
628
|
+
s[d].menuIds = l.arr, s[d].menuBtnIds = l.btn, !(this.checkedKeys.filter((g) => l.arr.includes(g)).length === l.arr.length) && l.arr.length > 0 && r.push(a.id);
|
|
629
|
+
}), this.list = s;
|
|
630
|
+
const o = this.checkedKeys.filter((a) => e.includes(a)).filter((a) => !r.includes(a)).filter((a, d, l) => l.indexOf(a) === d);
|
|
631
|
+
this.checkedKeys = o, this.allClose = this.checkedKeys.length === e.length && e.length > 0, this.menuTreeData = [...i], this.handleItem(), this.confirmLoading = !1;
|
|
632
|
+
});
|
|
633
|
+
},
|
|
634
|
+
open(t) {
|
|
635
|
+
this.record = t, this.visible = !0, this.init();
|
|
636
|
+
},
|
|
637
|
+
getMenuTree() {
|
|
638
|
+
return S({ roleId: this.record.id }).then((t) => (t.code === 200 && (this.menuAll = t.data), t));
|
|
639
|
+
},
|
|
640
|
+
expandedMenuKeys() {
|
|
641
|
+
return _({
|
|
642
|
+
id: this.record.id
|
|
643
|
+
}).then((t) => (t.code === 200 && (this.checkedKeys = t.data), t));
|
|
644
|
+
},
|
|
645
|
+
getMenuList() {
|
|
646
|
+
return x({ AppsId: window.$systemInfo.id }).then((t) => (t.code === 200 && (this.systemMenuAll = t.data), t));
|
|
647
|
+
},
|
|
648
|
+
getMenuIds(t) {
|
|
649
|
+
let e = [], s = [];
|
|
650
|
+
const n = (i) => (i = i.filter((r, o) => (r.menusType !== 2 ? e.push(r.id) : s.push(r.id), r.children && r.children.length > 0 && (r.children = n(r.children)), !0)), i);
|
|
651
|
+
return t.children && n(t.children), { arr: e, btn: s };
|
|
652
|
+
},
|
|
653
|
+
findParent(t, e, s) {
|
|
654
|
+
for (let n of t)
|
|
655
|
+
if (n.id === e.parentId || n.children && n.children.length > 0 && this.findParent(n.children, e, s))
|
|
656
|
+
return s.unshift(n), !0;
|
|
657
|
+
return !1;
|
|
658
|
+
},
|
|
659
|
+
closed() {
|
|
660
|
+
this.fullscreen = !1, this.visible = !1, this.menuTreeData = [], this.checkedKeys = [];
|
|
661
|
+
},
|
|
662
|
+
toggleFullscreen() {
|
|
663
|
+
this.fullscreen = !this.fullscreen;
|
|
664
|
+
},
|
|
665
|
+
doEvent(t) {
|
|
666
|
+
const e = t.item.functionName;
|
|
667
|
+
this[e] && this[e]();
|
|
668
|
+
}
|
|
669
|
+
}
|
|
670
|
+
};
|
|
671
|
+
var X = function() {
|
|
672
|
+
var e = this, s = e._self._c;
|
|
673
|
+
return s("div", [s("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(n) {
|
|
674
|
+
e.visible = n;
|
|
675
|
+
}, closed: e.closed } }, [s("template", { slot: "title" }, [s("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), s("div", { directives: [{ name: "loading", rawName: "v-loading", value: e.confirmLoading, expression: "confirmLoading" }], staticStyle: { "min-height": "400px" } }, [e.visible ? s("LayoutItem", { attrs: { record: e.menuTreeData, checkedKeys: e.checkedKeys }, on: { open: e.openItem, change: e.changeItem, checkedBtn: e.checkedItemBtn } }) : e._e()], 1), s("template", { slot: "footer" }, [s("div", { staticClass: "btoms" }, [s("el-checkbox", { attrs: { disabled: e.confirmLoading, indeterminate: e.isIndeterminate }, on: { change: e.changeAll }, model: { value: e.allClose, callback: function(n) {
|
|
676
|
+
e.allClose = n;
|
|
677
|
+
}, expression: "allClose" } }, [e._v(" " + e._s(e.$i18nt("gd.btn.selectAll", "\u5168\u9009")) + " ")])], 1)])], 2)], 1);
|
|
678
|
+
}, Y = [], Z = /* @__PURE__ */ u(
|
|
679
|
+
W,
|
|
680
|
+
X,
|
|
681
|
+
Y,
|
|
682
|
+
!1,
|
|
683
|
+
null,
|
|
684
|
+
"bbe56479",
|
|
685
|
+
null,
|
|
686
|
+
null
|
|
687
|
+
);
|
|
688
|
+
const ee = Z.exports;
|
|
689
|
+
const te = {
|
|
690
|
+
name: "GdUserRole",
|
|
691
|
+
props: {
|
|
692
|
+
height: {
|
|
693
|
+
type: Number,
|
|
694
|
+
default: 100
|
|
695
|
+
},
|
|
696
|
+
openSelecteKeys: {
|
|
697
|
+
type: Array,
|
|
698
|
+
default: () => []
|
|
699
|
+
},
|
|
700
|
+
openMode: {
|
|
701
|
+
type: String,
|
|
702
|
+
default: "page"
|
|
703
|
+
}
|
|
704
|
+
},
|
|
705
|
+
mixins: [m],
|
|
706
|
+
data() {
|
|
707
|
+
return {
|
|
708
|
+
transKey: "gd.btn.add",
|
|
709
|
+
formLoading: !1,
|
|
710
|
+
currentNode: null,
|
|
711
|
+
loading: !0,
|
|
712
|
+
orgTree: [],
|
|
713
|
+
selectedRowKeys: [],
|
|
714
|
+
selectedRows: [],
|
|
715
|
+
queryParam: {},
|
|
716
|
+
defaultProps: {
|
|
717
|
+
children: "children",
|
|
718
|
+
label: "title",
|
|
719
|
+
value: "value"
|
|
720
|
+
},
|
|
721
|
+
defaultExpandedKeys: "",
|
|
722
|
+
loadData: (t) => N({ roleId: this.openSelecteKeys[0] }).then((e) => (this.getRowId(e.data), { pageNo: 1, pageSize: 1e3, totalRows: 0, rows: e.data })),
|
|
723
|
+
disableBtn: [],
|
|
724
|
+
fileList: [],
|
|
725
|
+
needLoad: !1,
|
|
726
|
+
infoData: {},
|
|
727
|
+
isSendEmail: "",
|
|
728
|
+
isSendEmailed: "",
|
|
729
|
+
tableColumns: [
|
|
730
|
+
{
|
|
731
|
+
type: "selection",
|
|
732
|
+
width: "60",
|
|
733
|
+
fixed: !0
|
|
734
|
+
},
|
|
735
|
+
{
|
|
736
|
+
transKey: "gd.user.name",
|
|
737
|
+
prop: "name",
|
|
738
|
+
label: "\u59D3\u540D",
|
|
739
|
+
type: "slot",
|
|
740
|
+
slotType: "name",
|
|
741
|
+
align: "left",
|
|
742
|
+
showOverflowTooltip: !0
|
|
743
|
+
},
|
|
744
|
+
{
|
|
745
|
+
transKey: "gd.user.nickname",
|
|
746
|
+
prop: "nickname",
|
|
747
|
+
label: "\u6635\u79F0",
|
|
748
|
+
align: "left",
|
|
749
|
+
type: "slot",
|
|
750
|
+
slotType: "nickname",
|
|
751
|
+
showOverflowTooltip: !0
|
|
752
|
+
},
|
|
753
|
+
{
|
|
754
|
+
transKey: "gd.user.sex",
|
|
755
|
+
prop: "sex",
|
|
756
|
+
label: "\u6027\u522B",
|
|
757
|
+
align: "left",
|
|
758
|
+
type: "slot",
|
|
759
|
+
slotType: "sex",
|
|
760
|
+
showOverflowTooltip: !0
|
|
761
|
+
},
|
|
762
|
+
{
|
|
763
|
+
transKey: "gd.user.organization",
|
|
764
|
+
prop: "orgname",
|
|
765
|
+
label: "\u6240\u5C5E\u673A\u6784",
|
|
766
|
+
align: "left",
|
|
767
|
+
type: "slot",
|
|
768
|
+
slotType: "orgname",
|
|
769
|
+
showOverflowTooltip: !0
|
|
770
|
+
},
|
|
771
|
+
{
|
|
772
|
+
transKey: "gd.user.status",
|
|
773
|
+
prop: "status",
|
|
774
|
+
label: "\u72B6\u6001",
|
|
775
|
+
align: "left",
|
|
776
|
+
type: "slot",
|
|
777
|
+
slotType: "status",
|
|
778
|
+
showOverflowTooltip: !0
|
|
779
|
+
}
|
|
780
|
+
],
|
|
781
|
+
formColumnsuser: [{
|
|
782
|
+
transKey: "gd.user.account",
|
|
783
|
+
effectType: "input",
|
|
784
|
+
prop: "account",
|
|
785
|
+
label: "\u8D26\u53F7",
|
|
786
|
+
placeholder: "\u8BF7\u8F93\u5165",
|
|
787
|
+
placeholderTransKey: "gd.placeholder.input",
|
|
788
|
+
rules: [{
|
|
789
|
+
required: !0,
|
|
790
|
+
message: "\u8BF7\u8F93\u5165",
|
|
791
|
+
transKey: "gd.placeholder.input",
|
|
792
|
+
trigger: "change",
|
|
793
|
+
min: 2
|
|
794
|
+
}]
|
|
795
|
+
}, {
|
|
796
|
+
transKey: "gd.user.name",
|
|
797
|
+
prop: "name",
|
|
798
|
+
effectType: "input",
|
|
799
|
+
label: "\u59D3\u540D",
|
|
800
|
+
placeholder: "\u8BF7\u8F93\u5165",
|
|
801
|
+
placeholderTransKey: "gd.placeholder.input",
|
|
802
|
+
rules: [{
|
|
803
|
+
required: !0,
|
|
804
|
+
message: "\u8BF7\u8F93\u5165",
|
|
805
|
+
transKey: "gd.placeholder.input",
|
|
806
|
+
trigger: "change"
|
|
807
|
+
}]
|
|
808
|
+
}, {
|
|
809
|
+
transKey: "gd.user.sex",
|
|
810
|
+
prop: "gender",
|
|
811
|
+
effectType: "radio",
|
|
812
|
+
label: "\u6027\u522B",
|
|
813
|
+
placeholder: "\u8BF7\u8F93\u5165",
|
|
814
|
+
placeholderTransKey: "gd.placeholder.input",
|
|
815
|
+
dictTypeCode: "gender",
|
|
816
|
+
rules: [{
|
|
817
|
+
required: !0,
|
|
818
|
+
message: "\u8BF7\u8F93\u5165",
|
|
819
|
+
transKey: "gd.placeholder.input",
|
|
820
|
+
trigger: "change"
|
|
821
|
+
}]
|
|
822
|
+
}, {
|
|
823
|
+
transKey: "gd.user.birthday",
|
|
824
|
+
prop: "birthday",
|
|
825
|
+
effectType: "date",
|
|
826
|
+
label: "\u751F\u65E5",
|
|
827
|
+
placeholder: "\u8BF7\u8F93\u5165",
|
|
828
|
+
valueFormat: "yyyy-MM-dd",
|
|
829
|
+
placeholderTransKey: "gd.placeholder.select",
|
|
830
|
+
rules: []
|
|
831
|
+
}, {
|
|
832
|
+
transKey: "gd.user.phone",
|
|
833
|
+
effectType: "input",
|
|
834
|
+
prop: "phone",
|
|
835
|
+
label: "\u624B\u673A\u53F7",
|
|
836
|
+
placeholder: "\u8BF7\u8F93\u5165",
|
|
837
|
+
placeholderTransKey: "gd.placeholder.input",
|
|
838
|
+
rules: [{
|
|
839
|
+
required: !0,
|
|
840
|
+
message: "\u8BF7\u8F93\u5165",
|
|
841
|
+
transKey: "gd.placeholder.input",
|
|
842
|
+
trigger: "change"
|
|
843
|
+
}]
|
|
844
|
+
}, {
|
|
845
|
+
transKey: "gd.user.email",
|
|
846
|
+
effectType: "input",
|
|
847
|
+
prop: "email",
|
|
848
|
+
label: "\u90AE\u7BB1",
|
|
849
|
+
placeholder: "\u8BF7\u8F93\u5165",
|
|
850
|
+
placeholderTransKey: "gd.placeholder.input",
|
|
851
|
+
rules: [{
|
|
852
|
+
required: !0,
|
|
853
|
+
message: "\u8BF7\u8F93\u5165",
|
|
854
|
+
transKey: "gd.placeholder.input",
|
|
855
|
+
trigger: "change"
|
|
856
|
+
}, {
|
|
857
|
+
type: "email",
|
|
858
|
+
message: "\u8BF7\u8F93\u5165\u6B63\u786E\u7684\u90AE\u7BB1\u53F7!",
|
|
859
|
+
transKey: "gd.account.emailTip"
|
|
860
|
+
}]
|
|
861
|
+
}, {
|
|
862
|
+
transKey: "gd.user.nickname",
|
|
863
|
+
prop: "nickname",
|
|
864
|
+
effectType: "input",
|
|
865
|
+
label: "\u6635\u79F0",
|
|
866
|
+
placeholder: "\u8BF7\u8F93\u5165",
|
|
867
|
+
placeholderTransKey: "gd.placeholder.input",
|
|
868
|
+
rules: []
|
|
869
|
+
}, {
|
|
870
|
+
transKey: "gd.user.tel",
|
|
871
|
+
prop: "tel",
|
|
872
|
+
effectType: "input",
|
|
873
|
+
label: "\u7535\u8BDD",
|
|
874
|
+
placeholder: "\u8BF7\u8F93\u5165",
|
|
875
|
+
placeholderTransKey: "gd.placeholder.input",
|
|
876
|
+
rules: []
|
|
877
|
+
}, {
|
|
878
|
+
transKey: "gd.org.displayName",
|
|
879
|
+
prop: "orgid",
|
|
880
|
+
effectType: "selectTree",
|
|
881
|
+
label: "\u6240\u5C5E\u673A\u6784",
|
|
882
|
+
placeholder: "\u8BF7\u9009\u62E9",
|
|
883
|
+
placeholderTransKey: "gd.placeholder.select",
|
|
884
|
+
treeOptions: [],
|
|
885
|
+
rules: [{
|
|
886
|
+
required: !0,
|
|
887
|
+
message: "\u8BF7\u9009\u62E9",
|
|
888
|
+
transKey: "gd.placeholder.select",
|
|
889
|
+
trigger: "change"
|
|
890
|
+
}]
|
|
891
|
+
}, {
|
|
892
|
+
transKey: "gd.user.PSDNeverExpire",
|
|
893
|
+
prop: "psdneverexpire",
|
|
894
|
+
effectType: "switch",
|
|
895
|
+
label: "\u5BC6\u7801\u6C38\u4E0D\u8FC7\u671F",
|
|
896
|
+
placeholder: "\u8BF7\u8F93\u5165",
|
|
897
|
+
placeholderTransKey: "gd.placeholder.input",
|
|
898
|
+
rules: []
|
|
899
|
+
}],
|
|
900
|
+
tableButtons: [
|
|
901
|
+
{
|
|
902
|
+
displayName: "\u65B0\u589E",
|
|
903
|
+
functionName: "add",
|
|
904
|
+
show: !0,
|
|
905
|
+
transKey: "gd.btn.add",
|
|
906
|
+
icon: "el-icon-plus",
|
|
907
|
+
name: "sysRole:add"
|
|
908
|
+
},
|
|
909
|
+
{
|
|
910
|
+
displayName: "\u5220\u9664",
|
|
911
|
+
functionName: "del",
|
|
912
|
+
show: !0,
|
|
913
|
+
transKey: "gd.btn.del",
|
|
914
|
+
icon: "el-icon-delete",
|
|
915
|
+
btnType: "danger",
|
|
916
|
+
name: "sysRole:delete"
|
|
917
|
+
}
|
|
918
|
+
],
|
|
919
|
+
disabledRowId: [],
|
|
920
|
+
sysCodeGenName: "sys_user"
|
|
921
|
+
};
|
|
922
|
+
},
|
|
923
|
+
components: {},
|
|
924
|
+
computed: {
|
|
925
|
+
initialLoading() {
|
|
926
|
+
return this.openMode === "page";
|
|
927
|
+
},
|
|
928
|
+
selectedKeep() {
|
|
929
|
+
return this.openMode !== "page";
|
|
930
|
+
},
|
|
931
|
+
getQueryParam() {
|
|
932
|
+
let t = /* @__PURE__ */ new Map();
|
|
933
|
+
for (let e in this.queryParam)
|
|
934
|
+
t.set(e === "statecodes" ? "searchctatus" : e, this.queryParam[e]);
|
|
935
|
+
return Object.fromEntries(t);
|
|
936
|
+
},
|
|
937
|
+
getFormColumns() {
|
|
938
|
+
return this.formColumnsuser.filter((e) => (e.prop === "orgid" && (e.treeOptions = [...this.orgTree]), !0));
|
|
939
|
+
},
|
|
940
|
+
getTableButtons() {
|
|
941
|
+
return this.tableButtons.filter((t) => (t.show = !this.disableBtn.includes(t.displayName), !0));
|
|
942
|
+
},
|
|
943
|
+
getHeight() {
|
|
944
|
+
return this.height;
|
|
945
|
+
},
|
|
946
|
+
styled() {
|
|
947
|
+
return `height:${this.height + 76}px`;
|
|
948
|
+
},
|
|
949
|
+
...h(["tablePageSize", "tableSize", "labelPosition", "formMode"])
|
|
950
|
+
},
|
|
951
|
+
methods: {
|
|
952
|
+
getRowId(t) {
|
|
953
|
+
let e = [];
|
|
954
|
+
t.filter((s) => !this.disabledRowId.includes(s.id)).forEach((s) => {
|
|
955
|
+
e.push(s.id);
|
|
956
|
+
}), this.disabledRowId = this.disabledRowId.concat(e);
|
|
957
|
+
},
|
|
958
|
+
saveQueries(t) {
|
|
959
|
+
this.queryParam = {
|
|
960
|
+
...t
|
|
961
|
+
}, this.refresh();
|
|
962
|
+
},
|
|
963
|
+
refresh() {
|
|
964
|
+
this.$refs.table.refresh();
|
|
965
|
+
},
|
|
966
|
+
getOrgTree() {
|
|
967
|
+
y({}).then((t) => {
|
|
968
|
+
if (t.code === 200) {
|
|
969
|
+
const e = (s) => (s = s.filter((n, i) => (n.value = String(n.value), n.children && n.children.length > 0 && (n.children = e(n.children)), !0)), s);
|
|
970
|
+
this.orgTree = e(t.data);
|
|
971
|
+
}
|
|
972
|
+
this.loading = !1;
|
|
973
|
+
});
|
|
974
|
+
},
|
|
975
|
+
handleNodeClick(t) {
|
|
976
|
+
this.queryParam.orgId === t.id ? (delete this.queryParam.orgId, this.$nextTick(() => {
|
|
977
|
+
setTimeout(() => {
|
|
978
|
+
this.$refs.tree.setCurrentKey(null);
|
|
979
|
+
}, 0);
|
|
980
|
+
})) : this.queryParam = Object.assign(
|
|
981
|
+
{
|
|
982
|
+
...this.queryParam
|
|
983
|
+
},
|
|
984
|
+
{
|
|
985
|
+
orgId: t.id
|
|
986
|
+
}
|
|
987
|
+
), this.refresh();
|
|
988
|
+
},
|
|
989
|
+
handleOk() {
|
|
990
|
+
this.$refs.table.refresh();
|
|
991
|
+
},
|
|
992
|
+
onSelectChange(t, e) {
|
|
993
|
+
this.selectedRowKeys = t, this.selectedRows = e;
|
|
994
|
+
},
|
|
995
|
+
doEvent(t) {
|
|
996
|
+
let e = t.item.functionName;
|
|
997
|
+
this[e] && this[e]();
|
|
998
|
+
},
|
|
999
|
+
lookupSeled(t) {
|
|
1000
|
+
if (t.fkData.length === 0) {
|
|
1001
|
+
this.$refs.engineSearch.closed();
|
|
1002
|
+
return;
|
|
1003
|
+
}
|
|
1004
|
+
this.$refs.engineSearch.confirmLoading = !0, D({
|
|
1005
|
+
roleId: this.openSelecteKeys[0],
|
|
1006
|
+
userIdList: t.data
|
|
1007
|
+
}).then((e) => {
|
|
1008
|
+
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;
|
|
1009
|
+
});
|
|
1010
|
+
},
|
|
1011
|
+
add() {
|
|
1012
|
+
this.$refs.engineSearch.open({
|
|
1013
|
+
fkEntityName: this.sysCodeGenName,
|
|
1014
|
+
val: [],
|
|
1015
|
+
effectType: "participants",
|
|
1016
|
+
isRelevance: !0
|
|
1017
|
+
});
|
|
1018
|
+
},
|
|
1019
|
+
del() {
|
|
1020
|
+
let t = this;
|
|
1021
|
+
if (this.selectedRowKeys.length === 0) {
|
|
1022
|
+
this.$message.warning(this.$i18nt("gd.https.delTip", "\u8BF7\u9009\u62E9\u8981\u5220\u9664\u7684\u6570\u636E!"));
|
|
1023
|
+
return;
|
|
1024
|
+
}
|
|
1025
|
+
this.$confirm(this.$i18nt("gd.https.delContent", "\u662F\u5426\u5220\u9664\u9009\u4E2D\u6570\u636E?"), this.$i18nt("gd.https.delTitle", "\u6E29\u99A8\u63D0\u793A"), {
|
|
1026
|
+
confirmButtonText: this.$i18nt("gd.https.delOk", "\u786E\u5B9A\u5220\u9664"),
|
|
1027
|
+
cancelButtonText: this.$i18nt("gd.https.delCancel", "\u53D6\u6D88"),
|
|
1028
|
+
showClose: !1,
|
|
1029
|
+
confirmButtonLoading: !1,
|
|
1030
|
+
cancelButtonLoading: !1,
|
|
1031
|
+
closeOnClickModal: !1,
|
|
1032
|
+
type: "warning",
|
|
1033
|
+
confirmButtonClass: "el-button--danger",
|
|
1034
|
+
customClass: "custom-alert",
|
|
1035
|
+
callback: () => {
|
|
1036
|
+
},
|
|
1037
|
+
beforeClose: (e, s, n) => {
|
|
1038
|
+
if (e !== "confirm") {
|
|
1039
|
+
n();
|
|
1040
|
+
return;
|
|
1041
|
+
}
|
|
1042
|
+
s.confirmButtonLoading = !0, s.cancelButtonLoading = !0, s.showCancelButton = !1, F({
|
|
1043
|
+
roleId: t.openSelecteKeys[0],
|
|
1044
|
+
userIdList: t.selectedRowKeys
|
|
1045
|
+
}).then((i) => {
|
|
1046
|
+
i.success ? (t.$message.success(t.$i18nt("gd.https.delSucc", "\u5220\u9664\u6210\u529F")), t.disabledRowId = t.disabledRowId.filter((r) => !t.selectedRows.filter((a) => a.id === r)[0]), s.confirmButtonLoading = !1, s.cancelButtonLoading = !1, s.showCancelButton = !0, n(), t.refresh()) : t.$message.error(t.$i18nt("gd.https.delFail", "\u5220\u9664\u5931\u8D25") + i.message);
|
|
1047
|
+
});
|
|
1048
|
+
}
|
|
1049
|
+
});
|
|
1050
|
+
}
|
|
1051
|
+
},
|
|
1052
|
+
created() {
|
|
1053
|
+
}
|
|
1054
|
+
};
|
|
1055
|
+
var se = function() {
|
|
1056
|
+
var e = this, s = e._self._c;
|
|
1057
|
+
return s("div", { staticClass: "gd-page-view", staticStyle: { display: "flex", background: "rgb(245, 245, 245)" } }, [s("div", { staticClass: "page-view-list" }, [s("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() {
|
|
1058
|
+
return [s("div", { staticClass: "gd-table-operator" }, [s("div", { staticClass: "gd-table-operatorr" }, [s("gd-btn-list", { attrs: { sysViewButtons: e.tableButtons }, on: { functionName: e.doEvent } })], 1)])];
|
|
1059
|
+
}, proxy: !0 }, { key: "name", fn: function({ column: n, row: i }) {
|
|
1060
|
+
return [s("span", { staticClass: "active-color", staticStyle: { cursor: "pointer" } }, [e._v(" " + e._s(i.name) + " ")])];
|
|
1061
|
+
} }, { key: "nickname", fn: function({ column: n, row: i }) {
|
|
1062
|
+
return [s("span", { staticStyle: { cursor: "pointer" } }, [e._v(" " + e._s(i.nickname) + " ")])];
|
|
1063
|
+
} }, { key: "orgname", fn: function({ column: n, row: i }) {
|
|
1064
|
+
return [s("span", { staticStyle: { cursor: "pointer" } }, [e._v(" " + e._s(i.orgname) + " ")])];
|
|
1065
|
+
} }, { key: "sex", fn: function({ column: n, row: i }) {
|
|
1066
|
+
return [s("span", [e._v(" " + e._s(e._f("dictType")("gender", i.sex)) + " ")])];
|
|
1067
|
+
} }, { key: "status", fn: function({ column: n, row: i }) {
|
|
1068
|
+
return [s("span", [e._v(" " + e._s(e._f("dictType")("state_code", i.status)) + " ")])];
|
|
1069
|
+
} }]) }), s("gd-search", { ref: "engineSearch", attrs: { appendToBody: !0, disabledRowId: e.disabledRowId }, on: { lookupSeled: e.lookupSeled } })], 1)]);
|
|
1070
|
+
}, ne = [], ie = /* @__PURE__ */ u(
|
|
1071
|
+
te,
|
|
1072
|
+
se,
|
|
1073
|
+
ne,
|
|
1074
|
+
!1,
|
|
1075
|
+
null,
|
|
1076
|
+
"e09158ba",
|
|
1077
|
+
null,
|
|
1078
|
+
null
|
|
1079
|
+
);
|
|
1080
|
+
const ae = ie.exports;
|
|
1081
|
+
const re = {
|
|
1082
|
+
data() {
|
|
1083
|
+
return {
|
|
1084
|
+
buttons: [],
|
|
1085
|
+
record: {},
|
|
1086
|
+
visible: !1,
|
|
1087
|
+
confirmLoading: !1,
|
|
1088
|
+
fullscreen: !1,
|
|
1089
|
+
width: "90%",
|
|
1090
|
+
selectedRowKeys: []
|
|
1091
|
+
};
|
|
1092
|
+
},
|
|
1093
|
+
components: { UserFormDate: ae },
|
|
1094
|
+
computed: {
|
|
1095
|
+
height() {
|
|
1096
|
+
return this.screenHeight - (this.fullscreen ? 160 : 340);
|
|
1097
|
+
},
|
|
1098
|
+
...h(["screenHeight"])
|
|
1099
|
+
},
|
|
1100
|
+
methods: {
|
|
1101
|
+
handleSubmit() {
|
|
1102
|
+
this.closed(), this.$emit("ok");
|
|
1103
|
+
},
|
|
1104
|
+
open(t) {
|
|
1105
|
+
this.record = t, this.visible = !0, this.selectedRowKeys = [t.id], this.$nextTick(() => {
|
|
1106
|
+
setTimeout(() => {
|
|
1107
|
+
this.$refs.userForm.refresh();
|
|
1108
|
+
}, 0);
|
|
1109
|
+
});
|
|
1110
|
+
},
|
|
1111
|
+
closed() {
|
|
1112
|
+
this.fullscreen = !1, this.visible = !1;
|
|
1113
|
+
},
|
|
1114
|
+
toggleFullscreen() {
|
|
1115
|
+
this.fullscreen = !this.fullscreen;
|
|
1116
|
+
},
|
|
1117
|
+
onSelectChange(t) {
|
|
1118
|
+
this.selectedRowKeys = t;
|
|
1119
|
+
},
|
|
1120
|
+
doEvent(t) {
|
|
1121
|
+
const e = t.item.functionName;
|
|
1122
|
+
this[e] && this[e]();
|
|
1123
|
+
}
|
|
1124
|
+
}
|
|
1125
|
+
};
|
|
1126
|
+
var le = function() {
|
|
1127
|
+
var e = this, s = e._self._c;
|
|
1128
|
+
return s("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(n) {
|
|
1129
|
+
e.visible = n;
|
|
1130
|
+
}, closed: e.closed } }, [s("template", { slot: "title" }, [s("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), s("div", { directives: [{ name: "loading", rawName: "v-loading", value: e.confirmLoading, expression: "confirmLoading" }] }, [e.visible ? s("UserFormDate", { ref: "userForm", attrs: { height: e.height, openMode: "components", openSelecteKeys: e.selectedRowKeys }, on: { onSelectChange: e.onSelectChange } }) : e._e()], 1)], 2);
|
|
1131
|
+
}, oe = [], de = /* @__PURE__ */ u(
|
|
1132
|
+
re,
|
|
1133
|
+
le,
|
|
1134
|
+
oe,
|
|
1135
|
+
!1,
|
|
1136
|
+
null,
|
|
1137
|
+
"085b1df5",
|
|
1138
|
+
null,
|
|
1139
|
+
null
|
|
1140
|
+
);
|
|
1141
|
+
const ce = de.exports;
|
|
1142
|
+
const he = {
|
|
1143
|
+
data() {
|
|
1144
|
+
return {
|
|
1145
|
+
buttons: [
|
|
1146
|
+
{
|
|
1147
|
+
displayName: "\u786E\u5B9A",
|
|
1148
|
+
functionName: "handleSubmit",
|
|
1149
|
+
show: !0,
|
|
1150
|
+
transKey: "gd.btn.confirm",
|
|
1151
|
+
icon: "el-icon-document-checked"
|
|
1152
|
+
}
|
|
1153
|
+
],
|
|
1154
|
+
record: {},
|
|
1155
|
+
visible: !1,
|
|
1156
|
+
confirmLoading: !1,
|
|
1157
|
+
fullscreen: !1,
|
|
1158
|
+
width: "94%",
|
|
1159
|
+
menuTreeData: [],
|
|
1160
|
+
menuTreeDatad: [],
|
|
1161
|
+
checkedKeys: [],
|
|
1162
|
+
list: [],
|
|
1163
|
+
allClose: !1,
|
|
1164
|
+
menuAll: [],
|
|
1165
|
+
systemMenuAll: [],
|
|
1166
|
+
allCheckedKeys: []
|
|
1167
|
+
};
|
|
1168
|
+
},
|
|
1169
|
+
computed: {
|
|
1170
|
+
isIndeterminate() {
|
|
1171
|
+
return this.allClose ? !1 : this.checkedKeys.length > 0;
|
|
1172
|
+
},
|
|
1173
|
+
...h(["screenHeight", "tableLists"])
|
|
1174
|
+
},
|
|
1175
|
+
components: { LayoutItem: b },
|
|
1176
|
+
methods: {
|
|
1177
|
+
async handleSubmit() {
|
|
1178
|
+
const t = (e) => (e = e.filter((s, n) => {
|
|
1179
|
+
const i = this.checkedKeys.filter((r) => s.id === r)[0];
|
|
1180
|
+
return s.type = i ? 1 : 0, s.formlist && s.formlist.length > 0 && (s.formlist = t(s.formlist)), s.viewlist && s.viewlist.length > 0 && (s.viewlist = t(s.viewlist)), s.btnlist && s.btnlist.length > 0 && (s.btnlist = t(s.btnlist)), !0;
|
|
1181
|
+
}), e);
|
|
1182
|
+
this.confirmLoading = !0, await t(this.menuAll), K({
|
|
1183
|
+
roleid: this.record.id,
|
|
1184
|
+
list: this.menuAll
|
|
1185
|
+
}).then((e) => {
|
|
1186
|
+
e.success ? (this.$message.success(this.$i18nt("gd.https.operateSucc", "\u64CD\u4F5C\u6210\u529F")), this.$emit("ok"), this.closed()) : this.$message.error(
|
|
1187
|
+
this.$i18nt("gd.https.operateFail", "\u64CD\u4F5C\u5931\u8D25") + e.message
|
|
1188
|
+
), this.confirmLoading = !1;
|
|
1189
|
+
});
|
|
1190
|
+
},
|
|
1191
|
+
checkedItemBtn(t, e) {
|
|
1192
|
+
let s = [...this.checkedKeys].filter((n) => !t.menuBtnIds.includes(n));
|
|
1193
|
+
e === 1 && (s = s.concat(t.menuBtnIds)), this.checkedKeys = [...s], this.handleItem();
|
|
1194
|
+
},
|
|
1195
|
+
openItem(t) {
|
|
1196
|
+
let e = [...this.menuTreeData];
|
|
1197
|
+
const s = (n) => (n = n.filter((i, r) => (i.id === t.id && (i.open = !i.open), i.children && i.children.length > 0 && (i.children = s(i.children)), !0)), n);
|
|
1198
|
+
s(e), this.menuTreeData = [...e];
|
|
1199
|
+
},
|
|
1200
|
+
changeItem(t, e, s = !0) {
|
|
1201
|
+
let n = [...this.checkedKeys];
|
|
1202
|
+
this.checkedKeys.filter((l) => e.includes(l))[0];
|
|
1203
|
+
const i = this.list.filter((l) => e.includes(l.id))[0], r = s && i ? i.menuIds : [];
|
|
1204
|
+
if (t ? n = this.checkedKeys.concat(e).concat(r) : n = this.checkedKeys.filter((l) => !e.includes(l)).filter((l) => !r.includes(l)), this.checkedKeys = [...n], this.handleItem(), i.menusType === 2)
|
|
1205
|
+
return;
|
|
1206
|
+
let o = [];
|
|
1207
|
+
this.findParent(this.menuTreeData, i, o);
|
|
1208
|
+
let a = [], d = [];
|
|
1209
|
+
o.forEach((l) => {
|
|
1210
|
+
this.checkedKeys.filter((g) => l.menuIds.includes(g)).length === l.menuIds.length && l.menuIds.length > 0 && !l.checked ? a.push(l.id) : d.push(l.id);
|
|
1211
|
+
}), a.forEach((l) => {
|
|
1212
|
+
this.changeItem(!0, [l], !1);
|
|
1213
|
+
}), d.forEach((l) => {
|
|
1214
|
+
this.changeItem(!1, [l], !1);
|
|
1215
|
+
});
|
|
1216
|
+
},
|
|
1217
|
+
handleItem() {
|
|
1218
|
+
let t = [...this.menuTreeData];
|
|
1219
|
+
const e = (s) => (s = s.filter((n, i) => {
|
|
1220
|
+
const r = this.checkedKeys.filter((o) => n.menuIds.includes(o));
|
|
1221
|
+
return this.checkedKeys.includes(n.id) ? (n.checked = !0, n.isIndeterminate = !1) : (n.checked = !1, n.isIndeterminate = r.length > 0 && n.menuIds.length > 0), n.children && n.children.length > 0 && (n.children = e(n.children)), !0;
|
|
1222
|
+
}), s);
|
|
1223
|
+
e(t), this.menuTreeData = [...t], this.allClose = this.checkedKeys.length === this.allCheckedKeys.length && this.allCheckedKeys.length > 0;
|
|
1224
|
+
},
|
|
1225
|
+
changeAll(t) {
|
|
1226
|
+
t ? this.checkedKeys = [...this.allCheckedKeys] : this.checkedKeys = [], this.handleItem();
|
|
1227
|
+
},
|
|
1228
|
+
init() {
|
|
1229
|
+
this.confirmLoading = !0, Promise.all([this.getList()]).then(async (t) => {
|
|
1230
|
+
this.confirmLoading = !1;
|
|
1231
|
+
let e = JSON.parse(JSON.stringify(this.menuTreeDatad)), s = [];
|
|
1232
|
+
const n = (r) => (r = r.filter((o, a) => {
|
|
1233
|
+
const d = this.checkedKeys.filter((l) => o.id === l)[0];
|
|
1234
|
+
return o.open = !0, o.checked = o.menusType === 1 ? !!d : !1, o.isIndeterminate = !1, s.push(o), o.children && o.children.length > 0 && (o.children = n(o.children)), !0;
|
|
1235
|
+
}), r);
|
|
1236
|
+
await n(e);
|
|
1237
|
+
let i = [];
|
|
1238
|
+
s.forEach((r, o) => {
|
|
1239
|
+
const a = this.getMenuIds(r);
|
|
1240
|
+
s[o].menuIds = a.arr, s[o].menuBtnIds = a.btn, !(this.checkedKeys.filter((c) => a.arr.includes(c)).length === a.arr.length) && a.arr.length > 0 && i.push(r.id);
|
|
1241
|
+
}), this.list = s, this.allClose = this.checkedKeys.length === this.allCheckedKeys.length && this.allCheckedKeys.length > 0, this.menuTreeData = [...e], this.handleItem(), console.log(this.menuAll, "123");
|
|
1242
|
+
});
|
|
1243
|
+
},
|
|
1244
|
+
getList() {
|
|
1245
|
+
return k({ roleId: this.record.id }).then((t) => {
|
|
1246
|
+
if (t.code === 200) {
|
|
1247
|
+
let e = [], s = [];
|
|
1248
|
+
const n = (r, o) => (r = r.filter((a, d) => {
|
|
1249
|
+
a.parentId = o, a.open = !0, a.checked = !1, a.isIndeterminate = !1, a.transkey = a.transkey ? a.transkey : null, a.title = a.name, a.menusType = a.formlist && a.viewlist ? 0 : a.btnlist ? 1 : 2, s.push(a.id), a.type === 1 && e.push(a.id);
|
|
1250
|
+
let l = [];
|
|
1251
|
+
return a.viewlist && a.viewlist.length > 0 && (a.viewlist.map((c) => (c.iconClass = "gd-icon-shitumoshi", c)), l = l.concat(a.viewlist)), a.formlist && a.formlist.length > 0 && (a.formlist.map((c) => (c.iconClass = "gd-icon-biaodanmoshi", c)), l = l.concat(a.formlist)), a.btnlist && a.btnlist.length > 0 && (l = l.concat(a.btnlist)), l.length > 0 && (a.children = n(l, a.id)), !0;
|
|
1252
|
+
}), r);
|
|
1253
|
+
this.menuAll = t.data.list;
|
|
1254
|
+
let i = JSON.parse(JSON.stringify(this.menuAll));
|
|
1255
|
+
n(i, 0), this.checkedKeys = e, this.allCheckedKeys = s, this.menuTreeDatad = [...i];
|
|
1256
|
+
}
|
|
1257
|
+
return t;
|
|
1258
|
+
});
|
|
1259
|
+
},
|
|
1260
|
+
getMenuIds(t) {
|
|
1261
|
+
let e = [], s = [];
|
|
1262
|
+
const n = (i) => (i = i.filter((r, o) => (r.menusType !== 2 ? e.push(r.id) : s.push(r.id), r.children && r.children.length > 0 && (r.children = n(r.children)), !0)), i);
|
|
1263
|
+
return t.children && n(t.children), { arr: e, btn: s };
|
|
1264
|
+
},
|
|
1265
|
+
findParent(t, e, s) {
|
|
1266
|
+
for (let n of t)
|
|
1267
|
+
if (n.id === e.parentId || n.children && n.children.length > 0 && this.findParent(n.children, e, s))
|
|
1268
|
+
return s.unshift(n), !0;
|
|
1269
|
+
return !1;
|
|
1270
|
+
},
|
|
1271
|
+
open(t) {
|
|
1272
|
+
this.record = t, this.visible = !0, this.init();
|
|
1273
|
+
},
|
|
1274
|
+
closed() {
|
|
1275
|
+
this.fullscreen = !1, this.visible = !1, this.menuTreeData = [], this.checkedKeys = [];
|
|
1276
|
+
},
|
|
1277
|
+
toggleFullscreen() {
|
|
1278
|
+
this.fullscreen = !this.fullscreen;
|
|
1279
|
+
},
|
|
1280
|
+
doEvent(t) {
|
|
1281
|
+
const e = t.item.functionName;
|
|
1282
|
+
this[e] && this[e]();
|
|
1283
|
+
}
|
|
1284
|
+
}
|
|
1285
|
+
};
|
|
1286
|
+
var ue = function() {
|
|
1287
|
+
var e = this, s = e._self._c;
|
|
1288
|
+
return s("div", [s("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(n) {
|
|
1289
|
+
e.visible = n;
|
|
1290
|
+
}, closed: e.closed } }, [s("template", { slot: "title" }, [s("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), s("div", { directives: [{ name: "loading", rawName: "v-loading", value: e.confirmLoading, expression: "confirmLoading" }], staticStyle: { "min-height": "400px" } }, [e.visible ? s("LayoutItem", { attrs: { record: e.menuTreeData, checkedKeys: e.checkedKeys }, on: { open: e.openItem, change: e.changeItem, checkedBtn: e.checkedItemBtn } }) : e._e()], 1), s("template", { slot: "footer" }, [s("div", { staticClass: "btoms" }, [s("el-checkbox", { attrs: { disabled: e.confirmLoading, indeterminate: e.isIndeterminate }, on: { change: e.changeAll }, model: { value: e.allClose, callback: function(n) {
|
|
1291
|
+
e.allClose = n;
|
|
1292
|
+
}, expression: "allClose" } }, [e._v(" " + e._s(e.$i18nt("gd.btn.selectAll", "\u5168\u9009")) + " ")])], 1)])], 2)], 1);
|
|
1293
|
+
}, ge = [], fe = /* @__PURE__ */ u(
|
|
1294
|
+
he,
|
|
1295
|
+
ue,
|
|
1296
|
+
ge,
|
|
1297
|
+
!1,
|
|
1298
|
+
null,
|
|
1299
|
+
"2fa6bf14",
|
|
1300
|
+
null,
|
|
1301
|
+
null
|
|
1302
|
+
);
|
|
1303
|
+
const pe = fe.exports;
|
|
1304
|
+
const me = {
|
|
1305
|
+
name: "GdRole",
|
|
1306
|
+
props: {
|
|
1307
|
+
height: {
|
|
1308
|
+
type: Number,
|
|
1309
|
+
default: 100
|
|
1310
|
+
},
|
|
1311
|
+
openMode: {
|
|
1312
|
+
type: String,
|
|
1313
|
+
default: "page"
|
|
1314
|
+
},
|
|
1315
|
+
openSelecteKeys: {
|
|
1316
|
+
type: Array,
|
|
1317
|
+
default: () => []
|
|
1318
|
+
}
|
|
1319
|
+
},
|
|
1320
|
+
mixins: [m, B],
|
|
1321
|
+
data() {
|
|
1322
|
+
return {
|
|
1323
|
+
transKey: "gd.btn.add",
|
|
1324
|
+
formLoading: !1,
|
|
1325
|
+
loading: !0,
|
|
1326
|
+
selectedRowKeys: [],
|
|
1327
|
+
selectedRows: [],
|
|
1328
|
+
queryParam: {},
|
|
1329
|
+
loadData: (t) => (this.selectedKeep && (this.selectedRowKeys = [...this.openSelecteKeys]), w(Object.assign(t, this.queryParam, { sysAppsId: window.$systemInfo.id })).then((e) => e.data))
|
|
1330
|
+
};
|
|
1331
|
+
},
|
|
1332
|
+
components: { RoleGrant: H, RoleMenu: ee, RoleMenuViewForm: pe, UserAuthorization: ce },
|
|
1333
|
+
computed: {
|
|
1334
|
+
initialLoading() {
|
|
1335
|
+
return this.openMode === "page";
|
|
1336
|
+
},
|
|
1337
|
+
selectedKeep() {
|
|
1338
|
+
return this.openMode !== "page";
|
|
1339
|
+
},
|
|
1340
|
+
getFormColumns() {
|
|
1341
|
+
return this.formColumns.filter((t) => (t.prop === "code" && (t.disabled = this.transKey !== "gd.btn.add"), !(this.transKey === "gd.https.copy" && t.prop === "code")));
|
|
1342
|
+
},
|
|
1343
|
+
getHeight() {
|
|
1344
|
+
return this.height;
|
|
1345
|
+
},
|
|
1346
|
+
...h(["tablePageSize", "tableSize", "labelPosition", "formMode"])
|
|
1347
|
+
},
|
|
1348
|
+
methods: {
|
|
1349
|
+
userAuthorizationMenu() {
|
|
1350
|
+
if (this.selectedRowKeys.length === 0) {
|
|
1351
|
+
this.$message.warning(this.$i18nt("gd.https.editTip", "\u8BF7\u9009\u62E9\u9700\u8981\u7F16\u8F91\u7684\u6570\u636E!"));
|
|
1352
|
+
return;
|
|
1353
|
+
}
|
|
1354
|
+
if (this.selectedRowKeys.length > 1) {
|
|
1355
|
+
this.$message.warning(this.$i18nt("gd.https.editTipOne", "\u53EA\u80FD\u9009\u62E9\u4E00\u6761\u6570\u636E\u7F16\u8F91!"));
|
|
1356
|
+
return;
|
|
1357
|
+
}
|
|
1358
|
+
this.$refs.userAuthorization.open(this.selectedRows[0]);
|
|
1359
|
+
},
|
|
1360
|
+
grantRoleMenu() {
|
|
1361
|
+
if (this.selectedRowKeys.length === 0) {
|
|
1362
|
+
this.$message.warning(this.$i18nt("gd.https.editTip", "\u8BF7\u9009\u62E9\u9700\u8981\u7F16\u8F91\u7684\u6570\u636E!"));
|
|
1363
|
+
return;
|
|
1364
|
+
}
|
|
1365
|
+
if (this.selectedRowKeys.length > 1) {
|
|
1366
|
+
this.$message.warning(this.$i18nt("gd.https.editTipOne", "\u53EA\u80FD\u9009\u62E9\u4E00\u6761\u6570\u636E\u7F16\u8F91!"));
|
|
1367
|
+
return;
|
|
1368
|
+
}
|
|
1369
|
+
this.$refs.roleMenu.open(this.selectedRows[0]);
|
|
1370
|
+
},
|
|
1371
|
+
grantRoleGrant() {
|
|
1372
|
+
if (this.selectedRowKeys.length === 0) {
|
|
1373
|
+
this.$message.warning(this.$i18nt("gd.https.editTip", "\u8BF7\u9009\u62E9\u9700\u8981\u7F16\u8F91\u7684\u6570\u636E!"));
|
|
1374
|
+
return;
|
|
1375
|
+
}
|
|
1376
|
+
if (this.selectedRowKeys.length > 1) {
|
|
1377
|
+
this.$message.warning(this.$i18nt("gd.https.editTipOne", "\u53EA\u80FD\u9009\u62E9\u4E00\u6761\u6570\u636E\u7F16\u8F91!"));
|
|
1378
|
+
return;
|
|
1379
|
+
}
|
|
1380
|
+
this.$refs.roleGrant.open(this.selectedRows[0]);
|
|
1381
|
+
},
|
|
1382
|
+
grantRoleVF() {
|
|
1383
|
+
if (this.selectedRowKeys.length === 0) {
|
|
1384
|
+
this.$message.warning(this.$i18nt("gd.https.editTip", "\u8BF7\u9009\u62E9\u9700\u8981\u7F16\u8F91\u7684\u6570\u636E!"));
|
|
1385
|
+
return;
|
|
1386
|
+
}
|
|
1387
|
+
if (this.selectedRowKeys.length > 1) {
|
|
1388
|
+
this.$message.warning(this.$i18nt("gd.https.editTipOne", "\u53EA\u80FD\u9009\u62E9\u4E00\u6761\u6570\u636E\u7F16\u8F91!"));
|
|
1389
|
+
return;
|
|
1390
|
+
}
|
|
1391
|
+
this.$refs.roleMenuViewForm.open(this.selectedRows[0]);
|
|
1392
|
+
},
|
|
1393
|
+
saveQueries(t) {
|
|
1394
|
+
this.queryParam = { ...t }, this.refresh();
|
|
1395
|
+
},
|
|
1396
|
+
refresh() {
|
|
1397
|
+
this.$refs.table.refresh();
|
|
1398
|
+
},
|
|
1399
|
+
editForm(t) {
|
|
1400
|
+
this.transKey = "gd.btn.edit", this.$refs.editForm.open(t);
|
|
1401
|
+
},
|
|
1402
|
+
del() {
|
|
1403
|
+
if (this.selectedRowKeys.length === 0) {
|
|
1404
|
+
this.$message.warning(this.$i18nt("gd.https.delTip", "\u8BF7\u9009\u62E9\u8981\u5220\u9664\u7684\u6570\u636E!"));
|
|
1405
|
+
return;
|
|
1406
|
+
}
|
|
1407
|
+
this.$confirm(this.$i18nt("gd.https.delContent", "\u662F\u5426\u5220\u9664\u9009\u4E2D\u6570\u636E?"), this.$i18nt("gd.https.delTitle", "\u6E29\u99A8\u63D0\u793A"), {
|
|
1408
|
+
confirmButtonText: this.$i18nt("gd.https.delOk", "\u786E\u5B9A\u5220\u9664"),
|
|
1409
|
+
cancelButtonText: this.$i18nt("gd.https.delCancel", "\u53D6\u6D88"),
|
|
1410
|
+
showClose: !1,
|
|
1411
|
+
confirmButtonLoading: !1,
|
|
1412
|
+
cancelButtonLoading: !1,
|
|
1413
|
+
closeOnClickModal: !1,
|
|
1414
|
+
type: "warning",
|
|
1415
|
+
confirmButtonClass: "el-button--danger",
|
|
1416
|
+
customClass: "custom-alert",
|
|
1417
|
+
callback: () => {
|
|
1418
|
+
},
|
|
1419
|
+
beforeClose: (t, e, s) => {
|
|
1420
|
+
this.delHand(t, e, s);
|
|
1421
|
+
}
|
|
1422
|
+
});
|
|
1423
|
+
},
|
|
1424
|
+
delHand(t, e, s) {
|
|
1425
|
+
if (t !== "confirm") {
|
|
1426
|
+
s();
|
|
1427
|
+
return;
|
|
1428
|
+
}
|
|
1429
|
+
let n = [];
|
|
1430
|
+
this.selectedRows.forEach((i) => {
|
|
1431
|
+
let r = $(i).then((o) => o);
|
|
1432
|
+
n.push(r);
|
|
1433
|
+
}), e.confirmButtonLoading = !0, e.cancelButtonLoading = !0, e.showCancelButton = !1, Promise.all(n).then((i) => {
|
|
1434
|
+
const r = i.filter((o) => !o.success);
|
|
1435
|
+
r.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") + r[0].message), s(), this.refresh(), e.confirmButtonLoading = !1, e.cancelButtonLoading = !1, e.showCancelButton = !0;
|
|
1436
|
+
});
|
|
1437
|
+
},
|
|
1438
|
+
add() {
|
|
1439
|
+
this.transKey = "gd.btn.add", this.$refs.editForm.open(null);
|
|
1440
|
+
},
|
|
1441
|
+
edit() {
|
|
1442
|
+
if (this.selectedRowKeys.length === 0) {
|
|
1443
|
+
this.$message.warning(this.$i18nt("gd.https.editTip", "\u8BF7\u9009\u62E9\u9700\u8981\u7F16\u8F91\u7684\u6570\u636E!"));
|
|
1444
|
+
return;
|
|
1445
|
+
}
|
|
1446
|
+
if (this.selectedRowKeys.length > 1) {
|
|
1447
|
+
this.$message.warning(this.$i18nt("gd.https.editTipOne", "\u53EA\u80FD\u9009\u62E9\u4E00\u6761\u6570\u636E\u7F16\u8F91!"));
|
|
1448
|
+
return;
|
|
1449
|
+
}
|
|
1450
|
+
this.editForm(this.selectedRows[0]);
|
|
1451
|
+
},
|
|
1452
|
+
copy() {
|
|
1453
|
+
if (this.selectedRowKeys.length === 0) {
|
|
1454
|
+
this.$message.warning(this.$i18nt("gd.https.editTip", "\u8BF7\u9009\u62E9\u9700\u8981\u7F16\u8F91\u7684\u6570\u636E!"));
|
|
1455
|
+
return;
|
|
1456
|
+
}
|
|
1457
|
+
if (this.selectedRowKeys.length > 1) {
|
|
1458
|
+
this.$message.warning(this.$i18nt("gd.https.editTipOne", "\u53EA\u80FD\u9009\u62E9\u4E00\u6761\u6570\u636E\u7F16\u8F91!"));
|
|
1459
|
+
return;
|
|
1460
|
+
}
|
|
1461
|
+
this.transKey = "gd.https.copy", this.$refs.editForm.open(Object.assign({ ...this.selectedRows[0] }, { roleId: this.selectedRows[0].id }));
|
|
1462
|
+
},
|
|
1463
|
+
sbumit({ data: t, record: e, btn: s }, n, i) {
|
|
1464
|
+
this.formLoading = !0;
|
|
1465
|
+
let r = e ? this.transKey === "gd.https.copy" ? T : C : R;
|
|
1466
|
+
const o = this.transKey !== "gd.https.edit" ? Object.assign(t, { sysappsid: window.$systemInfo.id }) : t;
|
|
1467
|
+
r(o).then((a) => {
|
|
1468
|
+
a.success ? (this.$message.success(this.$i18nt("gd.https.operateSucc", "\u64CD\u4F5C\u6210\u529F")), i(), this.refresh()) : this.$message.error(this.$i18nt("gd.https.operateFail", "\u64CD\u4F5C\u5931\u8D25") + a.message), this.formLoading = !1;
|
|
1469
|
+
});
|
|
1470
|
+
},
|
|
1471
|
+
onSelectChange(t, e) {
|
|
1472
|
+
this.selectedRowKeys = t, this.selectedRows = e, this.$emit("onSelectChange", t, e);
|
|
1473
|
+
},
|
|
1474
|
+
doEvent(t) {
|
|
1475
|
+
let e = t.item.functionName;
|
|
1476
|
+
this[e] && this[e]();
|
|
1477
|
+
}
|
|
1478
|
+
}
|
|
1479
|
+
};
|
|
1480
|
+
var ye = function() {
|
|
1481
|
+
var e = this, s = e._self._c;
|
|
1482
|
+
return s("div", { staticClass: "gd-page-view" }, [s("div", { staticClass: "page-view-list", staticStyle: { padding: "0px" } }, [s("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: n, row: i }) {
|
|
1483
|
+
return [s("gd-tooltip", { attrs: { rowKey: "name", row: i, highlight: "" }, on: { click: e.editForm } })];
|
|
1484
|
+
} }, { key: "operator", fn: function() {
|
|
1485
|
+
return [s("div", { staticClass: "gd-table-operator" }, [s("div", { staticClass: "gd-table-operatorl" }, [s("el-input", { staticClass: "table-operator-input", attrs: { placeholder: e.$i18nt("gd.user.roleName", "\u89D2\u8272\u540D"), clearable: "" }, nativeOn: { keyup: function(n) {
|
|
1486
|
+
return !n.type.indexOf("key") && e._k(n.keyCode, "enter", 13, n.key, "Enter") ? null : e.refresh.apply(null, arguments);
|
|
1487
|
+
} }, model: { value: e.queryParam.name, callback: function(n) {
|
|
1488
|
+
e.$set(e.queryParam, "name", n);
|
|
1489
|
+
}, expression: "queryParam.name" } }), s("div", { staticClass: "table-operator-search", on: { click: e.refresh } }, [s("i", { staticClass: "el-input__icon el-icon-search" })])], 1), s("div", { staticClass: "gd-table-operatorr" }, [e.openMode === "page" ? s("gd-btn-list", { attrs: { sysViewButtons: e.tableButtons }, on: { functionName: e.doEvent } }) : e._e()], 1)])];
|
|
1490
|
+
}, proxy: !0 }, { key: "filtering", fn: function({ colse: n, visible: i }) {
|
|
1491
|
+
return [s("gd-table-queries-field", { attrs: { columns: e.tableQueries, height: e.getHeight, queryParam: e.queryParam, colse: n, visible: i }, on: { save: e.saveQueries } })];
|
|
1492
|
+
} }]) })], 1), s("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 } }), s("RoleGrant", { ref: "roleGrant", on: { ok: e.refresh } }), s("RoleMenu", { ref: "roleMenu", on: { ok: e.refresh } }), s("RoleMenuViewForm", { ref: "roleMenuViewForm", on: { ok: e.refresh } }), s("UserAuthorization", { ref: "userAuthorization", on: { ok: e.refresh } })], 1);
|
|
1493
|
+
}, be = [], ve = /* @__PURE__ */ u(
|
|
1494
|
+
me,
|
|
1495
|
+
ye,
|
|
1496
|
+
be,
|
|
1497
|
+
!1,
|
|
1498
|
+
null,
|
|
1499
|
+
"f2f32578",
|
|
1500
|
+
null,
|
|
1501
|
+
null
|
|
1502
|
+
);
|
|
1503
|
+
const p = ve.exports;
|
|
1504
|
+
p.install = function(t) {
|
|
1505
|
+
t.component(p.name, p);
|
|
1506
|
+
};
|
|
1507
|
+
export {
|
|
1508
|
+
p as G
|
|
1509
|
+
};
|