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