|
@@ -32,12 +32,12 @@
|
|
<div class="top">
|
|
<div class="top">
|
|
<div class="left">
|
|
<div class="left">
|
|
<p>我的报告</p>
|
|
<p>我的报告</p>
|
|
- <p>{{bgGr+bgTd}}</p>
|
|
|
|
|
|
+ <p>{{reportCount}}</p>
|
|
</div>
|
|
</div>
|
|
<div class="right"></div>
|
|
<div class="right"></div>
|
|
</div>
|
|
</div>
|
|
<div class="bottom" style="margin-top: 40rpx;">
|
|
<div class="bottom" style="margin-top: 40rpx;">
|
|
- <div class="jd green" :style="{'width':(bgGr/(bgGr+bgTd)*100)+'%'}"></div>
|
|
|
|
|
|
+ <div class="jd green" :style="{'width':(reportCount?100:0)+'%'}"></div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
@@ -68,14 +68,14 @@
|
|
return {
|
|
return {
|
|
wjDwc:0,
|
|
wjDwc:0,
|
|
wjYwc:0,
|
|
wjYwc:0,
|
|
- bgGr:0,
|
|
|
|
- bgTd:0
|
|
|
|
|
|
+ reportCount:0
|
|
}
|
|
}
|
|
},
|
|
},
|
|
onLoad() {
|
|
onLoad() {
|
|
- this.getWjList();
|
|
|
|
- this.getReportList2();
|
|
|
|
- this.getReportList();
|
|
|
|
|
|
+ if(uni.getStorageSync('token')){
|
|
|
|
+ this.getWjList();
|
|
|
|
+ this.getReportList();
|
|
|
|
+ }
|
|
},
|
|
},
|
|
methods:{
|
|
methods:{
|
|
toTurn(url){
|
|
toTurn(url){
|
|
@@ -87,22 +87,15 @@
|
|
},
|
|
},
|
|
getWjList(){
|
|
getWjList(){
|
|
this.$api.get('/core/teammember/que/listByUser').then(res=>{
|
|
this.$api.get('/core/teammember/que/listByUser').then(res=>{
|
|
- // if(res.data.code!==0) return this.$showToast(res.data.msg)
|
|
|
|
if(res.data.code!==0) return
|
|
if(res.data.code!==0) return
|
|
this.wjDwc = res.data.data.filter(d=>d.status===0).length;
|
|
this.wjDwc = res.data.data.filter(d=>d.status===0).length;
|
|
this.wjYwc = res.data.data.filter(d=>d.status===1).length;
|
|
this.wjYwc = res.data.data.filter(d=>d.status===1).length;
|
|
})
|
|
})
|
|
},
|
|
},
|
|
getReportList(){
|
|
getReportList(){
|
|
- this.$api.get('/core/report/member/personalReportList/2').then(res=>{
|
|
|
|
- if(res.data.code!==0) return
|
|
|
|
- this.bgGr = res.data.data.filter(d=>d.type==2).length;
|
|
|
|
- })
|
|
|
|
- },
|
|
|
|
- getReportList2(){
|
|
|
|
- this.$api.get('/core/report/member/personalReportList/1').then(res=>{
|
|
|
|
|
|
+ this.$api.get('/core/report/member/personalReportList').then(res=>{
|
|
if(res.data.code!==0) return
|
|
if(res.data.code!==0) return
|
|
- this.bgTd = res.data.data.filter(d=>d.type==1).length;
|
|
|
|
|
|
+ this.reportCount = res.data.data.length;
|
|
})
|
|
})
|
|
}
|
|
}
|
|
}
|
|
}
|