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

+ 2 - 0
public/config.js

@@ -293,6 +293,8 @@ var DATACONTENT_ID = {
   modeLoadingweight: 1803624, //加货重量统计
   modeSpecialgoods: 1803625, //特货统计
   modeCargostatistics: 1803626, //货量统计
+  modeCargostatistics: 1803626, //货量统计
+  modePullgoods: 1803628, //拉货统计
 };
 
 var SERVICE_ID = {

BIN
src/assets/nav/ic_chart_check.png


BIN
src/assets/nav/ic_chart_default.png


BIN
src/assets/nav/ic_table_check.png


BIN
src/assets/nav/ic_table_default.png


+ 1 - 0
src/views/statisticalanalysis/components/echart/index.vue

@@ -53,6 +53,7 @@ export default {
       handler(newVal) {
         const chartDom = document.getElementById(this.id);
         // 先移除之前的实例,保证重绘的流畅性
+        console.log(newVal, "11111");
         chartDom.removeAttribute("_echarts_instance_");
         this.myChart = markRaw(echarts.init(chartDom));
         collectionStatistics.xAxis.data = newVal.time;

+ 54 - 0
src/views/statisticalanalysis/components/echart/statisticsHeader.vue

@@ -2,6 +2,10 @@
   <div class="flight-statistics-header">
     <template v-if="title">
       <div class="title">{{ title }}</div>
+      <div class="status">
+        <div :class="picShow ? 'st_pic' : 'st_pics'" @click="picup"></div>
+        <div :class="!picShow ? 'st_tab' : 'st_tabs'" @click="picups"></div>
+      </div>
     </template>
     <el-form ref="form" class="form" :model="formData">
       <el-form-item
@@ -139,6 +143,7 @@ export default {
   },
   data() {
     return {
+      picShow: true,
       formData: {
         range: "",
         inOrOut: "",
@@ -358,6 +363,14 @@ export default {
     });
   },
   methods: {
+    picup() {
+      this.picShow = false;
+      this.$emit("upset", this.picShow);
+    },
+    picups() {
+      this.picShow = true;
+      this.$emit("upset", this.picShow);
+    },
     call(func, ...args) {
       func.call(this, ...args);
     },
@@ -465,6 +478,47 @@ export default {
   display: flex;
   justify-content: space-between;
   align-items: flex-start;
+  position: relative;
+  .status {
+    position: absolute;
+    left: 144px;
+    display: flex;
+    align-items: center;
+    > .st_pic {
+      width: 32px;
+      height: 32px;
+      border-radius: 4px;
+      background: url("../../../../assets/nav/ic_table_default.png") no-repeat;
+      background-size: 100% 100%;
+      margin-right: 8px;
+      cursor: pointer;
+    }
+    > .st_pics {
+      width: 32px;
+      height: 32px;
+      border-radius: 4px;
+      background: url("../../../../assets/nav/ic_table_check.png") no-repeat;
+      background-size: 100% 100%;
+      margin-right: 8px;
+      cursor: pointer;
+    }
+    > .st_tab {
+      width: 32px;
+      height: 32px;
+      border-radius: 4px;
+      background: url("../../../../assets/nav/ic_chart_default.png") no-repeat;
+      background-size: 100% 100%;
+      cursor: pointer;
+    }
+    > .st_tabs {
+      width: 32px;
+      height: 32px;
+      border-radius: 4px;
+      background: url("../../../../assets/nav/ic_chart_check.png") no-repeat;
+      background-size: 100% 100%;
+      cursor: pointer;
+    }
+  }
   .title {
     margin-right: 24px;
     padding-left: 16px;

+ 457 - 0
src/views/statisticalanalysis/components/echart/tableforms.vue

@@ -0,0 +1,457 @@
+<template>
+  <div class="data-table">
+    <div
+      element-loading-text="拼命加载中"
+      element-loading-spinner="el-icon-loading"
+      element-loading-background="rgba(0, 0, 0, 0.8)"
+      class="data-table-content"
+    >
+      <template v-if="tableList.length && action == 0">
+        <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"
+            label="重量"
+          >
+          </el-table-column>
+        </el-table>
+      </template>
+      <template v-if="tableList.length && action == 1">
+        <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="flightNum"
+            label="重量"
+          >
+          </el-table-column>
+        </el-table>
+      </template>
+      <template v-if="tableList.length && action == 2 && set == 1">
+        <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="flightNum"
+            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"
+            label="重量"
+          >
+          </el-table-column>
+        </el-table>
+      </template>
+      <template v-if="tableList.length && action == 3">
+        <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="fdt"
+            label="时间"
+            :show-overflow-tooltip="tableColumnProperty.showOverflowTooltip"
+          >
+          </el-table-column>
+          <el-table-column
+            :show-overflow-tooltip="tableColumnProperty.showOverflowTooltip"
+            prop="weight"
+            label="重量"
+          >
+          </el-table-column>
+        </el-table>
+      </template>
+      <template v-if="tableList.length && action == 4 && set == 1">
+        <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="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"
+          >
+          </el-table-column>
+          <el-table-column
+            :show-overflow-tooltip="tableColumnProperty.showOverflowTooltip"
+            prop="pullWeight"
+            label="重量"
+          >
+          </el-table-column>
+        </el-table>
+      </template>
+    </div>
+  </div>
+</template>
+
+<script>
+export default {
+  props: {
+    tableList: {
+      type: Array,
+      default: () => [],
+    },
+    action: {
+      type: Number,
+      default: 0,
+    },
+    set: {
+      type: Number,
+      default: "",
+    },
+  },
+  data() {
+    return {
+      loading: false,
+      rowStyle: {
+        height: "50px",
+        fontSize: "14px",
+        color: "#101116",
+      },
+      tableProps: {
+        height: "100%",
+        maxHeight: "100%",
+        stripe: true,
+        border: true,
+        highlightCurrentRow: false,
+        rowClassName: "rowClass",
+        headerCellClassName: "headerCell",
+        tooltipEffect: "light",
+        showSummary: true,
+        rowKey: "",
+      },
+      tableColumnProperty: {
+        width: "",
+        fixed: "",
+        sortable: false,
+        showOverflowTooltip: true,
+        align: "center",
+        headerAlign: "",
+      },
+    };
+  },
+  watch: {
+    tableList: {
+      handler(val) {
+        // console.log(val, "111111111");
+      },
+      deep: true,
+      immediate: true,
+    },
+  },
+  computed: {
+    dataTableContentStyle() {
+      const style = {};
+      if (this.minHeight) {
+        style["min-height"] = this.minHeight;
+      }
+      if (this.tableHeight) {
+        style["height"] = this.tableHeight;
+      }
+      return style;
+    },
+  },
+  methods: {
+    //滚动分页加载
+    // load  () {
+    //   this.$emit("load", true);
+    // };
+  },
+};
+</script>
+<style lang="scss" scoped>
+.el-table {
+  display: flex;
+  flex-direction: column;
+}
+.infinite-list {
+  // height: 300px;
+  padding: 0;
+  margin: 0;
+  list-style: none;
+}
+.infinite-list .infinite-list-item {
+  display: flex;
+  align-items: center;
+  justify-content: center;
+  height: 50px;
+  background: var(--el-color-primary-light-9);
+  margin: 10px;
+  color: var(--el-color-primary);
+}
+.infinite-list .infinite-list-item + .list-item {
+  margin-top: 10px;
+}
+:deep.el-table {
+  .rowClass {
+    height: 40px;
+    font-size: 14px;
+    color: #101116;
+  }
+  .el-table__header .el-table__cell {
+    height: 40px;
+    background: #ffffff;
+    font-size: 14px;
+    font-weight: bold;
+    color: #101116;
+  }
+  .editBtn {
+    background: #ffffff;
+    border: 1px solid #f79ec6;
+    box-shadow: 0px 3px 3px 0px rgba(0, 0, 0, 0.06);
+    border-radius: 4px;
+    font-size: 12px;
+    font-weight: 400;
+    color: #ac014d;
+  }
+  .delBtn {
+    background: #eb2f3b;
+    box-shadow: 0px 3px 3px 0px rgba(0, 0, 0, 0.06);
+    border-radius: 4px;
+    font-size: 12px;
+    font-weight: 400;
+    color: #ffffff;
+    border: none;
+  }
+  .child-list {
+    font-size: 14px;
+    font-family: Helvetica;
+    font-weight: 400;
+    color: #101116;
+  }
+  .btn-all {
+    justify-content: center;
+    .btn-list {
+      margin-right: 10px;
+      &:last-child {
+        margin-right: 0;
+      }
+    }
+  }
+  .el-table__body .el-table__cell {
+    &.el-table-column--selection > .cell {
+      display: block;
+      text-align: center;
+    }
+    &.cell-click {
+      color: #2d67e3;
+      cursor: pointer;
+    }
+  }
+}
+:deep.el-table--striped
+  .el-table__body
+  tr.el-table__row--striped
+  td.el-table__cell {
+  background-color: #f0f3f7;
+}
+.tableStatus {
+  font-size: 14px;
+  .icon {
+    width: 14px;
+    height: 14px;
+    background: #2d67e3;
+    border-radius: 2px;
+    display: inline-block;
+    vertical-align: middle;
+    position: relative;
+    top: -2px;
+  }
+  .status0 {
+    position: relative;
+    top: 5px;
+  }
+  .status1 {
+    position: relative;
+    top: 5px;
+    .icon {
+      background-color: #afb4bf;
+    }
+  }
+  .status2 {
+    position: relative;
+    top: 5px;
+    .icon {
+      background-color: #eb2f3b;
+    }
+  }
+}
+</style>

+ 128 - 17
src/views/statisticalanalysis/specialgoods/index.vue

@@ -19,18 +19,31 @@
         with-setting
         :withSetting="false"
         :withExport="true"
+        :set="set"
         @getFormData="getFormData"
         @export="tableToExcel"
+        @upset="upset"
       />
     </div>
     <div class="echart">
-      <Echarts :id="dataid" :option="tableData" />
+      <Echarts
+        :id="dataid"
+        :option="tableData"
+        v-if="picShow == true ? true : false"
+      />
+      <Tableformbrs
+        :tableList="tableList"
+        :action="action"
+        v-if="!picShow"
+        :set="set"
+      />
     </div>
   </div>
 </template>
 
 <script>
 import Echarts from "../components/echart/index.vue";
+import Tableformbrs from "../components/echart/tableforms.vue";
 import StatisticsHeader from "../components/echart/statisticsHeader.vue";
 import { export_json_to_excel } from "@/utils/Export2Excel";
 import { Query } from "@/api/webApi";
@@ -38,6 +51,7 @@ export default {
   name: "ChartsBar",
   data() {
     return {
+      picShow: true, //图片表格切换
       action: 0,
       dataid: "collection_ecahrt0",
       listqueryTemplateID: DATACONTENT_ID.modeLoadingweight,
@@ -45,6 +59,7 @@ export default {
       set: "",
       isShow: Echarts,
       tableList: [],
+      tableListcop: [],
       listname: "",
       listHeader: [],
       tableData: {
@@ -72,6 +87,9 @@ export default {
         {
           name: "货量统计",
         },
+        {
+          name: "拉货统计",
+        },
       ],
       formItems: [
         {
@@ -314,13 +332,41 @@ export default {
         this.eledata = 3;
         this.titleTop = "货量统计";
         this.listqueryTemplateID = DATACONTENT_ID.modeCargostatistics;
+      } else if (index === 4) {
+        this.dataid = "collection_ecahrt3";
+        this.tableData.time = [];
+        this.tableData.data1 = [];
+        this.tableData.data2 = [];
+        this.formItems[0].options = [
+          {
+            value: "国内离港",
+            label: "国内离港",
+          },
+          {
+            value: "国际离港",
+            label: "国际离港",
+          },
+          {
+            value: "国内进港",
+            label: "国内进港",
+          },
+          {
+            value: "国际进港",
+            label: "国际进港",
+          },
+        ];
+        this.formItems[3].disabled = true;
+        this.formItems[4].disabled = false;
+        this.eledata = 3;
+        this.titleTop = "拉货统计";
+        this.listqueryTemplateID = DATACONTENT_ID.modePullgoods;
       }
     },
     getFormData(data) {
       this.tableData.time = [];
       this.tableData.data1 = [];
       this.tableData.data2 = [];
-      if (this.action === 2) {
+      if (this.action === 2 || this.action === 4) {
         this.set = data.set;
         let option = [
           {
@@ -354,7 +400,7 @@ export default {
           data.dateTime[0] +
           "--" +
           data.dateTime[1];
-        this.listHeader = ["序号", "时间", "重量"];
+        this.listHeader = ["序号", "时间", "重量", "环比"];
       } else if (this.action === 1) {
         this.listname =
           "航班量统计" +
@@ -364,7 +410,7 @@ export default {
           data.dateTime[0] +
           "--" +
           data.dateTime[1];
-        this.listHeader = ["序号", "时间", "重量"];
+        this.listHeader = ["序号", "时间", "重量", "环比"];
       } else if (this.action === 2) {
         this.listname =
           "特货统计" +
@@ -375,11 +421,10 @@ export default {
           data.dateTime[0] +
           "--" +
           data.dateTime[1];
-        console.log();
         if (data.set == 1) {
-          this.listHeader = ["序号", "时间", "单"];
+          this.listHeader = ["序号", "时间", "单", "环比"];
         } else if (data.set == 2) {
-          this.listHeader = ["序号", "时间", "重量"];
+          this.listHeader = ["序号", "时间", "重量", "环比"];
         }
       } else if (this.action === 3) {
         this.listname =
@@ -390,7 +435,21 @@ export default {
           data.dateTime[0] +
           "--" +
           data.dateTime[1];
-        this.listHeader = ["序号", "时间", "重量"];
+        this.listHeader = ["序号", "时间", "重量", "环比"];
+      } else if (this.action === 4) {
+        this.listname =
+          "拉货统计" +
+          data.fttp +
+          data.kht +
+          data.td +
+          data.dateTime[0] +
+          "--" +
+          data.dateTime[1];
+        if (data.set == 1) {
+          this.listHeader = ["序号", "时间", "单", "环比"];
+        } else if (data.set == 2) {
+          this.listHeader = ["序号", "时间", "重量", "环比"];
+        }
       }
     },
     //获取表格数据
@@ -401,7 +460,21 @@ export default {
           dataContent: data,
         });
         if (code == 0) {
-          this.tableList = returnData.listValues;
+          this.tableList = JSON.parse(JSON.stringify(returnData.listValues));
+          this.tableListcop = JSON.parse(JSON.stringify(returnData.listValues));
+          this.tableList.forEach((item, index) => {
+            item.indexs = index + 1;
+          });
+          this.tableListcop.forEach((item, index) => {
+            item.indexs = index + 1;
+          });
+          if (this.action === 0) {
+            let objar = {
+              indexs: "合计",
+              weight: returnData.listValues[0].totalWeight,
+            };
+            this.tableListcop.push(objar);
+          }
           returnData.listValues.forEach((element) => {
             if (this.action === 0) {
               this.tableData.data2.push(element.weight ? element.weight : 0);
@@ -428,10 +501,23 @@ export default {
               this.tableData.data2.push(element.weight ? element.weight : 0);
               this.tableData.time.push(element.fdt);
               this.tableData.kg = "单位:吨";
+            } else if (this.action === 4) {
+              this.tableData.time.push(element.dat);
+              this.tableData.kg = "单位:吨";
+              if (dat == 1) {
+                this.tableData.data2.push(
+                  element.pullFlightNum ? element.pullFlightNum : 0
+                );
+                this.tableData.kg = "单位:单";
+              } else if (dat == 2) {
+                this.tableData.kg = "单位:吨";
+                this.tableData.data2.push(
+                  element.pullWeight ? element.pullWeight : 0
+                );
+              }
             }
             this.tableData.data1 = [];
           });
-          let ar = [];
           this.tableData.data1.push(0);
           for (let index = 0; index < this.tableData.data2.length; index++) {
             // const element =
@@ -443,7 +529,15 @@ export default {
                 (this.tableData.data2[index] -
                   this.tableData.data2[index - 1]) /
                 this.tableData.data2[index - 1];
-              this.tableData.data1.push(element.toFixed(2));
+              this.tableData.data1.push(
+                element.toFixed(2) ? element.toFixed(2) : 0
+              );
+              this.tableData.data1.forEach((element) => {
+                element = Number(element);
+                if (typeof element !== "number") {
+                  element = 0;
+                }
+              });
             }
           }
           // this.tableData = returnData.listValues;
@@ -453,6 +547,7 @@ export default {
         this.page--;
       }
     },
+    //导出
     tableToExcel() {
       import("../../../utils/Export2Excel").then((excel) => {
         // 设置导出表格的头部
@@ -461,21 +556,33 @@ export default {
         /**
          * 源数据导入到excel的数据每一条重新拼成一个数组,数组里的每个元素就是filterVal里的每个字段
          */
-        const data = this.tableList.map((item, index) => {
+        const data = this.tableListcop.map((item, index) => {
           if (this.action === 0) {
-            return [index + 1, item.dat, item.weight];
+            return [item.indexs, item.dat, item.weight, item.weightChain];
           } else if (this.action === 1) {
-            return [index + 1, item.dat, item.flightNum];
+            return [item.indexs, item.dat, item.flightNum, item.weightChain];
           } else if (this.action === 2) {
             if (this.set == 1) {
-              return [index + 1, item.dat, item.flightNum];
+              return [item.indexs, item.dat, item.flightNum, item.weightChain];
             } else if (this.set == 2) {
-              return [index + 1, item.dat, item.weight];
+              return [item.indexs, item.dat, item.weight, item.weightChain];
             }
           } else if (this.action === 3) {
-            return [index + 1, item.fdt, item.weight];
+            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];
+            }
           }
         });
+        data[data.length - 1].indexs = "总计";
         // 调用我们封装好的方法进行导出Excel
         excel.export_json_to_excel({
           // 导出的头部
@@ -491,10 +598,14 @@ export default {
         });
       });
     },
+    upset(data) {
+      this.picShow = data;
+    },
   },
   components: {
     Echarts,
     StatisticsHeader,
+    Tableformbrs,
   },
 };
 </script>