|
|
@ -137,6 +137,7 @@ import util from '@/util' |
|
|
|
export default { |
|
|
|
export default { |
|
|
|
data() { |
|
|
|
data() { |
|
|
|
return { |
|
|
|
return { |
|
|
|
|
|
|
|
systemId: util.getCookie('systemId'), |
|
|
|
classId: util.getCookie('classId'), |
|
|
|
classId: util.getCookie('classId'), |
|
|
|
className: util.getCookie('className') ? decodeURI(util.getCookie('className')) : '', |
|
|
|
className: util.getCookie('className') ? decodeURI(util.getCookie('className')) : '', |
|
|
|
courseId: util.getCookie('courseId'), |
|
|
|
courseId: util.getCookie('courseId'), |
|
|
@ -190,7 +191,7 @@ export default { |
|
|
|
// 获取项目列表 |
|
|
|
// 获取项目列表 |
|
|
|
getList(){ |
|
|
|
getList(){ |
|
|
|
let data = { |
|
|
|
let data = { |
|
|
|
systemId: 1, |
|
|
|
systemId: this.systemId, |
|
|
|
cId: this.courseId, // 课程id |
|
|
|
cId: this.courseId, // 课程id |
|
|
|
permissions: this.projectPermissions // 练习/考核 |
|
|
|
permissions: this.projectPermissions // 练习/考核 |
|
|
|
} |
|
|
|
} |
|
|
@ -221,6 +222,7 @@ export default { |
|
|
|
points.map(e => { |
|
|
|
points.map(e => { |
|
|
|
e.code = '' // 后端返回的字段没有code,要手动加上以存储运行的代码 |
|
|
|
e.code = '' // 后端返回的字段没有code,要手动加上以存储运行的代码 |
|
|
|
e.codeId = '' // 代码通过接口传给后端运行后,接口会返回一个codeId,提交的时候需要传这个codeId |
|
|
|
e.codeId = '' // 代码通过接口传给后端运行后,接口会返回一个codeId,提交的时候需要传这个codeId |
|
|
|
|
|
|
|
e.answer = '' // 代码运行结果 |
|
|
|
}) |
|
|
|
}) |
|
|
|
this.points = points |
|
|
|
this.points = points |
|
|
|
this.taskList = points // 实验任务 |
|
|
|
this.taskList = points // 实验任务 |
|
|
@ -267,7 +269,7 @@ export default { |
|
|
|
const item = points.find(e => e.judgmentId === judgmentId) |
|
|
|
const item = points.find(e => e.judgmentId === judgmentId) |
|
|
|
if (item) item.code = code |
|
|
|
if (item) item.code = code |
|
|
|
this.$emit('tell', projectId, points) |
|
|
|
this.$emit('tell', projectId, points) |
|
|
|
this.$emit('recoveryCode', points.findIndex(e => e.judgmentId === judgmentId) + '') |
|
|
|
this.$emit('recoveryCode', points.findIndex(e => e.judgmentId === judgmentId) + '') // 切换为缓存的判分点,tab索引值要为字符串 |
|
|
|
}).catch(res => {}) |
|
|
|
}).catch(res => {}) |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
const item = this.points.find(e => e.judgmentId === judgmentId) |
|
|
|
const item = this.points.find(e => e.judgmentId === judgmentId) |
|
|
@ -290,9 +292,8 @@ export default { |
|
|
|
this.isSubmit = false |
|
|
|
this.isSubmit = false |
|
|
|
this.countVal = 0 |
|
|
|
this.countVal = 0 |
|
|
|
this.grade = '00' |
|
|
|
this.grade = '00' |
|
|
|
// 切换实训项目-标签页回到第一个位置 |
|
|
|
this.$emit('recoveryCode') // 切换实训项目后回到第一个判分点 |
|
|
|
this.$emit('recoveryCode') |
|
|
|
newmain.$emit('isSubmit', this.isSubmit) // 选择项目后把提交状态重置为未提交 |
|
|
|
newmain.$emit('isSubmit', this.isSubmit) |
|
|
|
|
|
|
|
}, |
|
|
|
}, |
|
|
|
//重新开始 |
|
|
|
//重新开始 |
|
|
|
reload() { |
|
|
|
reload() { |
|
|
@ -330,11 +331,11 @@ export default { |
|
|
|
// 判分点参数 |
|
|
|
// 判分点参数 |
|
|
|
const attributesReqList = [] |
|
|
|
const attributesReqList = [] |
|
|
|
pointList.map(e => { |
|
|
|
pointList.map(e => { |
|
|
|
e.codeId && attributesReqList.push({ |
|
|
|
attributesReqList.push({ |
|
|
|
codeId: e.codeId, |
|
|
|
codeId: e.codeId, |
|
|
|
bcId: e.judgmentId, |
|
|
|
bcId: e.judgmentId, |
|
|
|
score: e.score, |
|
|
|
isSubmit: e.codeId ? 1 : 0, |
|
|
|
isSubmit: 0 |
|
|
|
answer: e.answer |
|
|
|
}) |
|
|
|
}) |
|
|
|
}) |
|
|
|
}) |
|
|
|
const data = { |
|
|
|
const data = { |
|
|
|