Files
ks-app-employment-service/pages/service/components/SkillDevelopment.vue

356 lines
9.5 KiB
Vue
Raw Normal View History

2026-01-22 01:15:41 +08:00
<!--suppress JSFileReferences, NpmUsedModulesInstalled, VueMissingComponentImportInspection, HtmlUnknownTag -->
<script setup>
import { useSkillDevelopmentStore } from '@/stores/useSkillDevelopmentStore';
2026-01-21 14:26:34 +08:00
2026-01-22 01:15:41 +08:00
const store = useSkillDevelopmentStore();
</script>
2026-01-21 14:26:34 +08:00
2026-01-22 01:15:41 +08:00
<template>
<div class="skill-development">
<!-- 职业技能查询区域 -->
<div class="query-section">
<div class="section-title">
<uni-icons color="#286BFA" size="18" type="search"></uni-icons>
<span class="title-text">技能发展路径查询</span>
</div>
<div class="input-group">
<div class="input-item">
<span class="input-label">当前职位</span>
<picker @change="store.eventProfession" :value="store.professionIndex" :range="store.professionsRef" range-key="label">
<div class="picker-field">
<span :class="store.professionLabel ? 'picker-text' : 'picker-placeholder'">
{{ store.professionLabel || '请选择目标职业' }}
</span>
<uni-icons color="#999999" size="16" type="down"></uni-icons>
</div>
</picker>
</div>
<div class="input-item">
<span class="input-label">目标职业</span>
<picker :range="store.pathsRef" :value="store.targetCareerIndex" range-key="label" @change="store.eventTargetCareer">
<div class="picker-field">
<span :class="store.targetCareerLabel ? 'picker-text' : 'picker-placeholder'">
{{ store.targetCareerLabel || '请选择目标职业' }}
</span>
<uni-icons color="#999999" size="16" type="down"></uni-icons>
</div>
</picker>
</div>
<button class="query-btn" @click="store.eventSearch">
<span>查询技能发展路径</span>
<uni-icons color="#FFFFFF" size="18" type="search"></uni-icons>
2025-12-04 14:38:54 +08:00
</button>
2026-01-22 01:15:41 +08:00
</div>
</div>
2026-01-23 18:38:13 +08:00
<div v-if="store.careerPaths.length" class="content-section career-section">
2026-01-23 15:43:53 +08:00
<div class="section-title">
<span class="title-text">职业路径</span>
</div>
<div class="">
<scroll-view scroll-x>
<div class="career-paths">
<template v-for="(item, index) in store.careerPaths" :key="item.label">
<div
:class="{ 'career-active': store.currentCareer && store.currentCareer.value === item.value }"
class="career-path-item"
2026-01-23 18:38:13 +08:00
@click="store.eventResult(index)"
2026-01-23 15:43:53 +08:00
>
<div
class="career-index"
>
2026-01-23 18:38:13 +08:00
<span class="index">{{ item.index }}</span>
2026-01-23 15:43:53 +08:00
</div>
<div class="career-label">{{ item.label }}</div>
</div>
</template>
</div>
</scroll-view>
</div>
</div>
2026-01-23 18:38:13 +08:00
<div v-if="store.careerPaths.length" class="content-section">
2026-01-22 01:15:41 +08:00
<div class="section-title">
<uni-icons color="#000000" size="18" type="person-filled"></uni-icons>
2026-01-23 15:43:53 +08:00
<span class="title-text">{{ store.currentCareerLabel }}技能</span>
2026-01-22 01:15:41 +08:00
</div>
<div class="skill-list">
<div v-if="store.result.length === 0" class="empty-text">暂无数据</div>
2026-01-23 18:38:13 +08:00
<div v-for="(item, index) in store.result" :key="index" class="skill-card">
<div class="skill-label">{{ item.label }}</div>
<div class="skill-detail">
<div v-for="d in item.children" :key="d.label" class="skill-detail-item">
2026-01-23 18:46:13 +08:00
<div class="skill-detail-item-label">{{ d.label }}</div>
2026-01-23 18:38:13 +08:00
<div class="skill-detail-item-value">
<div class="value-item">技能得分{{ d.value }}</div>
<div class="value-item">权重{{ d.weight }}</div>
2026-01-23 15:43:53 +08:00
</div>
2026-01-22 01:15:41 +08:00
</div>
</div>
</div>
</div>
</div>
</div>
</template>
<style lang="scss" scoped>
.skill-development {
2025-12-04 14:38:54 +08:00
padding: 10rpx 28rpx 20rpx;
background-color: #EBF4FF;
2026-01-22 01:15:41 +08:00
min-height: 95%;
}
2025-12-04 14:38:54 +08:00
.query-section {
background-color: #FFFFFF;
border-radius: 16rpx;
padding: 28rpx;
margin-bottom: 20rpx;
box-shadow: 0 4rpx 12rpx rgba(0, 0, 0, 0.08);
2026-01-21 14:26:34 +08:00
2025-12-04 14:38:54 +08:00
.section-title {
margin-top: 0;
}
}
.content-section {
2025-12-04 14:38:54 +08:00
background-color: #FFFFFF;
border-radius: 16rpx;
padding: 28rpx;
2026-01-23 18:38:13 +08:00
margin-bottom: 20rpx;
box-sizing: border-box;
overflow: visible;
2025-12-04 14:38:54 +08:00
box-shadow: 0 4rpx 12rpx rgba(0, 0, 0, 0.08);
}
.input-group {
display: flex;
flex-direction: column;
gap: 20rpx;
margin-bottom: 24rpx;
}
.input-label {
font-size: 28rpx;
color: #000000;
font-weight: 500;
}
.input-field {
background-color: #F5F5F5;
border: 1rpx solid #E0E0E0;
border-radius: 12rpx;
padding: 20rpx 24rpx;
font-size: 28rpx;
color: #666666;
}
.path-summary {
margin-top: 16rpx;
font-size: 24rpx;
color: #666666;
text-align: center;
}
button::after {
border: none;
}
2026-01-23 18:38:13 +08:00
.section-title {
2026-01-22 09:31:07 +08:00
font-size: 32rpx;
color: #000000;
display: flex;
align-items: center;
gap: 12rpx;
margin-bottom: 24rpx;
2026-01-21 14:26:34 +08:00
2025-12-04 14:38:54 +08:00
.content-section & {
margin-top: 0;
}
}
2026-01-23 15:43:53 +08:00
.career-paths {
2026-01-23 18:38:13 +08:00
display: grid;
2026-01-23 15:43:53 +08:00
grid-auto-flow: column;
2026-01-23 18:38:13 +08:00
gap: 20px;
padding-bottom: 10px;
2026-01-23 18:38:13 +08:00
.career-path-item {
display: flex;
flex-direction: column;
align-items: center;
width: 80px;
padding: 5px;
font-weight: 700;
cursor: pointer;
2026-01-23 15:43:53 +08:00
.career-index {
2026-01-23 18:38:13 +08:00
position: relative;
display: flex;
justify-content: center;
align-items: center;
width: 48px;
height: 48px;
font-size: 20px;
color: #fff;
border-radius: 50%;
.index {
position: relative;
z-index: 10;
}
&:before,
&:after {
content: '';
position: absolute;
}
&:before {
inset: 0;
z-index: 1;
background: #6c64e7;
border: 3px solid #fff;
border-radius: 50%;
box-shadow: 0 1px 5px rgba(0, 0, 0, 0.3);
}
&:after {
content: '';
position: absolute;
top: 50%;
right: 50%;
z-index: 0;
width: 100px;
border-bottom: 4px solid #ccc;
}
2026-01-23 15:43:53 +08:00
}
.career-label {
2026-01-23 18:38:13 +08:00
margin-top: 10px;
font-size: 16px;
text-align: center;
color: #6c64e7;
2026-01-23 15:43:53 +08:00
}
2025-12-04 14:38:54 +08:00
2026-01-23 18:38:13 +08:00
&.career-active {
.career-index {
&:before {
background: #22c55e;
}
&:after {
border-color: #22c55e;
}
}
.career-label {
color: #000;
}
& + .career-path-item {
.career-index {
&:after {
border-color: #22c55e;
}
}
}
}
2025-12-04 14:38:54 +08:00
2026-01-23 18:38:13 +08:00
&:first-child {
.career-index {
font-size: 16px;
2026-01-23 18:38:13 +08:00
&:after {
display: none;
}
}
}
2026-01-23 15:43:53 +08:00
2026-01-23 18:38:13 +08:00
&:last-child {
.career-index {
font-size: 16px;
}
}
2026-01-23 15:43:53 +08:00
}
}
2026-01-23 15:43:53 +08:00
</style>
<style lang="scss" scoped>
2026-01-23 18:38:13 +08:00
.title-text {
font-size: 32rpx;
font-weight: 600;
color: #167CF1;
}
2026-01-23 15:43:53 +08:00
2026-01-23 18:38:13 +08:00
.skill-card {
margin-bottom: 14px;
box-sizing: border-box;
font-weight: 700;
2026-01-23 15:43:53 +08:00
2026-01-23 18:38:13 +08:00
.skill-list {
2026-01-23 15:43:53 +08:00
display: flex;
flex-direction: column;
2026-01-23 18:38:13 +08:00
gap: 20rpx;
2026-01-23 15:43:53 +08:00
}
2026-01-23 18:38:13 +08:00
.skill-item {
width: 100%;
max-width: 796rpx;
min-height: 162rpx;
line-height: 40rpx;
border-radius: 20rpx;
background-color: rgba(239, 239, 239, 1);
color: rgba(16, 16, 16, 1);
font-size: 28rpx;
text-align: center;
padding: 24rpx;
box-sizing: border-box;
2026-01-23 15:43:53 +08:00
display: flex;
2026-01-23 18:38:13 +08:00
flex-direction: column;
2026-01-23 15:43:53 +08:00
justify-content: center;
2026-01-23 18:38:13 +08:00
overflow: visible;
position: relative;
2026-01-23 15:43:53 +08:00
}
2026-01-23 18:38:13 +08:00
.skill-label {
margin-bottom: 10px;
font-size: 16px;
color: #94a3b8;
2026-01-23 15:43:53 +08:00
}
2026-01-23 18:38:13 +08:00
.skill-detail {
display: flex;
flex-direction: column;
gap: 8px;
.skill-detail-item {
display: flex;
justify-content: space-between;
align-items: center;
padding: 8px;
border-radius: 3px;
background: #c1d2ea;
2026-01-23 15:43:53 +08:00
}
2026-01-23 18:38:13 +08:00
.skill-detail-item-label {
width: 55%;
word-wrap: break-word;
white-space: pre-wrap;
word-break: break-all;
color: #334155;
}
.skill-detail-item-value {
width: 45%;
padding-left: 6px;
color: #4f46e5;
box-sizing: border-box;
.value-item {
text-wrap: nowrap;
}
2026-01-23 15:43:53 +08:00
}
}
}
2026-01-23 15:43:53 +08:00
</style>