This commit is contained in:
xuyucheng 2021-12-31 10:22:53 +08:00
parent 3b7f0b3193
commit 00631ea361
2 changed files with 8 additions and 15 deletions

View File

@ -127,15 +127,6 @@ export default {
});
},
},
watch:{
data:{
handler(val){
console.log(val["经营问卷"])
},
deep:true
}
}
};
</script>
<style lang='scss' scoped>

View File

@ -121,17 +121,19 @@ export default {
const state = this.data["经营问卷"].every((item) => {
return item !== null ? true : false;
});
var sum = 0;
res.result.forEach((item, index) => {
if (index === 0) {
sum = 0;
} else {
sum = sum + res.result[index - 1].children.length;
}
item.children.forEach((child, i) => {
if (state) {
if (index === 0) {
child.answer =
this.data["经营问卷"][index * item.children.length + i];
child.answer = this.data["经营问卷"][i];
} else {
child.answer =
this.data["经营问卷"][
index * item.children.length + i + 2 * index - 1
];
child.answer = this.data["经营问卷"][sum + i];
}
} else {
child.answer = child.type === "多选题" ? [] : "";