gds-plus-design-vue 1.2.2 → 1.2.4

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