act-plus 1.1.7 → 1.1.9
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 +3 -3
- package/act-plus.umd.cjs +35 -29
- package/lib/{configBtns-3e0e1684.js → configBtns-a9232bff.js} +9 -9
- package/lib/{configFileds-c1d4ce56.js → configFileds-7fd1c760.js} +2 -2
- package/lib/{configTable-e9118be0.js → configTable-e9e10aff.js} +122 -87
- package/lib/{dashboardTest-ff000df5.js → dashboardTest-b3195aa2.js} +2 -2
- package/lib/{dialogAddField-d3143ae7.js → dialogAddField-d3fc005c.js} +27 -27
- package/lib/{dialogConfigBtn-deb51609.js → dialogConfigBtn-3f0f2a3a.js} +2 -2
- package/lib/index-4476192c.js +285 -0
- package/lib/index-7ef6e17e.js +12797 -0
- package/lib/{index-efdc0568.js → index-9e5c202e.js} +1 -1
- package/lib/index-a02a1e59.js +164 -0
- package/lib/index-b631c218.js +95 -0
- package/lib/{index-c44f99dd.js → index-dc6223c1.js} +36 -36
- package/package.json +1 -1
- package/style.css +1 -1
- package/lib/enum-d971526b.js +0 -18
- package/lib/index-1c82879a.js +0 -95
- package/lib/index-4ecc8bcf.js +0 -162
- package/lib/index-89b17cda.js +0 -11678
- package/lib/index-b53782e5.js +0 -286
package/lib/index-b53782e5.js
DELETED
|
@@ -1,286 +0,0 @@
|
|
|
1
|
-
import { inject as q, reactive as oe, ref as L, watch as te, resolveComponent as p, openBlock as n, createBlock as u, withCtx as b, createElementVNode as B, createVNode as V, unref as a, createTextVNode as S, createElementBlock as F, Fragment as T, renderList as x, createCommentVNode as de, resolveDynamicComponent as se, isRef as ne, toDisplayString as re } from "vue";
|
|
2
|
-
import { a as ie, e as ue, r as ce, b as fe, E as M, _ as pe, c as me } from "./index-89b17cda.js";
|
|
3
|
-
import { T as $, P as ye } from "./enum-d971526b.js";
|
|
4
|
-
import "vue-router";
|
|
5
|
-
const R = ie.create({
|
|
6
|
-
baseURL: "",
|
|
7
|
-
// ""
|
|
8
|
-
timeout: 15e3
|
|
9
|
-
});
|
|
10
|
-
R.interceptors.request.use(
|
|
11
|
-
(d) => {
|
|
12
|
-
let m = sessionStorage.getItem("accessToken");
|
|
13
|
-
return m && (d.headers.Authorization = "Bearer " + m), d.headers["Content-Type"] != "application/x-www-form-urlencoded" && (d.data = { ...d.data }, Reflect.has(d.data, "dynamicFilters") && (d.data.dynamicFilters = ue(JSON.stringify(d.data.dynamicFilters)))), d;
|
|
14
|
-
},
|
|
15
|
-
(d) => Promise.reject(d)
|
|
16
|
-
);
|
|
17
|
-
R.interceptors.response.use(
|
|
18
|
-
(d) => {
|
|
19
|
-
const m = d.data;
|
|
20
|
-
if (m.code == 200)
|
|
21
|
-
return m;
|
|
22
|
-
if (m.code == 401)
|
|
23
|
-
sessionStorage.clear(), ce.replace("/"), fe(), M.error({ title: "错误", message: "登陆超时,请重新登录" });
|
|
24
|
-
else
|
|
25
|
-
return M.error({ title: "错误", message: m.msg }), Promise.reject(m.msg);
|
|
26
|
-
},
|
|
27
|
-
(d) => {
|
|
28
|
-
if (d.response.status != -1)
|
|
29
|
-
return Promise.reject(d);
|
|
30
|
-
}
|
|
31
|
-
);
|
|
32
|
-
const be = { class: "no-config-field" }, _e = { class: "dialog-footer" }, he = {
|
|
33
|
-
__name: "index",
|
|
34
|
-
props: {
|
|
35
|
-
visible: { type: Boolean, default: !1 },
|
|
36
|
-
title: { type: String, default: "" },
|
|
37
|
-
data: { type: Object, default: () => ({}) }
|
|
38
|
-
},
|
|
39
|
-
emits: ["update:visible", "refresh"],
|
|
40
|
-
setup(d, { emit: m }) {
|
|
41
|
-
const W = q("loadComponents"), z = q("formatDataType"), A = m, i = d;
|
|
42
|
-
let h = oe((() => ({
|
|
43
|
-
btnLoading: !1
|
|
44
|
-
}))()), w = L([]), t = L({}), D = L(null), J = {};
|
|
45
|
-
const G = (l) => l.formColumnCol == null || l.customFiledsComponentes[l.customFiledsComponentes.customComponentName] ? 24 : l.formColumnCol ? l.formColumnCol : 24 / l.formRow, H = (l) => {
|
|
46
|
-
if (["input", "textarea"].includes(l.fieldType))
|
|
47
|
-
return "blur";
|
|
48
|
-
if (["select", "multipleSelect", "datetimerange", "treeSelect", "provinceCascade"].includes(l.fieldType))
|
|
49
|
-
return "change";
|
|
50
|
-
}, Q = (l) => {
|
|
51
|
-
if (!["input", "textarea"].includes(l) && ["multipleSelect", "dateRange"].includes(l))
|
|
52
|
-
return [];
|
|
53
|
-
}, X = (l, c) => {
|
|
54
|
-
if (["string"].includes(c))
|
|
55
|
-
return l.join(";");
|
|
56
|
-
if (["number"].includes(c))
|
|
57
|
-
return Number(l);
|
|
58
|
-
if (["array"].includes(c))
|
|
59
|
-
return l;
|
|
60
|
-
}, Y = (l) => {
|
|
61
|
-
if (["multipleSelect"].includes(l.fieldType))
|
|
62
|
-
return i.data.rowData[l.fieldKey] ? i.data.rowData[l.fieldKey].split(";") : [];
|
|
63
|
-
if (["dateRange"].includes(l.fieldType)) {
|
|
64
|
-
const c = l.fieldKey.split("&");
|
|
65
|
-
return i.data.rowData[l.fieldKey] = c.map((r) => i.data.rowData[r]), i.data.rowData[l.fieldKey];
|
|
66
|
-
}
|
|
67
|
-
return i.data.rowData[l.fieldKey];
|
|
68
|
-
}, Z = (l) => R({ url: i.data.dataItem.requestUrl, method: "post", data: l });
|
|
69
|
-
te(
|
|
70
|
-
() => i.visible,
|
|
71
|
-
async (l, c) => {
|
|
72
|
-
l && (i.data.formList.forEach(async (r) => {
|
|
73
|
-
J[r.fieldKey] = { submitFieldType: r.fieldSubmitType, isFormSetValue: r.isFormSetValue }, t.value[r.fieldKey] = Object.keys(i.data.rowData).length && r.isFormSetValue ? Y(r) : Q(r.fieldType);
|
|
74
|
-
const { isFiledCustom: g, customComponentName: _, customComponentUrl: C } = r.customFiledsComponentes;
|
|
75
|
-
if (g && !r.customFiledsComponentes[_]) {
|
|
76
|
-
const f = await W(C, _);
|
|
77
|
-
r.customFiledsComponentes[_] = f;
|
|
78
|
-
}
|
|
79
|
-
}), w.value = i.data.formList || []);
|
|
80
|
-
}
|
|
81
|
-
);
|
|
82
|
-
const I = (l) => {
|
|
83
|
-
K(), l();
|
|
84
|
-
}, K = () => {
|
|
85
|
-
w.value = [], D.value.resetFields(), A("update:visible", !1);
|
|
86
|
-
}, ee = (l) => {
|
|
87
|
-
l && l.validate((c) => {
|
|
88
|
-
if (c) {
|
|
89
|
-
h.btnLoading = !0;
|
|
90
|
-
const { dataItem: r, rowData: g } = i.data, _ = r.submitFields.filter((s) => s.matchType == "default").reduce((s, y) => (y.submitFieldType === "string" && (s[y.submitFieldName] = y.matchFieldName.toString()), s), {}), C = r.submitFields.filter((s) => s.matchType == "match").reduce((s, y) => (s[y.submitFieldName] = z(y.submitFieldType, g[y.matchFieldName]), s), {});
|
|
91
|
-
let f = { ..._, ...C, ...t.value };
|
|
92
|
-
Object.keys(f).forEach((s) => {
|
|
93
|
-
s.includes("&") ? f[s].split("&").forEach((k, v) => {
|
|
94
|
-
f[k] = f[s][v];
|
|
95
|
-
}) : Array.isArray(f[s]) && (f[s] = X(f[s].submitFieldType));
|
|
96
|
-
}), Z(f).then((s) => {
|
|
97
|
-
me({ title: "提示", message: "创建成功", type: "success", duration: 2500 }), K(), A("refresh"), h.btnLoading = !1;
|
|
98
|
-
}).catch((s) => {
|
|
99
|
-
h.btnLoading = !1;
|
|
100
|
-
}), h.btnLoading = !1;
|
|
101
|
-
}
|
|
102
|
-
});
|
|
103
|
-
};
|
|
104
|
-
return (l, c) => {
|
|
105
|
-
var P;
|
|
106
|
-
const r = p("el-input"), g = p("el-option"), _ = p("el-select"), C = p("el-date-picker"), f = p("el-cascader"), s = p("el-switch"), y = p("el-form-item"), k = p("el-col"), v = p("el-row"), le = p("el-form"), E = p("el-button"), ae = p("el-dialog");
|
|
107
|
-
return n(), u(ae, {
|
|
108
|
-
"model-value": i.visible,
|
|
109
|
-
title: i.title,
|
|
110
|
-
top: "5vh",
|
|
111
|
-
width: (P = d.data.formConfig) == null ? void 0 : P.dialogWidth,
|
|
112
|
-
"append-to-body": "",
|
|
113
|
-
"destroy-on-close": "",
|
|
114
|
-
"close-on-click-modal": !1,
|
|
115
|
-
"before-close": I
|
|
116
|
-
}, {
|
|
117
|
-
footer: b(() => [
|
|
118
|
-
B("span", _e, [
|
|
119
|
-
V(E, {
|
|
120
|
-
loading: a(h).btnLoading,
|
|
121
|
-
onClick: K
|
|
122
|
-
}, {
|
|
123
|
-
default: b(() => [
|
|
124
|
-
S("取消")
|
|
125
|
-
]),
|
|
126
|
-
_: 1
|
|
127
|
-
}, 8, ["loading"]),
|
|
128
|
-
V(E, {
|
|
129
|
-
type: "primary",
|
|
130
|
-
loading: a(h).btnLoading,
|
|
131
|
-
onClick: c[1] || (c[1] = (U) => ee(a(D)))
|
|
132
|
-
}, {
|
|
133
|
-
default: b(() => [
|
|
134
|
-
S("保存")
|
|
135
|
-
]),
|
|
136
|
-
_: 1
|
|
137
|
-
}, 8, ["loading"])
|
|
138
|
-
])
|
|
139
|
-
]),
|
|
140
|
-
default: b(() => {
|
|
141
|
-
var U, j;
|
|
142
|
-
return [
|
|
143
|
-
V(le, {
|
|
144
|
-
ref_key: "formRef",
|
|
145
|
-
ref: D,
|
|
146
|
-
model: a(t),
|
|
147
|
-
"label-suffix": ":",
|
|
148
|
-
"label-width": (U = d.data.formConfig) == null ? void 0 : U.formLabelWidth,
|
|
149
|
-
"label-position": (j = d.data.formConfig) == null ? void 0 : j.formLabelPosition
|
|
150
|
-
}, {
|
|
151
|
-
default: b(() => [
|
|
152
|
-
V(v, { gutter: 40 }, {
|
|
153
|
-
default: b(() => [
|
|
154
|
-
(n(!0), F(T, null, x(a(w), (e, O) => (n(), u(k, {
|
|
155
|
-
span: G(e),
|
|
156
|
-
key: O
|
|
157
|
-
}, {
|
|
158
|
-
default: b(() => [
|
|
159
|
-
e.customFiledsComponentes.isFiledCustom ? (n(), F(T, { key: 1 }, [
|
|
160
|
-
e.customFiledsComponentes[e.customFiledsComponentes.customComponentName] ? (n(), u(se(e.customFiledsComponentes[e.customFiledsComponentes.customComponentName]), {
|
|
161
|
-
key: 0,
|
|
162
|
-
fieldCofnigItem: e,
|
|
163
|
-
rowData: i.data.rowData,
|
|
164
|
-
form: a(t),
|
|
165
|
-
"onUpdate:form": c[0] || (c[0] = (o) => ne(t) ? t.value = o : t = o)
|
|
166
|
-
}, null, 40, ["fieldCofnigItem", "rowData", "form"])) : (n(), F("div", {
|
|
167
|
-
class: "no-config",
|
|
168
|
-
key: O
|
|
169
|
-
}, [
|
|
170
|
-
B("span", be, "【" + re(e.fieldName) + "】", 1),
|
|
171
|
-
S("当前字段为自定义,请在项目中创建对应组件 ")
|
|
172
|
-
]))
|
|
173
|
-
], 64)) : (n(), u(y, {
|
|
174
|
-
key: 0,
|
|
175
|
-
label: e.fieldName,
|
|
176
|
-
prop: e.fieldKey,
|
|
177
|
-
rules: [{ required: e.isFormFieldRequired, message: "必填项", trigger: H(e) }]
|
|
178
|
-
}, {
|
|
179
|
-
default: b(() => [
|
|
180
|
-
e.fieldType === "input" ? (n(), u(r, {
|
|
181
|
-
key: 0,
|
|
182
|
-
modelValue: a(t)[e.fieldKey],
|
|
183
|
-
"onUpdate:modelValue": (o) => a(t)[e.fieldKey] = o,
|
|
184
|
-
type: "text",
|
|
185
|
-
placeholder: "请输入" + e.fieldName,
|
|
186
|
-
disabled: e.isFormDisabled,
|
|
187
|
-
clearable: ""
|
|
188
|
-
}, null, 8, ["modelValue", "onUpdate:modelValue", "placeholder", "disabled"])) : e.fieldType === "textarea" ? (n(), u(r, {
|
|
189
|
-
key: 1,
|
|
190
|
-
modelValue: a(t)[e.fieldKey],
|
|
191
|
-
"onUpdate:modelValue": (o) => a(t)[e.fieldKey] = o,
|
|
192
|
-
type: "textarea",
|
|
193
|
-
placeholder: `请输入${e.fieldName}`,
|
|
194
|
-
disabled: e.isFormDisabled,
|
|
195
|
-
rows: 4
|
|
196
|
-
}, null, 8, ["modelValue", "onUpdate:modelValue", "placeholder", "disabled"])) : e.fieldType === "multipleSelect" ? (n(), u(_, {
|
|
197
|
-
key: 2,
|
|
198
|
-
modelValue: a(t)[e.fieldKey],
|
|
199
|
-
"onUpdate:modelValue": (o) => a(t)[e.fieldKey] = o,
|
|
200
|
-
placeholder: `请选择${e.fieldName}`,
|
|
201
|
-
disabled: e.isFormDisabled,
|
|
202
|
-
multiple: "",
|
|
203
|
-
clearable: "",
|
|
204
|
-
filterable: ""
|
|
205
|
-
}, {
|
|
206
|
-
default: b(() => [
|
|
207
|
-
(n(!0), F(T, null, x(e.dataList, (o, N) => (n(), u(g, {
|
|
208
|
-
key: N,
|
|
209
|
-
label: o.key,
|
|
210
|
-
value: o.value
|
|
211
|
-
}, null, 8, ["label", "value"]))), 128))
|
|
212
|
-
]),
|
|
213
|
-
_: 2
|
|
214
|
-
}, 1032, ["modelValue", "onUpdate:modelValue", "placeholder", "disabled"])) : e.fieldType === "select" ? (n(), u(_, {
|
|
215
|
-
key: 3,
|
|
216
|
-
modelValue: a(t)[e.fieldKey],
|
|
217
|
-
"onUpdate:modelValue": (o) => a(t)[e.fieldKey] = o,
|
|
218
|
-
placeholder: `请选择${e.fieldName}`,
|
|
219
|
-
disabled: e.isFormDisabled,
|
|
220
|
-
clearable: "",
|
|
221
|
-
filterable: ""
|
|
222
|
-
}, {
|
|
223
|
-
default: b(() => [
|
|
224
|
-
(n(!0), F(T, null, x(e.dataList, (o, N) => (n(), u(g, {
|
|
225
|
-
key: N,
|
|
226
|
-
label: o.key,
|
|
227
|
-
value: o.value
|
|
228
|
-
}, null, 8, ["label", "value"]))), 128))
|
|
229
|
-
]),
|
|
230
|
-
_: 2
|
|
231
|
-
}, 1032, ["modelValue", "onUpdate:modelValue", "placeholder", "disabled"])) : e.fieldType === "date" ? (n(), u(C, {
|
|
232
|
-
key: 4,
|
|
233
|
-
modelValue: a(t)[e.fieldKey],
|
|
234
|
-
"onUpdate:modelValue": (o) => a(t)[e.fieldKey] = o,
|
|
235
|
-
type: e.fieldUiType,
|
|
236
|
-
placeholder: "请选择时间",
|
|
237
|
-
"value-format": a($)[e.fieldUiType],
|
|
238
|
-
disabled: e.isFormDisabled
|
|
239
|
-
}, null, 8, ["modelValue", "onUpdate:modelValue", "type", "value-format", "disabled"])) : e.fieldType === "dateRange" ? (n(), u(C, {
|
|
240
|
-
key: 5,
|
|
241
|
-
modelValue: a(t)[e.fieldKey],
|
|
242
|
-
"onUpdate:modelValue": (o) => a(t)[e.fieldKey] = o,
|
|
243
|
-
type: e.fieldUiType,
|
|
244
|
-
"start-placeholder": "开始时间",
|
|
245
|
-
"end-placeholder": "结束时间",
|
|
246
|
-
"value-format": a($)[e.fieldUiType],
|
|
247
|
-
disabled: e.isFormDisabled
|
|
248
|
-
}, null, 8, ["modelValue", "onUpdate:modelValue", "type", "value-format", "disabled"])) : e.fieldType === "provinceCascade" ? (n(), u(f, {
|
|
249
|
-
key: 6,
|
|
250
|
-
modelValue: a(t)[e.fieldKey],
|
|
251
|
-
"onUpdate:modelValue": (o) => a(t)[e.fieldKey] = o,
|
|
252
|
-
options: e.dataList,
|
|
253
|
-
props: a(ye),
|
|
254
|
-
clearable: "",
|
|
255
|
-
filterable: "",
|
|
256
|
-
placeholder: `请选择${e.fieldName}`,
|
|
257
|
-
disabled: e.isFormDisabled
|
|
258
|
-
}, null, 8, ["modelValue", "onUpdate:modelValue", "options", "props", "placeholder", "disabled"])) : e.fieldType === "switch" ? (n(), u(s, {
|
|
259
|
-
key: 7,
|
|
260
|
-
modelValue: a(t)[e.fieldKey],
|
|
261
|
-
"onUpdate:modelValue": (o) => a(t)[e.fieldKey] = o,
|
|
262
|
-
"active-value": !0,
|
|
263
|
-
"inactive-value": !1
|
|
264
|
-
}, null, 8, ["modelValue", "onUpdate:modelValue"])) : de("", !0)
|
|
265
|
-
]),
|
|
266
|
-
_: 2
|
|
267
|
-
}, 1032, ["label", "prop", "rules"]))
|
|
268
|
-
]),
|
|
269
|
-
_: 2
|
|
270
|
-
}, 1032, ["span"]))), 128))
|
|
271
|
-
]),
|
|
272
|
-
_: 1
|
|
273
|
-
})
|
|
274
|
-
]),
|
|
275
|
-
_: 1
|
|
276
|
-
}, 8, ["model", "label-width", "label-position"])
|
|
277
|
-
];
|
|
278
|
-
}),
|
|
279
|
-
_: 1
|
|
280
|
-
}, 8, ["model-value", "title", "width"]);
|
|
281
|
-
};
|
|
282
|
-
}
|
|
283
|
-
}, we = /* @__PURE__ */ pe(he, [["__scopeId", "data-v-326c5ba6"]]);
|
|
284
|
-
export {
|
|
285
|
-
we as default
|
|
286
|
-
};
|