2024-09-12 18:15:58 +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">
|
2025-02-20 14:57:51 +08:00
|
|
|
import store from '@/store';
|
2024-09-12 18:15:58 +08:00
|
|
|
|
|
|
|
export default {
|
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
list: [],
|
|
|
|
columns: [
|
2025-02-20 14:57:51 +08:00
|
|
|
{ colKey: 'name', title: '姓名', align: 'center', width: 300 },
|
|
|
|
{ colKey: 'phone', title: '联系方式', align: 'center' },
|
|
|
|
{ colKey: 'text', title: '内容', align: 'center' },
|
|
|
|
{ colKey: 'createtime', title: '留言时间', align: 'center' },
|
2024-09-12 18:15:58 +08:00
|
|
|
],
|
|
|
|
pagination: {
|
|
|
|
page: 1,
|
|
|
|
size: 10,
|
|
|
|
total: 0,
|
|
|
|
},
|
2025-02-20 14:57:51 +08:00
|
|
|
};
|
2024-09-12 18:15:58 +08:00
|
|
|
},
|
|
|
|
mounted() {
|
|
|
|
this.getList();
|
|
|
|
},
|
|
|
|
methods: {
|
|
|
|
onCurrentChange(d) {
|
|
|
|
this.pagination.page = d;
|
|
|
|
this.getList();
|
|
|
|
},
|
|
|
|
|
|
|
|
getList() {
|
|
|
|
this.$request
|
2025-02-20 14:57:51 +08:00
|
|
|
.post('/pc_leave_message/index', { page: this.pagination.page, size: this.pagination.size })
|
2024-09-12 18:15:58 +08:00
|
|
|
.then((res) => {
|
|
|
|
console.log(res);
|
|
|
|
if (res.code == 1) {
|
|
|
|
this.list = res.data.ret;
|
|
|
|
this.pagination.total = res.data.count;
|
|
|
|
}
|
|
|
|
})
|
|
|
|
.catch((e) => {
|
|
|
|
console.log(e);
|
|
|
|
});
|
|
|
|
},
|
2025-02-20 14:57:51 +08:00
|
|
|
},
|
|
|
|
};
|
2024-09-12 18:15:58 +08:00
|
|
|
</script>
|