Commit 402d9e3d authored by 杨梦雪's avatar 杨梦雪

作业

parent 0aebfb6f
......@@ -27,7 +27,7 @@
<script>
/* eslint-disable */
import {signUpInit, signBack} from "r/index/signUp";
import {signBack, signUpInit} from "r/index/signUp";
export default {
name: "Pass",
......@@ -36,9 +36,7 @@
examine_status: window.localStorage.getItem(
"examine_status" + this.$store.state.indexIdentity
),
examine_reason: window.localStorage.getItem(
"examine_reason" + this.$store.state.indexIdentity
),
examine_reason: "",
signBackStatus: "",
status_val: "",
status: "",
......@@ -128,7 +126,6 @@
this.type = "success";
}
this.$emit("getStatus", this.type);
const code = this.$store.state.indexIdentity;
//订单支付金额
window.localStorage.setItem("has_amount" + code, res.data.has_amount);
......@@ -136,7 +133,8 @@
window.localStorage.setItem("order_no" + code, res.data.order_no);
this.examine_status = res.data.examine_status;
window.localStorage.setItem("examine_status" + code, res.data.examine_status); //返回错误原因
window.localStorage.setItem("examine_reason" + code, res.data.examine_reason); //资料审核状态
// window.localStorage.setItem("examine_reason" + code, res.data.examine_reason); //资料审核状态
this.examine_reason = res.data.examine_reason
const aPath = res.data.achievement_path;
if (aPath) {
let arr = aPath.split(",");
......
......@@ -149,7 +149,6 @@
let endTime = new Date((item.end_time).replace(/-/g, "/")).getTime()
let nowDate = new Date().getTime()
this.end_time = nowDate < endTime ? true : false
} else if (item.time_out == 2) {
return this.$message.error("填写作业时间未开始");
}
......
......@@ -408,17 +408,18 @@
if (gotfileList) {
this.stu_fileList = gotfileList.map((item) => {
return {
name: item.url.split("/work/")[1],
name: decodeURI(item.url.split("/work/")[1]),
url: item.url,
url_open: item.url_open,
url_open: decodeURI(item.url_open),
type: item.type,
};
});
this.fileList = gotfileList.map((item) => {
return {
url_open: item.url_open,
url_open: decodeURI(item.url_open),
};
});
console.log(this.stu_fileList)
}
this.$forceUpdate();
} else if (student_status == 2) {
......@@ -518,7 +519,6 @@
});
},
});
console.log(resData)
cos.putObject({
Bucket: resData.credentials.bucket,
Region: resData.credentials.region,
......@@ -541,11 +541,13 @@
}
);
} else {
this.$message.error(resData.msg);
this.isUploading = false;
this.$message.error(res.data.msg);
}
})
.catch((err) => {
console.log(err);
this.isUploading = false;
});
},
// cos上传-告诉后端上传成功
......@@ -561,8 +563,9 @@
this.$forceUpdate();
let obj = {
url_open: res.data.picture_path,
savefile: res.data.config.savefile,
name: res.data.config.savefile.split("/work/")[1],
name: decodeURI(res.data.real_filename.split("/work/")[1]),
// savefile: res.data.config.savefile,
// name: res.data.config.savefile.split("/work/")[1],
};
this.stu_fileList.push(obj);
this.fileList.push(obj);
......@@ -664,9 +667,8 @@
let getfile = file.url_open;
// console.log(savefile.match(/^(?:[^\/]|\/\/)*/),'222222');//获取域名
let str = getfile.split(
"https://yingdi-achievement-1320656968.cos.ap-beijing.myqcloud.com/"
); //https://yingdi-achievement-1320656968.cos.ap-beijing.myqcloud.com/进行分割,
console.log(str, "str");
"https://campiste-1320656968.cos.ap-beijing.myqcloud.com/"
); //https://campiste-1320656968.cos.ap-beijing.myqcloud.com/进行分割,
let savefile = str[1].split('?')[0];
let stu_work_num = this.work_nums;
delPic({object: savefile, teacher_id: stu_work_num}).then((res) => {
......@@ -678,7 +680,6 @@
if (item.url_open == file.url_open) {
this.stu_fileList.splice(idx, 1);
// this.fileList.splice(idx, 1);
console.log(this.fileList);
let code = this.$store.state.indexIdentity;
this.stu_fileListoss = this.stu_fileList
.map(function (item, index) {
......@@ -743,17 +744,14 @@
})
.catch((_) => {
});
}
,
},
// 未完成
notReadHandle() {
this.formData.teacher_id = this.work_nums;
console.log(this.stu_fileList)
this.formData.stu_enclosure_url = this.stu_fileList.map((item) => {
return item.url_open;
return decodeURI(item.url_open.split('?sign=')[0]);
})
.join(",");
console.log(this.formData.stu_enclosure_url)
subStudentWork(this.formData)
.then((response) => {
// console.log(response);
......@@ -771,8 +769,7 @@
.catch((error) => {
console.log(error);
});
}
,
},
// 提交按钮
confirm() {
if (this.stu_fileList.length == 0) {
......@@ -802,8 +799,7 @@
message: "已取消",
});
});
}
,
},
},
watch: {
......
......@@ -57,6 +57,7 @@
},
created() {
this.info = this.$store.state.info;
console.log(this.info)
setTimeout(() => {
this.anchorList = this.getAnchor(this.info.student_recruitment_brochure);
}, 1000)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment