chenrui  2 жил өмнө
parent
commit
a130877502

+ 30 - 30
package-lock.json

@@ -3598,7 +3598,7 @@
       "dependencies": {
         "source-map": {
           "version": "0.6.1",
-          "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
+          "resolved": "https://registry.npmmirror.com/source-map/-/source-map-0.6.1.tgz",
           "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
           "dev": true
         }
@@ -4963,7 +4963,7 @@
     },
     "dom-converter": {
       "version": "0.2.0",
-      "resolved": "https://registry.npmjs.org/dom-converter/-/dom-converter-0.2.0.tgz",
+      "resolved": "https://registry.npmmirror.com/dom-converter/-/dom-converter-0.2.0.tgz",
       "integrity": "sha512-gd3ypIPfOMr9h5jIKq8E3sHOTCjeirnl0WK5ZdS1AW0Odt0b1PaWaHdJ4Qk4klv+YB9aJBS7mESXjFoDQPu6DA==",
       "dev": true,
       "requires": {
@@ -5012,7 +5012,7 @@
     },
     "domhandler": {
       "version": "4.3.1",
-      "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-4.3.1.tgz",
+      "resolved": "https://registry.npmmirror.com/domhandler/-/domhandler-4.3.1.tgz",
       "integrity": "sha512-GrwoxYN+uWlzO8uhUXRl0P+kHE4GtVPfYzVLcUxPL7KNdHKj66vvlhiweIHqYYXWlw+T8iLMp42Lm67ghw4WMQ==",
       "dev": true,
       "requires": {
@@ -5021,7 +5021,7 @@
       "dependencies": {
         "domelementtype": {
           "version": "2.3.0",
-          "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-2.3.0.tgz",
+          "resolved": "https://registry.npmmirror.com/domelementtype/-/domelementtype-2.3.0.tgz",
           "integrity": "sha512-OLETBj6w0OsagBwdXnPdN0cnMfF9opN69co+7ZrbfPGrdpPVNBUj02spi6B1N7wChLQiPn4CSH/zJvXw56gmHw==",
           "dev": true
         }
@@ -6567,7 +6567,7 @@
     },
     "html-minifier": {
       "version": "3.5.21",
-      "resolved": "https://registry.npmjs.org/html-minifier/-/html-minifier-3.5.21.tgz",
+      "resolved": "https://registry.npmmirror.com/html-minifier/-/html-minifier-3.5.21.tgz",
       "integrity": "sha512-LKUKwuJDhxNa3uf/LPR/KVjm/l3rBqtYeCOAekvG8F1vItxMUpueGd94i/asDDr8/1u7InxzFA5EeGjhhG5mMA==",
       "dev": true,
       "requires": {
@@ -6601,7 +6601,7 @@
         },
         "commander": {
           "version": "2.17.1",
-          "resolved": "https://registry.npmjs.org/commander/-/commander-2.17.1.tgz",
+          "resolved": "https://registry.npmmirror.com/commander/-/commander-2.17.1.tgz",
           "integrity": "sha512-wPMUt6FnH2yzG95SA6mzjQOEKUU3aLaDEmzs1ti+1E9h+CsrZghRlqEM/EJ4KscsQVG8uNN4uVreUeT8+drlgg==",
           "dev": true
         },
@@ -6715,7 +6715,7 @@
     },
     "htmlparser2": {
       "version": "6.1.0",
-      "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-6.1.0.tgz",
+      "resolved": "https://registry.npmmirror.com/htmlparser2/-/htmlparser2-6.1.0.tgz",
       "integrity": "sha512-gyyPk6rgonLFEDGoeRgQNaEUvdJ4ktTmmUh/h2t7s+M8oPpIPxgNACWa+6ESR57kXstwqPiCut0V8NRpcwgU7A==",
       "dev": true,
       "requires": {
@@ -6727,7 +6727,7 @@
       "dependencies": {
         "dom-serializer": {
           "version": "1.4.1",
-          "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-1.4.1.tgz",
+          "resolved": "https://registry.npmmirror.com/dom-serializer/-/dom-serializer-1.4.1.tgz",
           "integrity": "sha512-VHwB3KfrcOOkelEG2ZOfxqLZdfkil8PtJi4P8N2MMXucZq2yLp75ClViUlOVwyoHEDjYU433Aq+5zWP61+RGag==",
           "dev": true,
           "requires": {
@@ -6738,13 +6738,13 @@
         },
         "domelementtype": {
           "version": "2.3.0",
-          "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-2.3.0.tgz",
+          "resolved": "https://registry.npmmirror.com/domelementtype/-/domelementtype-2.3.0.tgz",
           "integrity": "sha512-OLETBj6w0OsagBwdXnPdN0cnMfF9opN69co+7ZrbfPGrdpPVNBUj02spi6B1N7wChLQiPn4CSH/zJvXw56gmHw==",
           "dev": true
         },
         "domutils": {
           "version": "2.8.0",
-          "resolved": "https://registry.npmjs.org/domutils/-/domutils-2.8.0.tgz",
+          "resolved": "https://registry.npmmirror.com/domutils/-/domutils-2.8.0.tgz",
           "integrity": "sha512-w96Cjofp72M5IIhpjgobBimYEfoPjx1Vx0BSX9P30WBdZW2WIKU0T1Bd0kz2eNZ9ikjKgHbEyKx8BB6H1L3h3A==",
           "dev": true,
           "requires": {
@@ -10024,7 +10024,7 @@
     },
     "relateurl": {
       "version": "0.2.7",
-      "resolved": "https://registry.npmjs.org/relateurl/-/relateurl-0.2.7.tgz",
+      "resolved": "https://registry.npmmirror.com/relateurl/-/relateurl-0.2.7.tgz",
       "integrity": "sha512-G08Dxvm4iDN3MLM0EsP62EDV9IuhXPR6blNz6Utcp7zyV3tr4HVNINt6MpaRWbxoOHT3Q7YN2P+jaHX8vUbgog==",
       "dev": true
     },
@@ -10049,7 +10049,7 @@
       "dependencies": {
         "css-select": {
           "version": "4.3.0",
-          "resolved": "https://registry.npmjs.org/css-select/-/css-select-4.3.0.tgz",
+          "resolved": "https://registry.npmmirror.com/css-select/-/css-select-4.3.0.tgz",
           "integrity": "sha512-wPpOYtnsVontu2mODhA19JrqWxNsfdatRKd64kmpRbQgh1KtItko5sTnEpPdpSaJszTOhEMlF/RPz28qj4HqhQ==",
           "dev": true,
           "requires": {
@@ -10062,13 +10062,13 @@
         },
         "css-what": {
           "version": "6.1.0",
-          "resolved": "https://registry.npmjs.org/css-what/-/css-what-6.1.0.tgz",
+          "resolved": "https://registry.npmmirror.com/css-what/-/css-what-6.1.0.tgz",
           "integrity": "sha512-HTUrgRJ7r4dsZKU6GjmpfRK1O76h97Z8MfS1G0FozR+oF2kG6Vfe8JE6zwrkbxigziPHinCJ+gCPjA9EaBDtRw==",
           "dev": true
         },
         "dom-serializer": {
           "version": "1.4.1",
-          "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-1.4.1.tgz",
+          "resolved": "https://registry.npmmirror.com/dom-serializer/-/dom-serializer-1.4.1.tgz",
           "integrity": "sha512-VHwB3KfrcOOkelEG2ZOfxqLZdfkil8PtJi4P8N2MMXucZq2yLp75ClViUlOVwyoHEDjYU433Aq+5zWP61+RGag==",
           "dev": true,
           "requires": {
@@ -10079,13 +10079,13 @@
         },
         "domelementtype": {
           "version": "2.3.0",
-          "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-2.3.0.tgz",
+          "resolved": "https://registry.npmmirror.com/domelementtype/-/domelementtype-2.3.0.tgz",
           "integrity": "sha512-OLETBj6w0OsagBwdXnPdN0cnMfF9opN69co+7ZrbfPGrdpPVNBUj02spi6B1N7wChLQiPn4CSH/zJvXw56gmHw==",
           "dev": true
         },
         "domutils": {
           "version": "2.8.0",
-          "resolved": "https://registry.npmjs.org/domutils/-/domutils-2.8.0.tgz",
+          "resolved": "https://registry.npmmirror.com/domutils/-/domutils-2.8.0.tgz",
           "integrity": "sha512-w96Cjofp72M5IIhpjgobBimYEfoPjx1Vx0BSX9P30WBdZW2WIKU0T1Bd0kz2eNZ9ikjKgHbEyKx8BB6H1L3h3A==",
           "dev": true,
           "requires": {
@@ -10096,7 +10096,7 @@
         },
         "nth-check": {
           "version": "2.1.1",
-          "resolved": "https://registry.npmjs.org/nth-check/-/nth-check-2.1.1.tgz",
+          "resolved": "https://registry.npmmirror.com/nth-check/-/nth-check-2.1.1.tgz",
           "integrity": "sha512-lqjrjmaOoAnWfMmBPL+XNnynZh2+swxiX3WUE0s4yEHI6m+AwrK2UZOimIRl3X/4QctVqS8AiZjFqyOGrMXb/w==",
           "dev": true,
           "requires": {
@@ -11621,7 +11621,7 @@
     },
     "toposort": {
       "version": "1.0.7",
-      "resolved": "https://registry.npmjs.org/toposort/-/toposort-1.0.7.tgz",
+      "resolved": "https://registry.npmmirror.com/toposort/-/toposort-1.0.7.tgz",
       "integrity": "sha512-FclLrw8b9bMWf4QlCJuHBEVhSRsqDj6u3nIjAzPeJvgl//1hBlffdlk0MALceL14+koWEdU4ofRAXofbODxQzg==",
       "dev": true
     },
@@ -11707,7 +11707,7 @@
     },
     "uglify-js": {
       "version": "3.4.10",
-      "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.4.10.tgz",
+      "resolved": "https://registry.npmmirror.com/uglify-js/-/uglify-js-3.4.10.tgz",
       "integrity": "sha512-Y2VsbPVs0FIshJztycsO2SfPk7/KAF/T72qzv9u5EpQ4kB2hQoHlhNQTsNyy6ul7lQtqJN/AoWeS23OzEiEFxw==",
       "dev": true,
       "requires": {
@@ -11717,13 +11717,13 @@
       "dependencies": {
         "commander": {
           "version": "2.19.0",
-          "resolved": "https://registry.npmjs.org/commander/-/commander-2.19.0.tgz",
+          "resolved": "https://registry.npmmirror.com/commander/-/commander-2.19.0.tgz",
           "integrity": "sha512-6tvAOO+D6OENvRAh524Dh9jcfKTYDQAqvqezbCW82xj5X0pSrcpxtvRKHLG0yBY6SD7PSDrJaj+0AiOcKVd1Xg==",
           "dev": true
         },
         "source-map": {
           "version": "0.6.1",
-          "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
+          "resolved": "https://registry.npmmirror.com/source-map/-/source-map-0.6.1.tgz",
           "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
           "dev": true
         }
@@ -11887,7 +11887,7 @@
     },
     "upper-case": {
       "version": "1.1.3",
-      "resolved": "https://registry.npmjs.org/upper-case/-/upper-case-1.1.3.tgz",
+      "resolved": "https://registry.npmmirror.com/upper-case/-/upper-case-1.1.3.tgz",
       "integrity": "sha512-WRbjgmYzgXkCV7zNVpy5YgrHgbBv126rMALQQMrmzOVC4GM2waQ9x7xtm8VU+1yF2kWyPzI9zbZ48n4vSxwfSA==",
       "dev": true
     },
@@ -12010,7 +12010,7 @@
     },
     "utila": {
       "version": "0.4.0",
-      "resolved": "https://registry.npmjs.org/utila/-/utila-0.4.0.tgz",
+      "resolved": "https://registry.npmmirror.com/utila/-/utila-0.4.0.tgz",
       "integrity": "sha512-Z0DbgELS9/L/75wZbro8xAnT50pBVFQZ+hUEueGDU5FN51YSCYM+jdxsfCiHjwNP/4LCDD0i/graKpeBnOXKRA==",
       "dev": true
     },
@@ -12156,7 +12156,7 @@
     },
     "vue-loader-v16": {
       "version": "npm:vue-loader@16.8.3",
-      "resolved": "https://registry.npmjs.org/vue-loader/-/vue-loader-16.8.3.tgz",
+      "resolved": "https://registry.npmmirror.com/vue-loader/-/vue-loader-16.8.3.tgz",
       "integrity": "sha512-7vKN45IxsKxe5GcVCbc2qFU5aWzyiLrYJyUuMz4BQLKctCj/fmCa0w6fGiiQ2cLFetNcek1ppGJQDCup0c1hpA==",
       "dev": true,
       "optional": true,
@@ -12168,7 +12168,7 @@
       "dependencies": {
         "ansi-styles": {
           "version": "4.3.0",
-          "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
+          "resolved": "https://registry.npmmirror.com/ansi-styles/-/ansi-styles-4.3.0.tgz",
           "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
           "dev": true,
           "optional": true,
@@ -12178,7 +12178,7 @@
         },
         "chalk": {
           "version": "4.1.2",
-          "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
+          "resolved": "https://registry.npmmirror.com/chalk/-/chalk-4.1.2.tgz",
           "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
           "dev": true,
           "optional": true,
@@ -12189,7 +12189,7 @@
         },
         "color-convert": {
           "version": "2.0.1",
-          "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
+          "resolved": "https://registry.npmmirror.com/color-convert/-/color-convert-2.0.1.tgz",
           "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
           "dev": true,
           "optional": true,
@@ -12199,21 +12199,21 @@
         },
         "color-name": {
           "version": "1.1.4",
-          "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
+          "resolved": "https://registry.npmmirror.com/color-name/-/color-name-1.1.4.tgz",
           "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
           "dev": true,
           "optional": true
         },
         "has-flag": {
           "version": "4.0.0",
-          "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
+          "resolved": "https://registry.npmmirror.com/has-flag/-/has-flag-4.0.0.tgz",
           "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
           "dev": true,
           "optional": true
         },
         "supports-color": {
           "version": "7.2.0",
-          "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
+          "resolved": "https://registry.npmmirror.com/supports-color/-/supports-color-7.2.0.tgz",
           "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
           "dev": true,
           "optional": true,

+ 2 - 2
src/router/index.js

@@ -74,7 +74,7 @@ const routes = [
       },
       {
         path: '/waybillTable',
-        
+
         component: () => import('@/views/securityCheck/views/waybillTable'),
         meta: {
           title: '运单管理'
@@ -85,7 +85,7 @@ const routes = [
 ]
 
 const router = new VueRouter({
-  mode: 'history',
+  mode: 'hash',
   base: process.env.BASE_URL,
   routes
 })

+ 52 - 36
src/views/securityCheck/views/agentHome.vue

@@ -380,8 +380,9 @@ export default {
         });
         this.dataall.data.forEach((element) => {
           element.proportion = element.value / counts;
-          element.proportion =
-            Math.floor(element.proportion.toFixed(2) * 100) + "%";
+          element.proportion = Math.floor(element.proportion.toFixed(2) * 100)
+            ? Math.floor(element.proportion.toFixed(2) * 100) + "%"
+            : "0%";
         });
         result.data.forEach((res) => {
           if (res.risk == "低风险") {
@@ -444,8 +445,11 @@ export default {
             this.dataLow.color = ["#FAD153", "#DC5594", "#6161BD"];
             this.dataLow.num = res.num;
             this.dataLow.kxsNum = res.kxsNum;
-            this.dataLow.proportion =
-              Math.floor((res.kxsNum / res.num).toFixed(2) * 100) + "%";
+            this.dataLow.proportion = Math.floor(
+              (res.kxsNum / res.num).toFixed(2) * 100
+            )
+              ? Math.floor((res.kxsNum / res.num).toFixed(2) * 100) + "%"
+              : " 0%";
             this.dataLow.cont = arr;
           } else if (res.risk == "优先") {
             let arr = res.yjNum + res.jyNum + res.fxNum;
@@ -455,7 +459,7 @@ export default {
                   name: "移交",
                   value: res.yjNum,
                   prot:
-                    arr == 0
+                    arr == 0 || arr
                       ? "0%"
                       : Math.floor((res.yjNum / arr).toFixed(2) * 100) + "%",
                 },
@@ -463,7 +467,7 @@ export default {
                   name: "拒运",
                   value: res.jyNum,
                   prot:
-                    arr == 0
+                    arr == 0 || arr
                       ? "0%"
                       : Math.floor((res.jyNum / arr).toFixed(2) * 100) + "%",
                 },
@@ -471,7 +475,7 @@ export default {
                   name: "放行",
                   value: res.fxNum,
                   prot:
-                    arr == 0
+                    arr == 0 || arr
                       ? "0%"
                       : Math.floor((res.fxNum / arr).toFixed(2) * 100) + "%",
                 },
@@ -482,7 +486,7 @@ export default {
                   name: "移交",
                   value: 0,
                   prot:
-                    arr == 0
+                    arr == 0 || arr
                       ? "0%"
                       : Math.floor((res.yjNum / arr).toFixed(2) * 100) + "%",
                 },
@@ -490,7 +494,7 @@ export default {
                   name: "拒运",
                   value: 0,
                   prot:
-                    arr == 0
+                    arr == 0 || arr
                       ? "0%"
                       : Math.floor((res.jyNum / arr).toFixed(2) * 100) + "%",
                 },
@@ -498,7 +502,7 @@ export default {
                   name: "放行",
                   value: 0,
                   prot:
-                    arr == 0
+                    arr == 0 || arr
                       ? "0%"
                       : Math.floor((res.fxNum / arr).toFixed(2) * 100) + "%",
                 },
@@ -507,8 +511,11 @@ export default {
             this.dataLowcp.color = ["#FAD153", "#DC5594", "#6161BD"];
             this.dataLowcp.num = res.num;
             this.dataLowcp.kxsNum = res.kxsNum;
-            this.dataLowcp.proportion =
-              Math.floor((res.kxsNum / res.num).toFixed(2) * 100) + "%";
+            this.dataLowcp.proportion = Math.floor(
+              (res.kxsNum / res.num).toFixed(2) * 100
+            )
+              ? Math.floor((res.kxsNum / res.num).toFixed(2) * 100) + "%"
+              : "o%";
             this.dataLowcp.cont = arr;
           } else if (res.risk == "普通") {
             let arr = res.yjNum + res.jyNum + res.fxNum;
@@ -518,7 +525,7 @@ export default {
                   name: "移交",
                   value: res.yjNum,
                   prot:
-                    arr == 0
+                    arr == 0 || arr
                       ? "0%"
                       : Math.floor((res.yjNum / arr).toFixed(2) * 100) + "%",
                 },
@@ -526,7 +533,7 @@ export default {
                   name: "拒运",
                   value: res.jyNum,
                   prot:
-                    arr == 0
+                    arr == 0 || arr
                       ? "0%"
                       : Math.floor((res.jyNum / arr).toFixed(2) * 100) + "%",
                 },
@@ -534,7 +541,7 @@ export default {
                   name: "放行",
                   value: res.fxNum,
                   prot:
-                    arr == 0
+                    arr == 0 || arr
                       ? "0%"
                       : Math.floor((res.fxNum / arr).toFixed(2) * 100) + "%",
                 },
@@ -545,7 +552,7 @@ export default {
                   name: "移交",
                   value: 0,
                   prot:
-                    arr == 0
+                    arr == 0 || arr
                       ? "0%"
                       : Math.floor((res.yjNum / arr).toFixed(2) * 100) + "%",
                 },
@@ -553,7 +560,7 @@ export default {
                   name: "拒运",
                   value: 0,
                   prot:
-                    arr == 0
+                    arr == 0 || arr
                       ? "0%"
                       : Math.floor((res.jyNum / arr).toFixed(2) * 100) + "%",
                 },
@@ -561,7 +568,7 @@ export default {
                   name: "放行",
                   value: 0,
                   prot:
-                    arr == 0
+                    arr == 0 || arr
                       ? "0%"
                       : Math.floor((res.fxNum / arr).toFixed(2) * 100) + "%",
                 },
@@ -570,8 +577,11 @@ export default {
             this.dataLowpt.color = ["#FAD153", "#DC5594", "#6161BD"];
             this.dataLowpt.num = res.num;
             this.dataLowpt.kxsNum = res.kxsNum;
-            this.dataLowpt.proportion =
-              Math.floor((res.kxsNum / res.num).toFixed(2) * 100) + "%";
+            this.dataLowpt.proportion = Math.floor(
+              (res.kxsNum / res.num).toFixed(2) * 100
+            )
+              ? Math.floor((res.kxsNum / res.num).toFixed(2) * 100) + "%"
+              : "0%";
             this.dataLowpt.cont = arr;
           } else if (res.risk == "严控") {
             let arr = res.yjNum + res.jyNum + res.fxNum;
@@ -581,7 +591,7 @@ export default {
                   name: "移交",
                   value: res.yjNum,
                   prot:
-                    arr == 0
+                    arr == 0 || arr
                       ? "0%"
                       : Math.floor((res.yjNum / arr).toFixed(2) * 100) + "%",
                 },
@@ -589,7 +599,7 @@ export default {
                   name: "拒运",
                   value: res.jyNum,
                   prot:
-                    arr == 0
+                    arr == 0 || arr
                       ? "0%"
                       : Math.floor((res.jyNum / arr).toFixed(2) * 100) + "%",
                 },
@@ -597,7 +607,7 @@ export default {
                   name: "放行",
                   value: res.fxNum,
                   prot:
-                    arr == 0
+                    arr == 0 || arr
                       ? "0%"
                       : Math.floor((res.fxNum / arr).toFixed(2) * 100) + "%",
                 },
@@ -608,7 +618,7 @@ export default {
                   name: "移交",
                   value: 0,
                   prot:
-                    arr == 0
+                    arr == 0 || arr
                       ? "0%"
                       : Math.floor((res.yjNum / arr).toFixed(2) * 100) + "%",
                 },
@@ -616,7 +626,7 @@ export default {
                   name: "拒运",
                   value: 0,
                   prot:
-                    arr == 0
+                    arr == 0 || arr
                       ? "0%"
                       : Math.floor((res.jyNum / arr).toFixed(2) * 100) + "%",
                 },
@@ -624,7 +634,7 @@ export default {
                   name: "放行",
                   value: 0,
                   prot:
-                    arr == 0
+                    arr == 0 || arr
                       ? "0%"
                       : Math.floor((res.fxNum / arr).toFixed(2) * 100) + "%",
                 },
@@ -633,8 +643,11 @@ export default {
             this.dataLowyk.color = ["#FAD153", "#DC5594", "#6161BD"];
             this.dataLowyk.num = res.num;
             this.dataLowyk.kxsNum = res.kxsNum;
-            this.dataLowyk.proportion =
-              Math.floor((res.kxsNum / res.num).toFixed(2) * 100) + "%";
+            this.dataLowyk.proportion = Math.floor(
+              (res.kxsNum / res.num).toFixed(2) * 100
+            )
+              ? Math.floor((res.kxsNum / res.num).toFixed(2) * 100) + "%"
+              : "0%";
             this.dataLowyk.cont = arr;
           } else if (res.risk == "高风险") {
             let arr = res.yjNum + res.jyNum + res.fxNum;
@@ -644,7 +657,7 @@ export default {
                   name: "移交",
                   value: res.yjNum,
                   prot:
-                    arr == 0
+                    arr == 0 || arr
                       ? "0%"
                       : Math.floor((res.yjNum / arr).toFixed(2) * 100) + "%",
                 },
@@ -652,7 +665,7 @@ export default {
                   name: "拒运",
                   value: res.jyNum,
                   prot:
-                    arr == 0
+                    arr == 0 || arr
                       ? "0%"
                       : Math.floor((res.jyNum / arr).toFixed(2) * 100) + "%",
                 },
@@ -660,7 +673,7 @@ export default {
                   name: "放行",
                   value: res.fxNum,
                   prot:
-                    arr == 0
+                    arr == 0 || arr
                       ? "0%"
                       : Math.floor((res.fxNum / arr).toFixed(2) * 100) + "%",
                 },
@@ -671,7 +684,7 @@ export default {
                   name: "移交",
                   value: 0,
                   prot:
-                    arr == 0
+                    arr == 0 || arr
                       ? "0%"
                       : Math.floor((res.yjNum / arr).toFixed(2) * 100) + "%",
                 },
@@ -679,7 +692,7 @@ export default {
                   name: "拒运",
                   value: 0,
                   prot:
-                    arr == 0
+                    arr == 0 || arr
                       ? "0%"
                       : Math.floor((res.jyNum / arr).toFixed(2) * 100) + "%",
                 },
@@ -687,7 +700,7 @@ export default {
                   name: "放行",
                   value: 0,
                   prot:
-                    arr == 0
+                    arr == 0 || arr
                       ? "0%"
                       : Math.floor((res.fxNum / arr).toFixed(2) * 100) + "%",
                 },
@@ -696,8 +709,11 @@ export default {
             this.dataLowgf.color = ["#FAD153", "#DC5594", "#6161BD"];
             this.dataLowgf.num = res.num;
             this.dataLowgf.kxsNum = res.kxsNum;
-            this.dataLowgf.proportion =
-              Math.floor((res.kxsNum / res.num).toFixed(2) * 100) + "%";
+            this.dataLowgf.proportion = Math.floor(
+              (res.kxsNum / res.num).toFixed(2) * 100
+            )
+              ? Math.floor((res.kxsNum / res.num).toFixed(2) * 100) + "%"
+              : "0%";
             this.dataLowgf.cont = arr;
           }
         });

+ 30 - 14
src/views/securityCheck/views/cargoStatisticsHome.vue

@@ -575,7 +575,8 @@ export default {
           this.dataall.color.push(element.color);
         });
         this.dataall.data.forEach((element) => {
-          element.proportion = element.value / counts;
+          element.proportion =
+            element.value / counts ? element.value / counts : 0;
           element.proportion =
             Math.floor(element.proportion.toFixed(2) * 100) + "%";
         });
@@ -588,7 +589,7 @@ export default {
                   name: "移交",
                   value: res.yjNum,
                   prot:
-                    arr == 0
+                    arr == 0 || arr
                       ? "0%"
                       : Math.floor((res.yjNum / arr.toFixed(2)) * 100) + "%",
                 },
@@ -596,7 +597,7 @@ export default {
                   name: "拒运",
                   value: res.jyNum,
                   prot:
-                    arr == 0
+                    arr == 0 || arr
                       ? "0%"
                       : Math.floor((res.jyNum / arr.toFixed(2)) * 100) + "%",
                 },
@@ -604,7 +605,7 @@ export default {
                   name: "放行",
                   value: res.fxNum,
                   prot:
-                    arr == 0
+                    arr == 0 || arr
                       ? "0%"
                       : Math.floor((res.fxNum / arr.toFixed(2)) * 100) + "%",
                 },
@@ -640,8 +641,11 @@ export default {
             this.dataLow.color = ["#FAD153", "#DC5594", "#6161BD"];
             this.dataLow.num = res.num;
             this.dataLow.kxsNum = res.kxsNum;
-            this.dataLow.proportion =
-              Math.floor((res.kxsNum / res.num).toFixed(2) * 100) + "%";
+            this.dataLow.proportion = Math.floor(
+              (res.kxsNum / res.num).toFixed(2) * 100
+            )
+              ? Math.floor((res.kxsNum / res.num).toFixed(2) * 100) + "%"
+              : "0%";
             this.dataLow.cont = arr;
           } else if (res.risk == "优先") {
             let arr = res.yjNum + res.jyNum + res.fxNum;
@@ -703,8 +707,11 @@ export default {
             this.dataLowcp.color = ["#FAD153", "#DC5594", "#6161BD"];
             this.dataLowcp.num = res.num;
             this.dataLowcp.kxsNum = res.kxsNum;
-            this.dataLowcp.proportion =
-              Math.floor((res.kxsNum / res.num).toFixed(2) * 100) + "%";
+            this.dataLowcp.proportion = Math.floor(
+              (res.kxsNum / res.num).toFixed(2) * 100
+            )
+              ? Math.floor((res.kxsNum / res.num).toFixed(2) * 100) + "%"
+              : "0%";
             this.dataLowcp.cont = arr;
           } else if (res.risk == "普通") {
             let arr = res.yjNum + res.jyNum + res.fxNum;
@@ -766,8 +773,11 @@ export default {
             this.dataLowpt.color = ["#FAD153", "#DC5594", "#6161BD"];
             this.dataLowpt.num = res.num;
             this.dataLowpt.kxsNum = res.kxsNum;
-            this.dataLowpt.proportion =
-              Math.floor((res.kxsNum / res.num).toFixed(2) * 100) + "%";
+            this.dataLowpt.proportion = Math.floor(
+              (res.kxsNum / res.num).toFixed(2) * 100
+            )
+              ? Math.floor((res.kxsNum / res.num).toFixed(2) * 100) + "%"
+              : "0%";
             this.dataLowpt.cont = arr;
           } else if (res.risk == "严控") {
             let arr = res.yjNum + res.jyNum + res.fxNum;
@@ -829,8 +839,11 @@ export default {
             this.dataLowyk.color = ["#FAD153", "#DC5594", "#6161BD"];
             this.dataLowyk.num = res.num;
             this.dataLowyk.kxsNum = res.kxsNum;
-            this.dataLowyk.proportion =
-              Math.floor((res.kxsNum / res.num).toFixed(2) * 100) + "%";
+            this.dataLowyk.proportion = Math.floor(
+              (res.kxsNum / res.num).toFixed(2) * 100
+            )
+              ? Math.floor((res.kxsNum / res.num).toFixed(2) * 100) + "%"
+              : "0%";
             this.dataLowyk.cont = arr;
           } else if (res.risk == "高风险") {
             let arr = res.yjNum + res.jyNum + res.fxNum;
@@ -892,8 +905,11 @@ export default {
             this.dataLowgf.color = ["#FAD153", "#DC5594", "#6161BD"];
             this.dataLowgf.num = res.num;
             this.dataLowgf.kxsNum = res.kxsNum;
-            this.dataLowgf.proportion =
-              Math.floor((res.kxsNum / res.num).toFixed(2) * 100) + "%";
+            this.dataLowgf.proportion = Math.floor(
+              (res.kxsNum / res.num).toFixed(2) * 100
+            )
+              ? Math.floor((res.kxsNum / res.num).toFixed(2) * 100) + "%"
+              : "0%";
             this.dataLowgf.cont = arr;
           }
         });