| | |
| | | getPieChart().then((response) => { |
| | | if (response.data) { |
| | | |
| | | if (response.data.tjdj.length === 0) { |
| | | if(response.data.tjdj == 0){ |
| | | this.PieChart = [] |
| | | this.PieChart = [ |
| | | { |
| | | "name": "体检登记人数分布", |
| | | "count": 1, |
| | | "value": 10 |
| | | }, |
| | | |
| | | ] |
| | | }else if (response.data.tjdj.length === 0) { |
| | | |
| | | this.PieChart = [] |
| | | this.PieChart = [ |
| | | { |
| | |
| | | type: 'pie', |
| | | radius: ['16%', '54%'], |
| | | center: ["50%", "43%"], |
| | | avoidLabelOveralap:false, |
| | | startAngle:180, |
| | | minAngle:10, |
| | | data: this.PieChart, |
| | | emphasis: { |
| | | itemStyle: { |
| | |
| | | }] |
| | | }) |
| | | |
| | | if (response.data.tjyc.length === 0) { |
| | | if(response.data.tjyc == 0){ |
| | | this.PieChart2 = [] |
| | | this.PieChart2 = [ |
| | | { |
| | | "name": "体检结果异常人数分布", |
| | | "count": 1, |
| | | "value": 10 |
| | | }, |
| | | |
| | | ] |
| | | }else if (response.data.tjyc.length === 0) { |
| | | this.PieChart2 = [] |
| | | this.PieChart2 = [ |
| | | { |
| | |
| | | type: 'pie', |
| | | radius: ['16%', '54%'], |
| | | center: ["50%", "43%"], |
| | | avoidLabelOveralap:false, |
| | | startAngle:180, |
| | | minAngle:10, |
| | | data: this.PieChart2, |
| | | emphasis: { |
| | | itemStyle: { |