1
This commit is contained in:
@@ -64,6 +64,12 @@
|
|||||||
</div>
|
</div>
|
||||||
</Col>
|
</Col>
|
||||||
<Col span="8">
|
<Col span="8">
|
||||||
|
<div class="detail-item">
|
||||||
|
<span class="label">密码:</span>
|
||||||
|
<span class="value">{{ accountInfo.pwd ? '******' : '-' }}</span>
|
||||||
|
</div>
|
||||||
|
</Col>
|
||||||
|
<Col span="8">
|
||||||
<div class="detail-item">
|
<div class="detail-item">
|
||||||
<span class="label">搜索关键词:</span>
|
<span class="label">搜索关键词:</span>
|
||||||
<span class="value">{{ accountInfo.keyword || '-' }}</span>
|
<span class="value">{{ accountInfo.keyword || '-' }}</span>
|
||||||
@@ -440,6 +446,7 @@
|
|||||||
<script>
|
<script>
|
||||||
import plaAccountServer from '@/api/profile/pla_account_server.js'
|
import plaAccountServer from '@/api/profile/pla_account_server.js'
|
||||||
import taskStatusServer from '@/api/task/task_status_server.js'
|
import taskStatusServer from '@/api/task/task_status_server.js'
|
||||||
|
import jobTypesServer from '@/api/work/job_types_server.js'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'PlaAccountDetail',
|
name: 'PlaAccountDetail',
|
||||||
@@ -447,6 +454,35 @@ export default {
|
|||||||
return {
|
return {
|
||||||
accountInfo: {},
|
accountInfo: {},
|
||||||
activeTab: 'tasks',
|
activeTab: 'tasks',
|
||||||
|
|
||||||
|
// 职位类型选项
|
||||||
|
jobTypeOptions: [],
|
||||||
|
|
||||||
|
// 配置数据
|
||||||
|
priorityList: [],
|
||||||
|
deliverConfig: {
|
||||||
|
auto_deliver: 0,
|
||||||
|
deliver_interval: 30,
|
||||||
|
min_salary: 0,
|
||||||
|
max_salary: 0,
|
||||||
|
page_count: 3,
|
||||||
|
max_deliver: 10,
|
||||||
|
filter_keywords: '',
|
||||||
|
exclude_keywords: ''
|
||||||
|
},
|
||||||
|
chatConfig: {
|
||||||
|
auto_chat: 0,
|
||||||
|
chat_interval: 30,
|
||||||
|
is_chat_outsourcing: 0,
|
||||||
|
chat_start_time: '',
|
||||||
|
chat_end_time: '',
|
||||||
|
chat_workdays_only: 1
|
||||||
|
},
|
||||||
|
activeConfig: {
|
||||||
|
auto_active: 0,
|
||||||
|
active_interval: 60,
|
||||||
|
active_actions_json: ''
|
||||||
|
},
|
||||||
|
|
||||||
// 运行操作菜单列表(统一使用下划线命名)
|
// 运行操作菜单列表(统一使用下划线命名)
|
||||||
actionMenuList: [
|
actionMenuList: [
|
||||||
@@ -689,7 +725,7 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
|
this.loadJobTypes()
|
||||||
this.loadAccountInfo()
|
this.loadAccountInfo()
|
||||||
this.queryTasks(1)
|
this.queryTasks(1)
|
||||||
this.queryCommands(1)
|
this.queryCommands(1)
|
||||||
@@ -698,6 +734,10 @@ export default {
|
|||||||
// 从路由参数获取账号ID
|
// 从路由参数获取账号ID
|
||||||
accountId() {
|
accountId() {
|
||||||
return this.$route.query.id
|
return this.$route.query.id
|
||||||
|
},
|
||||||
|
// 计算总权重
|
||||||
|
totalWeight() {
|
||||||
|
return this.priorityList.reduce((sum, item) => sum + (Number(item.weight) || 0), 0)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
@@ -708,15 +748,143 @@ export default {
|
|||||||
// 加载账号信息
|
// 加载账号信息
|
||||||
async loadAccountInfo() {
|
async loadAccountInfo() {
|
||||||
try {
|
try {
|
||||||
|
|
||||||
const res = await plaAccountServer.getById(this.accountId)
|
const res = await plaAccountServer.getById(this.accountId)
|
||||||
this.accountInfo = res.data || {}
|
this.accountInfo = res.data || {}
|
||||||
|
// 解析配置数据
|
||||||
|
this.parseConfigData(this.accountInfo)
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error('加载账号信息失败:', error)
|
console.error('加载账号信息失败:', error)
|
||||||
this.$Message.error('加载账号信息失败')
|
this.$Message.error('加载账号信息失败')
|
||||||
this.accountInfo = {}
|
this.accountInfo = {}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
// 解析配置数据
|
||||||
|
parseConfigData(accountInfo) {
|
||||||
|
// 解析排序优先级配置
|
||||||
|
if (accountInfo.is_salary_priority) {
|
||||||
|
const priorityConfig = typeof accountInfo.is_salary_priority === 'string'
|
||||||
|
? JSON.parse(accountInfo.is_salary_priority)
|
||||||
|
: accountInfo.is_salary_priority
|
||||||
|
if (Array.isArray(priorityConfig)) {
|
||||||
|
this.priorityList = priorityConfig.map(item => ({
|
||||||
|
key: item.key,
|
||||||
|
weight: item.weight || 0
|
||||||
|
}))
|
||||||
|
} else {
|
||||||
|
this.priorityList = []
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
this.priorityList = []
|
||||||
|
}
|
||||||
|
|
||||||
|
// 解析自动投递配置
|
||||||
|
if (accountInfo.deliver_config) {
|
||||||
|
const deliverConfig = typeof accountInfo.deliver_config === 'string'
|
||||||
|
? JSON.parse(accountInfo.deliver_config)
|
||||||
|
: accountInfo.deliver_config
|
||||||
|
this.deliverConfig = {
|
||||||
|
auto_deliver: accountInfo.auto_deliver !== undefined ? accountInfo.auto_deliver : 0,
|
||||||
|
deliver_interval: deliverConfig.deliver_interval || 30,
|
||||||
|
min_salary: deliverConfig.min_salary || 0,
|
||||||
|
max_salary: deliverConfig.max_salary || 0,
|
||||||
|
page_count: deliverConfig.page_count || 3,
|
||||||
|
max_deliver: deliverConfig.max_deliver || 10,
|
||||||
|
filter_keywords: Array.isArray(deliverConfig.filter_keywords)
|
||||||
|
? deliverConfig.filter_keywords.join(',')
|
||||||
|
: (deliverConfig.filter_keywords || ''),
|
||||||
|
exclude_keywords: Array.isArray(deliverConfig.exclude_keywords)
|
||||||
|
? deliverConfig.exclude_keywords.join(',')
|
||||||
|
: (deliverConfig.exclude_keywords || '')
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
this.deliverConfig = {
|
||||||
|
auto_deliver: accountInfo.auto_deliver !== undefined ? accountInfo.auto_deliver : 0,
|
||||||
|
deliver_interval: 30,
|
||||||
|
min_salary: 0,
|
||||||
|
max_salary: 0,
|
||||||
|
page_count: 3,
|
||||||
|
max_deliver: 10,
|
||||||
|
filter_keywords: '',
|
||||||
|
exclude_keywords: ''
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 解析自动沟通配置
|
||||||
|
if (accountInfo.chat_strategy) {
|
||||||
|
const chatStrategy = typeof accountInfo.chat_strategy === 'string'
|
||||||
|
? JSON.parse(accountInfo.chat_strategy)
|
||||||
|
: accountInfo.chat_strategy
|
||||||
|
this.chatConfig = {
|
||||||
|
auto_chat: accountInfo.auto_chat !== undefined ? accountInfo.auto_chat : 0,
|
||||||
|
chat_interval: chatStrategy.chat_interval || 30,
|
||||||
|
is_chat_outsourcing: chatStrategy.is_chat_outsourcing !== undefined ? chatStrategy.is_chat_outsourcing : 0,
|
||||||
|
chat_start_time: chatStrategy.time_range?.start_time || '09:00',
|
||||||
|
chat_end_time: chatStrategy.time_range?.end_time || '18:00',
|
||||||
|
chat_workdays_only: chatStrategy.time_range?.workdays_only !== undefined ? chatStrategy.time_range.workdays_only : 1
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
this.chatConfig = {
|
||||||
|
auto_chat: accountInfo.auto_chat !== undefined ? accountInfo.auto_chat : 0,
|
||||||
|
chat_interval: 30,
|
||||||
|
is_chat_outsourcing: 0,
|
||||||
|
chat_start_time: '09:00',
|
||||||
|
chat_end_time: '18:00',
|
||||||
|
chat_workdays_only: 1
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 解析自动活跃配置
|
||||||
|
if (accountInfo.active_actions) {
|
||||||
|
const activeActions = typeof accountInfo.active_actions === 'string'
|
||||||
|
? JSON.parse(accountInfo.active_actions)
|
||||||
|
: accountInfo.active_actions
|
||||||
|
this.activeConfig = {
|
||||||
|
auto_active: accountInfo.auto_active !== undefined ? accountInfo.auto_active : 0,
|
||||||
|
active_interval: activeActions.active_interval || 60,
|
||||||
|
active_actions_json: activeActions.actions || []
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
this.activeConfig = {
|
||||||
|
auto_active: accountInfo.auto_active !== undefined ? accountInfo.auto_active : 0,
|
||||||
|
active_interval: 60,
|
||||||
|
active_actions_json: []
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
// 加载职位类型
|
||||||
|
async loadJobTypes() {
|
||||||
|
try {
|
||||||
|
const res = await jobTypesServer.getAll()
|
||||||
|
if (res.code === 0 && res.data) {
|
||||||
|
this.jobTypeOptions = res.data.map(item => ({
|
||||||
|
value: item.id,
|
||||||
|
label: item.name
|
||||||
|
}))
|
||||||
|
}
|
||||||
|
} catch (err) {
|
||||||
|
console.error('加载职位类型失败:', err)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
// 获取职位类型名称
|
||||||
|
getJobTypeName(jobTypeId) {
|
||||||
|
if (!jobTypeId) return ''
|
||||||
|
const jobType = this.jobTypeOptions.find(item => item.value === jobTypeId)
|
||||||
|
return jobType ? jobType.label : ''
|
||||||
|
},
|
||||||
|
|
||||||
|
// 获取优先级标签
|
||||||
|
getPriorityLabel(key) {
|
||||||
|
const labelMap = {
|
||||||
|
'distance': '距离',
|
||||||
|
'salary': '薪资',
|
||||||
|
'work_years': '工作年限',
|
||||||
|
'education': '学历'
|
||||||
|
}
|
||||||
|
return labelMap[key] || key
|
||||||
|
},
|
||||||
|
|
||||||
// 查询任务列表
|
// 查询任务列表
|
||||||
async queryTasks(page) {
|
async queryTasks(page) {
|
||||||
@@ -1600,4 +1768,101 @@ export default {
|
|||||||
word-break: break-all;
|
word-break: break-all;
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* 配置卡片样式 */
|
||||||
|
.config-card {
|
||||||
|
background: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.config-card .detail-item {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
margin-bottom: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.config-card .label {
|
||||||
|
min-width: 120px;
|
||||||
|
color: #515a6e;
|
||||||
|
font-weight: 500;
|
||||||
|
}
|
||||||
|
|
||||||
|
.config-card .value {
|
||||||
|
color: #17233d;
|
||||||
|
word-break: break-all;
|
||||||
|
flex: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 排序优先级展示 */
|
||||||
|
.priority-display {
|
||||||
|
padding: 16px;
|
||||||
|
background: #f8f8f9;
|
||||||
|
border-radius: 4px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.priority-item-display {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
padding: 12px;
|
||||||
|
margin-bottom: 12px;
|
||||||
|
background: #fff;
|
||||||
|
border-radius: 4px;
|
||||||
|
border: 1px solid #e8eaec;
|
||||||
|
}
|
||||||
|
|
||||||
|
.priority-item-display:last-child {
|
||||||
|
margin-bottom: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.priority-item-display .priority-label {
|
||||||
|
font-weight: 500;
|
||||||
|
color: #515a6e;
|
||||||
|
min-width: 120px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.priority-item-display .priority-value {
|
||||||
|
color: #2d8cf0;
|
||||||
|
font-weight: 500;
|
||||||
|
font-size: 14px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.priority-total-display {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
margin-top: 16px;
|
||||||
|
padding-top: 16px;
|
||||||
|
border-top: 1px solid #e8eaec;
|
||||||
|
font-size: 14px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.priority-total-display .weight-warning {
|
||||||
|
color: #ed4014;
|
||||||
|
}
|
||||||
|
|
||||||
|
.empty-config {
|
||||||
|
padding: 20px;
|
||||||
|
text-align: center;
|
||||||
|
color: #c5c8ce;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 只读代码块 */
|
||||||
|
.code-block-readonly {
|
||||||
|
background: #f8f8f9;
|
||||||
|
border: 1px solid #e8eaec;
|
||||||
|
border-radius: 4px;
|
||||||
|
padding: 12px;
|
||||||
|
max-height: 200px;
|
||||||
|
overflow-y: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.code-block-readonly pre {
|
||||||
|
margin: 0;
|
||||||
|
font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
|
||||||
|
font-size: 12px;
|
||||||
|
line-height: 1.4;
|
||||||
|
color: #17233d;
|
||||||
|
white-space: pre-wrap;
|
||||||
|
word-break: break-all;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
Reference in New Issue
Block a user