环状图0%

This commit is contained in:
shijingjing
2023-02-28 13:48:21 +08:00
parent 1683fe4eeb
commit e9574cf236
2 changed files with 7 additions and 8 deletions

View File

@@ -154,7 +154,7 @@ export default {
if(this.tabIndex == 0) {
uni.navigateTo({url: `./cooperationDetail?id=${item.id}&time=${item.createTime}`})
} else {
uni.navigateTo({url: `./circleDetail??id=${item.id}&time=${item.createTime}&type=${this.sendType}`})
uni.navigateTo({url: `./circleDetail??id=${item.id}&type=${this.sendType}`})
}
},
searchBtn() {

View File

@@ -6,7 +6,7 @@
<div>{{ detail.taskTitle }} <span :class="detail.status==0? 'status0': detail.status==1? 'status1': detail.status==2? 'status2':
detail.status == 3? 'status3':detail.status==4? 'status4': 'status5'">{{ $dict.getLabel('mstStatus', detail.status) }}</span></div>
<div>
创建时间: <span>{{ createTime }}</span>
创建时间: <span>{{ detail.createTime }}</span>
</div>
</div>
<div class="header_right" @click="toDetail">查看详情</div>
@@ -75,7 +75,6 @@ export default {
pieEcharts: null,
subIndex: 0,
tableData: [],
createTime: "",
id: "",
info: {},
current: 1,
@@ -90,6 +89,7 @@ export default {
],
update: true,
type: "",
percent: 0,
};
},
computed: {
@@ -102,7 +102,6 @@ export default {
},
onLoad(o) {
this.id = o.id;
this.createTime = o.time;
this.type = o.type
},
methods: {
@@ -192,7 +191,7 @@ export default {
tooltip: {
show: false,
},
color: ["#1684fc", "#ccc"],
color: ["#1684fc","#ccc"],
series: [
{
name: "任务完成率",
@@ -216,8 +215,8 @@ export default {
normal: {
show: true,
formatter: ({ name, value }) => {
let num = value / this.info.planCount * 100
return `{name|任务达成率\n\n}{value|${num}%}`
this.percent = value / this.info.planCount * 100 || 0
return `{name|任务达成率\n\n}{value|${ this.percent }%}`
},
textStyle: {
fontSize: 16,
@@ -236,7 +235,7 @@ export default {
},
},
{
value: this.info.planCount - this.info.executedCount ,
value: 100 - this.percent,
name: "未执行成员"
},
],