su
su1124
2023-12-29 d10c7c728234b5a9098b7bd5bb7a914a14e33c20
src/views/index.vue
@@ -72,10 +72,18 @@
  created() {
    this.getList();
  },
  watch: {
        $route(to, from) {
            window.location.reload(); //监测到路由发生跳转时刷新一次页面
            // this.$router.go(0);
        },
    },
  methods: {
    getList() {
      this.loading = true;
      // 查询今日登记
@@ -180,17 +188,17 @@
      // 饼状图
      getPieChart().then((response) => {
        if (response.data) {
          if (response.data.tjdj.length === 0) {
            this.PieChart = []
            this.PieChart = [
                {
                  "name": "体检登记人数分布",
                  "count": 1,
                  "value": 10
                },
              ]
              {
                "name": "体检登记人数分布",
                "count": 1,
                "value": 10
              },
            ]
          } else {
            this.PieChart = response.data.tjdj
            this.PieChart.forEach(item => {
@@ -237,13 +245,13 @@
          if (response.data.tjyc.length === 0) {
            this.PieChart2 = []
            this.PieChart2 = [
                {
                  "name": "体检结果异常人数分布",
                  "count": 1,
                  "value": 10
                },
              ]
              {
                "name": "体检结果异常人数分布",
                "count": 1,
                "value": 10
              },
            ]
          } else {
            this.PieChart2 = response.data.tjyc
            this.PieChart2.reverse()
@@ -357,7 +365,8 @@
}
.data-view {
  margin: 5px 15px;
  margin: 0 15px;
  height: 323px !important
}
#main {
@@ -366,6 +375,7 @@
.view {
  margin: 0px 15px;
  padding-top: 15px;
  height: 350px;
  display: flex;
}