feat: 完善职业图谱功能
This commit is contained in:
@@ -21,6 +21,7 @@
|
||||
{{ skill }}
|
||||
</view>
|
||||
<text v-if="!skillTags.length && !isLoadingSkillTags" class="empty-text">暂无技能数据</text>
|
||||
<text v-if="isLoadingSkillTags" class="empty-text">加载中...</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
@@ -35,7 +36,6 @@
|
||||
:key="index"
|
||||
@click="handleJobCardClick(job)"
|
||||
>
|
||||
<button class="search-btn" @click.stop="handleJobSearch(job)">职位搜索</button>
|
||||
<view class="job-header">
|
||||
<text class="job-title">{{ job.title }}</text>
|
||||
</view>
|
||||
@@ -79,11 +79,10 @@ const isLoadingRecommend = ref(false);
|
||||
// 计算属性
|
||||
const currentJobDisplay = computed(() => props.currentJobName || '市场专员');
|
||||
|
||||
|
||||
// 从 appSkillsList 中提取技能名称
|
||||
function extractSkillsFromAppSkillsList(appSkillsList = []) {
|
||||
return (Array.isArray(appSkillsList) ? appSkillsList : [])
|
||||
.map(item => item?.nameStr || '')
|
||||
.map(item => item?.name || item?.nameStr || '')
|
||||
.filter(name => !!name && name.trim().length > 0);
|
||||
}
|
||||
|
||||
@@ -202,17 +201,15 @@ onMounted(() => {
|
||||
watch(
|
||||
() => [props.currentJobId, props.currentJobName],
|
||||
() => {
|
||||
fetchCurrentJobSkills();
|
||||
fetchRecommendedJobs();
|
||||
if (props.currentJobName) {
|
||||
fetchCurrentJobSkills();
|
||||
fetchRecommendedJobs();
|
||||
}
|
||||
},
|
||||
{ immediate: true }
|
||||
);
|
||||
|
||||
// 事件处理
|
||||
function handleJobSearch(job) {
|
||||
// TODO: 实现职位搜索跳转
|
||||
}
|
||||
|
||||
function handleJobCardClick(job) {
|
||||
emit('job-card-click', job);
|
||||
}
|
||||
@@ -296,24 +293,8 @@ function handleJobCardClick(job) {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.search-btn {
|
||||
position: absolute;
|
||||
top: 16rpx;
|
||||
right: 16rpx;
|
||||
background-color: #FFDAB9;
|
||||
color: #FF6347;
|
||||
font-size: 20rpx;
|
||||
padding: 6rpx 14rpx;
|
||||
border-radius: 6rpx;
|
||||
border: 1rpx solid #FFA07A;
|
||||
white-space: nowrap;
|
||||
z-index: 10;
|
||||
line-height: 1.2;
|
||||
}
|
||||
|
||||
.job-header {
|
||||
margin-bottom: 16rpx;
|
||||
padding-right: 100rpx;
|
||||
}
|
||||
|
||||
.job-title {
|
||||
|
||||
Reference in New Issue
Block a user