|
@@ -24,7 +24,7 @@
|
|
|
<view class="">
|
|
<view class="">
|
|
|
<view class="row-c">
|
|
<view class="row-c">
|
|
|
<view class="pie_chart column-c">
|
|
<view class="pie_chart column-c">
|
|
|
- <PieChart></PieChart>
|
|
|
|
|
|
|
+ <PieChart ref="pieChart"></PieChart>
|
|
|
<text class="size-24 text-color-12">任务完成情况</text>
|
|
<text class="size-24 text-color-12">任务完成情况</text>
|
|
|
</view>
|
|
</view>
|
|
|
<view class="m-b30">
|
|
<view class="m-b30">
|
|
@@ -35,13 +35,13 @@
|
|
|
<text class="m-l16 text-color-787">{{item.name}}</text>
|
|
<text class="m-l16 text-color-787">{{item.name}}</text>
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
- <text class="text-color-12 sys-weight-600 m-l40">{{item.value}}</text>
|
|
|
|
|
|
|
+ <text class="text-color-12 sys-weight-600 m-l40">{{item.value}}%</text>
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
<view class="circle_chart column-sb-c m-t10">
|
|
<view class="circle_chart column-sb-c m-t10">
|
|
|
- <CircleChart :width="'180rpx'" :height="'180rpx'" :bgColor="'#0FB160'"></CircleChart>
|
|
|
|
|
|
|
+ <CircleChart ref="circleObj" :width="'180rpx'" :height="'180rpx'" bgColor="#0FB160" ></CircleChart>
|
|
|
<text class="size-24 text-color-12">任务进度</text>
|
|
<text class="size-24 text-color-12">任务进度</text>
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
@@ -58,7 +58,8 @@
|
|
|
import IndexColumn from "./module/index_column.vue"
|
|
import IndexColumn from "./module/index_column.vue"
|
|
|
// 顶部栏目
|
|
// 顶部栏目
|
|
|
import IndexPersonal from "./module/index_personal.vue"
|
|
import IndexPersonal from "./module/index_personal.vue"
|
|
|
- import {getDayBacklogList} from "@/api/task";
|
|
|
|
|
|
|
+ import {getDateBacklogStatistics, getDayBacklogList} from "@/api/task";
|
|
|
|
|
+ import {date} from "@/uni_modules/uv-ui-tools/libs/function/test";
|
|
|
|
|
|
|
|
export default {
|
|
export default {
|
|
|
components: {
|
|
components: {
|
|
@@ -89,6 +90,12 @@
|
|
|
value: "100%"
|
|
value: "100%"
|
|
|
}, ],
|
|
}, ],
|
|
|
memberData:{},
|
|
memberData:{},
|
|
|
|
|
+ statisticsData:{
|
|
|
|
|
+ endNum: 0,
|
|
|
|
|
+ exceedDate: 0,
|
|
|
|
|
+ lagDate: 0,
|
|
|
|
|
+ totalNum: 0,
|
|
|
|
|
+ },
|
|
|
backlogList: [],
|
|
backlogList: [],
|
|
|
weekData: [],
|
|
weekData: [],
|
|
|
weekNum: 1,
|
|
weekNum: 1,
|
|
@@ -106,26 +113,49 @@
|
|
|
|
|
|
|
|
})
|
|
})
|
|
|
this.startList()
|
|
this.startList()
|
|
|
|
|
+
|
|
|
},
|
|
},
|
|
|
onPageScroll(res) {
|
|
onPageScroll(res) {
|
|
|
this.scrollTop = res.scrollTop / 120
|
|
this.scrollTop = res.scrollTop / 120
|
|
|
},
|
|
},
|
|
|
onReachBottom() {
|
|
onReachBottom() {
|
|
|
- console.log('到底部了');
|
|
|
|
|
this.getDayBacklogList()
|
|
this.getDayBacklogList()
|
|
|
|
|
+
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
|
|
|
+ getDateBacklogStatistics(){
|
|
|
|
|
+ getDateBacklogStatistics({'dateNum':this.modelTime}).then(res=>{
|
|
|
|
|
+ if(res.code===1){
|
|
|
|
|
+ if(res.data.totalNum>0){
|
|
|
|
|
+ this.chartList[0].value=(res.data.exceedNum/res.data.totalNum*100).toFixed(0)*1;
|
|
|
|
|
+ this.chartList[1].value=(res.data.lagNum/res.data.totalNum*100).toFixed(0)*1;
|
|
|
|
|
+ this.chartList[2].value=(res.data.normalNum/res.data.totalNum*100).toFixed(0)*1;
|
|
|
|
|
+ this.$refs.circleObj.setServerData( (res.data.endNum/res.data.totalNum).toFixed(2)*1)
|
|
|
|
|
+ }else {
|
|
|
|
|
+ this.chartList[0].value=0;
|
|
|
|
|
+ this.chartList[1].value=0;
|
|
|
|
|
+ this.chartList[2].value=0;
|
|
|
|
|
+ this.$refs.circleObj.setServerData( 0)
|
|
|
|
|
+ }
|
|
|
|
|
+ console.log(this.chartList)
|
|
|
|
|
+ this.$refs.pieChart.setData( this.chartList)
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+ },
|
|
|
startList(){
|
|
startList(){
|
|
|
this.backlogList=[];
|
|
this.backlogList=[];
|
|
|
this.page=1;
|
|
this.page=1;
|
|
|
this.total=null;
|
|
this.total=null;
|
|
|
this.getDayBacklogList();
|
|
this.getDayBacklogList();
|
|
|
|
|
+ this.getDateBacklogStatistics()
|
|
|
},
|
|
},
|
|
|
getDayBacklogList() {
|
|
getDayBacklogList() {
|
|
|
if(this.total!==null && this.total<=this.backlogList.length){
|
|
if(this.total!==null && this.total<=this.backlogList.length){
|
|
|
return
|
|
return
|
|
|
}
|
|
}
|
|
|
- getDayBacklogList({'dateNum': this.indexTime,'page':this.page}).then((res) => {
|
|
|
|
|
|
|
+ getDayBacklogList({'dateNum': this.modelTime,'page':this.page}).then((res) => {
|
|
|
if (res.code === 1) {
|
|
if (res.code === 1) {
|
|
|
this.backlogList.push(...res.data.items)
|
|
this.backlogList.push(...res.data.items)
|
|
|
this.total = res.data.total
|
|
this.total = res.data.total
|
|
@@ -166,4 +196,4 @@
|
|
|
height: 16rpx;
|
|
height: 16rpx;
|
|
|
border-radius: 50%;
|
|
border-radius: 50%;
|
|
|
}
|
|
}
|
|
|
-</style>
|
|
|
|
|
|
|
+</style>
|