55 Commits

Author SHA1 Message Date
4dce6d3e39 = 职业规划推荐 2026-01-22 15:18:12 +08:00
172d4fab05 = 职业规划推荐 2026-01-22 15:09:13 +08:00
fce328566a = 职业规划推荐 2026-01-22 15:08:19 +08:00
1d2b0458a5 Merge branch 'main' into yxl 2026-01-22 14:25:27 +08:00
francis_fh
80bd1ee181 AI小程序端样式修复 2026-01-22 14:05:22 +08:00
francis_fh
96c89e0210 修改api地址为正式环境 2026-01-22 13:25:42 +08:00
francis_fh
598a3205fa Merge branch 'main' of http://124.243.245.42:3000/sdz/ks-app-employment-service 2026-01-22 12:57:03 +08:00
francis_fh
f73d3f7a8c 地区选择开发,AI接口联调 2026-01-22 12:57:01 +08:00
bd0c2d0497 = 职业规划推荐 2026-01-22 09:31:07 +08:00
ef9d38d41f = 职业规划推荐 2026-01-22 09:27:38 +08:00
dcbb3e02a7 = 职业规划推荐 2026-01-22 01:15:41 +08:00
xuchao
98e0d5d833 招聘会列表添加地区筛选 2026-01-21 18:44:04 +08:00
7480651af2 = 职业规划推荐 2026-01-21 16:12:19 +08:00
3f7664f017 = 职业规划推荐 2026-01-21 14:26:34 +08:00
hanguangpu01
d817ce2524 fix(practice): 修复练习页面题目列表滚动和接口调用问题
- 为题目编号容器添加高度限制和滚动样式
- 修复练习列表页面接口地址错误,从 trainVideoList 改为 getQuestionTypes
- 优化题目列表的显示效果和用户体验
2026-01-21 11:30:17 +08:00
a5e30ac7f5 = 职业规划推荐 2026-01-21 09:47:09 +08:00
xuchao
5430678eaf 简历投递添加确认弹窗、企业招聘会自动更新统一社会信用代码及userid 2026-01-20 12:07:30 +08:00
699035026e Merge branch 'main' of http://124.243.245.42:3000/sdz/ks-app-employment-service 2026-01-20 09:55:34 +08:00
abd2e79a15 素质测评 ai面试修改域名访问地址 2026-01-20 09:55:27 +08:00
francis_fh
7dcfbd35fe 增加零工市场 2026-01-19 19:09:14 +08:00
9cf5905d5f 素质测评 删除多余代码,运行web 2026-01-19 11:36:17 +08:00
xuchao
a1a94b264c 模拟考试卡片样式优化 2026-01-19 10:46:22 +08:00
xuchao
cf3ed1bae2 删除帮扶、招聘会多余点击事件 2026-01-19 10:35:07 +08:00
francis_fh
445121ac8d Merge branch 'main' of http://124.243.245.42:3000/sdz/ks-app-employment-service 2026-01-19 10:25:59 +08:00
francis_fh
afcb29c51c 帮扶点击事件误删修复 2026-01-19 10:25:58 +08:00
hanguangpu01
fe7eed4c1a feat(train): 新增专项训练列表页面并调整练习流程
- 新增 startPracticingList.vue 页面用于展示专项训练列表
- 修改首页按钮跳转链接从 startPracticing 改为 startPracticingList
- 在 pages.json 中注册新的专项训练列表页面路由
- 更新 startPracticing.vue 页面接收分类参数并传递给接口
- 实现专项训练列表的分页加载和搜索功能
- 添加专项训练项目的分类显示和难度标识
2026-01-16 17:29:07 +08:00
ba38158d4c 图标修改 2026-01-16 17:03:03 +08:00
385274b3ef Merge branch 'main' of http://124.243.245.42:3000/sdz/ks-app-employment-service 2026-01-16 16:50:14 +08:00
d983bb272b 通知公告 2026-01-16 16:50:06 +08:00
fb95e1c74e 修改 2026-01-16 16:40:55 +08:00
ce7d261e4b 评价机构信息 2026-01-16 16:34:46 +08:00
f8a7f94433 评价机构信息 2026-01-16 16:04:00 +08:00
xuchao
d6b6fdcc38 模拟考试获取当天日期精准至时分秒 2026-01-16 12:42:44 +08:00
xuchao
1508a1a717 首页恢复招聘会、帮扶页面跳转事件 2026-01-16 12:42:04 +08:00
francis_fh
e444f07dc4 帮扶入口点击事件修复 2026-01-16 11:58:07 +08:00
ef25f954a4 详情 2026-01-16 11:30:48 +08:00
211c950ab7 修改 2026-01-16 10:14:09 +08:00
f506c4154a 修改 2026-01-16 10:08:59 +08:00
07c84cef8a 评价培训机构及公告页面 2026-01-16 09:38:44 +08:00
francis_fh
a663010b61 在招职位列表显示 2026-01-15 19:59:55 +08:00
francis_fh
a299608fca 投递简历的时候验证登录 2026-01-14 23:07:09 +08:00
francis_fh
637d50c811 Merge branch 'main' of http://124.243.245.42:3000/sdz/ks-app-employment-service 2026-01-14 22:27:55 +08:00
francis_fh
3246958704 111 2026-01-14 22:27:54 +08:00
lip
b7c54c3c2e zh政策分页 2026-01-14 22:23:48 +08:00
francis_fh
4d4ecdb858 Merge branch 'main' of http://124.243.245.42:3000/sdz/ks-app-employment-service 2026-01-14 22:02:09 +08:00
francis_fh
d2653c8394 token打印测试 2026-01-14 22:02:07 +08:00
lip
0cfe2d5448 更改该bug 2026-01-14 21:33:36 +08:00
lip
30e3804dfa 添加政策传参 2026-01-14 21:26:21 +08:00
francis_fh
cc6da8adfd H5环境登录改造 2026-01-14 18:46:13 +08:00
francis_fh
daa2ce254a 11 2026-01-14 17:44:38 +08:00
francis_fh
d8bd4e7759 单位详情页面样式修改 2026-01-14 14:25:05 +08:00
francis_fh
33faac2ff2 一体机删除薪酬信息、筛选的时候增加工位数 2026-01-14 12:19:04 +08:00
francis_fh
74b9c32b03 一体机首页滑动修改、简历知道页面隐藏开始制作简历按钮 2026-01-14 00:14:26 +08:00
francis_fh
782242beec Merge branch 'main' of http://124.243.245.42:3000/sdz/ks-app-employment-service 2026-01-14 00:01:29 +08:00
francis_fh
0f374530a1 111 2026-01-14 00:01:27 +08:00
77 changed files with 5314 additions and 1887 deletions

View File

@@ -1,33 +0,0 @@
/*
* @Date: 2025-11-12
* @Description: 职业推荐相关接口
*/
import request from '@/utilsRc/request'
function createFormData(payload = {}) {
if (typeof FormData !== 'undefined') {
const formData = new FormData()
Object.keys(payload).forEach(key => {
const value = payload[key]
if (value !== undefined && value !== null && value !== '') {
formData.append(key, value)
}
})
return formData
}
return payload
}
export function recommendJob(data) {
const params = {};
if (data?.jobName !== undefined && data?.jobName !== null && data?.jobName !== '') {
params.jobName = String(data.jobName);
}
return request({
url: '/job/recommendJobByJobName',
method: 'get',
params: params,
baseUrlType: 'zytp'
})
}

View File

@@ -1,55 +0,0 @@
/*
* @Date: 2025-11-12
* @Description: 职业技能相关接口
*/
import request from '@/utilsRc/request'
export function getJobSkillDetail(params) {
return request({
url: '/jobSkillDet/getJobSkillDet',
method: 'get',
params,
baseUrlType: 'zytp'
})
}
// 获取技能权重
export function getJobSkillWeight(params) {
return request({
url: '/jobSkillDet/getJobSkillWeight',
method: 'get',
params,
baseUrlType: 'zytp'
})
}
// 暂未使用 - 如果需要在 CareerPath.vue 中点击路径职位查看详细技能信息时使用
// 使用场景:获取职业路径中某个职位的详细技能信息(包含技能分数、类型等)
// export function getJobPathSkill(data) {
// let formData
// if (typeof FormData !== 'undefined') {
// formData = new FormData()
// if (data?.pathId !== undefined && data?.pathId !== null) {
// formData.append('pathId', data.pathId)
// }
// if (data?.currentJobName !== undefined && data?.currentJobName !== null) {
// formData.append('currentJobName', data.currentJobName)
// }
// } else {
// formData = {
// pathId: data?.pathId ?? '',
// currentJobName: data?.currentJobName ?? ''
// }
// }
// return request({
// url: '/jobSkillDet/getJobPathSkill',
// method: 'post',
// data: formData,
// baseUrlType: 'zytp',
// header: {
// 'content-type': 'multipart/form-data'
// }
// })
// }

View File

@@ -0,0 +1,37 @@
/*
* @Date: 2024-09-25 11:14:29
* @LastEditors: shirlwang
* @LastEditTime: 2025-12-23 17:40:11
* @Description: 职业路径相关接口
*/
import request from '@/utilsRc/request'
// 获取当前职位
export function getCurrentPosition(query) {
return request({
url: '/jobPath/getJob',
method: 'get',
params: query,
baseUrlType: 'zytp'
})
}
// 获取路径列表
export function getPath(query) {
return request({
url: '/jobPath/getJobPathList',
method: 'get',
params: query,
baseUrlType: 'zytp'
})
}
// 获取路径详情
export function getPathDetail(query) {
return request({
url: '/jobPath/getJobPathById',
method: 'get',
params: query,
baseUrlType: 'zytp'
})
}

View File

@@ -0,0 +1,37 @@
/*
* @Date: 2024-09-25 11:14:29
* @LastEditors: shirlwang
* @LastEditTime: 2025-12-23 17:40:11
* @Description: 职业推荐相关接口
*/
import request from '@/utilsRc/request'
// 获取职业列表
export function getProfessions(query) {
return request({
url: '/jobSimilarity/getJob',
method: 'get',
params: query,
baseUrlType: 'zytp'
})
}
// 获取技能标签
export function getSkillTags(query) {
return request({
url: '/jobSkillDet/getJobSkill',
method: 'get',
params: query,
baseUrlType: 'zytp'
})
}
// 获取推荐职业
export function getRecommend(query) {
return request({
url: '/jobSimilarity/recommendJobByJobName',
method: 'get',
params: query,
baseUrlType: 'zytp'
})
}

View File

@@ -76,11 +76,16 @@ export function getAddedJobs(params) {
})
}
// // 获取推荐岗位
// export function getAddedJobs(params) {
// return request({
// url: '/personnel/personBaseInfo/postRecommend',
// method: 'get',
// params,
// })
// }
export function recommendJob(data) {
const params = {};
if (data?.jobName !== undefined && data?.jobName !== null && data?.jobName !== '') {
params.jobName = String(data.jobName);
}
return request({
url: '/job/recommendJobByJobName',
method: 'get',
params: params,
baseUrlType: 'zytp'
})
}

24
apiRc/service/jobSkill.js Normal file
View File

@@ -0,0 +1,24 @@
/*
* @Date: 2025-11-12
* @Description: 职业技能相关接口
*/
import request from '@/utilsRc/request'
export function getJobSkillDetail(params) {
return request({
url: '/jobSkillDet/getJobSkillDet',
method: 'get',
params,
baseUrlType: 'zytp'
})
}
// 获取技能权重
export function getJobSkillWeight(params) {
return request({
url: '/jobSkillDet/getJobSkillWeight',
method: 'get',
params,
baseUrlType: 'zytp'
})
}

View File

@@ -0,0 +1,17 @@
/*
* @Date: 2024-09-25 11:14:29
* @LastEditors: shirlwang
* @LastEditTime: 2025-12-23 17:40:11
* @Description: 技能发展相关接口
*/
import request from '@/utilsRc/request'
// 获取技能信息
export function getSkill(query) {
return request({
url: '/jobSkillDet/getJobSkillWeight',
method: 'get',
params: query,
baseUrlType: 'zytp'
})
}

View File

@@ -1,7 +1,12 @@
<template>
<view class="markdown-body">
<!-- 根据不同平台使用不同的渲染方式 -->
<!-- #ifdef MP-WEIXIN -->
<rich-text class="markdownRich" id="markdown-content" :nodes="renderedHtml" @itemclick="handleItemClick" />
<!-- <view class="markdown-body" v-html="renderedHtml"></view> -->
<!-- #endif -->
<!-- #ifndef MP-WEIXIN -->
<view class="markdown-body" v-html="renderedHtml"></view>
<!-- #endif -->
</view>
</template>
@@ -267,7 +272,7 @@ ol {
</style>
<style lang="stylus">
.custom-more{
.custom-more
display: flex
justify-content: center
align-items: center
@@ -282,15 +287,16 @@ ol {
transition: all 0.3s ease
position: relative
overflow: hidden
.more-icon{
width: 32rpx;
height: 32rpx;
background: url('@/static/svg/seemore.svg') center center no-repeat;
.more-icon
width: 32rpx
height: 32rpx
background: url('@/static/svg/seemore.svg') center center no-repeat
background-size: 100% 100%
margin-left: 12rpx
filter: brightness(0) invert(1)
}
&::before {
&::before
content: ''
position: absolute
top: 0
@@ -299,93 +305,124 @@ ol {
height: 100%
background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent)
transition: left 0.5s ease
}
&:active {
&:active
transform: translateY(2rpx)
box-shadow: 0rpx 4rpx 16rpx rgba(37, 107, 250, 0.4)
}
&:active::before {
&:active::before
left: 100%
}
}
/* 为小程序专门优化的样式 */
/* #ifdef MP-WEIXIN */
.rich-text-container
padding: 0 20rpx
.markdownRich
padding: 0
/* #endif */
.custom-card
background: #FFFFFF;
box-shadow: 0rpx 0rpx 8rpx 0rpx rgba(0,0,0,0.04);
border-radius: 20rpx 20rpx 20rpx 20rpx;
padding: 28rpx 24rpx;
font-weight: 400;
font-size: 28rpx;
color: #333333;
margin-bottom: 20rpx;
position: relative;
display: flex;
background: #FFFFFF
box-shadow: 0rpx 0rpx 8rpx 0rpx rgba(0,0,0,0.04)
border-radius: 20rpx
padding: 28rpx 24rpx
font-weight: 400
font-size: 28rpx
color: #333333
margin-bottom: 20rpx
position: relative
display: flex
flex-direction: column
/* 确保在小程序中边距正确应用 */
/* #ifdef MP-WEIXIN */
margin-left: auto
margin-right: auto
width: 100%
box-sizing: border-box
/* #endif */
.card-title
font-weight: 600;
display: flex;
align-items: center;
font-weight: 600
display: flex
align-items: center
justify-content: space-between
margin-bottom: 16rpx
.title-text
font-family: 'PingFangSC-Medium', 'PingFang SC', 'Helvetica Neue', Helvetica, Arial, 'Microsoft YaHei', sans-serif;
max-width: calc(100% - 160rpx);
font-family: 'PingFangSC-Medium', 'PingFang SC', 'Helvetica Neue', Helvetica, Arial, 'Microsoft YaHei', sans-serif
max-width: calc(100% - 160rpx)
overflow: hidden
text-overflow: ellipsis
font-size: 30rpx
line-height: 1.4
.card-salary
font-family: DIN-Medium;
font-size: 28rpx;
color: #FF6E1C;
font-family: DIN-Medium
font-size: 28rpx
color: #FF6E1C
line-height: 1.4
.card-company
margin-top: 16rpx;
max-width: calc(100%);
overflow: hidden;
margin-bottom: 22rpx
max-width: 100%
overflow: hidden
text-overflow: ellipsis
color: #6C7282;
color: #6C7282
line-height: 1.4
.card-info
margin-top: 22rpx;
display: flex;
align-items: center;
justify-content: space-between;
padding-right: 40rpx;
display: flex
align-items: center
justify-content: space-between
padding-right: 40rpx
.info-item
display: flex;
position: relative;
align-items: center;
color: #256BFA;
font-size: 28rpx;
display: flex
position: relative
align-items: center
&:last-child
color: #256BFA
font-size: 28rpx
padding-right: 10rpx
.position-nav
position: absolute;
right: -10rpx;
top: 50%;
position: absolute
right: -10rpx
top: 50%
transform: translateY(-50%)
.position-nav::before
position: absolute;
left: 0;
top: -4rpx;
content: '';
width: 4rpx;
height: 16rpx;
position: absolute
left: 0
top: -4rpx
content: ''
width: 4rpx
height: 16rpx
border-radius: 2rpx
background: #256BFA;
transform: translate(0, -50%) rotate(-45deg) ;
background: #256BFA
transform: translate(0, -50%) rotate(-45deg)
.position-nav::after
position: absolute;
left: 0;
top: -4rpx;
content: '';
width: 4rpx;
height: 16rpx;
position: absolute
left: 0
top: -4rpx
content: ''
width: 4rpx
height: 16rpx
border-radius: 2rpx
background: #256BFA;
background: #256BFA
transform: rotate(45deg)
.card-tag
font-weight: 500;
font-size: 24rpx;
color: #333333;
width: fit-content;
background: #F4F4F4;
border-radius: 4rpx 4rpx 4rpx 4rpx;
padding: 4rpx 20rpx;
margin-right: 16rpx;
font-weight: 500
font-size: 24rpx
color: #333333
width: fit-content
background: #F4F4F4
border-radius: 4rpx
padding: 4rpx 20rpx
margin-right: 16rpx
margin-bottom: 0
</style>

View File

@@ -11,7 +11,6 @@
<view class="auth-header">
<image class="auth-logo" src="@/static/logo2-S.png" mode="aspectFit"></image>
<view class="auth-title">欢迎使用就业服务</view>
<view class="auth-subtitle">需要您授权手机号登录</view>
</view>
<!-- 角色选择 -->
@@ -26,7 +25,7 @@
<view class="role-icon">
<uni-icons type="person" size="32" :color="userType === 1 ? '#256BFA' : '#999'"></uni-icons>
</view>
<view class="role-text">我是求职者</view>
<view class="role-text">个人</view>
</view>
<view
class="role-item"
@@ -36,7 +35,7 @@
<view class="role-icon">
<uni-icons type="shop" size="32" :color="userType === 0 ? '#256BFA' : '#999'"></uni-icons>
</view>
<view class="role-text">我是招聘者</view>
<view class="role-text">单位</view>
</view>
</view>
</view>

View File

@@ -6,8 +6,7 @@
*/
export default {
// baseUrl: 'http://39.98.44.136:8080', // 测试
baseUrl: 'https://www.xjksly.cn/api/ks', // 测试
// baseUrl: 'https://www.xjksly.cn/api/ks', // 测试
baseUrl: 'https://www.xjksly.cn/api/ks', // 正式环境
// baseUrl: 'http://ks.zhaopinzao8dian.com/api/ks', // 测试
// LCBaseUrl:'http://10.110.145.145:9100',//内网端口
@@ -20,13 +19,14 @@ export default {
trainVideoImgUrl:'https://www.xjksly.cn/prod-api/file/file/minio',
// sseAI+
// StreamBaseURl: 'http://39.98.44.136:8000',
StreamBaseURl: 'https://qd.zhaopinzao8dian.com/ai',
StreamBaseURl: 'https://www.xjksly.cn/api/ks/app/chat',
// StreamBaseURl: 'https://qd.zhaopinzao8dian.com/ai/test',
// 语音转文字
// vioceBaseURl: 'ws://39.98.44.136:8080/speech-recognition',
vioceBaseURl: 'wss://qd.zhaopinzao8dian.com/api/speech-recognition',
vioceBaseURl: 'https://www.xjksly.cn/api/ks/app/speech/asr',
// vioceBaseURl: 'wss://qd.zhaopinzao8dian.com/api/speech-recognition',
// 语音合成
speechSynthesis: 'wss://qd.zhaopinzao8dian.com/api/speech-synthesis',
speechSynthesis: 'https://www.xjksly.cn/api/ks/app/speech/tts',
// speechSynthesis: 'wss://qd.zhaopinzao8dian.com/api/speech-synthesis',
// indexedDB
DBversion: 2,
// 只使用本地缓寸的数据

View File

@@ -45,7 +45,7 @@
---
### 2. ``getJobPathById`- 根据职业路径ID获取详情
### 2. `getJobPathById`- 根据职业路径ID获取详情
- **接口路径**: `/jobPath/getJobPathById`
- **请求方法**: `GET`
- **接口类型**: `zytp`

View File

@@ -292,11 +292,6 @@ export function useTTSPlayer(wsUrl) {
onHide(cancelAudio)
onUnload(cancelAudio)
// 只在支持 AudioContext 的环境中初始化 WebSocket
if (audioContext) {
initWebSocket()
}
return {
speak,
pause,

View File

@@ -25,9 +25,7 @@
</view>
<view class="conetent-info" :class="{ expanded: isExpanded }">
<view class="info-title">公司介绍</view>
<view class="info-desirption">{{
companyInfo?.description || '暂无公司介绍'
}}</view>
<view class="info-desirption" v-html="companyInfo?.description"></view>
<!-- <view class="info-title title2">公司地址</view>
<view class="locationCompany"></view> -->
</view>
@@ -142,6 +140,8 @@
isCollection: resData.data.isCollection || 0,
jobList: resData.data.jobList || [] // 使用正确的jobList字段
};
// 将职位列表数据赋值给jobInfoList用于页面渲染
jobInfoList.value = resData.data.jobList || [];
console.log('Company details loaded successfully');
} else {
console.error('Failed to load company details:', resData?.msg || 'Unknown error');
@@ -153,6 +153,7 @@
isCollection: 0,
jobList: []
};
jobInfoList.value = [];
}
}).catch((error) => {
console.error('API error when fetching company details:', error);
@@ -164,6 +165,7 @@
isCollection: 0,
jobList: []
};
jobInfoList.value = [];
});
}
@@ -443,8 +445,13 @@
font-size: 28rpx;
color: #495265;
text-align: justified;
:deep(span) {
background-color: transparent !important;
}
:deep(p > span) {
background-color: transparent !important;
}
}
.title2 {
margin-top: 48rpx;
}

View File

