<!--事件回访满意度统计--> <template> <ve-pie :data="chartData" :extend="extend" :title="title"/> </template> <script> // import { deviceStaticByStatus } from '@/api/dataStatics' export default { name: 'CallRatePie', data() { this.extend = { series: { label: { show: true, position: 'outside', formatter: '{b}:{c}' } } } this.chartSettings = { labelMap: { 'type': '接通情况', 'num': '0' }, dimension: 'type', metrics: 'num' } this.title = { text: '' } return { chartData: { columns: ['type', 'num'], rows: [] } } }, mounted() { this.chartData.rows = [ { 'type': '10秒接通量', 'num': 0 }, { 'type': '20秒接通量', 'num': 0 }, { 'type': '30秒接通量', 'num': 0 }, { 'type': '30秒以上接通量', 'num': 0 } ] // this.fetchData() }, methods: { fetchData() { // deviceStaticByStatus().then(response => { // const data = response.data // this.chartData.rows = [ // { 'type': '在线', 'num': data.online }, // { 'type': '离线', 'num': data.offline } // ] // }) } } } </script>