Revert "feat(admin): 职位管理页面添加发布时间和分享按钮"
This reverts commit 10fa8aedfe.
This commit is contained in:
parent
10fa8aedfe
commit
842704f095
|
|
@ -9,11 +9,6 @@
|
|||
<el-table-column prop="organization_name" label="所属公司" />
|
||||
<el-table-column prop="location" label="地点" />
|
||||
<el-table-column prop="salary" label="薪资" />
|
||||
<el-table-column label="发布时间" width="150">
|
||||
<template #default="{ row }">
|
||||
{{ row.created_at?.slice(0, 10) || '-' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="status" label="状态">
|
||||
<template #default="{ row }">
|
||||
<el-tag :type="row.status === 'published' ? 'success' : row.status === 'draft' ? 'info' : 'danger'">
|
||||
|
|
@ -21,10 +16,9 @@
|
|||
</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" width="220">
|
||||
<el-table-column label="操作" width="180">
|
||||
<template #default="{ row }">
|
||||
<el-button size="small" @click="openDialog(row)">编辑</el-button>
|
||||
<el-button size="small" @click="shareJob(row)">分享</el-button>
|
||||
<el-button size="small" type="danger" @click="handleDelete(row.id)">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
|
@ -161,25 +155,6 @@ async function handleSave() {
|
|||
}
|
||||
}
|
||||
|
||||
function shareJob(row) {
|
||||
// 生成职位详情页链接
|
||||
const jobUrl = `${window.location.origin}/#/jobs/${row.id}`
|
||||
|
||||
// 复制到剪贴板
|
||||
navigator.clipboard.writeText(jobUrl).then(() => {
|
||||
ElMessage.success(`已复制链接:${jobUrl}`)
|
||||
}).catch(() => {
|
||||
// 降级方案:使用传统方法
|
||||
const textArea = document.createElement('textarea')
|
||||
textArea.value = jobUrl
|
||||
document.body.appendChild(textArea)
|
||||
textArea.select()
|
||||
document.execCommand('copy')
|
||||
document.body.removeChild(textArea)
|
||||
ElMessage.success(`已复制链接:${jobUrl}`)
|
||||
})
|
||||
}
|
||||
|
||||
async function handleDelete(id) {
|
||||
await ElMessageBox.confirm('确认删除该职位?', '提示', { type: 'warning' })
|
||||
await deleteJob(id)
|
||||
|
|
|
|||
Loading…
Reference in New Issue