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