|
@@ -356,7 +356,6 @@
|
|
|
},
|
|
|
created() {
|
|
|
this.getListCheckOptionData();
|
|
|
- this.getListCheckOptionTwo();
|
|
|
// this.selectDeptListUserDeptId();
|
|
|
this.treeselect();
|
|
|
},
|
|
@@ -371,7 +370,6 @@
|
|
|
this.remindOpen = false;
|
|
|
},
|
|
|
blurCheck(index){
|
|
|
- // this.getListCheckOptionData(index);
|
|
|
let list = JSON.parse(JSON.stringify(this.checkOptionList));
|
|
|
list[index] = JSON.parse(JSON.stringify(this.defaultCheckOptionList));
|
|
|
this.$set(this,'checkOptionList',JSON.parse(JSON.stringify(list)))
|
|
@@ -469,17 +467,25 @@
|
|
|
}
|
|
|
}
|
|
|
for(let i=0;i<obj.yhlist.length;i++){
|
|
|
+ let newObj = {};
|
|
|
if(obj.yhlist[i].isLingshi == 1){
|
|
|
- let list = JSON.parse(JSON.stringify(self.checkOptionList));
|
|
|
- let newObj = {
|
|
|
- id:parseInt(obj.yhlist[i].jcxId+''),
|
|
|
- name:obj.yhlist[i].jcxName,
|
|
|
- }
|
|
|
- list.push(newObj);
|
|
|
- self.$set(self,'checkOptionList',JSON.parse(JSON.stringify(list)));
|
|
|
+ // let newObj = {
|
|
|
+ // id:parseInt(obj.yhlist[i].jcxId+''),
|
|
|
+ // name:obj.yhlist[i].jcxName,
|
|
|
+ // }
|
|
|
+ newObj.id=parseInt(obj.yhlist[i].jcxId+'')
|
|
|
+ newObj.name=obj.yhlist[i].jcxName
|
|
|
+ // console.log('list',list);
|
|
|
+ // list.push(newObj);
|
|
|
+ // self.$set(self,'checkOptionList',JSON.parse(JSON.stringify(list)));
|
|
|
+ // list.push('self.checkOptionList',self.checkOptionList);
|
|
|
self.temporaryIdList.push(obj.yhlist[i].jcxId);
|
|
|
}
|
|
|
- self.getListCheckOption();
|
|
|
+ if (newObj.id){
|
|
|
+ self.getListCheckOption(newObj);
|
|
|
+ }else{
|
|
|
+ self.getListCheckOption();
|
|
|
+ }
|
|
|
}
|
|
|
console.log(obj)
|
|
|
let newOjb = obj.record;
|
|
@@ -699,8 +705,13 @@
|
|
|
id:response.data.id,
|
|
|
name:response.data.name,
|
|
|
};
|
|
|
+ console.log('this.openIndex',this.openIndex)
|
|
|
+ console.log('list',list)
|
|
|
+ console.log('list[this.openIndex]',list[this.openIndex])
|
|
|
list[this.openIndex].push(obj);
|
|
|
this.$set(this,'checkOptionList',JSON.parse(JSON.stringify(list)));
|
|
|
+ this.defaultCheckOptionList = JSON.parse(JSON.stringify(list))
|
|
|
+ console.log('111')
|
|
|
this.temporaryIdList.push(response.data.id);
|
|
|
this.$set(this.form.detailsList[this.openIndex],'jcxId',response.data.id);
|
|
|
this.$set(this.form.detailsList[this.openIndex],'jcxName',response.data.name);
|
|
@@ -801,13 +812,17 @@
|
|
|
}
|
|
|
},
|
|
|
//获取检查项
|
|
|
- getListCheckOption() {
|
|
|
+ getListCheckOption(data) {
|
|
|
let newObj = {
|
|
|
level:4,
|
|
|
}
|
|
|
listCheckOption(newObj).then( response => {
|
|
|
let list = this.getTreeData(response.data);
|
|
|
+ if(data){
|
|
|
+ list.push(data);
|
|
|
+ }
|
|
|
this.checkOptionList.push(JSON.parse(JSON.stringify(list)));
|
|
|
+ console.log('this.checkOptionList',this.checkOptionList)
|
|
|
});
|
|
|
this.$forceUpdate();
|
|
|
},
|
|
@@ -817,6 +832,7 @@
|
|
|
}
|
|
|
listCheckOption(newObj).then( response => {
|
|
|
this.defaultCheckOptionList = this.getTreeData(response.data);
|
|
|
+ this.getListCheckOptionTwo();
|
|
|
// let list = JSON.parse(JSON.stringify(this.checkOptionList));
|
|
|
// list[index] = this.getTreeData(response.data);
|
|
|
// this.$set(this,'checkOptionList',JSON.parse(JSON.stringify(list)))
|