gds-plus-design-vue 1.2.22 → 1.2.41

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