gds-plus-design-vue 1.1.2 → 1.1.7

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 (68) hide show
  1. package/lib/chartbi.48631362.mjs +44076 -0
  2. package/lib/chartbi.afd83839.js +80 -0
  3. package/lib/element-theme-chalk.ae828c17.js +2 -0
  4. package/lib/gd-initial.js +34 -0
  5. package/lib/gd-initial.mjs +80300 -16
  6. package/lib/main.60763eae.js +1 -0
  7. package/lib/main.f2b00b70.mjs +939 -0
  8. package/lib/messages.083c4ede.js +9 -0
  9. package/lib/messages.7e85146d.mjs +5802 -0
  10. package/lib/style.css +2 -2
  11. package/lib/system.account.65b2f7d4.js +216 -0
  12. package/lib/system.account.93b7df36.mjs +2536 -0
  13. package/lib/system.config.327aded6.js +1 -0
  14. package/lib/system.config.9c46f279.mjs +373 -0
  15. package/lib/system.datasource.4b0951ba.mjs +511 -0
  16. package/lib/system.datasource.8a0c7e0f.js +1 -0
  17. package/lib/system.dict.65f25e4e.mjs +996 -0
  18. package/lib/system.dict.72594c98.js +1 -0
  19. package/lib/system.duplicatechecking.0d47a5ca.js +1 -0
  20. package/lib/system.duplicatechecking.ad111272.mjs +2130 -0
  21. package/lib/system.email.54722948.js +41 -0
  22. package/lib/system.email.923697c6.mjs +7432 -0
  23. package/lib/system.fieldsecurity.7de4ee1d.mjs +1745 -0
  24. package/lib/system.fieldsecurity.d57edb47.js +1 -0
  25. package/lib/system.file.b3558a8b.js +1 -0
  26. package/lib/system.file.f152d4fe.mjs +489 -0
  27. package/lib/system.log.30e5157c.mjs +1450 -0
  28. package/lib/system.log.f243e7d0.js +1 -0
  29. package/lib/system.machine.325b256e.mjs +94 -0
  30. package/lib/system.machine.332fb31c.js +1 -0
  31. package/lib/system.notice.93c4691c.js +1 -0
  32. package/lib/system.notice.e0b84103.mjs +636 -0
  33. package/lib/system.noticereceived.a28ba643.js +1 -0
  34. package/lib/system.noticereceived.c0a19336.mjs +158 -0
  35. package/lib/system.onlineuser.90c08aef.mjs +184 -0
  36. package/lib/system.onlineuser.e0c261ed.js +1 -0
  37. package/lib/system.org.65452f67.js +1 -0
  38. package/lib/system.org.b8d59e5d.mjs +421 -0
  39. package/lib/system.permissions.b8a5f79d.mjs +212 -0
  40. package/lib/system.permissions.c34f44a3.js +9 -0
  41. package/lib/system.plugin.07b3c38e.js +1 -0
  42. package/lib/system.plugin.4911a33d.mjs +946 -0
  43. package/lib/system.pos.6ed35c39.js +1 -0
  44. package/lib/system.pos.c274f13c.mjs +312 -0
  45. package/lib/system.promptmanagement.5a4930b1.js +1 -0
  46. package/lib/system.promptmanagement.fe8b0913.mjs +789 -0
  47. package/lib/system.role.ceb5ed2d.mjs +1509 -0
  48. package/lib/system.role.daedd959.js +1 -0
  49. package/lib/system.timers.69f1792a.mjs +3160 -0
  50. package/lib/system.timers.ef6b6796.js +38 -0
  51. package/lib/system.translation.6351f189.mjs +661 -0
  52. package/lib/system.translation.8905eb73.js +1 -0
  53. package/lib/system.user.12a4e490.mjs +1425 -0
  54. package/lib/system.user.d668538b.js +14 -0
  55. package/lib/system.useraffiliation.b8be03db.js +1 -0
  56. package/lib/system.useraffiliation.c272e688.mjs +1025 -0
  57. package/lib/system.webresource.5049d97b.js +1 -0
  58. package/lib/system.webresource.e9518d87.mjs +723 -0
  59. package/lib/system.welcome.3f1cce96.mjs +45 -0
  60. package/lib/system.welcome.b109df88.js +1 -0
  61. package/locale/en_US.js +258 -18
  62. package/locale/id_ID.js +257 -18
  63. package/locale/vi_VN.js +256 -16
  64. package/locale/zh_CN.js +267 -25
  65. package/package.json +105 -110
  66. package/lib/gd-initial.umd.js +0 -440
  67. package/lib/index.d50ecf4b.mjs +0 -143931
  68. package/lib/main.305313fd.mjs +0 -919
