工作台:待办 已办 数量更改

This commit is contained in:
guoyue 2022-07-01 13:29:38 +08:00
parent ea4736c0b7
commit 930eae441d
4 changed files with 34 additions and 18 deletions

View File

@ -98,7 +98,17 @@ export default {
},
],
tooltip: {
triagger: 'item'
triagger: 'item',
formatter: (params) => {
let str = ''
if (params.name == '线') {
str = ''
} else {
str = `<span style="display:inline-block;margin-right:5px;
border-radius:10px;width:10px;height:10px;background-color:${params.color};"></span>${params.name}: ${params.value}`
}
return str;
}
},
"legend": {
type: 'scroll',
@ -163,18 +173,19 @@ export default {
},
data: this.dataListCopy,
},
{
"type": "pie",
"center": ["50%", "40%"],
"radius": ["35%", "36%"],
"radius": ["38%", "39%"],
"label": {
"show": false
},
hoverAnimation: false,
showTooltip: false,
color: ['#d8dde8'],
"data": [{
"value": 78,
"name": "实例1",
"value": 0,
"name": "线",
}]
}
]

View File

@ -77,7 +77,8 @@ export default {
.left-box {
display: flex;
justify-content: center;
width: 80px;
// width: 80px;
width: 100px;
border-radius: 2px;
height: 100%;
}
@ -100,6 +101,7 @@ export default {
color: #000;
margin-top: 25px;
margin-bottom: 18px;
text-align: center;
}
.num {

View File

@ -5,23 +5,23 @@
<div class="no-box">
<div class="no no2">
<div class="name" :style="{ color: colorObj[2] }">{{ no2Obj.name || '--' }}</div>
<div class="count">{{ no2Obj.count }}</div>
<div class="count">{{ formatCount(no2Obj.count) }}</div>
</div>
<div class="no no1">
<div class="name" :style="{ color: colorObj[1] }">{{ no1Obj.name }}</div>
<div class="count">{{ no1Obj.count }}</div>
<div class="name" :style="{ color: colorObj[1] }">{{ no1Obj.name || '--' }}</div>
<div class="count">{{ formatCount(no1Obj.count) }}</div>
</div>
<div class="no no3">
<div class="name" :style="{ color: colorObj[3] }">{{ no3Obj.name }}</div>
<div class="count">{{ no3Obj.count }}</div>
<div class="name" :style="{ color: colorObj[3] }">{{ no3Obj.name || '--' }}</div>
<div class="count">{{ formatCount(no3Obj.count) }}</div>
</div>
</div>
<div class="flex-row-between row-name" v-for="(data, i) in listInfo" :key="i">
<div class="left">
<div class="row-index">{{ i + 3 }}</div>
<div class="name-text">{{ data.name }}</div>
<div class="name-text">{{ data.name || '--' }}</div>
</div>
<div class="count-text">{{ data.count }}</div>
<div class="count-text">{{ formatCount(data.count) }}</div>
</div>
</div>
<div class="no-data" v-else>暂无数据</div>
@ -84,14 +84,17 @@ export default {
this[`no${k}Obj`].count = _arr[i].count
}
this.listInfo = []
this.listInfo.push(_arr[3])
this.listInfo.push(_arr[4])
this.listInfo.push(_arr[3] || {})
this.listInfo.push(_arr[4] || {})
}, err => {
this.loading = false;
this.$message.error(err);
});
},
formatCount(count) {
return count || count === 0 ? count : '--'
}
},
components: { contentTitle }
}
@ -188,7 +191,7 @@ export default {
.num-text {
font-size: 14px;
color: #2b2b2b;
}
.no-data {

View File

@ -105,7 +105,7 @@ export default {
}
console.log('res----待办-------->', res.data);
this.toToData.list = res.data.data.records || []
this.toToData.num = res.data.data.records.length || 0
this.toToData.num = res.data.data.total || 0
}, err => {
this.$message.error(err);
this.loadingToDo = false;
@ -125,7 +125,7 @@ export default {
}
console.log('res----已办-------->', res.data);
this.hasToDodoData.list = res.data.data.records || []
this.hasToDodoData.num = res.data.data.records.length || 0
this.hasToDodoData.num = res.data.data.total || 0
}, err => {
this.$message.error(err)
this.loadingHasToDo = false;