提交 7219d42a authored 作者: lihuihui's avatar lihuihui

fix: 修改bug

上级 5ec7742d
......@@ -198,6 +198,7 @@ export default {
// 获取报告
getReportDetail(id) {
getReportDetail(id).then(res => {
this.caseId = res.data.detail.id
const cachData = res.data.detail.answer.commit_report
if (this.$route.query.type !== '1') {
this.stepsIndex = cachData[1].steps
......
......@@ -100,7 +100,8 @@ export default {
resultCompletions: [],
titleValue: '',
titleData: {},
isCommitCase: false
isCommitCase: false,
caseId: ''
}
},
computed: {
......@@ -123,6 +124,7 @@ export default {
const data = this.getAnswer(1)
cacheCaseAnswer(this.cases.id, { answers: JSON.stringify(data) })
.then(res => {
this.caseId = res.data.id
this.$message({ type: 'success', message: '保存成功' })
})
.catch(err => {
......@@ -244,12 +246,12 @@ export default {
}
if (emptyDataIndex === -1) {
const params = { answers: JSON.stringify(this.getAnswer()) }
const id = this.$route.query.id
const id = this.$route.query.id || this.caseId
if (id) params.id = id
commitCase(params)
.then(res => {
this.$message({
message: '保存成功!你可以在作品展示中查看/编辑报告,查看成绩',
message: '提交成功!你可以在作品展示中查看报告,查看成绩',
type: 'success'
})
setTimeout(() => {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论