@@ -67,9 +67,9 @@ const { dictLabel, oneDictData, getDictData } = useDictStore();
const selectJobsModel = ref();
const selectPopupRef = ref();
const percent = ref('0%');
const salay = [2, 5, 10, 15, 20, 25, 30, 50, 80, 100];
const salay = [2000, 5000, 10000, 15000, 20000, 25000, 30000, 50000, 80000, 100000];
const state = reactive({
lfsalay: [2, 5, 10, 15, 20, 25, 30, 50],
lfsalay: [2000, 5000, 10000, 15000, 20000, 25000, 30000, 50000],
risalay: JSON.parse(JSON.stringify(salay)),
salayText: '',
areaText: '',
@@ -137,10 +137,10 @@ const changeSalary = () => {
title: '薪资',
maskClick: true,
data: [state.lfsalay, state.risalay],
unit: 'k',
unit: '',
success: (_, [min, max]) => {
fromValue.salaryMin = min.value * 1000;
fromValue.salaryMax = max.value * 1000;
fromValue.salaryMin = min.value;
fromValue.salaryMax = max.value;
state.salayText = `${fromValue.salaryMin}-${fromValue.salaryMax}`;
},
change(e) {

View File

@@ -51,7 +51,7 @@
</view>
<view class="mys-text">
<text>期望薪资</text>
<text>{{ userInfo.salaryMin / 1000 }}k-{{ userInfo.salaryMax / 1000 }}k</text>
<text>{{ userInfo.salaryMin }}-{{ userInfo.salaryMax }}</text>
</view>
<view class="mys-text">
<text>期望工作地</text>

View File

@@ -107,7 +107,7 @@
<text class="title">公司信息</text>
<text
class="btntext button-click"
@click="navTo(`/packageA/pages/UnitDetails/UnitDetails?companyId=${jobInfo.company.companyId}`)"
@click="handleCompanyDetailClick"
>
单位详情
</text>
@@ -289,7 +289,6 @@ onShow(() => {
}
// #endif
});
function initLoad(option) {
const jobId = decodeURIComponent(option.jobId);
if (jobId !== jobIdRef.value) {
@@ -341,9 +340,14 @@ function getDetail(jobId) {
}
function getCompanyIsAJobs(companyId) {
if (companyId) {
$api.createRequest(`/app/company/count/${companyId}`).then((resData) => {
companyCount.value = resData.data;
});
}
// $api.createRequest(`/app/company/count/${companyId}`).then((resData) => {
// companyCount.value = resData.data;
// });
}
function getTextWidth(text, size = 12) {
@@ -413,6 +417,11 @@ function getCompetivetuveness(jobId) {
// 申请岗位
function jobApply() {
const tokenValue = uni.getStorageSync('token') || '';
if (!tokenValue) {
$api.msg('请您先登录');
return;
}
const jobId = jobInfo.value.jobId;
$api.createRequest(`/app/job/apply/${jobId}`, {}, 'GET').then((resData) => {
getDetail(jobId);
@@ -504,6 +513,17 @@ function previewImage(url, index) {
function viewResume(userId) {
navTo(`/packageA/pages/resumeDetail/resumeDetail?userId=${userId}`);
}
// 处理查看单位详情
function handleCompanyDetailClick() {
// console.log('----企业ID--', jobInfo.value.company?.companyId)
// console.log('----企业data--', jobInfo.value)
if (jobInfo.value.company?.companyId) {
navTo(`/packageA/pages/UnitDetails/UnitDetails?companyId=${jobInfo.value.company.companyId}`);
} else {
$api.msg('没有企业信息');
}
}
</script>
<style lang="stylus" scoped>

View File

@@ -0,0 +1,364 @@
<template>
<div class="app-box">
<div class="con-box">
<!-- <view class="collection-search">
<view class="search-content">
<view class="header-input button-click">
<uni-icons class="iconsearch" color="#6A6A6A" type="search" size="22"></uni-icons>
<input
class="input"
v-model="searchKeyword"
@confirm="searchVideo"
placeholder="输入考试名称"
placeholder-class="inputplace"
/>
<uni-icons
v-if="searchKeyword"
class="clear-icon"
type="clear"
size="24"
color="#999"
@click="clearSearch"
/>
</view>
</view>
</view> -->
<scroll-view scroll-y class="main-scroll" @scrolltolower="handleScrollToLower">
<div class="cards" v-for="(item,index) in dataList" :key="item.examPaperId">
<div class="cardHead">
<div class="cardHeadLeft">
<div class="cardTitle">{{item.organName}}</div>
</div>
<div class="rightBtn" @click="handleOperation(item)">机构详情</div>
</div>
<div class="heng"></div>
<div class="cardCon">
<div class="conten">机构联系人{{item.contactName}}</div>
<div class="conten">联系方式{{item.contactPhone}}</div>
<div class="conten">机构地址{{item.address}}</div>
</div>
</div>
</scroll-view>
</div>
</div>
</template>
<script setup>
import { inject, ref, reactive } from 'vue';
import { onLoad, onShow } from '@dcloudio/uni-app';
const { $api, navTo, navBack,urls } = inject('globalFunction');
import config from "@/config.js"
const userInfo = ref({});
const Authorization = ref('');
const searchKeyword = ref('');
const dataList=ref([])
const pageSize=ref(10)
const pageNum=ref(1)
const totalNum=ref(0)
const baseUrl = config.imgBaseUrl
const handleScrollToLower = () => {
getDataList('add');
};
onLoad(() => {
});
onShow(()=>{
Authorization.value=uni.getStorageSync('Padmin-Token')||''
getDataList('refresh');
})
// 搜索视频
function searchVideo() {
getDataList('refresh');
}
// 清除搜索内容
function clearSearch() {
searchKeyword.value = '';
getDataList('refresh');
}
// 获取考试列表
function getDataList(type = 'add') {
let maxPage=Math.ceil(totalNum.value/pageSize.value)
let params={}
if (type === 'refresh') {
pageNum.value = 1;
params={
address:"",
pageSize:pageSize.value,
pageNum:pageNum.value,
}
$api.myRequest('/train/public/rate/organ/table', params).then((resData) => {
if(resData.code==200){
dataList.value=resData.rows
totalNum.value=resData.total
}
});
}
if (type === 'add' && pageNum.value < maxPage) {
pageNum.value += 1;
params={
address:"",
pageSize:pageSize.value,
pageNum:pageNum.value,
}
$api.myRequest('/train/public/rate/organ/table', params).then((resData) => {
if(resData.code==200){
dataList.value=dataList.value.concat(resData.rows)
totalNum.value=resData.total
}
});
}
}
function handleOperation(row) {
navTo(`/packageB/institution/evaluationAgencyDetail?organId=${row.organId}`);
}
</script>
<style lang="stylus" scoped>
.app-box{
width: 100%;
height: 100vh;
position: relative;
.con-box{
position: absolute;
width: 100%;
height: 100%;
left: 0;
top:0;
z-index: 10;
padding: 20rpx 28rpx;
box-sizing: border-box;
overflow: hidden;
.collection-search{
padding: 10rpx 20rpx;
.search-content{
position: relative
display: flex
align-items: center
padding: 14rpx 0
.header-input{
padding: 0
width: calc(100%);
position: relative
.iconsearch{
position: absolute
left: 30rpx;
top: 50%
transform: translate(0, -50%)
z-index: 1
}
.input{
padding: 0 80rpx 0 80rpx
height: 80rpx;
background: #FFFFFF;
border-radius: 75rpx 75rpx 75rpx 75rpx;
border: 2rpx solid #ECECEC
font-size: 28rpx;
}
.clear-icon{
position: absolute
right: 30rpx;
top: 50%
transform: translate(0, -50%)
z-index: 1
cursor: pointer
}
.inputplace{
font-weight: 400;
font-size: 28rpx;
color: #B5B5B5;
}
}
}
}
.main-scroll {
width: 100%;
height: 100%;
.cards{
width: 100%;
min-height: 260rpx;
height: auto;
background: linear-gradient(0deg, #E3EFFF 0%, #FBFDFF 100%);
// box-shadow: 0px 0px 6px 0px rgba(0,71,200,0.32);
border-radius: 12rpx;
border: 2px solid #EDF5FF;
margin-bottom: 30rpx;
padding: 30rpx 40rpx 0;
box-sizing: border-box
.cardHead{
display: flex;
align-items: center;
justify-content: space-between;
.cardHeadLeft{
display: flex;
align-items: center
width: 70%;
.cardTitle{
font-weight: bold;
font-size: 28rpx;
color: #0069CB;
max-width: 100%;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.titleType{
border-radius: 4px;
font-size: 22rpx;
color: #157EFF;
width: 100rpx;
height: 38rpx;
text-align: center;
line-height: 38rpx;
margin-left: 10rpx;
}
}
}
.heng{
width: 30%;
height: 4rpx;
background: linear-gradient(88deg, #015EEA 0%, #00C0FA 100%);
margin: 10rpx 0 20rpx;
}
.cardCon{
display: flex;
flex-wrap: wrap;
.conten{
width: 100%;
font-size: 24rpx;
color: #666666;
display: flex;
align-items: center
margin-bottom: 10rpx;
}
.status-tags{
display: flex;
align-items: center;
}
}
.flooter{
border-top: 1px solid #ccc;
display: flex;
justify-content: flex-end;
align-items: center;
view{
font-size: 28rpx;
margin-left: 30rpx;
color: #2175F3;
padding-top: 14rpx;
}
}
}
}
}
.cards2{
position: fixed;
left: 0;
top: 0;
width: 100%;
height: 100vh;
background-color: rgba(0,0,0,0.5);
z-index: 10000;
padding: 100rpx 50rpx;
box-sizing: border-box;
.cardCon{
height: 70%;
background-color: #fff;
padding: 20rpx;
box-sizing: border-box;
.cardHead{
display: flex;
align-items: center;
justify-content: space-between;
font-size: 30rpx;
font-weight: 600;
}
}
}
}
.titleType{
display: inline-block
border-radius: 4px;
font-size: 22rpx;
color: #157EFF;
width: 100rpx;
height: 38rpx;
text-align: center;
line-height: 38rpx;
margin-left: 10rpx;
}
.primary{
border: 1px solid #157EFF!important;
color: #157EFF!important
}
.success{
border: 1px solid #05A636!important;
color: #05A636!important
}
.info{
border: 1px solid #898989!important;
color: #898989!important
}
.tertiary{
border: 1px solid #E6A340!important;
color: #E6A340!important
}
.primary2{
border: 1px solid #F56C6C!important;
color: #F56C6C!important
}
.rightBtn{
width: 140rpx;
height: 44rpx;
line-height: 44rpx;
background: linear-gradient(90deg, #00C0FA 0%, #1271FF 100%);
border-radius: 4px;
color: #fff;
font-size: 24rpx;
text-align: center;
}
.detailTitle{
font-size: 32rpx;
font-weight: 600;
margin: 30rpx 0;
}
.detailCon{
font-size: 28rpx;
line-height: 40rpx;
}
.exam-info {
display: flex;
justify-content: space-between;
margin-bottom: 35rpx;
margin-top: 20rpx;
}
.info-item {
flex: 1;
text-align: center;
}
.info-value {
font-family: 'D-DIN-Medium';
font-size: 26rpx;
font-weight: 600;
color: #409EFF;
margin-bottom: 8rpx;
}
.info-label {
font-size: 26rpx;
color: #333;
}
.info-divider {
width: 2px;
background-color: #C3E1FF;
}
</style>

View File

@@ -0,0 +1,256 @@
<template>
<div class="app-box">
<div class="con-box">
<div class="cards">
<div class="cardHead">
<div class="cardHeadLeft">
<div class="cardTitle">{{organ.organName}}</div>
</div>
<div class="rightBtn" @click="handleOperation()"></div>
</div>
<div class="heng"></div>
<div class="cardCon">
<div class="conten">机构联系人{{organ.contactName}}</div>
<div class="conten">联系方式{{organ.contactPhone}}</div>
<div class="conten">机构地址{{organ.address}}</div>
</div>
</div>
<div style="width: 100%;margin-bottom: 40rpx;">
<div class="title">
<div></div>
<div>评价流程说明</div>
</div>
<div class="kcCon">
<div class="kcIntroduction" v-if="organ.processDescription">{{organ.processDescription}}</div>
<div v-else style="text-align: center;line-height: 100rpx;">暂无数据</div>
</div>
</div>
<div style="width: 100%;margin-bottom: 40rpx;">
<div class="title">
<div></div>
<div>评价项目</div>
</div>
<div class="kcCon">
<div class="kcIntroduction" v-if="organ.organContent">{{organ.organContent}}</div>
<div v-else style="text-align: center;line-height: 100rpx;">暂无数据</div>
</div>
</div>
<div style="width: 100%;margin-bottom: 30rpx;">
<div class="title">
<div></div>
<div>资质证书</div>
</div>
<div class="kcCon">
<div v-for="(item, index) in certs":key = "index" style="width: 100%;">
<div v-for="(url, index2) in item" :key = "index2" style="width: 100%;">
<image :src="url" mode="" style="width: 100%;"></image>
</div>
</div>
<div v-if="certs.length==0" style="text-align: center;line-height: 100rpx;">暂无数据</div>
</div>
</div>
</div>
</div>
</template>
<script setup>
import { inject, ref, reactive } from 'vue';
import { onLoad, onShow } from '@dcloudio/uni-app';
const { $api, navTo, navBack,urls } = inject('globalFunction');
import config from "@/config.js"
const organ = ref({});
const courses = ref([]);
const certs = ref([]);
const certs2 = ref([]);
const teams=ref([])
const certIndex=ref(1)
const organId=ref('')
const Authorization=ref('')
onLoad((options) => {
organId.value=options.organId
});
onShow(()=>{
Authorization.value=uni.getStorageSync('Padmin-Token')||''
let params={
organId:organId.value
}
$api.myRequest('/train/public/rate/organ/model', params).then((resData) => {
if(resData.code==200){
organ.value = (resData.data ? resData.data :{});
certs2.value = (resData ? JSON.parse(resData.data.zhengshu):[]);
for(var i =0;i<certs2.value.length;i++){
certs2.value[i].url =config.LCBaseUrl + "/file/minio" + certs2.value[i].url;
}
var certsArr = [];var flag = 0;
for(var i =0;i<certs2.value.length;i++){
flag ++
certsArr.push(certs2.value[i])
if(flag == 3){
var arrs = [];
for(var j =0;j<3;j++){
arrs.push(certsArr[j].url)
}
certs.value.push(arrs);
certsArr = [];
flag = 0;
}else{
if(i == certs2.value.length -1){
var arrs = [];
for(var j =0;j<certsArr.length;j++){
arrs.push(certsArr[j].url)
}
certs.value.push(arrs);
}
}
}
}
});
})
</script>
<style lang="stylus" scoped>
.app-box{
width: 100%;
height: 100vh;
position: relative;
.con-box{
position: absolute;
width: 100%;
height: 100%;
left: 0;
top:0;
z-index: 10;
padding: 20rpx 28rpx;
box-sizing: border-box;
overflow: hidden;
.cards{
width: 100%;
min-height: 260rpx;
height: auto;
background: linear-gradient(0deg, #D4E3FE 0%, #EBF1FF 100%);
border-radius: 12rpx;
border: 2px solid #EDF5FF;
margin-bottom: 40rpx;
padding: 20rpx 30rpx 0;
box-sizing: border-box
.cardHead{
display: flex;
align-items: center;
justify-content: space-between;
.cardHeadLeft{
display: flex;
align-items: center
width: 100%;
.cardTitle{
font-weight: bold;
font-size: 32rpx;
color: #0069CB;
max-width: 100%;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.titleType{
border-radius: 4px;
font-size: 22rpx;
color: #157EFF;
width: 100rpx;
height: 38rpx;
text-align: center;
line-height: 38rpx;
margin-left: 10rpx;
}
}
}
.heng{
width: 30%;
height: 4rpx;
background: linear-gradient(88deg, #015EEA 0%, #00C0FA 100%);
margin: 10rpx 0 20rpx;
}
.cardCon{
display: flex;
flex-wrap: wrap;
.conten{
width: 100%;
font-size: 26rpx;
color: #666666;
display: flex;
align-items: center
margin-bottom: 10rpx;
}
.status-tags{
display: flex;
align-items: center;
}
}
.flooter{
border-top: 1px solid #ccc;
display: flex;
justify-content: flex-end;
align-items: center;
view{
font-size: 28rpx;
margin-left: 30rpx;
color: #2175F3;
padding-top: 14rpx;
}
}
}
}
}
.title{
width: 100%
display: flex
align-items: center
font-size: 32rpx
font-weight: 600
}
.title>view:first-child{
width: 10rpx;
height: 46rpx;
background-color: #FD7565;
margin-right: 20rpx;
border-radius: 10rpx;
}
.kcCon{
margin-top: 20rpx;
width: 100%
}
.kcIntroduction{
background: rgba(20,136,245,0.1);
padding: 20rpx;
box-sizing: border-box;
border-radius: 10rpx;
margin-bottom: 20rpx;
}
.faculty{
border: 1px solid #ddd;
border-radius: 10rpx;
padding: 10rpx;
margin-bottom: 20rpx;
box-sizing: border-box;
.facultyHead{
width: 100%;
height: 80rpx;
border-radius: 10rpx;
color: #fff;
font-size: 30rpx;
background: linear-gradient(88deg, #3E8BFF 0%, #0DB5FB 100%);
display: flex;
align-items: center
padding: 0 20rpx;
box-sizing: border-box;
}
.facultyCon{
font-size: 26rpx;
color: #666666;
padding: 20rpx 0;
box-sizing: border-box;
}
}
</style>

View File

@@ -0,0 +1,364 @@
<template>
<div class="app-box">
<div class="con-box">
<!-- <view class="collection-search">
<view class="search-content">
<view class="header-input button-click">
<uni-icons class="iconsearch" color="#6A6A6A" type="search" size="22"></uni-icons>
<input
class="input"
v-model="searchKeyword"
@confirm="searchVideo"
placeholder="输入考试名称"
placeholder-class="inputplace"
/>
<uni-icons
v-if="searchKeyword"
class="clear-icon"
type="clear"
size="24"
color="#999"
@click="clearSearch"
/>
</view>
</view>
</view> -->
<scroll-view scroll-y class="main-scroll" @scrolltolower="handleScrollToLower">
<div class="cards" v-for="(item,index) in dataList" :key="item.examPaperId">
<div class="cardHead">
<div class="cardHeadLeft">
<div class="cardTitle">{{item.organName}}</div>
</div>
<div class="rightBtn" @click="handleOperation(item)">机构详情</div>
</div>
<div class="heng"></div>
<div class="cardCon">
<div class="conten">机构联系人{{item.contactName}}</div>
<div class="conten">联系方式{{item.contactPhone}}</div>
<div class="conten">机构地址{{item.address}}</div>
</div>
</div>
</scroll-view>
</div>
</div>
</template>
<script setup>
import { inject, ref, reactive } from 'vue';
import { onLoad, onShow } from '@dcloudio/uni-app';
const { $api, navTo, navBack,urls } = inject('globalFunction');
import config from "@/config.js"
const userInfo = ref({});
const Authorization = ref('');
const searchKeyword = ref('');
const dataList=ref([])
const pageSize=ref(10)
const pageNum=ref(1)
const totalNum=ref(0)
const baseUrl = config.imgBaseUrl
const handleScrollToLower = () => {
getDataList('add');
};
onLoad(() => {
});
onShow(()=>{
Authorization.value=uni.getStorageSync('Padmin-Token')||''
getDataList('refresh');
})
// 搜索视频
function searchVideo() {
getDataList('refresh');
}
// 清除搜索内容
function clearSearch() {
searchKeyword.value = '';
getDataList('refresh');
}
// 获取考试列表
function getDataList(type = 'add') {
let maxPage=Math.ceil(totalNum.value/pageSize.value)
let params={}
if (type === 'refresh') {
pageNum.value = 1;
params={
address:"",
pageSize:pageSize.value,
pageNum:pageNum.value,
}
$api.myRequest('/train/public/train/organ/table', params).then((resData) => {
if(resData.code==200){
dataList.value=resData.rows
totalNum.value=resData.total
}
});
}
if (type === 'add' && pageNum.value < maxPage) {
pageNum.value += 1;
params={
address:"",
pageSize:pageSize.value,
pageNum:pageNum.value,
}
$api.myRequest('/train/public/train/organ/table', params).then((resData) => {
if(resData.code==200){
dataList.value=dataList.value.concat(resData.rows)
totalNum.value=resData.total
}
});
}
}
function handleOperation(row) {
navTo(`/packageB/institution/trainingInstitutionDetail?organId=${row.organId}`);
}
</script>
<style lang="stylus" scoped>
.app-box{
width: 100%;
height: 100vh;
position: relative;
.con-box{
position: absolute;
width: 100%;
height: 100%;
left: 0;
top:0;
z-index: 10;
padding: 20rpx 28rpx;
box-sizing: border-box;
overflow: hidden;
.collection-search{
padding: 10rpx 20rpx;
.search-content{
position: relative
display: flex
align-items: center
padding: 14rpx 0
.header-input{
padding: 0
width: calc(100%);
position: relative
.iconsearch{
position: absolute
left: 30rpx;
top: 50%
transform: translate(0, -50%)
z-index: 1
}
.input{
padding: 0 80rpx 0 80rpx
height: 80rpx;
background: #FFFFFF;
border-radius: 75rpx 75rpx 75rpx 75rpx;
border: 2rpx solid #ECECEC
font-size: 28rpx;
}
.clear-icon{
position: absolute
right: 30rpx;
top: 50%
transform: translate(0, -50%)
z-index: 1
cursor: pointer
}
.inputplace{
font-weight: 400;
font-size: 28rpx;
color: #B5B5B5;
}
}
}
}
.main-scroll {
width: 100%;
height: 100%;
.cards{
width: 100%;
min-height: 260rpx;
height: auto;
background: linear-gradient(0deg, #E3EFFF 0%, #FBFDFF 100%);
// box-shadow: 0px 0px 6px 0px rgba(0,71,200,0.32);
border-radius: 12rpx;
border: 2px solid #EDF5FF;
margin-bottom: 30rpx;
padding: 30rpx 40rpx 0;
box-sizing: border-box
.cardHead{
display: flex;
align-items: center;
justify-content: space-between;
.cardHeadLeft{
display: flex;
align-items: center
width: 70%;
.cardTitle{
font-weight: bold;
font-size: 28rpx;
color: #0069CB;
max-width: 100%;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.titleType{
border-radius: 4px;
font-size: 22rpx;
color: #157EFF;
width: 100rpx;
height: 38rpx;
text-align: center;
line-height: 38rpx;
margin-left: 10rpx;
}
}
}
.heng{
width: 30%;
height: 4rpx;
background: linear-gradient(88deg, #015EEA 0%, #00C0FA 100%);
margin: 10rpx 0 20rpx;
}
.cardCon{
display: flex;
flex-wrap: wrap;
.conten{
width: 100%;
font-size: 24rpx;
color: #666666;
display: flex;
align-items: center
margin-bottom: 10rpx;
}
.status-tags{
display: flex;
align-items: center;
}
}
.flooter{
border-top: 1px solid #ccc;
display: flex;
justify-content: flex-end;
align-items: center;
view{
font-size: 28rpx;
margin-left: 30rpx;
color: #2175F3;
padding-top: 14rpx;
}
}
}
}
}
.cards2{
position: fixed;
left: 0;
top: 0;
width: 100%;
height: 100vh;
background-color: rgba(0,0,0,0.5);
z-index: 10000;
padding: 100rpx 50rpx;
box-sizing: border-box;
.cardCon{
height: 70%;
background-color: #fff;
padding: 20rpx;
box-sizing: border-box;
.cardHead{
display: flex;
align-items: center;
justify-content: space-between;
font-size: 30rpx;
font-weight: 600;
}
}
}
}
.titleType{
display: inline-block
border-radius: 4px;
font-size: 22rpx;
color: #157EFF;
width: 100rpx;
height: 38rpx;
text-align: center;
line-height: 38rpx;
margin-left: 10rpx;
}
.primary{
border: 1px solid #157EFF!important;
color: #157EFF!important
}
.success{
border: 1px solid #05A636!important;
color: #05A636!important
}
.info{
border: 1px solid #898989!important;
color: #898989!important
}
.tertiary{
border: 1px solid #E6A340!important;
color: #E6A340!important
}
.primary2{
border: 1px solid #F56C6C!important;
color: #F56C6C!important
}
.rightBtn{
width: 140rpx;
height: 44rpx;
line-height: 44rpx;
background: linear-gradient(90deg, #00C0FA 0%, #1271FF 100%);
border-radius: 4px;
color: #fff;
font-size: 24rpx;
text-align: center;
}
.detailTitle{
font-size: 32rpx;
font-weight: 600;
margin: 30rpx 0;
}
.detailCon{
font-size: 28rpx;
line-height: 40rpx;
}
.exam-info {
display: flex;
justify-content: space-between;
margin-bottom: 35rpx;
margin-top: 20rpx;
}
.info-item {
flex: 1;
text-align: center;
}
.info-value {
font-family: 'D-DIN-Medium';
font-size: 26rpx;
font-weight: 600;
color: #409EFF;
margin-bottom: 8rpx;
}
.info-label {
font-size: 26rpx;
color: #333;
}
.info-divider {
width: 2px;
background-color: #C3E1FF;
}
</style>

View File

@@ -0,0 +1,267 @@
<template>
<div class="app-box">
<div class="con-box">
<div class="cards">
<div class="cardHead">
<div class="cardHeadLeft">
<div class="cardTitle">{{trainOrgan.organName}}</div>
</div>
<div class="rightBtn" @click="handleOperation()"></div>
</div>
<div class="heng"></div>
<div class="cardCon">
<div class="conten">机构联系人{{trainOrgan.contactName}}</div>
<div class="conten">联系方式{{trainOrgan.contactPhone}}</div>
<div class="conten">机构地址{{trainOrgan.address}}</div>
</div>
</div>
<div style="width: 100%;margin-bottom: 40rpx;">
<div class="title">
<div></div>
<div>课程介绍</div>
</div>
<div class="kcCon">
<div class="kcIntroduction" v-for="(item, index) in courses" :key="index">{{item}}</div>
<div v-if="courses.length==0" style="text-align: center;line-height: 100rpx;">暂无数据</div>
</div>
</div>
<div style="width: 100%;margin-bottom: 40rpx;">
<div class="title">
<div></div>
<div>师资团队</div>
</div>
<div class="kcCon">
<div class="faculty" v-for="(item, index) in teams" :key = "index">
<div class="facultyHead">{{item.tramName}}</div>
<div class="facultyCon">老师介绍{{item.tramContent}}</div>
</div>
<div v-if="teams.length==0" style="text-align: center;line-height: 100rpx;">暂无数据</div>
</div>
</div>
<div style="width: 100%;margin-bottom: 30rpx;">
<div class="title">
<div></div>
<div>资质证书</div>
</div>
<div class="kcCon">
<div v-for="(item, index) in certs":key = "index" style="width: 100%;">
<div v-for="(url, index2) in item" :key = "index2" style="width: 100%;">
<image :src="url" mode="" style="width: 100%;"></image>
</div>
</div>
<div v-if="certs.length==0" style="text-align: center;line-height: 100rpx;">暂无数据</div>
</div>
</div>
</div>
</div>
</template>
<script setup>
import { inject, ref, reactive } from 'vue';
import { onLoad, onShow } from '@dcloudio/uni-app';
const { $api, navTo, navBack,urls } = inject('globalFunction');
import config from "@/config.js"
const trainOrgan = ref({});
const courses = ref([]);
const certs = ref([]);
const certs2 = ref([]);
const teams=ref([])
const certIndex=ref(1)
const organId=ref('')
const Authorization=ref('')
onLoad((options) => {
organId.value=options.organId
});
onShow(()=>{
Authorization.value=uni.getStorageSync('Padmin-Token')||''
let params={
organId:organId.value
}
$api.myRequest('/train/public/train/organ/model', params).then((resData) => {
if(resData.code==200){
trainOrgan.value = (resData.data ? resData.data :{});
courses.value = (resData ? (resData.data.course ? (resData.data.course + "").split(",") :[]) :[]);
certs2.value = (resData ? JSON.parse(resData.data.zhengshu):[]);
list()
}
});
})
function list(){
$api.myRequest('/train/public/train/organ/team/list', {organId:organId.value}).then((res) => {
if(res.code==200){
teams.value=res.data;
for(var i =0;i<certs2.value.length;i++){
certs2.value[i].url =config.LCBaseUrl + "/file/minio" + certs2.value[i].url;
}
var certsArr = [];var flag = 0;
for(var i =0;i<certs2.value.length;i++){
flag ++
certsArr.push(certs2.value[i])
if(flag == 3){
var arrs = [];
for(var j =0;j<3;j++){
arrs.push(certsArr[j].url)
}
certs.value.push(arrs);
certsArr = [];
flag = 0;
}else{
if(i == certs2.value.length -1){
var arrs = [];
for(var j =0;j<certsArr.length;j++){
arrs.push(certsArr[j].url)
}
certs.value.push(arrs);
}
}
}
}
})
}
</script>
<style lang="stylus" scoped>
.app-box{
width: 100%;
height: 100vh;
position: relative;
.con-box{
position: absolute;
width: 100%;
height: 100%;
left: 0;
top:0;
z-index: 10;
padding: 20rpx 28rpx;
box-sizing: border-box;
overflow: hidden;
.cards{
width: 100%;
min-height: 260rpx;
height: auto;
background: linear-gradient(0deg, #D4E3FE 0%, #EBF1FF 100%);
border-radius: 12rpx;
border: 2px solid #EDF5FF;
margin-bottom: 40rpx;
padding: 20rpx 30rpx 0;
box-sizing: border-box
.cardHead{
display: flex;
align-items: center;
justify-content: space-between;
.cardHeadLeft{
display: flex;
align-items: center
width: 100%;
.cardTitle{
font-weight: bold;
font-size: 32rpx;
color: #0069CB;
max-width: 100%;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.titleType{
border-radius: 4px;
font-size: 22rpx;
color: #157EFF;
width: 100rpx;
height: 38rpx;
text-align: center;
line-height: 38rpx;
margin-left: 10rpx;
}
}
}
.heng{
width: 30%;
height: 4rpx;
background: linear-gradient(88deg, #015EEA 0%, #00C0FA 100%);
margin: 10rpx 0 20rpx;
}
.cardCon{
display: flex;
flex-wrap: wrap;
.conten{
width: 100%;
font-size: 26rpx;
color: #666666;
display: flex;
align-items: center
margin-bottom: 10rpx;
}
.status-tags{
display: flex;
align-items: center;
}
}
.flooter{
border-top: 1px solid #ccc;
display: flex;
justify-content: flex-end;
align-items: center;
view{
font-size: 28rpx;
margin-left: 30rpx;
color: #2175F3;
padding-top: 14rpx;
}
}
}
}
}
.title{
width: 100%
display: flex
align-items: center
font-size: 32rpx
font-weight: 600
}
.title>view:first-child{
width: 10rpx;
height: 46rpx;
background-color: #FD7565;
margin-right: 20rpx;
border-radius: 10rpx;
}
.kcCon{
margin-top: 20rpx;
width: 100%
}
.kcIntroduction{
background: rgba(20,136,245,0.1);
padding: 20rpx;
box-sizing: border-box;
border-radius: 10rpx;
margin-bottom: 20rpx;
}
.faculty{
border: 1px solid #ddd;
border-radius: 10rpx;
padding: 10rpx;
margin-bottom: 20rpx;
box-sizing: border-box;
.facultyHead{
width: 100%;
height: 80rpx;
border-radius: 10rpx;
color: #fff;
font-size: 30rpx;
background: linear-gradient(88deg, #3E8BFF 0%, #0DB5FB 100%);
display: flex;
align-items: center
padding: 0 20rpx;
box-sizing: border-box;
}
.facultyCon{
font-size: 26rpx;
color: #666666;
padding: 20rpx 0;
box-sizing: border-box;
}
}
</style>

View File

@@ -323,6 +323,14 @@
const deliveringJobs = reactive({});
// 岗位投递
function deliverResume(job) {
uni.showModal({
title: "提示",
content: "请确认是否投递简历?",
showCancel: true,
confirmText: "确定",
cancelText: "取消",
success: (res) => {
if(res.confirm){
if(deliveringJobs[job.jobId]) return
deliveringJobs[job.jobId] = true
const raw = uni.getStorageSync("Padmin-Token");
@@ -365,6 +373,11 @@
});
}
}
})
}
// 提交面试邀请
const submitInterview = () => {
if (!interviewForm.date) {

View File

@@ -0,0 +1,79 @@
<template>
<AppLayout :show-bg-image="false">
<view class="main-list" >
<view class="title">
{{ dataInfo.title }}
</view>
<view class="publishTime">
发布日期{{ dataInfo.publishTime }}
</view>
<view >
<view class="gk-l-i-bottom" v-html="dataInfo.content"></view>
</view>
</view>
</AppLayout>
</template>
<script setup>
import { inject, ref, reactive, onMounted } from "vue";
import { onLoad, onShow } from '@dcloudio/uni-app';
const { $api, navTo, navBack, vacanciesTo } = inject("globalFunction");
import config from "@/config.js";
import AppLayout from "@/components/AppLayout/AppLayout.vue";
const baseUrl = config.imgBaseUrl;
const dataInfo = ref([]);
const id = ref('');
const getBackgroundStyle = (imageName) => ({
backgroundImage: `url(${baseUrl}/${imageName})`,
backgroundSize: "cover", // 覆盖整个容器
backgroundPosition: "center", // 居中
backgroundRepeat: "no-repeat",
});
onLoad((options) => {
id.value=options.id
getData();
});
function getData() {
let params={
id:id.value
}
$api.myRequest('/train/public/announcement/selectById', params).then((resData) => {
if(resData.code==200){
var td = new RegExp("<td", "g")
var table = new RegExp('<table style="width: auto;', "g")
resData.data.content = (resData.data.content + "").replace(td, '<td style = "border:1px solid #cecece;font-size:0.8rem;" ')
resData.data.content = (resData.data.content + "").replace(table, '<table style="width: auto; border-collapse: collapse;" ')
dataInfo.value=resData.data
}
});
}
</script>
<style lang="scss" scoped>
.main-list {
background-color: #ffffff;
padding: 20rpx 25rpx 28rpx 25rpx;
margin: 30rpx 30rpx;
box-shadow: 0px 3px 20px 0px rgba(0, 105, 234, 0.1);
border-radius: 12px;
}
.title {
font-size: 32rpx;
font-weight: bold;
color: #282828;
margin-bottom: 16rpx;
display: flex;
justify-content: center;
}
.publishTime{
text-align: center;
font-size: 24rpx;
color: #a2a2a2;
margin-top: 12rpx;
margin-bottom: 20rpx;
}
</style>

201
packageB/notice/index.vue Normal file
View File

@@ -0,0 +1,201 @@
<template>
<AppLayout :title="title" :show-bg-image="false">
<view class="tab-container">
<view class="tab-item" :class="{ active: currentTab === 'train' }" @click="switchTab('train')">
培训公告
</view>
<view class="tab-item" :class="{ active: currentTab === 'evaluate' }" @click="switchTab('evaluate')">
评价公告
</view>
</view>
<scroll-view scroll-y class="main-scroll" @scrolltolower="handleScrollToLower">
<view class="main-list" >
<view
:style="getBackgroundStyle('frame-activity.png')"
class="policy-list"
v-for="(item, index) in policyList"
:key="index"
@click="goPolicyDetail(item)" >
<view class="title">
{{ item.title }}
</view>
<view class="bottom-line">
<view>
<uni-icons color="#A2A2A2" type="info" size="12"></uni-icons>
发布日期{{ item.publishTime }}
</view>
</view>
<view >
<view class="gk-l-i-bottom" v-html="item.content"></view>
</view>
</view>
</view>
</scroll-view>
</AppLayout>
</template>
<script setup>
import { inject, ref, reactive, onMounted } from "vue";
const { $api, navTo, navBack, vacanciesTo } = inject("globalFunction");
import config from "@/config.js";
import AppLayout from "@/components/AppLayout/AppLayout.vue";
const title = ref("");
const baseUrl = config.imgBaseUrl;
const pageSize=ref(10)
const pageNum=ref(1)
const totalNum=ref(0)
// Tab 控制
const currentTab = ref("train"); // 默认显示培训公告
function switchTab(tabName) {
currentTab.value = tabName;
getPolicyData('refresh',currentTab)
}
const handleScrollToLower = () => {
getPolicyData('add',currentTab);
};
const getBackgroundStyle = (imageName) => ({
backgroundImage: `url(${baseUrl}/${imageName})`,
backgroundSize: "100% 100%", // 覆盖整个容器
backgroundPosition: "center", // 居中
backgroundRepeat: "no-repeat",
});
onMounted(() => {
getPolicyData('refresh',currentTab);
});
const policyList = ref([]);
function getPolicyData(type = 'add',currentTab='train') {
let current=ref('1')
if(currentTab.value=='train'){
current.value='1'
}else if(currentTab.value=='evaluate'){
current.value='2'
}
let maxPage=Math.ceil(totalNum.value/pageSize.value)
let params={}
if (type === 'refresh') {
pageNum.value = 1;
params={
pageSize:pageSize.value,
pageNum:pageNum.value,
type:current.value
}
$api.myRequest('/train/public/announcement/list', params).then((resData) => {
if(resData.code==200){
for(var i = 0;i<resData.rows.length;i++){
resData.rows[i].content = resData.rows[i].content.replace(/<[^>]+>/g,"");
}
policyList.value=resData.rows
totalNum.value=resData.total
}
});
}
if (type === 'add' && pageNum.value < maxPage) {
pageNum.value += 1;
params={
pageSize:pageSize.value,
pageNum:pageNum.value,
type:current.value
}
$api.myRequest('/train/public/announcement/list', params).then((resData) => {
if(resData.code==200){
for(var i = 0;i<resData.rows.length;i++){
resData.rows[i].content = resData.rows[i].content.replace(/<[^>]+>/g,"");
}
policyList.value=policyList.value.concat(resData.rows)
totalNum.value=resData.total
}
});
}
}
function goPolicyDetail(item) {
uni.navigateTo({
url:`/packageB/notice/detail?id=${item.id}`
// url: `/packageRc/pages/policy/policyDetail?id=${item.id}`
});
}
</script>
<style lang="scss" scoped>
.main-list {
// background-color: #ffffff;
// padding: 20rpx 25rpx 28rpx 25rpx;
margin: 0 30rpx 30rpx 30rpx;
// box-shadow: 0px 3px 20px 0px rgba(0, 105, 234, 0.1);
// border-radius: 12px;
}
.tab-container {
display: flex;
height: 80rpx;
background-color: #fff;
margin: 0 30rpx 20rpx;
border-radius: 12rpx;
overflow: hidden;
margin-top: 10rpx;
}
.tab-item {
flex: 1;
display: flex;
align-items: center;
justify-content: center;
font-size: 32rpx;
color: #666;
transition: all 0.3s;
}
.tab-item.active {
background-color: #ffffff;
color: #4c6efb;
font-weight: bold;
// box-shadow: 0 4rpx 10rpx rgba(0, 0, 0, 0.05);
border-bottom: 2rpx solid #4c6efb;
}
.gk-l-i-bottom{
margin-top: 16px;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 3;
-webkit-box-orient: vertical;
}
.main-scroll {
width: 100%;
height: 90%;
}
.policy-list {
width: 100%;
margin: 0 auto;
color: #333333;
border-radius: 24rpx;
background: #ffffff;
margin-bottom: 24rpx;
padding: 28rpx 22rpx;
box-sizing: border-box;
position: relative;
.title {
font-size: 32rpx;
font-weight: bold;
color: #282828;
margin-bottom: 16rpx;
display: flex;
}
.bottom-line {
display: flex;
justify-content: space-between;
font-size: 24rpx;
color: #a2a2a2;
margin-top: 12rpx;
}
}
</style>

View File

@@ -93,7 +93,6 @@
{{ item.zcmc }}</view
>
<view class="infos">
<view v-if="item.zclx">{{ item.zclx }}</view>
<view v-if="item.zcLevel">{{ item.zcLevel }}</view>
<view v-if="item.sourceUnit">{{ item.sourceUnit }}</view>
</view>

View File

@@ -13,7 +13,7 @@
</view>
</view>
</view> -->
<view class="btns" @click="jumps('/packageB/train/practice/startPracticing')">
<view class="btns" @click="jumps('/packageB/train/practice/startPracticingList')">
<image src="/packageB/static/images/train/zxxl-k.png" mode=""></image>
<view>
<text>专项练习</text>

View File

@@ -129,6 +129,7 @@
<script setup>
import { inject, ref, reactive } from 'vue';
import { onLoad, onShow } from '@dcloudio/uni-app';
import dayjs from "dayjs";
const { $api, navTo, navBack,urls } = inject('globalFunction');
import config from "@/config.js"
const userInfo = ref({});
@@ -152,13 +153,7 @@ onLoad(() => {
});
onShow(()=>{
getDictionary()
const date = new Date();
let year = date.getFullYear();
let month = date.getMonth() + 1; // 月份从0开始需要加1
let day = date.getDate();
month=month>9?month:'0'+month
day=day>9?day:'0'+day
dates.value=year+'-'+month+'-'+day
dates.value=dayjs().format('YYYY-MM-DD HH:mm:ss')
Authorization.value=uni.getStorageSync('Padmin-Token')||''
getHeart();
})
@@ -337,13 +332,12 @@ function handleOperation(row,i) {
height: 90%;
.cards{
width: 100%;
height: 280rpx;
background: linear-gradient(0deg, #E3EFFF 0%, #FBFDFF 100%);
// box-shadow: 0px 0px 6px 0px rgba(0,71,200,0.32);
border-radius: 12rpx;
border: 2px solid #EDF5FF;
margin-bottom: 30rpx;
padding: 30rpx 40rpx 0;
padding: 30rpx 40rpx 10rpx;
box-sizing: border-box
.cardHead{
display: flex;

View File

@@ -606,6 +606,8 @@ function exit(){
}
.questionNums{
width: 100%;
height: 90vh;
overflow-y: auto;
display: flex;
flex-wrap: wrap;
}
@@ -618,6 +620,7 @@ function exit(){
border: 2px solid #E0E0E0;
font-size: 28rpx;
margin-right: 15px;
margin-bottom: 15px;
cursor: pointer;
}
.questionsActive{

View File

@@ -109,7 +109,7 @@
<div>题号</div>
<div style="font-size: 40rpx;" @click="clones()">×</div>
</div>
<div class="questionNums">
<div class="questionNums" style = "height:77vh;overflow: auto;">
<div class="questions" :class="item.whether=='正确'?'questionCorrect':item.whether=='错误'?'questionError':questionIndex==(index+1)?'questionsActive':''" @click="switchs(index)" v-for="(item,index) in problemList" :key="index">{{index+1}}</div>
</div>
</div>
@@ -125,6 +125,7 @@ import useUserStore from '@/stores/useUserStore';
import useDictStore from '@/stores/useDictStore';
const userInfo = ref({});
const Authorization = ref('');
const cataType = ref('');
const radio = ref('');
const radio2 = ref('');
const checkList = ref([]);
@@ -161,6 +162,7 @@ watch(questionIndex, (newVal, oldVal) => {
// });
onLoad((options) => {
cataType.value = options.cataType;
Authorization.value=uni.getStorageSync('Padmin-Token')||''
getHeart();
});
@@ -202,7 +204,8 @@ function queryData(){
'Content-Type':"application/x-www-form-urlencoded"
}
$api.myRequest('/train/public/trainPractice/getQuestions', {
userId: userInfo.value.userId
userId: userInfo.value.userId,
category: cataType.value
},'post',9100,header).then((resData) => {
if(resData&&resData.code==200){
resData.data.forEach((item,i)=>{

View File

@@ -0,0 +1,393 @@
<template>
<AppLayout :title="title" :show-bg-image="false" @onScrollBottom="getDataList('add')">
<!-- <template #headerleft>
<view class="btnback">
<image src="@/static/icon/back.png" @click="navBack"></image>
</view>
</template> -->
<!-- <template #headContent>
<view class="collection-search">
<view class="search-content">
<view class="header-input button-click">
<uni-icons class="iconsearch" color="#6A6A6A" type="search" size="22"></uni-icons>
<input
class="input"
v-model="searchKeyword"
@confirm="searchVideo"
placeholder="输入"
placeholder-class="inputplace"
/>
<uni-icons
v-if="searchKeyword"
class="clear-icon"
type="clear"
size="24"
color="#999"
@click="clearSearch"
/>
</view>
</view>
</view>
</template> -->
<view class="main-list">
<view class="list-title">
<text>专项训练列表</text>
<view class="title-line"></view>
</view>
<view class="video-grid" v-if="dataList.length>0">
<view
v-for="item in dataList"
:key="item.category_value"
class="train-item"
>
<div class = "cards">
<div class="cardHead">
<div class="cardHeadLeft">
<div class="cardTitle">{{item.category}}</div>
</div>
</div>
<div class="heng"></div>
<div class="cardCon">
<div class="conten">难度{{item.difficulty}}</div>
</div>
<div class="flooter">
<div @click="goZxxl(item)">去考试</div>
</div>
</div>
</view>
</view>
<empty v-else pdTop="200"></empty>
</view>
</AppLayout>
</template>
<script setup>
import { inject, ref, reactive } from 'vue';
import { onLoad } from '@dcloudio/uni-app';
const { $api, navTo, navBack } = inject('globalFunction');
import config from "@/config.js"
// state
const title = ref('');
const searchKeyword = ref('');
const dataList=ref([])
const pageSize=ref(10)
const pageNum=ref(1)
const totalNum=ref(0)
const baseUrl = config.imgBaseUrl
const getItemBackgroundStyle = (imageName) => ({
backgroundImage: `url(${baseUrl}/train/${imageName})`,
backgroundSize: 'cover', // 覆盖整个容器
backgroundPosition: 'center', // 居中
backgroundRepeat: 'no-repeat'
});
const trainVideoImgUrl=config.trainVideoImgUrl
onLoad(async () => {
await thirdLogin()
getDataList('refresh');
});
// 搜索视频
function searchVideo() {
getDataList('refresh');
}
// 清除搜索内容
function clearSearch() {
searchKeyword.value = '';
getDataList('refresh');
}
// 获取视频列表
function getDataList(type = 'add') {
let maxPage=Math.ceil(totalNum.value/pageSize.value)
let params={}
if (type === 'refresh') {
pageNum.value = 1;
params={
category:'',
hour:'',
level:'',
searchValue:searchKeyword.value,
orderStr:'',
pageSize:pageSize.value,
pageNum:pageNum.value
}
$api.myRequest('/train/public/trainQuestion/getQuestionTypes', params).then((resData) => {
dataList.value=resData.rows
totalNum.value=resData.total
});
}
if (type === 'add' && pageNum.value < maxPage) {
pageNum.value += 1;
params={
category:'',
pageSize:pageSize.value,
pageNum:pageNum.value
}
$api.myRequest('/train/public/trainQuestion/getQuestionTypes', params).then((resData) => {
dataList.value=dataList.value.concat(resData.rows)
totalNum.value=resData.total
});
}
}
function goZxxl(item){
navTo(`/packageB/train/practice/startPracticing?cataType=${item.category_value}`);
}
// 播放视频
async function playVideo(video) {
if(await thirdLogin()){
}
}
async function thirdLogin(){
let form={}
if (uni.getStorageSync('userInfo').isCompanyUser=='1'|| uni.getStorageSync('userInfo').isCompanyUser=='2') {
form={
usertype: '1',
idno: uni.getStorageSync('userInfo').idCard,
name: uni.getStorageSync('userInfo').name,
enterprisecode:"",
enterprisename: "",
contactperson: "",
contactphone: "",
}
}else if (uni.getStorageSync('userInfo').isCompanyUser=='0') {
form={
usertype: "2",
enterprisecode: uni.getStorageSync('userInfo').idCard,
enterprisename: uni.getStorageSync('userInfo').name,
contactperson: "",
contactphone: "",
idno: "",
name: ""
}
}else{
uni.showToast({
icon: 'none',
title: '请先登录'
})
return false;
}
var resLogin = await $api.myRequest('/auth/login2/ks',form,'post',10100);
if (resLogin.code=='200') {
uni.setStorageSync('Padmin-Token', resLogin.data.access_token)
return true;
}else{
uni.showToast({
icon: 'none',
title: '单点异常'
})
return false;
}
}
</script>
<style lang="stylus" scoped>
.btnback{
width: 64rpx;
height: 64rpx;
}
image {
height: 100%;
width: 100%;
}
.train-item{
width:100%;
}
.cards{
width: 100%;
height: 240rpx;
background: linear-gradient(0deg, #E3EFFF 0%, #FBFDFF 100%);
// box-shadow: 0px 0px 6px 0px rgba(0,71,200,0.32);
border-radius: 12rpx;
border: 2px solid #EDF5FF;
margin-bottom: 30rpx;
padding: 30rpx 40rpx 0;
box-sizing: border-box
.cardHead{
display: flex;
align-items: center;
justify-content: space-between;
.cardHeadLeft{
display: flex;
align-items: center
width: 98%;
.cardTitle{
font-weight: bold;
font-size: 28rpx;
color: #0069CB;
max-width: 98%;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.titleType{
border-radius: 4px;
font-size: 22rpx;
color: #157EFF;
width: 100rpx;
height: 38rpx;
text-align: center;
line-height: 38rpx;
margin-left: 10rpx;
}
}
}
.heng{
width: 120rpx;
height: 4rpx;
background: linear-gradient(88deg, #015EEA 0%, #00C0FA 100%);
margin: 10rpx 0 20rpx;
}
.cardCon{
display: flex;
flex-wrap: wrap;
.conten{
width: 50%;
font-size: 22rpx;
color: #666666;
display: flex;
align-items: center
margin-bottom: 10rpx;
}
.status-tags{
display: flex;
align-items: center;
}
}
.flooter{
border-top: 1px solid #ccc;
display: flex;
justify-content: flex-end;
align-items: center;
view{
font-size: 28rpx;
margin-left: 30rpx;
color: #2175F3;
padding-top: 14rpx;
}
}
}
.events.data-v-4c19f00c {
pointer-events: none; /* 这会禁用所有指针事件 */
opacity: 0.5; /* 可选:改变透明度以视觉上表示不可点击 */
cursor: not-allowed; /* 可选:改变鼠标光标样式 */
}
.collection-search{
padding: 10rpx 20rpx;
.search-content{
position: relative
display: flex
align-items: center
padding: 14rpx 0
.header-input{
padding: 0
width: calc(100%);
position: relative
.iconsearch{
position: absolute
left: 30rpx;
top: 50%
transform: translate(0, -50%)
z-index: 1
}
.input{
padding: 0 80rpx 0 80rpx
height: 80rpx;
background: #FFFFFF;
border-radius: 75rpx 75rpx 75rpx 75rpx;
border: 2rpx solid #ECECEC
font-size: 28rpx;
}
.clear-icon{
position: absolute
right: 30rpx;
top: 50%
transform: translate(0, -50%)
z-index: 1
cursor: pointer
}
.inputplace{
font-weight: 400;
font-size: 28rpx;
color: #B5B5B5;
}
}
}
}
.main-list{
background-color: #ffffff;
padding: 20rpx 20rpx 28rpx 20rpx;
margin:10rpx 30rpx ;
box-shadow: 0px 3px 20px 0px rgba(0,105,234,0.1);
border-radius: 12px;
}
.list-title{
font-weight: bold;
font-size: 36rpx;
color: #404040;
position: relative;
margin-bottom: 20px;
}
.title-line{
position: absolute;
bottom: -10rpx;
left: 36rpx;
width: 70rpx;
height: 8rpx;
background: linear-gradient(90deg, #FFAD58 0%, #FF7A5B 100%);
border-radius: 4rpx;
}
.video-grid{
display: flex;
flex-wrap: wrap;
}
.video-item{
}
.video-item:active{
transform: scale(0.98);
}
.video-cover{
position: relative;
width: 100%;
padding-top: 56.25%; /* 16:9 比例 */
background: #f0f0f0;
border-radius: 4rpx;
}
.video-cover image{
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
}
.video-info{
padding: 16rpx 16rpx 0 16rpx;
font-size: 26rpx;
color: #333;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
text-align: center;
}
.video-title{
font-size: 28rpx;
color: #333;
line-height: 40rpx;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
overflow: hidden;
text-overflow: ellipsis;
}
</style>

View File

@@ -14,7 +14,6 @@
</view>
</view>
</view>
<!-- :style="{height: winHeight - barHeight - loginHeight + 'px'}" -->
<view class="u-menu-wrap" >
<scroll-view scroll-y scroll-with-animation class="u-tab-view menu-scroll-view" :scroll-top="scrollTop" :scroll-into-view="itemId">
<view v-for="(item,index) in jobList" :key="index" class="u-tab-item"
@@ -48,7 +47,6 @@
return {
kw: "", //搜索关键
user: uni.getStorageSync("CAuserInfo").user,
barHeight: wx.getWindowInfo().statusBarHeight,
winHeight: wx.getWindowInfo().windowHeight,
jobDataList: [],
jobList,

View File

@@ -56,7 +56,6 @@
export default {
data() {
return {
barHeight: wx.getWindowInfo().statusBarHeight,
list: [],
allNum: 0, //总题目数
pageIndex: 0, //显示页

View File

@@ -64,7 +64,6 @@
export default {
data() {
return {
barHeight: wx.getWindowInfo().statusBarHeight,
list: [],
allNum: 0,//总题目数
pageIndex: 0, //显示页

View File

@@ -48,7 +48,6 @@
export default {
data() {
return {
barHeight: wx.getWindowInfo().statusBarHeight,
list: [],
allNum: 0,//总题目数
pageIndex: 0, //显示页

View File

@@ -29,7 +29,6 @@
export default {
data() {
return {
barHeight: wx.getWindowInfo().statusBarHeight,
refreshIfNeeded: false, //是否返回刷新
dataList: [],
}

View File

@@ -47,7 +47,6 @@
export default {
data() {
return {
barHeight: wx.getWindowInfo().statusBarHeight,
list: [],
allNum: 0,//总题目数
pageIndex: 0, //显示页

View File

@@ -9,7 +9,6 @@
export default {
data() {
return {
barHeight: wx.getWindowInfo().statusBarHeight,
user: null,//用户信息
userId: 0,
name: "",

View File

@@ -49,15 +49,19 @@
export default {
data() {
return {
barHeight: wx.getWindowInfo().statusBarHeight,
user: null,//用户信息
name: "",
idCard: ""
}
},
onLoad(e) {
if(e.idCard){
this.idCard = e.idCard;
}else {
this.idCard = e.userId;
}
this.name = e.name;
console.log(e);
this.queryKaShiToken();
},
methods: {

View File

@@ -82,7 +82,6 @@
},
data() {
return {
barHeight: wx.getWindowInfo().statusBarHeight,
videoUrl: "",
introduceUrl: "",
id: "",

View File

@@ -254,7 +254,6 @@
data() {
return {
platform: uni.getDeviceInfo().platform,
barHeight: wx.getWindowInfo().statusBarHeight,
showTip: false,
layerTitile: "",
layerDesc: "",

View File

@@ -123,7 +123,6 @@
data() {
return {
platform: uni.getDeviceInfo().platform,
barHeight: wx.getWindowInfo().statusBarHeight,
introduceUrl: "https://51xuanxiao.oss-cn-hangzhou.aliyuncs.com/Resource/xcx_sygh/report/multipleAbilityTestReport-1.png",
introduceUrl2: "https://51xuanxiao.oss-cn-hangzhou.aliyuncs.com/Resource/xcx_sygh/report/multipleAbilityTestReport-2.png",
videoUrl: "http://2-video.oss-cn-shenzhen.aliyuncs.com/2023%E5%B9%B4%E8%A7%86%E9%A2%91/%E5%88%9D%E4%B8%AD%E8%AF%BE%E7%A8%8B%E8%B5%84%E6%BA%90/%E5%A4%9A%E5%85%83%E6%99%BA%E8%83%BD%E6%B5%8B%E8%AF%84%E8%A7%A3%E8%AF%BB1.16%E4%BF%AE%E6%94%B92.mp4",

View File

@@ -410,7 +410,6 @@
data() {
return {
platform: uni.getDeviceInfo().platform,
barHeight: wx.getWindowInfo().statusBarHeight,
showTip: false,
videoUrl: "http://2-video.oss-cn-shenzhen.aliyuncs.com/2023%E5%B9%B4%E8%A7%86%E9%A2%91/%E5%88%9D%E4%B8%AD%E8%AF%BE%E7%A8%8B%E8%B5%84%E6%BA%90/%E4%BA%BA%E6%A0%BC%E6%B5%8B%E8%AF%84%E8%A7%A3%E8%AF%BB1.16%E4%BF%AE%E6%94%B92.mp4",
introduceUrl: "https://51xuanxiao.oss-cn-hangzhou.aliyuncs.com/Resource/xcx_sygh/report/personalTestReport.png",

View File

@@ -49,7 +49,6 @@
},
data() {
return {
barHeight: wx.getWindowInfo().statusBarHeight,
showVideo: false,
showIntroduce: false, // 测评介绍
videoUrl: "http://2-video.oss-cn-shenzhen.aliyuncs.com/2023%E5%B9%B4%E8%A7%86%E9%A2%91/%E5%88%9D%E4%B8%AD%E8%AF%BE%E7%A8%8B%E8%B5%84%E6%BA%90/%E5%B7%A5%E4%BD%9C%E4%BB%B7%E5%80%BC%E8%A7%82%E8%A7%A3%E8%AF%BB1.16%E4%BF%AE%E6%94%B92.mp4",

View File

@@ -108,7 +108,6 @@
export default {
data() {
return {
barHeight: wx.getWindowInfo().statusBarHeight,
compassList: [],//罗盘列表
checkedIndex: null,
jobList: [],//我的职业

View File

@@ -124,7 +124,6 @@
export default {
data() {
return {
barHeight: wx.getWindowInfo().statusBarHeight,
tabs:['目标一 ', '目标二 ', '目标三 ', '目标四 ', '目标五 '],
targetForm: {}, //当前选中的目标
targetList: [],//目标列表

View File

@@ -252,7 +252,6 @@ import api1 from "@/packageCa/apiCa/studentProfile.js"
data() {
return {
refreshIfNeeded: false, //是否返回刷新
barHeight: wx.getWindowInfo().statusBarHeight,
user: uni.getStorageSync("CAuserInfo").user,
customInfo: uni.getStorageSync("customInfo"),
intentionJobList: [],//意向职业

View File

@@ -130,7 +130,6 @@
export default {
data() {
return {
barHeight: wx.getWindowInfo().statusBarHeight,
jobList: [],//
checkedCode: null,
jobIntroduce: "",

View File

@@ -178,7 +178,6 @@
export default {
data() {
return {
barHeight: wx.getWindowInfo().statusBarHeight,
tabs:['目标一 ', '目标二 ', '目标三 ', '目标四 ', '目标五 '],
targetList: [],////目标列表
checkedTargetCode: "",//// 目标码

View File

@@ -1,13 +1,10 @@
let baseUrl = ""
// #ifdef MP-WEIXIN
// 编译项目因为使用插件lime-echartechart文件过大需要非压缩代码方式编译不然会很慢发布的时候才压缩代码方式编译
if (wx.getAccountInfoSync().miniProgram.envVersion === 'develop') {
baseUrl = 'https://www.xjksly.cn/career' // 开发环境
} else {
baseUrl = 'https://www.xjksly.cn/career' // 生产环境
}
// #endif
// let baseUrl = ""
// // #ifdef MP-WEIXIN
// // 编译项目因为使用插件lime-echartechart文件过大需要非压缩代码方式编译不然会很慢发布的时候才压缩代码方式编译
export {
baseUrl
}
// baseUrl = 'https://www.xjksly.cn/career' // 生产环境
// // #endif
// export {
// baseUrl
// }

View File

@@ -1,5 +1,5 @@
import { baseUrl} from './config.js'
// const baseUrl = "https://localhost:7026/career";
const baseUrl = "https://www.xjksly.cn/career";
const request = {}
const headers = {}

View File

@@ -1,7 +1,7 @@
<!--
* @Date: 2025-10-16 15:15:47
* @LastEditors: shirlwang
* @LastEditTime: 2025-12-08 16:10:47
* @LastEditors: lip
* @LastEditTime: 2026-01-14 21:33:18
-->
<template>
<!-- @scroll="handleScroll" @scrolltolower="scrollBottom" -->
@@ -72,13 +72,11 @@
<image src="../../../packageRc/static/zcLeft.png"/>
{{item.zcmc}}</view>
<view class="infos">
<view v-if="item.zclx">{{item.zclx}}</view>
<view v-if="item.zcLevel">{{item.zcLevel}}</view>
<view v-if="item.sourceUnit">{{item.sourceUnit}}</view>
</view>
<view class="bottom-line">
<view><uni-icons color="#A2A2A2" type="info" size="12"></uni-icons>发布日期:{{item.createTime}}</view>
<view>浏览数<text style="color: #6AA7E8">{{item.viewNum}}</text></view>
</view>
</view>
</view>
@@ -92,13 +90,13 @@ const { $api, navTo, vacanciesTo, formatTotal, config } = inject('globalFunction
import { getPolicyList } from '@/packageRc/apiRc/policy';
let policyList = ref([])
function getPolicy() {
getPolicyList({pageNum: 1, pageSize: 10}).then(res => {
getPolicyList({pageNum: 1, pageSize: 10,zclx:'1'}).then(res => {
policyList.value = res.rows
})
}
function toPolicyList() {
navTo(`/packageRc/pages/policy/policyList`)
navTo(`/packageRc/pages/policy/policyList?zclx=1`)
}
function toPolicyDetail(item) {
navTo(`/packageRc/pages/policy/policyDetail?id=${item.id}`)

View File

@@ -6,23 +6,18 @@
<input style="width: 100%;" placeholder="请输入政策名称进行搜索" v-model="queryParams.searchValue" border="none" />
<img src="https://rc.jinan.gov.cn/qcwjyH5/static/images/person/search.png" class="search-icon" @click="search()" />
</view>
<!-- <view class="inner"
style="width: calc(100% + 64rpx);margin-left: -32rpx;height: 122rpx;position: relative;z-index: 2;">
<PopupList :checkData="checkData" @searchCheck="search" ref="PopupList" @popupSearch="popupSearch" />
</view> -->
<view v-if="total" style="position: relative;padding: 32rpx 0;color: #000;">
<!-- <view v-if="total" style="position: relative;padding-bottom: 16px;color: #000;"> -->
<text> {{ total }} </text>
</view>
<!-- <scroll-view :scroll-y="true" style="height: calc(100vh - 342rpx);position: relative;z-index: 1;" -->
<scroll-view :scroll-y="true" style="height: calc(100vh - 202rpx);position: relative;z-index: 1;"
<scroll-view :scroll-y="true" style="height: calc(100vh - 232rpx);position: relative;z-index: 1;"
@scrolltolower="getBottomList">
<view style="margin-bottom: 24rpx;border-radius: 16rpx;" class="policy-list" v-for="(item, index) in tableData" :key="index" @click="goPolicyDetail(item)">
<view class="title">
<image src="../../../packageRc/static/zcLeft.png"/>
{{item.zcmc}}</view>
<view class="infos">
<view v-if="item.zclx">{{item.zclx}}</view>
<view v-if="item.zcLevel">{{item.zcLevel}}</view>
<view v-if="item.sourceUnit">{{item.sourceUnit}}</view>
</view>
@@ -53,7 +48,6 @@ import { getPolicyList } from "@/packageRc/apiRc/policy";
},
data() {
return {
checkData: [],
queryParams: {
pageNum: 1,
pageSize: 10,
@@ -64,8 +58,8 @@ import { getPolicyList } from "@/packageRc/apiRc/policy";
loading: false,
}
},
onLoad() {
this.getCheckData()
onLoad(options) {
this.queryParams.zclx = options.zclx
},
onShow() {
this.search();
@@ -76,64 +70,10 @@ import { getPolicyList } from "@/packageRc/apiRc/policy";
url: `/packageRc/pages/policy/policyDetail?id=${item.id}`
})
},
getDictLabel(value, list) {
if (list) {
let arr = list.filter(ele => ele.dictValue == value)
if (arr.length) {
return arr[0].dictLabel
} else {
return '--'
}
}
},
async getCheckData() {
let workExperienceYears
await this.$getDict('qcjy_gznx').then(res => {
workExperienceYears = res.data
})
await this.$getDict('qcjy_xqlc').then(res => {
this.currentStatusList = res.data;
console.log(res.data)
})
this.checkData = [
{
name: "需求类型",
type: "demandType",
data: [{dictLabel: '求职需求', dictValue: '1'},{dictLabel: '创业需求', dictValue: '3'},{dictLabel: '培训需求', dictValue: '4'},{dictLabel: '其他需求', dictValue: '5'}],
activeIndex: 0,
},
{
name: "需求状态",
type: "currentStatus",
data: [{
dictLabel: '全部',
dictValue: ''
}].concat(this.currentStatusList),
activeIndex: 0,
},
// {
// name: "工作经验",
// type: "workExperienceYears",
// data: [{dictLabel: '全部', dictValue: ''}].concat(workExperienceYears),
// activeIndex: 0,
// },
];
},
popupSearch(queryParams) {
queryParams.forEach((item, index) => {
if (item.data[item.activeIndex].dictLabel == "全部") {
this.queryParams[item.type] = "";
} else {
this.queryParams[item.type] = item.data[item.activeIndex].dictValue;
}
});
this.search()
},
search() {
this.showMorePage = true;
this.queryParams.pageNum = 1;
this.queryParams.pageSize = 10;
this.queryParams.pageSize = 20;
this.tableData = [];
this.total = 0;
this.getList();

View File

@@ -6,6 +6,12 @@
"navigationBarTitleText": "喀什智慧就业平台"
}
},
{
"path": "pages/city-select/index",
"style": {
"navigationBarTitleText": "选择城市"
}
},
{
"path": "pages/mine/mine",
"style": {
@@ -342,6 +348,12 @@
"navigationBarTitleText": "技能评价"
}
},
{
"path": "train/practice/startPracticingList",
"style": {
"navigationBarTitleText": "专项训练"
}
},
{
"path": "train/practice/startPracticing",
"style": {
@@ -419,6 +431,42 @@
"style": {
"navigationBarTitleText": "错题详情"
}
},
{
"path": "notice/index",
"style": {
"navigationBarTitleText": "培训评价公告"
}
},
{
"path": "notice/detail",
"style": {
"navigationBarTitleText": "公告详情"
}
},
{
"path": "institution/evaluationAgency",
"style": {
"navigationBarTitleText": "评价机构信息"
}
},
{
"path": "institution/evaluationAgencyDetail",
"style": {
"navigationBarTitleText": "评价机构信息详情"
}
},
{
"path": "institution/trainingInstitution",
"style": {
"navigationBarTitleText": "培训机构信息"
}
},
{
"path": "institution/trainingInstitutionDetail",
"style": {
"navigationBarTitleText": "培训机构信息详情"
}
}
]
},

View File

@@ -22,9 +22,65 @@
@click="getFair('refresh')"></uni-icons>
<input class="input" placeholder="招聘会" placeholder-class="inputplace"
v-model="pageState.jobFairTitle" />
<view class="btn-feel" v-show="state.current != 3" @click="openFilter">筛选</view>
</view>
</view>
<uni-popup
ref="selectFilterModel"
type="bottom"
borderRadius="10px 10px 0 0"
background-color="#FFFFFF"
class="popup-fix"
>
<view class="popup-content">
<view class="popup-list">
<view class="content-wrapper">
<!-- 左侧筛选类别 -->
<!-- <scroll-view class="filter-nav" scroll-y>
<view
v-for="(item, index) in filterOptions"
:key="index"
class="nav-item button-click"
:class="{ active: activeTab === item.key }"
@click="scrollTo(item.key)"
>
{{ item.label }}
</view>
</scroll-view> -->
<!-- 右侧筛选内容 -->
<scroll-view class="filter-content" :scroll-into-view="activeTab" scroll-y>
<view v-for="(item, index) in filterOptions" :key="index">
<view class="content-item">
<view class="item-title" :id="item.key">{{ item.label }}</view>
<radio-group class="check-content" @change="handleSelect">
<label
v-for="option in item.options"
:key="option.value"
class="checkbox-item button-click"
:class="{
checkedstyle: selectedValues === String(option.value),
}"
>
<radio
style="display: none"
:value="String(option.value)"
:checked="selectedValues === String(option.value)"
/>
<text class="option-label">{{ option.label }}</text>
</label>
</radio-group>
</view>
</view>
</scroll-view>
</view>
</view>
<view class="popup-bottom">
<view class="btn-cancel btn-feel" @click="cleanup">重置</view>
<view class="btn-confirm btn-feel" @click="confirm">确认</view>
</view>
</view>
</uni-popup>
<!-- 主体内容区域 -->
<view class="container-main">
<scroll-view scroll-y class="main-scroll" :class="{fullHeightScroll:!showTabar}" @scrolltolower="handleScrollToLower">
@@ -151,10 +207,57 @@
onShow(() => {
// 更新自定义tabbar选中状态
tabbarManager.updateSelected(1);
getoptions();
});//
//筛选
const filterOptions = ref([]);
const activeTab = ref('');
const selectFilterModel = ref(null);
const selectedValues = ref(null);
function openFilter() {
selectFilterModel.value?.open();
}
const scrollTo = (key) => {
activeTab.value = key;
};
const handleSelect = (e) => {
selectedValues.value = e.detail.value
};
function cleanup(){
selectedValues.value = null
confirm()
}
function confirm(){
getFair("refresh");
selectFilterModel.value?.close();
}
function getoptions() {
let headers = {
'Content-Type': 'application/x-www-form-urlencoded',
}
let params = {
dictType:'administrative_division',
dictParentValue:'653100000000',
childFlag:'1',
}
filterOptions.value = [{
label: '所在区域',
key: 'area',
options: []
}];
$api.myRequest('/system/public/dict/data/getByParentValue',params,'POST',9100,headers).then(res=>{
if (res.code == 200) {
filterOptions.value[0].options = res.data.map(item=>{
return {
label: item.dictLabel,
value: item.dictValue,
}
})
}
})
activeTab.value = 'area';
}
async function thirdLogin(needToast){
let form={}
if (uni.getStorageSync('userInfo') && (uni.getStorageSync('userInfo').isCompanyUser=='1' || uni.getStorageSync('userInfo').isCompanyUser=='2')) {
@@ -339,11 +442,27 @@
// 正确映射响应为用户信息(优先使用 data 字段)
const data = resData?.data ?? resData;
userInfo.value = data || {};
if(data?.info?.entCreditCode && data?.info?.userId){
updateEnterpriseId({
unifiedSocialCreditCode: data?.info?.entCreditCode,
userId: data?.info?.userId,
})
}
getFair("refresh");
return userInfo.value;
});
}
function updateEnterpriseId(params){
const headers = {
'Content-Type':'application/json'
}
return $api.myRequest("/jobfair/public/job-fair-sign-up-enterprise/update-enterprise-id", params, "POST", 9100, headers).then((resData) => {
if(resData.code == 200 && resData.data !=0){
state.current = 3
getMyFair("refresh");
}
});
}
function getMyFair(type = "add") {
if (type === "refresh") {
pageState.pageNum = 1;
@@ -404,6 +523,7 @@
pageSize: pageState.pageSize,
jobFairTitle: pageState.jobFairTitle,
jobFairType: state.current,
dictValue: selectedValues.value,
};
if (isLogin.value) {
if (userInfo.value.userType == "ent") {
@@ -561,7 +681,168 @@
return dates;
}
</script>
<style lang="scss" scoped>
.popup-fix {
z-index: 9999 !important;
}
.popup-content {
color: #000000;
height: 70vh;
padding-bottom: 20rpx;
}
.popup-bottom {
padding: 40rpx 28rpx 20rpx 28rpx;
display: flex;
justify-content: space-between;
.btn-cancel {
font-weight: 400;
font-size: 32rpx;
color: #666d7f;
line-height: 90rpx;
width: 33%;
min-width: 222rpx;
height: 90rpx;
background: #f5f5f5;
border-radius: 12rpx 12rpx 12rpx 12rpx;
text-align: center;
}
.btn-confirm {
font-weight: 400;
font-size: 32rpx;
color: #ffffff;
text-align: center;
width: 67%;
height: 90rpx;
margin-left: 28rpx;
line-height: 90rpx;
background: #256bfa;
min-width: 444rpx;
border-radius: 12rpx 12rpx 12rpx 12rpx;
}
}
.popup-list {
display: flex;
flex-direction: row;
flex-wrap: nowrap;
align-items: center;
justify-content: space-evenly;
height: calc(77vh - 100rpx - 150rpx);
overflow: hidden;
.picker-view {
width: 100%;
height: 500rpx;
margin-top: 20rpx;
.uni-picker-view-mask {
background: rgba(0, 0, 0, 0);
}
.item {
line-height: 84rpx;
height: 84rpx;
text-align: center;
font-weight: 400;
font-size: 32rpx;
color: #cccccc;
}
.item-active {
color: #333333;
}
.uni-picker-view-indicator:after {
border-color: #e3e3e3;
}
.uni-picker-view-indicator:before {
border-color: #e3e3e3;
}
}
// .list {
// .row {
// font-weight: 400;
// font-size: 32rpx;
// color: #333333;
// line-height: 84rpx;
// text-align: center;
// }
// }
}
.content-wrapper {
flex: 1;
display: flex;
overflow: hidden;
height: 100%;
}
.filter-nav {
width: 200rpx;
background-color: #ffffff;
.nav-item {
height: 100rpx;
line-height: 100rpx;
text-align: center;
font-weight: 400;
font-size: 28rpx;
color: #666d7f;
&.active {
font-weight: 500;
font-size: 28rpx;
color: #256bfa;
}
}
}
.filter-content {
flex: 1;
padding: 20rpx;
background-color: #f6f6f6;
.content-item {
margin-top: 30rpx;
.item-title {
font-weight: 400;
font-size: 28rpx;
color: #333333;
margin-bottom: 15rpx;
}
}
.content-item:first-child {
margin-top: 0rpx;
}
.check-content {
display: grid;
gap: 16rpx;
grid-template-columns: repeat(auto-fill, minmax(300rpx, 1fr));
place-items: stretch;
.checkbox-item {
display: flex;
align-items: center;
text-align: center;
background-color: #d9d9d9;
min-width: 0;
padding: 0 10rpx;
height: 80rpx;
background: #e8eaee;
border-radius: 12rpx 12rpx 12rpx 12rpx;
.option-label {
font-size: 28rpx;
width: 100%;
white-space: nowrap;
overflow: hidden;
}
}
.checkedstyle {
height: 76rpx;
background: rgba(37, 107, 250, 0.06);
border-radius: 12rpx 12rpx 12rpx 12rpx;
border: 2rpx solid #256bfa;
color: #256bfa;
}
}
}
</style>
<style scoped lang="stylus">
.app-custom-root {
position: fixed;
@@ -623,6 +904,8 @@
padding: 0 24rpx;
width: calc(100% - 48rpx);
position: relative;
display: flex;
align-items: center;
}
.app-container .container-header .header-input .iconsearch {
@@ -638,6 +921,7 @@
background: #ffffff;
border-radius: 75rpx;
font-size: 28rpx;
flex:1
}
.app-container .container-header .header-input .inputplace {
@@ -645,7 +929,13 @@
font-size: 28rpx;
color: #b5b5b5;
}
.app-container .container-header .header-input .btn-feel {
font-weight: 400;
font-size: 28rpx;
text-align: center;
color: #484444;
width: 80rpx;
}
.app-container .container-header .header-date {
padding: 28rpx;
display: flex;

View File

@@ -134,9 +134,16 @@
<view class="message">{{ recognizedText }} {{ lastFinalText }}</view>
</view>
<view v-if="isTyping" class="self">
<text class="message msg-loading">
<span class="ai-loading"></span>
</text>
<view class="message msg-loading">
<div class="loading-content">
<span class="ai-loading">
<span></span>
<span></span>
<span></span>
</span>
<text class="loading-text">AI正在思考中...</text>
</div>
</view>
</view>
</view>
</scroll-view>
@@ -551,7 +558,9 @@ const scrollToBottom = throttle(function () {
}, 500);
function getGuess() {
$api.chatRequest('/guest', { sessionId: chatSessionID.value }, 'POST').then((res) => {
// $api.chatRequest('/guest', { sessionId: chatSessionID.value }, 'POST').then((res) => {
$api.chatRequest('/guest', undefined, 'POST').then((res) => {
console.log('getGuess ---- res:', res);
guessList.value = res.data;
showGuess.value = true;
nextTick(() => {
@@ -804,22 +813,22 @@ function refreshMarkdown(index) {
}
const jobSearchQueries = [
'青岛有哪些薪资 12K 以上的岗位适合我?',
'青岛 3 年工作经验能找到哪些 12K 以上的工作?',
'青岛哪些公司在招聘,薪资范围在 12K 以上?',
'青岛有哪些企业提供 15K 以上的岗位?',
'青岛哪些公司在招 3-5 年经验的岗位?',
'我有三年的工作经验,能否推荐一些适合我的青岛的国企 岗位?',
'青岛国企目前在招聘哪些岗位?',
'青岛有哪些适合 3 年经验的国企岗位?',
'青岛国企招聘的岗位待遇如何?',
'青岛国企岗位的薪资水平是多少?',
'青岛哪些国企支持双休 & 五险一金完善?',
'青岛有哪些公司支持远程办公?',
'青岛有哪些外企的岗位,薪资 12K 以上的多吗?',
'青岛哪些企业在招聘 Web3.0 相关岗位?',
'青岛哪些岗位支持海外远程?薪资如何?',
'青岛招聘 AI/大数据相关岗位的公司有哪些?',
'喀什地区有哪些薪资 12K 以上的岗位适合我?',
'喀什地区 3 年工作经验能找到哪些 12K 以上的工作?',
'喀什地区哪些公司在招聘,薪资范围在 12K 以上?',
'喀什地区有哪些企业提供 15K 以上的岗位?',
'喀什地区哪些公司在招 3-5 年经验的岗位?',
'我有三年的工作经验,能否推荐一些适合我的喀什地区的国企 岗位?',
'喀什地区国企目前在招聘哪些岗位?',
'喀什地区有哪些适合 3 年经验的国企岗位?',
'喀什地区国企招聘的岗位待遇如何?',
'喀什地区国企岗位的薪资水平是多少?',
'喀什地区哪些国企支持双休 & 五险一金完善?',
'喀什地区有哪些公司支持远程办公?',
'喀什地区有哪些外企的岗位,薪资 12K 以上的多吗?',
'喀什地区哪些企业在招聘 Web3.0 相关岗位?',
'喀什地区哪些岗位支持海外远程?薪资如何?',
'喀什地区招聘 AI/大数据相关岗位的公司有哪些?',
];
function changeQueries(value) {
@@ -1003,12 +1012,26 @@ image-margin-top = 40rpx
.messageNull
display: none
.msg-loading{
background: transparent;
font-size: 24rpx;
color: #8f8d8e;
background: #F6F6F6;
border-radius: 20rpx 0 20rpx 20rpx;
padding: 20rpx;
width: fit-content;
display: flex;
align-items: flex-end;
justify-content: flex-start;
align-items: center;
justify-content: center;
.loading-content{
display: flex;
align-items: center;
justify-content: center;
gap: 16rpx;
}
.loading-text{
font-size: 28rpx;
color: #666666;
font-weight: 500;
}
}
.loaded{
padding-left: 20rpx
@@ -1248,25 +1271,55 @@ image-margin-top = 40rpx
.file-border
width: 160rpx !important;
@keyframes ai-circle {
0% {
-webkit-transform: rotate(0);
transform: rotate(0);
/* 更美观的loading动画 - 兼容H5和小程序 */
@keyframes ai-loading-dots {
0%, 20%, 80%, 100% {
transform: scale(1);
opacity: 0.6;
}
100% {
-webkit-transform: rotate(360deg);
transform: rotate(360deg);
40% {
transform: scale(1.2);
opacity: 1;
}
}
.ai-loading
/* 重置默认样式 */
.ai-loading {
display: inline-flex;
vertical-align: middle;
width: 28rpx;
height: 28rpx;
background: 0 0;
align-items: center;
justify-content: center;
gap: 8rpx;
width: auto;
height: auto;
background: transparent;
border: none;
border-radius: 0;
padding: 0;
margin: 0;
}
/* 三个点的样式 - 使用标准CSS语法不使用嵌套 */
.ai-loading span {
display: inline-block;
width: 12rpx;
height: 12rpx;
border-radius: 50%;
border: 4rpx solid;
border-color: #e5e5e5 #e5e5e5 #e5e5e5 #8f8d8e;
-webkit-animation: ai-circle 1s linear infinite;
animation: ai-circle 1s linear infinite;
background-color: #256BFA;
animation: ai-loading-dots 1.4s ease-in-out infinite both;
margin: 0;
padding: 0;
}
/* 为每个点设置不同的动画延迟 */
.ai-loading span:nth-child(1) {
animation-delay: -0.32s;
}
.ai-loading span:nth-child(2) {
animation-delay: -0.16s;
}
.ai-loading span:nth-child(3) {
animation-delay: 0s;
}
</style>

425
pages/city-select/index.vue Normal file
View File

@@ -0,0 +1,425 @@
<template>
<view class="city-select-container">
<!-- 顶部导航栏 -->
<!-- <view class="nav-bar">
<view class="nav-left" @click="navBack">
<uni-icons type="left" size="24" color="#333"></uni-icons>
</view>
<view class="nav-title">选择城市</view>
<view class="nav-right"></view>
</view> -->
<!-- 搜索框 -->
<view class="search-box">
<uni-icons class="search-icon" type="search" size="20" color="#999"></uni-icons>
<input
class="search-input"
placeholder="搜索城市名/拼音"
placeholder-style="color: #999"
v-model="searchText"
@input="handleSearch"
>
</view>
<!-- 定位城市 -->
<!-- <view class="location-section">
<view class="section-title">定位城市</view>
<view class="location-city" :class="{ active: selectedCity.code === locationCity.code }" @click="selectCity(locationCity)">
{{ locationCity.name }}
</view>
</view> -->
<!-- 热门城市 -->
<!-- <view class="hot-section">
<view class="section-title">热门城市</view>
<view class="hot-cities">
<view
class="city-item"
:class="{ active: selectedCity.code === item.code }"
v-for="item in hotCities"
:key="item.code"
@click="selectCity(item)"
>
{{ item.name }}
</view>
</view>
</view> -->
<!-- 城市数量统计 -->
<!-- <view class="city-count" v-if="allCities.length > 0">
共找到 {{ allCities.length }} 个城市
</view> -->
<!-- 城市列表 -->
<view class="city-list-section">
<scroll-view
class="city-list-content"
scroll-y
:scroll-into-view="currentScrollId"
:scroll-with-animation="true"
>
<view
class="city-group"
v-for="group in cityGroups"
:key="group.letter"
:id="`city-group-${group.letter}`"
>
<view class="group-title">{{ group.letter }}</view>
<view
class="city-item"
:class="{ active: selectedCity.code === item.code }"
v-for="item in group.cities"
:key="item.code"
@click="selectCity(item)"
>
{{ item.name }}
</view>
</view>
</scroll-view>
<!-- 右侧字母索引 -->
<view class="letter-index">
<view
class="letter-item"
v-for="letter in letters"
:key="letter"
@click="scrollToLetter(letter)"
:class="{ active: currentLetter === letter }"
>
{{ letter }}
</view>
</view>
</view>
</view>
</template>
<script setup>
import { ref, reactive, onMounted, computed, inject } from 'vue';
const { $api, navTo } = inject('globalFunction');
// 搜索文本
const searchText = ref('');
// 定位城市
const locationCity = ref({ code: '110100', name: '北京' });
// 选中的城市
const selectedCity = ref({ code: '', name: '' });
// 当前显示的字母
const currentLetter = ref('');
// 当前滚动到的城市组ID
const currentScrollId = ref('');
// 城市数据
const allCities = ref([]);
// 字母列表
const letters = ref(['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z']);
// 按字母分组的城市
const cityGroups = computed(() => {
const groups = {};
const filteredCities = allCities.value.filter(city => {
if (!searchText.value) return true;
return city.name.includes(searchText.value) || city.pinyin?.includes(searchText.value.toUpperCase());
});
console.log('过滤后用于分组的城市:', filteredCities);
// 初始化字母分组
letters.value.forEach(letter => {
groups[letter] = { letter, cities: [] };
});
// 将城市分配到对应字母组
filteredCities.forEach(city => {
const firstLetter = city.pinyin || '#';
// 如果字母不在预定义列表中,将其添加到分组中
if (!groups[firstLetter]) {
groups[firstLetter] = { letter: firstLetter, cities: [] };
}
groups[firstLetter].cities.push(city);
});
const result = Object.values(groups).filter(group => group.cities.length > 0);
// 对城市组进行排序
result.sort((a, b) => {
// '#' 符号应该排在最前面
if (a.letter === '#') return -1;
if (b.letter === '#') return 1;
// 其他字母按字母顺序排序
return a.letter.localeCompare(b.letter);
});
console.log('最终分组结果:', result);
return result;
});
// 获取城市数据
const getCityData = async () => {
try {
// 直接获取所有城市数据,新接口已经返回了所有层级的数据
const res = await $api.createRequest('/cms/dict/sysarea/listCity', {});
console.log('城市数据接口返回:', res);
if (res.code === 200 && res.data) {
console.log('原始城市数据:', res.data);
// 显示接口返回的所有城市数据
const filteredCities = res.data;
console.log('过滤后城市数据:', filteredCities);
// 直接使用后端返回的zm字段作为拼音首字母并转换为大写
allCities.value = filteredCities.map(city => ({
...city,
pinyin: (city.zm || '#').toUpperCase()
}));
console.log('使用后端zm字段的城市数据:', allCities.value);
// 按拼音首字母排序
allCities.value.sort((a, b) => {
// 首先按拼音首字母排序
if (a.pinyin !== b.pinyin) {
// '#' 符号应该排在最前面
if (a.pinyin === '#') return -1;
if (b.pinyin === '#') return 1;
return a.pinyin.localeCompare(b.pinyin);
}
// 首字母相同时,按城市名称排序
return a.name.localeCompare(b.name);
});
}
} catch (error) {
console.error('获取城市数据失败:', error);
}
};
// 获取拼音首字母(使用更准确的映射表)
const getPinyinFirstLetter = (name) => {
const firstChar = name.charAt(0);
// 查找对应的拼音首字母
for (const [letter, chars] of Object.entries(pinyinMap)) {
if (chars.includes(firstChar)) {
return letter;
}
}
// 如果没有找到,返回#
return '#';
};
// 处理搜索
const handleSearch = () => {
// 搜索逻辑已在cityGroups计算属性中处理
};
// 选择城市
const selectCity = (city) => {
selectedCity.value = city;
// 返回上一页并传递选择的城市
uni.navigateBack({
delta: 1,
success: () => {
// 发送事件通知首页选择了城市
uni.$emit('citySelected', city);
}
});
};
// 滚动到指定字母
const scrollToLetter = (letter) => {
currentLetter.value = letter;
// 更新滚动ID触发scroll-view滚动
currentScrollId.value = `city-group-${letter}`;
};
// 返回上一页
const navBack = () => {
uni.navigateBack({ delta: 1 });
};
// 组件挂载时获取城市数据
onMounted(() => {
getCityData();
});
</script>
<style scoped>
.city-select-container {
background-color: #f5f5f5;
min-height: 100vh;
padding-top: 16px;
}
/* 导航栏 */
.nav-bar {
display: flex;
align-items: center;
justify-content: space-between;
height: 44px;
padding: 0 16px;
background-color: #fff;
border-bottom: 1px solid #e5e5e5;
}
.nav-left,
.nav-right {
width: 40px;
height: 40px;
display: flex;
align-items: center;
justify-content: center;
}
.nav-title {
font-size: 18px;
font-weight: 500;
color: #333;
}
/* 搜索框 */
.search-box {
display: flex;
align-items: center;
margin: 12px 16px;
padding:8px 16px;
background-color: #fff;
border-radius: 20px;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}
.search-icon {
margin-right: 8px;
}
.search-input {
flex: 1;
font-size: 14px;
color: #333;
border: none;
outline: none;
}
/* 定位城市 */
.location-section {
padding: 16px;
background-color: #fff;
margin-bottom: 8px;
}
.section-title {
font-size: 14px;
color: #666;
margin-bottom: 12px;
}
.location-city {
display: inline-block;
padding: 8px 20px;
background-color: #f0f9ff;
color: #007aff;
border-radius: 20px;
font-size: 14px;
}
.location-city.active {
background-color: #007aff;
color: #fff;
}
/* 热门城市 */
.hot-section {
padding: 16px;
background-color: #fff;
margin-bottom: 8px;
}
.city-count {
padding: 0 16px 12px;
background-color: #fff;
font-size: 12px;
color: #999;
margin-bottom: 8px;
}
.hot-cities {
display: flex;
flex-wrap: wrap;
gap: 12px;
}
.city-item {
padding: 8px 20px;
background-color: #f5f5f5;
color: #333;
border-radius: 20px;
font-size: 14px;
}
.city-item.active {
background-color: #007aff;
color: #fff;
}
/* 城市列表 */
.city-list-section {
display: flex;
background-color: #fff;
height: calc(100vh - 180px);
}
.city-list-content {
flex: 1;
overflow-y: auto;
}
.city-group {
padding: 0 16px;
}
.group-title {
font-size: 14px;
color: #666;
margin: 12px 0 8px 0;
padding-left: 4px;
}
.city-list-content .city-item {
display: block;
padding: 12px 4px;
margin-bottom: 0;
background-color: transparent;
border-radius: 0;
border-bottom: 1px solid #f0f0f0;
}
.city-list-content .city-item.active {
background-color: transparent;
color: #007aff;
}
/* 右侧字母索引 */
.letter-index {
width: 30px;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
background-color: #f5f5f5;
}
.letter-item {
width: 24px;
height: 20px;
display: flex;
align-items: center;
justify-content: center;
font-size: 12px;
color: #666;
margin: 2px 0;
}
.letter-item.active {
color: #007aff;
font-weight: bold;
}
</style>

View File

@@ -268,11 +268,11 @@ const openSelectPopup = (config) => {
// #endif
};
const tabCurrent = ref(1);
const salay = [2, 5, 10, 15, 20, 25, 30, 50, 80, 100];
const salay = [2000, 5000, 10000, 15000, 20000, 25000, 30000, 50000, 80000, 100000];
const state = reactive({
station: [],
stationCateLog: 1,
lfsalay: [2, 5, 10, 15, 20, 25, 30, 50],
lfsalay: [2000, 5000, 10000, 15000, 20000, 25000, 30000, 50000],
risalay: JSON.parse(JSON.stringify(salay)),
areaText: '',
educationText: '',
@@ -614,10 +614,10 @@ function changeSalay() {
title: '薪资',
maskClick: true,
data: [state.lfsalay, state.risalay],
unit: 'k',
unit: '',
success: (_, [min, max]) => {
fromValue.salaryMin = min.value * 1000;
fromValue.salaryMax = max.value * 1000;
fromValue.salaryMin = min.value;
fromValue.salaryMax = max.value;
state.salayText = `${fromValue.salaryMin}-${fromValue.salaryMax}`;
},
change(e) {

View File

@@ -75,15 +75,15 @@
<!-- H5端专用按钮 -->
<!-- #ifdef H5 -->
<view class="h5-action-buttons" v-if="shouldShowJobSeekerContent">
<view class="h5-action-btn press-button" @click="handleH5SalaryClick">
<!-- <view class="h5-action-btn press-button" @click="handleH5SalaryClick">
<view class="btn-text">薪酬信息</view>
</view>
<view class="h5-action-btn press-button" @click="handleServiceClick('resume-creation')">
</view> -->
<view class="h5-action-btn press-button" @click="handelGoResumeGuide()">
<view class="btn-text">简历指导</view>
</view>
</view>
<!-- #endif -->
<!-- 服务功能网格 -->
<!-- #ifndef H5 -->
<view class="service-grid" v-if="shouldShowJobSeekerContent">
@@ -148,12 +148,12 @@
</view>
<view class="service-title">职业规划推荐</view>
</view>
<view class="service-item press-button" @click="handleSalaryInfoClick">
<!-- <view class="service-item press-button" @click="handleSalaryInfoClick">
<view class="service-icon service-icon-12">
<span style="display:block;width:40rpx;height:40rpx;border-radius:100%;border:4rpx #ffffff solid;line-height:40rpx;text-align:center;"></span>
</view>
<view class="service-title">薪酬信息</view>
</view>
</view> -->
<view class="service-item press-button" @click="handleJobFairClick">
<view class="service-icon service-icon-1">
<uni-icons type="shop" size="32" color="#FFFFFF"></uni-icons>
@@ -166,6 +166,25 @@
</view>
<view class="service-title">帮扶</view>
</view>
<view class="service-item press-button" @click="handleNoticeClick">
<view class="service-icon service-icon-10">
<uni-icons type="sound" size="32" color="#FFFFFF"></uni-icons>
</view>
<view class="service-title">培训评价公告</view>
</view>
<view class="service-item press-button" @click="handleInstitutionClick('training')">
<view class="service-icon service-icon-6">
<uni-icons type="map-pin-ellipse" size="32" color="#FFFFFF"></uni-icons>
<!-- <image class="service-icon-img" src="/static/icon/pxjgxx.png" mode="aspectFit"></image> -->
</view>
<view class="service-title">培训机构信息</view>
</view>
<view class="service-item press-button" @click="handleInstitutionClick('evaluate')">
<view class="service-icon service-icon-7">
<IconfontIcon name="suzhicepingtiku" :size="48" color="#FFFFFF" />
</view>
<view class="service-title">评价机构信息</view>
</view>
</view>
<!-- #endif -->
</view>
@@ -231,10 +250,15 @@
</view>
</view>
</scroll-view>
<view class="jobs-add button-click" @click="navTo('/packageA/pages/addPosition/addPosition')">
<uni-icons class="iconsearch" color="#666D7F" type="plusempty" size="18"></uni-icons>
<text>添加</text>
</view>
<view class="jobs-add button-click" @click="navTo('/pages/city-select/index')" style="padding-right:0;">
<text>{{ selectedCity.name || '地区' }}</text>
<image class="right-sx" :class="{ active: showFilter }" src="@/static/icon/shaixun.png"></image>
</view>
</view>
<view class="filter-bottom">
<view class="btm-left">
@@ -298,7 +322,7 @@
<view class="falls-card-company" v-show="isShowJw !== 3">
{{ config.appInfo.areaName }}
<!-- {{ job.jobLocation }} -->
<dict-Label dictType="area" :value="job.jobLocationAreaCode"></dict-Label>
<dict-Label dictType="jobLocationAreaCode" :value="job.jobLocationAreaCode"></dict-Label>
</view>
<view class="falls-card-pepleNumber">
<view>
@@ -375,7 +399,7 @@
<view class="falls-card-company" v-show="isShowJw !== 3">
{{ config.appInfo.areaName }}
<!-- {{ job.jobLocation }} -->
<dict-Label dictType="area" :value="job.jobLocationAreaCode"></dict-Label>
<dict-Label dictType="jobLocationAreaCode" :value="job.jobLocationAreaCode"></dict-Label>
</view>
<view class="falls-card-pepleNumber">
<view>
@@ -590,6 +614,14 @@ const wxAuthLoginRef = ref(null);
const state = reactive({
tabIndex: 'all',
});
//帮扶模块跳转
const helpClick = () => {
navTo('/packageB/priority/helpFilter');
};
//招聘会模块跳转
const handleJobFairClick = () => {
navTo('/pages/careerfair/careerfair');
};
const list = ref([]);
const pageState = reactive({
page: 0,
@@ -604,17 +636,20 @@ const inputText = ref('');
const showFilter = ref(false);
const selectFilterModel = ref(null);
const showModel = ref(false);
// 选中的城市
const selectedCity = ref({ code: '', name: '' });
const rangeOptions = ref([
{ value: 0, text: '推荐' },
{ value: 1, text: '最热' },
{ value: 2, text: '最新发布' },
{ value: 3, text: '疆外' },
{ value: 4, text: '零工市场' }
]);
const isLoaded = ref(false);
const isInitialized = ref(false); // 添加初始化标志
const { columnCount, columnSpace } = useColumnCount(() => {
pageState.pageSize = 10 * (columnCount.value - 1);
pageState.pageSize = 10 * (columnCount.value - 1) + 10;
// 只在首次初始化时调用,避免重复调用
if (!isInitialized.value) {
@@ -679,6 +714,7 @@ const goToCompanyInfo = () => {
navTo('/pages/mine/company-info');
};
// 组件初始化时加载数据
onMounted(() => {
// 获取企业信息
@@ -694,6 +730,7 @@ onMounted(() => {
// 在组件挂载时绑定事件监听,确保只绑定一次
// 先移除可能存在的旧监听,避免重复绑定
uni.$off('showLoginModal');
uni.$off('citySelected');
// 绑定新的监听
uni.$on('showLoginModal', () => {
@@ -702,6 +739,15 @@ onMounted(() => {
pageNull.value = 0;
});
// 监听城市选择事件
uni.$on('citySelected', (city) => {
console.log('收到citySelected事件选择的城市:', city);
selectedCity.value = city;
// 可以在这里添加根据城市筛选职位的逻辑
conditionSearch.value.jobLocationAreaCode = city.code;
getJobRecommend('refresh');
});
// 获取企业信息
getCompanyInfo();
});
@@ -709,6 +755,7 @@ onMounted(() => {
onUnmounted(() => {
// 组件销毁时移除事件监听
uni.$off('showLoginModal');
uni.$off('citySelected');
});
onShow(() => {
@@ -746,21 +793,63 @@ const handleLoginSuccess = () => {
//四级联动单点及权限
getIsFourLevelLinkagePurview()
};
// H5环境下从URL获取token并自动登录
onLoad(() => {
// #ifdef H5
const token = uni.getStorageSync('zkr-token');
if (token) {
useUserStore().loginSetToken(token);
}
// #endif
});
// 处理附近工作点击
const handleNearbyClick = () => {
const handleNearbyClick = (options ) => {
// #ifdef MP-WEIXIN
if (checkLogin()) {
navTo('/pages/nearby/nearby');
}
// #endif
// #ifdef H5
const token = options.token || uni.getStorageSync('zkr-token');
if (token) {
navTo('/pages/nearby/nearby');
}
// #endif
};
const handleNoticeClick = () =>{
uni.navigateTo({
url:'/packageB/notice/index'
})
}
function handleInstitutionClick(type){
if(type=='evaluate'){
uni.navigateTo({
url:'/packageB/institution/evaluationAgency'
})
}else if (type=='training'){
uni.navigateTo({
url:'/packageB/institution/trainingInstitution'
})
}
}
// 处理服务功能点击
const handleServiceClick = (serviceType) => {
if (checkLogin()) {
navToService(serviceType);
}
};
// H5的简历指导跳转
const handelGoResumeGuide = () => {
const token = uni.getStorageSync('zkr-token');
// myToken.value = token;
if (token) {
// navTo()
navTo('/pages/resume-guide/resume-guide');
}
}
// 处理直播按钮点击
const handleLiveClick = () => {
// #ifdef MP-WEIXIN
@@ -794,17 +883,12 @@ const handleLiveClick = () => {
const handleSalaryInfoClick = () => {
navTo('/pages/service/salary-info');
};
const handleJobFairClick = () => {
navTo('/pages/careerfair/careerfair');
};
const handleH5SalaryClick = () => {
const salaryUrl = "https://www.mohrss.gov.cn/SYrlzyhshbzb/laodongguanxi_/fwyd/202506/t20250627_544623.html";
window.location.assign(salaryUrl);
};
// 处理帮扶
const helpClick = () => {
navTo('/packageB/priority/helpFilter');
};
async function loadData() {
try {
if (isLoaded.value) return;
@@ -878,15 +962,7 @@ function clearfindJob(job) {
}
function nextDetail(job) {
// 登录检查
if (checkLogin()) {
// 记录岗位类型,用作数据分析
if (job.jobCategory) {
const recordData = recommedIndexDb.JobParameter(job);
recommedIndexDb.addRecord(recordData);
}
navTo(`/packageA/pages/post/post?jobId=${encodeURIComponent(job.jobId)}`);
}
}
function navToService(serviceType) {
@@ -982,6 +1058,12 @@ function handelHostestSearch(val) {
isShowJw.value = val.value;
pageState.search.order = val.value;
pageState.search.jobType = val.value === 3 ? 1 : 0;
if(val.value === 4) {
pageState.search.type = 4;
} else {
delete pageState.search.type;
}
if (state.tabIndex === 'all') {
getJobRecommend('refresh');
} else {
@@ -996,12 +1078,16 @@ function getJobRecommend(type = 'add') {
if (waterfallsFlowRef.value) waterfallsFlowRef.value.refresh();
}
let params = {
pageSize: pageState.pageSize,
pageSize: pageState.pageSize + 10,
sessionId: useUserStore().seesionId,
...pageState.search,
...conditionSearch.value,
isPublish: 1,
};
// 当选中零工市场(4)或疆外(3)时order参数传递0
if (pageState.search.order === 3 || pageState.search.order === 4) {
params.order = 0;
}
// 优先从store获取如果为空则从缓存获取
const storeIsCompanyUser = userInfo.value?.isCompanyUser;
const cachedUserInfo = uni.getStorageSync('userInfo') || {};
@@ -1080,11 +1166,15 @@ function getJobList(type = 'add') {
...pageState.search,
// ...conditionSearch.value,
};
// 当选中零工市场(4)或疆外(3)时order参数传递0
if (pageState.search.order === 3 || pageState.search.order === 4) {
params.order = 0;
}
$api.createRequest('/app/job/list', params).then((resData) => {
const { rows, total } = resData;
if (type === 'add') {
const str = pageState.pageSize * (pageState.page - 1);
const str = pageState.pageSize * (pageState.page - 1) + 10;
const end = list.value.length;
const reslist = dataToImg(rows);
list.value.splice(str, end, ...reslist);
@@ -1656,6 +1746,9 @@ defineExpose({ loadData });
min-width: 80rpx;
padding: 8rpx 12rpx;
white-space: nowrap;
.right-sx
width: 28rpx;
height: 28rpx;
.filter-bottom
display: flex
justify-content: space-between
@@ -1667,8 +1760,8 @@ defineExpose({ loadData });
font-weight: 400;
font-size: 32rpx;
color: #666D7F;
margin-right: 24rpx
padding: 0rpx 16rpx
margin-right: 8rpx
padding: 0rpx 6rpx
.active
font-weight: 500;
font-size: 32rpx;

View File

@@ -19,10 +19,11 @@ import IndexOne from './components/index-one.vue';
// import IndexTwo from './components/index-two.vue';
import { storeToRefs } from 'pinia';
import { useReadMsg } from '@/stores/useReadMsg';
import useUserStore from '@/stores/useUserStore';
import { tabbarManager } from '@/utils/tabbarManager';
const { unreadCount } = storeToRefs(useReadMsg());
onLoad(() => {
const userStore = useUserStore();
onLoad((options) => {
// useReadMsg().fetchMessages();
});

View File

@@ -194,7 +194,7 @@ const handleLogin = async () => {
icon: 'success'
})
// window.location.assign('http://222.80.110.161:11111/mechine-dual-vue/login')
window.location.assign('https://www.xjksly.cn/mechine-single-vue/login')
// window.location.assign('https://www.xjksly.cn/mechine-single-vue/login')
// // 跳转到首页
// uni.reLaunch({
// url: '/pages/index/index'

View File

@@ -5,7 +5,7 @@
<view class="avatar-label">编辑信息</view>
<view class="avatar-container">
<image class="company-avatar" :src="companyInfo.avatar || '/static/imgs/avatar.jpg'"></image>
<uni-icons color="#A2A2A2" type="right" size="16"></uni-icons>
<!-- <uni-icons color="#A2A2A2" type="right" size="16"></uni-icons> -->
</view>
</view>
@@ -15,7 +15,7 @@
<view class="info-label">企业名称</view>
<view class="info-content">
<text class="info-value">{{ companyInfo.name || '暂无公司名称' }}</text>
<uni-icons color="#A2A2A2" type="right" size="16"></uni-icons>
<!-- <uni-icons color="#A2A2A2" type="right" size="16"></uni-icons> -->
</view>
</view>
@@ -23,7 +23,7 @@
<view class="info-label">统一社会代码</view>
<view class="info-content">
<text class="info-value">{{ companyInfo.socialCode || '暂无统一社会代码' }}</text>
<uni-icons color="#A2A2A2" type="right" size="16"></uni-icons>
<!-- <uni-icons color="#A2A2A2" type="right" size="16"></uni-icons> -->
</view>
</view>
@@ -31,7 +31,7 @@
<view class="info-label">企业注册地点</view>
<view class="info-content">
<text class="info-value">{{ companyInfo.location || '暂无注册地点' }}</text>
<uni-icons color="#A2A2A2" type="right" size="16"></uni-icons>
<!-- <uni-icons color="#A2A2A2" type="right" size="16"></uni-icons> -->
</view>
</view>
@@ -39,7 +39,7 @@
<view class="info-label">企业信息介绍</view>
<view class="info-content">
<text class="info-value">{{ companyInfo.description || '暂无企业介绍' }}</text>
<uni-icons color="#A2A2A2" type="right" size="16"></uni-icons>
<!-- <uni-icons color="#A2A2A2" type="right" size="16"></uni-icons> -->
</view>
</view>
@@ -47,7 +47,7 @@
<view class="info-label">企业法人姓名</view>
<view class="info-content">
<text class="info-value">{{ companyInfo.legalPerson || '暂无法人信息' }}</text>
<uni-icons color="#A2A2A2" type="right" size="16"></uni-icons>
<!-- <uni-icons color="#A2A2A2" type="right" size="16"></uni-icons> -->
</view>
</view>

View File

@@ -49,9 +49,11 @@
<!-- 行动按钮 -->
<view class="action-buttons">
<!-- #ifdef MP-WEIXIN -->
<view class="primary-button button-click" @click="startCreateResume">
开始制作简历
</view>
<!-- #endif -->
<view class="secondary-button button-click" @click="viewExampleResume">
查看简历示例
</view>

View File

@@ -0,0 +1,590 @@
<template>
<view class="career-planning-page">
<!-- 提醒弹窗 -->
<RemindPopup
ref="remindPopup"
:remind-list="remindList"
@cancel="handleCancel"
@confirm="handleConfirm"
/>
<!-- 技能详情弹出层 -->
<SkillDetailPopup
ref="skillDetailPopup"
:job-title="selectedJobTitle"
:possessed-skills="selectedJobPossessedSkills"
:improvement-skills="selectedJobImprovementSkills"
@close="handleSkillPopupClose"
/>
<!-- 页面内容 -->
<view class="page-content" v-if="showContent">
<!-- #ifdef MP-WEIXIN -->
<!-- 小程序背景图片 -->
<image class="mp-background" src="/static/icon/background2.png" mode="aspectFill"></image>
<!-- #endif -->
<!-- 头部区域 -->
<PageHeader
:active-tab="activeTab"
@tab-change="switchTab"
@search-click="handleSearchClick"
@menu-click="handleMenuClick"
@more-click="handleMoreClick"
/>
<!-- 内容区域 -->
<scroll-view scroll-y class="content-scroll">
<CareerRecommend
v-if="activeTab === 0"
:current-job-id="currentJobId"
:current-job-name="currentJobName"
@job-card-click="handleJobCardClick"
@skills-updated="handleRecommendSkillsUpdated"
/>
<CareerPath
v-else-if="activeTab === 1"
:current-job-name="currentJobName"
@path-data-updated="handlePathDataUpdated"
/>
<SkillDevelopment
v-else
:current-job-name="currentJobName"
@path-data-updated="handlePathDataUpdated"
/>
</scroll-view>
</view>
<!-- 底部导航栏 -->
<view class="tabbar-wrapper" v-if="showContent">
<CustomTabBar :currentPage="0" />
</view>
</view>
</template>
<script setup>
import { ref, inject, nextTick, onMounted } from 'vue';
import { onLoad, onShow } from '@dcloudio/uni-app';
import { appUserInfo } from '@/apiRc/user/user.js';
import RemindPopup from './components/RemindPopup.vue';
import PageHeader from './components/PageHeader.vue';
import SkillDetailPopup from './components/SkillDetailPopup.vue';
import CareerRecommend from './components/CareerRecommend.vue';
import CareerPath from './components/CareerPath.vue';
import SkillDevelopment from './components/SkillDevelopment.vue';
import CustomTabBar from '@/components/CustomTabBar/CustomTabBar.vue';
const { navBack, navTo } = inject('globalFunction');
// 弹窗引用
const remindPopup = ref(null);
const skillDetailPopup = ref(null);
// 提醒列表(由接口返回)
const remindList = ref([]);
// 是否显示页面内容
const showContent = ref(false);
// 当前激活的tab
const activeTab = ref(0);
// 选中的职位信息
const selectedJobTitle = ref('');
const selectedJobPossessedSkills = ref([]);
const selectedJobImprovementSkills = ref([]);
const isLoadingJobSkill = ref(false);
const currentJobId = ref(null);
const currentJobName = ref('');
// 技能发展所需的数据
const recommendSkillsData = ref({
currentJobSkills: [],
recommendedJobs: []
});
const pathSkillsData = ref({
pathData: {
start: { title: '', skills: [] },
steps: [],
end: { title: '', skills: [] }
},
targetCareer: ''
});
// 打开弹窗
function openRemindPopup() {
nextTick(() => {
if (remindPopup.value) {
try {
remindPopup.value.open();
} catch (error) {
// 静默处理错误
}
} else {
setTimeout(() => {
if (remindPopup.value) {
try {
remindPopup.value.open();
} catch (error) {
// 静默处理错误
}
} else {
setTimeout(() => {
if (remindPopup.value) {
try {
remindPopup.value.open();
} catch (error) {
// 静默处理错误
}
}
}, 500);
}
}, 500);
}
});
}
// 检查用户是否完善了个人信息(调用接口获取)
let hasCheckedRemindInfo = false;
// 保存缺失信息的标识
const missingInfo = ref({
hasJobInfo: false,
hasSkills: false
});
async function getRemindInfo() {
if (hasCheckedRemindInfo) {
return;
}
hasCheckedRemindInfo = true;
try {
const response = await appUserInfo();
const userInfo = response?.data || {};
// 检查 idCard身份证- 必须项
let idCard = userInfo?.resume?.idCard ?? userInfo?.idCard ?? null;
const cachedUserInfo = uni.getStorageSync('userInfo') || {};
if (!idCard || idCard === null || idCard === '') {
idCard = cachedUserInfo?.resume?.idCard ?? cachedUserInfo?.idCard ?? null;
}
const hasIdCard = idCard !== null && idCard !== undefined && idCard !== '';
// 检查职位信息:优先从 jobTitles 数组获取
const jobTitles = Array.isArray(userInfo?.jobTitles) ? userInfo.jobTitles : [];
const hasJobTitle = jobTitles.length > 0;
// 如果 jobTitles 为空,尝试从其他字段获取
let jobName = '';
if (!hasJobTitle) {
jobName = userInfo?.jobName ??
userInfo?.currentJobName ??
userInfo?.resume?.jobName ??
userInfo?.resume?.currentJobName ??
'';
}
const hasJobInfo = hasJobTitle || (jobName && jobName.trim() !== '');
// 检查技能标签:从 appSkillsList 获取
const appSkillsList = Array.isArray(userInfo?.appSkillsList) ? userInfo.appSkillsList : [];
// 检查是否有有效的技能name 或 nameStr 不为空)
const hasSkills = appSkillsList.some(skill => {
const skillName = skill?.name || skill?.nameStr;
return skillName && skillName.trim() !== '';
});
// 保存缺失信息标识(只保存职位信息和技能标签,身份证信息跳转到个人信息页面)
missingInfo.value.hasJobInfo = hasJobInfo;
missingInfo.value.hasSkills = hasSkills;
// 判断信息是否完整idCard、职位信息、技能标签都必须有
const isComplete = hasIdCard && hasJobInfo && hasSkills;
if (!isComplete) {
// 收集缺失的信息提示
const missingItems = [];
if (!hasIdCard) {
missingItems.push('身份证信息');
}
if (!hasJobInfo) {
missingItems.push('职位信息');
}
if (!hasSkills) {
missingItems.push('技能标签');
}
remindList.value = [`请完善${missingItems.join('、')}`];
} else {
// 信息完整,设置职位信息
if (hasJobTitle) {
currentJobName.value = jobTitles[0];
} else {
currentJobName.value = jobName;
currentJobId.value = userInfo?.jobId ??
userInfo?.currentJobId ??
userInfo?.resume?.jobId ??
userInfo?.resume?.currentJobId ??
null;
}
// 信息完整,直接显示页面内容
showContent.value = true;
return;
}
setTimeout(() => {
openRemindPopup();
}, 500);
} catch (error) {
// 接口调用失败时,使用缓存作为降级方案
const cachedUserInfo = uni.getStorageSync('userInfo') || {};
// 检查 idCard
const idCard = cachedUserInfo?.resume?.idCard ?? cachedUserInfo?.idCard ?? null;
const hasIdCard = idCard !== null && idCard !== undefined && idCard !== '';
// 检查职位信息
const cachedJobTitles = Array.isArray(cachedUserInfo?.jobTitles) ? cachedUserInfo.jobTitles : [];
const hasJobTitle = cachedJobTitles.length > 0;
let jobName = '';
if (!hasJobTitle) {
jobName = cachedUserInfo?.jobName ??
cachedUserInfo?.currentJobName ??
cachedUserInfo?.resume?.jobName ??
cachedUserInfo?.resume?.currentJobName ??
'';
}
const hasJobInfo = hasJobTitle || (jobName && jobName.trim() !== '');
// 检查技能标签
const cachedAppSkillsList = Array.isArray(cachedUserInfo?.appSkillsList) ? cachedUserInfo.appSkillsList : [];
const hasSkills = cachedAppSkillsList.some(skill => {
const skillName = skill?.name || skill?.nameStr;
return skillName && skillName.trim() !== '';
});
// 保存缺失信息标识
missingInfo.value.hasJobInfo = hasJobInfo;
missingInfo.value.hasSkills = hasSkills;
// 判断信息是否完整idCard、职位信息、技能标签都必须有
const isComplete = hasIdCard && hasJobInfo && hasSkills;
if (!isComplete) {
// 收集缺失的信息提示
const missingItems = [];
if (!hasIdCard) {
missingItems.push('身份证信息');
}
if (!hasJobInfo) {
missingItems.push('职位信息');
}
if (!hasSkills) {
missingItems.push('技能标签');
}
remindList.value = [`请完善${missingItems.join('、')}`];
} else {
// 信息完整,设置职位信息
if (hasJobTitle) {
currentJobName.value = cachedJobTitles[0];
} else {
currentJobName.value = jobName;
currentJobId.value = cachedUserInfo?.jobId ??
cachedUserInfo?.currentJobId ??
cachedUserInfo?.resume?.jobId ??
cachedUserInfo?.resume?.currentJobId ??
null;
}
// 信息完整,直接显示页面内容
showContent.value = true;
return;
}
setTimeout(() => {
openRemindPopup();
}, 500);
}
}
// 取消按钮
function handleCancel() {
remindPopup.value?.close();
navBack();
}
// 确认按钮
async function handleConfirm() {
remindPopup.value?.close();
const { hasJobInfo, hasSkills } = missingInfo.value;
// 如果同时缺少职位信息和技能标签:先跳转到职位信息页面,并传递参数表示完成后需要继续跳转到技能页面
if (!hasJobInfo && !hasSkills) {
// 跳转到职位信息页面,传递参数表示完成后需要继续跳转到技能页面
navTo('/packageA/pages/jobExpect/jobExpect?needSkill=true');
}
// 如果只缺少技能标签:直接跳转到技能页面(个人信息页面的技能部分)
else if (!hasSkills) {
navTo('/packageA/pages/personalInfo/personalInfo');
}
// 如果只缺少职位信息:直接跳转到职位信息页面
else if (!hasJobInfo) {
navTo('/packageA/pages/jobExpect/jobExpect');
}
// 如果只缺少身份证信息:跳转到个人信息页面
else {
navTo('/packageA/pages/personalInfo/personalInfo');
}
}
// 切换tab
function switchTab(index) {
activeTab.value = index;
if (index === 0 && !currentJobId.value) {
const cachedUserInfo = uni.getStorageSync('userInfo') || {};
// 优先从缓存中的 jobTitles 数组获取职位信息(取第一个)
const cachedJobTitles = Array.isArray(cachedUserInfo?.jobTitles) ? cachedUserInfo.jobTitles : [];
let newJobName = '';
if (cachedJobTitles.length > 0) {
newJobName = cachedJobTitles[0];
} else {
// 如果缓存中没有 jobTitles从其他字段获取
newJobName = currentJobName.value ||
(cachedUserInfo?.jobName ??
cachedUserInfo?.currentJobName ??
cachedUserInfo?.resume?.jobName ??
cachedUserInfo?.resume?.currentJobName ??
'市场专员');
}
const newJobId = cachedUserInfo?.jobId ??
cachedUserInfo?.currentJobId ??
cachedUserInfo?.resume?.jobId ??
cachedUserInfo?.resume?.currentJobId ??
null;
currentJobId.value = newJobId;
currentJobName.value = newJobName;
}
}
// 搜索点击
function handleSearchClick() {
navTo('/pages/search/search');
}
// 菜单点击
function handleMenuClick() {
// TODO: 实现菜单功能
}
// 更多点击
function handleMoreClick() {
// TODO: 实现更多功能
}
function normalizeSkillLevel(score) {
const numericScore = Number(score);
if (Number.isNaN(numericScore)) {
return 0;
}
const rounded = Math.round(numericScore);
return Math.max(1, Math.min(6, rounded));
}
function splitSkillListByScore(skills = []) {
if (!Array.isArray(skills) || skills.length === 0) {
return {
possessed: [],
improvement: []
};
}
const sorted = [...skills].sort((a, b) => (Number(b.skillScore) || 0) - (Number(a.skillScore) || 0));
const midpoint = Math.ceil(sorted.length / 2);
const mapSkill = (item) => ({
name: item?.skillName || '',
level: normalizeSkillLevel(item?.skillScore)
});
return {
possessed: sorted.slice(0, midpoint).map(mapSkill),
improvement: sorted.slice(midpoint).map(mapSkill)
};
}
// 处理职位卡片点击
async function handleJobCardClick(job) {
if (!job) {
return;
}
selectedJobTitle.value = job.title || job.jobName || '';
selectedJobPossessedSkills.value = [];
selectedJobImprovementSkills.value = [];
if (isLoadingJobSkill.value) {
return;
}
isLoadingJobSkill.value = true;
uni.showLoading({
title: '加载中...',
mask: true
});
try {
// 从 appUserInfo 接口获取技能数据
const response = await appUserInfo();
const userInfo = response?.data || {};
const appSkillsList = Array.isArray(userInfo?.appSkillsList) ? userInfo.appSkillsList : [];
// 将 appSkillsList 转换为 splitSkillListByScore 需要的格式
const skillList = appSkillsList.map(item => ({
skillName: item?.name || item?.nameStr || '',
skillScore: item?.levels || item?.levelStr || 0
})).filter(item => item.skillName);
const { possessed, improvement } = splitSkillListByScore(skillList);
if (possessed.length === 0 && improvement.length === 0) {
// 如果 appUserInfo 中没有技能数据,尝试使用推荐职位数据中的技能信息
const fallbackSkills = Array.isArray(job?.rawSkills) ? job.rawSkills : [];
if (fallbackSkills.length === 0) {
uni.showToast({
title: '暂无技能数据',
icon: 'none'
});
return;
}
const fallbackSplit = splitSkillListByScore(fallbackSkills);
selectedJobPossessedSkills.value = fallbackSplit.possessed;
selectedJobImprovementSkills.value = fallbackSplit.improvement;
} else {
selectedJobPossessedSkills.value = possessed;
selectedJobImprovementSkills.value = improvement;
}
skillDetailPopup.value?.open();
} catch (error) {
// 接口调用失败,尝试使用推荐职位数据中的技能信息
const fallbackSkills = Array.isArray(job?.rawSkills) ? job.rawSkills : [];
if (fallbackSkills.length > 0) {
const fallbackSplit = splitSkillListByScore(fallbackSkills);
selectedJobPossessedSkills.value = fallbackSplit.possessed;
selectedJobImprovementSkills.value = fallbackSplit.improvement;
skillDetailPopup.value?.open();
} else {
uni.showToast({
title: '获取技能信息失败',
icon: 'none'
});
}
} finally {
isLoadingJobSkill.value = false;
uni.hideLoading();
}
}
// 处理技能弹出层关闭
function handleSkillPopupClose() {
// 可以在这里处理关闭后的逻辑
}
// 处理职业推荐技能数据更新
function handleRecommendSkillsUpdated(data) {
recommendSkillsData.value = {
currentJobSkills: data.currentJobSkills || [],
recommendedJobs: data.recommendedJobs || []
};
}
// 处理职业路径数据更新
function handlePathDataUpdated(data) {
pathSkillsData.value = {
pathData: data.pathData || {
start: { title: '', skills: [] },
steps: [],
end: { title: '', skills: [] }
},
targetCareer: data.targetCareer || ''
};
}
onLoad(() => {
getRemindInfo();
});
onShow(() => {
// 返回本页后,如果之前因为信息缺失未展示内容,则重新检查
if (!showContent.value) {
hasCheckedRemindInfo = false;
getRemindInfo();
}
});
onMounted(() => {
if (remindList.value.length > 0 && !showContent.value) {
setTimeout(() => {
if (remindPopup.value) {
openRemindPopup();
}
}, 300);
}
});
</script>
<style lang="scss" scoped>
.career-planning-page {
width: 100vw;
/* #ifdef H5 */
height: calc(100vh - var(--window-top) - var(--status-bar-height) - var(--window-bottom));
background: url('@/static/icon/background2.png') 0 0 no-repeat;
background-size: 100% 728rpx;
/* #endif */
/* #ifdef MP-WEIXIN */
height: 100vh;
position: relative;
/* #endif */
background-color: #FFFFFF;
overflow: hidden;
display: flex;
flex-direction: column;
position: relative;
}
/* #ifdef MP-WEIXIN */
.mp-background {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 728rpx;
z-index: 0;
}
/* #endif */
.page-content {
flex: 1;
display: flex;
flex-direction: column;
position: relative;
z-index: 1;
overflow: hidden;
}
.content-scroll {
flex: 1;
height: 0;
width: 100%;
padding-bottom: calc(88rpx + env(safe-area-inset-bottom));
box-sizing: border-box;
}
.tabbar-wrapper {
position: fixed;
bottom: 0;
left: 0;
right: 0;
z-index: 999;
}
</style>

View File

@@ -1,67 +1,4 @@
<template>
<view class="career-planning-page">
<!-- 提醒弹窗 -->
<RemindPopup
ref="remindPopup"
:remind-list="remindList"
@cancel="handleCancel"
@confirm="handleConfirm"
/>
<!-- 技能详情弹出层 -->
<SkillDetailPopup
ref="skillDetailPopup"
:job-title="selectedJobTitle"
:possessed-skills="selectedJobPossessedSkills"
:improvement-skills="selectedJobImprovementSkills"
@close="handleSkillPopupClose"
/>
<!-- 页面内容 -->
<view class="page-content" v-if="showContent">
<!-- #ifdef MP-WEIXIN -->
<!-- 小程序背景图片 -->
<image class="mp-background" src="/static/icon/background2.png" mode="aspectFill"></image>
<!-- #endif -->
<!-- 头部区域 -->
<PageHeader
:active-tab="activeTab"
@tab-change="switchTab"
@search-click="handleSearchClick"
@menu-click="handleMenuClick"
@more-click="handleMoreClick"
/>
<!-- 内容区域 -->
<scroll-view scroll-y class="content-scroll">
<CareerRecommend
v-if="activeTab === 0"
:current-job-id="currentJobId"
:current-job-name="currentJobName"
@job-card-click="handleJobCardClick"
@skills-updated="handleRecommendSkillsUpdated"
/>
<CareerPath
v-else-if="activeTab === 1"
:current-job-name="currentJobName"
@path-data-updated="handlePathDataUpdated"
/>
<SkillDevelopment
v-else
:current-job-name="currentJobName"
@path-data-updated="handlePathDataUpdated"
/>
</scroll-view>
</view>
<!-- 底部导航栏 -->
<view class="tabbar-wrapper" v-if="showContent">
<CustomTabBar :currentPage="0" />
</view>
</view>
</template>
<!--suppress HtmlUnknownTag, NpmUsedModulesInstalled, JSFileReferences -->
<script setup>
import { ref, inject, nextTick, onMounted } from 'vue';
import { onLoad, onShow } from '@dcloudio/uni-app';
@@ -89,15 +26,9 @@ const activeTab = ref(0);
const selectedJobTitle = ref('');
const selectedJobPossessedSkills = ref([]);
const selectedJobImprovementSkills = ref([]);
const isLoadingJobSkill = ref(false);
const currentJobId = ref(null);
const currentJobName = ref('');
// 技能发展所需的数据
const recommendSkillsData = ref({
currentJobSkills: [],
recommendedJobs: []
});
const pathSkillsData = ref({
pathData: {
@@ -382,121 +313,6 @@ function handleMoreClick() {
// TODO: 实现更多功能
}
function normalizeSkillLevel(score) {
const numericScore = Number(score);
if (Number.isNaN(numericScore)) {
return 0;
}
const rounded = Math.round(numericScore);
return Math.max(1, Math.min(6, rounded));
}
function splitSkillListByScore(skills = []) {
if (!Array.isArray(skills) || skills.length === 0) {
return {
possessed: [],
improvement: []
};
}
const sorted = [...skills].sort((a, b) => (Number(b.skillScore) || 0) - (Number(a.skillScore) || 0));
const midpoint = Math.ceil(sorted.length / 2);
const mapSkill = (item) => ({
name: item?.skillName || '',
level: normalizeSkillLevel(item?.skillScore)
});
return {
possessed: sorted.slice(0, midpoint).map(mapSkill),
improvement: sorted.slice(midpoint).map(mapSkill)
};
}
// 处理职位卡片点击
async function handleJobCardClick(job) {
if (!job) {
return;
}
selectedJobTitle.value = job.title || job.jobName || '';
selectedJobPossessedSkills.value = [];
selectedJobImprovementSkills.value = [];
if (isLoadingJobSkill.value) {
return;
}
isLoadingJobSkill.value = true;
uni.showLoading({
title: '加载中...',
mask: true
});
try {
// 从 appUserInfo 接口获取技能数据
const response = await appUserInfo();
const userInfo = response?.data || {};
const appSkillsList = Array.isArray(userInfo?.appSkillsList) ? userInfo.appSkillsList : [];
// 将 appSkillsList 转换为 splitSkillListByScore 需要的格式
const skillList = appSkillsList.map(item => ({
skillName: item?.name || item?.nameStr || '',
skillScore: item?.levels || item?.levelStr || 0
})).filter(item => item.skillName);
const { possessed, improvement } = splitSkillListByScore(skillList);
if (possessed.length === 0 && improvement.length === 0) {
// 如果 appUserInfo 中没有技能数据,尝试使用推荐职位数据中的技能信息
const fallbackSkills = Array.isArray(job?.rawSkills) ? job.rawSkills : [];
if (fallbackSkills.length === 0) {
uni.showToast({
title: '暂无技能数据',
icon: 'none'
});
return;
}
const fallbackSplit = splitSkillListByScore(fallbackSkills);
selectedJobPossessedSkills.value = fallbackSplit.possessed;
selectedJobImprovementSkills.value = fallbackSplit.improvement;
} else {
selectedJobPossessedSkills.value = possessed;
selectedJobImprovementSkills.value = improvement;
}
skillDetailPopup.value?.open();
} catch (error) {
// 接口调用失败,尝试使用推荐职位数据中的技能信息
const fallbackSkills = Array.isArray(job?.rawSkills) ? job.rawSkills : [];
if (fallbackSkills.length > 0) {
const fallbackSplit = splitSkillListByScore(fallbackSkills);
selectedJobPossessedSkills.value = fallbackSplit.possessed;
selectedJobImprovementSkills.value = fallbackSplit.improvement;
skillDetailPopup.value?.open();
} else {
uni.showToast({
title: '获取技能信息失败',
icon: 'none'
});
}
} finally {
isLoadingJobSkill.value = false;
uni.hideLoading();
}
}
// 处理技能弹出层关闭
function handleSkillPopupClose() {
// 可以在这里处理关闭后的逻辑
}
// 处理职业推荐技能数据更新
function handleRecommendSkillsUpdated(data) {
recommendSkillsData.value = {
currentJobSkills: data.currentJobSkills || [],
recommendedJobs: data.recommendedJobs || []
};
}
// 处理职业路径数据更新
function handlePathDataUpdated(data) {
pathSkillsData.value = {
@@ -532,6 +348,114 @@ onMounted(() => {
});
</script>
<template>
<div class="career-planning-page">
<!-- 提醒弹窗 -->
<RemindPopup
ref="remindPopup"
:remind-list="remindList"
@cancel="handleCancel"
@confirm="handleConfirm"
/>
<!-- 技能详情弹出层 -->
<SkillDetailPopup
ref="skillDetailPopup"
:job-title="selectedJobTitle"
:possessed-skills="selectedJobPossessedSkills"
:improvement-skills="selectedJobImprovementSkills"
/>
<!-- 页面内容 -->
<div class="page-content" v-if="showContent">
<!-- #ifdef MP-WEIXIN -->
<!-- 小程序背景图片 -->
<image class="mp-background" src="/static/icon/background2.png" mode="aspectFill"></image>
<!-- #endif -->
<!-- 头部区域 -->
<PageHeader
:active-tab="activeTab"
@tab-change="switchTab"
@search-click="handleSearchClick"
@menu-click="handleMenuClick"
@more-click="handleMoreClick"
/>
<!-- 内容区域 -->
<scroll-view scroll-y class="content-scroll">
<CareerRecommend v-if="activeTab === 0"/>
<CareerPath v-else-if="activeTab === 1" />
<SkillDevelopment v-else />
</scroll-view>
</div>
<!-- 底部导航栏 -->
<div class="tabbar-wrapper" v-if="showContent">
<CustomTabBar :currentPage="0" />
</div>
</div>
</template>
<style lang="scss">
.query-btn {
width: 100%;
height: 80rpx;
line-height: 40rpx;
border-radius: 14rpx;
background: linear-gradient(180deg, rgba(18, 125, 240, 1) 0%, rgba(59, 14, 123, 0.71) 100%);
color: rgba(255, 255, 255, 1);
font-size: 28rpx;
text-align: center;
font-family: '阿里巴巴普惠体3.0-regular', 'PingFang SC', 'Helvetica Neue', Helvetica, Arial, 'Microsoft YaHei', sans-serif;
border: 2rpx solid rgba(187, 187, 187, 1);
display: flex;
align-items: center;
justify-content: center;
gap: 12rpx;
padding: 0;
}
.empty-text {
font-size: 26rpx;
text-align: center;
line-height: 1.5;
}
.input-group {
display: flex;
flex-direction: column;
gap: 30rpx;
}
.input-item {
display: flex;
flex-direction: column;
gap: 12rpx;
}
.picker-field {
background-color: #F5F5F5;
border: 1rpx solid #E0E0E0;
border-radius: 12rpx;
padding: 20rpx 24rpx;
display: flex;
align-items: center;
justify-content: space-between;
}
.picker-text {
font-size: 28rpx;
color: #000000;
}
.picker-placeholder {
font-size: 28rpx;
color: #999999;
}
</style>
<style lang="scss" scoped>
.career-planning-page {
width: 100vw;

View File

@@ -1,374 +1,107 @@
<!--suppress JSFileReferences, NpmUsedModulesInstalled, VueMissingComponentImportInspection, HtmlUnknownTag -->
<script setup>
import { useCareerPathStore } from '@/stores/useCareerPathStore';
const store = useCareerPathStore();
</script>
<template>
<view class="career-path">
<div class="career-path">
<!-- 职业路径查询区域 -->
<view class="query-section">
<view class="section-title">
<uni-icons type="search" size="18" color="#286BFA"></uni-icons>
<text class="title-text">职业路径查询</text>
</view>
<view class="input-group">
<view class="input-item">
<text class="input-label">当前职位</text>
<input
class="input-field"
:value="currentPosition"
placeholder="市场专员"
placeholder-style="color: #999999"
disabled
/>
</view>
<view class="input-item">
<text class="input-label">目标职业</text>
<picker
mode="selector"
:range="targetCareerOptions"
range-key="label"
:value="selectedTargetIndex"
@change="handleTargetChange"
>
<view class="picker-field">
<text :class="selectedTargetIndex >= 0 ? 'picker-text' : 'picker-placeholder'">
{{ selectedTargetIndex >= 0 ? targetCareerOptions[selectedTargetIndex].label : '请选择目标职业' }}
</text>
<uni-icons type="arrowdown" size="16" color="#999999"></uni-icons>
</view>
<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="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>
</view>
</view>
<button class="query-btn" @click="handleQuery">
<text>查询职业发展路径</text>
</div>
<div class="input-item">
<span class="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 type="search" size="18" color="#FFFFFF"></uni-icons>
</button>
<view v-if="totalPathCount > 0" class="path-summary">
系统已收录 {{ totalPathCount }} 条职业路径
</view>
</view>
</div>
</div>
<!-- 职业发展路径区域 -->
<view class="path-section">
<view class="section-title">
<uni-icons type="person-filled" size="24" color="#000000"></uni-icons>
<div class="path-section">
<div class="section-title">
<uni-icons color="#000000" size="24" type="person-filled"></uni-icons>
<text class="title-text">职业发展路径</text>
</view>
</div>
<view class="timeline">
<!-- 起点 -->
<view class="timeline-item start">
<view class="timeline-marker start-marker"></view>
<view class="timeline-content">
<view class="step-title">: {{ pathData.start.title }}</view>
<view class="skill-tags">
<view
class="skill-tag"
v-for="(skill, index) in pathData.start.skills"
:key="index"
>
{{ skill }}
</view>
</view>
</view>
</view>
<!-- 步骤 -->
<view
class="timeline-item step"
v-for="(step, index) in pathData.steps"
:key="index"
>
<view class="timeline-marker step-marker"></view>
<view class="timeline-content">
<view class="step-title">{{ index + 1 }}: {{ step.title }}</view>
<view class="skill-tags">
<view
class="skill-tag"
v-for="(skill, sIndex) in step.skills"
:key="sIndex"
>
{{ skill }}
</view>
</view>
</view>
</view>
<!-- 终点 -->
<view class="timeline-item end">
<view class="timeline-marker end-marker"></view>
<view class="timeline-content">
<view class="step-title">终点: {{ pathData.end.title }}</view>
<view class="skill-tags">
<view
class="skill-tag"
v-for="(skill, index) in pathData.end.skills"
:key="index"
>
{{ skill }}
</view>
</view>
</view>
</view>
</view>
</view>
</view>
<div class="timeline">
<div v-for="(step, index) in store.result" :key="index" class="timeline-item" :class="[step.type]">
<div class="timeline-marker" :class="[`${step.type}-marker`]"></div>
<div class="timeline-content">
<div v-if="step.type === 'start'" class="step-title">起点: {{ step.title }}</div>
<div v-else-if="step.type === 'end'" class="step-title">: {{ step.title }}</div>
<div v-else class="step-title">{{ step.step }}: {{ step.title }}</div>
<div class="skill-tags">
<div v-for="(skill, sIndex) in step.tags" :key="sIndex" class="skill-tag">{{ skill }}</div>
</div>
</div>
</div>
</div>
</div>
</div>
</template>
<script setup>
import { ref, computed, onMounted } from 'vue';
import { getJobPathPage, getJobPathDetail, getJobPathNum } from '@/apiRc/jobPath.js';
// 接收父组件传递的当前职位名称
const props = defineProps({
currentJobName: {
type: String,
default: ''
}
});
const emit = defineEmits(['path-data-updated']);
// 当前职位(从父组件获取,统一使用)
const currentPosition = computed(() => props.currentJobName || '市场专员');
// 目标职业选项列表
const targetCareerOptions = ref([]);
const selectedTargetIndex = ref(-1);
const selectedJobPathId = ref(null);
// 职业路径数量
const totalPathCount = ref(0);
// 初始路径数据
const emptyPathData = {
start: {
title: '暂无数据',
skills: []
},
steps: [],
end: {
title: '暂无数据',
skills: []
}
};
const pathData = ref({ ...emptyPathData });
const isLoadingPath = ref(false);
function parseSkillList(skillString) {
if (!skillString) {
return [];
}
return skillString
.split(/[,]/)
.map(item => item.trim())
.filter(item => item.length > 0);
}
function resetPathData() {
pathData.value = {
start: { ...emptyPathData.start },
steps: [],
end: { ...emptyPathData.end }
};
}
async function fetchTargetCareerOptions(keyword = '') {
try {
const response = await getJobPathPage({
jobName: keyword,
pageNo: 1,
pageSize: 100
});
const list = response?.data?.list || response?.list || [];
targetCareerOptions.value = list.map(item => ({
label: item.endJob || item.startJob || '未知职位',
value: item.id,
startJob: item.startJob,
endJob: item.endJob,
jobOrder: item.jobOrder,
startJobId: item.startJobId,
endJobId: item.endJobId
}));
if (targetCareerOptions.value.length === 0) {
selectedTargetIndex.value = -1;
selectedJobPathId.value = null;
}
} catch (error) {
targetCareerOptions.value = [];
selectedTargetIndex.value = -1;
selectedJobPathId.value = null;
uni.showToast({
title: '职业路径列表获取失败',
icon: 'none'
});
}
}
async function fetchPathCount() {
try {
const response = await getJobPathNum();
totalPathCount.value = response?.data ?? 0;
} catch (error) {
totalPathCount.value = 0;
}
}
async function loadPathDetail(startJobId, endJobId) {
if (startJobId === null || startJobId === undefined || startJobId === '' || endJobId === null || endJobId === undefined || endJobId === '') {
uni.showToast({
title: '职业路径ID无效',
icon: 'none'
});
resetPathData();
return;
}
try {
const requestParams = {
startJobId,
endJobId
};
const response = await getJobPathDetail(requestParams);
const details = Array.isArray(response?.data) ? response.data : [];
if (details.length === 0) {
resetPathData();
uni.showToast({
title: '暂无职业路径数据',
icon: 'none'
});
return;
}
const normalized = details.map(item => ({
title: item?.name || '未命名职位',
skills: parseSkillList(item?.skillNameList)
}));
const start = normalized[0] || { title: '暂无数据', skills: [] };
const end = normalized[normalized.length - 1] || { title: '暂无数据', skills: [] };
const steps = normalized.slice(1, normalized.length - 1);
pathData.value = {
start,
steps,
end
};
// 通知父组件路径数据已更新
emit('path-data-updated', {
pathData: pathData.value,
targetCareer: targetCareerOptions.value[selectedTargetIndex.value]?.label || ''
});
} catch (error) {
console.warn(error, 22222);
uni.showToast({
title: '获取路径详情失败',
icon: 'none'
});
resetPathData();
emit('path-data-updated', {
pathData: { ...emptyPathData },
targetCareer: ''
});
}
}
function handleTargetChange(e) {
const index = Number(e.detail.value);
selectedTargetIndex.value = index;
const option = targetCareerOptions.value[index];
selectedJobPathId.value = option ? option.value : null;
}
async function handleQuery() {
if (selectedTargetIndex.value < 0) {
uni.showToast({
title: '请选择目标职业',
icon: 'none'
});
return;
}
const option = targetCareerOptions.value[selectedTargetIndex.value];
if (!option) {
uni.showToast({
title: '目标职业数据异常',
icon: 'none'
});
return;
}
isLoadingPath.value = true;
uni.showLoading({
title: '加载中...',
mask: true
});
console.log(option);
try {
let { value: jobPathId, startJobId, endJobId } = option;
/*if (!jobPathId) {
const response = await getJobPathPage({
jobName: option.label,
pageNo: 1,
pageSize: 100
});
jobPathId = response?.data?.list?.[0]?.id || null;
}
if (!jobPathId) {
uni.showToast({
title: '未找到职业路径',
icon: 'none'
});
resetPathData();
return;
}*/
// selectedJobPathId.value = jobPathId;
await loadPathDetail(startJobId, endJobId);
} catch (error) {
console.warn(error, 11111);
uni.showToast({
title: '查询失败,请重试',
icon: 'none'
});
} finally {
isLoadingPath.value = false;
uni.hideLoading();
}
}
// 获取当前职位信息(从接口获取)
async function getCurrentPosition() {
// TODO: 调用接口获取当前职位
// const response = await getCareerCurrentPosition();
// if (response && response.code === 200) {
// currentPosition.value = response.data?.position || '';
// }
}
onMounted(async () => {
await getCurrentPosition();
await Promise.all([
fetchTargetCareerOptions(),
fetchPathCount()
]);
});
</script>
<style lang="scss" scoped>
.career-path {
padding: 10rpx 28rpx 20rpx;
}
.card-content {
display: flex;
justify-content: space-between;
align-items: center;
.label {
font-size: 24rpx;
line-height: 34rpx;
color: rgba(154, 154, 154, 1);
text-align: left;
font-family: 'PingFangSC-Bold', 'PingFang SC', 'Helvetica Neue', Helvetica, Arial, 'Microsoft YaHei', sans-serif;
font-weight: 600;
}
.value {
font-size: 32rpx;
line-height: 46rpx;
color: rgb(16, 16, 16);
font-weight: 600;
text-align: left;
font-family: 'PingFangSC-Bold', 'PingFang SC', 'Helvetica Neue', Helvetica, Arial, 'Microsoft YaHei', sans-serif;
&.placeholder {
font-weight: 500;
color: #ccc;
}
}
}
.query-section {
background-color: #FFFFFF;
border-radius: 16rpx;
@@ -378,6 +111,8 @@ onMounted(async () => {
}
.section-title {
font-size: 32rpx;
color: #000000;
display: flex;
align-items: center;
gap: 12rpx;
@@ -390,19 +125,6 @@ onMounted(async () => {
color: #157DF0;
}
.input-group {
display: flex;
flex-direction: column;
gap: 20rpx;
margin-bottom: 24rpx;
}
.input-item {
display: flex;
flex-direction: column;
gap: 12rpx;
}
.input-label {
font-size: 28rpx;
color: #000000;
@@ -418,44 +140,6 @@ onMounted(async () => {
color: #666666;
}
.picker-field {
background-color: #F5F5F5;
border: 1rpx solid #E0E0E0;
border-radius: 12rpx;
padding: 20rpx 24rpx;
display: flex;
align-items: center;
justify-content: space-between;
}
.picker-text {
font-size: 28rpx;
color: #000000;
}
.picker-placeholder {
font-size: 28rpx;
color: #999999;
}
.query-btn {
width: 100%;
height: 80rpx;
line-height: 40rpx;
border-radius: 20rpx;
background: linear-gradient(180deg, rgba(18, 125, 240, 1) 0%, rgba(59, 14, 123, 0.71) 100%);
color: rgba(255, 255, 255, 1);
font-size: 28rpx;
text-align: center;
font-family: '阿里巴巴普惠体3.0-regular', 'PingFang SC', 'Helvetica Neue', Helvetica, Arial, 'Microsoft YaHei', sans-serif;
border: 2rpx solid rgba(187, 187, 187, 1);
display: flex;
align-items: center;
justify-content: center;
gap: 12rpx;
padding: 0;
}
.path-summary {
margin-top: 16rpx;
font-size: 24rpx;

View File

@@ -1,225 +1,84 @@
<template>
<view class="career-recommend">
<!-- 当前职位信息卡片 -->
<view class="info-card">
<view class="card-title">当前职位信息</view>
<view class="card-content">
<text class="label">当前职位</text>
<text class="value">{{ currentJobDisplay }}</text>
</view>
</view>
<!-- 我的技能标签卡片 -->
<view class="info-card">
<view class="card-title">我的技能标签</view>
<view class="skill-tags">
<view
class="skill-tag"
v-for="(skill, index) in skillTags"
:key="index"
>
{{ skill }}
</view>
<text v-if="!skillTags.length && !isLoadingSkillTags" class="empty-text">暂无技能数据</text>
<text v-if="isLoadingSkillTags" class="empty-text">加载中...</text>
</view>
</view>
<!-- 相似推荐职位 -->
<view class="section-title">
相似推荐职位
</view>
<view v-if="!isLoadingRecommend && recommendedJobs.length === 0" class="empty-text">暂无推荐职位</view>
<view
class="job-item-card"
v-for="(job, index) in recommendedJobs"
:key="index"
@click="handleJobCardClick(job)"
>
<view class="job-header">
<text class="job-title">{{ job.title }}</text>
</view>
<view class="job-skills">
<view
class="job-skill-tag"
v-for="(skill, skillIndex) in job.skills"
:key="skillIndex"
>
{{ skill }}
</view>
</view>
</view>
</view>
</template>
<!--suppress JSFileReferences, NpmUsedModulesInstalled, VueMissingComponentImportInspection, HtmlUnknownTag -->
<script setup>
import { ref, computed, watch, onMounted } from 'vue';
import { recommendJob } from '@/apiRc/jobRecommend.js';
import { appUserInfo } from '@/apiRc/user/user.js';
import { useCareerRecommendationStore } from '@/stores/useCareerRecommendationStore';
const props = defineProps({
currentJobId: {
type: [Number, String],
default: null
},
currentJobName: {
type: String,
default: ''
}
});
const emit = defineEmits(['job-card-click', 'skills-updated']);
// 数据状态
const skillTags = ref([]);
const recommendedJobs = ref([]);
const isLoadingSkillTags = ref(false);
const isLoadingRecommend = ref(false);
// 计算属性
const currentJobDisplay = computed(() => props.currentJobName || '市场专员');
// 从 appSkillsList 中提取技能名称
function extractSkillsFromAppSkillsList(appSkillsList = []) {
return (Array.isArray(appSkillsList) ? appSkillsList : [])
.map(item => item?.name || item?.nameStr || '')
.filter(name => !!name && name.trim().length > 0);
}
// 从技能列表中提取技能名称用于显示(用于推荐职位数据)
function extractSkillNames(skillList = []) {
return (Array.isArray(skillList) ? skillList : [])
.map(item => item?.skillName || '')
.filter(name => !!name && name.trim().length > 0);
}
// 获取当前职位的技能标签
async function fetchCurrentJobSkills() {
isLoadingSkillTags.value = true;
try {
// 优先从 appUserInfo 接口获取技能标签
const response = await appUserInfo();
const userInfo = response?.data || {};
// 从 appSkillsList 中提取技能名称
const appSkillsList = Array.isArray(userInfo?.appSkillsList) ? userInfo.appSkillsList : [];
const apiSkills = extractSkillsFromAppSkillsList(appSkillsList);
// 如果接口返回了技能数据,使用接口数据
if (apiSkills.length > 0) {
skillTags.value = apiSkills;
} else {
// 如果接口没有返回技能数据,从缓存中读取
const cachedUserInfo = uni.getStorageSync('userInfo') || {};
const cachedAppSkills = Array.isArray(cachedUserInfo?.appSkillsList) ? cachedUserInfo.appSkillsList : [];
const cachedSkills = extractSkillsFromAppSkillsList(cachedAppSkills);
if (cachedSkills.length > 0) {
skillTags.value = cachedSkills;
} else {
skillTags.value = [];
}
}
// 通知父组件技能数据已更新
emit('skills-updated', {
currentJobSkills: skillTags.value,
recommendedJobs: recommendedJobs.value
});
} catch (error) {
// appUserInfo 接口调用失败时,从缓存中读取
const cachedUserInfo = uni.getStorageSync('userInfo') || {};
const cachedAppSkills = Array.isArray(cachedUserInfo?.appSkillsList) ? cachedUserInfo.appSkillsList : [];
const cachedSkills = extractSkillsFromAppSkillsList(cachedAppSkills);
if (cachedSkills.length > 0) {
skillTags.value = cachedSkills;
} else {
skillTags.value = [];
}
emit('skills-updated', {
currentJobSkills: skillTags.value,
recommendedJobs: recommendedJobs.value
});
} finally {
isLoadingSkillTags.value = false;
}
}
// 获取推荐职位列表
async function fetchRecommendedJobs() {
isLoadingRecommend.value = true;
try {
const response = await recommendJob({
jobName: props.currentJobName
});
const list = Array.isArray(response?.data) ? response.data : [];
recommendedJobs.value = list.map((item, index) => {
const skillList = Array.isArray(item?.skillList) ? item.skillList : [];
const skillNames = extractSkillNames(skillList);
return {
id: item?.jobId ?? index,
jobId: item?.jobId ?? null,
title: item?.jobName || `推荐职位${index + 1}`,
jobName: item?.jobName || '',
skills: skillNames,
rawSkills: skillList
};
});
// 通知父组件推荐职位数据已更新
emit('skills-updated', {
currentJobSkills: skillTags.value,
recommendedJobs: recommendedJobs.value
});
} catch (error) {
recommendedJobs.value = [];
emit('skills-updated', {
currentJobSkills: skillTags.value,
recommendedJobs: []
});
} finally {
isLoadingRecommend.value = false;
}
}
// 组件挂载时检查并调用
onMounted(() => {
setTimeout(() => {
if (props.currentJobName) {
fetchCurrentJobSkills();
fetchRecommendedJobs();
}
}, 100);
});
// 监听 props 变化,自动获取推荐职位和技能标签
watch(
() => [props.currentJobId, props.currentJobName],
() => {
if (props.currentJobName) {
fetchCurrentJobSkills();
fetchRecommendedJobs();
}
},
{ immediate: true }
);
// 事件处理
function handleJobCardClick(job) {
emit('job-card-click', job);
}
const store = useCareerRecommendationStore();
</script>
<template>
<div class="career-recommend">
<div class="info-card">
<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">
<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>
<button class="query-btn" @click="store.eventSearch">
<span>搜索</span>
<uni-icons type="search" size="18" color="#FFFFFF"></uni-icons>
</button>
</div>
</div>
<div class="info-card">
<div class="card-title">我的技能标签</div>
<div class="skill-tags">
<div v-for="(skill, index) in store.skillTags" :key="index" class="skill-tag">
{{ skill }}
</div>
<span v-if="!store.skillTags.length" class="empty-text">暂无技能数据</span>
</div>
</div>
<div class="section-title">
相似推荐职位
</div>
<div v-if="!store.result && store.result.length === 0" class="empty-text">暂无推荐职位</div>
<div v-for="(job, index) in store.result" :key="index" class="job-item-card">
<div class="job-header">
<span class="job-title">{{ job.title }}</span>
</div>
<div class="job-header">
<span>职业相似度{{ job.percentage }}%</span>
</div>
<div class="job-skills">
<div v-for="tag in job.tags" :key="tag" class="job-skill-tag">
{{ tag }}
</div>
</div>
</div>
</div>
</template>
<style lang="scss" scoped>
.career-recommend {
padding: 10rpx 28rpx 20rpx;
}
.section-title {
font-size: 32rpx;
color: #000000;
display: flex;
align-items: center;
gap: 12rpx;
margin-bottom: 24rpx;
}
.title-text {
font-size: 32rpx;
font-weight: 600;
color: #157DF0;
}
.info-card {
background-color: #FFFFFF;
border-radius: 16rpx;
@@ -274,14 +133,6 @@ function handleJobCardClick(job) {
white-space: nowrap;
}
.section-title {
font-size: 32rpx;
font-weight: 600;
color: #000000;
margin-bottom: 20rpx;
margin-top: 8rpx;
}
.job-item-card {
background-color: #FFFFFF;
border-radius: 16rpx;
@@ -290,7 +141,6 @@ function handleJobCardClick(job) {
box-shadow: 0 4rpx 12rpx rgba(0, 0, 0, 0.08);
border-left: 6rpx solid #409EFF;
position: relative;
cursor: pointer;
}
.job-header {

View File

@@ -1,382 +1,85 @@
<template>
<view class="skill-development">
<!-- 职业技能查询区域 -->
<view class="query-section">
<view class="section-title">
<uni-icons type="search" size="18" color="#286BFA"></uni-icons>
<text class="title-text">职业技能查询</text>
</view>
<view class="input-group">
<view class="input-item">
<text class="input-label">当前职位</text>
<input
class="input-field"
:value="currentPosition"
placeholder="市场专员"
placeholder-style="color: #999999"
disabled
/>
</view>
<view class="input-item">
<text class="input-label">目标职业</text>
<picker
mode="selector"
:range="targetCareerOptions"
range-key="label"
:value="selectedTargetIndex"
@change="handleTargetChange"
>
<view class="picker-field">
<text :class="selectedTargetIndex >= 0 ? 'picker-text' : 'picker-placeholder'">
{{ selectedTargetIndex >= 0 ? targetCareerOptions[selectedTargetIndex].label : '请选择目标职业' }}
</text>
<uni-icons type="arrowdown" size="16" color="#999999"></uni-icons>
</view>
</picker>
</view>
</view>
<button class="query-btn" @click="handleQuery">
<text>查询技能发展路径</text>
<uni-icons type="search" size="18" color="#FFFFFF"></uni-icons>
</button>
<view v-if="totalPathCount > 0" class="path-summary">
系统已收录 {{ totalPathCount }} 条职业路径
</view>
</view>
<view class="content-section">
<view class="section-title">
<uni-icons type="person-filled" size="18" color="#000000"></uni-icons>
<text class="title-text">技能发展路径</text>
</view>
<view class="intro-text">
基于您的当前职业和目标职业,以下是您需要重点发展的技能:
</view>
<view class="skill-list">
<view v-if="isLoadingSkills" class="empty-text">加载中...</view>
<view v-else-if="!hasQueried" class="empty-text">请先查询职业路径以获取技能发展数据</view>
<view v-else-if="skillList.length === 0" class="empty-text">暂无数据</view>
<view
v-else
class="skill-item"
v-for="(skill, index) in skillList"
:key="index"
>
<view class="skill-header">
<text class="skill-name">{{ skill.name }}</text>
<view class="skill-info">
<text class="skill-score">技能分数: {{ skill.score }}</text>
<text class="skill-weight">权重: {{ skill.weight }}</text>
</view>
</view>
<view class="skill-tags" v-if="skill.tags && skill.tags.length > 0">
<view
class="skill-tag"
v-for="(tag, tagIndex) in skill.tags"
:key="tagIndex"
>
{{ tag }}
</view>
</view>
</view>
</view>
</view>
</view>
</template>
<!--suppress JSFileReferences, NpmUsedModulesInstalled, VueMissingComponentImportInspection, HtmlUnknownTag -->
<script setup>
import { ref, computed, watch, onMounted } from 'vue';
import { getJobPathPage, getJobPathDetail, getJobPathNum } from '@/apiRc/jobPath.js';
import { getJobSkillWeight } from '@/apiRc/jobSkill.js';
import { useSkillDevelopmentStore } from '@/stores/useSkillDevelopmentStore';
const props = defineProps({
// 当前职位名称
currentJobName: {
type: String,
default: ''
}
});
const emit = defineEmits(['path-data-updated']);
// 当前职位(从父组件获取)
const currentPosition = computed(() => props.currentJobName || '市场专员');
// 目标职业选项列表
const targetCareerOptions = ref([]);
const selectedTargetIndex = ref(-1);
const selectedJobPathId = ref(null);
// 职业路径数量
const totalPathCount = ref(0);
// 技能列表数据(从接口获取)
const skillList = ref([]);
const isLoadingSkills = ref(false);
// 是否已经查询过(用于区分未查询和已查询但无数据)
const hasQueried = ref(false);
function parseSkillList(skillString) {
if (!skillString) {
return [];
}
return skillString
.split(/[,]/)
.map(item => item.trim())
.filter(item => item.length > 0);
}
async function fetchTargetCareerOptions(keyword = '') {
try {
const response = await getJobPathPage({
jobName: keyword,
pageNo: 1,
pageSize: 100
});
const list = response?.data?.list || response?.list || [];
targetCareerOptions.value = list.map(item => ({
label: item.endJob || item.startJob || '未知职位',
value: item.id,
startJob: item.startJob,
endJob: item.endJob,
jobOrder: item.jobOrder
}));
if (targetCareerOptions.value.length === 0) {
selectedTargetIndex.value = -1;
selectedJobPathId.value = null;
}
} catch (error) {
targetCareerOptions.value = [];
selectedTargetIndex.value = -1;
selectedJobPathId.value = null;
uni.showToast({
title: '职业路径列表获取失败',
icon: 'none'
});
}
}
async function fetchPathCount() {
try {
const response = await getJobPathNum();
totalPathCount.value = response?.data ?? 0;
} catch (error) {
totalPathCount.value = 0;
}
}
async function loadPathDetail(jobPathId) {
if (!jobPathId || jobPathId === null || jobPathId === undefined || jobPathId === '') {
uni.showToast({
title: '职业路径ID无效',
icon: 'none'
});
localPathData.value = {
start: { title: '暂无数据', skills: [] },
steps: [],
end: { title: '暂无数据', skills: [] }
};
return;
}
try {
const requestParams = {
jobPathId: jobPathId
};
const response = await getJobPathDetail(requestParams);
const details = Array.isArray(response?.data) ? response.data : [];
if (details.length === 0) {
localPathData.value = {
start: { title: '暂无数据', skills: [] },
steps: [],
end: { title: '暂无数据', skills: [] }
};
uni.showToast({
title: '暂无职业路径数据',
icon: 'none'
});
return;
}
const normalized = details.map(item => ({
title: item?.name || '未命名职位',
skills: parseSkillList(item?.skillNameList)
}));
const start = normalized[0] || { title: '暂无数据', skills: [] };
const end = normalized[normalized.length - 1] || { title: '暂无数据', skills: [] };
const steps = normalized.slice(1, normalized.length - 1);
localPathData.value = {
start,
steps,
end
};
// 通知父组件路径数据已更新
emit('path-data-updated', {
pathData: localPathData.value,
targetCareer: targetCareerOptions.value[selectedTargetIndex.value]?.label || ''
});
} catch (error) {
uni.showToast({
title: '获取路径详情失败',
icon: 'none'
});
localPathData.value = {
start: { title: '暂无数据', skills: [] },
steps: [],
end: { title: '暂无数据', skills: [] }
};
emit('path-data-updated', {
pathData: localPathData.value,
targetCareer: ''
});
}
}
function handleTargetChange(e) {
const index = Number(e.detail.value);
selectedTargetIndex.value = index;
const option = targetCareerOptions.value[index];
selectedJobPathId.value = option ? option.value : null;
// 重新选择目标职业时,重置查询状态和技能列表
hasQueried.value = false;
skillList.value = [];
}
async function handleQuery() {
if (selectedTargetIndex.value < 0) {
uni.showToast({
title: '请选择目标职业',
icon: 'none'
});
return;
}
const option = targetCareerOptions.value[selectedTargetIndex.value];
if (!option) {
uni.showToast({
title: '目标职业数据异常',
icon: 'none'
});
return;
}
// 获取技能权重数据
await fetchSkillWeight();
}
// 获取技能权重数据
async function fetchSkillWeight() {
// 获取当前职位(使用界面上显示的值)
const currentJob = currentPosition.value || props.currentJobName || '';
if (!currentJob) {
skillList.value = [];
uni.showToast({
title: '当前职位信息缺失',
icon: 'none'
});
return;
}
// 获取目标职业(使用界面上选择的值)
const targetCareer = selectedTargetIndex.value >= 0
? targetCareerOptions.value[selectedTargetIndex.value]?.label
: '';
if (!targetCareer) {
skillList.value = [];
uni.showToast({
title: '请选择目标职业',
icon: 'none'
});
return;
}
isLoadingSkills.value = true;
uni.showLoading({
title: '加载中...',
mask: true
});
try {
const response = await getJobSkillWeight({
currentJobName: currentJob,
targetJobName: targetCareer
});
// 标记已经查询过
hasQueried.value = true;
// 处理接口返回的数据
const responseData = response?.data || response || [];
const dataItem = Array.isArray(responseData) ? responseData[0] : responseData;
// 合并当前职位和目标职位的技能列表
const currentSkills = Array.isArray(dataItem?.currentSkillDetList) ? dataItem.currentSkillDetList : [];
const targetSkills = Array.isArray(dataItem?.targetSkillDetList) ? dataItem.targetSkillDetList : [];
const allSkills = [...currentSkills, ...targetSkills];
// 转换为组件需要的格式
skillList.value = allSkills.map(item => ({
name: item?.skillName || item?.name || '',
weight: item?.skillWeight || item?.weight || '0',
score: item?.skillScore !== undefined && item?.skillScore !== null ? item.skillScore : 0,
tags: item?.tags || [],
currentLevel: item?.currentLevel || item?.level || 0
})).filter(item => item.name).sort((a, b) => {
// 按技能分数降序排序skillScore
const scoreA = parseFloat(a.score) || 0;
const scoreB = parseFloat(b.score) || 0;
return scoreB - scoreA;
});
if (skillList.value.length === 0) {
uni.showToast({
title: '暂无技能数据',
icon: 'none'
});
}
} catch (error) {
// 查询失败也标记为已查询
hasQueried.value = true;
uni.showToast({
title: '获取技能权重失败',
icon: 'none'
});
skillList.value = [];
} finally {
isLoadingSkills.value = false;
uni.hideLoading();
}
}
onMounted(async () => {
await Promise.all([
fetchTargetCareerOptions(),
fetchPathCount()
]);
});
const store = useSkillDevelopmentStore();
</script>
<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>
</button>
</div>
</div>
<div class="content-section">
<div class="section-title">
<uni-icons color="#000000" size="18" type="person-filled"></uni-icons>
<span class="title-text">技能发展路径</span>
</div>
<div class="intro-text">
基于您的当前职业和目标职业,以下是您需要重点发展的技能:
</div>
<div class="skill-list">
<div v-if="store.result.length === 0" class="empty-text">暂无数据</div>
<div v-for="(skill, index) in store.result" v-else :key="index" class="skill-item">
<div class="skill-header">
<span class="skill-name">{{ skill.name }}</span>
<div class="skill-info">
<span class="skill-score">技能分数: {{ skill.score }}</span>
<span class="skill-weight">权重: {{ skill.weight }}</span>
</div>
</div>
<div v-if="skill.tags && skill.tags.length > 0" class="skill-tags">
<div v-for="(tag, tagIndex) in skill.tags" :key="tagIndex" class="skill-tag">
{{ tag }}
</div>
</div>
</div>
</div>
</div>
</div>
</template>
<style lang="scss" scoped>
.skill-development {
padding: 10rpx 28rpx 20rpx;
background-color: #EBF4FF;
min-height:95%;
min-height: 95%;
}
.query-section {
@@ -407,12 +110,6 @@ onMounted(async () => {
margin-bottom: 24rpx;
}
.input-item {
display: flex;
flex-direction: column;
gap: 12rpx;
}
.input-label {
font-size: 28rpx;
color: #000000;
@@ -428,44 +125,6 @@ onMounted(async () => {
color: #666666;
}
.picker-field {
background-color: #F5F5F5;
border: 1rpx solid #E0E0E0;
border-radius: 12rpx;
padding: 20rpx 24rpx;
display: flex;
align-items: center;
justify-content: space-between;
}
.picker-text {
font-size: 28rpx;
color: #000000;
}
.picker-placeholder {
font-size: 28rpx;
color: #999999;
}
.query-btn {
width: 100%;
height: 80rpx;
line-height: 40rpx;
border-radius: 20rpx;
background: linear-gradient(180deg, rgba(18, 125, 240, 1) 0%, rgba(59, 14, 123, 0.71) 100%);
color: rgba(255, 255, 255, 1);
font-size: 28rpx;
text-align: center;
font-family: '阿里巴巴普惠体3.0-regular', 'PingFang SC', 'Helvetica Neue', Helvetica, Arial, 'Microsoft YaHei', sans-serif;
border: 2rpx solid rgba(187, 187, 187, 1);
display: flex;
align-items: center;
justify-content: center;
gap: 12rpx;
padding: 0;
}
.path-summary {
margin-top: 16rpx;
font-size: 24rpx;
@@ -476,8 +135,9 @@ onMounted(async () => {
button::after {
border: none;
}
.section-title {
font-size: 32rpx;
color: #000000;
display: flex;
align-items: center;
gap: 12rpx;

BIN
static/icon/pxjgxx.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 942 B

BIN
static/icon/pxpjjg.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

BIN
static/icon/pxxxcj.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

View File

@@ -0,0 +1,214 @@
import { computed, ref, watch } from 'vue';
import { defineStore } from 'pinia';
import { getCurrentPosition, getPath, getPathDetail } from '@/apiRc/service/careerPath';
export const useCareerPathStore = defineStore('career-path', () => {
const userInfo = ref({
userName: '',
professions: [],
skills: []
});
try {
const data = uni.getStorageSync('userInfo');
userInfo.value.professions = data.jobTitle.map((d) => {
return {
label: d,
value: d
};
});
userInfo.value.skills = data.appSkillsList.map((d) => {
return {
label: d.name,
value: d.name
};
});
} catch (e) {
console.warn(e);
}
const professionIndex = ref(0);
const profession = ref('');
const professionLabel = ref('');
const professions = ref([]);
const professionsRef = computed(() => {
if (!userInfo.value || !userInfo.value.professions || userInfo.value.professions.length === 0) {
return professions.value;
}
const userProfessionsLabels = userInfo.value.professions.map((d) => d.label);
let professionsA = [];
let professionsB = [];
professions.value.filter((d) => userProfessionsLabels.includes(d.label));
for (const d of professions.value) {
if (userProfessionsLabels.includes(d.label)) {
professionsA.push(d);
} else {
professionsB.push(d);
}
}
if (professionsA.length === 0) {
professionsA = userInfo.value.professions;
professionsB = professions.value;
}
return [ ...professionsA, ...professionsB ];
});
const targetCareerIndex = ref(0);
const targetCareer = ref('');
const targetCareerLabel = ref('');
const paths = ref([]);
const pathsRef = computed(() => {
return paths.value.filter((d) => {
return `${ d.startJobId }` === profession.value;
});
});
const result = ref([]);
const fetchData = async () => {
try {
const { code, msg, data } = await getCurrentPosition();
if (code !== 0) {
$emitter.emit('error-message', msg);
return;
}
if (!data) {
return;
}
professions.value = data.map((d) => {
return {
label: d.name,
value: `${ d.jobId }`
};
});
} catch (e) {
console.warn(e);
}
};
const fetchDataPath = async () => {
try {
const { code, msg, data } = await getPath();
if (code !== 0) {
$emitter.emit('error-message', msg);
return;
}
if (!data) {
return;
}
paths.value = data.map((d) => {
return {
label: d.endJob,
value: `${ d.startJobId }-${ d.endJobId }`,
startJobId: d.startJobId
};
});
} catch (e) {
console.warn(e);
}
};
const fetchResult = async () => {
if (!targetCareer.value) {
return;
}
const [ startJobId, endJobId ] = targetCareer.value.split('-');
const params = {
startJobId: Number(startJobId),
endJobId: Number(endJobId)
};
try {
const { code, msg, data } = await getPathDetail(params);
if (code !== 0) {
$emitter.emit('error-message', msg);
return;
}
if (!data) {
return;
}
result.value = data.map((d, i) => {
return {
type: i === 0 ? 'start' : i === data.length - 1 ? 'end' : 'step',
step: i,
title: d.name,
tags: d.skillNameList.split(',')
};
});
} catch (e) {
console.warn(e);
}
};
const eventSearch = () => {
if (pathsRef.value.length === 0) {
ElMessage.warning({
message: '当前职业暂无发展路径,敬请期待!',
duration: 5000
});
return;
}
if (!profession.value) {
ElMessage.warning({
message: '请选择当前职位!',
duration: 5000
});
return;
}
if (!targetCareer.value) {
ElMessage.warning({
message: '请选择目标职业!',
duration: 5000
});
return;
}
void fetchResult();
};
const eventProfession = (e) => {
professionIndex.value = Number(e.detail.value);
const item = professionsRef.value[e.detail.value]
profession.value = item.value;
professionLabel.value = item.label;
targetCareer.value = '';
targetCareerLabel.value = '';
result.value = [];
};
const eventTargetCareer = (e) => {
targetCareerIndex.value = Number(e.detail.value);
const item = pathsRef.value[e.detail.value]
targetCareer.value = item.value;
targetCareerLabel.value = item.label;
result.value = [];
};
void fetchData();
void fetchDataPath();
watch(
() => professionsRef.value,
() => {
if (professionsRef.value[ 0 ]) {
profession.value = professionsRef.value[ 0 ].value;
professionLabel.value = professionsRef.value[ 0 ].label;
}
}
);
return {
professionIndex,
professionLabel,
profession,
professionsRef,
targetCareerIndex,
targetCareer,
targetCareerLabel,
pathsRef,
result,
eventProfession,
eventTargetCareer,
eventSearch
};
});

View File

@@ -0,0 +1,178 @@
import { computed, ref, watch } from 'vue';
import { defineStore } from 'pinia';
import { getProfessions, getRecommend, getSkillTags } from '@/apiRc/service/careerRecommendation';
export const useCareerRecommendationStore = defineStore('career-recommendation', () => {
const userInfo = ref({
userName: '',
professions: [],
skills: []
});
try {
const data = uni.getStorageSync('userInfo');
userInfo.value.professions = data.jobTitle.map((d) => {
return {
label: d,
value: d
};
});
userInfo.value.skills = data.appSkillsList.map((d) => {
return {
label: d.name,
value: d.name
};
});
} catch (e) {
console.warn(e);
}
const professionIndex = ref(0);
const profession = ref('');
const professionLabel = ref('');
const professions = ref([]);
const professionsRef = computed(() => {
if (!userInfo.value || !userInfo.value.professions || userInfo.value.professions.length === 0) {
return professions.value;
}
const userProfessionsLabels = userInfo.value.professions.map((d) => d.label);
let professionsA = [];
let professionsB = [];
professions.value.filter((d) => userProfessionsLabels.includes(d.label));
for (const d of professions.value) {
if (userProfessionsLabels.includes(d.label)) {
professionsA.push(d);
} else {
professionsB.push(d);
}
}
if (professionsA.length === 0) {
professionsA = userInfo.value.professions;
professionsB = professions.value;
}
return [ ...professionsA, ...professionsB ];
});
const skills = ref([]);
const skillTags = computed(() => {
if (userInfo.value.professions[ 0 ] && professionLabel.value === userInfo.value.professions[ 0 ].value) {
return userInfo.value.skills.map((d) => d.label);
}
return skills.value;
});
const result = ref([]);
const fetchData = async () => {
try {
const { code, msg, data } = await getProfessions();
if (code !== 0) {
$emitter.emit('error-message', msg);
return;
}
if (!data) {
return;
}
professions.value = data.map((d) => {
return {
label: d.name,
value: `${ d.jobId }`
};
});
} catch (e) {
console.warn(e);
}
};
const fetchSkillTags = async () => {
const params = {
jobName: professionLabel.value
};
try {
const { code, msg, data } = await getSkillTags(params);
if (code !== 0) {
$emitter.emit('error-message', msg);
return;
}
if (typeof data !== 'undefined' && Array.isArray(data) && data.length > 0 && data[ 0 ]) {
skills.value = data[ 0 ].skillDetList.map((d) => d.skillName);
}
} catch (e) {
console.warn(e);
}
};
const fetchRecommend = async () => {
const params = {
jobName: professionLabel.value
};
try {
const { code, msg, data } = await getRecommend(params);
if (code !== 0) {
$emitter.emit('error-message', msg);
return;
}
if (!data) {
return;
}
result.value = data.map((d) => {
return {
title: d.jobName,
tags: d.skillList.map((d) => d.skillName),
percentage: d.similarityScore ?? 0
};
});
} catch (e) {
console.warn(e);
}
};
const eventSearch = () => {
void fetchRecommend();
};
const eventProfession = (e) => {
professionIndex.value = Number(e.detail.value);
const item = professionsRef.value[e.detail.value]
profession.value = item.value;
professionLabel.value = item.label;
};
void fetchData();
watch(
() => profession.value,
() => {
if (profession.value) {
void fetchSkillTags();
result.value = [];
}
},
{
immediate: true
}
);
watch(
() => professionsRef.value,
() => {
if (professionsRef.value[ 0 ]) {
profession.value = professionsRef.value[ 0 ].value;
professionLabel.value = professionsRef.value[ 0 ].label;
}
}
);
return {
professionIndex,
profession,
professionLabel,
professionsRef,
skillTags,
result,
eventProfession,
eventSearch
};
});

View File

@@ -0,0 +1,222 @@
import { computed, ref, watch } from 'vue';
import { defineStore } from 'pinia';
import { getCurrentPosition, getPath } from '@/apiRc/service/careerPath';
import { getSkill } from '@/apiRc/service/skillDevelopment';
export const useSkillDevelopmentStore = defineStore('skill-development', () => {
const userInfo = ref({
userName: '',
professions: [],
skills: []
});
try {
const data = uni.getStorageSync('userInfo');
userInfo.value.professions = data.jobTitle.map((d) => {
return {
label: d,
value: d
};
});
userInfo.value.skills = data.appSkillsList.map((d) => {
return {
label: d.name,
value: d.name
};
});
} catch (e) {
console.warn(e);
}
const professionIndex = ref(0);
const profession = ref('');
const professionLabel = ref('');
const professions = ref([]);
const professionsRef = computed(() => {
if (!userInfo.value || !userInfo.value.professions || userInfo.value.professions.length === 0) {
return professions.value;
}
const userProfessionsLabels = userInfo.value.professions.map((d) => d.label);
let professionsA = [];
let professionsB = [];
professions.value.filter((d) => userProfessionsLabels.includes(d.label));
for (const d of professions.value) {
if (userProfessionsLabels.includes(d.label)) {
professionsA.push(d);
} else {
professionsB.push(d);
}
}
if (professionsA.length === 0) {
professionsA = userInfo.value.professions;
professionsB = professions.value;
}
return [ ...professionsA, ...professionsB ];
});
const targetCareerIndex = ref(0);
const targetCareer = ref('');
const targetCareerLabel = ref('');
const paths = ref([]);
const pathsRef = computed(() => {
return paths.value.filter((d) => {
return `${ d.startJobId }` === profession.value;
});
});
const result = ref([]);
const fetchData = async () => {
try {
const { code, msg, data } = await getCurrentPosition();
if (code !== 0) {
$emitter.emit('error-message', msg);
return;
}
if (!data) {
return;
}
professions.value = data.map((d) => {
return {
label: d.name,
value: `${ d.jobId }`
};
});
} catch (e) {
console.warn(e);
}
};
const fetchDataPath = async () => {
try {
const { code, msg, data } = await getPath();
if (code !== 0) {
$emitter.emit('error-message', msg);
return;
}
if (!data) {
return;
}
paths.value = data.map((d) => {
return {
label: d.endJob,
value: d.endJob,
startJobId: d.startJobId
};
});
} catch (e) {
console.warn(e);
}
};
const fetchResult = async () => {
if (!targetCareer.value) {
return;
}
const current = professionsRef.value.find((d) => d.value === profession.value);
const target = pathsRef.value.find((d) => d.value === targetCareer.value);
if (!current || !target) {
return;
}
const params = {
currentJobName: current.label,
targetJobName: target.label
};
try {
const { code, msg, data } = await getSkill(params);
if (code !== 0) {
$emitter.emit('error-message', msg);
return;
}
if (typeof data !== 'undefined' && Array.isArray(data) && data.length > 0 && data[ 0 ]) {
const excludes = data[ 0 ].currentSkillDetList.map((d) => d.skillId);
result.value = data[ 0 ].targetSkillDetList
.filter((d) => !excludes.includes(d.skillId))
.map((d) => {
return {
type: d.skillType,
title: d.skillName,
name: d.skillName,
weight: d.skillWeight,
score: d.skillScore
};
});
}
} catch (e) {
console.warn(e);
}
};
const eventSearch = () => {
if (pathsRef.value.length === 0) {
ElMessage.warning({
message: '当前职业暂无发展路径,敬请期待!',
duration: 5000
});
return;
}
if (!profession.value) {
ElMessage.warning({
message: '请选择当前职位!',
duration: 5000
});
return;
}
if (!targetCareer.value) {
ElMessage.warning({
message: '请选择目标职业!',
duration: 5000
});
return;
}
void fetchResult();
};
const eventProfession = (e) => {
professionIndex.value = Number(e.detail.value);
const item = professionsRef.value[ e.detail.value ];
profession.value = item.value;
professionLabel.value = item.label;
targetCareer.value = '';
targetCareerLabel.value = '';
result.value = [];
};
const eventTargetCareer = (e) => {
targetCareerIndex.value = Number(e.detail.value);
const item = pathsRef.value[ e.detail.value ];
targetCareer.value = item.value;
targetCareerLabel.value = item.label;
result.value = [];
};
void fetchData();
void fetchDataPath();
watch(
() => professionsRef.value,
() => {
if (professionsRef.value[ 0 ]) {
profession.value = professionsRef.value[ 0 ].value;
professionLabel.value = professionsRef.value[ 0 ].label;
}
}
);
return {
professionIndex,
professionLabel,
profession,
professionsRef,
targetCareerIndex,
targetCareer,
targetCareerLabel,
pathsRef,
result,
eventProfession,
eventTargetCareer,
eventSearch
};
});

View File

@@ -113,6 +113,12 @@ const useChatGroupDBStore = defineStore("messageGroup", () => {
try {
toggleTyping(true);
const customDataID = 'message_' + UUID.generate()
// 对话历史管理只保留最近的N条消息防止token超限
// 计算消息数量只保留最近的10条消息可根据实际情况调整
const MAX_HISTORY_MESSAGES = 10;
const historyMessages = messages.value.slice(-MAX_HISTORY_MESSAGES);
const params = {
data: text,
sessionId: chatSessionID.value,

View File

@@ -19,38 +19,20 @@ const md = new MarkdownIt({
const result = safeExtractJson(str);
if (result) { // json解析成功
const jobId = result.appJobUrl.split('jobId=')[1]
let domContext = `
<a class="custom-card" data-job-id="${jobId}">
<div class="card-title">
<span class="title-text" >${result.jobTitle}</span>
<div class="card-salary">${result.salary}</div>
</div>
<div class="card-company">${result.location}·${result.companyName}</div>
<div class="card-info">
<div class="info-item">
<div class="card-tag">${result.education}</div>
<div class="card-tag">${result.experience}</div>
</div>
<div class="info-item">查看详情<div class="position-nav"></div></div>
</div>
</a>
`
let domContext = `<a class="custom-card" data-job-id="${jobId}"><div class="card-title"><span class="title-text">${result.jobTitle}</span><div class="card-salary">${result.salary}</div></div><div class="card-company">${result.location}·${result.companyName}</div><div class="card-info"><div class="info-item"><div class="card-tag">${result.education}</div><div class="card-tag">${result.experience}</div></div><div class="info-item">查看详情<div class="position-nav"></div></div></div></a>`
if (result.data) {
jobMoreMap.set(jobId, result.data)
domContext +=
`<a class="custom-more" data-job-id="${jobId}">查看更多岗位<div class="more-icon"></div></a>`
domContext += `<a class="custom-more" data-job-id="${jobId}">查看更多岗位<div class="more-icon"></div></a>`
}
return domContext
}
}
// <div class="card-tag">${result.location}</div>
// <div class="info-item">${result.salary}</div>
// 代码块
let preCode = ""
try {
preCode = hljs.highlightAuto(str).value
} catch (err) {
preCode = markdownIt.utils.escapeHtml(str);
preCode = md.utils.escapeHtml(str);
}
// 以换行进行分割 , 按行拆分代码
const lines = preCode.split(/\n/).slice(0, -1);
@@ -58,7 +40,7 @@ const md = new MarkdownIt({
.map((line, index) =>
line ?
`<li><span class="line-num" data-line="${index + 1}"></span>${line}</li>` :
''
'<li></li>'
)
.join('');
@@ -127,9 +109,49 @@ export function clearJobMoreMap() { // 切换对话清空
export function parseMarkdown(content) {
if (!content) {
return //处理特殊情况,比如网络异常导致的响应的 content 的值为空
return [] //处理特殊情况,比如网络异常导致的响应的 content 的值为空
}
// 过滤掉<think>标签及其内容这些是AI内部思考过程不应该显示给用户
// 1. 处理原始标签(支持多行)
content = content.replace(/<\s*think\s*>[\s\S]*?<\s*\/\s*think\s*>/gi, '')
// 2. 处理HTML编码的标签
content = content.replace(/&lt;\s*think\s*&gt;[\s\S]*?&lt;\s*\/\s*think\s*&gt;/gi, '')
// 3. 处理部分编码的标签
content = content.replace(/&lt;\s*think\s*>/gi, '')
content = content.replace(/<\s*\/\s*think\s*&gt;/gi, '')
codeDataList = []
const unsafeHtml = md.render(content || '')
return unsafeHtml
// 在markdown渲染后再次过滤确保没有遗漏
let filteredHtml = unsafeHtml
// 1. 处理原始标签(支持多行)
filteredHtml = filteredHtml.replace(/<\s*think\s*>[\s\S]*?<\s*\/\s*think\s*>/gi, '')
// 2. 处理HTML编码的标签
filteredHtml = filteredHtml.replace(/&lt;\s*think\s*&gt;[\s\S]*?&lt;\s*\/\s*think\s*&gt;/gi, '')
// 3. 处理部分编码的标签
filteredHtml = filteredHtml.replace(/&lt;\s*think\s*>/gi, '')
filteredHtml = filteredHtml.replace(/<\s*\/\s*think\s*&gt;/gi, '')
// 4. 单独处理剩余的think标签对
filteredHtml = filteredHtml.replace(/&lt;think&gt;/gi, '')
filteredHtml = filteredHtml.replace(/&lt;\/think&gt;/gi, '')
filteredHtml = filteredHtml.replace(/<think>/gi, '')
filteredHtml = filteredHtml.replace(/<\/think>/gi, '')
// 根据平台返回不同的内容格式
// 微信小程序返回rich-text组件支持的nodes格式
// H5直接返回HTML字符串避免HTML解析错误
if (process.env.UNI_PLATFORM === 'mp-weixin') {
try {
return parseHtml(filteredHtml)
} catch (error) {
console.error('HTML解析失败:', error)
// 解析失败时返回空数组,避免页面崩溃
return []
}
} else {
// H5端直接返回HTML字符串
return filteredHtml
}
}

View File

@@ -27,6 +27,7 @@ function StreamRequestMiniProgram(url, data = {}, onDataReceived, onError, onCom
return new Promise((resolve, reject) => {
let buffer = '';
let hasReceivedContent = false;
const requestTask = uni.request({
url: config.StreamBaseURl + url,
@@ -55,15 +56,33 @@ function StreamRequestMiniProgram(url, data = {}, onDataReceived, onError, onCom
try {
const decoder = new TextDecoder('utf-8');
const chunk = decoder.decode(new Uint8Array(res.data));
console.log('📦 收到分块数据:', chunk);
buffer += chunk;
let lines = buffer.split("\n");
buffer = lines.pop() || ''; // 保留不完整的行
console.log('📝 解析到行:', lines.length, '行,缓冲区剩余:', buffer.length, '字符');
for (let line of lines) {
if (line.startsWith("data: ")) {
const jsonData = line.slice(6).trim();
console.log('🔍 处理行:', line);
// 处理重复的 data: 前缀
let processedLine = line;
// 移除所有开头的 data: 前缀(无论是否有空格),直到只剩下一个或没有
while (processedLine.startsWith("data:")) {
// 检查是否还有另一个 data: 前缀
const nextPart = processedLine.slice(5).trimStart();
if (nextPart.startsWith("data:")) {
processedLine = nextPart;
} else {
break;
}
}
if (processedLine.startsWith("data: ")) {
const jsonData = processedLine.slice(6).trim();
console.log('📄 提取的JSON数据:', jsonData);
if (jsonData === "[DONE]") {
console.log('✅ 收到结束标记 [DONE]');
onComplete && onComplete();
resolve();
return;
@@ -72,11 +91,35 @@ function StreamRequestMiniProgram(url, data = {}, onDataReceived, onError, onCom
if (jsonData && jsonData.trim()) {
try {
const parsedData = JSON.parse(jsonData);
console.log('🔧 解析后的JSON:', parsedData);
// 检查是否有错误信息
const finishReason = parsedData?.choices?.[0]?.finish_reason;
if (finishReason === "error") {
let errorContent = parsedData?.choices?.[0]?.delta?.content || "流式请求失败";
console.error('❌ 收到错误信息:', errorContent);
// 优化token超限错误提示
if (errorContent.includes("maximum input ids length")) {
errorContent = "对话历史过长,请尝试清除部分历史记录或简化问题";
}
// 只有当未收到正常内容时才显示错误信息
if (!hasReceivedContent) {
// 显示错误信息给用户
uni.showToast({
title: errorContent,
icon: 'none',
duration: 3000
});
}
}
// 处理标准的choices格式
if (parsedData?.choices?.[0]?.delta?.content) {
else if (parsedData?.choices?.[0]?.delta?.content) {
const content = parsedData.choices[0].delta.content;
if (content) {
hasReceivedContent = true;
console.log('📤 调用onDataReceived(content):', content);
onDataReceived && onDataReceived(content);
}
}
@@ -84,6 +127,8 @@ function StreamRequestMiniProgram(url, data = {}, onDataReceived, onError, onCom
else if (parsedData?.choices?.[0]?.delta?.reasoning_content) {
const content = parsedData.choices[0].delta.reasoning_content;
if (content) {
hasReceivedContent = true;
console.log('📤 调用onDataReceived(reasoning_content):', content);
onDataReceived && onDataReceived(content);
}
}
@@ -91,14 +136,42 @@ function StreamRequestMiniProgram(url, data = {}, onDataReceived, onError, onCom
else if (parsedData?.tool?.response) {
const content = parsedData.tool.response;
if (content) {
hasReceivedContent = true;
console.log('📤 调用onDataReceived(tool.response):', content);
onDataReceived && onDataReceived(content);
}
}
// 处理其他可能的内容格式
else if (parsedData?.content) {
// 直接返回content字段的情况
const content = parsedData.content;
if (content) {
hasReceivedContent = true;
console.log('📤 调用onDataReceived(direct content):', content);
onDataReceived && onDataReceived(content);
}
}
// 处理完整的text字段非流式
else if (parsedData?.choices?.[0]?.text) {
const content = parsedData.choices[0].text;
if (content) {
hasReceivedContent = true;
console.log('📤 调用onDataReceived(full text):', content);
onDataReceived && onDataReceived(content);
}
}
else {
console.warn('⚠️ 未匹配到任何内容格式:', parsedData);
}
} catch (e) {
console.error("JSON 解析失败:", e.message);
console.error("JSON 解析失败:", e.message, "原始数据:", jsonData);
}
}
}
else if (processedLine.trim()) {
// 处理非data:开头的行
console.warn('⚠️ 收到非data:开头的行:', processedLine);
}
}
} catch (error) {
console.error('处理分块数据失败:', error);
@@ -135,6 +208,7 @@ function StreamRequestH5(url, data = {}, onDataReceived, onError, onComplete) {
let buffer = "";
let retryCount = 0;
const maxRetries = 3;
let hasReceivedContent = false;
while (true) {
const {
@@ -157,9 +231,25 @@ function StreamRequestH5(url, data = {}, onDataReceived, onError, onComplete) {
console.log(`📦 Processing ${lines.length} lines, buffer length: ${buffer.length}`);
for (let line of lines) {
if (line.startsWith("data: ")) {
const jsonData = line.slice(6).trim();
console.log('🔍 处理行:', line);
// 处理重复的 data: 前缀
let processedLine = line;
// 移除所有开头的 data: 前缀(无论是否有空格),直到只剩下一个或没有
while (processedLine.startsWith("data:")) {
// 检查是否还有另一个 data: 前缀
const nextPart = processedLine.slice(5).trimStart();
if (nextPart.startsWith("data:")) {
processedLine = nextPart;
} else {
break;
}
}
if (processedLine.startsWith("data: ")) {
const jsonData = processedLine.slice(6).trim();
console.log('📄 提取的JSON数据:', jsonData);
if (jsonData === "[DONE]") {
console.log('✅ 收到结束标记 [DONE]');
onComplete && onComplete();
resolve();
return;
@@ -169,11 +259,35 @@ function StreamRequestH5(url, data = {}, onDataReceived, onError, onComplete) {
// 检查JSON数据是否完整
if (jsonData && jsonData.trim() && jsonData !== "[DONE]") {
const parsedData = JSON.parse(jsonData);
console.log('🔧 解析后的JSON:', parsedData);
// 检查是否有错误信息
const finishReason = parsedData?.choices?.[0]?.finish_reason;
if (finishReason === "error") {
let errorContent = parsedData?.choices?.[0]?.delta?.content || "流式请求失败";
console.error('❌ 收到错误信息:', errorContent);
// 优化token超限错误提示
if (errorContent.includes("maximum input ids length")) {
errorContent = "对话历史过长,请尝试清除部分历史记录或简化问题";
}
// 只有当未收到正常内容时才显示错误信息
if (!hasReceivedContent) {
// 显示错误信息给用户
uni.showToast({
title: errorContent,
icon: 'none',
duration: 3000
});
}
}
// 处理标准的choices格式
if (parsedData?.choices?.[0]?.delta?.content) {
else if (parsedData?.choices?.[0]?.delta?.content) {
const content = parsedData.choices[0].delta.content;
if (content) {
hasReceivedContent = true;
console.log('📤 调用onDataReceived(content):', content);
onDataReceived && onDataReceived(content);
}
}
@@ -181,6 +295,8 @@ function StreamRequestH5(url, data = {}, onDataReceived, onError, onComplete) {
else if (parsedData?.choices?.[0]?.delta?.reasoning_content) {
const content = parsedData.choices[0].delta.reasoning_content;
if (content) {
hasReceivedContent = true;
console.log('📤 调用onDataReceived(reasoning_content):', content);
onDataReceived && onDataReceived(content);
}
}
@@ -188,6 +304,27 @@ function StreamRequestH5(url, data = {}, onDataReceived, onError, onComplete) {
else if (parsedData?.tool?.response) {
const content = parsedData.tool.response;
if (content) {
hasReceivedContent = true;
console.log('📤 调用onDataReceived(tool.response):', content);
onDataReceived && onDataReceived(content);
}
}
// 处理其他可能的内容格式
else if (parsedData?.content) {
// 直接返回content字段的情况
const content = parsedData.content;
if (content) {
hasReceivedContent = true;
console.log('📤 调用onDataReceived(direct content):', content);
onDataReceived && onDataReceived(content);
}
}
// 处理完整的text字段非流式
else if (parsedData?.choices?.[0]?.text) {
const content = parsedData.choices[0].text;
if (content) {
hasReceivedContent = true;
console.log('📤 调用onDataReceived(full text):', content);
onDataReceived && onDataReceived(content);
}
}
@@ -201,6 +338,10 @@ function StreamRequestH5(url, data = {}, onDataReceived, onError, onComplete) {
// 不抛出错误,继续处理下一个数据块
}
}
else if (processedLine.trim()) {
// 处理非data:开头的行
console.warn('⚠️ 收到非data:开头的行:', processedLine);
}
}
}
@@ -209,16 +350,55 @@ function StreamRequestH5(url, data = {}, onDataReceived, onError, onComplete) {
console.log("📦 Processing remaining buffer:", buffer.substring(0, 100) + "...");
const lines = buffer.split("\n");
for (let line of lines) {
if (line.startsWith("data: ")) {
const jsonData = line.slice(6).trim();
console.log('🔍 处理剩余缓冲区行:', line);
// 处理重复的 data: 前缀
let processedLine = line;
// 移除所有开头的 data: 前缀(无论是否有空格),直到只剩下一个或没有
while (processedLine.startsWith("data:")) {
// 检查是否还有另一个 data: 前缀
const nextPart = processedLine.slice(5).trimStart();
if (nextPart.startsWith("data:")) {
processedLine = nextPart;
} else {
break;
}
}
if (processedLine.startsWith("data: ")) {
const jsonData = processedLine.slice(6).trim();
console.log('📄 提取的剩余JSON数据:', jsonData);
if (jsonData && jsonData !== "[DONE]") {
try {
const parsedData = JSON.parse(jsonData);
console.log('🔧 解析后的剩余JSON:', parsedData);
// 检查是否有错误信息
const finishReason = parsedData?.choices?.[0]?.finish_reason;
if (finishReason === "error") {
let errorContent = parsedData?.choices?.[0]?.delta?.content || "流式请求失败";
console.error('❌ 收到错误信息:', errorContent);
// 优化token超限错误提示
if (errorContent.includes("maximum input ids length")) {
errorContent = "对话历史过长,请尝试清除部分历史记录或简化问题";
}
// 只有当未收到正常内容时才显示错误信息
if (!hasReceivedContent) {
// 显示错误信息给用户
uni.showToast({
title: errorContent,
icon: 'none',
duration: 3000
});
}
}
// 处理标准的choices格式
if (parsedData?.choices?.[0]?.delta?.content) {
else if (parsedData?.choices?.[0]?.delta?.content) {
const content = parsedData.choices[0].delta.content;
if (content) {
hasReceivedContent = true;
console.log('📤 调用onDataReceived(content):', content);
onDataReceived && onDataReceived(content);
}
}
@@ -226,6 +406,8 @@ function StreamRequestH5(url, data = {}, onDataReceived, onError, onComplete) {
else if (parsedData?.choices?.[0]?.delta?.reasoning_content) {
const content = parsedData.choices[0].delta.reasoning_content;
if (content) {
hasReceivedContent = true;
console.log('📤 调用onDataReceived(reasoning_content):', content);
onDataReceived && onDataReceived(content);
}
}
@@ -233,6 +415,27 @@ function StreamRequestH5(url, data = {}, onDataReceived, onError, onComplete) {
else if (parsedData?.tool?.response) {
const content = parsedData.tool.response;
if (content) {
hasReceivedContent = true;
console.log('📤 调用onDataReceived(tool.response):', content);
onDataReceived && onDataReceived(content);
}
}
// 处理其他可能的内容格式
else if (parsedData?.content) {
// 直接返回content字段的情况
const content = parsedData.content;
if (content) {
hasReceivedContent = true;
console.log('📤 调用onDataReceived(direct content):', content);
onDataReceived && onDataReceived(content);
}
}
// 处理完整的text字段非流式
else if (parsedData?.choices?.[0]?.text) {
const content = parsedData.choices[0].text;
if (content) {
hasReceivedContent = true;
console.log('📤 调用onDataReceived(full text):', content);
onDataReceived && onDataReceived(content);
}
}
@@ -241,6 +444,10 @@ function StreamRequestH5(url, data = {}, onDataReceived, onError, onComplete) {
}
}
}
else if (processedLine.trim()) {
// 处理非data:开头的行
console.warn('⚠️ 收到非data:开头的剩余行:', processedLine);
}
}
}
@@ -295,16 +502,27 @@ export function chatRequest(url, data = {}, method = 'GET', loading = false, hea
return
}
uni.showToast({
title: msg,
title: msg || '请求失败',
icon: 'none'
})
// 拒绝Promise并提供详细错误信息
const err = new Error(msg || '请求失败,服务器返回错误码: ' + code)
err.error = resData
reject(err)
} else {
// 处理非200状态码
const errorMsg = `请求失败HTTP状态码: ${resData.statusCode}`
uni.showToast({
title: errorMsg,
icon: 'none'
})
const err = new Error(errorMsg)
err.error = resData
reject(err)
}
if (resData.data?.code === 401 || resData.data?.code === 402) {
useUserStore().logOut()
}
const err = new Error('请求出现异常,请联系工作人员')
err.error = resData
reject(err)
},
fail: (err) => {
reject(err)