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

update

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