|
@@ -203,20 +203,27 @@ export default {
|
|
|
uploadProgress() {
|
|
|
console.log("uploadProgress");
|
|
|
},
|
|
|
- uploadSuccess() {
|
|
|
- this.$notify({
|
|
|
- message: "上传成功",
|
|
|
- type: "success",
|
|
|
- });
|
|
|
+ uploadSuccess(res) {
|
|
|
this.fileLoading = false;
|
|
|
sessionStorage.setItem("question_back", "true");
|
|
|
- if (this.importType == "word") {
|
|
|
- // this.$router.push({
|
|
|
- // path: "/edit_paper/" + response.id + "/import_paper",
|
|
|
- // });
|
|
|
- this.back();
|
|
|
+ if ("PASS" == res) {
|
|
|
+ this.$notify({
|
|
|
+ message: "上传成功",
|
|
|
+ type: "success",
|
|
|
+ });
|
|
|
+ this.$router.push({ path: "/questions/import_paper/0" });
|
|
|
} else {
|
|
|
- this.back();
|
|
|
+ this.$confirm("已开启审核功能.是否跳转到待审列表?", "上传成功", {
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ type: "warning",
|
|
|
+ })
|
|
|
+ .then(() => {
|
|
|
+ this.$router.push({ path: "/questions/paper_pending_trial/0" });
|
|
|
+ })
|
|
|
+ .catch(() => {
|
|
|
+ this.$router.push({ path: "/questions/import_paper/0" });
|
|
|
+ });
|
|
|
}
|
|
|
},
|
|
|
uploadError(err) {
|