Commit ecac535c authored by 李维's avatar 李维

dev done

parent 2ffa4d7c
...@@ -166,15 +166,20 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy { ...@@ -166,15 +166,20 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy {
updateCheckbox(){ updateCheckbox(){
let check = [] let check = []
this.item.contentObj.textDown.forEach((item, index) => { this.item.contentObj.textDown.forEach((item, index) => {
check.push({label:index+1, value:index, checked:false}) check.push({label:index+1, value:index, checked:false})
}); });
let length = check.length
this.item.contentObj.textUp.forEach((item, index) => { this.item.contentObj.textUp.forEach((item, index) => {
item.lineTo.forEach( option=> { let _check = JSON.parse(JSON.stringify(check))
check[Number(option)].checked = true item.lineTo.forEach(option=> {
if(option<length){
_check[Number(option)].checked = true
}
}); });
item.checkOptions = JSON.parse(JSON.stringify(check)) item.checkOptions = _check
}); });
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment