act-plus 1.1.41 → 1.1.43

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
- import { defineAsyncComponent as L, inject as T, ref as K, watch as Te, resolveComponent as _, resolveDirective as ee, openBlock as u, createBlock as p, withCtx as C, createElementVNode as le, createVNode as ae, createTextVNode as W, toDisplayString as $, unref as i, withDirectives as oe, createElementBlock as k, Fragment as A, renderList as G, mergeProps as g, createCommentVNode as te, resolveDynamicComponent as De, toRaw as Ke } from "vue";
2
- import { _ as we, u as Ne, P as Ue, a as ke, b as Pe } from "./index-40115216.js";
1
+ import { defineAsyncComponent as $, inject as T, ref as K, watch as Te, resolveComponent as _, resolveDirective as ee, openBlock as n, createBlock as p, withCtx as C, createElementVNode as le, createVNode as ae, createTextVNode as W, toDisplayString as A, unref as i, withDirectives as oe, createElementBlock as k, Fragment as O, renderList as G, mergeProps as v, createCommentVNode as te, resolveDynamicComponent as De, toRaw as Ke } from "vue";
2
+ import { _ as we, u as Ne, P as Ue, a as ke, b as Pe } from "./index-6818b5e9.js";
3
3
  import { ElNotification as Se } from "element-plus";
4
4
  import "vue-router";
5
5
  import "js-base64";
@@ -13,57 +13,57 @@ const Re = { class: "no-config-field" }, Le = { class: "dialog-footer" }, $e = {
13
13
  },
14
14
  emits: ["update:visible", "refresh"],
