mode
This commit is contained in:
parent
3b7f0b3193
commit
00631ea361
|
@ -127,15 +127,6 @@ export default {
|
|||
});
|
||||
},
|
||||
},
|
||||
|
||||
watch:{
|
||||
data:{
|
||||
handler(val){
|
||||
console.log(val["经营问卷"])
|
||||
},
|
||||
deep:true
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style lang='scss' scoped>
|
||||
|
|
|
@ -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 === "多选题" ? [] : "";
|
||||
|
|
Loading…
Reference in New Issue