Revert "feat(admin): 为投递管理页面添加分页功能"

This reverts commit 00abe1da15.
This commit is contained in:
TianyangZhang 2026-03-26 10:50:39 +08:00
parent 5275dd211e
commit 609aa05514
1 changed files with 4 additions and 33 deletions

View File

@ -25,16 +25,6 @@
</el-table-column>
</el-table>
<div style="margin-top: 16px; text-align: right;">
<el-pagination
v-model:current-page="currentPage"
:page-size="pageSize"
:total="total"
@current-change="handlePageChange"
layout="total, prev, pager, next, jumper"
/>
</div>
<el-dialog v-model="resumeVisible" title="简历详情" width="700px">
<div v-if="currentResume" class="resume-detail">
<!-- 基本信息 -->
@ -114,9 +104,6 @@ const applications = ref([])
const loading = ref(false)
const resumeVisible = ref(false)
const currentResume = ref(null)
const currentPage = ref(1)
const pageSize = ref(20)
const total = ref(0)
const genderMap = {
'male': '男',
@ -125,33 +112,17 @@ const genderMap = {
'': '-'
}
const fetchApplications = async (page = 1) => {
onMounted(async () => {
loading.value = true
try {
const { data } = await getManageApplications({ page })
applications.value = data.results
total.value = data.count
currentPage.value = page
} catch (error) {
ElMessage.error('加载投递列表失败,请重试')
} finally {
loading.value = false
}
}
function handlePageChange(newPage) {
fetchApplications(newPage)
}
onMounted(() => {
fetchApplications()
const { data } = await getManageApplications()
applications.value = data.results
loading.value = false
})
async function updateStatus(row) {
try {
await updateApplicationStatus(row.id, { status: row.status })
ElMessage.success('状态已更新,求职者将收到邮件通知')
fetchApplications(currentPage.value)
} catch { ElMessage.error('更新失败') }
}