chenrui  2 년 전
부모
커밋
c5a1b531a1
2개의 변경된 파일48개의 추가작업 그리고 3개의 파일을 삭제
  1. 1 0
      src/views/securityCheck/components/securityCheckHeader.vue
  2. 47 3
      src/views/securityCheck/views/agentHome.vue

+ 1 - 0
src/views/securityCheck/components/securityCheckHeader.vue

@@ -343,6 +343,7 @@ export default {
     if (Object.keys(this.$route.query).length == 0) {
       this.formData.dateRangeRadio = "当日";
     } else {
+      console.log(this.$route.query);
       this.formData.beginDate = this.$route.query.startTime;
       this.formData.endDate = this.$route.query.endTime;
       // this.formData.selection = this.$route.query.levelId

+ 47 - 3
src/views/securityCheck/views/agentHome.vue

@@ -180,11 +180,16 @@
 <script>
 import GraphicEchart from "../components/graphicHome.vue";
 import SecurityCheckHeader from "../components/securityCheckHeader.vue";
-import { emergencys } from "@/api/statistics/statistics.js";
+import { comprehensiveTable } from "@/api/statistics/statistics.js";
 export default {
   data() {
     return {
-      queryData: {},
+      queryData: {
+        startTime: "",
+        endTime: "",
+        agentLevel: "",
+        agentCode: "",
+      },
       dataall: {
         id: 20,
         name: "总件数",
@@ -306,7 +311,46 @@ export default {
     },
     async getData() {
       try {
-        const result = await emergencys(this.queryData);
+        if (Object.keys(this.$route.query).length !== 0) {
+          const { startTime, endTime, agentLevel, agentCode } =
+            this.$route.query;
+          this.queryData.startTime = startTime;
+          this.queryData.endTime = endTime;
+          this.queryData.agentLevel = agentLevel;
+          this.queryData.agentCode = agentCode;
+        }
+        const result = await comprehensiveTable(this.queryData);
+        if (result.data.length == 0) {
+          result.data = [
+            {
+              no: 1,
+              risk: "普通",
+              num: 0,
+              kxsNum: 0,
+              yjNum: 0,
+              jyNum: 0,
+              fxNum: 0,
+            },
+            {
+              no: 2,
+              risk: "高风险",
+              num: 0,
+              kxsNum: 0,
+              yjNum: 0,
+              jyNum: 0,
+              fxNum: 0,
+            },
+            {
+              no: 3,
+              risk: "低风险",
+              num: 0,
+              kxsNum: 0,
+              yjNum: 0,
+              jyNum: 0,
+              fxNum: 0,
+            },
+          ];
+        }
         let count = 0;
         let counts = 0;
         let arr = [];