act-plus 1.1.43 → 1.1.45

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,253 +0,0 @@
1
- import { defineAsyncComponent as ee, inject as x, ref as R, watch as le, resolveComponent as i, resolveDirective as ae, unref as l, openBlock as n, createElementBlock as $, createVNode as te, normalizeStyle as oe, withCtx as h, Fragment as E, renderList as D, withDirectives as z, createBlock as u, mergeProps as m, withKeys as A, withModifiers as F, createCommentVNode as g, vShow as re, createTextVNode as Y, toDisplayString as B } from "vue";
2
- import { _ as ne, u as se, P as ue, a as de, b as pe } from "./index-6818b5e9.js";
3
- import "vue-router";
4
- import "js-base64";
5
- import "element-plus";
6
- import "monaco-editor";
7
- const ie = {
8
- key: 0,
9
- class: "search-module-container"
10
- }, ce = {
11
- __name: "index",
12
- props: {
13
- data: { type: Object, default: () => ({}) }
14
- },
15
- emits: ["reset", "search"],
16
- setup(H, { emit: W }) {
17
- const j = ee(() => import("./index-6818b5e9.js").then((o) => o.t)), { t: d } = se(), I = x("request"), p = x("getFieldUiProps"), L = x("formatDataType"), M = W, _ = H;
18
- let f = R([]), O = R([]), C = R(!0);
19
- const K = (o) => _.data.tableConfig.isExpandQuery && C.value ? _.data.tableConfig.tableQueryRowWidth > o + 1 : !0, G = (o) => {
20
- f.value = (o || []).filter((t) => t.useScenes.includes("tableSearch"));
21
- }, J = (o) => {
22
- const t = (o || []).filter((r) => r.permissionCode === 1001).map((r) => ({ ...r, loading: !1 }));
23
- O.value = [...t, { btnName: d("act.reset"), permissionCode: "9999", btnColor: "info", btnIcon: "btn-reset", loading: !1 }];
24
- }, X = async ({ node: o, resolve: t }, r) => {
25
- const b = p(r), { label: w, value: U, children: Q, isLeaf: q } = { ...pe, ...b.treeProps || {} };
26
- if (o[q])
27
- return t([]);
28
- const v = r.postRequestParams.filter((s) => s.submitType === "default").reduce((s, V) => (s[V.submitName] = L(V.paramsType, V.submitValue), s), {}), k = r.postRequestParams.filter((s) => s.submitType === "dynamic").map((s) => ({
29
- field: s.submitName,
30
- operate: s.submitMatchType,
31
- value: b.loadCode ? o == null ? void 0 : o.data.value : L(s.paramsType, s.submitValue)
32
- }));
33
- let y = {};
34
- Object.keys(v).length && (y = { ...y, ...v }), k.length && (y.dynamicFilters = k), b.loadCode && Reflect.has(y, b.loadCode) && (y[b.loadCode] = o == null ? void 0 : o.data.value);
35
- const { data: T } = await I({
36
- url: r.fieldRequestUrl,
37
- method: r.fieldRequestType || "GET",
38
- data: y
39
- }), S = (T || []).map((s) => ({ label: s[w], value: s[U], children: [], isLeaf: s[q] }));
40
- t(S);
41
- };
42
- le(
43
- () => _.data,
44
- (o, t) => {
45
- G(o.fields), J(o.buttons);
46
- },
47
- { immediate: !0 }
48
- );
49
- const c = (o) => {
50
- switch (o.loading = !0, o.permissionCode) {
51
- case "9999":
52
- f.value.forEach((r) => {
53
- r.fieldType.includes("&") ? r.queryValue = [] : r.queryValue = void 0;
54
- }), M("reset", [], () => {
55
- o.loading = !1;
56
- });
57
- break;
58
- default:
59
- const t = f.value.filter((r) => Array.isArray(r.queryValue) ? r.queryValue.length : !!r.queryValue);
60
- M("search", t, () => {
61
- o.loading = !1;
62
- });
63
- break;
64
- }
65
- }, Z = () => {
66
- C.value = !C.value;
67
- };
68
- return (o, t) => {
69
- var V;
70
- const r = i("el-input"), b = i("el-option"), w = i("el-select"), U = i("el-select-v2"), Q = i("el-cascader"), q = i("el-tree-select"), v = i("el-date-picker"), k = i("el-form-item"), y = i("a-svg-icon"), T = i("el-button"), S = i("el-form"), s = ae("debounce");
71
- return l(f) && l(f).length ? (n(), $("div", ie, [
72
- te(S, {
73
- style: oe({ "--table-query-row": _.data.tableConfig.tableQueryRowWidth }),
74
- class: "form-content",
75
- ref: "elForm",
76
- "label-suffix": ":",
77
- "label-position": "right"
78
- }, {
79
- default: h(() => [
80
- (n(!0), $(E, null, D(l(f), (e, P) => z((n(), u(k, {
81
- key: P,
82
- class: "search-form-item",
83
- "label-width": _.data.tableConfig.tableQueryLabelWidth,
84
- label: e.fieldName
85
- }, {
86
- default: h(() => [
87
- e.fieldType === "input" || e.fieldType === "editor" ? (n(), u(r, m({
88
- key: 0,
89
- modelValue: e.queryValue,
90
- "onUpdate:modelValue": (a) => e.queryValue = a,
91
- placeholder: `${l(d)("act.inputPlaceholder")}${e.fieldName}`,
92
- clearable: "",
93
- ref_for: !0
94
- }, l(p)(e), {
95
- onKeyup: t[0] || (t[0] = A(F((a) => c({ permissionCode: 1001 }), ["prevent"]), ["enter", "native"]))
96
- }), null, 16, ["modelValue", "onUpdate:modelValue", "placeholder"])) : g("", !0),
97
- e.fieldType === "inputNumber" ? (n(), u(l(j), m({
98
- key: 1,
99
- modelValue: e.queryValue,
100
- "onUpdate:modelValue": (a) => e.queryValue = a,
101
- placeholder: `${l(d)("act.inputPlaceholder")}${e.fieldName}`,
102
- clearable: "",
103
- onKeyup: t[1] || (t[1] = A(F((a) => c({ permissionCode: 1001 }), ["prevent"]), ["enter", "native"])),
104
- ref_for: !0
105
- }, l(p)(e)), null, 16, ["modelValue", "onUpdate:modelValue", "placeholder"])) : ["select", "switch", "multipleSelect"].includes(e.fieldType) ? (n(), u(w, m({
106
- key: 2,
107
- modelValue: e.queryValue,
108
- "onUpdate:modelValue": (a) => e.queryValue = a,
109
- placeholder: `${l(d)("act.selectPlaceholder")}${e.fieldName}`,
110
- clearable: "",
111
- filterable: "",
112
- ref_for: !0
113
- }, l(p)(e), {
114
- multiple: e.fieldType === "multipleSelect",
115
- "collapse-tags": e.fieldType === "multipleSelect",
116
- "collapse-tags-tooltip": e.fieldType === "multipleSelect",
117
- onChange: t[2] || (t[2] = (a) => c({ permissionCode: 1001 }))
118
- }), {
119
- default: h(() => [
120
- (n(!0), $(E, null, D(e.dataList, (a, N) => (n(), u(b, {
121
- key: N,
122
- label: a.key,
123
- value: a.value
124
- }, null, 8, ["label", "value"]))), 128))
125
- ]),
126
- _: 2
127
- }, 1040, ["modelValue", "onUpdate:modelValue", "placeholder", "multiple", "collapse-tags", "collapse-tags-tooltip"])) : ["virtualizedSelect", "virtualizedMultipleSelect"].includes(e.fieldType) ? (n(), u(U, m({
128
- key: 3,
129
- modelValue: e.queryValue,
130
- "onUpdate:modelValue": (a) => e.queryValue = a,
131
- options: e.dataList,
132
- props: { ...l(ue) },
133
- placeholder: `${l(d)("act.selectPlaceholder")}${e.fieldName}`,
134
- clearable: "",
135
- filterable: "",
136
- ref_for: !0
137
- }, l(p)(e), {
138
- "collapse-tags": e.fieldType === "virtualizedMultipleSelect",
139
- "collapse-tags-tooltip": e.fieldType === "virtualizedMultipleSelect",
140
- multiple: e.fieldType === "virtualizedMultipleSelect",
141
- onChange: t[3] || (t[3] = (a) => c({ permissionCode: 1001 }))
142
- }), null, 16, ["modelValue", "onUpdate:modelValue", "options", "props", "placeholder", "collapse-tags", "collapse-tags-tooltip", "multiple"])) : e.fieldType === "provinceCascade" ? (n(), u(Q, m({
143
- key: 4,
144
- modelValue: e.queryValue,
145
- "onUpdate:modelValue": (a) => e.queryValue = a,
146
- options: e.dataList,
147
- props: { ...l(de) },
148
- clearable: "",
149
- filterable: "",
150
- placeholder: `${l(d)("act.selectPlaceholder")}${e.fieldName}`,
151
- ref_for: !0
152
- }, l(p)(e), {
153
- onChange: t[4] || (t[4] = (a) => c({ permissionCode: 1001 }))
154
- }), null, 16, ["modelValue", "onUpdate:modelValue", "options", "props", "placeholder"])) : e.fieldType === "treeSelect" ? (n(), u(q, m({
155
- key: 5,
156
- modelValue: e.queryValue,
157
- "onUpdate:modelValue": (a) => e.queryValue = a,
158
- placeholder: `请选择${e.fieldName}`,
159
- props: { isLeaf: "isLeaf" },
160
- "render-after-expand": !1,
161
- "collapse-tags": "",
162
- "collapse-tags-tooltip": "",
163
- multiple: "",
164
- "show-checkbox": "",
165
- clearable: "",
166
- filterable: "",
167
- lazy: "",
168
- load: (a, N) => X({ node: a, resolve: N }, e),
169
- ref_for: !0
170
- }, l(p)(e), {
171
- onChange: t[5] || (t[5] = (a) => c({ permissionCode: 1001 }))
172
- }), null, 16, ["modelValue", "onUpdate:modelValue", "placeholder", "load"])) : e.fieldType === "date" ? (n(), u(v, m({
173
- key: 6,
174
- modelValue: e.queryValue,
175
- "onUpdate:modelValue": (a) => e.queryValue = a,
176
- type: "date",
177
- placeholder: `${l(d)("act.selectPlaceholder")}${l(d)("act.time")}`,
178
- "value-format": "YYYY-MM-DD HH:mm:ss",
179
- ref_for: !0
180
- }, l(p)(e), {
181
- "value-key": l(p)(e).value,
182
- "node-key": l(p)(e).value,
183
- onChange: t[6] || (t[6] = (a) => c({ permissionCode: 1001 }))
184
- }), null, 16, ["modelValue", "onUpdate:modelValue", "placeholder", "value-key", "node-key"])) : e.fieldType === "dateRange" ? (n(), u(v, m({
185
- key: 7,
186
- modelValue: e.queryValue,
187
- "onUpdate:modelValue": (a) => e.queryValue = a,
188
- type: "daterange",
189
- "start-placeholder": l(d)("act.startTime"),
190
- "end-placeholder": l(d)("act.endTime"),
191
- "value-format": "YYYY-MM-DD HH:mm:ss",
192
- ref_for: !0
193
- }, l(p)(e), {
194
- onChange: t[7] || (t[7] = (a) => c({ permissionCode: 1001 }))
195
- }), null, 16, ["modelValue", "onUpdate:modelValue", "start-placeholder", "end-placeholder"])) : g("", !0)
196
- ]),
197
- _: 2
198
- }, 1032, ["label-width", "label"])), [
199
- [re, K(P)]
200
- ])), 128)),
201
- l(f).length ? (n(), u(k, {
202
- key: 0,
203
- class: "search-form-btn",
204
- "label-width": "0"
205
- }, {
206
- default: h(() => [
207
- (n(!0), $(E, null, D(l(O), (e, P) => z((n(), u(T, {
208
- key: P,
209
- type: e.btnColor,
210
- loading: e.loading,
211
- onClick: (a) => c(e)
212
- }, {
213
- default: h(() => [
214
- e.btnIcon ? (n(), u(y, {
215
- key: 0,
216
- class: "mr6",
217
- name: e.btnIcon,
218
- width: "12",
219
- height: "12",
220
- color: "#fff"
221
- }, null, 8, ["name"])) : g("", !0),
222
- Y(" " + B(e.btnName), 1)
223
- ]),
224
- _: 2
225
- }, 1032, ["type", "loading", "onClick"])), [
226
- [s]
227
- ])), 128))
228
- ]),
229
- _: 1
230
- })) : g("", !0)
231
- ]),
232
- _: 1
233
- }, 8, ["style"]),
234
- _.data.tableConfig.isExpandQuery && ((V = l(f)) == null ? void 0 : V.length) > _.data.tableConfig.tableQueryRowWidth ? (n(), u(T, {
235
- key: 0,
236
- class: "expand",
237
- text: "",
238
- size: "small",
239
- icon: l(C) ? "ArrowDown" : "ArrowUp",
240
- onClick: Z
241
- }, {
242
- default: h(() => [
243
- Y(B(l(C) ? l(d)("act.expand") : l(d)("act.retract")), 1)
244
- ]),
245
- _: 1
246
- }, 8, ["icon"])) : g("", !0)
247
- ])) : g("", !0);
248
- };
249
- }
250
- }, he = /* @__PURE__ */ ne(ce, [["__scopeId", "data-v-e748430f"]]);
251
- export {
252
- he as default
253
- };