Browse Source

Merge branch 'master' of http://120.26.64.82:3000/BFFE/SZHY2.0

chenrui  2 years ago
parent
commit
962952ab41

+ 14 - 7
src/views/securityCheck/components/securityCheckHeader.vue

@@ -68,10 +68,11 @@
       <template v-if="withSelect">
         <a-form-item prop="selection" style="margin-right: 16px">
           <a-select
-            mode="combobox"
+            :mode="mode"
             :placeholder="selectPlaceholder"
             :value="formData.selection ? formData.selection : undefined"
             @change="handleChange"
+            allowClear
           >
             <a-select-option
               v-for="item in optionLists"
@@ -134,6 +135,10 @@
 <script>
 export default {
   props: {
+    mode:{
+      type: String,
+      default: "combobox",
+    },
     title: {
       type: String,
       default: "",
@@ -183,10 +188,6 @@ export default {
     optionLists: {
       type: Array,
       default: () => [
-        {
-          name: "全部",
-          lable: "",
-        },
         {
           name: "A",
           lable: "A",
@@ -339,11 +340,17 @@ export default {
       console.log(this.$route.query);
       this.formData.beginDate = this.$route.query.startTime;
       this.formData.endDate = this.$route.query.endTime;
+      if(this.$route.query.beginDate){
+        this.formData.beginDate = this.$route.query.beginDate;
+      }
+      if(this.$route.query.endDate){
+        this.formData.endDate = this.$route.query.endDate;
+      }
       // this.formData.selection = this.$route.query.levelId
       //   ? this.$route.query.levelId
       //   : this.$route.query.agentLevel;
-      this.formData.selection = this.$route.query.place
-        ? this.$route.query.place
+      this.formData.selection = this.$route.query.places
+        ? this.$route.query.places
         : this.$route.query.levelId
         ? this.$route.query.levelId
         : this.$route.query.agentLevel;

+ 1 - 1
src/views/securityCheck/views/agentHome.vue

@@ -299,7 +299,7 @@ export default {
     //点击跳转
     echar(data) {
       if (data) {
-        this.queryData.riskRating = data.namefa;
+        this.queryData.riskClassification = data.namefa;
         this.queryData.openResult = data.namech;
       }
       this.$router.push({

+ 9 - 4
src/views/securityCheck/views/agentTable.vue

@@ -55,7 +55,8 @@ export default {
                 destination: this.FormData.destination,
                 agentCode: this.FormData.agentCode,
                 agentLevel: this.FormData.agentLevel,
-                riskRating: row.risk,
+                riskRating: "",
+                riskClassification:row.risk,
                 openResult: this.FormData.openResult,
               },
             });
@@ -84,7 +85,8 @@ export default {
                     destination: this.FormData.destination,
                     agentCode: this.FormData.agentCode,
                     agentLevel: this.FormData.agentLevel,
-                    riskRating: row.risk,
+                    riskRating: "",
+                    riskClassification:row.risk,
                     openResult: "放行",
                   },
                 });
@@ -103,7 +105,8 @@ export default {
                     destination: this.FormData.destination,
                     agentCode: this.FormData.agentCode,
                     agentLevel: this.FormData.agentLevel,
-                    riskRating: row.risk,
+                    riskRating: "",
+                    riskClassification:row.risk,
                     openResult: "拒运",
                   },
                 });
@@ -122,7 +125,8 @@ export default {
                     destination: this.FormData.destination,
                     agentCode: this.FormData.agentCode,
                     agentLevel: this.FormData.agentLevel,
-                    riskRating: row.risk,
+                    riskRating: "",
+                    riskClassification:row.risk,
                     openResult: "移交",
                   },
                 });
@@ -137,6 +141,7 @@ export default {
         agentCode: "", //代理人ID
         agentLevel: "", //代理人信用等级 A\B\C\D
         riskRating: "", //综合风险等级评估 低风险\优先\普通\高风险\严控
+        riskClassification:"",// 货物风险等级 高风险\低风险\普通
         startTime: "", //开始时间
         endTime: "", //结束时间
       },

+ 32 - 12
src/views/securityCheck/views/cargoCharts.vue

@@ -52,11 +52,12 @@ import { agent, routeall } from "@/api/statistics/statistics.js";
 export default {
   data() {
     return {
+      multiple:"multiple",
       queryData: {
-        startTime: "",
-        endTime: "",
-        agentLevel: "",
-        agentCode: "",
+        beginDate: "",
+        endDate: "",
+        places: [],
+        proxyId: "",
       },
       queryDatacopy: {},
       destination: [],
@@ -196,9 +197,24 @@ export default {
     GraphicEchart,
     SecurityCheckHeader,
   },
+  created(){
+    this.formatDate();
+  },
   mounted() {
+    if (Object.keys(this.$route.query).length !== 0) {
+      const { beginDate, endDate, places, proxyId } =
+        this.$route.query;
+      this.queryData.beginDate = beginDate;
+      this.queryData.endDate = endDate;
+      if(typeof(places)=="string"){
+        this.queryData.places = [places];
+      }
+      else{
+        this.queryData.places = places;
+      }
+      this.queryData.proxyId = proxyId;
+    }
     this.routdata();
-    this.formatDate();
     this.relationDate();
   },
   methods: {
@@ -213,10 +229,16 @@ export default {
       this.queryData.endDate = `${myyear}-${mymonth}-${myweekday}`;
     },
     search(data) {
+      if(typeof(data[1])=="string"&&data[1]==""){
+        data[1] =[]
+      }
+      if(typeof(data[1])=="string"&&data[1]!=""){
+        data[1] = [data[1]]
+      }
       this.queryData = {
         beginDate: data[0][0],
         endDate: data[0][1],
-        place: data[1],
+        places: data[1],
         proxyId: data[2],
       };
       this.relationDate();
@@ -226,7 +248,7 @@ export default {
       let params = {
         startTime: this.queryData.beginDate,
           endTime: this.queryData.endDate,
-          destination:this.queryData.place,
+          destination:this.queryData.places,
           agentCode: this.queryData.proxyId,
           openResult: "",
           riskRating: data,
@@ -242,11 +264,7 @@ export default {
     //货物关联统计接口
     async relationDate() {
       try {
-        let params = {};
-        if (Object.keys(this.$route.query).length !== 0) {
-          params = this.$route.query;
-          this.queryData = params;
-        }
+       
         // console.log(params);
         const result = await agent(this.queryData);
         if (result.status == 200) {
@@ -384,6 +402,8 @@ export default {
       }
     },
     change() {
+      let param = JSON.parse(JSON.stringify(this.queryData,))
+      param.places = param.places[0]
       this.$router.push({
         path: "./cargoRelevanceTable",
         query: this.queryData,

+ 38 - 25
src/views/securityCheck/views/cargoRelevanceTable.vue

@@ -65,8 +65,8 @@ export default {
           title: "普通",
           children: [
             {
-              dataIndex: "count",
-              key: "count",
+              dataIndex: "highRiskcount",
+              key: "highRiskcount",
               title: "件数",
               clickHandler: (row, rowIndex) => {
                 this.$router.push({
@@ -223,8 +223,8 @@ export default {
       FormData: {
         beginDate: "",
         endDate: "",
-        place: "",
-        proxyId: ""
+        places: [],
+        proxyId: "",
       },
     };
   },
@@ -232,6 +232,17 @@ export default {
     this.formatDate();
   },
   mounted() {
+    if (Object.keys(this.$route.query).length !== 0) {
+      const { beginDate, endDate, places, proxyId } = this.$route.query;
+      this.FormData.beginDate = beginDate;
+      this.FormData.endDate = endDate;
+      if (typeof places == "string") {
+        this.FormData.places = [places];
+      } else {
+        this.FormData.places = places;
+      }
+      this.FormData.proxyId = proxyId;
+    }
     this.setTableHeight();
     window.addEventListener("resize", this.setTableHeight);
     this.routdata();
@@ -273,14 +284,7 @@ export default {
       try {
         this.loading = true;
         // console.log(this.$route.query);
-        if (Object.keys(this.$route.query).length !== 0) {
-          const { beginDate, endDate, place, proxyId } =
-            this.$route.query;
-          this.FormData.beginDate = beginDate;
-          this.FormData.endDate = endDate;
-          this.FormData.place = place;
-          this.FormData.proxyId = proxyId;
-        }
+
         const result = await agent(this.FormData);
         if (result.status === 200) {
           this.tableData = result.data;
@@ -290,20 +294,20 @@ 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";
+          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";
+                  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;
@@ -313,15 +317,24 @@ export default {
       }
     },
     changeHandler() {
+      let param = JSON.parse(JSON.stringify(this.FormData));
+      param.places = param.places[0];
       this.$router.push({
         path: "./cargoCharts",
         query: this.FormData,
       });
     },
     searchHandler(arr) {
+      console.log(arr);
+      if (typeof arr[1] == "string" && arr[1] == "") {
+        arr[1] = [];
+      }
+      if (typeof arr[1] == "string" && arr[1] != "") {
+        arr[1] = [arr[1]];
+      }
       this.FormData.beginDate = arr[0][0];
       this.FormData.endDate = arr[0][1];
-      this.FormData.place = arr[1];
+      this.FormData.places = arr[1];
       this.FormData.proxyId = arr[2];
       this.getData();
     },

+ 7 - 2
src/views/securityCheck/views/comprehensiveHome.vue

@@ -143,10 +143,13 @@ export default {
       myChart.clear();
       myChart.setOption(discoloration);
       window.onresize = () => {
-        this.queryData.riskRating = a.seriesName;
+        this.queryData.agentLevel = a.seriesName;
         myChart.resize();
       };
       myChart.on("click", (a, b) => {
+        this.queryData.startTime = a.name +"-01";
+        this.queryData.endTime = a.name +"-31";
+        this.queryData.agentLevel = a.seriesName;
         this.echar();
       });
     },
@@ -166,7 +169,9 @@ export default {
         myChart.resize();
       };
       myChart.on("click", (a, b) => {
-        this.queryData.riskRating = a.seriesName;
+        this.queryData.startTime = a.name;
+        this.queryData.endTime = a.name;
+        this.queryData.agentLevel = a.seriesName;
         // this.queryData.openResult = a.value;
         this.echar();
       });

+ 6 - 8
src/views/securityCheck/views/securityChannelHome.vue

@@ -42,17 +42,16 @@ export default {
         startTime: data[0][0],
         endTime: data[0][1],
         proxyId: data[1],
-        proxyLevel: data[2],
-        type: "日",
+        proxyLevel: data[2]
       };
       this.relationDate(data);
     },
     //点击跳转
     echar() {
-      this.$router.push({
-        path: "/waybillTable",
-        query: this.queryData,
-      });
+      // this.$router.push({
+      //   path: "/waybillTable",
+      //   query: this.queryData,
+      // });
     },
     change() {
       this.$router.push("./agentTable");
@@ -63,8 +62,7 @@ export default {
           beginDate: data[0][0],
           endDate: data[0][1],
           proxyId: data[1],
-          proxyLevel: data[2],
-          querytype: "日",
+          proxyLevel: data[2]
         };
         const result = await correlation(params);
         if (result.status == 200) {

+ 3 - 1
src/views/securityCheck/views/waybillTable.vue

@@ -132,6 +132,7 @@ export default {
         startTime: "", //开始时间
         endTime: "", // 结束时间
         openResult: "", //  开箱结果
+        riskClassification:"",//货物风险等级 高风险\低风险\普通
         pageNum: "1", //** 当前记录起始索引 */
         pageSize: "10", // /** 每页显示记录数 */
       },
@@ -140,7 +141,7 @@ export default {
   },
   created(){
     let queryData = this.$route.query;
-    const { destination, agentCode,agentLevel,riskRating,startTime,endTime,openResult } = queryData;
+    const { destination, agentCode,agentLevel,riskRating,startTime,endTime,openResult,riskClassification } = queryData;
     this.FormData = {
       destination:destination,
       agentCode:agentCode,
@@ -149,6 +150,7 @@ export default {
       startTime:startTime,
       endTime:endTime,
       openResult:openResult,
+      riskClassification:riskClassification,
       pageNum: "1",
       pageSize: "10",
     }