保安服务企业管理-验收版本
shuishen
2021-12-04 ecb9547b49041a67dc85a884eccf8612fade717e
src/views/securityAnalysis/index.vue
@@ -18,79 +18,71 @@
      <!-- 保安员审查情况统计
        <div>饼图</div> -->
      <!-- </div> -->
      <div class="examines" ref="ech1">
            <div class="examines"
                 ref="ech1">
        <!-- 保安员审查情况统计
        <div>饼图</div> -->
      </div>
      <div class="certificate" ref="ech2">
            <div class="certificate"
                 ref="ech2">
        <!-- 保安员持证情况统计
        <div>饼图</div> -->
      </div>
      <!-- <div class="czbut"></div> -->
    </div>
    <div class="securityAnalysiscenter">
      <div class="examination" ref="ech3">
            <div class="examination"
                 ref="ech3">
        <!-- 保安员考试情况统计
        <div>堆叠面积图</div> -->
      </div>
      <div class="dispatchUnit" ref="ech4">
            <div class="dispatchUnit"
                 ref="ech4">
        <!-- 派遣服务单位统计
        <div>柱状图</div> -->
      </div>
    </div>
    <div class="securityAnalysisright">
      <div class="dispatchSecurity" ref="ech5">
            <div class="dispatchSecurity"
                 ref="ech5">
        <!-- 保安派遣情况统计
        <div>饼图</div> -->
      </div>
      <div class="socialSecurity" ref="ech6">
            <div class="socialSecurity"
                 ref="ech6">
        <!-- 社保缴纳情况统计
        <div>饼图</div> -->
      </div>
    </div>
    <div>
      <el-dialog
        width="90%"
            <el-dialog width="90%"
        :title="titles"
        append-to-body
        :visible.sync="dialogVisible"
        top="9vh"
      >
        <situation
          :card="{ deptid: deptid, jurisdiction: jurisdiction }"
          v-if="sees == 1"
        >
                       top="9vh">
                <situation :card="{ deptid: deptid, jurisdiction: jurisdiction }"
                           v-if="sees == 1">
          <!-- 保安员审查情况统计 -->
        </situation>
        <certificate
          :card="{ deptid: deptid, jurisdiction: jurisdiction }"
          v-if="sees == 2"
        >
                <certificate :card="{ deptid: deptid, jurisdiction: jurisdiction }"
                             v-if="sees == 2">
          <!-- 保安员持证情况统计 -->
        </certificate>
        <examination
          :card="{ deptid: deptid, jurisdiction: jurisdiction }"
          v-if="sees == 3"
        >
                <examination :card="{ deptid: deptid, jurisdiction: jurisdiction }"
                             v-if="sees == 3">
          <!-- 保安员考试情况统计 -->
        </examination>
        <dispatch
          :card="{ deptId: deptid, jurisdiction: jurisdiction }"
          v-if="sees == 4"
        >
                <dispatch :card="{ deptId: deptid, jurisdiction: jurisdiction }"
                          v-if="sees == 4">
          <!-- 派遣服务单位 注意deptId  I为大写 -->
        </dispatch>
        <assignment
          :card="{ deptid: deptid, jurisdiction: jurisdiction }"
          v-if="sees == 5"
        >
                <assignment :card="{ deptid: deptid, jurisdiction: jurisdiction }"
                            v-if="sees == 5">
          <!-- 保安派遣情况 -->
        </assignment>
        <socialSecurity
          :card="{ deptid: deptid, jurisdiction: jurisdiction }"
          v-if="sees == 6"
        >
                <socialSecurity :card="{ deptid: deptid, jurisdiction: jurisdiction }"
                                v-if="sees == 6">
          <!-- 社保缴纳情况 -->
        </socialSecurity>
      </el-dialog>
