diff --git a/src/views/cs/index5/cards.vue b/src/views/cs/index5/cards.vue index c151d97..b0f6c21 100644 --- a/src/views/cs/index5/cards.vue +++ b/src/views/cs/index5/cards.vue @@ -38,63 +38,7 @@ export default { data () { return { cards: [ - { - title: "点检", - desc: "今日", - total: { - number: [], - content: '{nt}', - textAlign: 'right', - style: { - fill: '#ea6027', - fontWeight: 'bold' - } - }, - num: { - number: [], - content: '{nt}', - textAlign: 'right', - style: { - fill: '#26fcd8', - fontWeight: 'bold' - } - }, - ring: { - series: [ - { - type: 'gauge', - startAngle: -Math.PI / 2, - endAngle: Math.PI * 1.5, - arcLineWidth: 13, - radius: '80%', - data: [], - axisLabel: { - show: false - }, - axisTick: { - show: false - }, - pointer: { - show: false - }, - backgroundArc: { - style: { - stroke: '#224590' - } - }, - details: { - show: true, - formatter: '完成占比{value}%', - style: { - fill: '#1ed3e5', - fontSize: 20 - } - } - } - ], - color: ['#03d3ec'] - } - }, + ], equipmentinfo: {}, } @@ -116,16 +60,14 @@ export default { }).then((response) => { if (response.data) { _this.equipmentinfo = response.data; - this.cards = titles.map(title => { const [totalKey, finishKey] = dataMap[title]; const total = this.equipmentinfo[totalKey] || 0; // 避免除零 const finish = this.equipmentinfo[finishKey] || 0; - const ratio = Number((finish / total).toFixed(2)); + const ratio = Number((finish / total).toFixed(2)) * 100; return { - title: title, - desc: title === '保养' || '巡检' ? '本月' : '今日', + desc: (title === '保养' || title === '巡检') ? '本月' : '今日', total: { number: [total], content: '{nt}',