This commit is contained in:
@zuopngfei 2025-07-11 18:19:50 +08:00
parent dd8e2b2d5e
commit 95d90a149a
2 changed files with 35 additions and 6 deletions

View File

@ -53,6 +53,8 @@
:total="total"
:page-size="query.page_size"
:current-page="query.page"
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
/>
</div>
</div>
@ -124,6 +126,20 @@ const getNews = () => {
total.value = res.total
})
}
const handleSearch = () => {
query.page = 1
getNews()
}
const handleSizeChange = (e) => {
query.page_size = e
query.page = 1
getNews()
}
const handleCurrentChange = (e) => {
query.page = e
getNews()
}
onMounted(() => {
getNews()
})

View File

@ -9,6 +9,7 @@
type="date"
placeholder="选择胆道闭锁时间"
style="width: 180px;"
value-format="YYYY-MM-DD"
/>
<!-- 请选择当前风险 -->
<el-select v-model="query.risk_type" placeholder="请选择当前风险" style="width: 150px;margin-right: 10px;margin-left: 10px;">
@ -20,7 +21,8 @@
v-model="query.next_follow_date"
type="date"
placeholder="选择下次随访时间"
style="margin-right: 10px;width: 180px;"
style="margin-right: 10px;width: 180px;"
value-format="YYYY-MM-DD"
/>
<el-button type="primary" icon="Search" @click="handleSearch">搜索</el-button>
<el-button icon="Refresh" @click="handleReset">重置</el-button>
@ -76,9 +78,11 @@
<el-pagination
background
layout="prev, pager, next"
:total="1000"
:page-size="20"
:current-page="1"
:total="total"
:page-size="query.page_size"
:current-page="query.page"
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
/>
</div>
</div>
@ -114,7 +118,7 @@ const query = ref({
next_follow_date: '',
risk_type: '',
page: 1,
pageSize: 20
page_size: 20
})
const total = ref(0)
const getList = () => {
@ -134,7 +138,7 @@ const handleReset = () => {
next_follow_date: '',
risk_type: '',
page: 1,
pageSize: 20
page_size: 20
}
getList()
}
@ -154,6 +158,15 @@ const handleExport = () => {
window.URL.revokeObjectURL(link.href)
})
}
const handleSizeChange = (e) => {
query.page_size = e
query.page = 1
getList()
}
const handleCurrentChange = (e) => {
query.page = e
getList()
}
onMounted(() => {
getList()
})