@@ -271,6 +263,7 @@
        .then((res) => {
          var a = res.data.data;
          var b = that.changedata(a, "zc", "bzc", "情况正常", "情况异常");
                    console.log(b, 456)
          that.setEC1(b);
        })
        .catch((res) => {
@@ -479,120 +472,71 @@
      this.EC2.setOption(option);
    },
    getEC3() {
      var that = this;
      getinformationstatistics(this.deptid, this.jurisdiction).then((res) => {
        var a = res.data.data;
        // console.log(a, 22222222222222222222);
        // var a = res.data.data,
        //   s = [],
        //   l = [];
        // console.log(a); // 0 :理论 1:实操
        // for (var k in a[0]) {
        //   l.push(a[0][k]);
        //   s.push(a[1][k]);
        // }
        var l = a.llcj;
        var s = a.sccj;
        this.setEC3(s, l);
                var obj = [{ value: a[1], name: '已通过' }, { value: a[2], name: '未通过' }]
                this.setEC3(obj);
      });
    },
    setEC3(s, l) {
      var xd = [],
        sd = [],
        ld = [],
        that = this;
      for (var i = 0; i < 100; i++) {
        xd.push(i + "分");
      }
      // console.log(sd);
      var option = {
        setEC3 (d) {
            var option, data;
            data = d;
            option = {
        title: {
          text: "保安员考试情况统计",
          left: "center",
          top: 20,
        },
        tooltip: {
          trigger: "axis",
          axisPointer: {
            type: "cross",
            label: {
              backgroundColor: "#6a7985",
                    trigger: "item",
            },
          },
          // formatter(params) {
          //   console.log(params);
          //   var str = "";
          //   for (var x in params) {
          //     str += params[x].axisValue + ":" + params[x].data + "/n";
          //   }
          //   return str;
          // },
          formatter:
            "<span>实操成绩</span>({b0}) :  {c0}<span>人</span><br /><span>理论成绩</span>({b1}) :  {c1}<span>人</span>",
                legend: {
                    // orient: "vertical",
                    // left: "left",
                    x: "center",
                    y: "90%",
        },
        toolbox: this.gettoolbox("考试情况查询", "保安员考试情况明细", 3),
        legend: {
          data: ["实操成绩", "理论成绩"],
        },
        // toolbox: {
        //   feature: {
        //     saveAsImage: {},
                // grid: {
                //   // left: "3%",
                //   right: "5%",
                //   // bottom: "3%",
                //   // containLabel: true,
        //   },
        // },
        grid: {
          left: "3%",
          right: "5%",
          bottom: "3%",
          containLabel: true,
        },
        xAxis: [
          {
            type: "category",
            boundaryGap: false,
            // data: ["0~60分", "60~80分", "80~90分", "90~100分"],
            data: xd,
          },
        ],
        yAxis: [
          {
            type: "value",
          },
        ],
        series: [
          {
            name: "实操成绩",
            type: "line",
            stack: "总量",
            areaStyle: {},
            emphasis: {
              focus: "series",
            },
            // data: [1, 2, 3, 1],
                        // name: "访问来源",
                        type: "pie",
                        radius: "50%",
                        data: data,
            // data: [
            //   1, 0, 0, 0, 3, 2, 1, 0, 4, 0, 5, 0, 4, 0, 0, 9, 7, 0, 2, 0, 5, 0,
            //   0, 0, 7, 9, 0, 0, 7, 0, 5, 0, 7, 1, 0, 9, 2, 0, 0, 0, 3, 0, 0, 0,
            //   7, 9, 0, 0, 7, 0, 5, 0, 7, 24, 2, 9, 7, 37, 0, 3, 5, 0, 0, 0, 7,
            //   9, 1, 0, 7, 0, 5, 4, 2, 0, 0, 9, 7, 35, 0, 0, 3, 0, 0, 12, 7, 9,
            //   0, 0, 7, 0, 2, 0, 7, 0, 0, 9, 7, 0, 0, 1,
                        //   { value: 1, name: "在逃人员" },
                        //   { value: 3, name: "吸毒人员" },
                        //   { value: 10, name: "刑释解教人员" },
                        //   { value: 5, name: "社会闲散青少年" },
                        //   { value: 11, name: "艾滋病人" },
                        //   { value: 26, name: "其他人员" },
            // ],
            data: s,
          },
          {
            name: "理论成绩",
            type: "line",
            stack: "总量",
            areaStyle: {},
            emphasis: {
              focus: "series",
                            itemStyle: {
                                shadowBlur: 10,
                                shadowOffsetX: 0,
                                shadowColor: "rgba(0, 0, 0, 0.5)",
            },
            // data: [
            //   4, 0, 5, 0, 7, 3, 2, 9, 7, 1, 0, 3, 5, 0, 9, 7, 0, 2, 0, 0, 7, 0,
            //   2, 0, 7, 0, 0, 9, 5, 0, 0, 0, 7, 9, 0, 0, 7, 0, 5, 0, 7, 1, 0, 9,
            //   2, 0, 0, 50, 3, 0, 30, 0, 7, 9, 0, 20, 7, 40, 0, 0, 0, 7, 9, 1, 0,
            //   7, 0, 5, 4, 2, 0, 0, 9, 7, 35, 0, 0, 3, 0, 0, 12, 7, 9, 0, 7, 0,
            //   0, 11, 0, 0, 0, 3, 2, 1, 0, 4, 0, 5, 0, 3,
            // ],
            data: l,
                        },
                        label: {
                            // alignTo: "edge",
                            formatter: "{name|{b}}\n({d}%)",
                            // minMargin: 5,
                            // edgeDistance: 10,
                            // lineHeight: 15,
                            rich: {
                                time: {
                                    fontSize: 10,
                                    color: "#999",
                                },
                            },
                        },
          },
        ],
      };