chenrui  2 years ago
parent
commit
440ef85845

+ 3 - 63
src/views/statisticalanalysis/components/echart/tableforms.vue

@@ -78,7 +78,7 @@
           </el-table-column>
         </el-table>
       </template>
-      <template v-if="tableList.length && action == 2 && set == 1">
+      <template v-if="tableList.length && action == 2">
         <el-table
           :data="tableList"
           style="width: 100%"
@@ -112,36 +112,6 @@
             label="单"
           >
           </el-table-column>
-        </el-table>
-      </template>
-      <template v-if="tableList.length && action == 2 && set == 2">
-        <el-table
-          :data="tableList"
-          style="width: 100%"
-          :row-style="rowStyle"
-          :style="dataTableContentStyle"
-          height="calc(100vh - 220px)"
-          max-height="calc(100vh - 220px)"
-          :stripe="tableProps.stripe"
-          :border="tableProps.border"
-          :row-key="tableProps.rowKey"
-          :highlight-current-row="tableProps.highlightCurrentRow"
-          :header-cell-class-name="tableProps.headerCellClassName"
-          :tooltip-effect="tableProps.tooltipEffect"
-          :show-summary="tableProps.showSummary"
-        >
-          <el-table-column
-            prop="indexs"
-            label="序号"
-            :show-overflow-tooltip="tableColumnProperty.showOverflowTooltip"
-          >
-          </el-table-column>
-          <el-table-column
-            prop="dat"
-            label="时间"
-            :show-overflow-tooltip="tableColumnProperty.showOverflowTooltip"
-          >
-          </el-table-column>
           <el-table-column
             :show-overflow-tooltip="tableColumnProperty.showOverflowTooltip"
             prop="weight"
@@ -186,7 +156,7 @@
           </el-table-column>
         </el-table>
       </template>
-      <template v-if="tableList.length && action == 4 && set == 1">
+      <template v-if="tableList.length && action == 4">
         <el-table
           :data="tableList"
           style="width: 100%"
@@ -217,37 +187,7 @@
           <el-table-column
             :show-overflow-tooltip="tableColumnProperty.showOverflowTooltip"
             prop="pullFlightNum"
-            label="单"
-          >
-          </el-table-column>
-        </el-table>
-      </template>
-      <template v-if="tableList.length && action == 4 && set == 2">
-        <el-table
-          :data="tableList"
-          style="width: 100%"
-          :row-style="rowStyle"
-          :style="dataTableContentStyle"
-          height="calc(100vh - 220px)"
-          max-height="calc(100vh - 220px)"
-          :stripe="tableProps.stripe"
-          :border="tableProps.border"
-          :row-key="tableProps.rowKey"
-          :highlight-current-row="tableProps.highlightCurrentRow"
-          :header-cell-class-name="tableProps.headerCellClassName"
-          :tooltip-effect="tableProps.tooltipEffect"
-          :show-summary="tableProps.showSummary"
-        >
-          <el-table-column
-            prop="indexs"
-            label="序号"
-            :show-overflow-tooltip="tableColumnProperty.showOverflowTooltip"
-          >
-          </el-table-column>
-          <el-table-column
-            prop="dat"
-            label="时间"
-            :show-overflow-tooltip="tableColumnProperty.showOverflowTooltip"
+            label="班"
           >
           </el-table-column>
           <el-table-column

+ 93 - 51
src/views/statisticalanalysis/specialgoods/index.vue

@@ -425,11 +425,16 @@ export default {
           data.dateTime[0] +
           "--" +
           data.dateTime[1];
-        if (data.set == 1) {
-          this.listHeader = ["序号", "时间", "单", "环比(%)"];
-        } else if (data.set == 2) {
-          this.listHeader = ["序号", "时间", "重量", "环比(%)"];
-        }
+        // if (this.picShow == true) {
+        //   if (data.set == 1) {
+        //     this.listHeader = ["序号", "时间", "单", "环比(%)"];
+        //   } else if (data.set == 2) {
+        //     this.listHeader = ["序号", "时间", "重量", "环比(%)"];
+        //   }
+        // } else {
+        //   this.listHeader = ["序号", "时间", "单", "重量", "环比(%)"];
+        // }
+        this.listHeader = ["序号", "时间", "单", "重量", "环比(%)"];
       } else if (this.action === 3) {
         this.listname =
           "货量统计" +
@@ -449,11 +454,23 @@ export default {
           data.dateTime[0] +
           "--" +
           data.dateTime[1];
-        if (data.set == 1) {
-          this.listHeader = ["序号", "时间", "班", "环比(%)"];
-        } else if (data.set == 2) {
-          this.listHeader = ["序号", "时间", "重量", "环比(%)"];
-        }
+        // if (this.picShow == true) {
+        //   if (data.set == 1) {
+        //     this.listHeader = ["序号", "时间", "班", "环比(%)"];
+        //   } else if (data.set == 2) {
+        //     this.listHeader = ["序号", "时间", "重量", "环比(%)"];
+        //   }
+        // } else {
+        //   this.listHeader = [
+        //     "序号",
+        //     "时间",
+        //     "班",
+        //     "环比(%)",
+        //     "重量",
+        //     "环比(%)",
+        //   ];
+        // }
+        this.listHeader = ["序号", "时间", "班", "环比(%)", "重量", "环比(%)"];
       }
     },
     //获取表格数据
