zzq
2023-09-27 8a668aeb3faa31d68dc2987204a372ad32f7b4f7
src/components/makepager/TableCommonView.vue
@@ -1,6 +1,9 @@
<!-- eslint-disable vue/no-use-v-if-with-v-for -->
<template>
  <div :class="{'table-view':true,'table_height':!showSummary}" v-loading="loading">
  <div
    :class="{ 'table-view': true, table_height: !showSummary }"
    v-loading="loading"
  >
    <el-table
      ref="table"
      border
@@ -180,8 +183,8 @@
    },
    showSummary:{
      type:Boolean,
      default:false
    }
      default: false,
    },
  },
  data() {
    return {
@@ -260,7 +263,7 @@
          sums[index] = " ";
          return;
        }
        this.tableList.countcol.forEach((countcols,idx) => {
          this.tableList.countcol.forEach((countcols) => {
          if (column.label === countcols) {
            const values = data.map((item) => Number(item[column.property]));
            if (!values.every((value) => isNaN(value))) {
@@ -272,8 +275,8 @@
                  return prev;
                }
              }, 0);
              sums[index] = sums[index].toLocaleString();
              // console.log(sums,"sums")
                sums[index] =
                  this.tableList.tableColumn[index - 1].unit + "" + sums[index];
            } else {
              sums[index] = "";
            }
@@ -283,10 +286,8 @@
        });
      });
      return sums;
      }else{
      }
    },
  },
};
</script>
@@ -296,8 +297,12 @@
.table_height{
  height: 100%;
}
.el-table__body-wrapper{
  height: 100%;
}
.table-view {
  position: relative;
  height: 100%;
  .blue {
    width: 70px;
    text-align: center;
@@ -379,5 +384,4 @@
    // height: ;
  }
}
</style>