优惠券详情修改

This commit is contained in:
GaoHao 2024-10-31 09:30:18 +08:00
parent 7ea49cbab8
commit f68cf9fab0
1 changed files with 32 additions and 4 deletions

View File

@ -38,8 +38,8 @@
</el-form-item>
</el-form>
</div>
<div>
<el-table v-loading="loading" :data="tableData">
<div class="head-container">
<el-table v-loading="loading" :data="tableData.data">
<el-table-column label="用户ID" prop="id" />
<el-table-column label="用户名" prop="name" />
@ -71,6 +71,16 @@
</el-table>
</div>
<div class="head-container">
<el-pagination
:total="tableData.total"
:current-page="tableData.page + 1"
:page-size="tableData.size"
layout="total, sizes, prev, pager, next, jumper"
@current-change="paginationChange"
@size-change="sizeChange"
/>
</div>
</el-dialog>
</div>
</template>
@ -101,7 +111,13 @@ export default {
size: 10
},
resetQuery: null,
tableData: null
tableData: {
data: [],
page: 0,
size: 10,
loading: false,
total: 0
}
}
},
mounted() {
@ -126,6 +142,9 @@ export default {
page: this.query.page,
size: this.query.size
})
this.tableData.loading = false
this.tableData.data = res.content
this.tableData.total = res.totalElements
},
/**
@ -157,7 +176,16 @@ export default {
this.query.couponId = obj.id
this.getTableData()
},
//
sizeChange(e) {
this.tableData.size = e
this.getTableData()
},
//
paginationChange(e) {
this.tableData.page = e - 1
this.getTableData()
},
/**
* 关闭详情
*/