chenjun 2 lat temu
rodzic
commit
1c9087f5c9

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

@@ -241,14 +241,6 @@ export default {
       },
       optionList: [],
       inputList: [
-        {
-          id: 1,
-          name: "陈睿",
-        },
-        {
-          id: 2,
-          name: "赵科",
-        },
       ],
     };
   },

+ 4 - 4
src/views/securityCheck/views/cargoCharts.vue

@@ -203,10 +203,10 @@ export default {
   methods: {
     search(data) {
       this.queryData = {
-        startTime: data[0][0],
-        endTime: data[0][1],
-        destination: data[1],
-        agentCode: data[2],
+        beginDate: data[0][0],
+        endDate: data[0][1],
+        place: data[1],
+        proxyId: data[2],
       };
       this.relationDate();
     },

+ 98 - 88
src/views/securityCheck/views/cargoRelevanceTable.vue

@@ -49,143 +49,138 @@ export default {
             this.$router.push({
               path: "/waybillTable",
               query: {
-                startTime: this.FormData.startTime,
-                endTime: this.FormData.endTime,
+                startTime: this.FormData.beginDate,
+                endTime: this.FormData.endDate,
                 destination: row.flightLine,
-                agentCode: this.FormData.agentCode,
-                destination: this.FormData.agentLevel,
+                agentCode: this.FormData.proxyId,
                 riskRating: "",
-                openResult: this.FormData.openResult,
+                openResult: "",
               },
             });
           },
         },
         {
-          dataIndex: "datas",
-          key: "datas",
-          title: "高风险级",
+          dataIndex: "highRisk",
+          key: "highRisk",
+          title: "普通",
           children: [
             {
-              dataIndex: "datas[0].count",
-              key: "datas[0].count",
+              dataIndex: "count",
+              key: "count",
               title: "件数",
               clickHandler: (row, rowIndex) => {
-                console.log(row);
                 this.$router.push({
                   path: "/waybillTable",
                   query: {
-                    startTime: this.FormData.startTime,
-                    endTime: this.FormData.endTime,
+                    startTime: this.FormData.beginDate,
+                    endTime: this.FormData.endDate,
                     destination: row.flightLine,
-                    agentCode: this.FormData.agentCode,
-                    destination: this.FormData.agentLevel,
-                    riskRating: "高风险级",
-                    openResult: this.FormData.openResult,
+                    agentCode: this.FormData.proxyId,
+                    openResult: "",
+                    riskRating: "普通",
                   },
                 });
               },
             },
             {
-              dataIndex: "datas[0].mix",
-              key: "datas[0].mix",
+              dataIndex: "mix",
+              key: "mix",
               title: "占比",
             },
           ],
         },
         {
-          dataIndex: "datas",
-          key: "datas",
-          title: "低风险级",
+          dataIndex: "lowRisk",
+          key: "lowRisk",
+          title: "严控",
           children: [
             {
-              dataIndex: "datas[4].count",
-              key: "datas[4].count",
+              dataIndex: "lowRiskCount",
+              key: "lowRiskCount",
               title: "件数",
               clickHandler: (row, rowIndex) => {
-                console.log(row);
                 this.$router.push({
                   path: "/waybillTable",
                   query: {
-                    startTime: this.FormData.startTime,
-                    endTime: this.FormData.endTime,
+                    startTime: this.FormData.beginDate,
+                    endTime: this.FormData.endDate,
                     destination: row.flightLine,
-                    agentCode: this.FormData.agentCode,
-                    destination: this.FormData.agentLevel,
-                    riskRating: "低风险级",
-                    openResult: this.FormData.openResult,
+                    agentCode: this.FormData.proxyId,
+                    openResult: "",
+                    riskRating: "严控",
                   },
                 });
               },
             },
             {
-              dataIndex: "datas[4].mix",
-              key: "datas[4].mix",
+              dataIndex: "lowRiskRatio",
+              key: "lowRiskRatio",
               title: "占比",
             },
           ],
         },
         {
-          dataIndex: "datas",
-          key: "datas",
+          dataIndex: "priority",
+          key: "priority",
           prop: "priority",
-          title: "优先级",
+          title: "低风险",
           children: [
             {
-              dataIndex: "datas[3].count",
-              key: "datas[3].count",
+              dataIndex: "priorityCount",
+              key: "priorityCount",
+              prop: "priorityCount",
               title: "件数",
               clickHandler: (row, rowIndex) => {
-                console.log(row);
                 this.$router.push({
                   path: "/waybillTable",
                   query: {
-                    startTime: this.FormData.startTime,
-                    endTime: this.FormData.endTime,
+                    startTime: this.FormData.beginDate,
+                    endTime: this.FormData.endDate,
                     destination: row.flightLine,
-                    agentCode: this.FormData.agentCode,
-                    destination: this.FormData.agentLevel,
-                    riskRating: "优先级",
-                    openResult: this.FormData.openResult,
+                    agentCode: this.FormData.proxyId,
+                    openResult: "",
+                    riskRating: "低风险",
                   },
                 });
               },
             },
             {
-              dataIndex: "datas[3].mix",
-              key: "datas[3].mix",
+              dataIndex: "priorityRatio",
+              key: "priorityRatio",
+              prop: "priorityRatio",
               title: "占比",
             },
           ],
         },
         {
-          dataIndex: "datas",
-          key: "datas",
+          dataIndex: "normal",
+          key: "normal",
           prop: "normal",
-          title: "普通级",
+          title: "优先",
           children: [
             {
-              dataIndex: "datas[2].count",
-              key: "datas[2].count",
+              dataIndex: "normalCount",
+              key: "normalCount",
+              prop: "normalCount",
               title: "件数",
               clickHandler: (row, rowIndex) => {
-                console.log(row);
                 this.$router.push({
                   path: "/waybillTable",
                   query: {
-                    startTime: this.FormData.startTime,
-                    endTime: this.FormData.endTime,
+                    startTime: this.FormData.beginDate,
+                    endTime: this.FormData.endDate,
                     destination: row.flightLine,
-                    agentCode: this.FormData.agentCode,
-                    destination: this.FormData.agentLevel,
-                    riskRating: "普通级",
-                    openResult: this.FormData.openResult,
+                    agentCode: this.FormData.proxyId,
+                    openResult: "",
+                    riskRating: "优先",
                   },
                 });
               },
             },
             {
-              dataIndex: "datas[2].mix",
-              key: "datas[2].mix",
+              dataIndex: "normalRatio",
+              key: "normalRatio",
+              prop: "normalRatio",
               title: "占比",
             },
           ],
@@ -194,30 +189,31 @@ export default {
           dataIndex: "strict",
           key: "strict",
           prop: "strict",
-          title: "严控级",
+          title: "高风险",
           children: [
             {
-              dataIndex: "datas[1].count",
-              key: "datas[1].count",
+              dataIndex: "strictCount",
+              key: "strictCount",
+              prop: "strictCount",
               title: "件数",
               clickHandler: (row, rowIndex) => {
                 this.$router.push({
                   path: "/waybillTable",
                   query: {
-                    startTime: this.FormData.startTime,
-                    endTime: this.FormData.endTime,
+                    startTime: this.FormData.beginDate,
+                    endTime: this.FormData.endDate,
                     destination: row.flightLine,
-                    agentCode: this.FormData.agentCode,
-                    destination: this.FormData.agentLevel,
-                    riskRating: "严控级",
-                    openResult: this.FormData.openResult,
+                    agentCode: this.FormData.proxyId,
+                    openResult: "",
+                    riskRating: "高风险",
                   },
                 });
               },
             },
             {
-              dataIndex: "datas[1].mix",
-              key: "datas[1].mix",
+              dataIndex: "strictRatio",
+              key: "strictRatio",
+              prop: "strictRatio",
               title: "占比",
             },
           ],
@@ -225,12 +221,10 @@ export default {
       ],
       tableData: [],
       FormData: {
-        destination: "", // 目的站
-        agentCode: "", //代理人ID
-        agentLevel: "", //代理人信用等级 A\B\C\D
-        riskRating: "", //综合风险等级评估 低风险\优先\普通\高风险\严控
-        startTime: "", //开始时间
-        endTime: "", //结束时间
+        beginDate: "",
+        endDate: "",
+        place: "",
+        proxyId: ""
       },
     };
   },
@@ -254,8 +248,8 @@ export default {
       let myweekday = date.getDate();
       mymonth < 10 ? (mymonth = "0" + mymonth) : mymonth;
       myweekday < 10 ? (myweekday = "0" + myweekday) : myweekday;
-      this.FormData.startTime = `${myyear}-${mymonth}-${myweekday}`;
-      this.FormData.endTime = `${myyear}-${mymonth}-${myweekday}`;
+      this.FormData.beginDate = `${myyear}-${mymonth}-${myweekday}`;
+      this.FormData.endDate = `${myyear}-${mymonth}-${myweekday}`;
     },
     async routdata() {
       try {
@@ -280,11 +274,11 @@ export default {
         this.loading = true;
         // console.log(this.$route.query);
         if (Object.keys(this.$route.query).length !== 0) {
-          const { startTime, endTime, destination, proxyId } =
+          const { beginDate, endDate, place, proxyId } =
             this.$route.query;
-          this.FormData.startTime = startTime;
-          this.FormData.endTime = endTime;
-          this.FormData.destination = destination;
+          this.FormData.beginDate = beginDate;
+          this.FormData.endDate = endDate;
+          this.FormData.place = place;
           this.FormData.proxyId = proxyId;
         }
         const result = await agent(this.FormData);
@@ -296,6 +290,22 @@ export default {
                 Math.floor((data.count / item.count).toFixed(2) * 100) + "%";
             });
           });
+          if(this.tableData.length>0){
+           for(let i=0;i<this.tableData[0].datas.length;i++){
+              this.tableCols.forEach(item =>{
+                if(item.title == this.tableData[0].datas[i].level){
+                  item.dataIndex = "datas";
+                  item.key = "datas";
+                  item.prop = "datas";
+                  item.children[0].dataIndex  = "datas["+i+"].count";
+                  item.children[0].key  = "datas["+i+"].count";
+                  item.children[0].prop  = "datas["+i+"].count";
+                  item.children[1].dataIndex  = "datas["+i+"].mix";
+                  item.children[1].key  = "datas["+i+"].mix";
+                }
+              })
+            }
+          }
           this.loading = false;
         }
       } catch (error) {
@@ -309,10 +319,10 @@ export default {
       });
     },
     searchHandler(arr) {
-      this.FormData.startTime = arr[0][0];
-      this.FormData.endTime = arr[0][1];
-      this.FormData.destination = arr[1];
-      this.FormData.agentCode = arr[2];
+      this.FormData.beginDate = arr[0][0];
+      this.FormData.endDate = arr[0][1];
+      this.FormData.place = arr[1];
+      this.FormData.proxyId = arr[2];
       this.getData();
     },
     setTableHeight() {