diff --git a/src/views/biddingHall/index.vue b/src/views/biddingHall/index.vue index 4a5802bf..2124ced6 100644 --- a/src/views/biddingHall/index.vue +++ b/src/views/biddingHall/index.vue @@ -242,19 +242,24 @@ export default { }); getDeptList().then(response => { response.data.map(item => { - getDeptList(item.deptId).then(res => { + this.deptListOption.push({text: item.deptName,children: [],id:item.deptId}) + }); + + console.log(this.deptListOption) + + if(response.data.length > 0){ + getDeptList(response.data[0].deptId).then(res => { let list = [] res.data.map(i =>{ list.push({text:i.deptName,children:[],id:i.deptId}) }) if(list.length==0){ - list.push({text:item.deptName,id:item.deptId}) + list.push({text:response.data[0].deptName,id:response.data[0].deptId}) }else{ - this.deptListOption.push({ text: item.deptName,children: list}); + this.$set(this.deptListOption[0], "children", list); } - }); - }); + } }); }, methods:{ @@ -317,7 +322,18 @@ export default { }); }, clickNav(index){ - + console.log(index) + getDeptList(this.deptListOption[index].id).then(res => { + let list = [] + res.data.map(i =>{ + list.push({text:i.deptName,children:[],id:i.deptId}) + }) + if(list.length==0){ + list.push({text:this.deptListOption[index].deptName,id:this.deptListOption[index].id}) + }else{ + this.$set(this.deptListOption[index], "children", list); + } + }); }, clickItem(data){ console.log(data) diff --git a/src/views/notice/index.vue b/src/views/notice/index.vue index e6ebbf47..bddddf34 100644 --- a/src/views/notice/index.vue +++ b/src/views/notice/index.vue @@ -19,7 +19,7 @@ > diff --git a/src/views/project/index.vue b/src/views/project/index.vue index 564589d9..053c7fd7 100644 --- a/src/views/project/index.vue +++ b/src/views/project/index.vue @@ -136,18 +136,25 @@ export default { }); getDeptList().then(response => { response.data.map(item => { - getDeptList(item.deptId).then(res => { + this.deptListOption.push({text: item.deptName,children: [],id:item.deptId}) + }); + + console.log(this.deptListOption) + + if(response.data.length > 0){ + getDeptList(response.data[0].deptId).then(res => { let list = [] res.data.map(i =>{ list.push({text:i.deptName,children:[],id:i.deptId}) }) if(list.length==0){ - list.push({text:item.deptName,id:item.deptId}) + list.push({text:response.data[0].deptName,id:response.data[0].deptId}) }else{ - this.deptListOption.push({ text: item.deptName,children: list}); + this.$set(this.deptListOption[0], "children", list); } }); - }); + } + }); this.getList(); }, @@ -224,9 +231,21 @@ export default { }); }, clickNav(index){ - + console.log(index) + getDeptList(this.deptListOption[index].id).then(res => { + let list = [] + res.data.map(i =>{ + list.push({text:i.deptName,children:[],id:i.deptId}) + }) + if(list.length==0){ + list.push({text:this.deptListOption[index].deptName,id:this.deptListOption[index].id}) + }else{ + this.$set(this.deptListOption[index], "children", list); + } + }); }, clickItem(data){ + console.log('clickItem') if(data.text==this.value2){ this.activeId=1 this.value2='标的物位置' diff --git a/src/views/project/projectDetail.vue b/src/views/project/projectDetail.vue index d632e554..134ed3af 100644 --- a/src/views/project/projectDetail.vue +++ b/src/views/project/projectDetail.vue @@ -9,17 +9,17 @@ /> - - - - - + + + + + + + + + + + {{ process }}    {{tip}}