Browse Source

龙门架统计

chenrui  2 năm trước cách đây
mục cha
commit
f7383c2f49

+ 30 - 8
src/views/statisticalanalysis/components/echart/tableforms.vue

@@ -1011,25 +1011,25 @@
           >
           </el-table-column>
           <el-table-column
-            prop="piclv"
+            prop="piclvs"
             label="绑图前重码率"
             :show-overflow-tooltip="tableColumnProperty.showOverflowTooltip"
           >
           </el-table-column>
           <el-table-column
-            prop="acclv"
+            prop="acclvs"
             label="加货重码率"
             :show-overflow-tooltip="tableColumnProperty.showOverflowTooltip"
           >
           </el-table-column>
           <el-table-column
-            prop="readlv"
+            prop="readlvs"
             label="识读率"
             :show-overflow-tooltip="tableColumnProperty.showOverflowTooltip"
           >
           </el-table-column>
           <el-table-column
-            prop="oklv"
+            prop="oklvs"
             label="加货准确率"
             :show-overflow-tooltip="tableColumnProperty.showOverflowTooltip"
           >
@@ -1103,25 +1103,25 @@
           >
           </el-table-column>
           <el-table-column
-            prop="piclv"
+            prop="piclvs"
             label="绑图前重码率"
             :show-overflow-tooltip="tableColumnProperty.showOverflowTooltip"
           >
           </el-table-column>
           <el-table-column
-            prop="acclv"
+            prop="acclvs"
             label="加货重码率"
             :show-overflow-tooltip="tableColumnProperty.showOverflowTooltip"
           >
           </el-table-column>
           <el-table-column
-            prop="readlv"
+            prop="readlvs"
             label="识读率"
             :show-overflow-tooltip="tableColumnProperty.showOverflowTooltip"
           >
           </el-table-column>
           <el-table-column
-            prop="oklv"
+            prop="oklvs"
             label="加货准确率"
             :show-overflow-tooltip="tableColumnProperty.showOverflowTooltip"
           >
@@ -1139,6 +1139,10 @@ export default {
       type: Array,
       default: () => [],
     },
+    listall: {
+      type: Object,
+      default: () => ({}),
+    },
     action: {
       type: Number,
       default: 0,
@@ -1226,6 +1230,24 @@ export default {
           }, 0);
           sums[index];
         }
+        if (
+          column.property == "piclvs" ||
+          column.property == "acclvs" ||
+          column.property == "readlvs" ||
+          column.property == "oklvs"
+        ) {
+          if (this.action === 12) {
+            sums[7] = this.listall.piclvall;
+            sums[8] = this.listall.acclvall;
+            sums[9] = this.listall.readlvall;
+            sums[10] = this.listall.oklvall;
+          } else if (this.action === 13) {
+            sums[8] = this.listall.piclvall;
+            sums[9] = this.listall.acclvall;
+            sums[10] = this.listall.readlvall;
+            sums[11] = this.listall.oklvall;
+          }
+        }
       });
       return sums;
     },

+ 69 - 1
src/views/statisticalanalysis/gantryframe/index.vue

@@ -18,7 +18,12 @@
       />
     </div>
     <div class="echart">
-      <Tableformbrs :tableList="tableList" :action="changing" :set="set" />
+      <Tableformbrs
+        :tableList="tableList"
+        :action="changing"
+        :set="set"
+        :listall="listall"
+      />
     </div>
   </div>
 </template>
@@ -86,6 +91,17 @@ export default {
           options: [],
         },
       ],
+      listall: {
+        piclvall: 0,
+        acclvall: 0,
+        readlvall: 0,
+        oklvall: 0,
+        reCodeNumall: 0,
+        codeNumall: 0,
+        reAccNumall: 0,
+        accNumall: 0,
+        pcsall: 0,
+      },
     };
   },
   mounted() {
@@ -162,8 +178,60 @@ export default {
           this.tableList = JSON.parse(JSON.stringify(returnData.listValues));
           this.tableListcop = JSON.parse(JSON.stringify(returnData.listValues));
           this.tableList.forEach((item, index) => {
+            item.reCodeNum = item.reCodeNum ? item.reCodeNum : 0;
+            item.codeNum = item.codeNum ? item.codeNum : 0;
+            item.reAccNum = item.reAccNum ? item.reAccNum : 0;
+            item.accNum = item.accNum ? item.accNum : 0;
+            item.pcs = item.pcs ? item.pcs : 0;
+            item.piclvs = (item.reCodeNum / item.codeNum).toFixed(2);
+            item.acclvs = (item.reAccNum / item.accNum).toFixed(2);
+            item.readlvs = (item.codeNum / item.pcs).toFixed(2);
+            item.oklvs = (item.reAccNum / item.pcs).toFixed(2);
+            if (isNaN(item.piclvs)) {
+              item.piclvs = "0%";
+            } else {
+              item.piclvs = item.piclvs + "%";
+            }
+            if (isNaN(item.acclvs)) {
+              item.acclvs = "0%";
+            } else {
+              item.acclvs = item.acclvs + "%";
+            }
+            if (isNaN(item.readlvs)) {
+              item.readlvs = "0%";
+            } else {
+              item.readlvs = item.readlvs + "%";
+            }
+            if (isNaN(item.oklvs)) {
+              item.oklvs = "0%";
+            } else {
+              item.oklvs = item.oklvs + "%";
+            }
             item.indexs = index + 1;
           });
+          for (let i = 0; i < returnData.listValues.length; i++) {
+            this.listall.reCodeNumall =
+              this.listall.reCodeNumall + returnData.listValues[i].reCodeNum;
+            this.listall.codeNumall =
+              this.listall.codeNumall + returnData.listValues[i].codeNum;
+            this.listall.reAccNumall =
+              this.listall.reAccNumall + returnData.listValues[i].reAccNum;
+            this.listall.accNumall =
+              this.listall.accNumall + returnData.listValues[i].accNum;
+            this.listall.pcsall =
+              this.listall.pcsall + returnData.listValues[i].pcs;
+          }
+          this.listall.piclvall =
+            (this.listall.reCodeNumall / this.listall.codeNumall).toFixed(2) +
+            "%";
+          this.listall.acclvall =
+            (this.listall.reAccNumall / this.listall.accNumall).toFixed(2) +
+            "%";
+          this.listall.readlvall =
+            (this.listall.codeNumall / this.listall.pcsall).toFixed(2) + "%";
+          this.listall.oklvall =
+            (this.listall.reAccNumall / this.listall.pcsall).toFixed(2) + "%";
+          console.log(this.listall, "111111");
           this.tableListcop.forEach((item, index) => {
             item.indexs = index + 1;
           });