Administrator
2022-01-04 fc0c0f84305c45a60d3d3a254099ca1846bdb818
src/views/securityAnalysis/index.vue
@@ -108,6 +108,7 @@
  getinformationstatistics, //保安员考试情况统计
  getExamStatisInfo, //保安员考试情况统计
  getinformationselectDisp, //保安派遣情况
  getAgeStatistics, //保安员年龄分布情况
  getinformationselectSoil, //社保缴纳情况统计
  getEducationStatistics
} from "@/api/securityAnalysis/securityAnalysis";
@@ -792,21 +793,30 @@
    },
    getEC5() {
      var that = this;
      getinformationselectDisp(this.deptid, this.jurisdiction)
      getAgeStatistics(this.deptid, this.jurisdiction)
        .then((res) => {
          var a = res.data.data;
          // console.log(a, "111111");
          var b = that.changedata(a, "pnum", "wpnum", "已派遣", "未派遣");
          that.setEC5(b);
        })
        .catch((res) => {
          var b = that.changedata([], "pnum", "wpnum", "已派遣", "未派遣");
          that.setEC5(b);
          var data = res.data.data;
          var a = [
            {
              value:data[0],
              name:"18-30周岁"
            },
            {
              value:data[1],
              name:"30-45周岁"
            },
            {
              value:data[2],
              name:"45-60周岁"
            },
          ]
          console.log(a, "111111");
          this.setEC5(a);
        });
    },
    setEC5(d) {
      var option;
      d = this.setColor(d, this.colors);
      // d = this.setColor(d, this.colors);
      option = {
        title: {
          text: "保安员年龄分布情况统计",
@@ -819,17 +829,13 @@
        },
        toolbox: this.gettoolbox("保安员年龄分布情况查询", "保安员年龄分布情况明细", 5),
        legend: {
          // orient: "vertical",
          // left: "left",
          x: "center",
          y: "90%",
        },
        series: [
          {
            // name: "访问来源",
            type: "pie",
            radius: "50%",
            // data: d,
            data: d,
            emphasis: {
              itemStyle: {
@@ -839,7 +845,6 @@
              },
            },
            label: {
              // alignTo: "edge",
              formatter: "{b}\n({d}%)",
            },
          },