From 2ab43124df63be8e2cecd315f422d87be576de38 Mon Sep 17 00:00:00 2001
From: liuyg <376836862@qq.com>
Date: Sat, 11 Sep 2021 16:46:25 +0800
Subject: [PATCH] bug  加智能分析

---
 src/views/securityAnalysis/index.vue |  242 ++++++++++++++++++++++++++---------------------
 1 files changed, 134 insertions(+), 108 deletions(-)

diff --git a/src/views/securityAnalysis/index.vue b/src/views/securityAnalysis/index.vue
index 81debeb..331d3fa 100644
--- a/src/views/securityAnalysis/index.vue
+++ b/src/views/securityAnalysis/index.vue
@@ -2,19 +2,23 @@
   <div class="securityAnalysis">
     <!-- securityAnalysis -->
     <div class="securityAnalysisleft">
-      <div class="examines">
-        <div class="examine" ref="ech1"></div>
-        <div class="examine1">
-          <!-- <div>审查时间:</div>
+      <!-- <div class="examines"> -->
+      <!-- <div class="examine" ref="ech1"></div> -->
+      <!-- <div class="examine1"> -->
+      <!-- <div>审查时间:</div>
           <div>审查时间:</div>
           <div>问题保安员人数:</div>
           <div>问题保安员人数:</div>
           <div>问题保安员比例:</div>
           <div>问题保安员比例:</div> -->
-          <div v-for="(item, index) in examine1" :key="index">
+      <!-- <div v-for="(item, index) in examine1" :key="index">
             {{ item.title }}<br />{{ item.value }}
           </div>
-        </div>
+        </div> -->
+      <!-- 保安员审查情况统计
+        <div>饼图</div> -->
+      <!-- </div> -->
+      <div class="examines" ref="ech1">
         <!-- 保安员审查情况统计
         <div>饼图</div> -->
       </div>
@@ -46,17 +50,42 @@
     </div>
     <div>
       <el-dialog
-        width="1111px"
+        width="90%"
         :title="titles"
         append-to-body
         :visible.sync="dialogVisible"
         top="10vh"
       >
-        <certificate :czdata="czdata" v-if="sees == 1"></certificate>
+        <certificate
+          :card="{ deptid: deptid, jurisdiction: jurisdiction }"
+          v-if="sees == 1"
+        >
+          <!-- 保安员审查情况统计 -->
+        </certificate>
         <examination
           :card="{ deptid: deptid, jurisdiction: jurisdiction }"
           v-if="sees == 2"
-        ></examination>
+        >
+          <!-- 保安员考试情况统计 -->
+        </examination>
+        <situation
+          :card="{ deptid: deptid, jurisdiction: jurisdiction }"
+          v-if="sees == 3"
+        >
+          <!-- 保安员审查情况统计 -->
+        </situation>
+        <dispatch
+          :card="{ deptId: deptid, jurisdiction: jurisdiction }"
+          v-if="sees == 4"
+        >
+          <!-- 派遣服务单位 注意deptId  I为大写 -->
+        </dispatch>
+        <assignment
+          :card="{ deptid: deptid, jurisdiction: jurisdiction }"
+          v-if="sees == 5"
+        >
+          <!-- 保安派遣情况 -->
+        </assignment>
       </el-dialog>
     </div>
   </div>
@@ -68,17 +97,23 @@
   getinformationselectHold, //保安员持证
   getinformationselectDis, //派遣服务单位
   getinformationstatistics, //保安员考试情况统计
-  getinformationselectDisp, //保安派遣数量
+  getinformationselectDisp, //保安派遣情况
   getinformationselectSoil, //社保缴纳情况统计
 } from "@/api/securityAnalysis/securityAnalysis";
 import { mapState } from "vuex";
 import { getRoleDetail } from "@/api/system/role";
-import certificate from "./certificate.vue";
-import examination from "./examination.vue";
+import certificate from "./child/certificate.vue";
+import examination from "./child/examination.vue";
+import situation from "./child/situation.vue";
+import dispatch from "./child/dispatch.vue";
+import assignment from "./child/assignment.vue";
 export default {
   components: {
     certificate,
     examination,
+    situation,
+    dispatch,
+    assignment,
   },
   data() {
     return {
@@ -96,7 +131,7 @@
       dialogVisible: false,
       titles: "",
 
-      czdata: [],
+      // czdata: [],
       sees: "",
     };
   },
@@ -178,6 +213,27 @@
         ? "0%"
         : Math.round((num / total) * 10000) / 100.0 + "%";
     },
