qinxianzhangyao
2024-06-21 4162d0e6692f3b02a183312d4e7f984a2a4baef5
src/views/index.vue
@@ -189,7 +189,18 @@
      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 = [
              {
@@ -245,7 +256,17 @@
              }]
          })
          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 = [
              {
@@ -302,10 +323,10 @@
        }
        // window.onresize = function () {
        //   myChart2.resize()
        //   myChart3.resize()
        // }
        window.onresize = function () {
          myChart2.resize()
          myChart3.resize()
        }
        this.loading = false;
      });