提交 5a8caf14 authored 作者: 王鹏飞's avatar 王鹏飞

fix: 修复默认信息获取逻辑以支持考试信息

上级 8323a338
......@@ -141,9 +141,10 @@ export default {
},
// 默认信息获取
defaultInto() {
const info = Object.keys(this.studentInfo).length > 0 ? this.studentInfo : (this.examInfo.user || {})
const key = Object.keys(this.form)
key.map(item => {
this.form[item] = item === 'age' ? (parseInt(this.studentInfo[item]) === 0 ? '' : this.studentInfo[item]) : this.studentInfo[item]
this.form[item] = item === 'age' ? (parseInt(info[item]) === 0 ? '' : info[item]) : info[item]
})
},
// 确认信息
......
Markdown 格式
0% 或
您添加了 0 人 到此讨论。请谨慎行事。
请先完成此评论的编辑!
请 注册 或者 后发表评论