@@ -485,38 +502,37 @@ export default {
             };
             this.tableListcop.push(objar);
           } else if (this.action === 2) {
-            if (dat == 1) {
-              let objar = {
-                indexs: "合计",
-                flightNum: returnData.listValues[0].totalFlightNum,
-              };
-              this.tableListcop.push(objar);
-            } else if (dat == 2) {
-              let objar = {
-                indexs: "合计",
-                weight: returnData.listValues[0].totalWeight,
-              };
-              this.tableListcop.push(objar);
-            }
+            let objar = {
+              indexs: "合计",
+              flightNum: returnData.listValues[0].totalFlightNum,
+              weight: returnData.listValues[0].totalWeight,
+            };
+            this.tableListcop.push(objar);
           } else if (this.action === 3) {
             let objar = {
               indexs: "合计",
               weight: returnData.listValues[0].totalWeight,
             };
           } else if (this.action === 4) {
-            if (dat == 1) {
-              let objar = {
-                indexs: "合计",
-                pullFlightNum: returnData.listValues[0].totalPullFlightNum,
-              };
-              this.tableListcop.push(objar);
-            } else if (dat == 2) {
-              let objar = {
-                indexs: "合计",
-                pullWeight: returnData.listValues[0].totalPullWeight,
-              };
-              this.tableListcop.push(objar);
-            }
+            // if (dat == 1) {
+            //   let objar = {
+            //     indexs: "合计",
+            //     pullFlightNum: returnData.listValues[0].totalPullFlightNum,
+            //   };
+            //   this.tableListcop.push(objar);
+            // } else if (dat == 2) {
+            //   let objar = {
+            //     indexs: "合计",
+            //     pullWeight: returnData.listValues[0].totalPullWeight,
+            //   };
+            //   this.tableListcop.push(objar);
+            // }
+            let objar = {
+              indexs: "合计",
+              pullFlightNum: returnData.listValues[0].totalPullFlightNum,
+              pullWeight: returnData.listValues[0].totalPullWeight,
+            };
+            this.tableListcop.push(objar);
           }
           returnData.listValues.forEach((element) => {
             if (this.action === 0) {
@@ -605,24 +621,50 @@ export default {
           } else if (this.action === 1) {
             return [item.indexs, item.dat, item.flightNum, item.weightChain];
           } else if (this.action === 2) {
-            if (this.set == 1) {
-              return [item.indexs, item.dat, item.flightNum, item.weightChain];
-            } else if (this.set == 2) {
-              return [item.indexs, item.dat, item.weight, item.weightChain];
-            }
+            return [
+              item.indexs,
+              item.dat,
+              item.flightNum,
+              item.weight,
+              item.weightChain,
+            ];
           } else if (this.action === 3) {
             return [item.indexs, item.fdt, item.weight, item.weightChain];
           } else if (this.action === 4) {
-            if (this.set == 1) {
-              return [
-                item.indexs,
-                item.dat,
-                item.pullFlightNum,
-                item.flightChain,
-              ];
-            } else if (this.set == 2) {
-              return [item.indexs, item.dat, item.pullWeight, item.weightChain];
-            }
+            // if (this.picShow == true) {
+            //   if (this.set == 1) {
+            //     return [
+            //       item.indexs,
+            //       item.dat,
+            //       item.pullFlightNum,
+            //       item.flightChain,
+            //     ];
+            //   } else if (this.set == 2) {
+            //     return [
+            //       item.indexs,
+            //       item.dat,
+            //       item.pullWeight,
+            //       item.weightChain,
+            //     ];
+            //   }
+            // } else {
+            //   return [
+            //     item.indexs,
+            //     item.dat,
+            //     item.pullFlightNum,
+            //     item.flightChain,
+            //     item.pullWeight,
+            //     item.weightChain,
+            //   ];
+            // }
+            return [
+              item.indexs,
+              item.dat,
+              item.pullFlightNum,
+              item.flightChain,
+              item.pullWeight,
+              item.weightChain,
+            ];
           }
         });
         data[data.length - 1].indexs = "总计";