gds-plus-design-vue 1.1.64 → 1.1.71

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 (71) 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 +80343 -101
  6. package/lib/main.03b24a05.js +1 -0
  7. package/lib/{main.665d9127.mjs → main.3cd24320.mjs} +27 -18
  8. package/lib/main.4cafc3eb.mjs +68 -0
  9. package/lib/main.eea30a23.js +1 -0
  10. package/lib/main.efd6b228.mjs +87 -0
  11. package/lib/main.f1e3ba71.js +1 -0
  12. package/lib/messages.083c4ede.js +9 -0
  13. package/lib/messages.7e85146d.mjs +5802 -0
  14. package/lib/style.css +2 -2
  15. package/lib/system.account.78b852cd.js +216 -0
  16. package/lib/system.account.ae0822f1.mjs +2552 -0
  17. package/lib/system.config.327aded6.js +1 -0
  18. package/lib/system.config.9c46f279.mjs +373 -0
  19. package/lib/system.datasource.4b0951ba.mjs +511 -0
  20. package/lib/system.datasource.8a0c7e0f.js +1 -0
  21. package/lib/system.dict.65f25e4e.mjs +996 -0
  22. package/lib/system.dict.72594c98.js +1 -0
  23. package/lib/system.duplicatechecking.2e9b8df8.js +1 -0
  24. package/lib/system.duplicatechecking.b05f1617.mjs +2130 -0
  25. package/lib/system.email.0899621c.js +41 -0
  26. package/lib/system.email.a4d6d622.mjs +7432 -0
  27. package/lib/system.fieldsecurity.7de4ee1d.mjs +1745 -0
  28. package/lib/system.fieldsecurity.d57edb47.js +1 -0
  29. package/lib/system.file.b3558a8b.js +1 -0
  30. package/lib/system.file.f152d4fe.mjs +489 -0
  31. package/lib/system.log.30e5157c.mjs +1450 -0
  32. package/lib/system.log.f243e7d0.js +1 -0
  33. package/lib/system.machine.325b256e.mjs +94 -0
  34. package/lib/system.machine.332fb31c.js +1 -0
  35. package/lib/system.notice.234d5e47.mjs +636 -0
  36. package/lib/system.notice.540e97ca.js +1 -0
  37. package/lib/system.noticereceived.1fb75290.js +1 -0
  38. package/lib/system.noticereceived.c22372df.mjs +158 -0
  39. package/lib/system.onlineuser.90c08aef.mjs +184 -0
  40. package/lib/system.onlineuser.e0c261ed.js +1 -0
  41. package/lib/system.org.65452f67.js +1 -0
  42. package/lib/system.org.b8d59e5d.mjs +421 -0
  43. package/lib/system.permissions.8b0d3c8c.js +9 -0
  44. package/lib/system.permissions.cba8bd58.mjs +212 -0
  45. package/lib/system.plugin.07b3c38e.js +1 -0
  46. package/lib/system.plugin.4911a33d.mjs +946 -0
  47. package/lib/system.pos.6ed35c39.js +1 -0
  48. package/lib/system.pos.c274f13c.mjs +312 -0
  49. package/lib/system.promptmanagement.8ae0e757.js +1 -0
  50. package/lib/system.promptmanagement.b07ba7b6.mjs +801 -0
  51. package/lib/system.role.53778e38.mjs +1509 -0
  52. package/lib/system.role.c3d74603.js +1 -0
  53. package/lib/system.timers.69f1792a.mjs +3160 -0
  54. package/lib/system.timers.ef6b6796.js +38 -0
  55. package/lib/system.translation.0109917e.js +1 -0
  56. package/lib/system.translation.f79a5244.mjs +665 -0
  57. package/lib/system.user.01a55993.mjs +1425 -0
  58. package/lib/system.user.ea18a84c.js +14 -0
  59. package/lib/system.useraffiliation.1e74fa9e.mjs +1025 -0
  60. package/lib/system.useraffiliation.f3c88a51.js +1 -0
  61. package/lib/system.webresource.5049d97b.js +1 -0
  62. package/lib/system.webresource.e9518d87.mjs +723 -0
  63. package/lib/system.welcome.3f1cce96.mjs +45 -0
  64. package/lib/system.welcome.b109df88.js +1 -0
  65. package/locale/en_US.js +67 -9
  66. package/locale/id_ID.js +66 -8
  67. package/locale/vi_VN.js +66 -8
  68. package/locale/zh_CN.js +65 -8
  69. package/package.json +105 -105
  70. package/lib/gd-initial.umd.js +0 -435
  71. package/lib/index.32120001.mjs +0 -157708