@@ -0,0 +1,723 @@
1
+ import { m as o, n as d } from "./chartbi.48631362.mjs";
2
+ import { t as c } from "./messages.7e85146d.mjs";
3
+ import { s as m } from "./system.dict.65f25e4e.mjs";
4
+ function h(a) {
5
+ return window.axios({
6
+ url: "/SysWebResource/page",
7
+ method: "post",
8
+ data: a
9
+ });
10
+ }
11
+ function p(a) {
12
+ return window.axios({
13
+ url: "/SysWebResource/edit",
14
+ method: "post",
15
+ data: a
16
+ });
17
+ }
18
+ function u(a) {
19
+ return window.axios({
20
+ url: "/SysWebResource/add",
21
+ method: "post",
22
+ data: a
23
+ });
24
+ }
25
+ function f(a) {
26
+ return window.axios({
27
+ url: "/SysWebResource/list",
28
+ method: "post",
29
+ data: a
30
+ });
31
+ }
32
+ function g(a) {
33
+ return window.axios({
34
+ url: "/SysWebResource/delete",
35
+ method: "post",
36
+ data: a
37
+ });
38
+ }
39
+ function y(a) {
40
+ return window.axios({
41
+ url: "/SysWebResource/editcontent",
42
+ method: "get",
43
+ params: a
44
+ });
45
+ }
46
+ const b = {
47
+ data() {
48
+ return {
49
+ tableColumns: [
50
+ {
51
+ type: "selection",
52
+ width: "60",
53
+ fixed: !0
54
+ },
55
+ {
56
+ transKey: "gd.web.name",
57
+ prop: "name",
58
+ label: "\u540D\u79F0",
59
+ align: "left",
60
+ type: "slot",
61
+ slotType: "name",
62
+ fixed: !0,
63
+ renderHeader: (a, ...e) => this.renderHeader(a, ...e, {
64
+ effectType: "input"
65
+ }),
66
+ showOverflowTooltip: !0
67
+ },
68
+ {
69
+ transKey: "gd.web.displayName",
70
+ prop: "displayname",
71
+ label: "\u663E\u793A\u540D\u79F0",
72
+ minWidth: "180",
73
+ align: "left",
74
+ showOverflowTooltip: !0
75
+ },
76
+ {
77
+ transKey: "gd.web.type",
78
+ prop: "type",
79
+ width: "120",
80
+ label: "\u8D44\u6E90\u7C7B\u578B",
81
+ type: "slot",
82
+ slotType: "type",
83
+ align: "left",
84
+ showOverflowTooltip: !0
85
+ },
86
+ {
87
+ label: "\u521B\u5EFA\u65F6\u95F4",
88
+ prop: "createdtime",
89
+ align: "center",
90
+ transKey: "gd.web.creationTime",
91
+ showOverflowTooltip: !0
92
+ },
93
+ {
94
+ label: "\u4FEE\u6539\u65F6\u95F4",
95
+ prop: "updatedtime",
96
+ align: "center",
97
+ showOverflowTooltip: !0,
98
+ transKey: "gd.web.updatedTime"
99
+ },
100
+ {
101
+ label: "\u5907\u6CE8",
102
+ prop: "description",
103
+ align: "left",
104
+ showOverflowTooltip: !0,
105
+ transKey: "gd.web.remarks"
106
+ }
107
+ ],
108
+ formColumns: [
109
+ {
110
+ transKey: "gd.web.name",
111
+ prop: "name",
112
+ label: "\u540D\u79F0",
113
+ effectType: "input",
114
+ placeholder: "\u8BF7\u8F93\u5165",
115
+ placeholderTransKey: "gd.placeholder.input",
116
+ disabled: !1,
117
+ rules: [{
118
+ required: !0,
119
+ message: "\u8BF7\u8F93\u5165",
120
+ transKey: "gd.placeholder.input",
121
+ trigger: "change"
122
+ }]
123
+ },
124
+ {
125
+ transKey: "gd.web.displayName",
126
+ prop: "displayname",
127
+ label: "\u663E\u793A\u540D\u79F0",
128
+ effectType: "input",
129
+ placeholder: "\u8BF7\u8F93\u5165",
130
+ placeholderTransKey: "gd.placeholder.input",
131
+ disabled: !1,
132
+ rules: [{
133
+ required: !0,
134
+ message: "\u8BF7\u8F93\u5165",
135
+ transKey: "gd.placeholder.input",
136
+ trigger: "change"
137
+ }]
138
+ },
139
+ {
140
+ transKey: "gd.web.type",
141
+ effectType: "select",
142
+ prop: "type",
143
+ label: "\u8D44\u6E90\u7C7B\u578B",
144
+ placeholder: "\u8BF7\u9009\u62E9",
145
+ placeholderTransKey: "gd.placeholder.select",
146
+ dictTypeCode: "web_type",
147
+ disabled: !1,
148
+ rules: [{
149
+ required: !0,
150
+ message: "\u8BF7\u9009\u62E9",
151
+ transKey: "gd.placeholder.select",
152
+ trigger: "change"
153
+ }]
154
+ },
155
+ {
156
+ transKey: "gd.web.resourceFile",
157
+ effectType: "file",
158
+ prop: "fileList",
159
+ label: "\u8D44\u6E90\u6587\u4EF6",
160
+ placeholder: "\u8BF7\u4E0A\u4F20",
161
+ fileTitle: "\u6587\u4EF6\u4E0A\u4F20",
162
+ placeholderTransKey: "gd.placeholder.selectFileTip",
163
+ limit: 1,
164
+ rules: []
165
+ },
166
+ {
167
+ transKey: "gd.web.content",
168
+ effectType: "textarea",
169
+ prop: "content",
170
+ label: "\u8D44\u6E90\u5185\u5BB9",
171
+ disabled: !1,
172
+ placeholderTransKey: "gd.placeholder.input",
173
+ rules: [],
174
+ autosize: {
175
+ minRows: 4,
176
+ maxRows: 12
177
+ }
178
+ },
179
+ {
180
+ transKey: "gd.web.description",
181
+ effectType: "input",
182
+ prop: "description",
183
+ label: "\u5907\u6CE8",
184
+ placeholder: "\u8BF7\u8F93\u5165",
185
+ placeholderTransKey: "gd.placeholder.input",
186
+ disabled: !1,
187
+ rules: []
188
+ },
189
+ {
190
+ transKey: "gd.web.path",
191
+ effectType: "input",
192
+ prop: "address",
193
+ label: "\u5730\u5740",
194
+ placeholder: "\u8BF7\u8F93\u5165",
195
+ placeholderTransKey: "gd.placeholder.input",
196
+ disabled: !1,
197
+ rules: []
198
+ }
199
+ ],
200
+ tableButtons: [
201
+ {
202
+ displayName: "\u65B0\u589E",
203
+ functionName: "add",
204
+ show: !0,
205
+ transKey: "gd.btn.add",
206
+ icon: "el-icon-plus",
207
+ name: "sysWebResource:add"
208
+ },
209
+ {
210
+ displayName: "\u7F16\u8F91",
211
+ functionName: "edit",
212
+ show: !0,
213
+ transKey: "gd.btn.edit",
214
+ icon: "el-icon-edit",
215
+ name: "sysWebResource:edit"
216
+ },
217
+ {
218
+ displayName: "\u5220\u9664",
219
+ functionName: "del",
220
+ show: !0,
221
+ transKey: "gd.btn.del",
222
+ icon: "el-icon-delete",
223
+ btnType: "danger",
224
+ name: "sysWebResource:delete"
225
+ }
226
+ ],
227
+ formButtons: [{
228
+ displayName: "\u786E\u5B9A",
229
+ functionName: "handleSubmit",
230
+ show: !0,
231
+ transKey: "gd.btn.confirm",
232
+ icon: "el-icon-document-checked",
233
+ validate: !0
234
+ }],
235
+ tableQueries: [
236
+ {
237
+ transKey: "gd.web.name",
238
+ prop: "name",
239
+ label: "\u540D\u79F0",
240
+ effectType: "input",
241
+ rules: []
242
+ }
243
+ ]
244
+ };
245
+ }
246
+ };
247
+ function w(a) {
248
+ return new Promise((e, t) => {
249
+ const i = new FileReader();
250
+ i.readAsDataURL(a), i.onload = () => e(i.result), i.onerror = (s) => t(s);
251
+ });
252
+ }
253
+ const F = {
254
+ props: {
255
+ formMode: {
256
+ type: String,
257
+ default: "dialog"
258
+ }
259
+ },
260
+ data() {
261
+ return {
262
+ title: "",
263
+ sysViewButtons: [
264
+ {
265
+ displayName: "\u786E\u5B9A",
266
+ functionName: "handleSubmit",
267
+ show: !0,
268
+ transKey: "gd.btn.confirm",
269
+ icon: "el-icon-document-checked"
270
+ }
271
+ ],
272
+ previewVisible: !1,
273
+ fileListVisible: !0,
274
+ previewImage: "",
275
+ loading: !1,
276
+ imageUrl: "",
277
+ visible: !1,
278
+ confirmLoading: !1,
279
+ typeDict: [],
280
+ fileList: [],
281
+ fileFormat: ".js",
282
+ fileStatus: !0,
283
+ type: "text/javascript",
284
+ uploadType: "1",
285
+ audioPlayerData: {},
286
+ record: null,
287
+ disabled: !1,
288
+ fullscreen: !1,
289
+ width: "800px",
290
+ ruleFormData: {
291
+ type: "1",
292
+ description: "",
293
+ fileList: []
294
+ },
295
+ rules: {
296
+ name: [
297
+ {
298
+ required: !0,
299
+ message: this.$i18nt("gd.btn.input", "\u8BF7\u8F93\u5165"),
300
+ trigger: "change"
301
+ }
302
+ ],
303
+ displayName: [
304
+ {
305
+ required: !0,
306
+ message: this.$i18nt("gd.btn.input", "\u8BF7\u8F93\u5165"),
307
+ trigger: "change"
308
+ }
309
+ ]
310
+ },
311
+ apiUrl: {}.VITE_APP_API_BASE_URL
312
+ };
313
+ },
314
+ computed: {
315
+ ...o(["labelPosition"])
316
+ },
317
+ created() {
318
+ this.sysDictTypeDropDown();
319
+ },
320
+ methods: {
321
+ togglefullscreen() {
322
+ this.fullscreen = !this.fullscreen;
323
+ },
324
+ open(a) {
325
+ if (this.fullscreen = !1, this.record = a, this.fileList = [], this.audioPlayerData = {}, this.title = a ? this.$i18nt("gd.https.edit", "\u7F16\u8F91") : this.$i18nt("gd.https.add", "\u65B0\u589E"), this.visible = !0, this.disabled = !!a, this.sysViewButtons = this.sysViewButtons.map((e) => (e.name = a ? "sysWebResource:edit" : "sysWebResource:add", e)), a) {
326
+ this.initEdit(a);
327
+ return;
328
+ }
329
+ this.$nextTick(() => {
330
+ this.ruleFormData = {}, this.$refs.ruleForm.resetFields();
331
+ }), this.fileFormat = ".js", this.type = "text/javascript", this.uploadType = "1";
332
+ },
333
+ initEdit(a) {
334
+ this.confirmLoading = !0, a.type == 6 && (this.audioPlayerData = {
335
+ title: a.name,
336
+ src: a.address
337
+ }), this.onChange(a.type), y({
338
+ id: a.id
339
+ }).then((e) => {
340
+ if (e.code == 200) {
341
+ Object.assign(this.record, e.data);
342
+ let t = e.data;
343
+ this.fileList = [
344
+ {
345
+ uid: String(t.id),
346
+ name: t.filename,
347
+ status: "done",
348
+ url: t.address
349
+ }
350
+ ];
351
+ let i = {
352
+ id: t.id,
353
+ name: t.name,
354
+ displayName: t.displayname,
355
+ type: String(t.type),
356
+ description: t.description,
357
+ address: t.address,
358
+ fileList: this.fileList
359
+ };
360
+ if (a.type != 2) {
361
+ let s = e.data.contenttext ? e.data.contenttext : "";
362
+ i = Object.assign(
363
+ {
364
+ ...i
365
+ },
366
+ {
367
+ content: s
368
+ }
369
+ );
370
+ }
371
+ t.type == 6 && (this.audioPlayerData = {
372
+ title: t.name,
373
+ src: t.address
374
+ }), this.$nextTick(() => {
375
+ setTimeout(() => {
376
+ this.ruleFormData = i;
377
+ }, 0);
378
+ });
379
+ }
380
+ this.confirmLoading = !1;
381
+ });
382
+ },
383
+ async handlePreview(a) {
384
+ !a.url && !a.preview && (a.preview = await w(a.originFileObj)), this.previewImage = a.url || a.preview, this.previewVisible = !0;
385
+ },
386
+ handleChange(a, e) {
387
+ let t = e.length;
388
+ if (e.length == 0) {
389
+ this.fileList = [], this.ruleFormData.fileList = this.fileList;
390
+ return;
391
+ }
392
+ this.fileList = e.filter((i, s) => s == t - 1), this.ruleFormData.fileList = this.fileList;
393
+ },
394
+ beforeUpload(a) {
395
+ let e = this.getFileType(), t = a.name.split(".")[1].trim().toLowerCase();
396
+ return this.uploadType != 5 && !e.includes(a.type) ? (this.$message.warning(this.$i18nt("gd.system.plugin.fileFormatTip", "\u6587\u4EF6\u683C\u5F0F\u9519\u8BEF!")), this.cleanFile(), !1) : this.uploadType == 5 && t != "vue" ? (this.$message.warning(this.$i18nt("gd.system.plugin.fileFormatTip", "\u6587\u4EF6\u683C\u5F0F\u9519\u8BEF!")), this.cleanFile(), !1) : (this.record && (console.log(8888), this.editBeforeUpload(a)), !1);
397
+ },
398
+ cleanFile() {
399
+ this.$nextTick(() => {
400
+ setTimeout(() => {
401
+ this.fileList = [], this.form.setFieldsValue({
402
+ fileList: ""
403
+ });
404
+ }, 0);
405
+ });
406
+ },
407
+ getFileType() {
408
+ switch (String(this.uploadType)) {
409
+ case "1":
410
+ return ["text/javascript"];
411
+ case "2":
412
+ return ["image/png", "image/jpeg", "image/gif"];
413
+ case "3":
414
+ return ["text/css"];
415
+ case "4":
416
+ return ["text/html"];
417
+ case "6":
418
+ return ["audio/mpeg", "audio/wav", "audio/x-ms-wma", "audio/mid", "audio/ogg"];
419
+ default:
420
+ return [];
421
+ }
422
+ },
423
+ editBeforeUpload(a) {
424
+ if (this.uploadType == 2)
425
+ return;
426
+ let e = new FormData();
427
+ e.append("file", a), e.append("address", this.apiUrl), e.append("name", this.record.fileName), f(e).then((t) => {
428
+ t.success ? (this.uploadType == 6 && (this.audioPlayerData = Object.assign(
429
+ {
430
+ ...this.audioPlayerData
431
+ },
432
+ {
433
+ title: a.name,
434
+ src: t.data
435
+ }
436
+ )), this.$nextTick(() => {
437
+ setTimeout(() => {
438
+ this.ruleFormData.content = t.data;
439
+ }, 0);
440
+ })) : this.$message.error(this.$i18nt("gd.https.uploadFail", "\u4E0A\u4F20\u5931\u8D25") + t.message);
441
+ });
442
+ },
443
+ handleRemove(a) {
444
+ let e = this.fileList.indexOf(a), t = this.fileList.slice();
445
+ t.splice(e, 1), this.fileList = t, this.uploadType == 6 && (this.audioPlayerData = {}), this.$nextTick(() => {
446
+ setTimeout(() => {
447
+ this.form.setFieldsValue({
448
+ fileList: ""
449
+ });
450
+ }, 0);
451
+ });
452
+ },
453
+ onChange(a) {
454
+ this.uploadType = a, a == 1 ? (this.type = "text/javascript", this.fileFormat = ".js") : a == 2 ? (this.type = "image/png,image/jpeg,image/gif", this.fileFormat = ".gif,.jpeg,.jpg,.png") : a == 3 ? (this.type = "text/css", this.fileFormat = ".css") : a == 4 ? (this.type = "text/html", this.fileFormat = ".html") : a == 5 ? (this.type = "vue", this.fileFormat = ".vue") : a == 6 && (this.type = "audio/mpeg,audio/wav,audio/x-ms-wma,audio/mid,audio/ogg", this.fileFormat = ".wav,.mp3,.wma,.midi,.ogg"), this.fileList = [];
455
+ },
456
+ sysDictTypeDropDown() {
457
+ m({
458
+ code: "web_type"
459
+ }).then((a) => {
460
+ this.typeDict = a.data;
461
+ });
462
+ },
463
+ handleSubmit() {
464
+ this.$refs.ruleForm.validate((a) => {
465
+ a && (this.record ? this.edit(this.ruleFormData) : this.add(this.ruleFormData));
466
+ });
467
+ },
468
+ add(a) {
469
+ let { fileList: e } = this;
470
+ if (e.length == 0)
471
+ return this.$message.error(this.$i18nt("gd.web.selectFileTip", "\u8BF7\u9009\u62E9\u6587\u4EF6!")), !1;
472
+ {
473
+ this.confirmLoading = !0;
474
+ let t = new FormData();
475
+ t.append("file", e[0].raw), t.append("type", a.type), t.append("name", a.name), t.append("displayName", a.displayName), t.append("remark", a.description), t.append("address", this.apiUrl), u(t).then((i) => {
476
+ i.success ? (this.$message.success(this.$i18nt("gd.https.addSucc", "\u65B0\u589E\u6210\u529F")), this.handleCancel(), this.$emit("ok", a)) : this.$message.error(this.$i18nt("gd.https.addFail", "\u65B0\u589E\u5931\u8D25") + i.message), this.confirmLoading = !1;
477
+ }).finally((i) => {
478
+ this.confirmLoading = !1;
479
+ });
480
+ }
481
+ },
482
+ edit(a) {
483
+ this.confirmLoading = !0;
484
+ let { fileList: e } = this, t = new FormData();
485
+ e[0].originFileObj && t.append("file", e[0].originFileObj), t.append("type", a.type), t.append("id", this.record.id), t.append("address", a.address), t.append("addressurl", this.apiUrl), t.append("description", a.description), t.append("content", a.content), p(t).then((i) => {
486
+ i.success ? (this.$message.success(this.$i18nt("gd.https.editSucc", "\u7F16\u8F91\u6210\u529F")), this.handleCancel(), this.$emit("ok", a)) : this.$message.error(this.$i18nt("gd.https.editFail", "\u7F16\u8F91\u5931\u8D25") + i.message), this.confirmLoading = !1;
487
+ }).finally((i) => {
488
+ this.confirmLoading = !1;
489
+ });
490
+ },
491
+ handleCancel() {
492
+ this.visible = !1, this.confirmLoading = !1, this.ruleFormData = {
493
+ type: "1",
494
+ description: "",
495
+ fileList: []
496
+ }, this.$refs.ruleForm.resetFields();
497
+ },
498
+ previewhandleCancel() {
499
+ this.previewVisible = !1;
500
+ },
501
+ doEvent(a) {
502
+ let e = a.item.functionName;
503
+ this[e] && this[e]();
504
+ }
505
+ }
506
+ };
507
+ var v = function() {
508
+ var e = this, t = e._self._c;
509
+ return e.formMode === "dialog" ? 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) {
510
+ e.visible = i;
511
+ }, closed: e.handleCancel } }, [t("gd-modal-title", { attrs: { slot: "title", title: e.title, fullscreen: e.fullscreen, buttons: e.sysViewButtons, confirmLoading: e.confirmLoading, showClose: !0, emitFun: !0 }, on: { changeEvent: e.doEvent, toggleFullscreen: e.togglefullscreen, close: e.handleCancel }, slot: "title" }), t("div", { class: e.fullscreen ? "modal-bodyq" : "modal-body" }, [t("el-form", { directives: [{ name: "loading", rawName: "v-loading", value: e.confirmLoading, expression: "confirmLoading" }], ref: "ruleForm", attrs: { "label-width": "110px", "label-position": e.labelPosition, model: e.ruleFormData, rules: e.rules }, nativeOn: { submit: function(i) {
512
+ i.preventDefault();
513
+ } } }, [t("el-form-item", { attrs: { label: e.$i18nt("gd.web.name", "\u540D\u79F0"), prop: "name" } }, [t("el-input", { attrs: { disabled: e.disabled, placeholder: e.$i18nt("gd.placeholder.input", "\u8BF7\u8F93\u5165"), maxLength: 50 }, model: { value: e.ruleFormData.name, callback: function(i) {
514
+ e.$set(e.ruleFormData, "name", i);
515
+ }, expression: "ruleFormData.name" } })], 1), t("el-form-item", { attrs: { label: e.$i18nt("gd.web.displayName", "\u663E\u793A\u540D\u79F0"), prop: "displayName" } }, [t("el-input", { attrs: { disabled: e.disabled, placeholder: e.$i18nt("gd.placeholder.input", "\u8BF7\u8F93\u5165") }, model: { value: e.ruleFormData.displayName, callback: function(i) {
516
+ e.$set(e.ruleFormData, "displayName", i);
517
+ }, expression: "ruleFormData.displayName" } })], 1), t("el-form-item", { attrs: { label: e.$i18nt("gd.web.type", "\u8D44\u6E90\u7C7B\u578B"), required: !0 } }, [t("el-select", { staticStyle: { width: "100%" }, attrs: { clearable: "", placeholder: e.$i18nt("gd.placeholder.select", "\u8BF7\u9009\u62E9"), disabled: e.disabled }, on: { change: e.onChange }, model: { value: e.ruleFormData.type, callback: function(i) {
518
+ e.$set(e.ruleFormData, "type", i);
519
+ }, expression: "ruleFormData.type" } }, e._l(e.typeDict, function(i, s) {
520
+ return t("el-option", { key: s, attrs: { value: i.code, label: e.$i18nt(`Dynamics.${i.transKey}`, i.value) } });
521
+ }), 1)], 1), t("el-form-item", { attrs: { required: !0, label: e.$i18nt("gd.web.resourceFile", "\u8D44\u6E90\u6587\u4EF6") } }, [e.uploadType == 2 ? t("el-upload", { attrs: { "list-type": "picture-card", "before-upload": e.beforeUpload, "file-list": e.fileList, "on-change": e.handleChange, action: "", accept: e.fileFormat }, on: { preview: e.handlePreview }, model: { value: e.ruleFormData.fileList, callback: function(i) {
522
+ e.$set(e.ruleFormData, "fileList", i);
523
+ }, expression: "ruleFormData.fileList" } }, [e.fileList.length < 1 ? t("div", [t("i", { staticClass: "el-icon-plus" })]) : e._e()]) : t("el-upload", { attrs: { "file-list": e.fileList, "before-upload": e.beforeUpload, "on-change": e.handleChange, remove: e.handleRemove, action: "", accept: e.fileFormat }, model: { value: e.ruleFormData.fileList, callback: function(i) {
524
+ e.$set(e.ruleFormData, "fileList", i);
525
+ }, expression: "ruleFormData.fileList" } }, [t("el-button", [t("i", { staticClass: "el-icon-plus" }), e._v(" " + e._s(e.$i18nt("gd.web.selectFile", "\u9009\u62E9\u6587\u4EF6")) + " ")])], 1)], 1), e.disabled && e.uploadType != 2 && e.uploadType != 6 ? t("el-form-item", { attrs: { label: e.$i18nt("gd.web.resourceContent", "\u8D44\u6E90\u5185\u5BB9"), prop: "content" } }, [t("el-input", { attrs: { type: "textarea", placeholder: e.$i18nt("gd.placeholder.input", "\u8BF7\u8F93\u5165"), rows: 16 }, model: { value: e.ruleFormData.content, callback: function(i) {
526
+ e.$set(e.ruleFormData, "content", i);
527
+ }, expression: "ruleFormData.content" } })], 1) : e._e(), t("el-form-item", { attrs: { label: e.$i18nt("gd.web.remarks", "\u5907\u6CE8"), prop: "description" } }, [t("el-input", { attrs: { type: "textarea", rows: 2, placeholder: e.$i18nt("gd.placeholder.input", "\u8BF7\u8F93\u5165") }, model: { value: e.ruleFormData.description, callback: function(i) {
528
+ e.$set(e.ruleFormData, "description", i);
529
+ }, expression: "ruleFormData.description" } })], 1), e.disabled ? t("el-form-item", { attrs: { label: e.$i18nt("gd.web.path", "\u5730\u5740"), prop: "address" } }, [t("el-input", { attrs: { disabled: e.disabled }, model: { value: e.ruleFormData.address, callback: function(i) {
530
+ e.$set(e.ruleFormData, "address", i);
531
+ }, expression: "ruleFormData.address" } })], 1) : e._e()], 1)], 1), t("el-dialog", { attrs: { visible: e.previewVisible, footer: null }, on: { cancel: e.previewhandleCancel } }, [t("img", { staticStyle: { width: "100%" }, attrs: { alt: "example", src: e.previewImage } })])], 1) : t("el-drawer", { attrs: { visible: e.visible, "close-on-press-escape": !1, "append-to-body": !0, "modal-append-to-body": !1, size: e.width, "custom-class": "gd-drawer-form", "show-close": !1 }, on: { "update:visible": function(i) {
532
+ e.visible = i;
533
+ } } }, [t("gd-modal-title", { attrs: { slot: "title", title: e.title, fullscreen: e.fullscreen, buttons: e.sysViewButtons, confirmLoading: e.confirmLoading, showFullscreen: !1, showClose: !0 }, on: { changeEvent: e.doEvent }, slot: "title" }), t("div", [t("el-form", { directives: [{ name: "loading", rawName: "v-loading", value: e.confirmLoading, expression: "confirmLoading" }], ref: "ruleForm", attrs: { "label-width": "110px", "label-position": e.labelPosition, model: e.ruleFormData, rules: e.rules }, nativeOn: { submit: function(i) {
534
+ i.preventDefault();
535
+ } } }, [t("el-form-item", { attrs: { label: e.$i18nt("gd.web.name", "\u540D\u79F0"), prop: "name" } }, [t("el-input", { attrs: { disabled: e.disabled, placeholder: e.$i18nt("gd.placeholder.input", "\u8BF7\u8F93\u5165"), maxLength: 50 }, model: { value: e.ruleFormData.name, callback: function(i) {
536
+ e.$set(e.ruleFormData, "name", i);
537
+ }, expression: "ruleFormData.name" } })], 1), t("el-form-item", { attrs: { label: e.$i18nt("gd.web.displayName", "\u663E\u793A\u540D\u79F0"), prop: "displayName" } }, [t("el-input", { attrs: { disabled: e.disabled, placeholder: e.$i18nt("gd.placeholder.input", "\u8BF7\u8F93\u5165") }, model: { value: e.ruleFormData.displayName, callback: function(i) {
538
+ e.$set(e.ruleFormData, "displayName", i);
539
+ }, expression: "ruleFormData.displayName" } })], 1), t("el-form-item", { attrs: { label: e.$i18nt("gd.web.type", "\u8D44\u6E90\u7C7B\u578B"), required: !0 } }, [t("el-select", { staticStyle: { width: "100%" }, attrs: { clearable: "", placeholder: e.$i18nt("gd.placeholder.select", "\u8BF7\u9009\u62E9"), disabled: e.disabled }, on: { change: e.onChange }, model: { value: e.ruleFormData.type, callback: function(i) {
540
+ e.$set(e.ruleFormData, "type", i);
541
+ }, expression: "ruleFormData.type" } }, e._l(e.typeDict, function(i, s) {
542
+ return t("el-option", { key: s, attrs: { value: i.code, label: e.$i18nt(`Dynamics.${i.transKey}`, i.value) } });
543
+ }), 1)], 1), t("el-form-item", { attrs: { required: !0, label: e.$i18nt("gd.web.resourceFile", "\u8D44\u6E90\u6587\u4EF6") } }, [e.uploadType == 2 ? t("el-upload", { attrs: { "list-type": "picture-card", "before-upload": e.beforeUpload, "file-list": e.fileList, "on-change": e.handleChange, action: "", accept: e.fileFormat }, on: { preview: e.handlePreview }, model: { value: e.ruleFormData.fileList, callback: function(i) {
544
+ e.$set(e.ruleFormData, "fileList", i);
545
+ }, expression: "ruleFormData.fileList" } }, [e.fileList.length < 1 ? t("div", [t("i", { staticClass: "el-icon-plus" })]) : e._e()]) : t("el-upload", { attrs: { "file-list": e.fileList, "before-upload": e.beforeUpload, "on-change": e.handleChange, remove: e.handleRemove, action: "", accept: e.fileFormat }, model: { value: e.ruleFormData.fileList, callback: function(i) {
546
+ e.$set(e.ruleFormData, "fileList", i);
547
+ }, expression: "ruleFormData.fileList" } }, [t("el-button", [t("i", { staticClass: "el-icon-plus" }), e._v(" " + e._s(e.$i18nt("gd.web.selectFile", "\u9009\u62E9\u6587\u4EF6")) + " ")])], 1)], 1), e.disabled && e.uploadType != 2 && e.uploadType != 6 ? t("el-form-item", { attrs: { label: e.$i18nt("gd.web.resourceContent", "\u8D44\u6E90\u5185\u5BB9"), prop: "content" } }, [t("el-input", { attrs: { type: "textarea", placeholder: e.$i18nt("gd.placeholder.input", "\u8BF7\u8F93\u5165"), rows: 16 }, model: { value: e.ruleFormData.content, callback: function(i) {
548
+ e.$set(e.ruleFormData, "content", i);
549
+ }, expression: "ruleFormData.content" } })], 1) : e._e(), t("el-form-item", { attrs: { label: e.$i18nt("gd.web.remarks", "\u5907\u6CE8"), prop: "description" } }, [t("el-input", { attrs: { type: "textarea", rows: 2, placeholder: e.$i18nt("gd.placeholder.input", "\u8BF7\u8F93\u5165") }, model: { value: e.ruleFormData.description, callback: function(i) {
550
+ e.$set(e.ruleFormData, "description", i);
551
+ }, expression: "ruleFormData.description" } })], 1), e.disabled ? t("el-form-item", { attrs: { label: e.$i18nt("gd.web.path", "\u5730\u5740"), prop: "address" } }, [t("el-input", { attrs: { disabled: e.disabled }, model: { value: e.ruleFormData.address, callback: function(i) {
552
+ e.$set(e.ruleFormData, "address", i);
553
+ }, expression: "ruleFormData.address" } })], 1) : e._e()], 1)], 1)], 1);
554
+ }, $ = [], D = /* @__PURE__ */ d(
555
+ F,
556
+ v,
557
+ $,
558
+ !1,
559
+ null,
560
+ "50d24764",
561
+ null,
562
+ null
563
+ );
564
+ const L = D.exports;
565
+ const _ = {
566
+ name: "GdWebResource",
567
+ props: {
568
+ height: {
569
+ type: Number,
570
+ default: 100
571
+ }
572
+ },
573
+ mixins: [c, b],
574
+ components: {
575
+ editForm: L
576
+ },
577
+ data() {
578
+ return {
579
+ transKey: "gd.btn.add",
580
+ loadData: (a) => h(Object.assign(a, this.queryParam)).then((e) => e.data),
581
+ selectedRows: [],
582
+ selectedRowKeys: [],
583
+ queryParam: {},
584
+ fileList: [],
585
+ formLoading: !1,
586
+ webRes: null,
587
+ uploadType: "1"
588
+ };
589
+ },
590
+ computed: {
591
+ getHeight() {
592
+ return this.height;
593
+ },
594
+ getFormColumns() {
595
+ return this.formColumns.filter((a) => (["\u540D\u79F0", "\u663E\u793A\u540D\u79F0", "\u8D44\u6E90\u7C7B\u578B", "\u5730\u5740"].includes(a.label) && (a.disabled = this.webRes != null), a));
596
+ },
597
+ ...o(["tablePageSize", "tableSize", "labelPosition", "formMode"])
598
+ },
599
+ created() {
600
+ },
601
+ mounted() {
602
+ },
603
+ methods: {
604
+ handleFileUpload() {
605
+ },
606
+ onSelectChange(a, e) {
607
+ this.selectedRows = e, this.selectedRowKeys = a;
608
+ },
609
+ add() {
610
+ this.transKey = "gd.btn.add", this.webRes = null, this.uploadType = "1", this.$refs.editForm.open(null);
611
+ },
612
+ edit() {
613
+ if (this.selectedRowKeys.length === 0) {
614
+ this.$message.warning(this.$i18nt("gd.https.editTip", "\u8BF7\u9009\u62E9\u9700\u8981\u7F16\u8F91\u7684\u6570\u636E!"));
615
+ return;
616
+ }
617
+ if (this.selectedRowKeys.length > 1) {
618
+ this.$message.warning(this.$i18nt("gd.https.editTipOne", "\u53EA\u80FD\u9009\u62E9\u4E00\u6761\u6570\u636E\u7F16\u8F91!"));
619
+ return;
620
+ }
621
+ this.editForm(this.selectedRows[0]);
622
+ },
623
+ del() {
624
+ if (this.selectedRowKeys.length === 0) {
625
+ this.$message.warning(this.$i18nt("gd.https.delTip", "\u8BF7\u9009\u62E9\u9700\u8981\u5220\u9664\u7684\u6570\u636E!"));
626
+ return;
627
+ }
628
+ this.$confirm(this.$i18nt("gd.https.delContent", "\u662F\u5426\u5220\u9664\u9009\u4E2D\u6570\u636E?"), this.$i18nt("gd.https.delTitle", "\u6E29\u99A8\u63D0\u793A"), {
629
+ confirmButtonText: this.$i18nt("gd.https.delOk", "\u786E\u5B9A\u5220\u9664"),
630
+ cancelButtonText: this.$i18nt("gd.https.delCancel", "\u53D6\u6D88"),
631
+ showClose: !1,
632
+ confirmButtonLoading: !1,
633
+ cancelButtonLoading: !1,
634
+ closeOnClickModal: !1,
635
+ type: "warning",
636
+ confirmButtonClass: "el-button--danger",
637
+ customClass: "custom-alert",
638
+ callback: () => {
639
+ },
640
+ beforeClose: (a, e, t) => {
641
+ this.delHand(a, e, t);
642
+ }
643
+ });
644
+ },
645
+ delHand(a, e, t) {
646
+ if (a !== "confirm") {
647
+ t();
648
+ return;
649
+ }
650
+ let i = [];
651
+ this.selectedRows.forEach((s) => {
652
+ let r = g(s).then((l) => l);
653
+ i.push(r);
654
+ }), e.confirmButtonLoading = !0, e.cancelButtonLoading = !0, e.showCancelButton = !1, Promise.all(i).then((s) => {
655
+ e.confirmButtonLoading = !1, e.cancelButtonLoading = !1, e.showCancelButton = !0, t(), e.confirmButtonLoading = !1, e.cancelButtonLoading = !1, e.showCancelButton = !0;
656
+ const r = s.filter((l) => !l.success);
657
+ 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), this.refresh();
658
+ });
659
+ },
660
+ editForm(a) {
661
+ this.transKey = "gd.btn.edit", this.webRes = a, this.initEdit(a);
662
+ },
663
+ initEdit(a) {
664
+ this.$refs.editForm.open(a);
665
+ },
666
+ saveQueries(a) {
667
+ this.queryParam = {
668
+ ...a
669
+ }, this.refresh();
670
+ },
671
+ sbumit({
672
+ data: a,
673
+ record: e,
674
+ btn: t
675
+ }, i, s) {
676
+ this.formLoading = !0, (e ? p : u)(a).then((l) => {
677
+ l.success ? (this.$message.success(this.$i18nt("gd.https.operateSucc", "\u64CD\u4F5C\u6210\u529F")), s(), this.refresh()) : this.$message.error(this.$i18nt("gd.https.operateFail", "\u64CD\u4F5C\u5931\u8D25") + l.message), this.formLoading = !1;
678
+ });
679
+ },
680
+ refresh() {
681
+ this.$refs.table.refresh();
682
+ },
683
+ doEvent(a) {
684
+ let e = a.item.functionName;
685
+ this[e] && this[e]();
686
+ }
687
+ },
688
+ beforeDestroy() {
689
+ }
690
+ };
691
+ var T = function() {
692
+ var e = this, t = e._self._c;
693
+ 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 }, on: { onChange: e.onSelectChange }, scopedSlots: e._u([{ key: "name", fn: function({ column: i, row: s }) {
694
+ return [t("gd-tooltip", { attrs: { rowKey: "name", row: s, highlight: "" }, on: { click: e.editForm } })];
695
+ } }, { key: "type", fn: function(i) {
696
+ return [t("el-tag", { style: e._f("dictColor")("web_type", i.row.type), attrs: { effect: "dark" } }, [e._v(" " + e._s(e._f("dictType")("web_type", i.row.type)) + " ")])];
697
+ } }, { key: "operator", fn: function() {
698
+ 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.web.name", "\u540D\u79F0"), clearable: "" }, nativeOn: { keyup: function(i) {
699
+ return !i.type.indexOf("key") && e._k(i.keyCode, "enter", 13, i.key, "Enter") ? null : e.refresh.apply(null, arguments);
700
+ } }, model: { value: e.queryParam.name, callback: function(i) {
701
+ e.$set(e.queryParam, "name", i);
702
+ }, 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" }, [t("gd-btn-list", { attrs: { sysViewButtons: e.tableButtons }, on: { functionName: e.doEvent } })], 1)])];
703
+ }, proxy: !0 }, { key: "filtering", fn: function({ colse: i, visible: s }) {
704
+ return [t("gd-table-queries-field", { attrs: { columns: e.tableQueries, height: e.getHeight, queryParam: e.queryParam, colse: i, visible: s }, on: { save: e.saveQueries } })];
705
+ } }]) })], 1), t("editForm", { ref: "editForm", attrs: { formMode: e.formMode }, on: { ok: e.refresh } })], 1);
706
+ }, x = [], C = /* @__PURE__ */ d(
707
+ _,
708
+ T,
709
+ x,
710
+ !1,
711
+ null,
712
+ "d700c7ec",
713
+ null,
714
+ null
715
+ );
716
+ const n = C.exports;
717
+ n.install = function(a) {
718
+ a.component(n.name, n);
719
+ };
720
+ export {
721
+ n as G,
722
+ h as s
723
+ };