gds-plus-design-vue 1.2.2 → 1.2.3
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/gd-initial.js +17 -15
- package/lib/gd-initial.mjs +13935 -9453
- package/lib/{main.86fe06d4.mjs → main.05252737.mjs} +2 -2
- package/lib/{main.d091d06d.js → main.458dc0a0.js} +1 -1
- package/lib/{main.2415a49a.js → main.4aebe1c9.js} +1 -1
- package/lib/main.9801708f.js +1 -0
- package/lib/{main.b2d0a309.mjs → main.a30b25d6.mjs} +11 -11
- package/lib/{main.2cddfbbd.mjs → main.eb4b260e.mjs} +2 -2
- package/lib/{messages.2fff74f3.js → messages.30e41348.js} +5 -5
- package/lib/{messages.d8abe18d.mjs → messages.a1335b0f.mjs} +165 -150
- package/lib/style.css +2 -2
- package/lib/{system.account.8ea53681.js → system.account.1ff630c9.js} +1 -1
- package/lib/{system.account.9bc40d08.mjs → system.account.20f9e450.mjs} +9 -9
- package/lib/{system.config.c6e30213.js → system.config.532ab3b8.js} +1 -1
- package/lib/{system.config.8223d495.mjs → system.config.c85c05e9.mjs} +1 -1
- package/lib/{system.datasource.fd6a4e76.js → system.datasource.272f1add.js} +1 -1
- package/lib/{system.datasource.57233650.mjs → system.datasource.f64a59de.mjs} +1 -1
- package/lib/{system.dict.8f95218b.mjs → system.dict.565d69ca.mjs} +3 -3
- package/lib/{system.dict.a24f33b0.js → system.dict.a23e8cdf.js} +1 -1
- package/lib/{system.duplicatechecking.6b706948.mjs → system.duplicatechecking.268544dd.mjs} +1 -1
- package/lib/{system.duplicatechecking.39293985.js → system.duplicatechecking.f66790d1.js} +1 -1
- package/lib/{system.email.a2d9a307.js → system.email.00a93855.js} +1 -1
- package/lib/{system.email.dae988be.mjs → system.email.ada25702.mjs} +1 -1
- package/lib/{system.fieldsecurity.02627a7a.mjs → system.fieldsecurity.d14384cc.mjs} +126 -78
- package/lib/system.fieldsecurity.ede73621.js +1 -0
- package/lib/{system.file.0fa095a9.mjs → system.file.a23b3c83.mjs} +3 -3
- package/lib/system.file.aa567566.js +1 -0
- package/lib/{system.log.acb64505.mjs → system.log.8a9f4a4d.mjs} +1 -1
- package/lib/{system.log.c07ae5db.js → system.log.b3666991.js} +1 -1
- package/lib/system.notice.5fb1485e.js +1 -0
- package/lib/system.notice.6d0aa32c.mjs +1674 -0
- package/lib/{system.noticereceived.1aa70b65.mjs → system.noticereceived.70963f1b.mjs} +32 -24
- package/lib/system.noticereceived.e5ef5883.js +1 -0
- package/lib/{system.onlineuser.1c428d05.js → system.onlineuser.99e4de37.js} +1 -1
- package/lib/{system.onlineuser.3d848a32.mjs → system.onlineuser.c58fb6ce.mjs} +1 -1
- package/lib/system.org.56151be8.js +1 -0
- package/lib/{system.org.fcf96d1e.mjs → system.org.638db6d1.mjs} +17 -68
- package/lib/{system.permissions.23f5b097.mjs → system.permissions.aa0cc0d6.mjs} +2 -2
- package/lib/{system.permissions.a1a9505c.js → system.permissions.fcd56f67.js} +1 -1
- package/lib/{system.plugin.b6de4673.js → system.plugin.b17efa53.js} +1 -1
- package/lib/{system.plugin.e37f9dbc.mjs → system.plugin.beb44900.mjs} +1 -1
- package/lib/{system.pos.1a01fc97.mjs → system.pos.699e8dd6.mjs} +1 -1
- package/lib/{system.pos.a4fb19b0.js → system.pos.e8d9c488.js} +1 -1
- package/lib/{system.promptmanagement.290958b1.js → system.promptmanagement.109a07f5.js} +1 -1
- package/lib/{system.promptmanagement.36a65c51.mjs → system.promptmanagement.2ce3e426.mjs} +1 -1
- package/lib/{system.role.68de93ef.mjs → system.role.230b1445.mjs} +845 -354
- package/lib/system.role.f0d4082c.js +1 -0
- package/lib/{system.sumberrules.dd6299e8.js → system.sumberrules.38017ad1.js} +1 -1
- package/lib/{system.sumberrules.cdef9308.mjs → system.sumberrules.fa1aab86.mjs} +1 -1
- package/lib/{system.team.53d64006.js → system.team.3826e252.js} +1 -1
- package/lib/{system.team.ee652fe4.mjs → system.team.aeaede22.mjs} +1 -1
- package/lib/{system.teammembers.4a3dc336.js → system.teammembers.29128f16.js} +1 -1
- package/lib/{system.teammembers.26a2ba81.mjs → system.teammembers.2e3309c3.mjs} +2 -2
- package/lib/{system.timers.4efa8a7d.mjs → system.timers.0ec63785.mjs} +1 -1
- package/lib/{system.timers.b9424204.js → system.timers.b62568ad.js} +1 -1
- package/lib/{system.translation.21d2fd8b.js → system.translation.887fa90d.js} +1 -1
- package/lib/{system.translation.0a9399b4.mjs → system.translation.e71455aa.mjs} +2 -2
- package/lib/{system.user.4fcfdf99.mjs → system.user.84227a85.mjs} +4 -4
- package/lib/{system.user.d48a08db.js → system.user.bed5f82a.js} +1 -1
- package/lib/{system.useraffiliation.a59ce45b.js → system.useraffiliation.7ec0fcae.js} +1 -1
- package/lib/{system.useraffiliation.fb002239.mjs → system.useraffiliation.b3f03a33.mjs} +2 -2
- package/lib/{system.webresource.4df01c92.mjs → system.webresource.e6cb9173.mjs} +2 -2
- package/lib/{system.webresource.3366cc29.js → system.webresource.f8b78dd0.js} +1 -1
- package/locale/en_US.js +68 -18
- package/locale/id_ID.js +67 -17
- package/locale/vi_VN.js +67 -17
- package/locale/zh_CN.js +67 -17
- package/package.json +1 -1
- package/lib/main.4c447fc3.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.88100f66.js +0 -1
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { s as
|
|
1
|
+
import { s as w, b as $, d as K, c as T, e as C, f as R, h as m, i as L, j as S, g as I, k as x, l as D, m as N, n as P } from "./system.fieldsecurity.d14384cc.mjs";
|
|
2
2
|
import { m as h, n as u } from "./chartbi.cdd1e365.mjs";
|
|
3
|
-
import { t as
|
|
4
|
-
import {
|
|
5
|
-
import { S, b as
|
|
6
|
-
const
|
|
3
|
+
import { t as b } from "./messages.a1335b0f.mjs";
|
|
4
|
+
import { a as v, e as B, f as F } from "./system.notice.6d0aa32c.mjs";
|
|
5
|
+
import { S as M, b as A, d as O, p as E, e as z, f as y } from "./system.account.20f9e450.mjs";
|
|
6
|
+
const j = {
|
|
7
7
|
data() {
|
|
8
8
|
return {
|
|
9
9
|
tableColumns: [
|
|
@@ -20,7 +20,7 @@ const M = {
|
|
|
20
20
|
slotType: "name",
|
|
21
21
|
align: "left",
|
|
22
22
|
fixed: !0,
|
|
23
|
-
renderHeader: (
|
|
23
|
+
renderHeader: (s, ...e) => this.renderHeader(s, ...e, {
|
|
24
24
|
effectType: "input"
|
|
25
25
|
}),
|
|
26
26
|
showOverflowTooltip: !0
|
|
@@ -30,7 +30,7 @@ const M = {
|
|
|
30
30
|
prop: "code",
|
|
31
31
|
label: "\u552F\u4E00\u7F16\u7801",
|
|
32
32
|
align: "left",
|
|
33
|
-
renderHeader: (
|
|
33
|
+
renderHeader: (s, ...e) => this.renderHeader(s, ...e, {
|
|
34
34
|
effectType: "input"
|
|
35
35
|
}),
|
|
36
36
|
showOverflowTooltip: !0
|
|
@@ -147,6 +147,14 @@ const M = {
|
|
|
147
147
|
icon: "el-icon-user",
|
|
148
148
|
name: "sysRole:userMenu"
|
|
149
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
|
+
},
|
|
150
158
|
{
|
|
151
159
|
displayName: "\u6388\u6743\u83DC\u5355",
|
|
152
160
|
functionName: "grantRoleMenu",
|
|
@@ -204,7 +212,7 @@ const M = {
|
|
|
204
212
|
};
|
|
205
213
|
}
|
|
206
214
|
};
|
|
207
|
-
const
|
|
215
|
+
const q = {
|
|
208
216
|
data() {
|
|
209
217
|
return {
|
|
210
218
|
defaultProps: {
|
|
@@ -234,24 +242,24 @@ const A = {
|
|
|
234
242
|
},
|
|
235
243
|
methods: {
|
|
236
244
|
handleSubmit() {
|
|
237
|
-
const
|
|
245
|
+
const s = this.$refs.tree.getCheckedKeys();
|
|
238
246
|
this.$emit(
|
|
239
247
|
"ok",
|
|
240
248
|
Object.assign(
|
|
241
249
|
{ ...this.record },
|
|
242
250
|
{
|
|
243
|
-
checkedKeys:
|
|
251
|
+
checkedKeys: s
|
|
244
252
|
}
|
|
245
253
|
)
|
|
246
254
|
), this.closed();
|
|
247
255
|
},
|
|
248
256
|
getOrgData() {
|
|
249
|
-
this.confirmLoading = !0,
|
|
250
|
-
|
|
257
|
+
this.confirmLoading = !0, v().then((s) => {
|
|
258
|
+
s.success && (this.orgTreeData = s.data, this.confirmLoading = !1);
|
|
251
259
|
});
|
|
252
260
|
},
|
|
253
|
-
open(
|
|
254
|
-
this.record =
|
|
261
|
+
open(s) {
|
|
262
|
+
this.record = s, this.checkedKeys = s.checkedKeys, this.visible = !0, this.getOrgData();
|
|
255
263
|
},
|
|
256
264
|
closed() {
|
|
257
265
|
this.fullscreen = !1, this.visible = !1;
|
|
@@ -259,29 +267,29 @@ const A = {
|
|
|
259
267
|
toggleFullscreen() {
|
|
260
268
|
this.fullscreen = !this.fullscreen;
|
|
261
269
|
},
|
|
262
|
-
doEvent(
|
|
263
|
-
const e =
|
|
270
|
+
doEvent(s) {
|
|
271
|
+
const e = s.item.functionName;
|
|
264
272
|
this[e] && this[e]();
|
|
265
273
|
}
|
|
266
274
|
}
|
|
267
275
|
};
|
|
268
|
-
var
|
|
269
|
-
var e = this,
|
|
270
|
-
return
|
|
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(n) {
|
|
271
279
|
e.visible = n;
|
|
272
|
-
}, closed: e.closed } }, [
|
|
273
|
-
},
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
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,
|
|
277
285
|
!1,
|
|
278
286
|
null,
|
|
279
287
|
"2b164094",
|
|
280
288
|
null,
|
|
281
289
|
null
|
|
282
290
|
);
|
|
283
|
-
const
|
|
284
|
-
const
|
|
291
|
+
const U = H.exports;
|
|
292
|
+
const J = {
|
|
285
293
|
data() {
|
|
286
294
|
return {
|
|
287
295
|
buttons: [
|
|
@@ -300,7 +308,7 @@ const q = {
|
|
|
300
308
|
width: "94%",
|
|
301
309
|
loadData: [],
|
|
302
310
|
submitData: {},
|
|
303
|
-
loadSoData: (
|
|
311
|
+
loadSoData: (s) => (this.confirmLoading = !0, new Promise((e, t) => {
|
|
304
312
|
this.confirmLoading = !1, e({ pageNo: 1, pageSize: 500, totalRows: 0, rows: this.loadData });
|
|
305
313
|
})),
|
|
306
314
|
columns: [
|
|
@@ -377,7 +385,7 @@ const q = {
|
|
|
377
385
|
currentList: {}
|
|
378
386
|
};
|
|
379
387
|
},
|
|
380
|
-
components: { RoleScope:
|
|
388
|
+
components: { RoleScope: U },
|
|
381
389
|
computed: {
|
|
382
390
|
height() {
|
|
383
391
|
return this.screenHeight - (this.fullscreen ? 120 : 310);
|
|
@@ -387,86 +395,86 @@ const q = {
|
|
|
387
395
|
methods: {
|
|
388
396
|
handleSubmit() {
|
|
389
397
|
this.confirmLoading = !0;
|
|
390
|
-
let
|
|
391
|
-
|
|
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(
|
|
392
400
|
Object.assign(
|
|
393
401
|
{ ...this.submitData },
|
|
394
402
|
{
|
|
395
|
-
grants:
|
|
403
|
+
grants: s
|
|
396
404
|
}
|
|
397
405
|
)
|
|
398
406
|
).then((e) => {
|
|
399
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);
|
|
400
408
|
});
|
|
401
409
|
},
|
|
402
|
-
setRoleScop(
|
|
410
|
+
setRoleScop(s) {
|
|
403
411
|
this.confirmLoading = !0;
|
|
404
412
|
const e = this.$refs.table.tableData;
|
|
405
|
-
e[
|
|
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"));
|
|
406
414
|
},
|
|
407
|
-
openList(
|
|
408
|
-
const n = this.$refs.table.tableData, i = `${
|
|
409
|
-
this.$refs.roleScope.open({ index:
|
|
415
|
+
openList(s, e, t) {
|
|
416
|
+
const n = this.$refs.table.tableData, i = `${s.prop.replace("grantd", "")}custom`, a = n[t][i], l = a ? a.split(",").map(Number) : [];
|
|
417
|
+
this.$refs.roleScope.open({ index: t, item: s, checkedKeys: l, data: e, name: i });
|
|
410
418
|
},
|
|
411
419
|
getUserControlData() {
|
|
412
|
-
this.confirmLoading = !0,
|
|
413
|
-
|
|
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(() => {
|
|
414
422
|
setTimeout(() => {
|
|
415
423
|
this.refresh(), this.confirmLoading = !0;
|
|
416
424
|
}, 1e3), setTimeout(() => {
|
|
417
425
|
this.confirmLoading = !1;
|
|
418
426
|
}, 1200);
|
|
419
|
-
})) : (this.$message.error(
|
|
427
|
+
})) : (this.$message.error(s.message), this.confirmLoading = !1);
|
|
420
428
|
});
|
|
421
429
|
},
|
|
422
|
-
open(
|
|
423
|
-
this.record =
|
|
430
|
+
open(s) {
|
|
431
|
+
this.record = s, this.visible = !0, this.getUserControlData();
|
|
424
432
|
},
|
|
425
433
|
closed() {
|
|
426
434
|
this.fullscreen = !1, this.visible = !1;
|
|
427
435
|
},
|
|
428
|
-
refresh(
|
|
429
|
-
this.$refs.table ? this.$refs.table.refresh(
|
|
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");
|
|
430
438
|
},
|
|
431
|
-
getDictionary(
|
|
432
|
-
return this.$options.filters.dictData(
|
|
439
|
+
getDictionary(s) {
|
|
440
|
+
return this.$options.filters.dictData(s);
|
|
433
441
|
},
|
|
434
442
|
toggleFullscreen() {
|
|
435
443
|
this.fullscreen = !this.fullscreen;
|
|
436
444
|
},
|
|
437
|
-
doEvent(
|
|
438
|
-
const e =
|
|
445
|
+
doEvent(s) {
|
|
446
|
+
const e = s.item.functionName;
|
|
439
447
|
this[e] && this[e]();
|
|
440
448
|
}
|
|
441
449
|
}
|
|
442
450
|
};
|
|
443
|
-
var
|
|
444
|
-
var e = this,
|
|
445
|
-
return
|
|
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(n) {
|
|
446
454
|
e.visible = n;
|
|
447
|
-
}, closed: e.closed } }, [
|
|
448
|
-
return { key: n.prop, fn: function({ column: i, row:
|
|
449
|
-
return [n.prop === "sysCodeGenName" ?
|
|
450
|
-
e.$set(
|
|
451
|
-
}, expression: "row[item.prop]" } }, [e._l(e.getDictionary("data_scope_type"), function(
|
|
452
|
-
return [
|
|
453
|
-
})], 2),
|
|
454
|
-
return e.openList(n,
|
|
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(n) {
|
|
456
|
+
return { key: n.prop, fn: function({ column: i, row: a, index: l }) {
|
|
457
|
+
return [n.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[n.prop], callback: function(r) {
|
|
458
|
+
e.$set(a, n.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[n.prop].includes("5") ? t("el-button", { staticClass: "active-color flex-center", attrs: { type: "text" }, on: { click: function(r) {
|
|
462
|
+
return e.openList(n, a, l);
|
|
455
463
|
} } }, [e._v(" " + e._s(e.$i18nt("gd.btn.view", "\u67E5\u770B")) + " ")]) : e._e()], 1)];
|
|
456
464
|
} };
|
|
457
|
-
})], null, !0) }) : e._e()], 1)], 2),
|
|
458
|
-
},
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
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,
|
|
462
470
|
!1,
|
|
463
471
|
null,
|
|
464
472
|
"39b91bb5",
|
|
465
473
|
null,
|
|
466
474
|
null
|
|
467
475
|
);
|
|
468
|
-
const
|
|
469
|
-
const
|
|
476
|
+
const Y = X.exports;
|
|
477
|
+
const Z = {
|
|
470
478
|
name: "LayoutItem",
|
|
471
479
|
props: {
|
|
472
480
|
record: {
|
|
@@ -491,58 +499,58 @@ const U = {
|
|
|
491
499
|
...h(["primaryColor"])
|
|
492
500
|
},
|
|
493
501
|
methods: {
|
|
494
|
-
hasAll(
|
|
495
|
-
return !(this.checkedKeys.filter((
|
|
502
|
+
hasAll(s) {
|
|
503
|
+
return !(this.checkedKeys.filter((t) => s.menuBtnIds.includes(t)).length >= s.menuBtnIds.length);
|
|
496
504
|
},
|
|
497
|
-
checkedBtn(
|
|
498
|
-
this.$emit("checkedBtn",
|
|
505
|
+
checkedBtn(s, e) {
|
|
506
|
+
this.$emit("checkedBtn", s, e);
|
|
499
507
|
},
|
|
500
|
-
change(
|
|
501
|
-
this.$emit("change",
|
|
508
|
+
change(s, e) {
|
|
509
|
+
this.$emit("change", s, e);
|
|
502
510
|
},
|
|
503
|
-
open(
|
|
504
|
-
this.$emit("open",
|
|
511
|
+
open(s) {
|
|
512
|
+
this.$emit("open", s);
|
|
505
513
|
},
|
|
506
|
-
checked(
|
|
507
|
-
return !!this.checkedKeys.filter((
|
|
514
|
+
checked(s) {
|
|
515
|
+
return !!this.checkedKeys.filter((t) => t === s.id)[0];
|
|
508
516
|
},
|
|
509
|
-
fadeColor(
|
|
510
|
-
let
|
|
511
|
-
return `rgba(${
|
|
517
|
+
fadeColor(s, e) {
|
|
518
|
+
let t = parseInt(s.substring(1, 3), 16), n = parseInt(s.substring(3, 5), 16), i = parseInt(s.substring(5, 7), 16);
|
|
519
|
+
return `rgba(${t},${n},${i},${e})`;
|
|
512
520
|
}
|
|
513
521
|
}
|
|
514
522
|
};
|
|
515
|
-
var
|
|
516
|
-
var e = this,
|
|
517
|
-
return
|
|
518
|
-
return [
|
|
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(n) {
|
|
526
|
+
return [t("div", { staticClass: "list-item" }, [e.menusType === 0 ? t("i", { class: n.open ? "el-icon-caret-bottom" : "el-icon-caret-right", on: { click: function(i) {
|
|
519
527
|
return e.open(n);
|
|
520
|
-
} } }) : e._e(), e.menusType !== 2 ?
|
|
528
|
+
} } }) : e._e(), e.menusType !== 2 ? t("div", { staticClass: "item-name" }, [t("el-checkbox", { attrs: { indeterminate: n.isIndeterminate }, on: { change: function(i) {
|
|
521
529
|
return e.change(i, [n.id]);
|
|
522
530
|
} }, model: { value: n.checked, callback: function(i) {
|
|
523
531
|
e.$set(n, "checked", i);
|
|
524
|
-
}, expression: "item.checked" } }, [n.iconClass ?
|
|
532
|
+
}, expression: "item.checked" } }, [n.iconClass ? t("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 ? t("el-button", { staticStyle: { "margin-left": "12px", padding: "5px 15px" }, attrs: { size: "mini" } }, [e.hasAll(n) ? t("span", { on: { click: function(i) {
|
|
525
533
|
return e.checkedBtn(n, 1);
|
|
526
|
-
} } }, [e._v(" " + e._s(e.$i18nt("gd.btn.selectAll", "\u5168\u9009")) + " ")]) :
|
|
534
|
+
} } }, [e._v(" " + e._s(e.$i18nt("gd.btn.selectAll", "\u5168\u9009")) + " ")]) : t("span", { on: { click: function(i) {
|
|
527
535
|
return e.checkedBtn(n, 0);
|
|
528
|
-
} } }, [e._v(" " + e._s(e.$i18nt("gd.btn.cancel", "\u53D6\u6D88")) + " ")])]) : e._e()], 1) : e._e(),
|
|
529
|
-
return [
|
|
536
|
+
} } }, [e._v(" " + e._s(e.$i18nt("gd.btn.cancel", "\u53D6\u6D88")) + " ")])]) : e._e()], 1) : e._e(), t("div", { staticClass: "item-data" }, [n.children && n.children.length > 0 && n.children[0].menusType === 2 ? t("div", { staticClass: "item-data-list" }, [e._l(n.children, function(i) {
|
|
537
|
+
return [t("div", { staticClass: "item-name item-named", on: { click: function(a) {
|
|
530
538
|
return e.change(!i.checked, [i.id]);
|
|
531
|
-
} } }, [i.checked ?
|
|
532
|
-
})], 2) : e._e()])]), n.children && n.children.length > 0 && n.children[0].menusType !== 2 ?
|
|
539
|
+
} } }, [i.checked ? t("i", { staticClass: "gd-icons gd-icon-quanxuan active-color" }) : t("div", { staticClass: "item-named-kuang" }), t("div", { staticClass: "item-named-title", class: i.checked ? "active-color" : "" }, [e._v(" " + e._s(e.$i18nt(`Dynamics.${i.transkey}`, i.title)) + " ")])])];
|
|
540
|
+
})], 2) : e._e()])]), n.children && n.children.length > 0 && n.children[0].menusType !== 2 ? t("div", { staticClass: "list-more" }, [n.open ? t("LayoutItem", { attrs: { record: n.children, checkedKeys: e.checkedKeys }, on: { open: e.open, change: e.change, checkedBtn: e.checkedBtn } }) : e._e()], 1) : e._e()];
|
|
533
541
|
})], 2);
|
|
534
|
-
},
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
542
|
+
}, te = [], se = /* @__PURE__ */ u(
|
|
543
|
+
Z,
|
|
544
|
+
ee,
|
|
545
|
+
te,
|
|
538
546
|
!1,
|
|
539
547
|
null,
|
|
540
548
|
"53cbc9f1",
|
|
541
549
|
null,
|
|
542
550
|
null
|
|
543
551
|
);
|
|
544
|
-
const
|
|
545
|
-
const
|
|
552
|
+
const _ = se.exports;
|
|
553
|
+
const ne = {
|
|
546
554
|
data() {
|
|
547
555
|
return {
|
|
548
556
|
buttons: [
|
|
@@ -575,95 +583,95 @@ const X = {
|
|
|
575
583
|
},
|
|
576
584
|
...h(["screenHeight", "tableLists"])
|
|
577
585
|
},
|
|
578
|
-
components: { LayoutItem:
|
|
586
|
+
components: { LayoutItem: _ },
|
|
579
587
|
methods: {
|
|
580
588
|
handleSubmit() {
|
|
581
|
-
this.confirmLoading = !0,
|
|
589
|
+
this.confirmLoading = !0, w({
|
|
582
590
|
id: this.record.id,
|
|
583
591
|
grantmenuidlist: this.checkedKeys
|
|
584
|
-
}).then((
|
|
585
|
-
|
|
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;
|
|
586
594
|
});
|
|
587
595
|
},
|
|
588
|
-
checkedItemBtn(
|
|
589
|
-
let
|
|
590
|
-
e === 1 && (
|
|
596
|
+
checkedItemBtn(s, e) {
|
|
597
|
+
let t = [...this.checkedKeys].filter((n) => !s.menuBtnIds.includes(n));
|
|
598
|
+
e === 1 && (t = t.concat(s.menuBtnIds)), this.checkedKeys = [...t], this.handleItem();
|
|
591
599
|
},
|
|
592
|
-
openItem(
|
|
600
|
+
openItem(s) {
|
|
593
601
|
let e = [...this.menuTreeData];
|
|
594
|
-
const
|
|
595
|
-
|
|
602
|
+
const t = (n) => (n = n.filter((i, a) => (i.id === s.id && (i.open = !i.open), i.children && i.children.length > 0 && (i.children = t(i.children)), !0)), n);
|
|
603
|
+
t(e), this.menuTreeData = [...e];
|
|
596
604
|
},
|
|
597
|
-
changeItem(
|
|
605
|
+
changeItem(s, e, t = !0) {
|
|
598
606
|
let n = [...this.checkedKeys];
|
|
599
|
-
this.checkedKeys.filter((
|
|
600
|
-
const i = this.list.filter((
|
|
601
|
-
if (
|
|
607
|
+
this.checkedKeys.filter((o) => e.includes(o))[0];
|
|
608
|
+
const i = this.list.filter((o) => e.includes(o.id))[0], a = t && i ? i.menuIds : [];
|
|
609
|
+
if (s ? n = this.checkedKeys.concat(e).concat(a) : n = this.checkedKeys.filter((o) => !e.includes(o)).filter((o) => !a.includes(o)), this.checkedKeys = [...n], this.handleItem(), i.menusType === 2)
|
|
602
610
|
return;
|
|
603
|
-
let
|
|
604
|
-
this.findParent(this.menuTreeData, i,
|
|
605
|
-
let
|
|
606
|
-
|
|
607
|
-
this.checkedKeys.filter((g) =>
|
|
608
|
-
}),
|
|
609
|
-
this.changeItem(!0, [
|
|
610
|
-
}), d.forEach((
|
|
611
|
-
this.changeItem(!1, [
|
|
611
|
+
let l = [];
|
|
612
|
+
this.findParent(this.menuTreeData, i, 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);
|
|
612
620
|
});
|
|
613
621
|
},
|
|
614
622
|
handleItem() {
|
|
615
|
-
let
|
|
616
|
-
const e = (
|
|
617
|
-
const
|
|
618
|
-
return this.checkedKeys.includes(n.id) ? (n.checked = !0, n.isIndeterminate = !1) : (n.checked = !1, n.isIndeterminate =
|
|
619
|
-
}),
|
|
620
|
-
e(
|
|
623
|
+
let s = [...this.menuTreeData];
|
|
624
|
+
const e = (t) => (t = t.filter((n, i) => {
|
|
625
|
+
const a = this.checkedKeys.filter((l) => n.menuIds.includes(l));
|
|
626
|
+
return this.checkedKeys.includes(n.id) ? (n.checked = !0, n.isIndeterminate = !1) : (n.checked = !1, n.isIndeterminate = a.length > 0 && n.menuIds.length > 0), n.children && n.children.length > 0 && (n.children = e(n.children)), !0;
|
|
627
|
+
}), t);
|
|
628
|
+
e(s), this.menuTreeData = [...s], this.allClose = this.checkedKeys.length === this.allCheckedKeys.length && this.allCheckedKeys.length > 0;
|
|
621
629
|
},
|
|
622
|
-
changeAll(
|
|
623
|
-
|
|
630
|
+
changeAll(s) {
|
|
631
|
+
s ? this.checkedKeys = [...this.allCheckedKeys] : this.checkedKeys = [], this.handleItem();
|
|
624
632
|
},
|
|
625
633
|
init() {
|
|
626
|
-
this.confirmLoading = !0, Promise.all([this.getMenuTree(), this.expandedMenuKeys(), this.getMenuList()]).then(async (
|
|
627
|
-
let e = [],
|
|
628
|
-
const n = (
|
|
634
|
+
this.confirmLoading = !0, Promise.all([this.getMenuTree(), this.expandedMenuKeys(), this.getMenuList()]).then(async (s) => {
|
|
635
|
+
let e = [], t = [];
|
|
636
|
+
const n = (r) => (r = r.filter((d, o) => {
|
|
629
637
|
const c = this.checkedKeys.filter((f) => d.id === f)[0];
|
|
630
|
-
return d.open = !0, d.checked = d.type === 1 ? !!c : !1, d.isIndeterminate = !1, d.menusType = d.type, e.push(d.id),
|
|
631
|
-
}),
|
|
632
|
-
let i = this.menuAll.filter((
|
|
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 = n(d.children)), !0;
|
|
639
|
+
}), r);
|
|
640
|
+
let i = this.menuAll.filter((r) => !!this.systemMenuAll.filter((o) => o.id === r.id)[0]);
|
|
633
641
|
await n(i), this.allCheckedKeys = e;
|
|
634
|
-
let
|
|
635
|
-
|
|
636
|
-
const
|
|
637
|
-
|
|
638
|
-
}), this.list =
|
|
639
|
-
const
|
|
640
|
-
this.checkedKeys =
|
|
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 = [...i], this.handleItem(), this.confirmLoading = !1;
|
|
641
649
|
});
|
|
642
650
|
},
|
|
643
|
-
open(
|
|
644
|
-
this.record =
|
|
651
|
+
open(s, e) {
|
|
652
|
+
this.record = s, this.appsId = e || window.$systemInfo.id, this.visible = !0, this.init();
|
|
645
653
|
},
|
|
646
654
|
getMenuTree() {
|
|
647
|
-
return
|
|
655
|
+
return M({ roleId: this.record.id }).then((s) => (s.code === 200 && (this.menuAll = s.data), s));
|
|
648
656
|
},
|
|
649
657
|
expandedMenuKeys() {
|
|
650
|
-
return
|
|
658
|
+
return $({
|
|
651
659
|
id: this.record.id
|
|
652
|
-
}).then((
|
|
660
|
+
}).then((s) => (s.code === 200 && (this.checkedKeys = s.data), s));
|
|
653
661
|
},
|
|
654
662
|
getMenuList() {
|
|
655
|
-
let
|
|
656
|
-
return
|
|
657
|
-
},
|
|
658
|
-
getMenuIds(
|
|
659
|
-
let e = [],
|
|
660
|
-
const n = (i) => (i = i.filter((
|
|
661
|
-
return
|
|
662
|
-
},
|
|
663
|
-
findParent(
|
|
664
|
-
for (let n of
|
|
665
|
-
if (n.id === e.parentId || n.children && n.children.length > 0 && this.findParent(n.children, e,
|
|
666
|
-
return
|
|
663
|
+
let s = { AppsId: this.appsId };
|
|
664
|
+
return A(s).then((e) => (e.code === 200 && (this.systemMenuAll = e.data), e));
|
|
665
|
+
},
|
|
666
|
+
getMenuIds(s) {
|
|
667
|
+
let e = [], t = [];
|
|
668
|
+
const n = (i) => (i = i.filter((a, l) => (a.menusType !== 2 ? e.push(a.id) : t.push(a.id), a.children && a.children.length > 0 && (a.children = n(a.children)), !0)), i);
|
|
669
|
+
return s.children && n(s.children), { arr: e, btn: t };
|
|
670
|
+
},
|
|
671
|
+
findParent(s, e, t) {
|
|
672
|
+
for (let n of s)
|
|
673
|
+
if (n.id === e.parentId || n.children && n.children.length > 0 && this.findParent(n.children, e, t))
|
|
674
|
+
return t.unshift(n), !0;
|
|
667
675
|
return !1;
|
|
668
676
|
},
|
|
669
677
|
closed() {
|
|
@@ -672,31 +680,31 @@ const X = {
|
|
|
672
680
|
toggleFullscreen() {
|
|
673
681
|
this.fullscreen = !this.fullscreen;
|
|
674
682
|
},
|
|
675
|
-
doEvent(
|
|
676
|
-
const e =
|
|
683
|
+
doEvent(s) {
|
|
684
|
+
const e = s.item.functionName;
|
|
677
685
|
this[e] && this[e]();
|
|
678
686
|
}
|
|
679
687
|
}
|
|
680
688
|
};
|
|
681
|
-
var
|
|
682
|
-
var e = this,
|
|
683
|
-
return
|
|
689
|
+
var ie = 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(n) {
|
|
684
692
|
e.visible = n;
|
|
685
|
-
}, closed: e.closed } }, [
|
|
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(n) {
|
|
686
694
|
e.allClose = n;
|
|
687
695
|
}, expression: "allClose" } }, [e._v(" " + e._s(e.$i18nt("gd.btn.selectAll", "\u5168\u9009")) + " ")])], 1)])], 2)], 1);
|
|
688
|
-
},
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
696
|
+
}, ae = [], re = /* @__PURE__ */ u(
|
|
697
|
+
ne,
|
|
698
|
+
ie,
|
|
699
|
+
ae,
|
|
692
700
|
!1,
|
|
693
701
|
null,
|
|
694
702
|
"d82ecaae",
|
|
695
703
|
null,
|
|
696
704
|
null
|
|
697
705
|
);
|
|
698
|
-
const
|
|
699
|
-
const
|
|
706
|
+
const le = re.exports;
|
|
707
|
+
const oe = {
|
|
700
708
|
name: "GdUserRole",
|
|
701
709
|
props: {
|
|
702
710
|
height: {
|
|
@@ -712,7 +720,7 @@ const se = {
|
|
|
712
720
|
default: "page"
|
|
713
721
|
}
|
|
714
722
|
},
|
|
715
|
-
mixins: [
|
|
723
|
+
mixins: [b],
|
|
716
724
|
data() {
|
|
717
725
|
return {
|
|
718
726
|
transKey: "gd.btn.add",
|
|
@@ -729,7 +737,7 @@ const se = {
|
|
|
729
737
|
value: "value"
|
|
730
738
|
},
|
|
731
739
|
defaultExpandedKeys: "",
|
|
732
|
-
loadData: (
|
|
740
|
+
loadData: (s) => O({ roleId: this.openSelecteKeys[0] }).then((e) => (this.getRowId(e.data), { pageNo: 1, pageSize: 1e3, totalRows: 0, rows: e.data })),
|
|
733
741
|
disableBtn: [],
|
|
734
742
|
fileList: [],
|
|
735
743
|
needLoad: !1,
|
|
@@ -939,16 +947,16 @@ const se = {
|
|
|
939
947
|
return this.openMode !== "page";
|
|
940
948
|
},
|
|
941
949
|
getQueryParam() {
|
|
942
|
-
let
|
|
950
|
+
let s = /* @__PURE__ */ new Map();
|
|
943
951
|
for (let e in this.queryParam)
|
|
944
|
-
|
|
945
|
-
return Object.fromEntries(
|
|
952
|
+
s.set(e === "statecodes" ? "searchctatus" : e, this.queryParam[e]);
|
|
953
|
+
return Object.fromEntries(s);
|
|
946
954
|
},
|
|
947
955
|
getFormColumns() {
|
|
948
956
|
return this.formColumnsuser.filter((e) => (e.prop === "orgid" && (e.treeOptions = [...this.orgTree]), !0));
|
|
949
957
|
},
|
|
950
958
|
getTableButtons() {
|
|
951
|
-
return this.tableButtons.filter((
|
|
959
|
+
return this.tableButtons.filter((s) => (s.show = !this.disableBtn.includes(s.displayName), !0));
|
|
952
960
|
},
|
|
953
961
|
getHeight() {
|
|
954
962
|
return this.height;
|
|
@@ -959,31 +967,31 @@ const se = {
|
|
|
959
967
|
...h(["tablePageSize", "tableSize", "labelPosition", "formMode"])
|
|
960
968
|
},
|
|
961
969
|
methods: {
|
|
962
|
-
getRowId(
|
|
970
|
+
getRowId(s) {
|
|
963
971
|
let e = [];
|
|
964
|
-
|
|
965
|
-
e.push(
|
|
972
|
+
s.filter((t) => !this.disabledRowId.includes(t.id)).forEach((t) => {
|
|
973
|
+
e.push(t.id);
|
|
966
974
|
}), this.disabledRowId = this.disabledRowId.concat(e);
|
|
967
975
|
},
|
|
968
|
-
saveQueries(
|
|
976
|
+
saveQueries(s) {
|
|
969
977
|
this.queryParam = {
|
|
970
|
-
...
|
|
978
|
+
...s
|
|
971
979
|
}, this.refresh();
|
|
972
980
|
},
|
|
973
981
|
refresh() {
|
|
974
982
|
this.$refs.table.refresh();
|
|
975
983
|
},
|
|
976
984
|
getOrgTree() {
|
|
977
|
-
|
|
978
|
-
if (
|
|
979
|
-
const e = (
|
|
980
|
-
this.orgTree = e(
|
|
985
|
+
v({}).then((s) => {
|
|
986
|
+
if (s.code === 200) {
|
|
987
|
+
const e = (t) => (t = t.filter((n, i) => (n.value = String(n.value), n.children && n.children.length > 0 && (n.children = e(n.children)), !0)), t);
|
|
988
|
+
this.orgTree = e(s.data);
|
|
981
989
|
}
|
|
982
990
|
this.loading = !1;
|
|
983
991
|
});
|
|
984
992
|
},
|
|
985
|
-
handleNodeClick(
|
|
986
|
-
this.queryParam.orgId ===
|
|
993
|
+
handleNodeClick(s) {
|
|
994
|
+
this.queryParam.orgId === s.id ? (delete this.queryParam.orgId, this.$nextTick(() => {
|
|
987
995
|
setTimeout(() => {
|
|
988
996
|
this.$refs.tree.setCurrentKey(null);
|
|
989
997
|
}, 0);
|
|
@@ -992,28 +1000,28 @@ const se = {
|
|
|
992
1000
|
...this.queryParam
|
|
993
1001
|
},
|
|
994
1002
|
{
|
|
995
|
-
orgId:
|
|
1003
|
+
orgId: s.id
|
|
996
1004
|
}
|
|
997
1005
|
), this.refresh();
|
|
998
1006
|
},
|
|
999
1007
|
handleOk() {
|
|
1000
1008
|
this.$refs.table.refresh();
|
|
1001
1009
|
},
|
|
1002
|
-
onSelectChange(
|
|
1003
|
-
this.selectedRowKeys =
|
|
1010
|
+
onSelectChange(s, e) {
|
|
1011
|
+
this.selectedRowKeys = s, this.selectedRows = e;
|
|
1004
1012
|
},
|
|
1005
|
-
doEvent(
|
|
1006
|
-
let e =
|
|
1013
|
+
doEvent(s) {
|
|
1014
|
+
let e = s.item.functionName;
|
|
1007
1015
|
this[e] && this[e]();
|
|
1008
1016
|
},
|
|
1009
|
-
lookupSeled(
|
|
1010
|
-
if (
|
|
1017
|
+
lookupSeled(s) {
|
|
1018
|
+
if (s.fkData.length === 0) {
|
|
1011
1019
|
this.$refs.engineSearch.closed();
|
|
1012
1020
|
return;
|
|
1013
1021
|
}
|
|
1014
|
-
this.$refs.engineSearch.confirmLoading = !0,
|
|
1022
|
+
this.$refs.engineSearch.confirmLoading = !0, E({
|
|
1015
1023
|
roleId: this.openSelecteKeys[0],
|
|
1016
|
-
userIdList:
|
|
1024
|
+
userIdList: s.data
|
|
1017
1025
|
}).then((e) => {
|
|
1018
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;
|
|
1019
1027
|
});
|
|
@@ -1027,7 +1035,7 @@ const se = {
|
|
|
1027
1035
|
});
|
|
1028
1036
|
},
|
|
1029
1037
|
del() {
|
|
1030
|
-
let
|
|
1038
|
+
let s = this;
|
|
1031
1039
|
if (this.selectedRowKeys.length === 0) {
|
|
1032
1040
|
this.$message.warning(this.$i18nt("gd.https.delTip", "\u8BF7\u9009\u62E9\u8981\u5220\u9664\u7684\u6570\u636E!"));
|
|
1033
1041
|
return;
|
|
@@ -1044,16 +1052,16 @@ const se = {
|
|
|
1044
1052
|
customClass: "custom-alert",
|
|
1045
1053
|
callback: () => {
|
|
1046
1054
|
},
|
|
1047
|
-
beforeClose: (e,
|
|
1055
|
+
beforeClose: (e, t, n) => {
|
|
1048
1056
|
if (e !== "confirm") {
|
|
1049
1057
|
n();
|
|
1050
1058
|
return;
|
|
1051
1059
|
}
|
|
1052
|
-
|
|
1053
|
-
roleId:
|
|
1054
|
-
userIdList:
|
|
1060
|
+
t.confirmButtonLoading = !0, t.cancelButtonLoading = !0, t.showCancelButton = !1, z({
|
|
1061
|
+
roleId: s.openSelecteKeys[0],
|
|
1062
|
+
userIdList: s.selectedRowKeys
|
|
1055
1063
|
}).then((i) => {
|
|
1056
|
-
i.success ? (
|
|
1064
|
+
i.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, n(), s.refresh()) : s.$message.error(s.$i18nt("gd.https.delFail", "\u5220\u9664\u5931\u8D25") + i.message);
|
|
1057
1065
|
});
|
|
1058
1066
|
}
|
|
1059
1067
|
});
|
|
@@ -1062,33 +1070,33 @@ const se = {
|
|
|
1062
1070
|
created() {
|
|
1063
1071
|
}
|
|
1064
1072
|
};
|
|
1065
|
-
var
|
|
1066
|
-
var e = this,
|
|
1067
|
-
return
|
|
1068
|
-
return [
|
|
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)])];
|
|
1069
1077
|
}, proxy: !0 }, { key: "name", fn: function({ column: n, row: i }) {
|
|
1070
|
-
return [
|
|
1078
|
+
return [t("span", { staticClass: "active-color", staticStyle: { cursor: "pointer" } }, [e._v(" " + e._s(i.name) + " ")])];
|
|
1071
1079
|
} }, { key: "nickname", fn: function({ column: n, row: i }) {
|
|
1072
|
-
return [
|
|
1080
|
+
return [t("span", { staticStyle: { cursor: "pointer" } }, [e._v(" " + e._s(i.nickname) + " ")])];
|
|
1073
1081
|
} }, { key: "orgname", fn: function({ column: n, row: i }) {
|
|
1074
|
-
return [
|
|
1082
|
+
return [t("span", { staticStyle: { cursor: "pointer" } }, [e._v(" " + e._s(i.orgname) + " ")])];
|
|
1075
1083
|
} }, { key: "sex", fn: function({ column: n, row: i }) {
|
|
1076
|
-
return [
|
|
1084
|
+
return [t("span", [e._v(" " + e._s(e._f("dictType")("gender", i.gender)) + " ")])];
|
|
1077
1085
|
} }, { key: "status", fn: function({ column: n, row: i }) {
|
|
1078
|
-
return [
|
|
1079
|
-
} }]) }),
|
|
1080
|
-
},
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1086
|
+
return [t("span", [e._v(" " + e._s(e._f("dictType")("state_code", i.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,
|
|
1084
1092
|
!1,
|
|
1085
1093
|
null,
|
|
1086
1094
|
"e9dd56ab",
|
|
1087
1095
|
null,
|
|
1088
1096
|
null
|
|
1089
1097
|
);
|
|
1090
|
-
const
|
|
1091
|
-
const
|
|
1098
|
+
const k = he.exports;
|
|
1099
|
+
const ue = {
|
|
1092
1100
|
data() {
|
|
1093
1101
|
return {
|
|
1094
1102
|
buttons: [],
|
|
@@ -1100,7 +1108,7 @@ const le = {
|
|
|
1100
1108
|
selectedRowKeys: []
|
|
1101
1109
|
};
|
|
1102
1110
|
},
|
|
1103
|
-
components: { UserFormDate:
|
|
1111
|
+
components: { UserFormDate: k },
|
|
1104
1112
|
computed: {
|
|
1105
1113
|
height() {
|
|
1106
1114
|
return this.screenHeight - (this.fullscreen ? 160 : 340);
|
|
@@ -1111,8 +1119,8 @@ const le = {
|
|
|
1111
1119
|
handleSubmit() {
|
|
1112
1120
|
this.closed(), this.$emit("ok");
|
|
1113
1121
|
},
|
|
1114
|
-
open(
|
|
1115
|
-
this.record =
|
|
1122
|
+
open(s) {
|
|
1123
|
+
this.record = s, this.visible = !0, this.selectedRowKeys = [s.id], this.$nextTick(() => {
|
|
1116
1124
|
setTimeout(() => {
|
|
1117
1125
|
this.$refs.userForm.refresh();
|
|
1118
1126
|
}, 0);
|
|
@@ -1124,32 +1132,496 @@ const le = {
|
|
|
1124
1132
|
toggleFullscreen() {
|
|
1125
1133
|
this.fullscreen = !this.fullscreen;
|
|
1126
1134
|
},
|
|
1127
|
-
onSelectChange(
|
|
1128
|
-
this.selectedRowKeys =
|
|
1135
|
+
onSelectChange(s) {
|
|
1136
|
+
this.selectedRowKeys = s;
|
|
1129
1137
|
},
|
|
1130
|
-
doEvent(
|
|
1131
|
-
const e =
|
|
1138
|
+
doEvent(s) {
|
|
1139
|
+
const e = s.item.functionName;
|
|
1132
1140
|
this[e] && this[e]();
|
|
1133
1141
|
}
|
|
1134
1142
|
}
|
|
1135
1143
|
};
|
|
1136
|
-
var
|
|
1137
|
-
var e = this,
|
|
1138
|
-
return
|
|
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(n) {
|
|
1139
1147
|
e.visible = n;
|
|
1140
|
-
}, closed: e.closed } }, [
|
|
1141
|
-
},
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
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,
|
|
1145
1153
|
!1,
|
|
1146
1154
|
null,
|
|
1147
1155
|
"46b57430",
|
|
1148
1156
|
null,
|
|
1149
1157
|
null
|
|
1150
1158
|
);
|
|
1151
|
-
const
|
|
1152
|
-
const
|
|
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
|
+
var t = this.restaurants, n = s ? t.filter(this.createFilter(s)) : t;
|
|
1284
|
+
e(n);
|
|
1285
|
+
},
|
|
1286
|
+
createFilter(s) {
|
|
1287
|
+
return (e) => e.name.toLowerCase().indexOf(s.toLowerCase()) === 0;
|
|
1288
|
+
},
|
|
1289
|
+
handleSelect(s) {
|
|
1290
|
+
console.log(s);
|
|
1291
|
+
},
|
|
1292
|
+
keyuprefresh() {
|
|
1293
|
+
},
|
|
1294
|
+
buildTree(s) {
|
|
1295
|
+
const e = s.find((a) => a.parentid === null);
|
|
1296
|
+
if (!e)
|
|
1297
|
+
throw new Error("No root node found (parentid: null)");
|
|
1298
|
+
const t = {};
|
|
1299
|
+
s.forEach((a) => {
|
|
1300
|
+
t[a.id] = {
|
|
1301
|
+
name: a.name,
|
|
1302
|
+
id: a.id,
|
|
1303
|
+
children: []
|
|
1304
|
+
};
|
|
1305
|
+
}), s.forEach((a) => {
|
|
1306
|
+
if (a.parentid === null)
|
|
1307
|
+
return;
|
|
1308
|
+
const l = t[a.parentid];
|
|
1309
|
+
l ? l.children.some((r) => r.id === a.id) || l.children.push(t[a.id]) : t[e.id].children.push(t[a.id]);
|
|
1310
|
+
});
|
|
1311
|
+
function n(a) {
|
|
1312
|
+
a.children && a.children.length > 0 && (a.children.sort((l, r) => l.name.localeCompare(r.name)), a.children.forEach((l) => n(l)));
|
|
1313
|
+
}
|
|
1314
|
+
const i = {
|
|
1315
|
+
name: e.name,
|
|
1316
|
+
id: e.id,
|
|
1317
|
+
children: t[e.id].children
|
|
1318
|
+
};
|
|
1319
|
+
return n(i), [i];
|
|
1320
|
+
},
|
|
1321
|
+
handleSubmit() {
|
|
1322
|
+
this.id != "" ? this.edit() : this.add();
|
|
1323
|
+
},
|
|
1324
|
+
add() {
|
|
1325
|
+
const e = this.currentPermissions.map((t) => {
|
|
1326
|
+
const n = t.list.reduce((i, a) => (i[a.code] = a.value, i), {});
|
|
1327
|
+
return {
|
|
1328
|
+
...t,
|
|
1329
|
+
...n
|
|
1330
|
+
};
|
|
1331
|
+
}).map(({ list: t, ...n }) => n);
|
|
1332
|
+
this.confirmLoading = !0, K(e).then((t) => {
|
|
1333
|
+
t.success ? (this.$message.success(this.$i18nt("gd.https.operateSucc", "\u64CD\u4F5C\u6210\u529F")), this.$emit("ok"), this.closed()) : this.$message.error(
|
|
1334
|
+
this.$i18nt("gd.https.operateFail", "\u64CD\u4F5C\u5931\u8D25") + t.message
|
|
1335
|
+
), this.confirmLoading = !1;
|
|
1336
|
+
});
|
|
1337
|
+
},
|
|
1338
|
+
edit() {
|
|
1339
|
+
const e = this.currentPermissions.map((t) => {
|
|
1340
|
+
const n = t.list.reduce((i, a) => (i[a.code] = a.value, i), {});
|
|
1341
|
+
return {
|
|
1342
|
+
...t,
|
|
1343
|
+
...n
|
|
1344
|
+
};
|
|
1345
|
+
}).map(({ list: t, ...n }) => n);
|
|
1346
|
+
console.log(e), this.confirmLoading = !0, T(e).then((t) => {
|
|
1347
|
+
t.success ? (this.$message.success(this.$i18nt("gd.https.operateSucc", "\u64CD\u4F5C\u6210\u529F")), this.$emit("ok"), this.closed()) : this.$message.error(
|
|
1348
|
+
this.$i18nt("gd.https.operateFail", "\u64CD\u4F5C\u5931\u8D25") + t.message
|
|
1349
|
+
), this.confirmLoading = !1;
|
|
1350
|
+
});
|
|
1351
|
+
},
|
|
1352
|
+
open(s) {
|
|
1353
|
+
this.record = s, this.visible = !0, this.getallTree(), this.getDetail(s);
|
|
1354
|
+
},
|
|
1355
|
+
getDetail(s) {
|
|
1356
|
+
C({ roleId: s.id }).then((e) => {
|
|
1357
|
+
if (e.code == 200 && (this.currentPermissions = [], this.$refs.elTreeRef && this.$refs.elTreeRef.setCheckedKeys([]), e.data.length > 0)) {
|
|
1358
|
+
this.id = e.data[0].id, this.currentPermissions = [];
|
|
1359
|
+
const t = e.data.map((i) => {
|
|
1360
|
+
const a = [
|
|
1361
|
+
{ name: "\u67E5\u770B", code: "readmetadata", value: i.readmetadata },
|
|
1362
|
+
{ name: "\u91CD\u547D\u540D", code: "rename", value: i.rename },
|
|
1363
|
+
{ name: "\u5220\u9664", code: "delete", value: i.delete },
|
|
1364
|
+
{ name: "\u7BA1\u7406\u6743\u9650", code: "manageprem", value: i.manageprem },
|
|
1365
|
+
{ name: "\u79FB\u52A8", code: "move", value: i.move },
|
|
1366
|
+
{ name: "\u521B\u5EFA\u6587\u4EF6", code: "createfile", value: i.createfile },
|
|
1367
|
+
{ name: "\u521B\u5EFA\u5B50\u6587\u4EF6\u5939", code: "createsubfolder", value: i.createsubfolder },
|
|
1368
|
+
{ name: "\u4E0B\u8F7D", code: "download", value: i.download }
|
|
1369
|
+
];
|
|
1370
|
+
return {
|
|
1371
|
+
id: i.id,
|
|
1372
|
+
name: i.name,
|
|
1373
|
+
ischeck: !1,
|
|
1374
|
+
sysdocobjectid: i.sysdocobjectid,
|
|
1375
|
+
sysroleid: i.sysroleid,
|
|
1376
|
+
list: a
|
|
1377
|
+
};
|
|
1378
|
+
});
|
|
1379
|
+
this.currentPermissions = t, this.handlePermissionClick(this.currentPermissions[0]);
|
|
1380
|
+
const n = t.map((i) => i.sysdocobjectid);
|
|
1381
|
+
this.$refs.elTreeRef && this.$refs.elTreeRef.setCheckedKeys(n);
|
|
1382
|
+
}
|
|
1383
|
+
});
|
|
1384
|
+
},
|
|
1385
|
+
getallTree() {
|
|
1386
|
+
R().then((s) => {
|
|
1387
|
+
if (s.code == 200) {
|
|
1388
|
+
this.restaurants = s.data;
|
|
1389
|
+
const e = this.buildTree(JSON.parse(JSON.stringify(s.data)));
|
|
1390
|
+
this.folderTree = e, this.selectedPath = "/" + s.data[0].name;
|
|
1391
|
+
}
|
|
1392
|
+
});
|
|
1393
|
+
},
|
|
1394
|
+
closed() {
|
|
1395
|
+
this.cardList.forEach((s) => {
|
|
1396
|
+
Array.isArray(s.list) && s.list.forEach((e) => {
|
|
1397
|
+
e.value = "";
|
|
1398
|
+
});
|
|
1399
|
+
}), this.fullscreen = !1, this.visible = !1;
|
|
1400
|
+
},
|
|
1401
|
+
toggleFullscreen() {
|
|
1402
|
+
this.fullscreen = !this.fullscreen;
|
|
1403
|
+
},
|
|
1404
|
+
doEvent(s) {
|
|
1405
|
+
const e = s.item.functionName;
|
|
1406
|
+
this[e] && this[e]();
|
|
1407
|
+
},
|
|
1408
|
+
openPathDialog() {
|
|
1409
|
+
this.pathDialogVisible = !0, this.tempSelectedPath = this.selectedPath;
|
|
1410
|
+
},
|
|
1411
|
+
delList(s) {
|
|
1412
|
+
console.log(s);
|
|
1413
|
+
let e = this;
|
|
1414
|
+
this.$confirm(this.$i18nt("gd.https.delContent", "\u662F\u5426\u5220\u9664\u9009\u4E2D\u6570\u636E?"), this.$i18nt("gd.https.delTitle", "\u6E29\u99A8\u63D0\u793A"), {
|
|
1415
|
+
confirmButtonText: this.$i18nt("gd.https.delOk", "\u786E\u5B9A\u5220\u9664"),
|
|
1416
|
+
cancelButtonText: this.$i18nt("gd.https.delCancel", "\u53D6\u6D88"),
|
|
1417
|
+
showClose: !1,
|
|
1418
|
+
confirmButtonLoading: !1,
|
|
1419
|
+
cancelButtonLoading: !1,
|
|
1420
|
+
closeOnClickModal: !1,
|
|
1421
|
+
type: "warning",
|
|
1422
|
+
confirmButtonClass: "el-button--danger",
|
|
1423
|
+
customClass: "custom-alert",
|
|
1424
|
+
callback: () => {
|
|
1425
|
+
},
|
|
1426
|
+
beforeClose: (t, n, i) => {
|
|
1427
|
+
if (t !== "confirm") {
|
|
1428
|
+
i();
|
|
1429
|
+
return;
|
|
1430
|
+
}
|
|
1431
|
+
n.confirmButtonLoading = !0, n.cancelButtonLoading = !0, n.showCancelButton = !1, s.id === 0 ? e.$message.success(e.$i18nt("gd.https.delSucc", "\u5220\u9664\u6210\u529F")) : m({
|
|
1432
|
+
ids: s.id
|
|
1433
|
+
}).then((a) => {
|
|
1434
|
+
n.confirmButtonLoading = !1, n.cancelButtonLoading = !1, n.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);
|
|
1435
|
+
}), i(), e.currentPermissions = e.currentPermissions.filter((a) => a.sysdocobjectid !== s.sysdocobjectid), e.currentPermissions.length == 0 && e.cardList.forEach((a) => {
|
|
1436
|
+
Array.isArray(a.list) && a.list.forEach((l) => {
|
|
1437
|
+
l.value = "";
|
|
1438
|
+
});
|
|
1439
|
+
}), e.cancelNodeCheck(s.sysdocobjectid);
|
|
1440
|
+
}
|
|
1441
|
+
});
|
|
1442
|
+
},
|
|
1443
|
+
cancelNodeCheck(s) {
|
|
1444
|
+
const e = this.$refs.elTreeRef;
|
|
1445
|
+
e && e.setChecked(s, !1);
|
|
1446
|
+
},
|
|
1447
|
+
handlecheck(s) {
|
|
1448
|
+
console.log(s);
|
|
1449
|
+
},
|
|
1450
|
+
handleDirectoryCheck(s, e) {
|
|
1451
|
+
const t = s.id, n = JSON.parse(JSON.stringify(this.currentPermissions)).filter((i) => i.sysdocobjectid === s.id);
|
|
1452
|
+
if (e && n.length === 0) {
|
|
1453
|
+
const i = {
|
|
1454
|
+
sysdocobjectid: t,
|
|
1455
|
+
sysroleid: this.record.id,
|
|
1456
|
+
name: s.name,
|
|
1457
|
+
ischeck: !0,
|
|
1458
|
+
id: 0,
|
|
1459
|
+
list: [
|
|
1460
|
+
{
|
|
1461
|
+
name: "\u67E5\u770B",
|
|
1462
|
+
code: "readmetadata",
|
|
1463
|
+
value: ""
|
|
1464
|
+
},
|
|
1465
|
+
{
|
|
1466
|
+
name: "\u91CD\u547D\u540D",
|
|
1467
|
+
code: "rename",
|
|
1468
|
+
value: ""
|
|
1469
|
+
},
|
|
1470
|
+
{
|
|
1471
|
+
name: "\u5220\u9664",
|
|
1472
|
+
code: "delete",
|
|
1473
|
+
value: ""
|
|
1474
|
+
},
|
|
1475
|
+
{
|
|
1476
|
+
name: "\u7BA1\u7406\u6743\u9650",
|
|
1477
|
+
code: "manageprem",
|
|
1478
|
+
value: ""
|
|
1479
|
+
},
|
|
1480
|
+
{
|
|
1481
|
+
name: "\u79FB\u52A8",
|
|
1482
|
+
code: "move",
|
|
1483
|
+
value: ""
|
|
1484
|
+
},
|
|
1485
|
+
{
|
|
1486
|
+
name: "\u521B\u5EFA\u6587\u4EF6",
|
|
1487
|
+
code: "createfile",
|
|
1488
|
+
value: ""
|
|
1489
|
+
},
|
|
1490
|
+
{
|
|
1491
|
+
name: "\u521B\u5EFA\u5B50\u6587\u4EF6\u5939",
|
|
1492
|
+
code: "createsubfolder",
|
|
1493
|
+
value: ""
|
|
1494
|
+
},
|
|
1495
|
+
{
|
|
1496
|
+
name: "\u4E0B\u8F7D",
|
|
1497
|
+
code: "download",
|
|
1498
|
+
value: ""
|
|
1499
|
+
}
|
|
1500
|
+
]
|
|
1501
|
+
};
|
|
1502
|
+
this.currentPermissions.push(i), this.currentPermissions.forEach((a) => {
|
|
1503
|
+
a.ischeck = !1, a.sysdocobjectid === t && (a.ischeck = !0);
|
|
1504
|
+
}), this.cardList.forEach((a) => {
|
|
1505
|
+
Array.isArray(a.list) && a.list.forEach((l) => {
|
|
1506
|
+
l.value = "";
|
|
1507
|
+
});
|
|
1508
|
+
});
|
|
1509
|
+
} else if (!e && n.length > 0 && this.currentPermissions.length > 0) {
|
|
1510
|
+
let i = this;
|
|
1511
|
+
this.$confirm(this.$i18nt("gd.https.delContent", "\u662F\u5426\u5220\u9664\u9009\u4E2D\u6570\u636E?"), this.$i18nt("gd.https.delTitle", "\u6E29\u99A8\u63D0\u793A"), {
|
|
1512
|
+
confirmButtonText: this.$i18nt("gd.https.delOk", "\u786E\u5B9A\u5220\u9664"),
|
|
1513
|
+
cancelButtonText: this.$i18nt("gd.https.delCancel", "\u53D6\u6D88"),
|
|
1514
|
+
showClose: !1,
|
|
1515
|
+
confirmButtonLoading: !1,
|
|
1516
|
+
cancelButtonLoading: !1,
|
|
1517
|
+
closeOnClickModal: !1,
|
|
1518
|
+
type: "warning",
|
|
1519
|
+
confirmButtonClass: "el-button--danger",
|
|
1520
|
+
customClass: "custom-alert",
|
|
1521
|
+
callback: () => {
|
|
1522
|
+
},
|
|
1523
|
+
beforeClose: (a, l, r) => {
|
|
1524
|
+
if (a !== "confirm") {
|
|
1525
|
+
r(), setTimeout(() => {
|
|
1526
|
+
this.$nextTick(() => {
|
|
1527
|
+
this.$refs.elTreeRef.setChecked(s.id, !0);
|
|
1528
|
+
});
|
|
1529
|
+
});
|
|
1530
|
+
return;
|
|
1531
|
+
}
|
|
1532
|
+
l.confirmButtonLoading = !0, l.cancelButtonLoading = !0, l.showCancelButton = !1, n[0].id === 0 ? i.$message.success(i.$i18nt("gd.https.delSucc", "\u5220\u9664\u6210\u529F")) : m({
|
|
1533
|
+
ids: n[0].id
|
|
1534
|
+
}).then((d) => {
|
|
1535
|
+
l.confirmButtonLoading = !1, l.cancelButtonLoading = !1, l.showCancelButton = !0, d.success ? i.$message.success(i.$i18nt("gd.https.delSucc", "\u5220\u9664\u6210\u529F")) : i.$message.error(i.$i18nt("gd.https.delFail", "\u5220\u9664\u5931\u8D25") + d.message);
|
|
1536
|
+
}), r(), this.nextclickdel(t);
|
|
1537
|
+
}
|
|
1538
|
+
});
|
|
1539
|
+
}
|
|
1540
|
+
},
|
|
1541
|
+
nextclickdel(s) {
|
|
1542
|
+
this.currentPermissions = this.currentPermissions.filter((t) => t.sysdocobjectid !== s), this.currentPermissions.forEach((t) => {
|
|
1543
|
+
t.ischeck = !1;
|
|
1544
|
+
}), this.currentPermissions[this.currentPermissions.length - 1].ischeck = !0;
|
|
1545
|
+
const e = {};
|
|
1546
|
+
this.currentPermissions[this.currentPermissions.length - 1].list.forEach((t) => {
|
|
1547
|
+
e[t.name] = t.value;
|
|
1548
|
+
}), this.cardList.forEach((t) => {
|
|
1549
|
+
Array.isArray(t.list) && t.list.forEach((n) => {
|
|
1550
|
+
const i = e[n.name];
|
|
1551
|
+
i !== void 0 && i !== "" && i !== null && (n.value = i.toString());
|
|
1552
|
+
});
|
|
1553
|
+
});
|
|
1554
|
+
},
|
|
1555
|
+
handleNodeClick(s, e) {
|
|
1556
|
+
this.objectId = s.id;
|
|
1557
|
+
let t = [], n = e;
|
|
1558
|
+
for (; n; )
|
|
1559
|
+
t.unshift(n.data.name), n = n.parent;
|
|
1560
|
+
this.tempSelectedPath = "" + t.join("/");
|
|
1561
|
+
},
|
|
1562
|
+
handlePermissionClick(s) {
|
|
1563
|
+
this.currentPermissions.forEach((t) => {
|
|
1564
|
+
t.ischeck = !1;
|
|
1565
|
+
}), s.ischeck = !0;
|
|
1566
|
+
const e = {};
|
|
1567
|
+
s.list.forEach((t) => {
|
|
1568
|
+
e[t.name] = t.value;
|
|
1569
|
+
}), this.cardList.forEach((t) => {
|
|
1570
|
+
Array.isArray(t.list) && t.list.forEach((n) => {
|
|
1571
|
+
const i = e[n.name];
|
|
1572
|
+
i != null && (n.value = i.toString());
|
|
1573
|
+
});
|
|
1574
|
+
});
|
|
1575
|
+
},
|
|
1576
|
+
confirmPath() {
|
|
1577
|
+
this.selectedPath = this.tempSelectedPath, this.pathDialogVisible = !1;
|
|
1578
|
+
},
|
|
1579
|
+
handleReadMetaDataChange(s, e) {
|
|
1580
|
+
s.target.tagName === "INPUT" && s.target.type === "radio" && (e.value === "" ? e.value = s.target.value : e.value = null, setTimeout(() => {
|
|
1581
|
+
if (this.currentPermissions.length > 0) {
|
|
1582
|
+
const t = this.currentPermissions.find((n) => n.ischeck);
|
|
1583
|
+
if (t) {
|
|
1584
|
+
const n = t.list.find((i) => i.name === e.name);
|
|
1585
|
+
n && (n.value = e.value);
|
|
1586
|
+
}
|
|
1587
|
+
}
|
|
1588
|
+
}, 10));
|
|
1589
|
+
}
|
|
1590
|
+
}
|
|
1591
|
+
};
|
|
1592
|
+
var be = function() {
|
|
1593
|
+
var e = this, t = e._self._c;
|
|
1594
|
+
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(n) {
|
|
1595
|
+
e.visible = n;
|
|
1596
|
+
}, 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("\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", [t("div", { staticClass: "preview-card" }, [t("div", { staticClass: "card-header" }, [t("span", [e._v("\u6743\u9650\u9884\u89C8")])]), t("div", { staticClass: "permission-tags" }, e._l(e.currentPermissions, function(n) {
|
|
1597
|
+
return t("div", { key: n.sysdocobjectid, staticClass: "permission-tags-item", class: { checked: n.ischeck }, on: { click: function(i) {
|
|
1598
|
+
return e.handlePermissionClick(n);
|
|
1599
|
+
} } }, [e._v(" " + e._s(n.name) + " "), t("div", { staticClass: "permission-tags-item-content" }, e._l(n.list, function(i, a) {
|
|
1600
|
+
return t("div", { key: a }, [t("span", [e._v(e._s(i.name))]), i.value == "1" ? t("el-tag", [e._v(e._s(e.$i18nt("gd.user.allow", "\u5141\u8BB8")))]) : e._e(), i.value == "2" ? t("el-tag", { attrs: { type: "danger" } }, [e._v(e._s(e.$i18nt("gd.user.refuse", "\u62D2\u7EDD")))]) : e._e()], 1);
|
|
1601
|
+
}), 0), t("i", { staticClass: "el-icon-close del-btn", on: { click: function(i) {
|
|
1602
|
+
return e.delList(n);
|
|
1603
|
+
} } })]);
|
|
1604
|
+
}), 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(n, i) {
|
|
1605
|
+
return t("div", { key: i }, [t("div", { staticClass: "clearfix", attrs: { slot: "header" }, slot: "header" }, [t("h4", [e._v(e._s(e.$i18nt(n.transkey, n.name)))])]), t("div", { staticClass: "permission-list" }, [t("div", { staticClass: "permission-category" }, e._l(n.list, function(a, l) {
|
|
1606
|
+
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) {
|
|
1607
|
+
return e.handleReadMetaDataChange(r, a);
|
|
1608
|
+
} }, model: { value: a.value, callback: function(r) {
|
|
1609
|
+
e.$set(a, "value", r);
|
|
1610
|
+
}, 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)]);
|
|
1611
|
+
}), 1)])]);
|
|
1612
|
+
})], 2)])])])], 2)], 1);
|
|
1613
|
+
}, ve = [], _e = /* @__PURE__ */ u(
|
|
1614
|
+
ye,
|
|
1615
|
+
be,
|
|
1616
|
+
ve,
|
|
1617
|
+
!1,
|
|
1618
|
+
null,
|
|
1619
|
+
"5fe0b6ad",
|
|
1620
|
+
null,
|
|
1621
|
+
null
|
|
1622
|
+
);
|
|
1623
|
+
const ke = _e.exports;
|
|
1624
|
+
const we = {
|
|
1153
1625
|
data() {
|
|
1154
1626
|
return {
|
|
1155
1627
|
buttons: [
|
|
@@ -1182,14 +1654,14 @@ const ue = {
|
|
|
1182
1654
|
},
|
|
1183
1655
|
...h(["screenHeight", "tableLists"])
|
|
1184
1656
|
},
|
|
1185
|
-
components: { LayoutItem:
|
|
1657
|
+
components: { LayoutItem: _ },
|
|
1186
1658
|
methods: {
|
|
1187
1659
|
async handleSubmit() {
|
|
1188
|
-
const
|
|
1189
|
-
const i = this.checkedKeys.filter((
|
|
1190
|
-
return
|
|
1660
|
+
const s = (e) => (e = e.filter((t, n) => {
|
|
1661
|
+
const i = this.checkedKeys.filter((a) => t.id === a)[0];
|
|
1662
|
+
return t.type = i ? 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;
|
|
1191
1663
|
}), e);
|
|
1192
|
-
this.confirmLoading = !0, await
|
|
1664
|
+
this.confirmLoading = !0, await s(this.menuAll), L({
|
|
1193
1665
|
roleid: this.record.id,
|
|
1194
1666
|
list: this.menuAll
|
|
1195
1667
|
}).then((e) => {
|
|
@@ -1198,88 +1670,88 @@ const ue = {
|
|
|
1198
1670
|
), this.confirmLoading = !1;
|
|
1199
1671
|
});
|
|
1200
1672
|
},
|
|
1201
|
-
checkedItemBtn(
|
|
1202
|
-
let
|
|
1203
|
-
e === 1 && (
|
|
1673
|
+
checkedItemBtn(s, e) {
|
|
1674
|
+
let t = [...this.checkedKeys].filter((n) => !s.menuBtnIds.includes(n));
|
|
1675
|
+
e === 1 && (t = t.concat(s.menuBtnIds)), this.checkedKeys = [...t], this.handleItem();
|
|
1204
1676
|
},
|
|
1205
|
-
openItem(
|
|
1677
|
+
openItem(s) {
|
|
1206
1678
|
let e = [...this.menuTreeData];
|
|
1207
|
-
const
|
|
1208
|
-
|
|
1679
|
+
const t = (n) => (n = n.filter((i, a) => (i.id === s.id && (i.open = !i.open), i.children && i.children.length > 0 && (i.children = t(i.children)), !0)), n);
|
|
1680
|
+
t(e), this.menuTreeData = [...e];
|
|
1209
1681
|
},
|
|
1210
|
-
changeItem(
|
|
1682
|
+
changeItem(s, e, t = !0) {
|
|
1211
1683
|
let n = [...this.checkedKeys];
|
|
1212
|
-
this.checkedKeys.filter((
|
|
1213
|
-
const i = this.list.filter((
|
|
1214
|
-
if (
|
|
1684
|
+
this.checkedKeys.filter((o) => e.includes(o))[0];
|
|
1685
|
+
const i = this.list.filter((o) => e.includes(o.id))[0], a = t && i ? i.menuIds : [];
|
|
1686
|
+
if (s ? n = this.checkedKeys.concat(e).concat(a) : n = this.checkedKeys.filter((o) => !e.includes(o)).filter((o) => !a.includes(o)), this.checkedKeys = [...n], this.handleItem(), i.menusType === 2)
|
|
1215
1687
|
return;
|
|
1216
|
-
let
|
|
1217
|
-
this.findParent(this.menuTreeData, i,
|
|
1218
|
-
let
|
|
1219
|
-
|
|
1220
|
-
this.checkedKeys.filter((g) =>
|
|
1221
|
-
}),
|
|
1222
|
-
this.changeItem(!0, [
|
|
1223
|
-
}), d.forEach((
|
|
1224
|
-
this.changeItem(!1, [
|
|
1688
|
+
let l = [];
|
|
1689
|
+
this.findParent(this.menuTreeData, i, l);
|
|
1690
|
+
let r = [], d = [];
|
|
1691
|
+
l.forEach((o) => {
|
|
1692
|
+
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);
|
|
1693
|
+
}), r.forEach((o) => {
|
|
1694
|
+
this.changeItem(!0, [o], !1);
|
|
1695
|
+
}), d.forEach((o) => {
|
|
1696
|
+
this.changeItem(!1, [o], !1);
|
|
1225
1697
|
});
|
|
1226
1698
|
},
|
|
1227
1699
|
handleItem() {
|
|
1228
|
-
let
|
|
1229
|
-
const e = (
|
|
1230
|
-
const
|
|
1231
|
-
return this.checkedKeys.includes(n.id) ? (n.checked = !0, n.isIndeterminate = !1) : (n.checked = !1, n.isIndeterminate =
|
|
1232
|
-
}),
|
|
1233
|
-
e(
|
|
1700
|
+
let s = [...this.menuTreeData];
|
|
1701
|
+
const e = (t) => (t = t.filter((n, i) => {
|
|
1702
|
+
const a = this.checkedKeys.filter((l) => n.menuIds.includes(l));
|
|
1703
|
+
return this.checkedKeys.includes(n.id) ? (n.checked = !0, n.isIndeterminate = !1) : (n.checked = !1, n.isIndeterminate = a.length > 0 && n.menuIds.length > 0), n.children && n.children.length > 0 && (n.children = e(n.children)), !0;
|
|
1704
|
+
}), t);
|
|
1705
|
+
e(s), this.menuTreeData = [...s], this.allClose = this.checkedKeys.length === this.allCheckedKeys.length && this.allCheckedKeys.length > 0;
|
|
1234
1706
|
},
|
|
1235
|
-
changeAll(
|
|
1236
|
-
|
|
1707
|
+
changeAll(s) {
|
|
1708
|
+
s ? this.checkedKeys = [...this.allCheckedKeys] : this.checkedKeys = [], this.handleItem();
|
|
1237
1709
|
},
|
|
1238
1710
|
init() {
|
|
1239
|
-
this.confirmLoading = !0, Promise.all([this.getList()]).then(async (
|
|
1711
|
+
this.confirmLoading = !0, Promise.all([this.getList()]).then(async (s) => {
|
|
1240
1712
|
this.confirmLoading = !1;
|
|
1241
|
-
let e = JSON.parse(JSON.stringify(this.menuTreeDatad)),
|
|
1242
|
-
const n = (
|
|
1243
|
-
const d = this.checkedKeys.filter((
|
|
1244
|
-
return
|
|
1245
|
-
}),
|
|
1713
|
+
let e = JSON.parse(JSON.stringify(this.menuTreeDatad)), t = [];
|
|
1714
|
+
const n = (a) => (a = a.filter((l, r) => {
|
|
1715
|
+
const d = this.checkedKeys.filter((o) => l.id === o)[0];
|
|
1716
|
+
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 = n(l.children)), !0;
|
|
1717
|
+
}), a);
|
|
1246
1718
|
await n(e);
|
|
1247
1719
|
let i = [];
|
|
1248
|
-
|
|
1249
|
-
const
|
|
1250
|
-
|
|
1251
|
-
}), this.list =
|
|
1720
|
+
t.forEach((a, l) => {
|
|
1721
|
+
const r = this.getMenuIds(a);
|
|
1722
|
+
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 && i.push(a.id);
|
|
1723
|
+
}), 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");
|
|
1252
1724
|
});
|
|
1253
1725
|
},
|
|
1254
1726
|
getList() {
|
|
1255
|
-
return
|
|
1256
|
-
if (
|
|
1257
|
-
let e = [],
|
|
1258
|
-
const n = (
|
|
1259
|
-
|
|
1260
|
-
let
|
|
1261
|
-
return
|
|
1262
|
-
}),
|
|
1263
|
-
this.menuAll =
|
|
1727
|
+
return S({ roleId: this.record.id }).then((s) => {
|
|
1728
|
+
if (s.code === 200) {
|
|
1729
|
+
let e = [], t = [];
|
|
1730
|
+
const n = (a, l) => (a = a.filter((r, d) => {
|
|
1731
|
+
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);
|
|
1732
|
+
let o = [];
|
|
1733
|
+
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 = n(o, r.id)), !0;
|
|
1734
|
+
}), a);
|
|
1735
|
+
this.menuAll = s.data.list;
|
|
1264
1736
|
let i = JSON.parse(JSON.stringify(this.menuAll));
|
|
1265
|
-
n(i, 0), this.checkedKeys = e, this.allCheckedKeys =
|
|
1737
|
+
n(i, 0), this.checkedKeys = e, this.allCheckedKeys = t, this.menuTreeDatad = [...i];
|
|
1266
1738
|
}
|
|
1267
|
-
return
|
|
1739
|
+
return s;
|
|
1268
1740
|
});
|
|
1269
1741
|
},
|
|
1270
|
-
getMenuIds(
|
|
1271
|
-
let e = [],
|
|
1272
|
-
const n = (i) => (i = i.filter((
|
|
1273
|
-
return
|
|
1742
|
+
getMenuIds(s) {
|
|
1743
|
+
let e = [], t = [];
|
|
1744
|
+
const n = (i) => (i = i.filter((a, l) => (a.menusType !== 2 ? e.push(a.id) : t.push(a.id), a.children && a.children.length > 0 && (a.children = n(a.children)), !0)), i);
|
|
1745
|
+
return s.children && n(s.children), { arr: e, btn: t };
|
|
1274
1746
|
},
|
|
1275
|
-
findParent(
|
|
1276
|
-
for (let n of
|
|
1277
|
-
if (n.id === e.parentId || n.children && n.children.length > 0 && this.findParent(n.children, e,
|
|
1278
|
-
return
|
|
1747
|
+
findParent(s, e, t) {
|
|
1748
|
+
for (let n of s)
|
|
1749
|
+
if (n.id === e.parentId || n.children && n.children.length > 0 && this.findParent(n.children, e, t))
|
|
1750
|
+
return t.unshift(n), !0;
|
|
1279
1751
|
return !1;
|
|
1280
1752
|
},
|
|
1281
|
-
open(
|
|
1282
|
-
this.record =
|
|
1753
|
+
open(s) {
|
|
1754
|
+
this.record = s, this.visible = !0, this.init();
|
|
1283
1755
|
},
|
|
1284
1756
|
closed() {
|
|
1285
1757
|
this.fullscreen = !1, this.visible = !1, this.menuTreeData = [], this.checkedKeys = [];
|
|
@@ -1287,31 +1759,31 @@ const ue = {
|
|
|
1287
1759
|
toggleFullscreen() {
|
|
1288
1760
|
this.fullscreen = !this.fullscreen;
|
|
1289
1761
|
},
|
|
1290
|
-
doEvent(
|
|
1291
|
-
const e =
|
|
1762
|
+
doEvent(s) {
|
|
1763
|
+
const e = s.item.functionName;
|
|
1292
1764
|
this[e] && this[e]();
|
|
1293
1765
|
}
|
|
1294
1766
|
}
|
|
1295
1767
|
};
|
|
1296
|
-
var
|
|
1297
|
-
var e = this,
|
|
1298
|
-
return
|
|
1768
|
+
var $e = function() {
|
|
1769
|
+
var e = this, t = e._self._c;
|
|
1770
|
+
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(n) {
|
|
1299
1771
|
e.visible = n;
|
|
1300
|
-
}, closed: e.closed } }, [
|
|
1772
|
+
}, 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(n) {
|
|
1301
1773
|
e.allClose = n;
|
|
1302
1774
|
}, expression: "allClose" } }, [e._v(" " + e._s(e.$i18nt("gd.btn.selectAll", "\u5168\u9009")) + " ")])], 1)])], 2)], 1);
|
|
1303
|
-
},
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
|
|
1775
|
+
}, Ke = [], Te = /* @__PURE__ */ u(
|
|
1776
|
+
we,
|
|
1777
|
+
$e,
|
|
1778
|
+
Ke,
|
|
1307
1779
|
!1,
|
|
1308
1780
|
null,
|
|
1309
1781
|
"e6593396",
|
|
1310
1782
|
null,
|
|
1311
1783
|
null
|
|
1312
1784
|
);
|
|
1313
|
-
const
|
|
1314
|
-
const
|
|
1785
|
+
const Ce = Te.exports;
|
|
1786
|
+
const Re = {
|
|
1315
1787
|
name: "GdRole",
|
|
1316
1788
|
props: {
|
|
1317
1789
|
height: {
|
|
@@ -1327,7 +1799,7 @@ const ye = {
|
|
|
1327
1799
|
default: () => []
|
|
1328
1800
|
}
|
|
1329
1801
|
},
|
|
1330
|
-
mixins: [
|
|
1802
|
+
mixins: [b, j],
|
|
1331
1803
|
data() {
|
|
1332
1804
|
return {
|
|
1333
1805
|
appsId: "",
|
|
@@ -1338,13 +1810,14 @@ const ye = {
|
|
|
1338
1810
|
selectedRows: [],
|
|
1339
1811
|
queryParam: {},
|
|
1340
1812
|
allRowData: [],
|
|
1341
|
-
loadData: (
|
|
1813
|
+
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))),
|
|
1814
|
+
isDoc: ""
|
|
1342
1815
|
};
|
|
1343
1816
|
},
|
|
1344
|
-
components: { RoleGrant:
|
|
1817
|
+
components: { RoleGrant: Y, RoleMenu: le, RoleMenuViewForm: Ce, UserAuthorization: me, DocumentAuthorization: ke },
|
|
1345
1818
|
computed: {
|
|
1346
1819
|
getTableButtons() {
|
|
1347
|
-
return this.tableButtons.filter((
|
|
1820
|
+
return this.tableButtons.filter((s) => s.functionName === "grantRoleAppMenu" ? !!this.appsId : s.functionName === "documentAuthorizationMenu" ? this.isDoc == 1 : !0);
|
|
1348
1821
|
},
|
|
1349
1822
|
initialLoading() {
|
|
1350
1823
|
return this.openMode === "page";
|
|
@@ -1353,7 +1826,7 @@ const ye = {
|
|
|
1353
1826
|
return this.openMode !== "page";
|
|
1354
1827
|
},
|
|
1355
1828
|
getFormColumns() {
|
|
1356
|
-
return this.formColumns.filter((
|
|
1829
|
+
return this.formColumns.filter((s) => (s.prop === "code" && (s.disabled = this.transKey !== "gd.btn.add"), !(this.transKey === "gd.https.copy" && s.prop === "code")));
|
|
1357
1830
|
},
|
|
1358
1831
|
getHeight() {
|
|
1359
1832
|
return this.height;
|
|
@@ -1361,11 +1834,29 @@ const ye = {
|
|
|
1361
1834
|
...h(["tablePageSize", "tableSize", "labelPosition", "formMode"])
|
|
1362
1835
|
},
|
|
1363
1836
|
methods: {
|
|
1837
|
+
getConfigInfo() {
|
|
1838
|
+
y({
|
|
1839
|
+
code: "GDS_Enable_Doc_Premissions"
|
|
1840
|
+
}).then((e) => {
|
|
1841
|
+
e.code === 200 && (this.isDoc = e.data.value);
|
|
1842
|
+
});
|
|
1843
|
+
},
|
|
1364
1844
|
getAppId() {
|
|
1365
|
-
|
|
1366
|
-
|
|
1845
|
+
y({ code: "App_Id" }).then((s) => {
|
|
1846
|
+
s.code === 200 && (this.appsId = s.data ? s.data.value : "");
|
|
1367
1847
|
});
|
|
1368
1848
|
},
|
|
1849
|
+
documentAuthorizationMenu() {
|
|
1850
|
+
if (this.selectedRowKeys.length === 0) {
|
|
1851
|
+
this.$message.warning(this.$i18nt("gd.https.editTip", "\u8BF7\u9009\u62E9\u9700\u8981\u7F16\u8F91\u7684\u6570\u636E!"));
|
|
1852
|
+
return;
|
|
1853
|
+
}
|
|
1854
|
+
if (this.selectedRowKeys.length > 1) {
|
|
1855
|
+
this.$message.warning(this.$i18nt("gd.https.editTipOne", "\u53EA\u80FD\u9009\u62E9\u4E00\u6761\u6570\u636E\u7F16\u8F91!"));
|
|
1856
|
+
return;
|
|
1857
|
+
}
|
|
1858
|
+
this.$refs.documentAuthorization.open(this.selectedRows[0]);
|
|
1859
|
+
},
|
|
1369
1860
|
userAuthorizationMenu() {
|
|
1370
1861
|
if (this.selectedRowKeys.length === 0) {
|
|
1371
1862
|
this.$message.warning(this.$i18nt("gd.https.editTip", "\u8BF7\u9009\u62E9\u9700\u8981\u7F16\u8F91\u7684\u6570\u636E!"));
|
|
@@ -1421,14 +1912,14 @@ const ye = {
|
|
|
1421
1912
|
}
|
|
1422
1913
|
this.$refs.roleMenuViewForm.open(this.selectedRows[0]);
|
|
1423
1914
|
},
|
|
1424
|
-
saveQueries(
|
|
1425
|
-
this.queryParam = { ...
|
|
1915
|
+
saveQueries(s) {
|
|
1916
|
+
this.queryParam = { ...s }, this.refresh();
|
|
1426
1917
|
},
|
|
1427
1918
|
refresh() {
|
|
1428
1919
|
this.$refs.table.refresh();
|
|
1429
1920
|
},
|
|
1430
|
-
editForm(
|
|
1431
|
-
this.transKey = "gd.btn.edit", this.$refs.editForm.open(
|
|
1921
|
+
editForm(s) {
|
|
1922
|
+
this.transKey = "gd.btn.edit", this.$refs.editForm.open(s);
|
|
1432
1923
|
},
|
|
1433
1924
|
del() {
|
|
1434
1925
|
if (this.selectedRowKeys.length === 0) {
|
|
@@ -1447,23 +1938,23 @@ const ye = {
|
|
|
1447
1938
|
customClass: "custom-alert",
|
|
1448
1939
|
callback: () => {
|
|
1449
1940
|
},
|
|
1450
|
-
beforeClose: (
|
|
1451
|
-
this.delHand(
|
|
1941
|
+
beforeClose: (s, e, t) => {
|
|
1942
|
+
this.delHand(s, e, t);
|
|
1452
1943
|
}
|
|
1453
1944
|
});
|
|
1454
1945
|
},
|
|
1455
|
-
delHand(
|
|
1456
|
-
if (
|
|
1457
|
-
|
|
1946
|
+
delHand(s, e, t) {
|
|
1947
|
+
if (s !== "confirm") {
|
|
1948
|
+
t();
|
|
1458
1949
|
return;
|
|
1459
1950
|
}
|
|
1460
1951
|
let n = [];
|
|
1461
1952
|
this.selectedRows.forEach((i) => {
|
|
1462
|
-
let
|
|
1463
|
-
n.push(
|
|
1953
|
+
let a = x(i).then((l) => l);
|
|
1954
|
+
n.push(a);
|
|
1464
1955
|
}), e.confirmButtonLoading = !0, e.cancelButtonLoading = !0, e.showCancelButton = !1, Promise.all(n).then((i) => {
|
|
1465
|
-
const
|
|
1466
|
-
|
|
1956
|
+
const a = i.filter((l) => !l.success);
|
|
1957
|
+
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;
|
|
1467
1958
|
});
|
|
1468
1959
|
},
|
|
1469
1960
|
add() {
|
|
@@ -1491,52 +1982,52 @@ const ye = {
|
|
|
1491
1982
|
}
|
|
1492
1983
|
this.transKey = "gd.https.copy", this.$refs.editForm.open(Object.assign({ ...this.selectedRows[0] }, { roleId: this.selectedRows[0].id }));
|
|
1493
1984
|
},
|
|
1494
|
-
sbumit({ data:
|
|
1985
|
+
sbumit({ data: s, record: e, btn: t }, n, i) {
|
|
1495
1986
|
this.formLoading = !0;
|
|
1496
|
-
let
|
|
1497
|
-
const
|
|
1498
|
-
|
|
1499
|
-
|
|
1987
|
+
let a = e ? this.transKey === "gd.https.copy" ? D : N : P;
|
|
1988
|
+
const l = this.transKey !== "gd.https.edit" ? Object.assign(s, { sysappsid: window.$systemInfo.id }) : s;
|
|
1989
|
+
a(l).then((r) => {
|
|
1990
|
+
r.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") + r.message), this.formLoading = !1;
|
|
1500
1991
|
});
|
|
1501
1992
|
},
|
|
1502
|
-
onSelectChange(
|
|
1503
|
-
this.selectedRowKeys =
|
|
1993
|
+
onSelectChange(s, e) {
|
|
1994
|
+
this.selectedRowKeys = s, this.selectedRows = e, this.$emit("onSelectChange", s, e, this.allRowData);
|
|
1504
1995
|
},
|
|
1505
|
-
doEvent(
|
|
1506
|
-
let e =
|
|
1996
|
+
doEvent(s) {
|
|
1997
|
+
let e = s.item.functionName;
|
|
1507
1998
|
this[e] && this[e]();
|
|
1508
1999
|
}
|
|
1509
2000
|
},
|
|
1510
2001
|
created() {
|
|
1511
|
-
this.getAppId();
|
|
2002
|
+
this.getAppId(), this.getConfigInfo();
|
|
1512
2003
|
}
|
|
1513
2004
|
};
|
|
1514
|
-
var
|
|
1515
|
-
var e = this,
|
|
1516
|
-
return
|
|
1517
|
-
return [
|
|
2005
|
+
var Le = function() {
|
|
2006
|
+
var e = this, t = e._self._c;
|
|
2007
|
+
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: n, row: i }) {
|
|
2008
|
+
return [t("gd-tooltip", { attrs: { rowKey: "name", row: i, highlight: "" }, on: { click: e.editForm } })];
|
|
1518
2009
|
} }, { key: "operator", fn: function() {
|
|
1519
|
-
return [
|
|
2010
|
+
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(n) {
|
|
1520
2011
|
return !n.type.indexOf("key") && e._k(n.keyCode, "enter", 13, n.key, "Enter") ? null : e.refresh.apply(null, arguments);
|
|
1521
2012
|
} }, model: { value: e.queryParam.name, callback: function(n) {
|
|
1522
2013
|
e.$set(e.queryParam, "name", n);
|
|
1523
|
-
}, expression: "queryParam.name" } }),
|
|
2014
|
+
}, 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)])];
|
|
1524
2015
|
}, proxy: !0 }, { key: "filtering", fn: function({ colse: n, visible: i }) {
|
|
1525
|
-
return [
|
|
1526
|
-
} }]) })], 1),
|
|
1527
|
-
},
|
|
1528
|
-
|
|
1529
|
-
|
|
1530
|
-
|
|
2016
|
+
return [t("gd-table-queries-field", { attrs: { columns: e.tableQueries, height: e.getHeight, queryParam: e.queryParam, colse: n, visible: i }, on: { save: e.saveQueries } })];
|
|
2017
|
+
} }]) })], 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);
|
|
2018
|
+
}, Se = [], Ie = /* @__PURE__ */ u(
|
|
2019
|
+
Re,
|
|
2020
|
+
Le,
|
|
2021
|
+
Se,
|
|
1531
2022
|
!1,
|
|
1532
2023
|
null,
|
|
1533
|
-
"
|
|
2024
|
+
"00f39bc6",
|
|
1534
2025
|
null,
|
|
1535
2026
|
null
|
|
1536
2027
|
);
|
|
1537
|
-
const p =
|
|
1538
|
-
p.install = function(
|
|
1539
|
-
|
|
2028
|
+
const p = Ie.exports;
|
|
2029
|
+
p.install = function(s) {
|
|
2030
|
+
s.component(p.name, p);
|
|
1540
2031
|
};
|
|
1541
2032
|
export {
|
|
1542
2033
|
p as G
|