76 lines
1.8 KiB
Vue
Raw Normal View History

2024-07-09 18:07:55 +08:00
<template>
<t-card :bordered="false">
<div class="form-step-container">
<t-table
rowKey="index"
:data="list"
:columns="columns"
:stripe="false"
:bordered="false"
:hover="true"
size="large"
table-layout="auto"
cellEmptyContent="-"
:pagination="pagination"
>
</t-table>
<div style="margin-top: 30px">
<t-pagination
:total="pagination.total"
:page-size="pagination.size"
@current-change="onCurrentChange"
:showPageSize="false"
></t-pagination>
</div>
</div>
</t-card>
</template>
<script lang="ts">
import store from "@/store";
export default {
data() {
return {
list: [],
columns: [
{colKey: 'name', title: '反馈人', align: 'center'},
{colKey: 'phone', title: '联系方式', align: 'center'},
{colKey: 'content', title: '反馈内容', align: 'center'},
{colKey: 'createtime', title: '创建时间', align: 'center'},
],
pagination: {
page: 1,
size: 10,
total: 0,
},
}
},
mounted() {
//this.member_id=this.$route.query.id;
this.getList();
},
methods: {
onCurrentChange(d){
this.pagination.page=d;
this.getList();
},
getList() {
this.$request
.post("/message/index", {page: this.pagination.page, size: this.pagination.size})
.then((res) => {
console.log(res);
if (res.code == 1) {
this.list = res.data.position;
this.pagination.total = res.data.count;
}
})
.catch((e) => {
console.log(e);
});
},
}
}
</script>
<style src="@wangeditor/editor/dist/css/style.css"></style>