@@ -0,0 +1,511 @@
1
+ import { m as l, n as d } from "./chartbi.48631362.mjs";
2
+ import { t as c } from "./messages.7e85146d.mjs";
3
+ function u(t) {
4
+ return window.axios({
5
+ url: "/sysDataSource/page",
6
+ method: "get",
7
+ params: t
8
+ });
9
+ }
10
+ function p(t) {
11
+ return window.axios({
12
+ url: "/sysDataSource/add",
13
+ method: "post",
14
+ data: t
15
+ });
16
+ }
17
+ function h(t) {
18
+ return window.axios({
19
+ url: "/sysDataSource/delete",
20
+ method: "post",
21
+ data: t
22
+ });
23
+ }
24
+ function g(t) {
25
+ return window.axios({
26
+ url: "/sysDataSource/edit",
27
+ method: "post",
28
+ data: t
29
+ });
30
+ }
31
+ function y(t) {
32
+ return window.axios({
33
+ url: "/sysDataSource/testConnection",
34
+ method: "post",
35
+ data: t
36
+ });
37
+ }
38
+ function f(t) {
39
+ return window.axios({
40
+ url: "/sysDataSource/detail",
41
+ method: "get",
42
+ params: t
43
+ });
44
+ }
45
+ function C(t) {
46
+ return window.axios({
47
+ url: "/sysDataSource/getTableColumns",
48
+ method: "post",
49
+ data: t
50
+ });
51
+ }
52
+ const m = {
53
+ data() {
54
+ return {
55
+ tableColumns: [
56
+ {
57
+ type: "selection",
58
+ width: "60",
59
+ fixed: !0
60
+ },
61
+ {
62
+ type: "selection-radio",
63
+ width: "60",
64
+ fixed: !0
65
+ },
66
+ {
67
+ transKey: "gd.dataSource.name",
68
+ prop: "name",
69
+ label: "\u8FDE\u63A5\u540D\u79F0",
70
+ width: "220",
71
+ type: "slot",
72
+ slotType: "name",
73
+ align: "left",
74
+ fixed: !0,
75
+ renderHeader: (t, ...e) => this.renderHeader(t, ...e, {
76
+ effectType: "input"
77
+ })
78
+ },
79
+ {
80
+ transKey: "gd.dataSource.dataSourceType",
81
+ prop: "datasourcetype",
82
+ label: "\u6570\u636E\u6E90\u7C7B\u578B",
83
+ width: "180",
84
+ type: "slot",
85
+ slotType: "datasourcetype",
86
+ align: "left",
87
+ renderHeader: (t, ...e) => this.renderHeader(t, ...e, {
88
+ effectType: "selectMultiple",
89
+ dictTypeCode: "datasourcetype"
90
+ })
91
+ },
92
+ {
93
+ transKey: "gd.dataSource.host",
94
+ prop: "host",
95
+ width: "200",
96
+ label: "\u4E3B\u673A",
97
+ align: "left"
98
+ },
99
+ {
100
+ transKey: "gd.dataSource.port",
101
+ prop: "port",
102
+ width: "120",
103
+ label: "\u7AEF\u53E3",
104
+ align: "left"
105
+ },
106
+ {
107
+ transKey: "gd.dataSource.database",
108
+ prop: "database",
109
+ width: "180",
110
+ label: "\u6570\u636E\u5E93",
111
+ align: "left"
112
+ },
113
+ {
114
+ transKey: "gd.user.status",
115
+ prop: "statecodes",
116
+ width: "120",
117
+ label: "\u72B6\u6001",
118
+ type: "slot",
119
+ slotType: "statecodes",
120
+ align: "left"
121
+ },
122
+ {
123
+ transKey: "gd.dataSource.connectionString",
124
+ prop: "connectstring",
125
+ width: "260",
126
+ label: "\u8FDE\u63A5\u5B57\u7B26\u4E32",
127
+ align: "left"
128
+ },
129
+ {
130
+ transKey: "gd.fieldSecurity.createdTime",
131
+ prop: "createdtime",
132
+ width: "160",
133
+ label: "\u521B\u5EFA\u65F6\u95F4",
134
+ align: "center"
135
+ },
136
+ {
137
+ transKey: "gd.task.description",
138
+ prop: "description",
139
+ width: "260",
140
+ label: "\u63CF\u8FF0",
141
+ align: "left"
142
+ }
143
+ ],
144
+ formColumns: [{
145
+ transKey: "gd.dataSource.name",
146
+ effectType: "input",
147
+ prop: "name",
148
+ label: "\u8FDE\u63A5\u540D\u79F0",
149
+ placeholder: "\u8BF7\u8F93\u5165",
150
+ placeholderTransKey: "gd.placeholder.input",
151
+ rules: [{
152
+ required: !0,
153
+ message: "\u8BF7\u8F93\u5165",
154
+ transKey: "gd.placeholder.input",
155
+ trigger: "change"
156
+ }]
157
+ }, {
158
+ transKey: "gd.dataSource.dataSourceType",
159
+ prop: "datasourcetype",
160
+ effectType: "select",
161
+ label: "\u6570\u636E\u6E90\u7C7B\u578B",
162
+ placeholder: "\u8BF7\u9009\u62E9",
163
+ placeholderTransKey: "gd.placeholder.select",
164
+ dictTypeCode: "datasourcetype",
165
+ rules: [{
166
+ required: !0,
167
+ message: "\u8BF7\u9009\u62E9",
168
+ transKey: "gd.placeholder.select",
169
+ trigger: "change"
170
+ }]
171
+ }, {
172
+ transKey: "gd.dataSource.host",
173
+ effectType: "input",
174
+ prop: "host",
175
+ label: "\u4E3B\u673A",
176
+ placeholder: "\u8BF7\u8F93\u5165",
177
+ placeholderTransKey: "gd.placeholder.input",
178
+ rules: [{
179
+ required: !0,
180
+ message: "\u8BF7\u8F93\u5165",
181
+ transKey: "gd.placeholder.input",
182
+ trigger: "change"
183
+ }]
184
+ }, {
185
+ transKey: "gd.dataSource.port",
186
+ effectType: "input",
187
+ prop: "port",
188
+ label: "\u7AEF\u53E3",
189
+ placeholder: "\u8BF7\u8F93\u5165",
190
+ placeholderTransKey: "gd.placeholder.input",
191
+ rules: [{
192
+ required: !0,
193
+ message: "\u8BF7\u8F93\u5165",
194
+ transKey: "gd.placeholder.input",
195
+ trigger: "change"
196
+ }]
197
+ }, {
198
+ transKey: "gd.dataSource.database",
199
+ effectType: "input",
200
+ prop: "database",
201
+ label: "\u6570\u636E\u5E93",
202
+ placeholder: "\u8BF7\u8F93\u5165",
203
+ placeholderTransKey: "gd.placeholder.input",
204
+ rules: [{
205
+ required: !0,
206
+ message: "\u8BF7\u8F93\u5165",
207
+ transKey: "gd.placeholder.input",
208
+ trigger: "change"
209
+ }]
210
+ }, {
211
+ transKey: "gd.dataSource.userName",
212
+ effectType: "input",
213
+ prop: "userid",
214
+ label: "\u7528\u6237\u540D",
215
+ placeholder: "\u8BF7\u8F93\u5165",
216
+ placeholderTransKey: "gd.placeholder.input",
217
+ rules: [{
218
+ required: !0,
219
+ message: "\u8BF7\u8F93\u5165",
220
+ transKey: "gd.placeholder.input",
221
+ trigger: "change"
222
+ }]
223
+ }, {
224
+ transKey: "gd.user.paw",
225
+ effectType: "input",
226
+ prop: "password",
227
+ label: "\u5BC6\u7801",
228
+ placeholder: "\u8BF7\u8F93\u5165",
229
+ placeholderTransKey: "gd.placeholder.input",
230
+ rules: [{
231
+ required: !0,
232
+ message: "\u8BF7\u8F93\u5165",
233
+ transKey: "gd.placeholder.input",
234
+ trigger: "change"
235
+ }],
236
+ type: "slot",
237
+ slotType: "password"
238
+ }, {
239
+ transKey: "gd.dataSource.extend",
240
+ effectType: "input",
241
+ prop: "extraparm",
242
+ label: "\u6269\u5C55",
243
+ placeholder: "\u8BF7\u8F93\u5165",
244
+ placeholderTransKey: "gd.placeholder.input",
245
+ rules: []
246
+ }, {
247
+ transKey: "gd.dataSource.connectionString",
248
+ effectType: "textarea",
249
+ prop: "connectstring",
250
+ label: "\u8FDE\u63A5\u5B57\u7B26\u4E32",
251
+ placeholder: "\u8BF7\u8F93\u5165",
252
+ placeholderTransKey: "gd.placeholder.input",
253
+ rules: [],
254
+ autosize: {
255
+ minRows: 4,
256
+ maxRows: 6
257
+ }
258
+ }, {
259
+ transKey: "gd.task.description",
260
+ effectType: "textarea",
261
+ prop: "description",
262
+ label: "\u63CF\u8FF0",
263
+ placeholder: "\u8BF7\u8F93\u5165",
264
+ placeholderTransKey: "gd.placeholder.input",
265
+ rules: [],
266
+ autosize: {
267
+ minRows: 4,
268
+ maxRows: 6
269
+ }
270
+ }],
271
+ tableButtons: [
272
+ {
273
+ displayName: "\u65B0\u589E",
274
+ functionName: "add",
275
+ show: !0,
276
+ transKey: "gd.btn.add",
277
+ icon: "el-icon-plus",
278
+ name: "sysDataSource:add"
279
+ },
280
+ {
281
+ displayName: "\u7F16\u8F91",
282
+ functionName: "edit",
283
+ show: !0,
284
+ transKey: "gd.btn.edit",
285
+ icon: "el-icon-edit",
286
+ name: "sysDataSource:edit"
287
+ },
288
+ {
289
+ displayName: "\u5220\u9664",
290
+ functionName: "del",
291
+ show: !0,
292
+ transKey: "gd.btn.del",
293
+ icon: "el-icon-delete",
294
+ btnType: "danger",
295
+ name: "sysDataSource:delete"
296
+ }
297
+ ],
298
+ formButtons: [{
299
+ displayName: "\u6D4B\u8BD5\u8FDE\u63A5",
300
+ functionName: "handleConnection",
301
+ show: !0,
302
+ transKey: "gd.dataSource.testConnection",
303
+ icon: "el-icon-connection",
304
+ validate: !0
305
+ }, {
306
+ displayName: "\u786E\u5B9A",
307
+ functionName: "handleSubmit",
308
+ show: !0,
309
+ transKey: "gd.btn.confirm",
310
+ icon: "el-icon-document-checked",
311
+ validate: !0
312
+ }],
313
+ tableQueries: [{
314
+ transKey: "gd.dataSource.name",
315
+ prop: "name",
316
+ label: "\u8FDE\u63A5\u540D\u79F0",
317
+ effectType: "input",
318
+ rules: []
319
+ }, {
320
+ transKey: "gd.dataSource.dataSourceType",
321
+ prop: "datasourcetype",
322
+ label: "\u6570\u636E\u6E90\u7C7B\u578B",
323
+ effectType: "selectMultiple",
324
+ dictTypeCode: "datasourcetype",
325
+ rules: []
326
+ }]
327
+ };
328
+ }
329
+ };
330
+ const b = {
331
+ name: "GdDataSource",
332
+ props: {
333
+ height: {
334
+ type: Number,
335
+ default: 100
336
+ },
337
+ openMode: {
338
+ type: [String, Number],
339
+ default: 1
340
+ },
341
+ record: {
342
+ type: Object,
343
+ default: () => ({})
344
+ }
345
+ },
346
+ mixins: [c, m],
347
+ data() {
348
+ return {
349
+ transKey: "gd.btn.add",
350
+ formLoading: !1,
351
+ loading: !0,
352
+ selectedRowKeys: [],
353
+ selectedRows: [],
354
+ queryParam: {},
355
+ type: "password",
356
+ loadData: (t) => u(Object.assign(t, this.queryParam)).then((e) => (e.success && this.openMode == 2 && this.$emit("changeData", e.data.rows), e.data))
357
+ };
358
+ },
359
+ computed: {
360
+ getTableColumns() {
361
+ return this.tableColumns.filter((t) => t.type === "selection" ? this.openMode == 1 : t.type === "selection-radio" ? this.openMode != 1 : !0);
362
+ },
363
+ getHeight() {
364
+ const t = this.openMode == 2 ? 80 : 0;
365
+ return this.height - t;
366
+ },
367
+ ...l(["tablePageSize", "tableSize", "labelPosition", "formMode"])
368
+ },
369
+ methods: {
370
+ swichType() {
371
+ this.type = this.type === "password" ? "text" : "password";
372
+ },
373
+ saveQueries(t) {
374
+ this.queryParam = { ...t }, this.refresh();
375
+ },
376
+ refresh() {
377
+ this.$refs.table.refresh();
378
+ },
379
+ editForm(t) {
380
+ this.transKey = "gd.btn.edit", this.formLoading = !0, this.$refs.editForm.open(t).then((e) => {
381
+ const a = f({ id: t.id });
382
+ e.done(a), this.formLoading = !1;
383
+ });
384
+ },
385
+ del() {
386
+ if (this.selectedRowKeys.length === 0) {
387
+ this.$message.warning(this.$i18nt("gd.https.delTip", "\u8BF7\u9009\u62E9\u8981\u5220\u9664\u7684\u6570\u636E!"));
388
+ return;
389
+ }
390
+ this.$confirm(this.$i18nt("gd.https.delContent", "\u662F\u5426\u5220\u9664\u9009\u4E2D\u6570\u636E?"), this.$i18nt("gd.https.delTitle", "\u6E29\u99A8\u63D0\u793A"), {
391
+ confirmButtonText: this.$i18nt("gd.https.delOk", "\u786E\u5B9A\u5220\u9664"),
392
+ cancelButtonText: this.$i18nt("gd.https.delCancel", "\u53D6\u6D88"),
393
+ showClose: !1,
394
+ confirmButtonLoading: !1,
395
+ cancelButtonLoading: !1,
396
+ closeOnClickModal: !1,
397
+ type: "warning",
398
+ confirmButtonClass: "el-button--danger",
399
+ customClass: "custom-alert",
400
+ callback: () => {
401
+ },
402
+ beforeClose: (t, e, a) => {
403
+ this.delHand(t, e, a);
404
+ }
405
+ });
406
+ },
407
+ delHand(t, e, a) {
408
+ if (t !== "confirm") {
409
+ a();
410
+ return;
411
+ }
412
+ let r = [];
413
+ this.selectedRows.forEach((s) => {
414
+ let o = h(s).then((n) => n);
415
+ r.push(o);
416
+ }), e.confirmButtonLoading = !0, e.cancelButtonLoading = !0, e.showCancelButton = !1, Promise.all(r).then((s) => {
417
+ a();
418
+ const o = s.filter((n) => !n.success);
419
+ o.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") + o[0].message), this.handleOk(), e.confirmButtonLoading = !1, e.cancelButtonLoading = !1, e.showCancelButton = !0;
420
+ });
421
+ },
422
+ add() {
423
+ this.transKey = "gd.btn.add", this.$refs.editForm.open(null);
424
+ },
425
+ async edit() {
426
+ if (this.selectedRowKeys.length === 0) {
427
+ this.$message.warning(this.$i18nt("gd.https.editTip", "\u8BF7\u9009\u62E9\u9700\u8981\u7F16\u8F91\u7684\u6570\u636E!"));
428
+ return;
429
+ }
430
+ if (this.selectedRowKeys.length > 1) {
431
+ this.$message.warning(this.$i18nt("gd.https.editTipOne", "\u53EA\u80FD\u9009\u62E9\u4E00\u6761\u6570\u636E\u7F16\u8F91!"));
432
+ return;
433
+ }
434
+ this.editForm(this.selectedRows[0]);
435
+ },
436
+ sbumit({ data: t, record: e, btn: a }, r, s) {
437
+ let o = a.item.functionName;
438
+ this[o] && this[o]({ data: t, record: e, btn: a }, r, s);
439
+ },
440
+ handleSubmit({ data: t, record: e, btn: a }, r, s) {
441
+ this.formLoading = !0, (e ? g : p)(t).then((n) => {
442
+ n.success ? (this.$message.success(this.$i18nt("gd.https.operateSucc", "\u64CD\u4F5C\u6210\u529F")), s(), this.handleOk()) : this.$message.error(this.$i18nt("gd.https.operateFail", "\u64CD\u4F5C\u5931\u8D25") + n.message), this.formLoading = !1;
443
+ });
444
+ },
445
+ handleConnection({ data: t, record: e, btn: a }, r, s) {
446
+ this.formLoading = !0, y(t).then((o) => {
447
+ o.code === 400 ? this.$message.error(this.$i18nt("gd.https.operateFail", "\u64CD\u4F5C\u5931\u8D25") + o.message) : this.$message.success(this.$i18nt("gd.https.operateSucc", "\u64CD\u4F5C\u6210\u529F")), this.formLoading = !1;
448
+ });
449
+ },
450
+ handleOk() {
451
+ this.$refs.table.refresh();
452
+ },
453
+ onSelectChange(t, e) {
454
+ this.selectedRowKeys = t, this.selectedRows = e;
455
+ },
456
+ dictSwitch(t, e) {
457
+ let a = this.$options.filters.dictData(e).filter((r) => r.code == t)[0];
458
+ return a != null && a.colour ? a.colour : null;
459
+ },
460
+ doEvent(t) {
461
+ let e = t.item.functionName;
462
+ this[e] && this[e]();
463
+ }
464
+ },
465
+ mounted() {
466
+ if (this.openMode == 2 && this.record.options.val !== void 0) {
467
+ const t = typeof this.record.options.val;
468
+ let e = t === "string" || t === "number" ? [this.record.options.val] : [...this.record.options.val];
469
+ this.selectedRowKeys = e.filter((a) => a !== "");
470
+ }
471
+ }
472
+ };
473
+ var w = function() {
474
+ var e = this, a = e._self._c;
475
+ return a("div", { staticClass: "gd-page-view" }, [a("div", { staticClass: "page-view-list", staticStyle: { padding: "0px" } }, [a("gd-tables", { ref: "table", attrs: { dataSource: e.loadData, size: e.tableSize, pageSize: e.tablePageSize, columns: e.getTableColumns, selectedRowKeys: e.selectedRowKeys, height: e.getHeight, filtering: !0 }, on: { onChange: e.onSelectChange }, scopedSlots: e._u([{ key: "name", fn: function({ column: r, row: s }) {
476
+ return [a("gd-tooltip", { attrs: { rowKey: "name", row: s, highlight: "" }, on: { click: e.editForm } })];
477
+ } }, { key: "datasourcetype", fn: function({ column: r, row: s }) {
478
+ return [e.dictSwitch(s.datasourcetype, "datasourcetype") ? a("el-tag", { staticStyle: { "border-color": "transparent" }, attrs: { effect: "dark", color: e.dictSwitch(s.datasourcetype, "datasourcetype") } }, [e._v(" " + e._s(e._f("dictType")("datasourcetype", s.datasourcetype)) + " ")]) : a("span", [e._v(e._s(e._f("dictType")("datasourcetype", s.datasourcetype)))])];
479
+ } }, { key: "statecodes", fn: function({ column: r, row: s }) {
480
+ return [e.dictSwitch(s.statecodes, "state_code") ? a("el-tag", { staticStyle: { "border-color": "transparent" }, attrs: { effect: "dark", color: e.dictSwitch(s.statecodes, "state_code") } }, [e._v(" " + e._s(e._f("dictType")("state_code", s.statecodes)) + " ")]) : a("span", [e._v(e._s(e._f("dictType")("state_code", s.statecodes)))])];
481
+ } }, { key: "operator", fn: function() {
482
+ return [a("div", { staticClass: "gd-table-operator" }, [a("div", { staticClass: "gd-table-operatorl" }, [a("el-input", { staticClass: "table-operator-input", attrs: { placeholder: e.$i18nt("gd.dataSource.name", "\u8FDE\u63A5\u540D\u79F0"), clearable: "" }, nativeOn: { keyup: function(r) {
483
+ return !r.type.indexOf("key") && e._k(r.keyCode, "enter", 13, r.key, "Enter") ? null : e.refresh.apply(null, arguments);
484
+ } }, model: { value: e.queryParam.name, callback: function(r) {
485
+ e.$set(e.queryParam, "name", r);
486
+ }, expression: "queryParam.name" } }), a("div", { staticClass: "table-operator-search", on: { click: e.refresh } }, [a("i", { staticClass: "el-input__icon el-icon-search" })])], 1), a("div", { staticClass: "gd-table-operatorr" }, [a("gd-btn-list", { attrs: { sysViewButtons: e.tableButtons }, on: { functionName: e.doEvent } })], 1)])];
487
+ }, proxy: !0 }, { key: "filtering", fn: function({ colse: r, visible: s }) {
488
+ return [a("gd-table-queries-field", { attrs: { columns: e.tableQueries, height: e.getHeight, queryParam: e.queryParam, colse: r, visible: s }, on: { save: e.saveQueries } })];
489
+ } }]) })], 1), a("gd-edit-form", { ref: "editForm", attrs: { formItemWidth: "90%", loading: e.formLoading, transKey: e.transKey, buttons: e.formButtons, columns: e.formColumns, labelPosition: e.labelPosition, formMode: e.formMode, needLoad: !0 }, on: { sbumit: e.sbumit }, scopedSlots: e._u([{ key: "password", fn: function({ data: r, column: s }) {
490
+ return [a("el-input", { attrs: { type: e.type, placeholder: e.$i18nt("gd.placeholder.input", "\u8BF7\u8F93\u5165") }, model: { value: r[s.prop], callback: function(o) {
491
+ e.$set(r, s.prop, o);
492
+ }, expression: "data[column.prop]" } }, [a("i", { staticClass: "el-input__icon gd-icons", class: e.type === "password" ? "gd-icon-icon-test2" : "gd-icon-icon-test1", staticStyle: { cursor: "pointer" }, attrs: { slot: "suffix" }, on: { click: e.swichType }, slot: "suffix" })])];
493
+ } }]) })], 1);
494
+ }, S = [], K = /* @__PURE__ */ d(
495
+ b,
496
+ w,
497
+ S,
498
+ !1,
499
+ null,
500
+ "3033057f",
501
+ null,
502
+ null
503
+ );
504
+ const i = K.exports;
505
+ i.install = function(t) {
506
+ t.component(i.name, i);
507
+ };
508
+ export {
509
+ i as G,
510
+ C as s
511
+ };
@@ -0,0 +1 @@
1
+ "use strict";const l=require("./chartbi.afd83839.js"),d=require("./messages.083c4ede.js");function c(t){return window.axios({url:"/sysDataSource/page",method:"get",params:t})}function u(t){return window.axios({url:"/sysDataSource/add",method:"post",data:t})}function p(t){return window.axios({url:"/sysDataSource/delete",method:"post",data:t})}function h(t){return window.axios({url:"/sysDataSource/edit",method:"post",data:t})}function g(t){return window.axios({url:"/sysDataSource/testConnection",method:"post",data:t})}function y(t){return window.axios({url:"/sysDataSource/detail",method:"get",params:t})}function f(t){return window.axios({url:"/sysDataSource/getTableColumns",method:"post",data:t})}const m={data(){return{tableColumns:[{type:"selection",width:"60",fixed:!0},{type:"selection-radio",width:"60",fixed:!0},{transKey:"gd.dataSource.name",prop:"name",label:"\u8FDE\u63A5\u540D\u79F0",width:"220",type:"slot",slotType:"name",align:"left",fixed:!0,renderHeader:(t,...e)=>this.renderHeader(t,...e,{effectType:"input"})},{transKey:"gd.dataSource.dataSourceType",prop:"datasourcetype",label:"\u6570\u636E\u6E90\u7C7B\u578B",width:"180",type:"slot",slotType:"datasourcetype",align:"left",renderHeader:(t,...e)=>this.renderHeader(t,...e,{effectType:"selectMultiple",dictTypeCode:"datasourcetype"})},{transKey:"gd.dataSource.host",prop:"host",width:"200",label:"\u4E3B\u673A",align:"left"},{transKey:"gd.dataSource.port",prop:"port",width:"120",label:"\u7AEF\u53E3",align:"left"},{transKey:"gd.dataSource.database",prop:"database",width:"180",label:"\u6570\u636E\u5E93",align:"left"},{transKey:"gd.user.status",prop:"statecodes",width:"120",label:"\u72B6\u6001",type:"slot",slotType:"statecodes",align:"left"},{transKey:"gd.dataSource.connectionString",prop:"connectstring",width:"260",label:"\u8FDE\u63A5\u5B57\u7B26\u4E32",align:"left"},{transKey:"gd.fieldSecurity.createdTime",prop:"createdtime",width:"160",label:"\u521B\u5EFA\u65F6\u95F4",align:"center"},{transKey:"gd.task.description",prop:"description",width:"260",label:"\u63CF\u8FF0",align:"left"}],formColumns:[{transKey:"gd.dataSource.name",effectType:"input",prop:"name",label:"\u8FDE\u63A5\u540D\u79F0",placeholder:"\u8BF7\u8F93\u5165",placeholderTransKey:"gd.placeholder.input",rules:[{required:!0,message:"\u8BF7\u8F93\u5165",transKey:"gd.placeholder.input",trigger:"change"}]},{transKey:"gd.dataSource.dataSourceType",prop:"datasourcetype",effectType:"select",label:"\u6570\u636E\u6E90\u7C7B\u578B",placeholder:"\u8BF7\u9009\u62E9",placeholderTransKey:"gd.placeholder.select",dictTypeCode:"datasourcetype",rules:[{required:!0,message:"\u8BF7\u9009\u62E9",transKey:"gd.placeholder.select",trigger:"change"}]},{transKey:"gd.dataSource.host",effectType:"input",prop:"host",label:"\u4E3B\u673A",placeholder:"\u8BF7\u8F93\u5165",placeholderTransKey:"gd.placeholder.input",rules:[{required:!0,message:"\u8BF7\u8F93\u5165",transKey:"gd.placeholder.input",trigger:"change"}]},{transKey:"gd.dataSource.port",effectType:"input",prop:"port",label:"\u7AEF\u53E3",placeholder:"\u8BF7\u8F93\u5165",placeholderTransKey:"gd.placeholder.input",rules:[{required:!0,message:"\u8BF7\u8F93\u5165",transKey:"gd.placeholder.input",trigger:"change"}]},{transKey:"gd.dataSource.database",effectType:"input",prop:"database",label:"\u6570\u636E\u5E93",placeholder:"\u8BF7\u8F93\u5165",placeholderTransKey:"gd.placeholder.input",rules:[{required:!0,message:"\u8BF7\u8F93\u5165",transKey:"gd.placeholder.input",trigger:"change"}]},{transKey:"gd.dataSource.userName",effectType:"input",prop:"userid",label:"\u7528\u6237\u540D",placeholder:"\u8BF7\u8F93\u5165",placeholderTransKey:"gd.placeholder.input",rules:[{required:!0,message:"\u8BF7\u8F93\u5165",transKey:"gd.placeholder.input",trigger:"change"}]},{transKey:"gd.user.paw",effectType:"input",prop:"password",label:"\u5BC6\u7801",placeholder:"\u8BF7\u8F93\u5165",placeholderTransKey:"gd.placeholder.input",rules:[{required:!0,message:"\u8BF7\u8F93\u5165",transKey:"gd.placeholder.input",trigger:"change"}],type:"slot",slotType:"password"},{transKey:"gd.dataSource.extend",effectType:"input",prop:"extraparm",label:"\u6269\u5C55",placeholder:"\u8BF7\u8F93\u5165",placeholderTransKey:"gd.placeholder.input",rules:[]},{transKey:"gd.dataSource.connectionString",effectType:"textarea",prop:"connectstring",label:"\u8FDE\u63A5\u5B57\u7B26\u4E32",placeholder:"\u8BF7\u8F93\u5165",placeholderTransKey:"gd.placeholder.input",rules:[],autosize:{minRows:4,maxRows:6}},{transKey:"gd.task.description",effectType:"textarea",prop:"description",label:"\u63CF\u8FF0",placeholder:"\u8BF7\u8F93\u5165",placeholderTransKey:"gd.placeholder.input",rules:[],autosize:{minRows:4,maxRows:6}}],tableButtons:[{displayName:"\u65B0\u589E",functionName:"add",show:!0,transKey:"gd.btn.add",icon:"el-icon-plus",name:"sysDataSource:add"},{displayName:"\u7F16\u8F91",functionName:"edit",show:!0,transKey:"gd.btn.edit",icon:"el-icon-edit",name:"sysDataSource:edit"},{displayName:"\u5220\u9664",functionName:"del",show:!0,transKey:"gd.btn.del",icon:"el-icon-delete",btnType:"danger",name:"sysDataSource:delete"}],formButtons:[{displayName:"\u6D4B\u8BD5\u8FDE\u63A5",functionName:"handleConnection",show:!0,transKey:"gd.dataSource.testConnection",icon:"el-icon-connection",validate:!0},{displayName:"\u786E\u5B9A",functionName:"handleSubmit",show:!0,transKey:"gd.btn.confirm",icon:"el-icon-document-checked",validate:!0}],tableQueries:[{transKey:"gd.dataSource.name",prop:"name",label:"\u8FDE\u63A5\u540D\u79F0",effectType:"input",rules:[]},{transKey:"gd.dataSource.dataSourceType",prop:"datasourcetype",label:"\u6570\u636E\u6E90\u7C7B\u578B",effectType:"selectMultiple",dictTypeCode:"datasourcetype",rules:[]}]}}};const b={name:"GdDataSource",props:{height:{type:Number,default:100},openMode:{type:[String,Number],default:1},record:{type:Object,default:()=>({})}},mixins:[d.tablesFilter,m],data(){return{transKey:"gd.btn.add",formLoading:!1,loading:!0,selectedRowKeys:[],selectedRows:[],queryParam:{},type:"password",loadData:t=>c(Object.assign(t,this.queryParam)).then(e=>(e.success&&this.openMode==2&&this.$emit("changeData",e.data.rows),e.data))}},computed:{getTableColumns(){return this.tableColumns.filter(t=>t.type==="selection"?this.openMode==1:t.type==="selection-radio"?this.openMode!=1:!0)},getHeight(){const t=this.openMode==2?80:0;return this.height-t},...l.mapGetters(["tablePageSize","tableSize","labelPosition","formMode"])},methods:{swichType(){this.type=this.type==="password"?"text":"password"},saveQueries(t){this.queryParam={...t},this.refresh()},refresh(){this.$refs.table.refresh()},editForm(t){this.transKey="gd.btn.edit",this.formLoading=!0,this.$refs.editForm.open(t).then(e=>{const a=y({id:t.id});e.done(a),this.formLoading=!1})},del(){if(this.selectedRowKeys.length===0){this.$message.warning(this.$i18nt("gd.https.delTip","\u8BF7\u9009\u62E9\u8981\u5220\u9664\u7684\u6570\u636E!"));return}this.$confirm(this.$i18nt("gd.https.delContent","\u662F\u5426\u5220\u9664\u9009\u4E2D\u6570\u636E?"),this.$i18nt("gd.https.delTitle","\u6E29\u99A8\u63D0\u793A"),{confirmButtonText:this.$i18nt("gd.https.delOk","\u786E\u5B9A\u5220\u9664"),cancelButtonText:this.$i18nt("gd.https.delCancel","\u53D6\u6D88"),showClose:!1,confirmButtonLoading:!1,cancelButtonLoading:!1,closeOnClickModal:!1,type:"warning",confirmButtonClass:"el-button--danger",customClass:"custom-alert",callback:()=>{},beforeClose:(t,e,a)=>{this.delHand(t,e,a)}})},delHand(t,e,a){if(t!=="confirm"){a();return}let r=[];this.selectedRows.forEach(s=>{let o=p(s).then(n=>n);r.push(o)}),e.confirmButtonLoading=!0,e.cancelButtonLoading=!0,e.showCancelButton=!1,Promise.all(r).then(s=>{a();const o=s.filter(n=>!n.success);o.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")+o[0].message),this.handleOk(),e.confirmButtonLoading=!1,e.cancelButtonLoading=!1,e.showCancelButton=!0})},add(){this.transKey="gd.btn.add",this.$refs.editForm.open(null)},async edit(){if(this.selectedRowKeys.length===0){this.$message.warning(this.$i18nt("gd.https.editTip","\u8BF7\u9009\u62E9\u9700\u8981\u7F16\u8F91\u7684\u6570\u636E!"));return}if(this.selectedRowKeys.length>1){this.$message.warning(this.$i18nt("gd.https.editTipOne","\u53EA\u80FD\u9009\u62E9\u4E00\u6761\u6570\u636E\u7F16\u8F91!"));return}this.editForm(this.selectedRows[0])},sbumit({data:t,record:e,btn:a},r,s){let o=a.item.functionName;this[o]&&this[o]({data:t,record:e,btn:a},r,s)},handleSubmit({data:t,record:e,btn:a},r,s){this.formLoading=!0,(e?h:u)(t).then(n=>{n.success?(this.$message.success(this.$i18nt("gd.https.operateSucc","\u64CD\u4F5C\u6210\u529F")),s(),this.handleOk()):this.$message.error(this.$i18nt("gd.https.operateFail","\u64CD\u4F5C\u5931\u8D25")+n.message),this.formLoading=!1})},handleConnection({data:t,record:e,btn:a},r,s){this.formLoading=!0,g(t).then(o=>{o.code===400?this.$message.error(this.$i18nt("gd.https.operateFail","\u64CD\u4F5C\u5931\u8D25")+o.message):this.$message.success(this.$i18nt("gd.https.operateSucc","\u64CD\u4F5C\u6210\u529F")),this.formLoading=!1})},handleOk(){this.$refs.table.refresh()},onSelectChange(t,e){this.selectedRowKeys=t,this.selectedRows=e},dictSwitch(t,e){let a=this.$options.filters.dictData(e).filter(r=>r.code==t)[0];return a!=null&&a.colour?a.colour:null},doEvent(t){let e=t.item.functionName;this[e]&&this[e]()}},mounted(){if(this.openMode==2&&this.record.options.val!==void 0){const t=typeof this.record.options.val;let e=t==="string"||t==="number"?[this.record.options.val]:[...this.record.options.val];this.selectedRowKeys=e.filter(a=>a!=="")}}};var w=function(){var e=this,a=e._self._c;return a("div",{staticClass:"gd-page-view"},[a("div",{staticClass:"page-view-list",staticStyle:{padding:"0px"}},[a("gd-tables",{ref:"table",attrs:{dataSource:e.loadData,size:e.tableSize,pageSize:e.tablePageSize,columns:e.getTableColumns,selectedRowKeys:e.selectedRowKeys,height:e.getHeight,filtering:!0},on:{onChange:e.onSelectChange},scopedSlots:e._u([{key:"name",fn:function({column:r,row:s}){return[a("gd-tooltip",{attrs:{rowKey:"name",row:s,highlight:""},on:{click:e.editForm}})]}},{key:"datasourcetype",fn:function({column:r,row:s}){return[e.dictSwitch(s.datasourcetype,"datasourcetype")?a("el-tag",{staticStyle:{"border-color":"transparent"},attrs:{effect:"dark",color:e.dictSwitch(s.datasourcetype,"datasourcetype")}},[e._v(" "+e._s(e._f("dictType")("datasourcetype",s.datasourcetype))+" ")]):a("span",[e._v(e._s(e._f("dictType")("datasourcetype",s.datasourcetype)))])]}},{key:"statecodes",fn:function({column:r,row:s}){return[e.dictSwitch(s.statecodes,"state_code")?a("el-tag",{staticStyle:{"border-color":"transparent"},attrs:{effect:"dark",color:e.dictSwitch(s.statecodes,"state_code")}},[e._v(" "+e._s(e._f("dictType")("state_code",s.statecodes))+" ")]):a("span",[e._v(e._s(e._f("dictType")("state_code",s.statecodes)))])]}},{key:"operator",fn:function(){return[a("div",{staticClass:"gd-table-operator"},[a("div",{staticClass:"gd-table-operatorl"},[a("el-input",{staticClass:"table-operator-input",attrs:{placeholder:e.$i18nt("gd.dataSource.name","\u8FDE\u63A5\u540D\u79F0"),clearable:""},nativeOn:{keyup:function(r){return!r.type.indexOf("key")&&e._k(r.keyCode,"enter",13,r.key,"Enter")?null:e.refresh.apply(null,arguments)}},model:{value:e.queryParam.name,callback:function(r){e.$set(e.queryParam,"name",r)},expression:"queryParam.name"}}),a("div",{staticClass:"table-operator-search",on:{click:e.refresh}},[a("i",{staticClass:"el-input__icon el-icon-search"})])],1),a("div",{staticClass:"gd-table-operatorr"},[a("gd-btn-list",{attrs:{sysViewButtons:e.tableButtons},on:{functionName:e.doEvent}})],1)])]},proxy:!0},{key:"filtering",fn:function({colse:r,visible:s}){return[a("gd-table-queries-field",{attrs:{columns:e.tableQueries,height:e.getHeight,queryParam:e.queryParam,colse:r,visible:s},on:{save:e.saveQueries}})]}}])})],1),a("gd-edit-form",{ref:"editForm",attrs:{formItemWidth:"90%",loading:e.formLoading,transKey:e.transKey,buttons:e.formButtons,columns:e.formColumns,labelPosition:e.labelPosition,formMode:e.formMode,needLoad:!0},on:{sbumit:e.sbumit},scopedSlots:e._u([{key:"password",fn:function({data:r,column:s}){return[a("el-input",{attrs:{type:e.type,placeholder:e.$i18nt("gd.placeholder.input","\u8BF7\u8F93\u5165")},model:{value:r[s.prop],callback:function(o){e.$set(r,s.prop,o)},expression:"data[column.prop]"}},[a("i",{staticClass:"el-input__icon gd-icons",class:e.type==="password"?"gd-icon-icon-test2":"gd-icon-icon-test1",staticStyle:{cursor:"pointer"},attrs:{slot:"suffix"},on:{click:e.swichType},slot:"suffix"})])]}}])})],1)},S=[],K=l.normalizeComponent(b,w,S,!1,null,"3033057f",null,null);const i=K.exports;i.install=function(t){t.component(i.name,i)};exports.GDpackage=i;exports.sysDataSourceColumns=f;