提交 09d8af47 authored 作者: 王鹏飞's avatar 王鹏飞

update

上级 5a13d506
......@@ -9,11 +9,11 @@
>
<!-- 最终检查 -->
<template v-if="currentActive === 'final'">
<table>
<table border="1">
<template v-for="(item, index) in submenu">
<tr :key="index" v-if="index < 7">
<td>{{index}}{{item.title}}</td>
<td></td>
<td>{{item.progress ? '已完成' : '未完成'}}</td>
</tr>
</template>
</table>
......@@ -67,7 +67,15 @@ export default {
axios
.get('/zws/v1/enrollment/submissions?project_id=1000')
.then(response => {
console.log(response)
let children = this.menus[0].children
const submitProgress = response.data.submit_progress
children.forEach(item => {
let progress = 0
if (submitProgress.hasOwnProperty(item.id)) {
progress = submitProgress[item.id] === 0.2 ? 100 : 0
}
item.progress = progress
})
})
}
},
......
......@@ -108,7 +108,11 @@ export default {
this.model = data
})
.catch(error => {
if (error.response) {
this.$emit('error', error.response.data)
} else {
console.log(error)
}
})
},
// 更新
......@@ -150,7 +154,11 @@ export default {
this.$emit('success', data)
})
.catch(error => {
if (error.response) {
this.$emit('error', error.response.data)
} else {
console.log(error)
}
})
},
onSubmit(data) {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论