Commit 0ee11de8 by huaying

fix: dd

parent e8902c19
......@@ -11,7 +11,18 @@
</div>
</div>
<div class="content" style="height:100%">
<el-table :data="tableData" @sort-change="sortChange" ref="tableRef" :height="`calc(100% - 130px)`" :max-height="`${tableData.length * 48 + 59}px`">
<el-table v-if="tableData.length > 13" :data="tableData" @sort-change="sortChange" ref="tableRef" :height="`calc(100% - 130px)`" :max-height="`${tableData.length * 48 + 59}px`">
<el-table-column label="核销门店" prop="storeName" min-width="100px"></el-table-column>
<el-table-column label="券核销数量" prop="writeOffCount" min-width="100px" sortable="custom"></el-table-column>
<el-table-column label="核销金额" prop="writeOffPrice" min-width="100px" sortable="custom"></el-table-column>
<el-table-column label="成本金额" prop="costValue" min-width="100px" sortable="custom"></el-table-column>
<el-table-column label="操作" prop="" min-width="100px">
<template slot-scope="{ row }">
<el-button type="text" @click="details(row)">明细</el-button>
</template>
</el-table-column>
</el-table>
<el-table v-else :data="tableData" @sort-change="sortChange" ref="tableRef">
<el-table-column label="核销门店" prop="storeName" min-width="100px"></el-table-column>
<el-table-column label="券核销数量" prop="writeOffCount" min-width="100px" sortable="custom"></el-table-column>
<el-table-column label="核销金额" prop="writeOffPrice" min-width="100px" sortable="custom"></el-table-column>
......@@ -54,7 +65,9 @@ export default {
this.getList();
},
beforeUpdate() {
this.$refs.storePage.style.height = `calc(100vh - ${this.getOffsetTop(this.$refs.storePage)}px)`;
if (this.tableData.length > 10) {
this.$refs.storePage.style.height = `calc(100vh - ${this.getOffsetTop(this.$refs.storePage)}px)`;
}
},
methods: {
getOffsetTop(el) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment