ling-yun-custom-components 0.0.33 → 0.0.34
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/es/BatchImport.mjs +1 -1
- package/es/BuildComponents.mjs +1 -1
- package/es/CustomDialog.mjs +1 -1
- package/es/CustomDropdown.mjs +10 -10
- package/es/CustomTab.mjs +7 -7
- package/es/CustomTitle.mjs +1 -1
- package/es/FileList.mjs +1 -1
- package/es/GradientButton.mjs +7 -7
- package/es/IconEmpty.mjs +1 -1
- package/es/IconRenderer.mjs +1 -1
- package/es/IconSelect.mjs +17 -17
- package/es/PaginationTable.mjs +1 -1
- package/es/SearchBar.mjs +1 -1
- package/es/TreeSelect.mjs +2 -2
- package/es/TreeShowSelect.mjs +1 -1
- package/es/UpdatePasswordDialog.mjs +3 -3
- package/es/UploadFile.mjs +1 -1
- package/es/assets/BuildComponents.css +1 -1
- package/es/assets/CustomDropdown.css +1 -1
- package/es/assets/CustomTab.css +1 -1
- package/es/assets/GradientButton.css +1 -1
- package/es/assets/IconSelect.css +1 -1
- package/es/assets/PaginationTable.css +1 -1
- package/es/assets/TreeSelect.css +1 -1
- package/es/assets/TreeShowSelect.css +1 -1
- package/es/assets/UpdatePasswordDialog.css +1 -1
- package/es/assets/layout2.css +1 -1
- package/es/assets/layout3.css +1 -1
- package/es/assets/layout4.css +1 -1
- package/es/assets/layout5.css +1 -1
- package/es/assets/layout6.css +1 -1
- package/es/chunks/global.DYRS55FP.js +7828 -0
- package/es/chunks/{layout.BKJPyxR8.js → layout.B0thq8O1.js} +5 -5
- package/es/chunks/{layout.BHroZ9U9.js → layout.CHE7L3Br.js} +12 -12
- package/es/chunks/{layout.DXw3haOP.js → layout.CiNClIOK.js} +1 -1
- package/es/chunks/{layout.CDiqT-qG.js → layout.DJVruWAW.js} +7 -7
- package/es/chunks/{layout.Cops0Vah.js → layout.kfyyRIKp.js} +7 -7
- package/es/chunks/{layout.vvR_4ki7.js → layout.ksXFwQhz.js} +9 -9
- package/es/chunks/{layout.DBgjqaxe.js → layout.z1w9j_0V.js} +2 -2
- package/lib/BatchImport.js +1 -1
- package/lib/BuildComponents.js +1 -1
- package/lib/CustomDialog.js +1 -1
- package/lib/CustomDropdown.js +1 -1
- package/lib/CustomTab.js +1 -1
- package/lib/CustomTitle.js +1 -1
- package/lib/FileList.js +1 -1
- package/lib/GradientButton.js +1 -1
- package/lib/IconEmpty.js +1 -1
- package/lib/IconRenderer.js +1 -1
- package/lib/IconSelect.js +1 -1
- package/lib/PaginationTable.js +1 -1
- package/lib/SearchBar.js +1 -1
- package/lib/TreeSelect.js +1 -1
- package/lib/TreeShowSelect.js +1 -1
- package/lib/UpdatePasswordDialog.js +1 -1
- package/lib/UploadFile.js +1 -1
- package/lib/assets/BuildComponents.css +1 -1
- package/lib/assets/CustomDropdown.css +1 -1
- package/lib/assets/CustomTab.css +1 -1
- package/lib/assets/GradientButton.css +1 -1
- package/lib/assets/IconSelect.css +1 -1
- package/lib/assets/PaginationTable.css +1 -1
- package/lib/assets/TreeSelect.css +1 -1
- package/lib/assets/TreeShowSelect.css +1 -1
- package/lib/assets/UpdatePasswordDialog.css +1 -1
- package/lib/assets/layout2.css +1 -1
- package/lib/assets/layout3.css +1 -1
- package/lib/assets/layout4.css +1 -1
- package/lib/assets/layout5.css +1 -1
- package/lib/assets/layout6.css +1 -1
- package/lib/chunks/global.CSN_bdu1.js +1 -0
- package/lib/chunks/{layout.DWbm8gXV.js → layout.2cqUIJaF.js} +1 -1
- package/lib/chunks/{layout.B8d4J538.js → layout.BX7XTp-7.js} +1 -1
- package/lib/chunks/layout.BemBeSDu.js +1 -0
- package/lib/chunks/{layout.BJubstyS.js → layout.CBrqQREH.js} +1 -1
- package/lib/chunks/{layout.B9EVVV-O.js → layout.CKQTUDQH.js} +1 -1
- package/lib/chunks/{layout.OHsMvEtb.js → layout.DfE3Jkpv.js} +1 -1
- package/lib/chunks/{layout.B-T_NE6r.js → layout.TNSpahDr.js} +1 -1
- package/package.json +3 -3
- package/lib/chunks/layout.Js61I3wA.js +0 -1
|
@@ -28,12 +28,12 @@ import '../assets/layout4.css';const r = { class: "custom-title" }, i = /* @__PU
|
|
|
28
28
|
},
|
|
29
29
|
setup(t) {
|
|
30
30
|
return o((e) => ({
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
31
|
+
v9b5b8b56: t.fontWeight,
|
|
32
|
+
b428cc62: t.fontSize + "px",
|
|
33
|
+
e1b2f816: t.color
|
|
34
34
|
})), (e, l) => (n(), c("div", r, a(t.content), 1));
|
|
35
35
|
}
|
|
36
|
-
}),
|
|
36
|
+
}), m = /* @__PURE__ */ s(i, [["__scopeId", "data-v-3b9a0573"]]);
|
|
37
37
|
export {
|
|
38
|
-
|
|
38
|
+
m as C
|
|
39
39
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { ref as z, computed as p, watch as M, createElementBlock as
|
|
1
|
+
import { ref as z, computed as p, watch as M, createElementBlock as c, openBlock as m, createVNode as R, createBlock as k, createCommentVNode as U, unref as h, mergeProps as B, withCtx as D, renderSlot as O, Fragment as E, createElementVNode as f, toDisplayString as x } from "vue";
|
|
2
2
|
import { ElUpload as N, ElImage as Y } from "element-plus";
|
|
3
3
|
import { emitsMap as i, uploadFileTypeMap as L, messageError as Q, messageWarning as F } from "ling-yun-methods";
|
|
4
|
-
import { _ as J, u as v } from "./layout.
|
|
4
|
+
import { _ as J, u as v } from "./layout.ksXFwQhz.js";
|
|
5
5
|
import { _ as K } from "./_plugin-vue_export-helper.CHgC5LLL.js";
|
|
6
6
|
import '../assets/layout5.css';const u = [];
|
|
7
7
|
for (let A = 0; A < 256; ++A)
|
|
@@ -178,7 +178,7 @@ const aA = "data:image/webp;base64,UklGRroSAABXRUJQVlA4WAoAAAAwAAAAvwAAyQAASUNDU
|
|
|
178
178
|
), a({
|
|
179
179
|
handleBeforeUpload: b,
|
|
180
180
|
httpRequest: q
|
|
181
|
-
}), (e, l) => (m(),
|
|
181
|
+
}), (e, l) => (m(), c("div", lA, [
|
|
182
182
|
R(h(N), B({
|
|
183
183
|
ref_key: "uploadRef",
|
|
184
184
|
ref: j,
|
|
@@ -196,20 +196,20 @@ const aA = "data:image/webp;base64,UklGRroSAABXRUJQVlA4WAoAAAAwAAAAvwAAyQAASUNDU
|
|
|
196
196
|
e.$slots.tip ? O(e.$slots, "tip", {
|
|
197
197
|
key: 0,
|
|
198
198
|
uploadTip: o.value
|
|
199
|
-
}, void 0, !0) : (m(),
|
|
200
|
-
|
|
201
|
-
|
|
199
|
+
}, void 0, !0) : (m(), c(E, { key: 1 }, [
|
|
200
|
+
f("div", uA, [
|
|
201
|
+
f("div", nA, [
|
|
202
202
|
R(h(Y), {
|
|
203
203
|
src: h(aA),
|
|
204
204
|
class: "absolute image"
|
|
205
205
|
}, null, 8, ["src"])
|
|
206
206
|
])
|
|
207
207
|
]),
|
|
208
|
-
l[1] || (l[1] =
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
o.value.formatMaxSize ? (m(),
|
|
212
|
-
o.value.maxCount ? (m(),
|
|
208
|
+
l[1] || (l[1] = f("div", { class: "text-262626 fz-14 weight-500" }, "点击或拖拽文件上传", -1)),
|
|
209
|
+
f("div", oA, [
|
|
210
|
+
f("span", null, x(o.value.formatAcceptText), 1),
|
|
211
|
+
o.value.formatMaxSize ? (m(), c("span", rA, "," + x(o.value.formatMaxSize), 1)) : U("", !0),
|
|
212
|
+
o.value.maxCount ? (m(), c("span", dA, "," + x(o.value.maxCount), 1)) : U("", !0)
|
|
213
213
|
])
|
|
214
214
|
], 64))
|
|
215
215
|
]),
|
|
@@ -224,7 +224,7 @@ const aA = "data:image/webp;base64,UklGRroSAABXRUJQVlA4WAoAAAAwAAAAvwAAyQAASUNDU
|
|
|
224
224
|
}, e.$attrs, { onDelete: H }), null, 16, ["modelValue", "field-mapping", "show-delete"])) : U("", !0)
|
|
225
225
|
]));
|
|
226
226
|
}
|
|
227
|
-
}), vA = /* @__PURE__ */ K(iA, [["__scopeId", "data-v-
|
|
227
|
+
}), vA = /* @__PURE__ */ K(iA, [["__scopeId", "data-v-e1f95751"]]);
|
|
228
228
|
export {
|
|
229
229
|
vA as default
|
|
230
230
|
};
|
|
@@ -225,7 +225,7 @@ import '../assets/layout2.css';const t = {
|
|
|
225
225
|
_: 3
|
|
226
226
|
}, 16, ["modelValue", "width", "top", "style", "modal", "modal-penetrable", "append-to-body", "class"]));
|
|
227
227
|
}
|
|
228
|
-
}), ce = /* @__PURE__ */ K(te, [["__scopeId", "data-v-
|
|
228
|
+
}), ce = /* @__PURE__ */ K(te, [["__scopeId", "data-v-7a7a1332"]]);
|
|
229
229
|
export {
|
|
230
230
|
ce as C
|
|
231
231
|
};
|
|
@@ -3,7 +3,7 @@ import { ElButton as z, ElForm as we, ElFormItem as oe, ElInput as Z, ElDatePick
|
|
|
3
3
|
import { IconMagnify as Le, IconCheck as Pe, IconUp as Se, IconDown as We, IconShrink as Be } from "color-message-lingyun-vue";
|
|
4
4
|
import { operationConfigMap as C, labelPositionMap as I, componentType as h, dateParamsMap as Ie, dateFormat as ae, emitsMap as B } from "ling-yun-methods";
|
|
5
5
|
import { _ as ne } from "./_plugin-vue_export-helper.CHgC5LLL.js";
|
|
6
|
-
import { C as te } from "./layout.
|
|
6
|
+
import { C as te } from "./layout.B0thq8O1.js";
|
|
7
7
|
import '../assets/layout3.css';const Ne = [
|
|
8
8
|
{
|
|
9
9
|
type: "primary",
|
|
@@ -101,9 +101,9 @@ import '../assets/layout3.css';const Ne = [
|
|
|
101
101
|
emits: ["change", "enter"],
|
|
102
102
|
setup(a, { expose: L }) {
|
|
103
103
|
le((u) => ({
|
|
104
|
-
|
|
104
|
+
v0518a9d3: a.minWidth + "px"
|
|
105
105
|
}));
|
|
106
|
-
const P = Y(() => import("./layout.2Mabaug0.js")), y = Y(() => import("./layout.
|
|
106
|
+
const P = Y(() => import("./layout.2Mabaug0.js")), y = Y(() => import("./layout.CHE7L3Br.js")), v = a, i = w(null), c = U(() => v.isFilter ? "filter-form" : v.isFilterPreview ? "filter-preview-form" : "search-bar-form");
|
|
107
107
|
return L({
|
|
108
108
|
validate: (u) => i.value ? i.value.validate(u) : Promise.resolve(!0),
|
|
109
109
|
resetFields: () => {
|
|
@@ -248,7 +248,7 @@ import '../assets/layout3.css';const Ne = [
|
|
|
248
248
|
_: 3
|
|
249
249
|
}, 8, ["model", "label-width", "label-position", "inline", "rules", "class"]));
|
|
250
250
|
}
|
|
251
|
-
}), q = /* @__PURE__ */ ne(Oe, [["__scopeId", "data-v-
|
|
251
|
+
}), q = /* @__PURE__ */ ne(Oe, [["__scopeId", "data-v-24a07db4"]]), ze = { class: "h-32 w-full" }, Re = { class: "flex items-center justify-between pd-b-20" }, Te = { class: "text-right" }, je = { class: "drawer-header" }, Ae = { class: "flex-1 pd-l-16 pd-r-16 overflow-y-auto" }, He = { class: "text-right border-top pd-t-16 pd-l-16 pd-r-16" }, Ke = /* @__PURE__ */ Object.assign({
|
|
252
252
|
name: "SearchBar"
|
|
253
253
|
}, {
|
|
254
254
|
__name: "layout",
|
|
@@ -302,8 +302,8 @@ import '../assets/layout3.css';const Ne = [
|
|
|
302
302
|
emits: [B.updateModelValue, B.operation],
|
|
303
303
|
setup(a, { expose: L, emit: P }) {
|
|
304
304
|
le((o) => ({
|
|
305
|
-
|
|
306
|
-
|
|
305
|
+
v0b0430f6: a.maxHeight + "px",
|
|
306
|
+
v7a26127a: j.value ? j.value + "px" : "100%"
|
|
307
307
|
}));
|
|
308
308
|
const y = a, v = P, i = w({}), c = w(!y.isExpand), u = w(null), D = w(!1), e = w(!1), l = U(() => {
|
|
309
309
|
const o = {};
|
|
@@ -581,7 +581,7 @@ import '../assets/layout3.css';const Ne = [
|
|
|
581
581
|
}, 8, ["modelValue"])
|
|
582
582
|
], 2));
|
|
583
583
|
}
|
|
584
|
-
}), Ze = /* @__PURE__ */ ne(Ke, [["__scopeId", "data-v-
|
|
584
|
+
}), Ze = /* @__PURE__ */ ne(Ke, [["__scopeId", "data-v-e5132f07"]]);
|
|
585
585
|
export {
|
|
586
586
|
Ze as S
|
|
587
587
|
};
|
|
@@ -3,7 +3,7 @@ import { ElButton as z, ElForm as we, ElFormItem as oe, ElInput as Z, ElDatePick
|
|
|
3
3
|
import { IconMagnify as Le, IconCheck as Pe, IconUp as Se, IconDown as We, IconShrink as Be } from "color-message-lingyun-vue";
|
|
4
4
|
import { operationConfigMap as C, labelPositionMap as I, componentType as h, dateParamsMap as Ie, dateFormat as ae, emitsMap as B } from "ling-yun-methods";
|
|
5
5
|
import { _ as ne } from "./_plugin-vue_export-helper.CHgC5LLL.js";
|
|
6
|
-
import { C as te } from "./layout.
|
|
6
|
+
import { C as te } from "./layout.B0thq8O1.js";
|
|
7
7
|
import '../assets/layout3.css';const Ne = [
|
|
8
8
|
{
|
|
9
9
|
type: "primary",
|
|
@@ -101,9 +101,9 @@ import '../assets/layout3.css';const Ne = [
|
|
|
101
101
|
emits: ["change", "enter"],
|
|
102
102
|
setup(a, { expose: L }) {
|
|
103
103
|
le((u) => ({
|
|
104
|
-
|
|
104
|
+
v30e5c290: a.minWidth + "px"
|
|
105
105
|
}));
|
|
106
|
-
const P = Y(() => import("./layout.2Mabaug0.js")), y = Y(() => import("./layout.
|
|
106
|
+
const P = Y(() => import("./layout.2Mabaug0.js")), y = Y(() => import("./layout.CHE7L3Br.js")), v = a, i = w(null), c = U(() => v.isFilter ? "filter-form" : v.isFilterPreview ? "filter-preview-form" : "search-bar-form");
|
|
107
107
|
return L({
|
|
108
108
|
validate: (u) => i.value ? i.value.validate(u) : Promise.resolve(!0),
|
|
109
109
|
resetFields: () => {
|
|
@@ -247,7 +247,7 @@ import '../assets/layout3.css';const Ne = [
|
|
|
247
247
|
_: 3
|
|
248
248
|
}, 8, ["model", "label-width", "label-position", "inline", "rules", "class"]));
|
|
249
249
|
}
|
|
250
|
-
}), q = /* @__PURE__ */ ne(Oe, [["__scopeId", "data-v-
|
|
250
|
+
}), q = /* @__PURE__ */ ne(Oe, [["__scopeId", "data-v-14db93a9"]]), ze = { class: "h-32 w-full" }, Re = { class: "flex items-center justify-between pd-b-20" }, Te = { class: "text-right" }, je = { class: "drawer-header" }, Ae = { class: "flex-1 pd-l-16 pd-r-16 overflow-y-auto" }, He = { class: "text-right border-top pd-t-16 pd-l-16 pd-r-16" }, Ke = /* @__PURE__ */ Object.assign({
|
|
251
251
|
name: "SearchBar"
|
|
252
252
|
}, {
|
|
253
253
|
__name: "layout",
|
|
@@ -301,8 +301,8 @@ import '../assets/layout3.css';const Ne = [
|
|
|
301
301
|
emits: [B.updateModelValue, B.operation],
|
|
302
302
|
setup(a, { expose: L, emit: P }) {
|
|
303
303
|
le((o) => ({
|
|
304
|
-
|
|
305
|
-
|
|
304
|
+
v0b0430f6: a.maxHeight + "px",
|
|
305
|
+
v7a26127a: j.value ? j.value + "px" : "100%"
|
|
306
306
|
}));
|
|
307
307
|
const y = a, v = P, i = w({}), c = w(!y.isExpand), u = w(null), D = w(!1), e = w(!1), l = U(() => {
|
|
308
308
|
const o = {};
|
|
@@ -580,7 +580,7 @@ import '../assets/layout3.css';const Ne = [
|
|
|
580
580
|
}, 8, ["modelValue"])
|
|
581
581
|
], 2));
|
|
582
582
|
}
|
|
583
|
-
}), Ze = /* @__PURE__ */ ne(Ke, [["__scopeId", "data-v-
|
|
583
|
+
}), Ze = /* @__PURE__ */ ne(Ke, [["__scopeId", "data-v-e5132f07"]]);
|
|
584
584
|
export {
|
|
585
585
|
Ze as S
|
|
586
586
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useCssVars as L, ref as N, watch as U, createElementBlock as u, createCommentVNode as v, openBlock as r, Fragment as x, renderList as j, normalizeClass as z, unref as o, createElementVNode as m, createBlock as f, normalizeStyle as O, withCtx as S, resolveDynamicComponent as T, toDisplayString as k, renderSlot as M, createVNode as E } from "vue";
|
|
2
2
|
import { ElImage as R, ElIcon as w } from "element-plus";
|
|
3
3
|
import { emitsMap as c, uploadFileTypeMap as P, uploadFileType as a } from "ling-yun-methods";
|
|
4
|
-
import { IconTxt as A, IconPpt as
|
|
4
|
+
import { IconTxt as A, IconPpt as b, IconXls as F, IconDoc as I, IconPdf as G, IconDelete as K } from "color-message-lingyun-vue";
|
|
5
5
|
import { _ as X } from "./_plugin-vue_export-helper.CHgC5LLL.js";
|
|
6
6
|
import '../assets/layout6.css';const i = {
|
|
7
7
|
uploading: "uploading",
|
|
@@ -49,18 +49,18 @@ import '../assets/layout6.css';const i = {
|
|
|
49
49
|
emits: [c.delete, c.change, c.updateModelValue],
|
|
50
50
|
setup(l, { emit: _ }) {
|
|
51
51
|
L((e) => ({
|
|
52
|
-
|
|
52
|
+
e6fad506: l.rowCount
|
|
53
53
|
}));
|
|
54
54
|
const p = l, y = _, n = N(p.modelValue), B = Object.fromEntries(
|
|
55
55
|
Object.entries(P).map(([e, s]) => [s, e])
|
|
56
56
|
), g = (e) => e[p.fieldMapping.fileUrl] ? e[p.fieldMapping.fileUrl] : e.raw && e.raw instanceof File ? URL.createObjectURL(e.raw) : e instanceof File ? URL.createObjectURL(e) : "", C = {
|
|
57
57
|
[a.pdf]: G,
|
|
58
|
-
[a.doc]:
|
|
59
|
-
[a.docx]:
|
|
60
|
-
[a.xls]:
|
|
61
|
-
[a.xlsx]:
|
|
62
|
-
[a.ppt]:
|
|
63
|
-
[a.pptx]:
|
|
58
|
+
[a.doc]: I,
|
|
59
|
+
[a.docx]: I,
|
|
60
|
+
[a.xls]: F,
|
|
61
|
+
[a.xlsx]: F,
|
|
62
|
+
[a.ppt]: b,
|
|
63
|
+
[a.pptx]: b,
|
|
64
64
|
[a.txt]: A
|
|
65
65
|
}, V = (e) => e?.includes("image"), $ = (e) => {
|
|
66
66
|
const s = B[e];
|
|
@@ -142,7 +142,7 @@ import '../assets/layout6.css';const i = {
|
|
|
142
142
|
], 2))), 128))
|
|
143
143
|
])) : v("", !0);
|
|
144
144
|
}
|
|
145
|
-
}), ae = /* @__PURE__ */ X(Z, [["__scopeId", "data-v-
|
|
145
|
+
}), ae = /* @__PURE__ */ X(Z, [["__scopeId", "data-v-baab285a"]]);
|
|
146
146
|
export {
|
|
147
147
|
ae as _,
|
|
148
148
|
i as u
|
|
@@ -60,7 +60,7 @@ import '../assets/layout.css';const S = { class: "icon-empty flex flex-col items
|
|
|
60
60
|
}, f(t.text), 5)
|
|
61
61
|
]));
|
|
62
62
|
}
|
|
63
|
-
}),
|
|
63
|
+
}), v = /* @__PURE__ */ x(z, [["__scopeId", "data-v-1495b827"]]);
|
|
64
64
|
export {
|
|
65
|
-
|
|
65
|
+
v as I
|
|
66
66
|
};
|
package/lib/BatchImport.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const D=require("./chunks/index.CkihWzK6.js"),e=require("vue"),c=require("element-plus"),s=require("ling-yun-methods"),h=require("./chunks/layout.
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const D=require("./chunks/index.CkihWzK6.js"),e=require("vue"),c=require("element-plus"),s=require("ling-yun-methods"),h=require("./chunks/layout.2cqUIJaF.js"),S=require("color-message-lingyun-vue"),b={__name:"ImportResultContent",props:{uploadResData:{type:Object,default:()=>({})},templateConfig:{type:Object,default:()=>({})}},setup(n){const r=n,f=()=>{const{ossUrl:p,fileName:l}=r.uploadResData;r.templateConfig.downloadErrorFile(l,p,r.templateConfig.isNeedTransform)};return(p,l)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("p",null," 共"+e.toDisplayString(n.uploadResData.total||0)+"条数据,其中"+e.toDisplayString(n.uploadResData.successTotal||0)+"条数据成功,"+e.toDisplayString(n.uploadResData.failureTotal||0)+"条失败 ",1),e.createElementVNode("p",{style:{color:"var(--text-color-4)"}},[l[0]||(l[0]=e.createElementVNode("span",null,"失败原因请下载",-1)),e.createElementVNode("span",{class:"pointer",style:{color:"var(--error-color-1)"},onClick:f}," 错误报告 ")])],64))}},M={key:0,class:"flex items-center"},R={key:0,class:"flex items-center flex-1 fz-12"},q={key:1},I=Object.assign({name:"BatchImport"},{__name:"layout",props:{modelValue:{type:Boolean,default:!1},title:{type:String,default:"导入"},templateName:{type:String,default:"导入"},width:{type:Number,default:520},templateConfig:{type:Object,default:()=>({})},uploadFileConfig:{type:Object,default:()=>{}}},emits:[s.emitsMap.updateModelValue,"success","error","cancel","uploadSuccess"],setup(n,{emit:r}){const f={templateFileName:"导入模板.xlsx"},p={uploadFileType:[s.uploadFileType.xlsx,s.uploadFileType.xls],isCustomRequest:!0,multiple:!1,rowCount:1,maxCount:1},l=n,v=r,i=e.ref([]),d=e.computed({get(){return l.modelValue},set(o){v(s.emitsMap.updateModelValue,o)}}),k=e.computed(()=>u.value==="result"?"导入结果":l.title),C=e.computed(()=>({...p,...l.uploadFileConfig})),m=e.computed(()=>({...f,...l.templateConfig})),w=()=>{m.value.downloadTemplate({},m.value.templateFileName)},u=e.ref("upload"),y=e.ref({}),B=()=>{d.value=!1};function T(o,t){const a=o.name.split(".").pop(),g=`${t}.${a}`;return new File([o],g,{type:o.type,lastModified:o.lastModified})}const E=e.ref(null),F=async()=>{const o=l.uploadFileConfig?.fileName||i.value?.[0]?.raw?.name;C.value?.apiConfig({...C.value?.params,file:T(i.value?.[0]?.raw,o)}).then(t=>{const{data:a}=t;E.value=a;const{failureTotal:g,successTotal:N}=a;t.code===s.codeMap.success&&(g?(u.value="result",y.value=a,N&&v("uploadSuccess")):(s.messageSuccess(`文件导入成功,共导入数据:${N}条`),v("uploadSuccess"),d.value=!1))})},V=()=>{d.value=!1};return(o,t)=>(e.openBlock(),e.createBlock(e.unref(c.ElDialog),{modelValue:d.value,"onUpdate:modelValue":t[1]||(t[1]=a=>d.value=a),title:k.value,width:n.width,"close-on-click-modal":!1,"close-on-press-escape":!1,onClose:V},{footer:e.withCtx(()=>[u.value==="upload"?(e.openBlock(),e.createElementBlock("div",M,[m.value?.downloadTemplate?(e.openBlock(),e.createElementBlock("div",R,[e.createVNode(e.unref(c.ElIcon),{size:14,color:"var(--text-color-4)"},{default:e.withCtx(()=>[e.createVNode(e.unref(S.IconQuery))]),_:1}),t[2]||(t[2]=e.createElementVNode("div",{class:"text-74798c pd-l-4"},"还没有模板?点击下载",-1)),e.createElementVNode("div",{class:"text-3b64ff pointer",onClick:w}," 《"+e.toDisplayString(n.templateName)+"模板》 ",1)])):e.createCommentVNode("",!0),e.createVNode(e.unref(c.ElButton),{onClick:V},{default:e.withCtx(()=>[...t[3]||(t[3]=[e.createTextVNode("取消",-1)])]),_:1}),e.createVNode(e.unref(c.ElButton),{type:"primary",onClick:F,disabled:!i.value?.length},{default:e.withCtx(()=>[...t[4]||(t[4]=[e.createTextVNode(" 确认 ",-1)])]),_:1},8,["disabled"])])):e.createCommentVNode("",!0),u.value==="result"?(e.openBlock(),e.createElementBlock("div",q,[e.createVNode(e.unref(c.ElButton),{type:"primary",onClick:B},{default:e.withCtx(()=>[...t[5]||(t[5]=[e.createTextVNode("我知道了",-1)])]),_:1})])):e.createCommentVNode("",!0)]),default:e.withCtx(()=>[u.value==="upload"?(e.openBlock(),e.createBlock(h.default,e.mergeProps({key:0,modelValue:i.value,"onUpdate:modelValue":t[0]||(t[0]=a=>i.value=a)},C.value),null,16,["modelValue"])):e.createCommentVNode("",!0),u.value==="result"?(e.openBlock(),e.createBlock(b,{key:1,templateConfig:m.value,uploadResData:y.value},null,8,["templateConfig","uploadResData"])):e.createCommentVNode("",!0)]),_:1},8,["modelValue","title","width"]))}}),x=D.withInstall(I);exports.BatchImport=x;exports.default=x;
|