提交 0aaa9047 authored 作者: lihuihui's avatar lihuihui

update

上级 33c60711
...@@ -167,6 +167,7 @@ export default { ...@@ -167,6 +167,7 @@ export default {
} }
if (valid) { if (valid) {
if (this.$route.query.id) { if (this.$route.query.id) {
// console.log(this.ruleForm, 'this.ruleForm')
updateQuestion(this.$route.query.id, this.ruleForm).then(res => { updateQuestion(this.$route.query.id, this.ruleForm).then(res => {
this.$router.push({ this.$router.push({
path: '/question/list' path: '/question/list'
......
...@@ -167,6 +167,18 @@ export default { ...@@ -167,6 +167,18 @@ export default {
}) })
} }
if (this.$route.query.id) { if (this.$route.query.id) {
if (Array.isArray(params.children)) {
params.children.map(item => {
console.log(item, '123')
item.question_options.map(cItem => {
if (cItem.checked === undefined) {
cItem.checked = false
}
return cItem
})
return item
})
}
updateQuestion(this.$route.query.id, params).then(res => { updateQuestion(this.$route.query.id, params).then(res => {
this.$router.push({ this.$router.push({
path: '/question/list' path: '/question/list'
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论