parent
5275dd211e
commit
609aa05514
|
|
@ -25,16 +25,6 @@
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</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">
|
<el-dialog v-model="resumeVisible" title="简历详情" width="700px">
|
||||||
<div v-if="currentResume" class="resume-detail">
|
<div v-if="currentResume" class="resume-detail">
|
||||||
<!-- 基本信息 -->
|
<!-- 基本信息 -->
|
||||||
|
|
@ -114,9 +104,6 @@ const applications = ref([])
|
||||||
const loading = ref(false)
|
const loading = ref(false)
|
||||||
const resumeVisible = ref(false)
|
const resumeVisible = ref(false)
|
||||||
const currentResume = ref(null)
|
const currentResume = ref(null)
|
||||||
const currentPage = ref(1)
|
|
||||||
const pageSize = ref(20)
|
|
||||||
const total = ref(0)
|
|
||||||
|
|
||||||
const genderMap = {
|
const genderMap = {
|
||||||
'male': '男',
|
'male': '男',
|
||||||
|
|
@ -125,33 +112,17 @@ const genderMap = {
|
||||||
'': '-'
|
'': '-'
|
||||||
}
|
}
|
||||||
|
|
||||||
const fetchApplications = async (page = 1) => {
|
onMounted(async () => {
|
||||||
loading.value = true
|
loading.value = true
|
||||||
try {
|
const { data } = await getManageApplications()
|
||||||
const { data } = await getManageApplications({ page })
|
applications.value = data.results
|
||||||
applications.value = data.results
|
loading.value = false
|
||||||
total.value = data.count
|
|
||||||
currentPage.value = page
|
|
||||||
} catch (error) {
|
|
||||||
ElMessage.error('加载投递列表失败,请重试')
|
|
||||||
} finally {
|
|
||||||
loading.value = false
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function handlePageChange(newPage) {
|
|
||||||
fetchApplications(newPage)
|
|
||||||
}
|
|
||||||
|
|
||||||
onMounted(() => {
|
|
||||||
fetchApplications()
|
|
||||||
})
|
})
|
||||||
|
|
||||||
async function updateStatus(row) {
|
async function updateStatus(row) {
|
||||||
try {
|
try {
|
||||||
await updateApplicationStatus(row.id, { status: row.status })
|
await updateApplicationStatus(row.id, { status: row.status })
|
||||||
ElMessage.success('状态已更新,求职者将收到邮件通知')
|
ElMessage.success('状态已更新,求职者将收到邮件通知')
|
||||||
fetchApplications(currentPage.value)
|
|
||||||
} catch { ElMessage.error('更新失败') }
|
} catch { ElMessage.error('更新失败') }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue