feat:合并

This commit is contained in:
lixg
2023-02-25 22:12:42 +08:00
4 changed files with 12 additions and 10 deletions

View File

@@ -236,6 +236,12 @@ export default {
if (status === "done") { if (status === "done") {
state.fileName = info.file.name; state.fileName = info.file.name;
let i = 0; let i = 0;
let timeouts = setTimeout(() => {
clearInterval(timer)
state.addLoading = false;
message.destroy();
message.error(`文件导入超时`);
}, 30000);
let timer = setInterval(() => { let timer = setInterval(() => {
let uid = info.file.response.data; let uid = info.file.response.data;
api api
@@ -256,25 +262,21 @@ export default {
state.downloadErrUrl = res.data.data.url; state.downloadErrUrl = res.data.data.url;
console.log("props.getStudent", props.getStudent); console.log("props.getStudent", props.getStudent);
clearInterval(timer); clearInterval(timer);
clearTimeout(timeouts);
} }
} else { } else {
state.addLoading = false; state.addLoading = false;
message.destroy(); message.destroy();
message.error(`文件导入超时`); clearTimeout(timeouts);
} }
}) })
.catch((err) => { .catch((err) => {
state.addLoading = false; state.addLoading = false;
clearInterval(timer); clearInterval(timer);
clearTimeout(timeouts);
console.log("查询导入状态失败", err); console.log("查询导入状态失败", err);
}); });
}, 500); }, 500);
setTimeout(() => {
clearInterval(timer)
state.addLoading = false;
message.destroy();
message.error(`文件导入超时`);
}, 30000);
} else if (status === "error") { } else if (status === "error") {
state.uploadErr = true; state.uploadErr = true;
message.error(`${info.file.name}上传失败`); message.error(`${info.file.name}上传失败`);

View File

@@ -296,7 +296,7 @@
customRender: (text) => { customRender: (text) => {
return ( return (
<div class="racona"> <div class="racona">
<span> {text.record.score?text.record.score:"-"}</span> <span> {text.record.score?text.record.score<0?"-":text.record.score:"-"} </span>
</div> </div>
); );
}, },

View File

@@ -300,7 +300,7 @@
customRender: (text) => { customRender: (text) => {
return ( return (
<div class="racona"> <div class="racona">
<span> {text.record.score?text.record.score:"-"}</span> <span> {text.record.score?text.record.score<0?"-":text.record.score:"-"}</span>
</div> </div>
); );
}, },

View File

@@ -769,7 +769,7 @@
<a-button @click="settingTopFlag(record)" type="link" <a-button @click="settingTopFlag(record)" type="link"
>{{ record.topFlag ? "取消优秀" : "优秀学员" }} >{{ record.topFlag ? "取消优秀" : "优秀学员" }}
</a-button> </a-button>
<a-button type="link" @click="showChangeGroupModal(record)" <a-button type="link" :disabled="record.isLeader === '1'" @click="showChangeGroupModal(record)"
>换组 >换组
</a-button> </a-button>
</template> </template>