From 0e13e71ef3cbab0d4ca17f9ea6cecb39fef3c325 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BA=9E=E4=B8=9C=E6=97=AD?= <850374051@qq.com> Date: Thu, 28 Sep 2023 16:17:25 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BA=A7=E6=9D=83=E4=BA=A4=E6=98=93=E9=97=AE?= =?UTF-8?q?=E9=A2=98=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/biddingHall/index.vue | 28 ++++++++++++++++++++++------ src/views/notice/index.vue | 2 +- src/views/project/index.vue | 29 ++++++++++++++++++++++++----- src/views/project/projectDetail.vue | 22 +++++++++++----------- 4 files changed, 58 insertions(+), 23 deletions(-) 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 @@ > - 项目编号:{{item.projectCode}} {{item.contractDate}} + 项目编号:{{item.projectCode}} {{item.dealTime.substr(0,10)}} 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 @@ /> - - - - - - - - - {{ current + 1 }}/{{ detail.fileUrlList !== undefined &&detail.fileUrlList.length>0 ? detail.fileUrlList.length:1 }} - - + + + + + + + + + + + {{ process }}    {{tip}}
{{item.contractDate}}
{{item.dealTime.substr(0,10)}}