feat:合并

This commit is contained in:
lixg
2023-01-10 15:55:23 +08:00
parent 124b8ca044
commit 52a5690d5e
2 changed files with 16 additions and 5 deletions

View File

@@ -34,6 +34,7 @@
:multiple="true"
@change="handleChange"
:showUploadList="false"
:data="importHomeWorkData"
>
<p class="ant-upload-drag-icon">
<inbox-outlined></inbox-outlined>
@@ -213,9 +214,13 @@ export default {
fileList: [],
succNum: 0, //成功数据数
errNum: 0, //失败数据数
importHomeWorkData: {}, //传参
});
const closeDrawer = () => {
ctx.emit("update:eScorevisible", false);
state.fileList = [];
state.uploadpercent = -1;
state.uploadErr = false; //上传失败
};
const afterVisibleChange = (bool) => {
@@ -224,21 +229,26 @@ export default {
//上传文件
const handleChange = (info) => {
console.log("info11111", info);
const isType =
info.file.name.indexOf(".xlsx") !== "-1" ||
info.file.name.indexOf(".xls") !== "-1";
info.file.name.indexOf(".xlsx") !== -1 ||
info.file.name.indexOf(".xls") != -1;
console.log("info11111", info, isType);
if (!isType) {
message.destroy();
message.error("仅支持xls、xlsx格式!");
return;
}
state.importHomeWorkData = {
// stageId:props.stageId,
// targetId:props.targetId,
type: props.type,
};
state.addLoading = true;
state.uploadpercent = parseInt(info.file.percent);
console.log("我是文件上传的进度---------->", info.file.percent);
const status = info.file.status;
if (status !== "uploading") {
console.log(info.file, info.fileList);
// console.log(info.file, info.fileList);
}
if (status === "done") {
let i = 0;