mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-11 03:46:45 +08:00
Merge branch 'zcwy_0723_bug' into master-0705
This commit is contained in:
@@ -254,6 +254,16 @@ export default {
|
|||||||
console.log("查询导入状态", res);
|
console.log("查询导入状态", res);
|
||||||
if (res.data.code === 200) {
|
if (res.data.code === 200) {
|
||||||
if (res.data.data.status !== "START") {
|
if (res.data.data.status !== "START") {
|
||||||
|
if(res.data.data.status === "SUCCESS"){
|
||||||
|
state.addLoading = false;
|
||||||
|
state.fileList = [];
|
||||||
|
state.uploadpercent = -1;
|
||||||
|
message.destroy();
|
||||||
|
message.error(`当前开课暂无作业,无法导入成绩`);
|
||||||
|
clearInterval(timer);
|
||||||
|
clearTimeout(timeouts);
|
||||||
|
return;
|
||||||
|
}
|
||||||
i++;
|
i++;
|
||||||
if (i === 1) {
|
if (i === 1) {
|
||||||
message.destroy();
|
message.destroy();
|
||||||
|
|||||||
@@ -162,9 +162,9 @@
|
|||||||
:style="{ display: hideshow ? 'none' : 'block' }"
|
:style="{ display: hideshow ? 'none' : 'block' }"
|
||||||
>
|
>
|
||||||
<div class="btnsbox">
|
<div class="btnsbox">
|
||||||
<div class="btn4_tit" @click="showEScoreModal">
|
<!-- <div class="btn4_tit" @click="showEScoreModal">
|
||||||
<span>批量录入成绩</span>
|
<span>批量录入成绩</span>
|
||||||
</div>
|
</div> -->
|
||||||
<div class="btn4_op1" @click="updateStatus(1)">
|
<div class="btn4_op1" @click="updateStatus(1)">
|
||||||
<span>批量结业</span>
|
<span>批量结业</span>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -263,14 +263,25 @@ export default {
|
|||||||
headers: {
|
headers: {
|
||||||
token: Cookies.get("token"),
|
token: Cookies.get("token"),
|
||||||
},
|
},
|
||||||
}).then(
|
}).then((res) => {
|
||||||
(res) => {
|
const reader = new FileReader();
|
||||||
downLoad(res.data, "项目详情.xlsx");
|
reader.onload = function(e) {
|
||||||
},
|
try {
|
||||||
(err) => {
|
const result = JSON.parse(e.target.result);
|
||||||
message.error(err);
|
if (result.status === 200 || result.success) {
|
||||||
}
|
// 下载文件
|
||||||
);
|
downLoad(res.data, "项目详情.xlsx");
|
||||||
|
} else {
|
||||||
|
message.error(result.message);
|
||||||
|
}
|
||||||
|
} catch (error) {
|
||||||
|
downLoad(res.data, "项目详情.xlsx");
|
||||||
|
}
|
||||||
|
};
|
||||||
|
reader.readAsText(res.data);
|
||||||
|
}).catch((error) => {
|
||||||
|
message.error(error.response ? error.response.data.message : error.toString());
|
||||||
|
});
|
||||||
} else {
|
} else {
|
||||||
const params = {};
|
const params = {};
|
||||||
params.status = state.status;
|
params.status = state.status;
|
||||||
@@ -291,19 +302,25 @@ export default {
|
|||||||
headers: {
|
headers: {
|
||||||
token: Cookies.get("token"),
|
token: Cookies.get("token"),
|
||||||
},
|
},
|
||||||
}).then(
|
}).then((res) => {
|
||||||
(res) => {
|
const reader = new FileReader();
|
||||||
if(res.data.status && res.data.status == 600){
|
reader.onload = function(e) {
|
||||||
message.error(res.data.message);
|
try {
|
||||||
}else{
|
const result = JSON.parse(e.target.result);
|
||||||
|
if (result.status === 200 || result.success) {
|
||||||
|
// 下载文件
|
||||||
|
downLoad(res.data, "项目详情.xlsx");
|
||||||
|
} else {
|
||||||
|
message.error(result.message);
|
||||||
|
}
|
||||||
|
} catch (error) {
|
||||||
downLoad(res.data, "项目详情.xlsx");
|
downLoad(res.data, "项目详情.xlsx");
|
||||||
}
|
}
|
||||||
|
};
|
||||||
},
|
reader.readAsText(res.data);
|
||||||
(err) => {
|
}).catch((error) => {
|
||||||
message.error(err);
|
message.error(error.response ? error.response.data.message : error.toString());
|
||||||
}
|
});
|
||||||
);
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
// 表格数据
|
// 表格数据
|
||||||
|
|||||||
Reference in New Issue
Block a user