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

作业

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