1
This commit is contained in:
@@ -99,8 +99,11 @@
|
||||
</Form>
|
||||
</Modal>
|
||||
|
||||
<!-- 简历详情弹窗 -->
|
||||
<Modal v-model="resumeModal.visible" :title="resumeModal.title" width="900" :footer-hide="true">
|
||||
<!-- 简历详情弹窗 - 使用 ResumeInfoDetail 组件 -->
|
||||
<ResumeInfoDetail ref="resumeDetail" @on-close="handleResumeDetailClose" />
|
||||
|
||||
<!-- 原简历详情弹窗(备份,暂时保留) -->
|
||||
<Modal v-model="resumeModal.visible" :title="resumeModal.title" width="900" :footer-hide="true" v-if="false">
|
||||
<div v-if="resumeModal.loading" style="text-align: center; padding: 40px;">
|
||||
<Spin size="large"></Spin>
|
||||
<p style="margin-top: 20px;">加载简历数据中...</p>
|
||||
@@ -276,9 +279,11 @@
|
||||
import plaAccountServer from '@/api/profile/pla_account_server.js'
|
||||
import jobTypesServer from '@/api/work/job_types_server.js'
|
||||
import PlaAccountEdit from './pla_account_edit.vue'
|
||||
import ResumeInfoDetail from './resume_info_detail.vue'
|
||||
|
||||
export default {
|
||||
components: {
|
||||
ResumeInfoDetail,
|
||||
PlaAccountEdit
|
||||
},
|
||||
data() {
|
||||
@@ -344,13 +349,12 @@ export default {
|
||||
{ title: '密码', key: 'pwd', com: 'Password', required: true },
|
||||
],
|
||||
listColumns: [
|
||||
{ title: 'ID', key: 'id', minWidth: 80 },
|
||||
{ title: '账户名', key: 'name', minWidth: 150 },
|
||||
{ title: '设备SN码', key: 'sn_code', minWidth: 120 },
|
||||
{ title: 'ID', key: 'id' },
|
||||
{ title: '账户名', key: 'name' },
|
||||
{ title: '设备SN码', key: 'sn_code'},
|
||||
{
|
||||
title: '平台',
|
||||
key: 'platform_type',
|
||||
minWidth: 100,
|
||||
render: (h, params) => {
|
||||
const platformMap = {
|
||||
'boss': { text: 'Boss直聘', color: 'blue' },
|
||||
@@ -360,13 +364,13 @@ export default {
|
||||
return h('Tag', { props: { color: platform.color } }, platform.text)
|
||||
}
|
||||
},
|
||||
{ title: '登录名', key: 'login_name', minWidth: 150 },
|
||||
{ title: '搜索关键词', key: 'keyword', minWidth: 150 },
|
||||
{ title: '用户地址', key: 'user_address', minWidth: 150 },
|
||||
{ title: '登录名', key: 'login_name'},
|
||||
{ title: '搜索关键词', key: 'keyword' },
|
||||
{ title: '用户地址', key: 'user_address' },
|
||||
{
|
||||
title: '经纬度',
|
||||
key: 'location',
|
||||
minWidth: 150,
|
||||
|
||||
render: (h, params) => {
|
||||
const lon = params.row.user_longitude;
|
||||
const lat = params.row.user_latitude;
|
||||
@@ -379,7 +383,7 @@ export default {
|
||||
{
|
||||
title: '在线状态',
|
||||
key: 'is_online',
|
||||
minWidth: 100,
|
||||
|
||||
render: (h, params) => {
|
||||
return h('Tag', {
|
||||
props: { color: params.row.is_online ? 'success' : 'default' }
|
||||
@@ -390,7 +394,7 @@ export default {
|
||||
title: '自动投递',
|
||||
key: 'auto_deliver',
|
||||
com: "Radio",
|
||||
minWidth: 100,
|
||||
|
||||
options: [
|
||||
{ value: 1, label: '开启' },
|
||||
{ value: 0, label: '关闭' }
|
||||
@@ -409,7 +413,6 @@ export default {
|
||||
{ value: 1, label: '开启' },
|
||||
{ value: 0, label: '关闭' }
|
||||
],
|
||||
minWidth: 100,
|
||||
render: (h, params) => {
|
||||
return h('Tag', {
|
||||
props: { color: params.row.auto_chat ? 'success' : 'default' }
|
||||
@@ -419,7 +422,7 @@ export default {
|
||||
{
|
||||
title: '剩余天数',
|
||||
key: 'remaining_days',
|
||||
minWidth: 100,
|
||||
|
||||
render: (h, params) => {
|
||||
const remainingDays = params.row.remaining_days || 0
|
||||
let color = 'success'
|
||||
@@ -436,7 +439,7 @@ export default {
|
||||
{
|
||||
title: '授权日期',
|
||||
key: 'authorization_date',
|
||||
minWidth: 150,
|
||||
|
||||
render: (h, params) => {
|
||||
if (!params.row.authorization_date) {
|
||||
return h('span', { style: { color: '#999' } }, '未授权')
|
||||
@@ -448,7 +451,7 @@ export default {
|
||||
{
|
||||
title: '过期时间',
|
||||
key: 'expire_date',
|
||||
minWidth: 150,
|
||||
|
||||
render: (h, params) => {
|
||||
if (!params.row.authorization_date || !params.row.authorization_days) {
|
||||
return h('span', { style: { color: '#999' } }, '未授权')
|
||||
@@ -469,7 +472,7 @@ export default {
|
||||
{ value: 1, label: '开启' },
|
||||
{ value: 0, label: '关闭' }
|
||||
],
|
||||
minWidth: 100,
|
||||
|
||||
render: (h, params) => {
|
||||
return h('Tag', {
|
||||
props: { color: params.row.auto_active ? 'success' : 'default' }
|
||||
@@ -479,7 +482,6 @@ export default {
|
||||
{
|
||||
title: '启用状态',
|
||||
key: 'is_enabled',
|
||||
minWidth: 100,
|
||||
render: (h, params) => {
|
||||
return h('i-switch', {
|
||||
props: {
|
||||
@@ -494,11 +496,11 @@ export default {
|
||||
})
|
||||
}
|
||||
},
|
||||
{ title: '创建时间', key: 'create_time', minWidth: 150 },
|
||||
{ title: '创建时间', key: 'create_time', },
|
||||
{
|
||||
title: '操作',
|
||||
key: 'action',
|
||||
width: 450,
|
||||
width: 500,
|
||||
type: 'template',
|
||||
render: (h, params) => {
|
||||
let btns = [
|
||||
@@ -661,10 +663,11 @@ export default {
|
||||
},
|
||||
// 查看简历
|
||||
async showResume(row) {
|
||||
this.resumeModal.visible = true
|
||||
this.resumeModal.loading = true
|
||||
this.resumeModal.data = null
|
||||
this.resumeModal.title = `${row.name} - 在线简历`
|
||||
// 显示加载提示
|
||||
const loadingMsg = this.$Message.loading({
|
||||
content: '正在加载简历数据...',
|
||||
duration: 0
|
||||
})
|
||||
|
||||
try {
|
||||
// 根据 sn_code 和 platform 获取简历
|
||||
@@ -677,18 +680,24 @@ export default {
|
||||
// admin 会自动加 /admin_api 前缀
|
||||
const res = await window.framework.http.get(`/resume/get-by-device?sn_code=${row.sn_code}&platform=${platform}`)
|
||||
|
||||
if (res.code === 0) {
|
||||
this.resumeModal.data = res.data
|
||||
loadingMsg()
|
||||
|
||||
if (res.code === 0 && res.data && res.data.resumeId) {
|
||||
// 使用 ResumeInfoDetail 组件显示简历
|
||||
this.$refs.resumeDetail.show(res.data.resumeId)
|
||||
} else {
|
||||
this.$Message.warning(res.message || '未找到简历数据')
|
||||
}
|
||||
} catch (error) {
|
||||
loadingMsg()
|
||||
console.error('获取简历失败:', error)
|
||||
this.$Message.error('获取简历失败:' + (error.message || '请稍后重试'))
|
||||
} finally {
|
||||
this.resumeModal.loading = false
|
||||
}
|
||||
},
|
||||
// 关闭简历详情
|
||||
handleResumeDetailClose() {
|
||||
// 可以在这里添加关闭后的逻辑
|
||||
},
|
||||
// 解析技能标签
|
||||
parseSkills(skills) {
|
||||
if (!skills) return []
|
||||
|
||||
Reference in New Issue
Block a user