This commit is contained in:
左哥 2025-07-14 21:15:02 +08:00
parent 95d90a149a
commit c44c229f9b
3 changed files with 49 additions and 21 deletions

View File

@ -47,15 +47,17 @@
</template>
</el-table-column>
</el-table>
<el-pagination
background
layout="prev, pager, next"
:total="total"
:page-size="query.page_size"
:current-page="query.page"
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
/>
<div class="user-pagination">
<el-pagination
background
layout="total, sizes, prev, pager, next, jumper"
:total="total"
:page-size="query.page_size"
:current-page="query.page"
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
/>
</div>
</div>
</div>
</template>
@ -117,7 +119,19 @@ const query = ref({
start_time: '',
end_time: '',
})
const handleReset = () => {
dateTime.value = []
query.value = {
username: '',
mobile: '',
operative_date: '',
next_follow_date: '',
risk_type: '',
page: 1,
page_size: 20
}
getNews()
}
const total = ref(0)
const getNews = () => {
news(query.value).then(res => {
@ -160,4 +174,10 @@ onMounted(() => {
.el-link+ .el-link {
margin-left: 10px;
}
.user-pagination {
margin-top: 20px;
text-align: right;
display: flex;
justify-content: right;
}
</style>

View File

@ -32,7 +32,7 @@
<el-button type="primary" @click="handleExport">导出</el-button>
</div>
<div class="user-table">
<el-table :data="tableData" style="width: 100%">
<el-table :data="tableData" style="width: 100%" max-height="calc(100vh - 240px)">
<el-table-column prop="username" label="姓名" />
<el-table-column label="性别">
<template #default="scope">
@ -75,15 +75,17 @@
</template>
</el-table-column>
</el-table>
<el-pagination
background
layout="prev, pager, next"
:total="total"
:page-size="query.page_size"
:current-page="query.page"
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
/>
<div class="user-pagination">
<el-pagination
background
layout="total, sizes, prev, pager, next, jumper"
:total="total"
:page-size="query.page_size"
:current-page="query.page"
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
/>
</div>
</div>
</div>
</template>
@ -176,4 +178,10 @@ onMounted(() => {
.user-search {
margin-bottom: 10px;
}
.user-pagination {
margin-top: 20px;
text-align: right;
display: flex;
justify-content: right;
}
</style>

View File

@ -35,7 +35,7 @@
<el-descriptions-item label="产次:">{{ userInfo.birth_number }} </el-descriptions-item>
<el-descriptions-item label="受孕方式:">
<el-tag v-if="userInfo.conception_type == 0" type="info">未知</el-tag>
<el-tag v-if="userInfo.conception_type == 1" type="success">受孕</el-tag>
<el-tag v-if="userInfo.conception_type == 1" type="success">受孕</el-tag>
<el-tag v-if="userInfo.conception_type == 2" type="warning">辅助生殖技术</el-tag>
</el-descriptions-item>