act-plus 1.1.40 → 1.1.41

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,416 +0,0 @@
1
- import { inject as z, ref as T, watch as j, resolveComponent as i, openBlock as s, createBlock as b, withCtx as l, createVNode as e, unref as u, createTextVNode as B, createElementBlock as y, Fragment as U, renderList as w, createCommentVNode as x } from "vue";
2
- import { S as I } from "./enum-d734222c.js";
3
- import { _ as M } from "./index-c18badb4.js";
4
- import "vue-router";
5
- import "js-base64";
6
- import "element-plus";
7
- import "monaco-editor";
8
- const A = {
9
- __name: "configTable",
10
- props: {
11
- modelValue: { type: Object, default: () => ({}) }
12
- },
13
- emits: ["update:modelValue"],
14
- setup(F, { expose: Q, emit: D }) {
15
- const v = F, N = () => ({
16
- dataUrl: void 0,
17
- defaultParams: [],
18
- isCheckRow: !1,
19
- isOperateRow: !0,
20
- isPagination: !0,
21
- isSerialNumber: !0,
22
- isSort: !0,
23
- isExpandQuery: !1,
24
- tableOperateCellWidth: 160,
25
- pageSize: 10,
26
- tableQueryLabelWidth: 100,
27
- tableQueryRowWidth: 5
28
- }), O = z("conditionList")();
29
- let h = T(null), a = T(N());
30
- j(
31
- () => v.modelValue,
32
- (m, o) => {
33
- if (m) {
34
- if (!Object.keys(m).length)
35
- return;
36
- const p = { ...m, defaultParams: [...m.defaultParams || []] };
37
- Object.keys(a.value).forEach((d) => {
38
- ["defaultParams"].includes(d) ? a.value[d] = [...p[d] || []] : a.value[d] = p[d];
39
- });
40
- }
41
- },
42
- { deep: !0, immediate: !0 }
43
- );
44
- const W = () => {
45
- a.value.defaultParams.push({ submitFieldName: "", defaultValue: "", matchValue: "", submitFieldType: "" });
46
- }, q = (m) => {
47
- a.value.defaultParams.splice(m, 1);
48
- }, P = (m) => {
49
- m || (a.value.pageSize = 10);
50
- };
51
- return Q({ formRef: h, form: a }), (m, o) => {
52
- const p = i("el-input"), d = i("el-form-item"), n = i("el-col"), V = i("el-row"), k = i("el-button"), C = i("el-divider"), S = i("el-option"), R = i("el-select"), f = i("el-switch"), c = i("el-input-number"), E = i("el-form"), L = i("el-card");
53
- return s(), b(L, {
54
- class: "form-card",
55
- shadow: "hover",
56
- header: "表格配置"
57
- }, {
58
- default: l(() => [
59
- e(E, {
60
- ref_key: "formRef",
61
- ref: h,
62
- model: u(a),
63
- "label-suffix": ":",
64
- "label-width": "120"
65
- }, {
66
- default: l(() => [
67
- e(V, null, {
68
- default: l(() => [
69
- e(n, { span: 24 }, {
70
- default: l(() => [
71
- e(d, {
72
- label: "表格数据url",
73
- prop: "dataUrl",
74
- rules: [{ required: !0, message: "必填项", trigger: "blur" }]
75
- }, {
76
- default: l(() => [
77
- e(p, {
78
- modelValue: u(a).dataUrl,
79
- "onUpdate:modelValue": o[0] || (o[0] = (t) => u(a).dataUrl = t),
80
- placeholder: "请输入",
81
- clearable: ""
82
- }, null, 8, ["modelValue"])
83
- ]),
84
- _: 1
85
- })
86
- ]),
87
- _: 1
88
- })
89
- ]),
90
- _: 1
91
- }),
92
- e(C, { "content-position": "left" }, {
93
- default: l(() => [
94
- o[11] || (o[11] = B(" 表格默认参数配置 ")),
95
- e(k, {
96
- class: "add-icon-btn",
97
- type: "primary",
98
- icon: "Plus",
99
- circle: "",
100
- onClick: W
101
- })
102
- ]),
103
- _: 1
104
- }),
105
- (s(!0), y(U, null, w(u(a).defaultParams, (t, _) => (s(), b(V, {
106
- class: "table-post-params",
107
- key: _
108
- }, {
109
- default: l(() => [
110
- e(n, { span: 12 }, {
111
- default: l(() => [
112
- e(d, {
113
- label: "字段",
114
- rules: [{ required: !0, message: "必填项", trigger: "blur" }],
115
- prop: "defaultParams." + _ + ".submitFieldName"
116
- }, {
117
- default: l(() => [
118
- e(p, {
119
- modelValue: t.submitFieldName,
120
- "onUpdate:modelValue": (r) => t.submitFieldName = r,
121
- placeholder: "请输入",
122
- clearable: ""
123
- }, null, 8, ["modelValue", "onUpdate:modelValue"])
124
- ]),
125
- _: 2
126
- }, 1032, ["prop"])
127
- ]),
128
- _: 2
129
- }, 1024),
130
- e(n, { span: 12 }, {
131
- default: l(() => [
132
- e(d, {
133
- label: "匹配条件",
134
- rules: [{ required: !0, message: "必填项", trigger: "change" }],
135
- prop: "defaultParams." + _ + ".matchValue"
136
- }, {
137
- default: l(() => [
138
- e(R, {
139
- modelValue: t.matchValue,
140
- "onUpdate:modelValue": (r) => t.matchValue = r,
141
- placeholder: "请选择",
142
- filterable: "",
143
- clearable: ""
144
- }, {
145
- default: l(() => [
146
- (s(!0), y(U, null, w(u(O), (r, g) => (s(), b(S, {
147
- key: g,
148
- label: r.key,
149
- value: r.value
150
- }, null, 8, ["label", "value"]))), 128))
151
- ]),
152
- _: 2
153
- }, 1032, ["modelValue", "onUpdate:modelValue"])
154
- ]),
155
- _: 2
156
- }, 1032, ["prop"])
157
- ]),
158
- _: 2
159
- }, 1024),
160
- e(n, { span: 12 }, {
161
- default: l(() => [
162
- e(d, {
163
- label: "默认值",
164
- rules: [{ required: !0, message: "必填项", trigger: "blur" }],
165
- prop: "defaultParams." + _ + ".defaultValue"
166
- }, {
167
- default: l(() => [
168
- e(p, {
169
- modelValue: t.defaultValue,
170
- "onUpdate:modelValue": (r) => t.defaultValue = r,
171
- placeholder: "请输入",
172
- clearable: ""
173
- }, null, 8, ["modelValue", "onUpdate:modelValue"])
174
- ]),
175
- _: 2
176
- }, 1032, ["prop"])
177
- ]),
178
- _: 2
179
- }, 1024),
180
- e(n, { span: 12 }, {
181
- default: l(() => [
182
- e(d, {
183
- label: "提交类型",
184
- rules: [{ required: !0, message: "必填项", trigger: "change" }],
185
- prop: "defaultParams." + _ + ".submitFieldType"
186
- }, {
187
- default: l(() => [
188
- e(R, {
189
- modelValue: t.submitFieldType,
190
- "onUpdate:modelValue": (r) => t.submitFieldType = r,
191
- placeholder: "请选择",
192
- filterable: "",
193
- clearable: ""
194
- }, {
195
- default: l(() => [
196
- (s(!0), y(U, null, w(u(I), (r, g) => (s(), b(S, {
197
- key: g,
198
- label: r.key,
199
- value: r.value
200
- }, null, 8, ["label", "value"]))), 128))
201
- ]),
202
- _: 2
203
- }, 1032, ["modelValue", "onUpdate:modelValue"])
204
- ]),
205
- _: 2
206
- }, 1032, ["prop"])
207
- ]),
208
- _: 2
209
- }, 1024),
210
- e(C, { "content-position": "left" }),
211
- e(n, {
212
- class: "submit-operate",
213
- span: 2
214
- }, {
215
- default: l(() => [
216
- e(k, {
217
- class: "match-opreate",
218
- type: "danger",
219
- icon: "Minus",
220
- circle: "",
221
- onClick: (r) => q(_)
222
- }, null, 8, ["onClick"])
223
- ]),
224
- _: 2
225
- }, 1024)
226
- ]),
227
- _: 2
228
- }, 1024))), 128)),
229
- e(V, null, {
230
- default: l(() => [
231
- e(n, { span: 4 }, {
232
- default: l(() => [
233
- e(d, { label: "多选列" }, {
234
- default: l(() => [
235
- e(f, {
236
- modelValue: u(a).isCheckRow,
237
- "onUpdate:modelValue": o[1] || (o[1] = (t) => u(a).isCheckRow = t)
238
- }, null, 8, ["modelValue"])
239
- ]),
240
- _: 1
241
- })
242
- ]),
243
- _: 1
244
- }),
245
- e(n, { span: 4 }, {
246
- default: l(() => [
247
- e(d, { label: "操作列" }, {
248
- default: l(() => [
249
- e(f, {
250
- modelValue: u(a).isOperateRow,
251
- "onUpdate:modelValue": o[2] || (o[2] = (t) => u(a).isOperateRow = t)
252
- }, null, 8, ["modelValue"])
253
- ]),
254
- _: 1
255
- })
256
- ]),
257
- _: 1
258
- }),
259
- e(n, { span: 4 }, {
260
- default: l(() => [
261
- e(d, { label: "分页" }, {
262
- default: l(() => [
263
- e(f, {
264
- modelValue: u(a).isPagination,
265
- "onUpdate:modelValue": o[3] || (o[3] = (t) => u(a).isPagination = t),
266
- onChange: P
267
- }, null, 8, ["modelValue"])
268
- ]),
269
- _: 1
270
- })
271
- ]),
272
- _: 1
273
- }),
274
- e(n, { span: 4 }, {
275
- default: l(() => [
276
- e(d, { label: "序号列" }, {
277
- default: l(() => [
278
- e(f, {
279
- modelValue: u(a).isSerialNumber,
280
- "onUpdate:modelValue": o[4] || (o[4] = (t) => u(a).isSerialNumber = t)
281
- }, null, 8, ["modelValue"])
282
- ]),
283
- _: 1
284
- })
285
- ]),
286
- _: 1
287
- }),
288
- e(n, { span: 4 }, {
289
- default: l(() => [
290
- e(d, { label: "排序" }, {
291
- default: l(() => [
292
- e(f, {
293
- modelValue: u(a).isSort,
294
- "onUpdate:modelValue": o[5] || (o[5] = (t) => u(a).isSort = t)
295
- }, null, 8, ["modelValue"])
296
- ]),
297
- _: 1
298
- })
299
- ]),
300
- _: 1
301
- }),
302
- e(n, { span: 6 }, {
303
- default: l(() => [
304
- e(d, { label: "展/收查询条件" }, {
305
- default: l(() => [
306
- e(f, {
307
- modelValue: u(a).isExpandQuery,
308
- "onUpdate:modelValue": o[6] || (o[6] = (t) => u(a).isExpandQuery = t),
309
- onChange: P
310
- }, null, 8, ["modelValue"])
311
- ]),
312
- _: 1
313
- })
314
- ]),
315
- _: 1
316
- })
317
- ]),
318
- _: 1
319
- }),
320
- e(V, null, {
321
- default: l(() => [
322
- u(a).isOperateRow ? (s(), b(n, {
323
- key: 0,
324
- span: 12
325
- }, {
326
- default: l(() => [
327
- e(d, {
328
- label: "操作列宽度",
329
- "label-width": "140"
330
- }, {
331
- default: l(() => [
332
- e(c, {
333
- modelValue: u(a).tableOperateCellWidth,
334
- "onUpdate:modelValue": o[7] || (o[7] = (t) => u(a).tableOperateCellWidth = t),
335
- min: 120
336
- }, null, 8, ["modelValue"])
337
- ]),
338
- _: 1
339
- })
340
- ]),
341
- _: 1
342
- })) : x("", !0),
343
- u(a).isPagination ? (s(), b(n, {
344
- key: 1,
345
- span: 12
346
- }, {
347
- default: l(() => [
348
- e(d, {
349
- label: "分页页数",
350
- prop: "pageSize",
351
- "label-width": "140",
352
- rules: [{ required: !0, message: "必填项", trigger: "blur" }]
353
- }, {
354
- default: l(() => [
355
- e(c, {
356
- modelValue: u(a).pageSize,
357
- "onUpdate:modelValue": o[8] || (o[8] = (t) => u(a).pageSize = t),
358
- min: 10
359
- }, null, 8, ["modelValue"])
360
- ]),
361
- _: 1
362
- })
363
- ]),
364
- _: 1
365
- })) : x("", !0),
366
- e(n, { span: 12 }, {
367
- default: l(() => [
368
- e(d, {
369
- label: "查询条件label宽度",
370
- "label-width": "140"
371
- }, {
372
- default: l(() => [
373
- e(c, {
374
- modelValue: u(a).tableQueryLabelWidth,
375
- "onUpdate:modelValue": o[9] || (o[9] = (t) => u(a).tableQueryLabelWidth = t),
376
- min: 80
377
- }, null, 8, ["modelValue"])
378
- ]),
379
- _: 1
380
- })
381
- ]),
382
- _: 1
383
- }),
384
- e(n, { span: 12 }, {
385
- default: l(() => [
386
- e(d, {
387
- label: "查询条件列数",
388
- "label-width": "140"
389
- }, {
390
- default: l(() => [
391
- e(c, {
392
- modelValue: u(a).tableQueryRowWidth,
393
- "onUpdate:modelValue": o[10] || (o[10] = (t) => u(a).tableQueryRowWidth = t),
394
- min: 1
395
- }, null, 8, ["modelValue"])
396
- ]),
397
- _: 1
398
- })
399
- ]),
400
- _: 1
401
- })
402
- ]),
403
- _: 1
404
- })
405
- ]),
406
- _: 1
407
- }, 8, ["model"])
408
- ]),
409
- _: 1
410
- });
411
- };
412
- }
413
- }, Z = /* @__PURE__ */ M(A, [["__scopeId", "data-v-ada54450"]]);
414
- export {
415
- Z as default
416
- };
@@ -1,188 +0,0 @@
1
- import { inject as O, computed as E, reactive as H, ref as v, watch as K, resolveComponent as r, resolveDirective as w, openBlock as f, createBlock as c, withCtx as i, createElementVNode as P, createVNode as m, unref as l, createTextVNode as V, withDirectives as D, createElementBlock as W, Fragment as G, renderList as Q } from "vue";
2
- import { useRoute as $ } from "vue-router";
3
- import { _ as z } from "./index-c18badb4.js";
4
- import "js-base64";
5
- import "element-plus";
6
- import "monaco-editor";
7
- const J = { class: "dialog-footer" }, M = {
8
- __name: "dialogInitConfig",
9
- props: {
10
- visible: { type: Boolean, default: !1 },
11
- title: { type: String, default: "" },
12
- data: { type: Object, default: () => ({}) }
13
- },
14
- emits: ["update:visible", "refresh"],
15
- setup(L, { emit: k }) {
16
- const N = $(), y = O("request"), C = k, p = L;
17
- E(() => N.params.key);
18
- const T = () => ({
19
- dataBase: "",
20
- api: ""
21
- });
22
- let a = H((() => ({
23
- loading: !1,
24
- btnLoading: !1
25
- }))()), B = v([]), g = v(null), o = v(T());
26
- const q = (e) => y({ url: "/api/v1/scripts/getAllDatabaseTable", method: "get", data: e }), F = async () => {
27
- try {
28
- a.loading = !0;
29
- const { data: e } = await q();
30
- B.value = e || [], a.loading = !1;
31
- } catch (e) {
32
- console.error(e), a.loading = !1;
33
- }
34
- };
35
- K(
36
- () => p.visible,
37
- async (e, t) => {
38
- e && await F();
39
- }
40
- );
41
- const x = () => ({
42
- sort: 0,
43
- fieldName: void 0,
44
- fieldKey: void 0,
45
- fieldType: void 0,
46
- fieldUiProps: "",
47
- fieldSubmitType: "string",
48
- fieldRequestType: "GET",
49
- fieldRequestUrl: void 0,
50
- postRequestParams: [],
51
- useScenes: [],
52
- formColumnCol: 12,
53
- formCustomComponentes: [],
54
- customTableHeaderName: "",
55
- customTableHeaderUrl: "",
56
- isFormFieldRequired: !0,
57
- isFormSetValue: !0,
58
- isFormDisabled: !1,
59
- tableQueryCondition: void 0,
60
- tableCellWidthType: "min",
61
- tableCellWidth: "120",
62
- tableCellAlignType: "center",
63
- tableCellContentType: "default",
64
- isTableCellOverflowTooltip: !0,
65
- isTableCellSort: !0
66
- }), R = (e) => {
67
- b(), e();
68
- }, b = () => {
69
- o.value = Object.assign(o.value, T()), g.value.resetFields(), C("update:visible", !1);
70
- }, I = (e) => {
71
- e && e.validate(async (t) => {
72
- if (t)
73
- try {
74
- a.btnLoading = !0;
75
- const { data: d } = await y({ url: "/api/v1/scripts/getAllColumnsByTableName", method: "get", params: { tableName: o.value.dataBase } }), _ = (d || []).map((u) => {
76
- let s = x();
77
- return s.fieldName = u.comment, s.fieldKey = u.name, s.fieldType = "string", s;
78
- });
79
- C("refresh", { formList: _ }, () => {
80
- b();
81
- }), a.btnLoading = !1;
82
- } catch (d) {
83
- console.error(d), a.btnLoading = !1;
84
- }
85
- });
86
- };
87
- return (e, t) => {
88
- const d = r("el-option"), _ = r("el-select"), u = r("el-form-item"), s = r("el-input"), S = r("el-form"), h = r("el-button"), U = r("el-dialog"), j = w("loading"), A = w("debounce");
89
- return f(), c(U, {
90
- "model-value": p.visible,
91
- title: p.title,
92
- top: "10vh",
93
- width: "600",
94
- draggable: "",
95
- overflow: "",
96
- "close-on-click-modal": !1,
97
- "before-close": R
98
- }, {
99
- footer: i(() => [
100
- P("span", J, [
101
- m(h, {
102
- loading: l(a).btnLoading,
103
- onClick: b
104
- }, {
105
- default: i(() => t[3] || (t[3] = [
106
- V("取消")
107
- ])),
108
- _: 1
109
- }, 8, ["loading"]),
110
- D((f(), c(h, {
111
- type: "primary",
112
- loading: l(a).btnLoading,
113
- onClick: t[2] || (t[2] = (n) => I(l(g)))
114
- }, {
115
- default: i(() => t[4] || (t[4] = [
116
- V("保存")
117
- ])),
118
- _: 1
119
- }, 8, ["loading"])), [
120
- [A]
121
- ])
122
- ])
123
- ]),
124
- default: i(() => [
125
- D((f(), c(S, {
126
- ref_key: "formRef",
127
- ref: g,
128
- model: l(o),
129
- "label-suffix": ":",
130
- "label-position": "top"
131
- }, {
132
- default: i(() => [
133
- m(u, {
134
- label: "数据库",
135
- "label-width": "120",
136
- rules: [{ required: !1, message: "必填项", trigger: "change" }],
137
- prop: "dataBase"
138
- }, {
139
- default: i(() => [
140
- m(_, {
141
- modelValue: l(o).dataBase,
142
- "onUpdate:modelValue": t[0] || (t[0] = (n) => l(o).dataBase = n),
143
- placeholder: "请选择数据库",
144
- clearable: "",
145
- filterable: ""
146
- }, {
147
- default: i(() => [
148
- (f(!0), W(G, null, Q(l(B), (n, Y) => (f(), c(d, {
149
- key: n,
150
- label: n.tableComment,
151
- value: n.tableName
152
- }, null, 8, ["label", "value"]))), 128))
153
- ]),
154
- _: 1
155
- }, 8, ["modelValue"])
156
- ]),
157
- _: 1
158
- }),
159
- m(u, {
160
- label: "接口地址(关键字)",
161
- "label-width": "120",
162
- rules: [{ required: !1, message: "必填项", trigger: "change" }],
163
- prop: "api"
164
- }, {
165
- default: i(() => [
166
- m(s, {
167
- modelValue: l(o).api,
168
- "onUpdate:modelValue": t[1] || (t[1] = (n) => l(o).api = n),
169
- placeholder: "请输入接口地址(关键字)",
170
- clearable: ""
171
- }, null, 8, ["modelValue"])
172
- ]),
173
- _: 1
174
- })
175
- ]),
176
- _: 1
177
- }, 8, ["model"])), [
178
- [j, l(a).loading]
179
- ])
180
- ]),
181
- _: 1
182
- }, 8, ["model-value", "title"]);
183
- };
184
- }
185
- }, ne = /* @__PURE__ */ z(M, [["__scopeId", "data-v-c63f456e"]]);
186
- export {
187
- ne as default
188
- };