+    gettoolbox(title, titles, id) {
+      var that = this;
+      return {
+        show: true,
+        itemSize: 25,
+        top: 20,
+        right: 20,
+        feature: {
+          myTool1: {
+            show: true,
+            title: title,
+            icon: "image://img/table.png",
+            onclick: function () {
+              that.dialogVisible = true;
+              that.sees = id;
+              that.titles = titles;
+            },
+          },
+        },
+      };
+    },
     getEC1() {
       var that = this;
       getinformationselectExtype(this.deptid, this.jurisdiction)
@@ -236,6 +292,7 @@
           x: "center",
           y: "90%",
         },
+        toolbox: this.gettoolbox("审查情况查询", "保安员审查情况明细", 3),
         // grid: {
         //   // left: "3%",
         //   right: "5%",
@@ -287,50 +344,50 @@
       getinformationselectHold(this.deptid, this.jurisdiction)
         .then((res) => {
           var a = res.data.data;
-          console.log(a, "持证");
+          // console.log(a, "持证");
           var b = that.changedata(a, "cz", "wcz", "持证", "未持证");
           that.setEC2(b);
-          var datas = [];
-          for (var k in a) {
-            let b = "";
-            let c = [];
-            if (a[k].cz >= 1) {
-              b = {
-                czname: a[k].czname.split(","),
-                czptime: a[k].czptime.split(","),
-              };
-              // datas.push(a[k]);
-              // console.log(b, 123);
-              if (b.czname.length > 1) {
-                for (var n in b.czname) {
-                  c.push({
-                    czname: b.czname[n],
-                    czptime: b.czptime[n] == 0 ? "" : b.czptime[n],
-                    tpye: "持证",
-                  });
-                }
-              } else {
-                c = [
-                  {
-                    czname: b.czname[0],
-                    czptime: b.czptime[0] == 0 ? "" : b.czptime[0],
-                    tpye: "持证",
-                  },
-                ];
-              }
-              // console.log(c, 132456);
-              datas.push(...c);
-            }
-            if (a[k].wcz >= 1) {
-              b = {
-                wczname: a[k].wczname.split(","),
-                wczptime: a[k].wczptime.split(","),
-              };
-              console.log(b, 123);
-            }
-          }
-          // that.czdata = [...datas, ...datas];
-          that.czdata = datas;
+          // var datas = [];
+          // for (var k in a) {
+          //   let b = "";
+          //   let c = [];
+          //   if (a[k].cz >= 1) {
+          //     b = {
+          //       czname: a[k].czname.split(","),
+          //       czptime: a[k].czptime.split(","),
+          //     };
+          //     // datas.push(a[k]);
+          //     // console.log(b, 123);
+          //     if (b.czname.length > 1) {
+          //       for (var n in b.czname) {
+          //         c.push({
+          //           czname: b.czname[n],
+          //           czptime: b.czptime[n] == 0 ? "" : b.czptime[n],
+          //           tpye: "持证",
+          //         });
+          //       }
+          //     } else {
+          //       c = [
+          //         {
+          //           czname: b.czname[0],
+          //           czptime: b.czptime[0] == 0 ? "" : b.czptime[0],
+          //           tpye: "持证",
+          //         },
+          //       ];
+          //     }
+          //     // console.log(c, 132456);
+          //     datas.push(...c);
+          //   }
+          //   if (a[k].wcz >= 1) {
+          //     b = {
+          //       wczname: a[k].wczname.split(","),
+          //       wczptime: a[k].wczptime.split(","),
+          //     };
+          //     console.log(b, 123);
+          //   }
+          // }
+          // // that.czdata = [...datas, ...datas];
+          // that.czdata = datas;
         })
         .catch((res) => {
           var b = that.changedata([], "cz", "wcz", "持证", "未持证");
@@ -357,24 +414,7 @@
           x: "center",
           y: "83%",
         },
-        toolbox: {
-          show: true,
-          itemSize: 25,
-          top: 20,
-          right: 20,
-          feature: {
-            myTool1: {
-              show: true,
-              title: "持证情况查询",
-              icon: "path://M137 66l37 63h-74zM921 921l-63 37v-74zM287 381h66c17.1 0 31 13.9 31 31v354c0 17.1-13.9 31-31 31h-66c-17.1 0-31-13.9-31-31V412c0-17.1 13.9-31 31-31zM491 193h66c17.1 0 31 13.9 31 31v542c0 17.1-13.9 31-31 31h-66c-17.1 0-31-13.9-31-31V224c0-17.1 13.9-31 31-31zM695 469h66c17.1 0 31 13.9 31 31v266c0 17.1-13.9 31-31 31h-66c-17.1 0-31-13.9-31-31V500c0-17.1 13.9-31 31-31z",
-              onclick: function () {
-                that.dialogVisible = true;
-                that.sees = 1;
-                that.titles = "保安员持证情况统计";
-              },
-            },
-          },
-        },
+        toolbox: this.gettoolbox("持证情况查询", "保安员持证情况明细", 1),
         series: [
           {
             // name: "访问来源",
@@ -459,24 +499,7 @@
           formatter:
             "<span>实操成绩</span>({b0}) :  {c0}<span>人</span><br /><span>理论成绩</span>({b1}) :  {c1}<span>人</span>",
         },
-        toolbox: {
-          show: true,
-          itemSize: 25,
-          top: 20,
-          right: 20,
-          feature: {
-            myTool1: {
-              show: true,
-              title: "考试情况查询",
-              icon: "path://M137 66l37 63h-74zM921 921l-63 37v-74zM287 381h66c17.1 0 31 13.9 31 31v354c0 17.1-13.9 31-31 31h-66c-17.1 0-31-13.9-31-31V412c0-17.1 13.9-31 31-31zM491 193h66c17.1 0 31 13.9 31 31v542c0 17.1-13.9 31-31 31h-66c-17.1 0-31-13.9-31-31V224c0-17.1 13.9-31 31-31zM695 469h66c17.1 0 31 13.9 31 31v266c0 17.1-13.9 31-31 31h-66c-17.1 0-31-13.9-31-31V500c0-17.1 13.9-31 31-31z",
-              onclick: function () {
-                that.dialogVisible = true;
-                that.sees = 2;
-                that.titles = "保安员考试情况统计";
-              },
-            },
-          },
-        },
+        toolbox: this.gettoolbox("考试情况查询", "保安员考试情况明细", 2),
         legend: {
           data: ["实操成绩", "理论成绩"],
         },
@@ -619,6 +642,7 @@
           data: xxd,
           // data: xd,
         },
+        toolbox: this.gettoolbox("派遣单位查询", "派遣服务单位明细", 4),
         yAxis: {
           type: "value",
         },
@@ -663,6 +687,7 @@
         tooltip: {
           trigger: "item",
         },
+        toolbox: this.gettoolbox("派遣情况查询", "保安员派遣情况明细", 5),
         legend: {
           // orient: "vertical",
           // left: "left",
@@ -837,6 +862,7 @@
   .securityAnalysiscenter {
     width: 40% !important;
   }
+  .examines,
   .certificate,
   .examination,
   .dispatchUnit,
@@ -848,23 +874,23 @@
     box-sizing: border-box;
     background-color: #fff;
   }
-  .examines {
-    width: 100%;
-    height: 49%;
-    display: flex;
-    align-items: center;
-    background-color: #fff;
-  }
-  .examine {
-    width: 100%;
-    height: 100%;
-  }
-  .examine1 {
-    width: 200px;
-    div {
-      margin-bottom: 10px;
-    }
-  }
+  // .examines {
+  //   width: 100%;
+  //   height: 49%;
+  //   display: flex;
+  //   align-items: center;
+  //   background-color: #fff;
+  // }
+  // .examine {
+  //   width: 100%;
+  //   height: 100%;
+  // }
+  // .examine1 {
+  //   width: 200px;
+  //   div {
+  //     margin-bottom: 10px;
+  //   }
+  // }
   // .securityAnalysisleft {
   //   width: $widths;
   // }

--
Gitblit v1.9.3