15
15
  setup(w, { emit: se }) {
16
- const de = L(() => import("./index-40115216.js").then((l) => l.t)), re = L(() => import("./index-4398f116.js")), ie = L(() => import("./index-40115216.js").then((l) => l.s)), ne = L(() => import("./index-40115216.js").then((l) => l.r)), { t: m } = Ne(), O = T("request"), ue = T("loadComponents"), P = T("formatDataType"), J = T("globalProps"), ce = T("stringToBoolean"), b = T("getFieldUiProps"), fe = T("disposeRequestData"), Q = se, f = w, S = K(!1), R = K(!1), q = K(null), N = K([]), o = K({}), x = K({}), pe = (l) => l.formColumnCol == null || l.customFiledsComponentes[l.customFiledsComponentes.customComponentName] ? 24 : l.formColumnCol ? l.formColumnCol : 24 / l.formRow, me = (l) => ["input", "textarea"].includes(l.fieldType) ? "blur" : (["select", "multipleSelect", "datetimerange", "treeSelect", "provinceCascade"].includes(l.fieldType), "change"), ye = async ({ node: l, resolve: c }, a) => {
17
- const r = b(a), { label: t, value: h, children: F, isLeaf: s } = { ...Pe, ...r.treeProps || {} };
16
+ const re = $(() => import("./index-6818b5e9.js").then((l) => l.t)), de = $(() => import("./index-5d5f6688.js")), ie = $(() => import("./index-6818b5e9.js").then((l) => l.s)), ne = $(() => import("./index-6818b5e9.js").then((l) => l.r)), { t: m } = Ne(), q = T("request"), ue = T("loadComponents"), P = T("formatDataType"), J = T("globalProps"), ce = T("stringToBoolean"), b = T("getFieldUiProps"), fe = T("disposeRequestData"), Q = se, f = w, S = K(!1), R = K(!1), x = K(null), L = K([]), o = K({}), M = K({}), pe = (l) => l.formColumnCol == null || l.customFiledsComponentes[l.customFiledsComponentes.customComponentName] ? 24 : l.formColumnCol ? l.formColumnCol : 24 / l.formRow, me = (l) => ["input", "textarea"].includes(l.fieldType) ? "blur" : (["select", "multipleSelect", "datetimerange", "treeSelect", "provinceCascade"].includes(l.fieldType), "change"), ye = async ({ node: l, resolve: c }, a) => {
17
+ const d = b(a), { label: t, value: h, children: F, isLeaf: s } = { ...Pe, ...d.treeProps || {} };
18
18
  if (l[s])
19
19
  return c([]);
20
- const n = a.postRequestParams.filter((y) => y.submitType === "default").reduce((y, D) => (y[D.submitName] = P(D.paramsType, D.submitValue), y), {}), v = a.postRequestParams.filter((y) => y.submitType === "dynamic").map((y) => ({
20
+ const u = a.postRequestParams.filter((y) => y.submitType === "default").reduce((y, D) => (y[D.submitName] = P(D.paramsType, D.submitValue), y), {}), g = a.postRequestParams.filter((y) => y.submitType === "dynamic").map((y) => ({
21
21
  field: y.submitName,
22
22
  operate: y.submitMatchType,
23
- value: r.loadCode ? l == null ? void 0 : l.data.value : P(y.paramsType, y.submitValue)
23
+ value: d.loadCode ? l == null ? void 0 : l.data.value : P(y.paramsType, y.submitValue)
24
24
  }));
25
25
  let V = {};
26
- Object.keys(n).length && (V = { ...V, ...n }), v.length && (V.dynamicFilters = v), r.loadCode && Reflect.has(V, r.loadCode) && (V[r.loadCode] = l == null ? void 0 : l.data.value);
27
- const { data: z } = await O({
26
+ Object.keys(u).length && (V = { ...V, ...u }), g.length && (V.dynamicFilters = g), d.loadCode && Reflect.has(V, d.loadCode) && (V[d.loadCode] = l == null ? void 0 : l.data.value);
27
+ const { data: N } = await q({
28
28
  url: a.fieldRequestUrl,
29
29
  method: a.fieldRequestType || "GET",
30
30
  data: V
31
- }), B = (z || []).map((y) => ({ label: y[t], value: y[h], children: [], isLeaf: y[s] }));
31
+ }), B = (N || []).map((y) => ({ label: y[t], value: y[h], children: [], isLeaf: y[s] }));
32
32
  c(B);
33
- }, M = (l) => {
33
+ }, E = (l) => {
34
34
  if (!["input", "textarea"].includes(l)) {
35
35
  if (["multipleSelect", "dateRange"].includes(l))
36
36
  return [];
37
37
  if (["switch"].includes(l))
38
38
  return !1;
39
39
  }
40
- }, E = (l, c) => {
40
+ }, j = (l, c) => {
41
41
  if (["string"].includes(c))
42
- return l.sort((a, r) => a.sort - r.sort).join(";");
42
+ return l.sort((a, d) => a.sort - d.sort).join(";");
43
43
  if (["number"].includes(c))
44
44
  return Number(l);
45
45
  if (["array"].includes(c))
46
- return l.sort((a, r) => a.sort - r.sort);
47
- }, j = (l, c = !1) => {
46
+ return l.sort((a, d) => a.sort - d.sort);
47
+ }, Y = (l, c = !1) => {
48
48
  if (["multipleSelect"].includes(l.fieldType))
49
- return f.data.rowData[l.fieldKey] ? f.data.rowData[l.fieldKey].split(";").map((r) => c ? { value: r } : r) : [];
49
+ return f.data.rowData[l.fieldKey] ? f.data.rowData[l.fieldKey].split(";").map((d) => c ? { value: d } : d) : [];
50
50
  if (["virtualizedMultipleSelect"].includes(l.fieldType))
51
51
  return f.data.rowData[l.fieldKey] ? f.data.rowData[l.fieldKey].split(";") : [];
52
52
  if (["dateRange"].includes(l.fieldType)) {
53
- const r = l.fieldKey.split("&");
54
- return f.data.rowData[l.fieldKey] = r.map((t) => f.data.rowData[t]), f.data.rowData[l.fieldKey];
53
+ const d = l.fieldKey.split("&");
54
+ return f.data.rowData[l.fieldKey] = d.map((t) => f.data.rowData[t]), f.data.rowData[l.fieldKey];
55
55
  }
56
56
  let a = f.data.rowData[l.fieldKey];
57
57
  if (["select"].includes(l.fieldType)) {
58
- const r = b(l);
59
- l.dataList && typeof l.dataList[0][r["value-key"] ? r["value-key"] : "value"] == "string" && a !== null && (a = c ? { value: a.toString() } : a.toString());
58
+ const d = b(l);
59
+ l.dataList && typeof l.dataList[0][d["value-key"] ? d["value-key"] : "value"] == "string" && a !== null && (a = c ? { value: a.toString() } : a.toString());
60
60
  }
61
61
  if (["virtualizedSelect"].includes(l.fieldType)) {
62
- const r = b(l);
63
- l.dataList && typeof l.dataList[0][r["value-key"] ? r["value-key"] : "value"] == "string" && a !== null && (a = a.toString());
62
+ const d = b(l);
63
+ l.dataList && typeof l.dataList[0][d["value-key"] ? d["value-key"] : "value"] == "string" && a !== null && (a = a.toString());
64
64
  }
65
65
  return (a === "true" || a === "false") && (a = ce(a)), a;
66
- }, be = (l) => O({ url: f.data.dataItem.requestUrl, method: "post", data: l });
66
+ }, be = (l) => q({ url: f.data.dataItem.requestUrl, method: "post", data: l });
67
67
  Te(
68
68
  () => f.visible,
69
69
  async (l, c) => {
@@ -71,59 +71,60 @@ const Re = { class: "no-config-field" }, Le = { class: "dialog-footer" }, $e = {
71
71
  if (l)
72
72
  try {
73
73
  S.value = !0;
74
- const r = await fe(f.data.formList, f.data.rowData, !1, !0);
75
- N.value = await Promise.all(
74
+ const d = await fe(f.data.formList, f.data.rowData, !1, !0);
75
+ L.value = await Promise.all(
76
76
  (((a = f.data) == null ? void 0 : a.formList) ?? []).sort((t, h) => t.sort - h.sort).map(async (t) => {
77
- const h = r.find((v) => t.fieldName == v.fieldName && t.fieldKey == v.fieldKey);
78
- h && (t.dataList = (h == null ? void 0 : h.dataList) ?? []), ["select", "multipleSelect"].includes(t.fieldType) && (o.value[`${t.fieldKey}ActImplicit`] = Object.keys(f.data.rowData).length && t.isFormSetValue ? j(t, !0) : M(t.fieldType)), o.value[t.fieldKey] = Object.keys(f.data.rowData).length && t.isFormSetValue ? j(t) : M(t.fieldType);
79
- const { isFiledCustom: F, customComponentName: s, customComponentUrl: n } = t.customFiledsComponentes;
77
+ const h = d.find((g) => t.fieldName == g.fieldName && t.fieldKey == g.fieldKey);
78
+ h && (t.dataList = (h == null ? void 0 : h.dataList) ?? []), ["select", "multipleSelect"].includes(t.fieldType) && (o.value[`${t.fieldKey}ActImplicit`] = Object.keys(f.data.rowData).length && t.isFormSetValue ? Y(t, !0) : E(t.fieldType)), o.value[t.fieldKey] = Object.keys(f.data.rowData).length && t.isFormSetValue ? Y(t) : E(t.fieldType);
79
+ const { isFiledCustom: F, customComponentName: s, customComponentUrl: u } = t.customFiledsComponentes;
80
80
  if (F && !t.customFiledsComponentes[s]) {
81
- const v = await ue(n, s);
82
- t.customFiledsComponentes[s] = v;
81
+ const g = await ue(u, s);
82
+ t.customFiledsComponentes[s] = g;
83
83
  }
84
84
  return t;
85
85
  })
86
- ), console.log(N.value), S.value = !1;
87
- } catch (r) {
88
- console.error(r), S.value = !1;
86
+ ), S.value = !1;
87
+ } catch (d) {
88
+ console.error(d), S.value = !1;
89
89
  }
90
90
  }
91
91
  );
92
92
  const he = (l) => {
93
- Y(), l();
94
- }, Y = () => {
95
- N.value = [], q.value.resetFields(), Q("update:visible", !1);
93
+ z(), l();
94
+ }, z = () => {
95
+ L.value = [], x.value.resetFields(), Q("update:visible", !1);
96
96
  }, _e = (l, c) => {
97
- const a = b(c), { fieldKey: r, fieldType: t } = c;
97
+ const a = b(c), { fieldKey: d, fieldType: t } = c;
98
98
  if (t === "multipleSelect") {
99
99
  const h = l.filter((s) => typeof s == "string"), F = l.filter((s) => typeof s != "string").map((s) => s.value);
100
- o.value[a.createFieldKey] = h.length ? E(h, "string") : void 0, o.value[r] = F.length ? E(F, "string") : void 0;
100
+ o.value[a.createFieldKey] = h.length ? j(h, "string") : void 0, o.value[d] = F.length ? j(F, "string") : void 0;
101
101
  } else
102
- typeof l == "string" ? (o.value[a.createFieldKey] = l, o.value[r] = void 0) : (o.value[r] = l.value, delete o.value[a.createFieldKey]);
102
+ typeof l == "string" ? (o.value[a.createFieldKey] = l, o.value[d] = void 0) : (o.value[d] = l.value, delete o.value[a.createFieldKey]);
103
103
  }, ge = (l) => {
104
104
  l && l.validate((c) => {
105
105
  if (c) {
106
- const { dataItem: a, rowData: r } = f.data;
106
+ const { dataItem: a, rowData: d } = f.data;
107
107
  let t = { ...Ke(o.value) };
108
108
  Object.keys(t).forEach((s) => {
109
109
  if (s.includes("ActImplicit")) {
110
110
  delete t[s];
111
111
  return;
112
112
  }
113
- s.includes("&") ? s.split("&").forEach((v, V) => {
114
- t[v] = t[s][V];
115
- }) : Array.isArray(t[s]) && N.value.some((n) => n.fieldKey === s && !n.customFiledsComponentes.isFiledCustom) && (t[s] = E(t[s], "string"));
113
+ const u = L.value.find((g) => g.fieldKey === s);
114
+ s.includes("&") ? s.split("&").forEach((V, N) => {
115
+ t[V] = t[s][N];
116
+ }) : Array.isArray(t[s]) && u.fieldSubmitType == "string" && (t[s] = j(t[s], "string"));
116
117
  });
117
- const h = a.submitFields.filter((s) => s.matchType == "default").reduce((s, n) => (n.submitFieldType === "string" && (s[n.submitFieldName] = n.matchFieldName.toString()), s), {}), F = a.submitFields.filter((s) => s.matchType == "match").reduce((s, n) => (Reflect.has(n, "submitFieldMatchOrigin") && n.submitFieldMatchOrigin != "rowData" ? Reflect.has(J.matchData, n.submitFieldMatchOrigin) && (s[n.submitFieldName] = P(n.submitFieldType, J.matchData[n.submitFieldMatchOrigin][n.matchFieldName])) : s[n.submitFieldName] = P(n.submitFieldType, r[n.matchFieldName]), s), {});
118
+ const h = a.submitFields.filter((s) => s.matchType == "default").reduce((s, u) => (u.submitFieldType === "string" && (s[u.submitFieldName] = u.matchFieldName.toString()), s), {}), F = a.submitFields.filter((s) => s.matchType == "match").reduce((s, u) => (Reflect.has(u, "submitFieldMatchOrigin") && u.submitFieldMatchOrigin != "rowData" ? Reflect.has(J.matchData, u.submitFieldMatchOrigin) && (s[u.submitFieldName] = P(u.submitFieldType, J.matchData[u.submitFieldMatchOrigin][u.matchFieldName])) : s[u.submitFieldName] = P(u.submitFieldType, d[u.matchFieldName]), s), {});
118
119
  be({
119
120
  ...t,
120
121
  ...h,
121
122
  ...F
122
123
  }).then((s) => {
123
124
  try {
124
- Se({ title: m("act.tip"), message: m("act.saveSuccessfully"), type: "success", duration: 2500 }), Y(), Q("refresh");
125
- } catch (n) {
126
- console.error(n);
125
+ Se({ title: m("act.tip"), message: m("act.saveSuccessfully"), type: "success", duration: 2500 }), z(), Q("refresh");
126
+ } catch (u) {
127
+ console.error(u);
127
128
  }
128
129
  R.value = !1;
129
130
  }).catch((s) => {
@@ -132,18 +133,18 @@ const Re = { class: "no-config-field" }, Le = { class: "dialog-footer" }, $e = {
132
133
  }
133
134
  });
134
135
  }, ve = (l) => {
135
- const c = Object.keys(x.value).map((a) => {
136
- var r;
137
- return (r = x.value[a]) == null ? void 0 : r.updateFormData(o.value);
136
+ const c = Object.keys(M.value).map((a) => {
137
+ var d;
138
+ return (d = M.value[a]) == null ? void 0 : d.updateFormData(o.value);
138
139
  }).filter((a) => a);
139
140
  Promise.all([l.validate(), ...c]).then((a) => {
140
- a.every((r) => r) && ge(l);
141
+ a.every((d) => d) && ge(l);
141
142
  }).catch((a) => (console.error(a), a));
142
143
  };
143
144
  return (l, c) => {
144
145
  var X;
145
- const a = _("el-input"), r = _("el-option"), t = _("el-select"), h = _("el-select-v2"), F = _("el-tree-select"), s = _("el-date-picker"), n = _("el-cascader"), v = _("el-switch"), V = _("el-form-item"), z = _("el-col"), B = _("el-row"), y = _("el-form"), D = _("el-button"), Ve = _("el-dialog"), Ce = ee("loading"), Fe = ee("debounce");
146
- return u(), p(Ve, {
146
+ const a = _("el-input"), d = _("el-option"), t = _("el-select"), h = _("el-select-v2"), F = _("el-tree-select"), s = _("el-date-picker"), u = _("el-cascader"), g = _("el-switch"), V = _("el-form-item"), N = _("el-col"), B = _("el-row"), y = _("el-form"), D = _("el-button"), Ve = _("el-dialog"), Ce = ee("loading"), Fe = ee("debounce");
147
+ return n(), p(Ve, {
147
148
  "model-value": f.visible,
148
149
  title: f.title,
149
150
  top: "5vh",
@@ -159,20 +160,20 @@ const Re = { class: "no-config-field" }, Le = { class: "dialog-footer" }, $e = {
159
160
  le("span", Le, [
160
161
  ae(D, {
161
162
  loading: R.value,
162
- onClick: Y
163
+ onClick: z
163
164
  }, {
164
165
  default: C(() => [
165
- W($(i(m)("act.cancel")), 1)
166
+ W(A(i(m)("act.cancel")), 1)
166
167
  ]),
167
168
  _: 1
168
169
  }, 8, ["loading"]),
169
- oe((u(), p(D, {
170
+ oe((n(), p(D, {
170
171
  type: "primary",
171
172
  loading: R.value,
172
- onClick: c[1] || (c[1] = (H) => ve(q.value))
173
+ onClick: c[1] || (c[1] = (H) => ve(x.value))
173
174
  }, {
174
175
  default: C(() => [
175
- W($(i(m)("act.save")), 1)
176
+ W(A(i(m)("act.save")), 1)
176
177
  ]),
177
178
  _: 1
178
179
  }, 8, ["loading"])), [
@@ -183,10 +184,10 @@ const Re = { class: "no-config-field" }, Le = { class: "dialog-footer" }, $e = {
183
184
  default: C(() => {
184
185
  var H, Z;
185
186
  return [
186
- oe((u(), p(y, {
187
+ oe((n(), p(y, {
187
188
  class: "a-form",
188
189
  ref_key: "formRef",
189
- ref: q,
190
+ ref: x,
190
191
  model: o.value,
191
192
  "label-suffix": ":",
192
193
  "label-width": (H = w.data.formConfig) == null ? void 0 : H.formLabelWidth,
@@ -195,69 +196,69 @@ const Re = { class: "no-config-field" }, Le = { class: "dialog-footer" }, $e = {
195
196
  default: C(() => [
196
197
  ae(B, { gutter: 40 }, {
197
198
  default: C(() => [
198
- (u(!0), k(A, null, G(N.value, (e, I) => (u(), p(z, {
199
+ (n(!0), k(O, null, G(L.value, (e, I) => (n(), p(N, {
199
200
  span: pe(e),
200
201
  key: I
201
202
  }, {
202
203
  default: C(() => [
203
- e.customFiledsComponentes.isFiledCustom ? (u(), k(A, { key: 1 }, [
204
- e.customFiledsComponentes[e.customFiledsComponentes.customComponentName] ? (u(), p(De(e.customFiledsComponentes[e.customFiledsComponentes.customComponentName]), {
204
+ e.customFiledsComponentes.isFiledCustom ? (n(), k(O, { key: 1 }, [
205
+ e.customFiledsComponentes[e.customFiledsComponentes.customComponentName] ? (n(), p(De(e.customFiledsComponentes[e.customFiledsComponentes.customComponentName]), {
205
206
  key: 0,
206
207
  ref_for: !0,
207
- ref: (d) => x.value[e.customFiledsComponentes.customComponentName] = d,
208
+ ref: (r) => M.value[e.customFiledsComponentes.customComponentName] = r,
208
209
  formConfig: w.data.formConfig,
209
210
  item: e,
210
211
  rowData: f.data.rowData,
211
212
  visible: f.visible,
212
213
  form: o.value,
213
- "onUpdate:form": c[0] || (c[0] = (d) => o.value = d)
214
- }, null, 40, ["formConfig", "item", "rowData", "visible", "form"])) : (u(), k("div", {
214
+ "onUpdate:form": c[0] || (c[0] = (r) => o.value = r)
215
+ }, null, 40, ["formConfig", "item", "rowData", "visible", "form"])) : (n(), k("div", {
215
216
  class: "no-config",
216
217
  key: I
217
218
  }, [
218
- le("span", Re, "【" + $(e.fieldName) + "】", 1),
219
- W($(i(m)("act.fieldCustom")), 1)
219
+ le("span", Re, "【" + A(e.fieldName) + "】", 1),
220
+ W(A(i(m)("act.fieldCustom")), 1)
220
221
  ]))
221
- ], 64)) : (u(), p(V, {
222
+ ], 64)) : (n(), p(V, {
222
223
  key: 0,
223
224
  label: e.fieldName,
224
225
  prop: ["select", "multipleSelect"].includes(e.fieldType) ? `${e.fieldKey}ActImplicit` : e.fieldKey,
225
226
  rules: [{ required: e.isFormFieldRequired, message: i(m)("act.requiredMessage"), trigger: me(e) }]
226
227
  }, {
227
228
  default: C(() => [
228
- e.fieldType === "input" ? (u(), p(a, g({
229
+ e.fieldType === "input" ? (n(), p(a, v({
229
230
  key: 0,
230
231
  modelValue: o.value[e.fieldKey],
231
- "onUpdate:modelValue": (d) => o.value[e.fieldKey] = d,
232
+ "onUpdate:modelValue": (r) => o.value[e.fieldKey] = r,
232
233
  placeholder: `${i(m)("act.inputPlaceholder")}${e.fieldName}`,
233
234
  clearable: "",
234
235
  ref_for: !0
235
236
  }, i(b)(e), {
236
237
  disabled: e.isFormDisabled
237
238
  }), null, 16, ["modelValue", "onUpdate:modelValue", "placeholder", "disabled"])) : te("", !0),
238
- e.fieldType === "inputNumber" ? (u(), p(i(de), g({
239
+ e.fieldType === "inputNumber" ? (n(), p(i(re), v({
239
240
  key: 1,
240
241
  modelValue: o.value[e.fieldKey],
241
- "onUpdate:modelValue": (d) => o.value[e.fieldKey] = d,
242
+ "onUpdate:modelValue": (r) => o.value[e.fieldKey] = r,
242
243
  placeholder: `${i(m)("act.inputPlaceholder")}${e.fieldName}`,
243
244
  clearable: "",
244
245
  ref_for: !0
245
246
  }, i(b)(e), {
246
247
  disabled: e.isFormDisabled
247
- }), null, 16, ["modelValue", "onUpdate:modelValue", "placeholder", "disabled"])) : e.fieldType === "textarea" ? (u(), p(a, g({
248
+ }), null, 16, ["modelValue", "onUpdate:modelValue", "placeholder", "disabled"])) : e.fieldType === "textarea" ? (n(), p(a, v({
248
249
  key: 2,
249
250
  modelValue: o.value[e.fieldKey],
250
- "onUpdate:modelValue": (d) => o.value[e.fieldKey] = d,
251
+ "onUpdate:modelValue": (r) => o.value[e.fieldKey] = r,
251
252
  placeholder: `${i(m)("act.inputPlaceholder")}${e.fieldName}`,
252
253
  rows: 4,
253
254
  ref_for: !0
254
255
  }, i(b)(e), {
255
256
  type: "textarea",
256
257
  disabled: e.isFormDisabled
257
- }), null, 16, ["modelValue", "onUpdate:modelValue", "placeholder", "disabled"])) : e.fieldType === "selectIcon" ? (u(), p(i(re), g({
258
+ }), null, 16, ["modelValue", "onUpdate:modelValue", "placeholder", "disabled"])) : e.fieldType === "selectIcon" ? (n(), p(i(de), v({
258
259
  key: 3,
259
260
  modelValue: o.value[e.fieldKey],
260
- "onUpdate:modelValue": (d) => o.value[e.fieldKey] = d,
261
+ "onUpdate:modelValue": (r) => o.value[e.fieldKey] = r,
261
262
  icons: e.dataList,
262
263
  placeholder: `${i(m)("act.selectPlaceholder")}${e.fieldName}`,
263
264
  ref_for: !0
@@ -265,17 +266,17 @@ const Re = { class: "no-config-field" }, Le = { class: "dialog-footer" }, $e = {
265
266
  disabled: e.isFormDisabled
266
267
  }), {
267
268
  default: C(() => [
268
- (u(!0), k(A, null, G(e.dataList, (d, U) => (u(), p(r, {
269
+ (n(!0), k(O, null, G(e.dataList, (r, U) => (n(), p(d, {
269
270
  key: U,
270
- label: d.key,
271
- value: d.value
271
+ label: r.key,
272
+ value: r.value
272
273
  }, null, 8, ["label", "value"]))), 128))
273
274
  ]),
274
275
  _: 2
275
- }, 1040, ["modelValue", "onUpdate:modelValue", "icons", "placeholder", "disabled"])) : ["select", "multipleSelect"].includes(e.fieldType) ? (u(), p(t, g({
276
+ }, 1040, ["modelValue", "onUpdate:modelValue", "icons", "placeholder", "disabled"])) : ["select", "multipleSelect"].includes(e.fieldType) ? (n(), p(t, v({
276
277
  key: 4,
277
278
  modelValue: o.value[`${e.fieldKey}ActImplicit`],
278
- "onUpdate:modelValue": (d) => o.value[`${e.fieldKey}ActImplicit`] = d,
279
+ "onUpdate:modelValue": (r) => o.value[`${e.fieldKey}ActImplicit`] = r,
279
280
  placeholder: `${i(m)("act.selectPlaceholder")}${e.fieldName}`,
280
281
  clearable: "",
281
282
  filterable: "",
@@ -284,20 +285,20 @@ const Re = { class: "no-config-field" }, Le = { class: "dialog-footer" }, $e = {
284
285
  }, i(b)(e), {
285
286
  multiple: e.fieldType === "multipleSelect",
286
287
  disabled: e.isFormDisabled,
287
- onChange: (d) => _e(d, e)
288
+ onChange: (r) => _e(r, e)
288
289
  }), {
289
290
  default: C(() => [
290
- (u(!0), k(A, null, G(e.dataList, (d, U) => (u(), p(r, {
291
+ (n(!0), k(O, null, G(e.dataList, (r, U) => (n(), p(d, {
291
292
  key: U,
292
- label: d.key,
293
- value: d
293
+ label: r.key,
294
+ value: r
294
295
  }, null, 8, ["label", "value"]))), 128))
295
296
  ]),
296
297
  _: 2
297
- }, 1040, ["modelValue", "onUpdate:modelValue", "placeholder", "multiple", "disabled", "onChange"])) : ["virtualizedSelect", "virtualizedMultipleSelect"].includes(e.fieldType) ? (u(), p(h, g({
298
+ }, 1040, ["modelValue", "onUpdate:modelValue", "placeholder", "multiple", "disabled", "onChange"])) : ["virtualizedSelect", "virtualizedMultipleSelect"].includes(e.fieldType) ? (n(), p(h, v({
298
299
  key: 5,
299
300
  modelValue: o.value[e.fieldKey],
300
- "onUpdate:modelValue": (d) => o.value[e.fieldKey] = d,
301
+ "onUpdate:modelValue": (r) => o.value[e.fieldKey] = r,
301
302
  options: e.dataList,
302
303
  props: { ...i(Ue) },
303
304
  placeholder: `${i(m)("act.selectPlaceholder")}${e.fieldName}`,
@@ -307,10 +308,10 @@ const Re = { class: "no-config-field" }, Le = { class: "dialog-footer" }, $e = {
307
308
  }, i(b)(e), {
308
309
  disabled: e.isFormDisabled,
309
310
  multiple: e.fieldType === "virtualizedMultipleSelect"
310
- }), null, 16, ["modelValue", "onUpdate:modelValue", "options", "props", "placeholder", "disabled", "multiple"])) : e.fieldType === "treeSelect" ? (u(), p(F, g({
311
+ }), null, 16, ["modelValue", "onUpdate:modelValue", "options", "props", "placeholder", "disabled", "multiple"])) : e.fieldType === "treeSelect" ? (n(), p(F, v({
311
312
  key: 6,
312
313
  modelValue: o.value[e.fieldKey],
313
- "onUpdate:modelValue": (d) => o.value[e.fieldKey] = d,
314
+ "onUpdate:modelValue": (r) => o.value[e.fieldKey] = r,
314
315
  placeholder: `请选择${e.fieldName}`,
315
316
  props: { isLeaf: "isLeaf" },
316
317
  "render-after-expand": !1,
@@ -321,22 +322,22 @@ const Re = { class: "no-config-field" }, Le = { class: "dialog-footer" }, $e = {
321
322
  clearable: "",
322
323
  filterable: "",
323
324
  lazy: "",
324
- load: (d, U) => ye({ node: d, resolve: U }, e),
325
+ load: (r, U) => ye({ node: r, resolve: U }, e),
325
326
  ref_for: !0
326
- }, i(b)(e)), null, 16, ["modelValue", "onUpdate:modelValue", "placeholder", "load"])) : e.fieldType === "date" ? (u(), p(s, g({
327
+ }, i(b)(e)), null, 16, ["modelValue", "onUpdate:modelValue", "placeholder", "load"])) : e.fieldType === "date" ? (n(), p(s, v({
327
328
  key: 7,
328
329
  modelValue: o.value[e.fieldKey],
329
- "onUpdate:modelValue": (d) => o.value[e.fieldKey] = d,
330
+ "onUpdate:modelValue": (r) => o.value[e.fieldKey] = r,
330
331
  type: "date",
331
332
  placeholder: `${i(m)("act.selectPlaceholder")}${i(m)("act.time")}`,
332
333
  "value-format": "YYYY-MM-DD HH:mm:ss",
333
334
  ref_for: !0
334
335
  }, i(b)(e), {
335
336
  disabled: e.isFormDisabled
336
- }), null, 16, ["modelValue", "onUpdate:modelValue", "placeholder", "disabled"])) : e.fieldType === "dateRange" ? (u(), p(s, g({
337
+ }), null, 16, ["modelValue", "onUpdate:modelValue", "placeholder", "disabled"])) : e.fieldType === "dateRange" ? (n(), p(s, v({
337
338
  key: 8,
338
339
  modelValue: o.value[e.fieldKey],
339
- "onUpdate:modelValue": (d) => o.value[e.fieldKey] = d,
340
+ "onUpdate:modelValue": (r) => o.value[e.fieldKey] = r,
340
341
  type: "daterange",
341
342
  "start-placeholder": i(m)("act.startTime"),
342
343
  "end-placeholder": i(m)("act.endTime"),
@@ -344,10 +345,10 @@ const Re = { class: "no-config-field" }, Le = { class: "dialog-footer" }, $e = {
344
345
  ref_for: !0
345
346
  }, i(b)(e), {
346
347
  disabled: e.isFormDisabled
347
- }), null, 16, ["modelValue", "onUpdate:modelValue", "start-placeholder", "end-placeholder", "disabled"])) : e.fieldType === "provinceCascade" ? (u(), p(n, g({
348
+ }), null, 16, ["modelValue", "onUpdate:modelValue", "start-placeholder", "end-placeholder", "disabled"])) : e.fieldType === "provinceCascade" ? (n(), p(u, v({
348
349
  key: 9,
349
350
  modelValue: o.value[e.fieldKey],
350
- "onUpdate:modelValue": (d) => o.value[e.fieldKey] = d,
351
+ "onUpdate:modelValue": (r) => o.value[e.fieldKey] = r,
351
352
  options: e.dataList,
352
353
  props: i(ke),
353
354
  clearable: "",
@@ -356,23 +357,23 @@ const Re = { class: "no-config-field" }, Le = { class: "dialog-footer" }, $e = {
356
357
  ref_for: !0
357
358
  }, i(b)(e), {
358
359
  disabled: e.isFormDisabled
359
- }), null, 16, ["modelValue", "onUpdate:modelValue", "options", "props", "placeholder", "disabled"])) : e.fieldType === "switch" ? (u(), p(v, {
360
+ }), null, 16, ["modelValue", "onUpdate:modelValue", "options", "props", "placeholder", "disabled"])) : e.fieldType === "switch" ? (n(), p(g, {
360
361
  key: 10,
361
362
  modelValue: o.value[e.fieldKey],
362
- "onUpdate:modelValue": (d) => o.value[e.fieldKey] = d,
363
+ "onUpdate:modelValue": (r) => o.value[e.fieldKey] = r,
363
364
  "active-value": !0,
364
365
  "inactive-value": !1
365
- }, null, 8, ["modelValue", "onUpdate:modelValue"])) : e.fieldType === "upload" ? (u(), p(i(ie), g({
366
+ }, null, 8, ["modelValue", "onUpdate:modelValue"])) : e.fieldType === "upload" ? (n(), p(i(ie), v({
366
367
  key: 11,
367
368
  class: "form-upload",
368
369
  modelValue: o.value[e.fieldKey],
369
- "onUpdate:modelValue": (d) => o.value[e.fieldKey] = d,
370
- request: i(O),
370
+ "onUpdate:modelValue": (r) => o.value[e.fieldKey] = r,
371
+ request: i(q),
371
372
  ref_for: !0
372
- }, i(b)(e)), null, 16, ["modelValue", "onUpdate:modelValue", "request"])) : e.fieldType === "editor" ? (u(), p(i(ne), g({
373
+ }, i(b)(e)), null, 16, ["modelValue", "onUpdate:modelValue", "request"])) : e.fieldType === "editor" ? (n(), p(i(ne), v({
373
374
  key: 12,
374
375
  modelValue: o.value[e.fieldKey],
375
- "onUpdate:modelValue": (d) => o.value[e.fieldKey] = d,
376
+ "onUpdate:modelValue": (r) => o.value[e.fieldKey] = r,
376
377
  disabled: e.isFormDisabled,
377
378
  placeholder: `${i(m)("act.inputPlaceholder")}${e.fieldName}`,
378
379
  ref_for: !0
@@ -397,7 +398,7 @@ const Re = { class: "no-config-field" }, Le = { class: "dialog-footer" }, $e = {
397
398
  }, 8, ["model-value", "title", "width"]);
398
399
  };
399
400
  }
400
- }, je = /* @__PURE__ */ we($e, [["__scopeId", "data-v-4ec013fe"]]);
401
+ }, je = /* @__PURE__ */ we($e, [["__scopeId", "data-v-37b49f83"]]);
401
402
  export {
402
403
  je as default
403
404
  };
@@ -0,0 +1,108 @@
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";
3
+ import "vue-router";
4
+ import "js-base64";
5
+ import "element-plus";
6
+ import "monaco-editor";
7
+ const G = { class: "header-operate-container" }, J = {
8
+ __name: "index",
9
+ props: {
10
+ data: { type: Object, default: () => ({}) }
11
+ },
12
+ emits: ["operate"],
13
+ setup(w, { emit: x }) {
14
+ const N = x, T = w, { t: D } = z();
15
+ let h = j([]);
16
+ const V = l("globalProps"), v = l("menuPermissionBtns"), F = l("stringToBoolean"), $ = l("matchCondition"), S = l("getTableData"), P = l("tableBtnRefs"), A = (s) => {
17
+ if (!s.matchFields.length)
18
+ return !0;
19
+ const t = s.matchFields.filter((o) => o.matchType != "default"), r = (o) => V.matchData[o.matchType][o.matchFieldName];
20
+ let c = t.reduce((o, n, m) => {
21
+ const R = r(n);
22
+ return o += $(
23
+ n.matchCondition,
24
+ R,
25
+ n.fieldValue == "" ? null : n.fieldValue == "true" || n.fieldValue == "false" ? F(n.fieldValue) : n.fieldValue
26
+ ), m !== t.length - 1 && (o += n.spliceCondition || "&&"), o;
27
+ }, "").split("||"), e = c.reduce((o, n, m) => (o += `(${n})`, m < c.length - 1 && (o += "||"), o), "");
28
+ return new Function(`return ${e}`)();
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));
31
+ };
32
+ q(
33
+ () => T.data,
34
+ (s, t) => {
35
+ L(s.buttons);
36
+ },
37
+ { immediate: !0 }
38
+ );
39
+ const g = (s) => {
40
+ N("operate", s, {});
41
+ };
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]), {
48
+ key: 0,
49
+ class: "custom-btn",
50
+ ref_for: !0,
51
+ ref: (n) => d(P)[`${e.customComponentName}-${e.permissionCode}`] = n,
52
+ buttonData: e,
53
+ onRefresh: t[0] || (t[0] = (n) => d(S)())
54
+ }, {
55
+ default: _(() => [
56
+ C((a(), i(p, {
57
+ class: "el-btn",
58
+ type: e.btnColor,
59
+ onClick: (n) => g(e)
60
+ }, {
61
+ default: _(() => [
62
+ e.btnIcon ? (a(), i(r, {
63
+ key: 0,
64
+ class: "mr4",
65
+ name: e.btnIcon,
66
+ width: "12",
67
+ height: "12",
68
+ color: "#fff"
69
+ }, null, 8, ["name"])) : b("", !0),
70
+ k(" " + B(e.btnName), 1)
71
+ ]),
72
+ _: 2
73
+ }, 1032, ["type", "onClick"])), [
74
+ [c]
75
+ ])
76
+ ]),
77
+ _: 2
78
+ }, 1064, ["buttonData"])) : C((a(), i(p, {
79
+ key: 1,
80
+ class: "el-btn",
81
+ type: e.btnColor,
82
+ loading: e.opeateLoading,
83
+ onClick: (n) => g(e)
84
+ }, {
85
+ default: _(() => [
86
+ e.btnIcon ? (a(), i(r, {
87
+ key: 0,
88
+ class: "mr4",
89
+ name: e.btnIcon,
90
+ width: "12",
91
+ height: "12",
92
+ color: "#fff"
93
+ }, null, 8, ["name"])) : b("", !0),
94
+ k(" " + B(e.opeateLoading ? e.btnName + d(D)("act.loading") + "..." : e.btnName), 1)
95
+ ]),
96
+ _: 2
97
+ }, 1032, ["type", "loading", "onClick"])), [
98
+ [c]
99
+ ])
100
+ ], 64)) : b("", !0)
101
+ ], 64))), 128))
102
+ ]);
103
+ };
104
+ }
105
+ }, Z = /* @__PURE__ */ M(J, [["__scopeId", "data-v-7d9574aa"]]);
106
+ export {
107
+ Z as default
108
+ };
@@ -1,5 +1,5 @@
1
1
  import { reactive as m, watch as b, resolveComponent as s, openBlock as v, createBlock as g, withCtx as o, createElementVNode as i, createVNode as x, createTextVNode as y, toDisplayString as h, unref as C } from "vue";
2
- import { _ as k, u as w } from "./index-40115216.js";
2
+ import { _ as k, u as w } from "./index-6818b5e9.js";
3
3
  import "vue-router";
4
4
  import "js-base64";
5
5
  import "element-plus";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "act-plus",
3
- "version": "1.1.41",
3
+ "version": "1.1.43",
4
4
  "private": false,
5
5
  "description": "act config",
6
6
  "main": "act-plus.js",