<template>
  <div class="content-main">
    已删除
  </div>
</template>

<script>
import { getToken } from "@/utils/auth";

export default {
  name:"registrationStatusDetails",
  computed: {
    myHeader() {
      return {
        token: getToken(),
      };
    },
  },
  data() {
    return {
      detailInfo: [],
      tableData: [],
    };
  },
  created() {
  },
  mounted() {
    this.getDetailList();
  },
  methods: {
    //查看详情
    getDetailList() {
      this.detailInfo = JSON.parse(this.$route.query.data);
      let data = {
        apcc: this.$route.query.apcc,
      };
      statisticalDetail(data).then((res) => {
        if (res.infoCode == "200") {
          this.tableData = res.data;
        }
      });
    },
    getSummary(param) {
      const { columns, data } = param;
      const sums = [];
      columns.forEach((column, index) => {
        if (index === 0) {
          sums[index] = "合计";
          return;
        }
        if (index === 5 || index === 9) {
          const values = data.map((item) => Number(item[column.property]));
          if (!values.every((value) => isNaN(value))) {
            sums[index] = values.reduce((prev, curr) => {
              const value = Number(curr);
              if (!isNaN(value)) {
                return prev + curr;
              } else {
                return prev;
              }
            }, 0);
          } else {
            sums[index] = "";
          }
          if (index === 5) {
            sums[index] =
              String(sums[index]).indexOf(".") > -1
                ? Number(sums[index]).toFixed(3)
                : sums[index];
          }
          if (index === 9) {
            sums[index] =
              String(sums[index]).indexOf(".") > -1
                ? Number(sums[index]).toLocaleString(undefined, {
                    minimumFractionDigits: 2,
                    maximumFractionDigits: 2,
                  })
                : Number(sums[index]).toLocaleString();
          }
        }
      });

      return sums;
    },
  },
};
</script>

<style lang="scss" scoped>
.row_form {
  padding: 15px 20px;
  font-size: 16px;
}
.row_table {
  padding: 15px 0;
}
footer {
  text-align: center;
  margin: 20px auto;
}

</style>
