merge: 合并main分支到CareerMap

This commit is contained in:
2025-11-12 21:31:30 +08:00
301 changed files with 49793 additions and 2801646 deletions

View File

@@ -1,7 +1,7 @@
/*
* @Date: 2025-10-31 11:06:15
* @LastEditors: lip
* @LastEditTime: 2025-11-03 12:48:30
* @LastEditors: shirlwang
* @LastEditTime: 2025-11-05 15:33:17
*/
// 人员接口
// import { post, get } from '@/utilsRc/request'
@@ -27,7 +27,7 @@ export function getPersonList(params) {
export function addInvestigate(data) {
return request({
// url: '//process/processInterview',
url: '//timelime/timelime',
url: '/timelime/timelime',
method: 'post',
data: data
})

View File

@@ -2,7 +2,7 @@
* @Descripttion:
* @Author: lip
* @Date: 2025-11-03 12:35:56
* @LastEditors: lip
* @LastEditors: shirlwang
*/
// import { post, get } from '../../utils/request.js'
import request from '@/utilsRc/request'
@@ -28,14 +28,14 @@ export function personAlertList(params) {
export function getJbrInfo() {
return request({
method: 'get',
url: `system/center/user/selectHxjbr`,
url: `/system/center/user/selectHxjbr`,
method: 'get'
})
}
export function getPersonBase() {
return request({
method: 'get',
url: `system/center/user/selectHxjbr`,
url: `/system/center/user/selectHxjbr`,
method: 'get'
})
}

View File

@@ -0,0 +1,515 @@
// 获取人员基本信息详情
// import { post, get } from '../../utils/request.js'
// export function getPersonInfo(id) {
// return get({
// url: `personnel/personBaseInfo/${id}`,
// method: 'get'
// })
// }
import request from '@/utilsRc/request'
// 根据 userId 获取企业详情
export function companyDetails(userId) {
return request({
method: 'get',
url: `/company/unitBaseInfo/user/${userId}`,
})
}
// 企业-推荐人员信息
export function recommendedPerson(params) {
return request({
url: '/company/unitBaseInfo/recommend/person',
method: 'get',
params
})
}
// 人员邀请
export function invitePerson(params) {
return request({
url: '/company/unitBaseInfo/invite',
method: 'get',
params
})
}
// 获取企业招聘岗位列表
export function jobList(params) {
return request({
url: '/company/unitPostInfo/list',
method: 'get',
params
})
}
// 查找已投递、已推荐、已邀请的人员信息
export function listMatch(query) {
return request({
url: '/company/unitBaseInfo/relevance',
method: 'get',
params: query
})
}
// 添加企业基本信息
export function addJobBase(data) {
return request({
url: '/company/unitBaseInfo',
method: 'post',
data: data
})
}
// 查询部门下拉树结构
export function deptTreeSelect() {
return request({
url: '/system/center/user/deptTree',
method: 'get'
})
}
// 企业发布招聘岗位
export function addJob(data) {
return request({
url: '/company/unitPostInfo',
method: 'post',
data: data
})
}
// 获取招聘工种列表
export function jobTypeList(params) {
return request({
url: '/basicdata/workType/list',
method: 'get',
params
})
}
// 企业基本信息列表
export function jobBaseList(query) {
return request({
url: '/company/unitBaseInfo/list',
method: 'get',
params: query
})
}
// 获取企业招聘岗位信息详细信息
export function getJob(id) {
return request({
url: `/company/unitPostInfo/${id}`,
method: 'get'
})
}
// 修改企业招聘岗位信息
export function updateJob(data) {
return request({
url: '/company/unitPostInfo',
method: 'put',
data: data
})
}
// 修改企业基本信息
export function updateJobBase(data) {
return request({
url: '/company/unitBaseInfo',
method: 'put',
data: data
})
}
// 查询角色详细
export function getJobService(id) {
return request({
url: '/personnel/personBaseInfo/' + id,
method: 'get'
})
}
// 查询推荐人员、已推荐、已邀请 详情
export function getUnitBaseInfo(id) {
return request({
url: '/manage/personDemand/' + id,
method: 'get'
})
}
// 查询工种列表
export function listJobType(query) {
return request({
url: '/basicdata/workType/list',
method: 'get',
params: query
})
}
// 人员基本信息 - 列表
export function personInfoList(query) {
return request({
url: '/personnel/personBaseInfo/list',
method: 'get',
params: query
})
}
// 获取人员基本信息详情
export function getPersonInfo(id) {
return request({
url: `/personnel/personBaseInfo/${id}`,
method: 'get'
})
}
// 删除人员基本信息
export function delPersonInfo(ids) {
return request({
url: '/personnel/personBaseInfo/' + ids,
method: 'delete'
})
}
// 删除录入人员 公用 type = 1 失业中 2 就业困难 3 离校生 4 其他人员
export function delPersonUser(ids) {
return request({
url: `/personnel/personInputInfo/${ids}`,
method: 'delete',
})
}
// 新增人员基本信息
export function addPersonInfo(data) {
return request({
url: '/personnel/personBaseInfo',
method: 'post',
data: data
})
}
// 修改人员基本信息
export function updatePersonInfo(data) {
return request({
url: '/personnel/personBaseInfo',
method: 'put',
data
})
}
//社区人员审核
export function personInfoAudit(data) {
return request({
url: '/personnel/personBaseInfo/audit',
method: 'post',
data: data
})
}
//记录查看身份证
export function recordLookIdCard(params) {
return request({
url: '/personnel/personBaseInfo/recordLookIdCard',
method: 'get',
params
})
}
/* 失业人员 --------------------------------------------- start */
// 新增失业人员
export function addPersonUnemployed(data) {
return request({
url: '/person/unemployment',
method: 'post',
data
})
}
// 失业人员修改
export function updatePersonUnemployed(data) {
return request({
url: '/person/unemployment',
method: 'put',
data,
})
}
// 失业人员列表
export function unemployment(params) {
return request({
url: '/person/unemployment/list',
method: 'get',
params
})
}
// 失业人员详情
export function unemploymentDetails(id) {
return request({
url: `/person/unemployment/${id}`,
method: 'get',
})
}
// 失业人员删除
export function unemploymentDelete(id) {
return request({
url: `/person/unemployment/${id}`,
method: 'delete',
})
}
/* 失业人员 --------------------------------------------- end */
/* 就业困难人员 --------------------------------------------- start */
// 新增就业困难
export function addPersonDifficult(data) {
return request({
url: '/person/findingEmployment',
method: 'post',
data
})
}
// 修改就业困难
export function updatePersonDifficult(data) {
return request({
url: '/person/findingEmployment',
method: 'put',
data
})
}
// 就业困难列表
export function findingEmployment(params) {
return request({
url: '/person/findingEmployment/list',
method: 'get',
params
})
}
// 就业困难详情
export function findingEmploymentDetails(id) {
return request({
url: `/person/findingEmployment/${id}`,
method: 'get',
})
}
// 就业困难删除
export function findingEmploymentDelete(id) {
return request({
url: `/person/findingEmployment/${id}`,
method: 'delete',
})
}
/* 就业困难人员 --------------------------------------------- end */
/* 离校未就业高校生 --------------------------------------------- start */
// 新增离校未就业高校生
export function addLeaveSchool(data) {
return request({
url: '/person/leavingSchoolInfo',
method: 'post',
data
})
}
// 修改离校未就业高校生
export function updateLeaveSchool(data) {
return request({
url: '/person/leavingSchoolInfo',
method: 'put',
data,
})
}
// 高校未就业列表
export function leavingSchoolInfo(params) {
return request({
url: '/person/leavingSchoolInfo/list',
method: 'get',
params
})
}
// 高校未就业详情
export function leavingSchoolInfoDetails(id) {
return request({
url: `/person/leavingSchoolInfo/${id}`,
method: 'get',
})
}
// 高校未就业删除
export function leavingSchoolInfoDelete(id) {
return request({
url: `/person/leavingSchoolInfo/${id}`,
method: 'delete',
})
}
/* 离校未就业高校生 --------------------------------------------- end */
/* 其他人员 --------------------------------------------- start */
// 新增其他人员
export function addOther(data) {
return request({
url: '/person/other',
method: 'post',
data
})
}
// 其他人员修改
export function updateOther(data) {
return request({
url: '/person/other',
method: 'post',
data,
})
}
// 其他人员列表
export function other(params) {
return request({
url: '/person/other/list',
method: 'get',
params
})
}
// 其他人员详情
export function otherDetails(id) {
return request({
url: `/person/other/${id}`,
method: 'get',
})
}
// 其他人员删除
export function otherDelete(id) {
return request({
url: `/person/other/${id}`,
method: 'delete',
})
}
/* 其他人员 --------------------------------------------- end */
// 需求预警列表
export function personAlertList(params) {
return request({
url: '/manage/personDemand/warningList',
method: 'get',
params
})
}
export function personDealList(params) {
return request({
url: '/manage/personDemand/dealingList',
method: 'get',
params
})
}
// 服务追踪 服务类型/服务id
export function serviceTraceability({
demandType,
id
}) {
return request({
// url: `/system/personRequirementsRecords/serviceTraceability/${demandType}/${id}`,
url: `/timelime/timelime/fwzs/${id}`,
method: 'get',
})
}
// 需求办结
export function requirementCompletion(url, data) {
return request({
url,
method: 'post',
data
})
}
//岗位审核
export function jobAudit(data) {
return request({
url: '/company/unitPostInfo/audit',
method: 'post',
data: data
})
}
//社群 首页未完成数
// export function getPeopleCount() {
// return request({
// url: '/pc/index/getPeopleCount',
// method: 'get',
// })
// }
//社群 首页未完成数
export function getDemandUnfinished() {
return request({
url: '/pc/index/todo',
method: 'get',
})
}
// 删除企业招聘岗位信息
export function delJob(ids) {
return request({
url: '/company/unitPostInfo/' + ids,
method: 'delete'
})
}
// 所在社区列表
export function deptList(params) {
return request({
'url': `/system/center/user/deptList`,
'method': 'get',
params
})
}
// 所在社区列表
export function returnPerson(params) {
return request({
'url': `/personnel/personBaseInfo/returnPerson`,
'method': 'get',
params
})
}
// 根据人的身份证查询人的详细信息
export function getIdNumberInfo(params) {
return request({
'url': `/personnel/personBaseInfo/getIdNumberInfo`,
'method': 'get',
params
})
}

View File

@@ -0,0 +1,16 @@
/*
* @Date: 2025-10-31 11:06:15
* @LastEditors: lip
* @LastEditTime: 2025-11-03 12:48:22
*/
// import { post, get } from '@/utilsRc/request'
import request from '@/utilsRc/request'
export function listJobType(query) {
return request({
url: '/basicdata/workType/list',
method: 'get',
params: query
})
}

54
packageRc/apiRc/login.js Normal file
View File

@@ -0,0 +1,54 @@
/*
* @Date: 2025-10-31 11:06:15
* @LastEditors: shirlwang
* @LastEditTime: 2025-11-03 15:51:28
*/
import request from '@/utilsRc/request'
// 登录方法
export function login(data) {
return request({
method: 'get',
url: '/not/login/person/zkrLogin',
params: data,
})
}
export function smsLogin(data) {
return request({
method: 'post',
url: '/personnel/personBaseInfo/loginGrAndQy',
data,
headers: {
isToken: false
}
})
}
export function wechatLogin(data) {
return request({
method: 'post',
url: '/personnel/personBaseInfo/loginGrAndQy',
data,
headers: {
isToken: false
}
})
}
export function register(data) {
return request({
method: 'post',
url: '/personnel/personBaseInfo/loginGrAndQy',
data,
headers: {
isToken: false
}
})
}
// 获取用户详细信息
export function getInfo() {
return request({
url: '/getInfo',
method: 'get'
})
}

View File

@@ -0,0 +1,59 @@
/*
* @Date: 2024-09-25 11:14:29
* @LastEditors: shirlwang
* @LastEditTime: 2025-11-04 08:56:51
*/
import request from '@/utilsRc/request'
// 查询援助需求列表
export function listAssistService(query) {
return request({
url: '/demand/personAssistDemandInfo/list',
method: 'get',
params: query
})
}
// 查询援助需求详细
export function getAssistService(ids) {
return request({
url: '/demand/personAssistDemandInfo/' + ids,
method: 'get'
})
}
// 新增援助需求
export function addAssistService(data) {
return request({
url: '/demand/personAssistDemandInfo',
method: 'post',
data: data
})
}
// 修改援助需求
export function updateAssistService(data) {
return request({
url: '/demand/personAssistDemandInfo',
method: 'put',
data: data
})
}
// 删除援助需求
export function delAssistService(ids) {
return request({
url: '/manage/personDemand/' + ids,
method: 'delete'
})
}
// 个人援助需求办结
export function finishAssistService(data) {
return request({
url: '/demand/personAssistDemandInfo/assistDone',
method: 'post',
data: data
})
}

View File

@@ -0,0 +1,59 @@
/*
* @Date: 2024-09-25 11:14:29
* @LastEditors: shirlwang
* @LastEditTime: 2025-11-04 08:56:35
*/
import request from '@/utilsRc/request'
// 查询创业需求列表
export function listEntrepreneurshipService(query) {
return request({
url: '/demand/personEntrepreneurshipDemandInfo/list',
method: 'get',
params: query
})
}
// 查询创业需求详细
export function getEntrepreneurshipService(ids) {
return request({
url: '/demand/personEntrepreneurshipDemandInfo/' + ids,
method: 'get'
})
}
// 新增创业需求
export function addEntrepreneurshipService(data) {
return request({
url: '/demand/personEntrepreneurshipDemandInfo',
method: 'post',
data: data
})
}
// 修改创业需求
export function updateEntrepreneurshipService(data) {
return request({
url: '/demand/personEntrepreneurshipDemandInfo',
method: 'put',
data: data
})
}
// 删除创业需求
export function delEntrepreneurshipService(ids) {
return request({
url: '/manage/personDemand/' + ids,
method: 'delete'
})
}
// 个人援助需求办结
export function finishEntrepreneurshipService(data) {
return request({
url: '/demand/personEntrepreneurshipDemandInfo/entrepreneurshipDone',
method: 'post',
data: data
})
}

View File

@@ -0,0 +1,58 @@
/*
* @Date: 2025-04-07 14:23:47
* @LastEditors: shirlwang
* @LastEditTime: 2025-11-04 08:56:39
*/
import request from '@/utilsRc/request'
// 查询求职需求列表
export function listJobService(query) {
return request({
url: '/manage/personDemand/list',
method: 'get',
params: query
})
}
// 查询求职需求详细
export function getJobService(ids) {
return request({
url: '/manage/personDemand/' + ids,
method: 'get'
})
}
// 新增求职需求
export function addJobService(data) {
return request({
url: '/manage/personDemand',
method: 'post',
data: data
})
}
// 修改求职需求
export function updateJobService(data) {
return request({
url: '/manage/personDemand',
method: 'put',
data: data
})
}
// 删除求职需求
export function delJobService(ids) {
return request({
url: '/manage/personDemand/' + ids,
method: 'delete'
})
}
//查询服务次数
export function serviceTraceability(userId) {
return request({
url: '/timelime/timelime/getFwcs/' + userId,
method: 'get'
})
}

View File

@@ -0,0 +1,59 @@
/*
* @Date: 2024-09-25 11:14:29
* @LastEditors: shirlwang
* @LastEditTime: 2025-11-04 08:56:42
*/
import request from '@/utilsRc/request'
// 查询其他需求列表
export function listOtherService(query) {
return request({
url: '/demand/personOtherDemandInfo/list',
method: 'get',
params: query
})
}
// 查询其他需求详细
export function getOtherService(ids) {
return request({
url: '/demand/personOtherDemandInfo/' + ids,
method: 'get'
})
}
// 新增其他需求
export function addOtherService(data) {
return request({
url: '/demand/personOtherDemandInfo',
method: 'post',
data: data
})
}
// 修改其他需求
export function updateOtherService(data) {
return request({
url: '/demand/personOtherDemandInfo',
method: 'put',
data: data
})
}
// 删除其他需求
export function delOtherService(ids) {
return request({
url: '/manage/personDemand/' + ids,
method: 'delete'
})
}
// 个人援助需求办结
export function finishOtherService(data) {
return request({
url: '/demand/personOtherDemandInfo/otherDemandDone',
method: 'post',
data: data
})
}

View File

@@ -0,0 +1,35 @@
/*
* @Date: 2025-10-31 11:06:15
* @LastEditors: shirlwang
* @LastEditTime: 2025-11-05 15:33:21
*/
// 人员接口
// import { post, get } from '@/utilsRc/request'
import request from '@/utilsRc/request'
export function getPersonBase(params) {
return request({
url: '/personnel/personBaseInfo/list',
method: 'get',
params
})
}
export function getPersonList(params) {
return request({
url: '/personnel/personBaseInfo/list',
method: 'get',
params
})
}
// 新增角色
export function addInvestigate(data) {
return request({
// url: '//process/processInterview',
url: '/timelime/timelime',
method: 'post',
data: data
})
}

View File

@@ -0,0 +1,53 @@
/*
* @Date: 2025-11-03 08:48:44
* @LastEditors: lip
* @LastEditTime: 2025-11-03 12:48:41
*/
// 查询个人需求信息列表
// import { post, get } from '@/utilsRc/request'
import request from '@/utilsRc/request'
export function listPersonDemand(query) {
return request({
method: 'get',
url: '/manage/personDemand/list',
params: query
})
}
export function delPersonDemand(id) {
return request({
url: '/manage/personDemand/' + id,
method: 'delete'
})
}
// 查询个人需求信息详细
export function getPersonDemand(id) {
return request({
method: 'get',
url: '/manage/personDemand/' + id,
})
}
// 新增个人需求信息
export function addPersonDemand(data) {
// 确保传递数据前进行日志输出
console.log('addPersonDemand函数接收到的数据:', data);
return request({
url: '/manage/personDemand',
method: 'post', // 修改为大写POST确保请求参数正确传递
data: data
})
}
// 修改个人需求信息
export function updatePersonDemand(data) {
return request({
url: '/manage/personDemand',
method: 'put',
data: data
})
}

View File

@@ -0,0 +1,50 @@
/*
* @Date: 2024-09-25 11:14:29
* @LastEditors: shirlwang
* @LastEditTime: 2025-11-04 08:56:47
*/
import request from '@/utilsRc/request'
// 查询培训需求列表
export function listTrainService(query) {
return request({
url: '/demand/personTrainDemandInfo/list',
method: 'get',
params: query
})
}
// 查询培训需求详细
export function getTrainService(ids) {
return request({
url: '/demand/personTrainDemandInfo/' + ids,
method: 'get'
})
}
// 新增培训需求
export function addTrainService(data) {
return request({
url: '/demand/personTrainDemandInfo',
method: 'post',
data: data
})
}
// 修改培训需求
export function updateTrainService(data) {
return request({
url: '/demand/personTrainDemandInfo',
method: 'put',
data: data
})
}
// 删除培训需求
export function delTrainService(ids) {
return request({
url: '/manage/personDemand/' + ids,
method: 'delete'
})
}

85
packageRc/apiRc/person.js Normal file
View File

@@ -0,0 +1,85 @@
/*
* @Date: 2025-10-31 13:50:15
* @LastEditors: shirlwang
* @LastEditTime: 2025-10-31 14:30:31
*/
import request from '@/utilsRc/request'
// 人员信息保存
export function savePersonBase(data) {
return request({
'url': '/personnel/personBaseInfo',
'method': 'put',
'data': data
})
}
// 人员信息查询
export function getPersonBase(userId) {
return request({
'url': `/personnel/personBaseInfo/user/${userId}`,
'method': 'get',
})
}
// 获取行政区划列表
export function getQUList() {
return request({
url: `/manage/xzqh//xzqhTree`,
method: 'get'
})
}
// 查询部门下拉树结构
export function deptTreeSelect() {
return request({
url: '/system/center/user/deptTree',
method: 'get'
})
}
// 社群端 根据所在社区 获取姓名
export function generateUserName(deptId) {
return request({
url: `/generateUserName/${deptId}`,
method: 'get'
})
}
// 获取部门列表
export function getDeptList(name,personId) {
return request({
url: `/system/center/user/getDeptList?name=${name}&parentId=${personId}`,
method: 'get'
})
}
// 求职工种列表
export function touristWork() {
return request({
url: `/basicdata/workType/workTypeTree`,
method: 'get'
})
}
// 获取招聘工种列表
export function jobTypeList(params) {
return request({
url: '/basicdata/workType/list',
method: 'get',
params
})
}
// 未读消息数量
export function unreadNum() {
return request({
url: '/manage/tjgw/notReadNum',
method: 'get',
})
}
// 地图类型列表
export function jyshdt(cyfhjd) {
return request({
url: `/jyshdt/jyshdt/queryList?lx=${cyfhjd}`,
method: 'get',
})
}

View File

@@ -0,0 +1,57 @@
/*
* @Descripttion:
* @Author: lip
* @Date: 2025-11-03 12:35:56
* @LastEditors: shirlwang
*/
// import { post, get } from '../../utils/request.js'
import request from '@/utilsRc/request'
// 登录方法
export function personInfoList(data) {
return request({
method: 'get',
url: '/personnel/personBaseInfo/list',
params: data,
})
}
// 需求预警列表
export function personAlertList(params) {
return request({
method: 'get',
url: '/manage/personDemand/warningList',
params
})
}
//经办人数据获取
export function getJbrInfo() {
return request({
method: 'get',
url: `/system/center/user/selectHxjbr`,
method: 'get'
})
}
export function getPersonBase() {
return request({
method: 'get',
url: `/system/center/user/selectHxjbr`,
method: 'get'
})
}
export function returnPerson(params) {
return request({
method: 'get',
'url': `/personnel/personBaseInfo/returnPerson`,
params
})
}
export function getStatistic(params) {
return request({
method: 'get',
'url': `/pc/index/fwqkfx`,
params
})
}

View File

@@ -0,0 +1,18 @@
import request from "@/utilsRc/request";
//政策列表
export function getPolicyList(queryParams) {
return request({
url: "/portal/policyInfo/portalList",
method: "get",
params: queryParams,
});
}
//政策详情
export function getPolicyDetail(queryParams) {
return request({
url: "/portal/policyInfo/getInfo",
method: "get",
params: queryParams,
});
}

View File

@@ -0,0 +1,51 @@
/*
* @Date: 2024-09-25 11:14:29
* @LastEditors: shirlwang
* @LastEditTime: 2025-11-04 08:56:56
*/
import request from '@/utilsRc/request'
// 查询角色列表
export function listInvestigate(query) {
return request({
url: '/process/processInterview/list',
method: 'get',
params: query
})
}
// 查询角色详细
export function getInvestigate(ids) {
return request({
url: '/process/processInterview/' + ids,
method: 'get'
})
}
// 新增角色
export function addInvestigate(data) {
return request({
// url: '/process/processInterview',
url: '/timelime/timelime',
method: 'post',
data: data
})
}
// 修改角色
export function updateInvestigate(data) {
return request({
url: '/process/processInterview',
method: 'put',
data: data
})
}
// 删除角色
export function delInvestigate(ids) {
return request({
url: '/process/processInterview/' + ids,
method: 'delete'
})
}

View File

@@ -0,0 +1,87 @@
/*
* @Date: 2024-09-25 11:14:29
* @LastEditors: shirlwang
* @LastEditTime: 2025-11-04 08:56:59
*/
import request from '@/utilsRc/request'
// 查询角色列表
export function listJobRecommend(query) {
return request({
url: '/process/processJobRecommend/list',
method: 'get',
params: query
})
}
// 查询角色列表
export function getWorkListReq(query) {
return request({
// url: '/personnel/personBaseInfo/postRecommend',
url: '/company/unitPostInfo/postElectedList',
method: 'get',
params: query
})
}
// 查询角色详细
export function getJobRecommend(ids) {
return request({
url: '/process/processJobRecommend/' + ids,
method: 'get'
})
}
// 新增角色
export function addJobRecommend(data) {
return request({
url: '/process/processJobRecommend',
method: 'post',
data: data
})
}
//岗位推荐保存和办结
export function saveJobRecommend(data) {
return request({
url: '/process/processJobRecommend/create',
method: 'post',
data: data
})
}
// 修改角色
export function updateJobRecommend(data) {
return request({
url: '/process/processJobRecommend',
method: 'put',
data: data
})
}
// 删除角色
export function delJobRecommend(ids) {
return request({
url: '/process/processJobRecommend/' + ids,
method: 'delete'
})
}
// 获取绑定的职位
export function getAddedJobs(params) {
return request({
// url: '/company/postDeliverInfo/list',
url: '/company/unitPostInfo/no/permission/list',
method: 'get',
params,
})
}
// // 获取推荐岗位
// export function getAddedJobs(params) {
// return request({
// url: '/personnel/personBaseInfo/postRecommend',
// method: 'get',
// params,
// })
// }

View File

@@ -0,0 +1,50 @@
/*
* @Date: 2024-09-25 11:14:29
* @LastEditors: shirlwang
* @LastEditTime: 2025-11-04 08:57:02
*/
import request from '@/utilsRc/request'
// 查询角色列表
export function listJobTrack(query) {
return request({
url: '/process/processEmploymentTracking/list',
method: 'get',
params: query
})
}
// 查询角色详细
export function getJobTrack(ids) {
return request({
url: '/process/processEmploymentTracking/' + ids,
method: 'get'
})
}
// 新增角色
export function addJobTrack(data) {
return request({
url: '/process/processEmploymentTracking',
method: 'post',
data: data
})
}
// 修改角色
export function updateJobTrack(data) {
return request({
url: '/process/processEmploymentTracking',
method: 'put',
data: data
})
}
// 删除角色
export function delJobTrack(ids) {
return request({
url: '/process/processEmploymentTracking/' + ids,
method: 'delete'
})
}

View File

@@ -0,0 +1,50 @@
/*
* @Date: 2024-09-25 11:14:29
* @LastEditors: shirlwang
* @LastEditTime: 2025-11-04 08:57:05
*/
import request from '@/utilsRc/request'
// 查询角色列表
export function listPolicyConsultation(query) {
return request({
url: '/process/processPolicyConsult/list',
method: 'get',
params: query
})
}
// 查询角色详细
export function getPolicyConsultation(ids) {
return request({
url: '/process/processPolicyConsult/' + ids,
method: 'get'
})
}
// 新增角色
export function addPolicyConsultation(data) {
return request({
url: '/process/processPolicyConsult',
method: 'post',
data: data
})
}
// 修改角色
export function updatePolicyConsultation(data) {
return request({
url: '/process/processPolicyConsult',
method: 'put',
data: data
})
}
// 删除角色
export function delPolicyConsultation(ids) {
return request({
url: '/process/processPolicyConsult/' + ids,
method: 'delete'
})
}

View File

@@ -0,0 +1,50 @@
/*
* @Date: 2024-09-25 11:14:29
* @LastEditors: shirlwang
* @LastEditTime: 2025-11-04 08:57:09
*/
import request from '@/utilsRc/request'
// 查询角色列表
export function listSkillTrain(query) {
return request({
url: '/process/processSkillTraining/list',
method: 'get',
params: query
})
}
// 查询角色详细
export function getSkillTrain(ids) {
return request({
url: '/process/processSkillTraining/' + ids,
method: 'get'
})
}
// 新增角色
export function addSkillTrain(data) {
return request({
url: '/process/processSkillTraining',
method: 'post',
data: data
})
}
// 修改角色
export function updateSkillTrain(data) {
return request({
url: '/process/processSkillTraining',
method: 'put',
data: data
})
}
// 删除角色
export function delSkillTrain(ids) {
return request({
url: '/process/processSkillTraining/' + ids,
method: 'delete'
})
}

View File

@@ -0,0 +1,64 @@
/*
* @Date: 2025-10-31 15:06:34
* @LastEditors: shirlwang
* @LastEditTime: 2025-11-03 12:20:28
*/
import request from '@/utilsRc/request'
// 查询字典数据列表
export function listData (query) {
return request({
url: '/system/dict/data/list',
method: 'get',
params: query
})
}
// 查询字典数据详细
export function getData (dictCode) {
return request({
url: '/system/dict/data/' + dictCode,
method: 'get'
})
}
// 根据字典类型查询字典数据信息
export function getDicts (dictType) {
return request({
url: '/system/dict/data/type/' + dictType,
method: 'get'
})
}
// 根据字典类型查询字典数据信息
export function getDict (dictType) {
return request({
url: '/system/dict/data/type/' + dictType,
method: 'get'
})
}
// 新增字典数据
export function addData (data) {
return request({
url: '/system/dict/data/add',
method: 'post',
data: data
})
}
// 修改字典数据
export function updateData (data) {
return request({
url: '/system/dict/data',
method: 'post',
data: data
})
}
// 删除字典数据
export function delData (dictCode) {
return request({
url: '/system/dict/data/remove' + dictCode,
method: 'get'
})
}

View File

@@ -0,0 +1,27 @@
import request from '@/utilsRc/request'
// 查询时间轴列表
export function timelineList(params) {
return request({
url: '/timelime/timelime/timeline',
method: 'get',
params
})
}
// 查询时间轴详情列表
export function timeList(params) {
return request({
url: '/timelime/timelime/list',
method: 'get',
params
})
}
//获取时间轴详细信息
export function timeDetails(id) {
return request({
url: '/timelime/timelime/' + id,
method: 'get'
})
}

View File

@@ -0,0 +1,284 @@
<template>
<view class="upload-container">
<view @click="chooseAndUploadFile" class="upload-button">+ 上传文件</view>
<view v-for="(item, index) in internalFileList" :key="index" class="files-list">
<view class="file-name">{{ item.file.name }}</view>
<view class="delete-btn" @click="deleteFile(index)">删除</view>
</view>
</view>
</template>
<script>
// import {
// uploadImg
// } from '@/api/company'
// import config from '@/config'
import config from '@/utilsRc/config.js'
import { getToken } from "@/utilsRc/auth";
//import {
// getToken
//} from '@/utils/auth'
export default {
props: {
maxSize: {
type: Number,
default: 5, // 最大文件大小MB
},
allowedFormats: {
type: Array,
default: () => ['.png', '.jpg', '.jpeg', '.doc', '.docx', '.pdf', '.xls', '.xlsx'], // 允许的文件格式
},
maxImageSize: {
type: Object,
default: () => ({
width: 2048,
height: 2048
}), // 图片最大宽度和高度
},
width: {
type: String,
default: '100rpx', // 默认宽度
},
height: {
type: String,
default: '100rpx', // 默认高度
},
name: {
type: String,
default: 'file', // 默认name字段
},
multiple: {
type: Boolean,
default: false, // 是否允许多选,默认不允许
},
maxCount: {
type: Number,
default: 1, // 默认最大上传数量为1
},
fileList: {
type: Array,
default: () => [], // 默认的文件列表为空
},
disabled: {
type: Boolean,
default: false
}
},
data() {
return {
internalFileList: [...this.fileList], // 内部的文件列表,确保与父组件的同步
};
},
watch: {
// 监听 fileList 的变化,确保内外部数据同步
fileList(newVal) {
this.internalFileList = [...newVal];
},
},
methods: {
deleteFile(index){
this.internalFileList.splice(index, 1);
},
chooseAndUploadFile() {
wx.chooseMessageFile({
count: this.maxCount,
extension: this.allowedFormats,
// ['.png', '.jpg', '.jpeg', '.doc', '.docx', '.pdf', '.xls', '.xlsx' ],
success: (res) => {
console.log('选择文件成功:', res);
if(this.maxCount - this.internalFileList.length < res.tempFiles.length){
uni.showToast({
title: '最多只能上传' + this.maxCount + '个文件',
icon: 'none'
});
return;
}
let path = "";
const twoMBInBytes = 2 * 1024 * 1024; // 2MB转换为字节数
res.tempFiles.forEach((file) => {
if (file.size > twoMBInBytes) {
uni.showToast({
title: "图片大小不能超过2MB",
icon: "none",
});
return;
}
if (res.tempFiles && res.tempFiles.length > 0) {
path = file.path;
if (this.allowedFormats.indexOf('.'+path.split(".")[1])!=-1) {
uni.showLoading();
const tempFilePath = file;
uni.uploadFile({
url: config.baseUrl+'/system/oss/upload', //图片上传地址
filePath: tempFilePath.path,
name: 'file',
formData: {},
header: {
'Authorization': 'Bearer ' + getToken(),
},
success: (res) => {
var data = JSON.parse(res.data);
console.log(data, 'sdfjiosdjfoi')
if(data.code==200) {
this.internalFileList.push({
url: data.data.url,
file: file
})
this.$emit('update', this.internalFileList);
// this.serviceForm.fileUrl = this.internalFileList.map(item => item.url).join(',')
this.$forceUpdate()
uni.hideLoading();
} else {
uni.hideLoading();
uni.showToast({
title: res.msg || '上传失败',
icon: 'none',
duration: 2000
});
}
},
fail: (error) => {
uni.showToast({
title: '上传失败',
icon: 'none'
});
console.error(error);
}
})
} else {
uni.showToast({
icon: "none",
duration: 1500,
title: `只能选择${this.allowedFormats.join('、')}格式文件`,
});
}
}
})
// // 添加新选择的图片到列表
// res.tempFiles.forEach((item, index) => {
// this.fileList.push({
// url: item.path,
// file: res.tempFiles[index]
// });
// });
// 更新 serviceForm.fileUrl
// this.updateFileUrls();
},
fail: (err) => {
console.error('选择图片失败:', err);
}
});
},
// 新增图片
async handleAfterRead(event) {
let lists = [].concat(event.file);
let fileListLen = this.internalFileList.length;
lists.map((item) => {
this.internalFileList.push({
...item,
status: "uploading",
message: "上传中",
});
});
for (let i = 0; i < lists.length; i++) {
if (this.allowedFormats.length > 0) {
let fileType = lists[i].name.split('.').pop().toLowerCase();
if (!this.allowedFormats.includes(fileType)) {
// this.$emit('error', '不支持的文件格式');
uni.showToast({
title: '不支持的文件格式',
icon: 'none',
});
this.internalFileList.splice(fileListLen, 1);
this.$emit('update', this.internalFileList); // 通知父组件文件列表更新
return;
}
}
const result = await this.uploadFilePromise(lists[i].url);
let item = this.internalFileList[fileListLen];
this.internalFileList.splice(
fileListLen,
1,
Object.assign(item, {
status: "success",
message: "",
data: result,
})
);
fileListLen++;
this.$emit('update', this.internalFileList); // 通知父组件文件列表更新
}
},
uploadFilePromise(url) {
return new Promise((resolve, reject) => {
uni.uploadFile({
url: config.baseUrl + '/system/oss/upload',
filePath: url,
name: "file",
header: {
Authorization: "Bearer " + getToken(),
},
success: (uploadFileRes) => {
let res = JSON.parse(uploadFileRes.data);
resolve(res.data);
},
fail: (err) => {
console.log(err);
},
});
});
},
handleRemove({file, index}) {
this.internalFileList.splice(index, 1); // 从文件列表中移除指定文件
this.$emit('update', this.internalFileList); // 通知父组件文件列表更新
},
},
};
</script>
<style scoped lang="scss">
.upload-container {
}
.files-list {
display: flex;
justify-content: space-between;
margin-top: 10rpx;
line-height: 50rpx;
.file-name{
width: calc(100% - 80rpx);
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
.delete-btn{
width: 80rpx;
text-align: right;
color: red;
}
}
.upload-slot {
display: flex;
align-items: center;
justify-content: center;
border: 1px dashed #ccc;
border-radius: 4px;
padding: 20px;
}
.upload-button {
border: 1px dashed #ccc;
border-radius: 4px;
padding: 0 24rpx;
width: 280rpx;
text-align: center;
background: #fff;
line-height: 64rpx;
}
</style>

File diff suppressed because it is too large Load Diff

View File

@@ -1,177 +1,147 @@
<template>
<view class="page">
<u-navbar
title="帮扶登记"
:autoBack="true"
bgColor="transparent"
leftIconColor="#fff"
:titleStyle="{ color: '#fff' }"
></u-navbar>
<view class="page" style="background-image: url('../../../packageRc/static/pageBg.png');">
<view class="input-outer-part">
<scroll-view scroll-y="true" style="height: calc(100vh - 100px)">
<view class="inner">
<div class="self-form">
<view class="inner-part">
<div class="form-item required">
<label class="form-label">被帮扶对象</label>
<input
v-model="serviceForm.serviceObjectName"
style="border: none; width: 100%; padding: 10px 0;"
placeholder="请输入"
disabled
/>
</div>
<div class="form-item required">
<label class="form-label">帮扶方式</label>
<div class="form-select-wrapper" style="position: relative;">
<!-- 显示区域 -->
<div
class="form-value"
:class="{ 'noValue': !serviceForm.demandType }"
@click="showDemandTypePicker = !showDemandTypePicker"
style="width: 100%; height: 40px; padding: 0 10px; border: 1px solid #e6e6e6; border-radius: 8rpx; background-color: #fff; display: flex; align-items: center; justify-content: space-between; cursor: pointer;"
<view class="inner-part">
<view class="form-item required">
<label class="form-label">被帮扶对象</label>
<input
v-model="serviceForm.serviceObjectName"
style="border: none; width: 100%;"
placeholder="请输入"
disabled
/>
</view>
<view class="form-item required">
<label class="form-label">帮扶方式</label>
<view class="form-select-wrapper" style="position: relative;">
<!-- 显示区域 -->
<view
class="form-value"
style="width: 100%;"
@click="showDemandTypePicker = !showDemandTypePicker"
:class="!serviceForm.demandType ? 'noValue' : ''"
>
{{ getDemandTypeLabel(serviceForm.demandType) || "请选择" }}
</view>
<!-- 选项列表 -->
<view
v-if="showDemandTypePicker"
class="options-list"
style="position: absolute; top: 45px; left: 0; right: 0; background-color: #fff; border: 1px solid #e6e6e6; border-radius: 8rpx; z-index: 1000; max-height: 200px; overflow-y: auto;"
>
<view
v-for="option in demandTypeOptions"
:key="option.value"
@click="selectDemandType(option.value)"
style="padding: 10px; border-bottom: 1px solid #f0f0f0; cursor: pointer;"
>
{{ getDemandTypeLabel(serviceForm.demandType) || "请选择" }}
<span class="arrow-down"></span>
</div>
<!-- 选项列表 -->
<div
v-if="showDemandTypePicker"
class="options-list"
style="position: absolute; top: 45px; left: 0; right: 0; background-color: #fff; border: 1px solid #e6e6e6; border-radius: 8rpx; z-index: 1000; max-height: 200px; overflow-y: auto;"
>
<div
v-for="option in demandTypeOptions"
:key="option.value"
@click="selectDemandType(option.value)"
style="padding: 10px; border-bottom: 1px solid #f0f0f0; cursor: pointer;"
>
{{ option.label }}
</div>
</div>
</div>
</div>
<div class="form-item required" v-if="serviceForm.demandType == '4' || serviceForm.demandType == '5'">
<label class="form-label">帮扶时间 <text class="required">*</text></label>
<picker mode="date" :value="serviceForm.practicalSolutionTime" start="1900-01-01" end="2100-12-31" @change="onDateChange">
<view class="date-picker-wrapper" :class="{ noValue: !serviceForm.practicalSolutionTime }">
<view v-if="serviceForm.practicalSolutionTime" class="date-value">{{ serviceForm.practicalSolutionTime }}</view>
<view v-else>请选择</view>
<view class="icon-right"></view>
{{ option.label }}
</view>
</view>
</view>
</view>
<view class="form-item required" v-if="serviceForm.demandType">
<label class="form-label">帮扶时间 <text class="required">*</text></label>
<picker style="width: 100%;" mode="date" :value="serviceForm.practicalSolutionTime" start="1900-01-01" end="2100-12-31" @change="onDateChange">
<view class="date-picker-wrapper" :class="{ noValue: !serviceForm.practicalSolutionTime }">
<view v-if="serviceForm.practicalSolutionTime" class="date-value">{{ serviceForm.practicalSolutionTime }}</view>
<view v-else>请选择</view>
<view class="arrow-down"></view>
</view>
</picker>
</view>
<view class="form-item required" v-if="serviceForm.demandType">
<label class="form-label">经办人</label>
<view class="form-select-wrapper">
<uni-data-select
style="width: 100%"
v-model="serviceForm.agentUserId"
placeholder="请选择经办人"
:localdata="jingbrList1"
@change="handleAgentChange"
>
</uni-data-select>
</view>
</view>
<view class="form-item required" v-if="serviceForm.demandType == '5'">
<label class="form-label">电话沟通结果</label>
<view class="form-value" @click="showPicker('dhgtjg')" :class="{ noValue: !serviceForm.dhgtjg }">
<view style="flex-grow: 1;">{{ getDhgtjgLabel(serviceForm.dhgtjg) || "请选择" }}</view>
<text class="arrow-down"></text>
</view>
</view>
<view class="form-item required" v-if="serviceForm.demandType">
<label class="form-label">帮扶内容</label>
<view class="date-picker-wrapper" :class="{ noValue: !serviceForm.serviceContent }">
<picker
@change="onServiceContentChange"
:range="serviceContentOptions.map(item => item.label)"
:value="getServiceContentIndex(serviceForm.serviceContent)"
mode="selector"
>
<view class="date-value">
<view style="flex-grow: 1;">{{ getServiceContentLabel(serviceForm.serviceContent) || "请选择" }}</view>
<text class="arrow-down"></text>
</view>
</picker>
</div>
<div class="form-item required" v-if="serviceForm.demandType == '4' || serviceForm.demandType == '5'">
<label class="form-label">经办人</label>
<div class="form-select-wrapper">
<el-select
style="width: 100%"
v-model="serviceForm.agentUserId"
placeholder="请选择经办人"
@change="handleAgentChange"
>
<el-option
v-for="item in jingbrList1"
:key="item.userId"
:label="item.nickName"
:value="item.userId"
></el-option>
</el-select>
</div>
</div>
<div class="form-item required" v-if="serviceForm.demandType == '5'">
<label class="form-label">电话沟通结果</label>
<div class="form-value" @click="showPicker('dhgtjg')" :class="{ noValue: !serviceForm.dhgtjg }">
{{ getDhgtjgLabel(serviceForm.dhgtjg) || "请选择" }}
<span class="arrow-down"></span>
</div>
</div>
<div class="form-item required" v-if="serviceForm.demandType == '4' || serviceForm.demandType == '5'">
<label class="form-label">帮扶内容</label>
<div class="date-picker-wrapper" :class="{ noValue: !serviceForm.serviceContent }">
<picker
@change="onServiceContentChange"
:range="serviceContentOptions.map(item => item.label)"
:value="getServiceContentIndex(serviceForm.serviceContent)"
mode="selector"
>
<view class="date-value">
{{ getServiceContentLabel(serviceForm.serviceContent) || "请选择" }}
<span class="arrow-down"></span>
</view>
</picker>
</div>
</div>
</view>
</view>
<view class="inner-part">
<div class="form-item required" v-if="serviceForm.demandType == '4' || serviceForm.demandType == '5'">
<label class="form-label">帮扶情况说明</label>
<textarea
v-model="serviceForm.blqksm"
style="width: 100%; border: none; padding: 10px 0; min-height: 100px; resize: none;"
placeholder="请输入"
></textarea>
</div>
</view>
<view class="inner-part">
<div class="form-item required" v-if="serviceForm.demandType == '4' || serviceForm.demandType == '5'">
<label class="form-label">帮扶情况说明</label>
<div class="file-upload-container">
<button class="upload-btn" @click="chooseImages" :disabled="fileList.length >= 6">
+ 添加图片 ({{ fileList.length }}/6)
</button>
<div class="file-list" v-if="fileList.length > 0">
<div v-for="(file, index) in fileList" :key="index" class="file-item">
<image :src="file.url" mode="aspectFill" class="uploaded-image"></image>
<span class="delete-btn" @click="removeImage(index)">删除</span>
</div>
</div>
</div>
</div>
</view>
<view class="inner-part" v-if="serviceForm.demandType == '4' || serviceForm.demandType == '5'">
<div class="form-item">
<label class="form-label">附件</label>
<div style="width: 100%; padding: 10px 0;">
<button @click="triggerFileUpload" style="padding: 8px 16px; background: #f0f0f0; border: none; border-radius: 4px;">
上传附件 (最多6个)
</button>
<!-- 简单的文件列表显示 -->
<div v-if="serviceForm.fileUrl.length > 0" class="file-list">
<div v-for="(file, index) in serviceForm.fileUrl" :key="index" class="file-item">
{{ file.name }}
<span @click="removeFile(index)" style="margin-left: 10px; cursor: pointer; color: #ff4444;">删除</span>
</div>
</div>
</div>
</div>
<!-- v-if="serviceForm.demandType" -->
<view class="form-item required" v-if="serviceForm.demandType">
<label class="form-label">人员状态</label>
<view class="date-picker-wrapper" :class="{ noValue: !serviceForm.personStatus }">
<picker
@change="onpersonStatusChange"
:range="personStatusOptions.map(item => item.label)"
:value="getpersonStatusIndex(serviceForm.personStatus)"
mode="selector"
>
<view class="date-value">
<view style="flex-grow: 1;">{{ getpersonStatusLabel(serviceForm.personStatus) || "请选择" }}</view>
<text class="arrow-down"></text>
</view>
</picker>
</view>
</view>
</div>
</view>
<view class="inner-part" v-if="serviceForm.demandType">
<view class="form-item required" v-if="serviceForm.demandType">
<label class="form-label">帮扶情况说明</label>
<textarea
v-model="serviceForm.blqksm"
style="width: 100%; border: none; padding: 10px 0; min-height: 100px; resize: none;"
placeholder="请输入"
></textarea>
</view>
</view>
<view class="inner-part" v-if="serviceForm.demandType">
<view class="form-item">
<label class="form-label">附件</label>
<view style="width: 100%; padding: 10px 0;">
<button @click="chooseFiles" style="padding: 0px 24rpx; border: 1px solid #e4e4e4;border-radius: 4px;">
上传附件 (最多6个)
</button>
<!-- 简单的文件列表显示 -->
<view class="file-list">
<view v-for="(file, index) in fileList" :key="index" class="file-item">
{{ file.file.name }}
<text @click="removeFile(index)" style="margin-left: 10px; cursor: pointer; color: #ff4444;">删除</text>
</view>
</view>
</view>
</view>
</view>
</view>
</scroll-view>
@@ -182,40 +152,43 @@
</view>
<!-- 通用选择器 -->
<div v-if="currentPicker" class="datetime-picker-overlay">
<div class="datetime-picker">
<div class="picker-header">
<span @click="cancelPicker" style="padding: 10px;">取消</span>
<span style="font-weight: bold;">{{ getPickerTitle(currentPicker) }}</span>
<span @click="confirmPicker" style="padding: 10px; color: #007AFF;">确定</span>
</div>
<div class="picker-content">
<div v-if="currentPicker === 'practicalSolutionTime'">
<view v-if="currentPicker" class="datetime-picker-overlay">
<view class="datetime-picker">
<view class="picker-header">
<text @click="cancelPicker" style="padding: 10px;">取消</text>
<text style="font-weight: bold;">{{ getPickerTitle(currentPicker) }}</text>
<text @click="confirmPicker" style="padding: 10px; color: #007AFF;">确定</text>
</view>
<view class="picker-content">
<view v-if="currentPicker === 'practicalSolutionTime'">
<input
type="datetime-local"
v-model="manualDateTime"
style="width: 100%; padding: 15px; box-sizing: border-box;"
/>
</div>
<div v-else class="picker-options">
<div
</view>
<view v-else class="picker-options">
<view
v-for="option in getPickerOptions(currentPicker)"
:key="option.value"
@click="selectPickerOption(option.value)"
:class="{ 'selected': selectedOption === option.value }"
>
{{ option.label }}
</div>
</div>
</div>
</div>
</div>
</view>
</view>
</view>
</view>
</view>
</view>
</template>
<script>
import {getJbrInfo} from "../../api/personinfo/index"
import { getDicts } from '@/apiRc/system/dict.js';
import {getJbrInfo} from "@/packageRc/apiRc/personinfo/index"
import {addInvestigate} from "@/packageRc/apiRc/needs/person"
import { getDicts } from '@/packageRc/apiRc/system/dict.js';
import config from '@/utilsRc/config.js'
import { getToken } from "@/utilsRc/auth";
export default {
data() {
return {
@@ -233,6 +206,14 @@ export default {
fileUrl: [] // 附件
},
personStatusMap: {
'1': '就业政策咨询',
'2': '职业指导',
'3': '技能培训',
'4': '岗位推荐',
'5': '创业指导',
'6': '其他'
},
serviceContentMap: {
'1': '就业政策咨询',
'2': '职业指导',
@@ -291,6 +272,15 @@ export default {
}));
}
});
getDicts('qyjy_dhgtjg').then(res => {
if (res.data && Array.isArray(res.data)) {
// 将字典数据转换为picker组件需要的格式
this.dhgtjgOptions = res.data.map(item => ({
value: item.dictValue,
label: item.dictLabel
}));
}
});
// 使用getDicts API获取人员状态字典数据
getDicts('qcjy_ryzt').then(res => {
@@ -312,27 +302,93 @@ export default {
},
methods: {
// 选择图片
chooseImages() {
chooseFiles() {
const remainingCount = 6 - this.fileList.length;
if (remainingCount <= 0) {
uni.showToast({ title: '最多只能上传6张图片', icon: 'none' });
return;
}
uni.chooseImage({
console.log(wx, 'wx')
wx.chooseMessageFile({
count: remainingCount,
sizeType: ['original', 'compressed'],
sourceType: ['album', 'camera'],
success: (res) => {
// 添加新选择的图片到列表
res.tempFilePaths.forEach((path, index) => {
this.fileList.push({
url: path,
file: res.tempFiles[index]
});
});
extension: ['.png', '.jpg', '.jpeg', '.doc', '.docx', '.pdf', '.xls', '.xlsx' ],
success: (res) => {
console.log('选择文件成功:', res);
let arr = [];
let path = "";
const twoMBInBytes = 2 * 1024 * 1024; // 2MB转换为字节数
res.tempFiles.forEach((file) => {
if (file.size > twoMBInBytes) {
uni.showToast({
title: "图片大小不能超过2MB",
icon: "none",
});
return;
}
if (res.tempFiles && res.tempFiles.length > 0) {
path = file.path;
if (['png', 'jpg', 'jpeg', 'doc', 'docx', 'pdf', 'xls', 'xlsx' ].indexOf(path.split(".")[1])!=-1) {
uni.showLoading();
const tempFilePath = file;
uni.uploadFile({
url: config.baseUrl+'/system/oss/upload', //图片上传地址
filePath: tempFilePath.path,
name: 'file',
formData: {},
header: {
'Authorization': 'Bearer ' + getToken(),
},
success: (res) => {
var data = JSON.parse(res.data);
console.log(data, 'sdfjiosdjfoi')
if(data.code==200) {
this.fileList.push({
url: data.data.url,
file: file
})
this.serviceForm.fileUrl = this.fileList.map(item => item.url).join(',')
this.$forceUpdate()
uni.hideLoading();
} else {
uni.hideLoading();
uni.showToast({
title: res.msg || '上传失败',
icon: 'none',
duration: 2000
});
}
},
fail: (error) => {
uni.showToast({
title: '上传失败',
icon: 'none'
});
console.error(error);
}
})
} else {
uni.showToast({
icon: "none",
duration: 1500,
title: `只能选择${['.png', '.jpg', '.jpeg', '.doc', '.docx', '.pdf', '.xls', '.xlsx' ].join('、')}格式文件`,
});
}
}
})
// // 添加新选择的图片到列表
// res.tempFiles.forEach((item, index) => {
// this.fileList.push({
// url: item.path,
// file: res.tempFiles[index]
// });
// });
// 更新 serviceForm.fileUrl
this.updateFileUrls();
// this.updateFileUrls();
},
fail: (err) => {
console.error('选择图片失败:', err);
@@ -351,9 +407,16 @@ export default {
updateFileUrls() {
this.serviceForm.fileUrl = this.fileList.map(file => file.url);
},
async getJbrInfo11(){
const res=await getJbrInfo()
this.jingbrList1=res
getJbrInfo11(){
getJbrInfo().then(res => {
console.log(res, 'joisdfjiosdfjio')
this.jingbrList1=res.map(ele => {
return {
value: ele.userId,
text: ele.nickName
}
})
})
},
// 显示选择器
showPicker(type) {
@@ -374,7 +437,7 @@ export default {
this.serviceForm[this.currentPicker] = this.selectedOption;
// 特殊处理经办人,同时保存名称
if (this.currentPicker === 'agentUserId') {
const agent = this.jingbrList1.find(item => item.userId === this.selectedOption);
const agent = this.jingbrList1.find(item => item.value === this.selectedOption);
this.serviceForm.agentUserName = agent ? agent.nickName : '';
}
}
@@ -413,7 +476,7 @@ export default {
},
// 获取经办人名称
getAgentUserName(userId) {
const agent = this.jingbrList1.find(item => item.userId === userId);
const agent = this.jingbrList1.find(item => item.value === userId);
return agent ? agent.nickName : '';
},
// 处理经办人选择变化
@@ -422,7 +485,7 @@ export default {
this.serviceForm.agentUserName = '';
return;
}
const user = this.jingbrList1.find(item => item.userId === value);
const user = this.jingbrList1.find(item => item.value === value);
if (user) {
this.serviceForm.agentUserName = user.nickName;
} else {
@@ -449,6 +512,11 @@ export default {
getServiceContentLabel(value) {
return this.serviceContentMap[value] || '';
},
// 获取帮扶内容标签
getpersonStatusLabel(value) {
let arr = this.personStatusOptions.filter(item => item.value == value)
return arr.length ? arr[0].label : ''
},
// 处理帮扶内容选择变化
onServiceContentChange(e) {
@@ -457,6 +525,13 @@ export default {
this.serviceForm.serviceContent = this.serviceContentOptions[index].value;
}
},
// 处理人员状态选择变化
onpersonStatusChange(e) {
const index = e.detail.value;
if (this.personStatusOptions && this.personStatusOptions[index]) {
this.serviceForm.personStatus = this.personStatusOptions[index].value;
}
},
// 获取帮扶内容当前索引
getServiceContentIndex(value) {
@@ -464,6 +539,11 @@ export default {
const index = this.serviceContentOptions.findIndex(item => item.value === value);
return index !== -1 ? index : 0;
},
getpersonStatusIndex(value) {
if (!value) return 0;
const index = this.personStatusOptions.findIndex(item => item.value === value);
return index !== -1 ? index : 0;
},
// 格式化日期时间为YYYY-MM-DDTHH:MM格式datetime-local输入框需要
formatDateTime(date) {
const year = date.getFullYear();
@@ -574,17 +654,23 @@ export default {
const submitData = {
...this.serviceForm,
// 格式化文件数据
fileUrl: JSON.stringify(this.serviceForm.fileUrl)
// fileUrl: JSON.stringify(this.serviceForm.fileUrl)
fileUrl: this.fileList.map(item => item.url).join(',')
};
// 打印提交数据
console.log('提交数据:', submitData);
// 模拟API调用延迟
await new Promise(resolve => setTimeout(resolve, 1000));
uni.showToast({ title: '保存成功', icon: 'success' });
uni.navigateBack();
// await new Promise(resolve => setTimeout(resolve, 1000));
addInvestigate(submitData).then(res => {
if(res.code == 200){
uni.showToast({ title: '保存成功', icon: 'success' });
setTimeout(() => {
uni.navigateBack();
}, 1000);
}
})
} catch (error) {
console.error(error);
uni.showToast({ title: '保存失败', icon: 'none' });
@@ -599,25 +685,22 @@ export default {
<style lang="scss" scoped>
.page {
height: 100vh;
background-color: #eef1f5 !important;
background-color: #f4f4f4 !important;
background-image: url("~@/packageRc/static/images/top.png");
background-repeat: no-repeat;
background-size: 100% auto;
}
.input-outer-part {
background: #eef1f5;
padding: 32rpx;
padding-top: 100rpx; /* 增加顶部内边距,防止内容被遮挡 */
position: relative;
top: -80rpx;
border-radius: 32rpx 32rpx 0 0;
}
.inner {
.inner-part {
background: #fff;
padding: 0 32rpx;
padding: 24rpx 32rpx;
border-radius: 16rpx;
margin-bottom: 20rpx;
}
@@ -631,21 +714,21 @@ export default {
.form-item {
display: flex;
align-items: flex-start;
margin-bottom: 20px;
padding-bottom: 15px;
border-bottom: 1px solid #f0f0f0;
box-sizing: border-box;
}
/* 选择器容器样式 */
.form-select-wrapper {
flex: 1;
padding: 5px 0;
position: relative;
}
.form-select {
width: 100%;
padding: 20rpx;
padding: 0 20rpx;
line-height: 64rpx;
box-sizing: border-box;
border: 1px solid #e6e6e6;
border-radius: 8rpx;
font-size: 28rpx;
@@ -664,13 +747,13 @@ export default {
.form-select-wrapper::after {
content: '▼';
position: absolute;
right: 30rpx;
top: 50%;
transform: translateY(-50%);
pointer-events: none;
color: #999;
font-size: 20rpx;
}
right: 20rpx;
top: 50%;
transform: translateY(-50%);
pointer-events: none;
color: #999;
font-size: 20rpx;
}
.form-item.required .form-label::after {
content: '*';
@@ -683,19 +766,33 @@ export default {
flex-shrink: 0;
font-size: 14px;
color: #333;
padding: 10px 0;
height: 64rpx;
display: flex;
align-items: center;
}
.form-value {
flex: 1;
padding: 10px 0;
height: 64rpx;
font-size: 14px;
color: #666;
box-sizing: border-box;
border: 1px solid #e6e6e6;
display: flex;
justify-content: space-between;
padding: 0 24rpx;
// justify-content: space-between;
align-items: center;
}
input{
flex: 1;
line-height: 64rpx;
height: 64rpx;
font-size: 14px;
color: #666;
}
.form-value.noValue {
color: #999;
}
@@ -713,11 +810,19 @@ export default {
.form-input-wrapper {
flex: 1;
position: relative;
padding: 0;
box-sizing: border-box;
}
picker{
width: 100%;
.date-value{
width: 100%;
display: flex;
}
}
.form-input-wrapper input {
width: 100%;
padding: 10px 0;
border: none;
outline: none;
font-size: 14px;
@@ -774,54 +879,6 @@ export default {
width: 100%;
padding: 10px 0;
}
.upload-btn {
padding: 10px 20px;
background-color: #f0f0f0;
border: 1px dashed #ddd;
border-radius: 4px;
color: #666;
margin-bottom: 10px;
width: 100%;
}
.upload-btn:disabled {
opacity: 0.6;
}
.file-list {
display: flex;
flex-wrap: wrap;
gap: 10px;
}
.file-item {
position: relative;
width: 100px;
height: 100px;
}
.uploaded-image {
width: 100%;
height: 100%;
border-radius: 4px;
}
.delete-btn {
position: absolute;
top: -8px;
right: -8px;
background-color: #ff4444;
color: white;
width: 20px;
height: 20px;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
font-size: 12px;
}
/* 选择器样式 */
.datetime-picker-overlay {
position: fixed;
@@ -855,12 +912,12 @@ export default {
background-color: #fafafa;
}
.picker-header > span:first-child {
.picker-header > text:first-child {
color: #666;
font-size: 16px;
}
.picker-header > span:last-child {
.picker-header > text:last-child {
color: #1d64cf;
font-size: 16px;
font-weight: 500;
@@ -875,7 +932,7 @@ export default {
padding: 5px 0;
}
.picker-options > div {
.picker-options > view {
padding: 16px 20px;
font-size: 16px;
color: #333;
@@ -885,22 +942,22 @@ export default {
align-items: center;
}
.picker-options > div:not(:last-child) {
.picker-options > view:not(:last-child) {
border-bottom: 1px solid #f8f8f8;
}
.picker-options > div:active {
.picker-options > view:active {
background-color: #f5f5f5;
}
.picker-options > div.selected {
.picker-options > view.selected {
background-color: #f0f7ff;
color: #1d64cf;
font-weight: 500;
}
/* 添加选中状态的对勾图标 */
.picker-options > div.selected::after {
.picker-options > view.selected::after {
content: '✓';
position: absolute;
right: 20px;
@@ -914,18 +971,22 @@ export default {
display: flex;
justify-content: space-between;
align-items: center;
padding: 10px;
width: 100%;
box-sizing: border-box;
padding: 0 24rpx;
height: 64rpx;
border: 1px solid #ddd;
border-radius: 4px;
background-color: #fff;
}
.date-picker-wrapper.noValue {
background-color: #f9f9f9;
}
// .date-picker-wrapper.noValue {
// background-color: #f9f9f9;
// }
.date-value {
color: #333;
width: 100%
}
.icon-right {

View File

@@ -0,0 +1,523 @@
<template>
<view class="job-list" style="background-image: url('/packageRc/static/pageBg.png');">
<!-- <view class="top_box_bg">
<image src="/packageRc/static/pageBg.png" width="750rpx" height="496rpx" />
</view> -->
<view class="job-list__content" style="height: calc(-32rpx + 100vh)">
<view style="display: flex; justify-content: space-between;">
<input style="border: 1px solid #e4e4e4;height: 64rpx;padding: 0 16rpx;flex-grow: 1;border-radius: 30rpx;"
placeholder="输入经办人姓名进行搜索"
border="surround"
v-model="queryParams.agentUserName"
shape="circle"
:customStyle="customInputStyle"
/>
<!-- <view slot="suffix">
<u-icon
@tap="handleSearch"
name="search"
color="#2979ff"
size="28"
></u-icon>
</view> -->
<button
class="custom-style"
@click="openshow"
>{{ filterTotal > 0 ? '筛选+' + filterTotal : '筛选' }}</button>
</view>
<view
v-if="total"
style="position: relative; padding-top: 16px; color: #000"
>
<text> {{ total }} </text>
</view>
<scroll-view
class="job-list__scroll"
scroll-y="true"
@scrolltolower="loadMoreJobs"
>
<view
class="jobSearchListview"
v-for="(item, index) in tableList"
:key="item.id"
@click="goNeedsDetail(item)"
>
<view class="custom_timeline_marker">
<view class="custom_timeline_line" :class="{ last: index === item.length - 1 }"></view>
<view class="custom_timeline_point active"></view>
</view>
<view class="job-list__item inner">
<view class="job-list__item-detail" style="margin: 0">{{ item.practicalSolutionTime }}</view>
<div style="display: flex;justify-content: space-between;">
<view class="job-list__item-detail" style="color: #333">{{ selectDictLabel(serviceTypeList, item.demandType) }}</view>
<view class="job-list__item-detail">
<text>经办人:</text>
<text>{{ item.agentUserName || "-" }}</text>
</view>
</div>
</view>
</view>
</scroll-view>
</view>
<uni-popup ref="show" @close="close" @open="open" background-color="#fff" type="bottom">
<view class="dialog_div">
<view class="dialog_div_top">
<view @click="close">取消</view>
<view @click="handleSearch">确定</view>
</view>
<view>
<view class="df_flex">
<view class="text">服务类别</view>
<view class="df_flex_items">
<view
class="item"
@click="handleServiceStatus('demandType', item)"
:class="
item.dictValue == queryParams.demandType ? 'item-active' : ''
"
v-for="item in serviceTypeList"
:key="item.dictValue"
>{{ item.dictLabel }}</view
>
</view>
</view>
</view>
<view class="dialog_div_btn">
<u-button class="reset-style" text="重 置" @click="reset"></u-button>
<u-button
class="sure-style"
text="确 定"
@click="handleSearch"
></u-button>
</view>
</view>
</uni-popup>
</view>
</template>
<script>
import { timeList } from "@/packageRc/apiRc/timeLine";
export default {
name: "serviceRecord",
data() {
return {
total: 0,
tableList: [],
serviceTypeList: [
{
dictLabel: "全部",
dictValue: "",
},
],
loading: false,
status: "more", // 加载更多状态
customInputStyle: {
background: "#fff",
height: "40rpx",
},
filterTotal: 0,
show: false,
userId:"",
queryParams: {
page: 1,
size: 10,
demandType: "",
serviceObjectName: "",
userId:""
},
};
},
onLoad(options) {
this.queryParams.userId = options.userId;
this.userId = options.userId;
this.$getDict("qcjy_fwlx").then((res) => {
this.serviceTypeList = this.serviceTypeList.concat(res.data);
});
},
mounted() {
this.getList();
},
methods: {
openshow() {
this.$refs.show.open();
},
selectDictLabel(datas, value) {
if (value === undefined) {
return ''
}
var actions = []
Object.keys(datas).some((key) => {
if (datas[key].dictValue == ('' + value)) {
actions.push(datas[key].dictLabel)
return true
}
})
if (actions.length === 0) {
actions.push(value)
}
return actions.join('')
},
open() {
// console.log('open');
},
reset() {
this.queryParams = {
page: 1,
size: 10,
demandType: "",
serviceObjectName: "",
userId:this.userId
};
this.filterTotal = 0;
},
close() {
this.$refs.show.close();
// console.log('close');
},
goNeedsDetail(item) {
let needsType = "";
// 走访调查和电话沟通,统一页面,不查需求
if (item.demandType == 4||item.demandType == 5) {
uni.navigateTo({
url: `/pages/community/investigationDetails?id=${item.id}`,
});
} else {
if (item.demandType == 1) {
needsType = 1;
}
if (item.demandType == 2) {
needsType = 3;
}
if (item.demandType == 3) {
needsType = 4;
}
if (item.demandType == 9) {
needsType = 5;
}
uni.navigateTo({
url: `/packageRc/pages/needs/needDetail?id=${item.businessId}&type=${needsType}&showTab=1`,
});
}
},
handleServiceStatus(label, item) {
this.filterTotal = 0;
this.queryParams[label] = item.dictValue;
for (const key in this.queryParams) {
if (key == "demandType" || key == "personType" || key == "gender") {
this.filterTotal += this.queryParams[key] ? 1 : 0;
}
}
},
// 加载更多
loadMoreJobs() {
if (this.tableList.length >= this.total || this.status === "noMore")
return;
this.queryParams.pageNum += 1;
this.getList();
},
// 获取列表
async getList(reset = false) {
if (this.loading) return;
this.loading = true;
// 重置数据
if (reset) {
this.tableList = [];
this.queryParams.pageNum = 1;
}
const { code, rows, total } = await timeList(this.queryParams);
if (code === 200) {
this.tableList = [...this.tableList, ...rows];
this.tableList.forEach((element) => {
this.$set(element, "isEye", false);
});
this.total = total;
this.status = this.tableList.length >= this.total ? "noMore" : "more";
}
this.loading = false;
},
// 搜索功能处理
handleSearch() {
console.log(this.queryParams,"查询参数")
this.show = false;
this.$refs.show.close();
this.getList(true);
},
getTimeList() {
timeList(this.queryParams).then((res) => {
if (res.code == 200) {
this.tableList = res.rows;
this.total = res.total;
}
});
},
},
};
</script>
<style lang="scss" scoped>
.job-list__content {
overflow: auto;
box-sizing: border-box;
}
.job-list {
padding:32rpx;
background-color: #f4f4f4;
box-sizing: border-box;
width: 100%;
margin: 0 auto;
background-repeat: no-repeat;
&__navbar {
height: 80rpx;
}
&__content {
box-sizing: border-box;
position: relative;
padding: 32rpx;
z-index: 10;
width: 100%;
background-color: #fff;
border-radius: 32rpx 32rpx 0 0;
border: 1px solid #fff;
}
&__scroll {
margin-top: 10rpx;
height: calc(100vh - 320rpx);
}
&__item {
position: relative;
padding: 32rpx;
background-color: #d0dcee;
border-radius: 16rpx;
font-size: 28rpx;
.tips {
position: absolute;
right: 0;
top: 0;
min-width: 40rpx;
padding: 0 24rpx;
height: 40rpx;
line-height: 40rpx;
color: #1ace62;
border-radius: 0px 16rpx 0px 16rpx;
background-color: #d9f9ed;
border: 1px solid #58e6a2;
}
}
&__item-detail {
margin-top: 20rpx;
color: #8e8e8e;
view,
text:last-child {
margin-left: 10rpx;
color: #333;
}
}
.tab_list {
margin-top: 30rpx;
height: 86rpx;
color: #ce6b1a;
border-top: 1px solid #eff2f6;
}
.items {
margin-top: 30rpx;
border-top: 1px solid #d0dcee;
}
.post_job_btn {
position: fixed;
bottom: 120rpx;
right: 16rpx;
width: 150rpx;
height: 150rpx;
border-radius: 50%;
z-index: 20;
background: url("https://rc.jinan.gov.cn/qcwjyH5/static/images/addPersonnel.png") no-repeat;
background-size: 100% 100%;
}
.dialog_form {
padding: 30rpx;
width: 80vw;
.tadio {
height: 100rpx;
}
.btn {
margin-top: 100rpx;
}
}
}
.jobSearchListview {
margin-top: 20rpx;
width: 100%;
// padding: 30rpx;
box-sizing: border-box;
position: relative;
display: flex;
justify-content: space-between;
.inner{
flex-grow: 1;flex-shrink: 1;
border-radius: 8px;
// background: #ffffff;
}
.custom_timeline_marker {
position: relative;
display: flex;
flex-direction: column;
align-items: center;
margin-right: 40rpx;
// width: 16rpx;
/* 虚线样式 */
.custom_timeline_line {
position: absolute;
width: 4rpx;
top: 0;
bottom: 0;
height: 160rpx;
background: repeating-linear-gradient(to bottom,
#76A0DF 0px,
#76A0DF 8rpx,
transparent 8rpx,
transparent 16rpx);
&.last {
display: none;
}
}
.custom_timeline_point {
z-index: 1;
/* 确保点覆盖在线条之上 */
width: 16rpx;
height: 16rpx;
background-color: #fff;
border-radius: 50%;
border: 10rpx solid #e0e0e0;
&.active {
border: 10rpx solid #007aff;
}
}
}
.jobSearchListview_currentStatus {
position: absolute;
right: 40rpx;
top: 40rpx;
}
.jobSearchListview_name {
font-size: 38rpx;
font-weight: bold;
color: #282828;
}
.salaryExpectation {
margin-top: 20rpx;
display: flex;
align-items: center;
.salary {
font-size: 38rpx;
font-weight: bold;
color: #fa6553;
}
}
}
.job-list__item-btn {
height: 60rpx;
margin-top: 40rpx;
border-top: 1px solid #eee;
display: flex;
justify-content: space-between;
color: #1a62ce;
font-size: 26rpx;
.btn {
width: 50%;
display: flex;
justify-content: center;
align-items: center;
height: 100%;
margin-top: 10rpx;
}
}
.custom-style {
background-color: #4d89e3;
width: 150rpx;
color: #fff;
margin-left: 30rpx;
line-height: 64rpx;
font-size: 24rpx;
border: 1px solid #1a62ce;
border-radius: 50px;
}
.dialog_div {
.dialog_div_top {
height: 100rpx;
border-bottom: 1px solid #e6e6e6;
padding: 30rpx;
box-sizing: border-box;
display: flex;
justify-content: space-between;
color: #077dfe;
}
.df_flex_items {
display: flex;
flex-wrap: wrap;
flex: 1;
}
.df_flex {
display: flex;
margin-top: 30rpx;
margin-left: 30rpx;
.text {
width: 140rpx;
display: flex;
justify-content: flex-end;
}
.item-active {
background: linear-gradient(90deg, #1a62ce 0%, #1d8ace 100%) !important;
color: #fff;
}
.item {
background: #f2f4f7;
margin: 0 20rpx;
margin-bottom: 10rpx;
padding: 10rpx 20rpx;
border-radius: 8px;
}
}
.dialog_div_btn {
display: flex;
margin: 40rpx;
.reset-style {
width: 200rpx;
background: #ffffff;
margin-right: 40rpx;
color: #3d3d3d;
}
.sure-style {
background: linear-gradient(270deg, #4370e5 0%, #53a0ea 100%);
color: #ffffff;
}
}
}
.describe {
//最多显示两行
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
}
</style>

View File

@@ -1,7 +1,7 @@
<!--
* @Date: 2025-10-16 15:15:47
* @LastEditors: shirlwang
* @LastEditTime: 2025-10-31 14:56:32
* @LastEditTime: 2025-11-06 16:09:23
-->
<template>
<view>
@@ -11,17 +11,17 @@
<view class="kinggang">
<view>
<view class="num-title" style="color: #1A62CE">重点毕业生数</view>
<view>1120</view>
<view>{{infoData.allPersonCount}}</view>
</view>
<text style="color: #B5C1D1;"></text>
<view>
<view class="num-title" style="color: #16ACB7">累计需求数</view>
<view>1120</view>
<view>{{infoData.demandNum}}</view>
</view>
<text style="color: #B5C1D1;"></text>
<view>
<view class="num-title" style="color: #6A57D1">累计服务数</view>
<view>1120</view>
<view>{{infoData.fwNum}}</view>
</view>
</view>
<view class="trace-line">
@@ -35,7 +35,7 @@
<uni-icons color="#639AEB" type="arrow-right" size="16"></uni-icons>
</view>
</view>
<view class="sendManager">
<!-- <view class="sendManager">
<view class="title">
<image src="../../../packageRc/static/sendManager.png"/>
任务下发管理员
@@ -44,22 +44,23 @@
<view>点击查看</view>
<uni-icons color="#DBAA4E" type="arrow-right" size="16"></uni-icons>
</view>
</view>
</view> -->
</view>
<view class="titles">
<view class="title-item active"><view>待办需求预警列表</view></view>
<view> {{jobList1count}}条信息</view>
</view>
<view v-for="(item, index) in jobList1" :key="index" class="job-list">
<view class="title">销售顾问</view>
<view v-for="(item, index) in jobList1" :key="index" class="job-list" @click="toNeedDetail(item)">
<view class="title">{{ item.personName }} {{ item.deptName }}</view>
<view class="info">
待办内容文字示例待办内容文字示例待办内容文字示例待办内容文字示例
{{getDictLabel(item.demandType, qcjy_xqlx)}}_{{ item.jobDescription }}
</view>
<view class="bottom-line">
<view>发起时间2025-09-24 15:02</view>
<view style="color: #EF7325;">青岛xx公司</view>
<view>发起时间{{item.createTime}}</view>
<view style="color: #EF7325;">{{getDictLabel(item.currentStatus, qcjy_xqlc)}}</view>
</view>
</view>
<view class="view-more-btn" @click="viewMore">查看更多内容</view>
<view class="titles">
<view class="title-item active"><view>待服务毕业生列表</view></view>
<view> {{jobListcount}} 条信息</view>
@@ -70,24 +71,29 @@
<image v-else src="../../../packageRc/static/personIconFe.png"/>
<view class="top-right">
<view class="name-line">
<view class="name">姓名<view class="tag">{{item.name}}</view></view>
<view class="service-status">·未服务</view>
<view class="name">{{item.name}}<view class="tag">{{item.zy}}</view></view>
<view class="service-status" v-if="item.fwzt == 0">未服务</view>
<view class="service-status" v-if="item.fwzt == 1">已服务</view>
<view class="service-status" v-if="item.fwzt == 2">联系不上</view>
<view class="service-status" v-if="item.fwzt == 3">拒绝服务</view>
<view class="service-status" v-if="item.isReturn == 1">被退回</view>
</view>
<view class="info-line" style="display: flex;">
<view style="margin-right: 24rpx;"><text>年龄</text>27</view>
<view><text>服务次数</text>1</view>
<view style="margin-right: 24rpx;"><text>年龄</text>{{item.age}}</view>
<view><text>服务次数</text>{{item.operateNum}}</view>
</view>
</view>
</view>
<view class="info-line">
<view><text>联系电话</text>152****5488</view>
<view><text>联系电话</text>{{item.phone || '--'}}</view>
<view><text>详细地址</text>{{item.xxdz}}</view>
</view>
<view class="services">
<view @click="showReturnReasonPopup(item.id)">退回</view>
<view @click="tiao(item.id,item.name)">服务</view>
<view @click="tiao(item)">服务</view>
</view>
</view>
<view class="view-more-btn" @click="goPersonalList">查看更多内容</view>
</view>
</scroll-view>
@@ -133,21 +139,50 @@ function goPersonalList() {
url: '/packageRc/pages/personalList/personalList'
});
}
function toNeedDetail(item) {
let demandType = item.demandType == 1 ? 1 : item.demandType == 2 ? 3 :item.demandType == 3 ? 4 :item.demandType == 9 ? 5 : '';
console.log('toNeedDetail', demandType)
uni.navigateTo({
url: `/packageRc/pages/needs/needDetail?showTab=1&type=${demandType}&id=${item.id}&name=${item.personName}`
// url: `/packageRc/pages/demand/demandail?showTab=1&type=${demandType}&id=${item.id}&name=${item.personName}`
});
};
function back() {
uni.navigateBack({
delta: 1
});
};
function viewMore() {
uni.navigateTo({
url: '/packageRc/pages/needs/needsList'
});
}
let qcjy_xqlx = ref([])
let qcjy_xqlc = ref([])
let infoData = ref({})
import {getDicts} from '@/packageRc/apiRc/system/dict'
import {getStatistic} from '@/packageRc/apiRc/personinfo/index'
onMounted(() => {
getlist();
getlistyujing();
getDicts('qcjy_xqlx').then(res => {
qcjy_xqlx.value = res.data
});
getDicts('qcjy_xqlc').then(res => {
qcjy_xqlc.value = res.data
});
getStatistic().then(res => {
infoData.value = res.data
})
});
function getDictLabel(value, list) {
const item = list.find(item => item.dictValue === value);
return item ? item.dictLabel : '';
}
async function getlist(){
try {
const res = await personInfoList();
const res = await personInfoList({pageNum: 1, pageSize: 5})
console.log("res", res);
jobList.value = res.rows || [];
jobListcount.value=res.total || 0
@@ -159,7 +194,7 @@ async function getlist(){
async function getlistyujing(){
try {
const res = await personAlertList();
const res = await personAlertList({pageNum: 1, pageSize: 5});
console.log("res", res);
jobList1.value = res.rows || [];
jobList1count.value=res.total || 0
@@ -180,11 +215,11 @@ function showReturnReasonPopup(dd) {
}
}
function tiao(id,name){
console.log('尝试导航到待办详情页面ID:', id);
function tiao(item){
console.log('尝试导航到待办详情页面ID:', item.id, item.userId);
// 尝试直接使用uni.navigateTo使用正确的格式并传递id参数
uni.navigateTo({
url: `/packageRc/pages/daiban/daibandetail?id=${id}&name=${name}`,
url: `/packageRc/pages/daiban/daibandetail?id=${item.id}&name=${item.name}&userId=${item.userId}`,
success: function() {
console.log('导航成功');
},
@@ -235,11 +270,6 @@ function cancelReturn() {
returnReasonPopup.value.close()
}
}
function viewMore() {
// uni.navigateTo({
// url: '/pages/jobList/jobList'
// })
}
</script>
<style lang="less" scoped>
@@ -360,7 +390,8 @@ view{box-sizing: border-box;display: block;}
justify-content: space-between;
>view{
padding: 37.5rpx 32rpx;
width: calc(50% - 12rpx);
width: 100%;
// width: calc(50% - 12rpx);
.title{
font-size: 28rpx;
font-weight: bold;
@@ -555,12 +586,14 @@ view{box-sizing: border-box;display: block;}
border-radius: 4rpx;
background: #4D89E3;
color: #fff;
flex-shrink: 0;
}
}
.service-status{
color: #E0A61F;
font-weight: bold;
font-size: 26rpx;
flex-shrink: 0;
}
}
.info-line{
@@ -596,4 +629,16 @@ view{box-sizing: border-box;display: block;}
}
}
}
.view-more-btn{
padding: 10rpx 56rpx;
background: #FFFFFF;
color: #4C6EFB;
border: 1rpx solid #4C6EFB;
text-align: center;
border-radius: 40rpx;
width: fit-content;
margin: 0 auto;
margin-bottom: 20rpx;
}
</style>

View File

@@ -1,59 +1,28 @@
<template>
<view class="job-list">
<view class="top_box_bg">
<u-image src="@/packageRc/static/images/top.png" width="750rpx" height="496rpx" />
</view>
<view class="job-list__navbar">
<div class="navbar">
<view class="navbar-left" @click="goBack">
<uni-icons name="back" color="#fff" size="36"></uni-icons>
</view>
<view class="navbar-title" style="color: #fff">服务详情</view>
<view class="navbar-right">
<!-- 注释掉store相关引用避免getters错误 -->
<!--
<uni-icons
v-show="false"
@tap=""
name="list"
size="44rpx"
color="#fff"
></uni-icons>
-->
</view>
</div>
</view>
<view class="job-list" style="background-image: url('../../../packageRc/static/pageBg.png');">
<view class="job-list__content">
<img
<image
class="top_box_bg_service"
src=""
width="360rpx"
height="50rpx"
src="/packageRc/static/images/serviceFrequency.png"
style="width:calc(100vw - 64rpx);height:80rpx;display: block;"
alt=""
/>
<view class="serviceFrequency" @tap="
$tab.navigateTo(
`/pages/community/serviceRecord?userId=${form.userId}`
uni.navigateTo(
{url:`/packageRc/pages/daiban/bangfuList?userId=${form.userId}`}
)
">
<view>服务次数 {{ serviceTotal }}</view>
<view
style="font-size: 28rpx; font-weight: normal"
>查看></view
>{{'查看>'}}</view
>
</view>
<view class="content">
<view
class="personnelInformation"
@tap="
$tab.navigateTo(
`/pages/community/personEdit?id=${form.id}&type=edit`
)
"
>
<view class="personnelInformation">
<view class="left">
<view class="left_name">{{ form?.name || '' }}</view>
<view class="left_name">{{ form.name || '' }}</view>
<view style="margin-top: 10rpx">
<text v-if="form.gender == 0"></text>
<text v-if="form.gender == 1"></text>
@@ -81,10 +50,9 @@
</view>
<view class="visitAndInvestigate" @click="goAddServices">
<view class="text">服务</view>
<img
<image
src="/packageRc/static/images/person/fillInRecords.png"
width="60rpx"
height="40rpx"
style="width:220rpx;height:60rpx;"
alt=""
srcset=""
/>
@@ -128,66 +96,68 @@
>条求职需求</text
>
</view> -->
<u-swipe-action v-show="activeType == 1">
<u-swipe-action-item
:options="[{ text: '删除' }]"
<uni-swipe-action v-show="activeType == 1">
<uni-swipe-action-item
:right-options="[{ text: '删除' }]"
class="jobSearchListview"
v-for="item in jobSearchList"
:key="item.id"
@click="removeRowData(item)"
>
<view style="padding: 30rpx;" @click="goNeedsDetail(item, 1)">
<view class="jobSearchListview_name">{{
getJobWorkTypeName(item.jobWorkType)
}}</view>
<view class="salaryExpectation">
<text style="color: #8e8e8e">期望薪资</text>
<view class="salary">
{{ item.minRecruitmentSalary}}-
{{ item.highRecruitmentSalary}}
/
<view>
<view style="border-radius: 8rpx;margin-top: 16rpx;background: #fff;padding: 30rpx;" @click="goNeedsDetail(item, 1)">
<view class="jobSearchListview_name">{{
getJobWorkTypeName(item.jobWorkType)
}}</view>
<view class="salaryExpectation">
<text style="color: #8e8e8e">期望薪资</text>
<view class="salary">
{{ item.minRecruitmentSalary}}-
{{ item.highRecruitmentSalary}}
/
</view>
</view>
<view class="salaryExpectation">
<text style="color: #8e8e8e">希望工作地点</text>
<text>{{ item.addressDesc }}</text>
</view>
<view class="jobSearchListview_currentStatus">
<text style="color: #e0a61f" v-if="item.currentStatus == 1"
>待处理</text
>
<text style="color: #288ae6" v-if="item.currentStatus == 2"
>处理中</text
>
<text style="color: #1ac88b" v-if="item.currentStatus == 3"
>已完成</text
>
</view>
<view v-if="item.currentStatus == 3" class="job-list__item-btn">
<u-button
type="primary"
:plain="true"
color="#1A62CE"
text="服务追溯"
@click.native.stop="serviceTraceButton(item, 1)"
:customStyle="{ border: 'none' }"
></u-button>
</view>
<view class="job-list__item-btn" v-else>
<view
class="btn"
@click.native.stop="requirementTraining(item, 1)"
>推荐</view
>
<view
class="btn"
@click.native.stop="requirementHandling(item, 1)"
>办结</view
>
</view>
</view>
<view class="salaryExpectation">
<text style="color: #8e8e8e">希望工作地点</text>
<text>{{ item.addressDesc }}</text>
</view>
<view class="jobSearchListview_currentStatus">
<text style="color: #e0a61f" v-if="item.currentStatus == 1"
>待处理</text
>
<text style="color: #288ae6" v-if="item.currentStatus == 2"
>处理中</text
>
<text style="color: #1ac88b" v-if="item.currentStatus == 3"
>已完成</text
>
</view>
<view v-if="item.currentStatus == 3" class="job-list__item-btn">
<u-button
type="primary"
:plain="true"
color="#1A62CE"
text="服务追溯"
@click.native.stop="serviceTraceButton(item, 1)"
:customStyle="{ border: 'none' }"
></u-button>
</view>
<view class="job-list__item-btn" v-else>
<view
class="btn"
@click.native.stop="requirementTraining(item, 1)"
>推荐</view
>
<view
class="btn"
@click.native.stop="requirementHandling(item, 1)"
>办结</view
>
</view>
</view>
</u-swipe-action-item>
</u-swipe-action>
</uni-swipe-action-item>
</uni-swipe-action>
<!-- <view class="requirementTitle">
<text>创业需求</text>
<text class="text"
@@ -197,15 +167,15 @@
>条求职需求</text
>
</view> -->
<u-swipe-action v-show="activeType == 2">
<u-swipe-action-item
:options="[{ text: '删除' }]"
<uni-swipe-action v-show="activeType == 2">
<uni-swipe-action-item
:right-options="[{ text: '删除' }]"
@click="removeRowData(item)"
class="entrepreneurialNeeds"
v-for="item in listOfEntrepreneurialNeeds"
:key="item.id"
>
<view style="padding: 30rpx" @click="goNeedsDetail(item, 3)">
<view style="border-radius: 8rpx;margin-top: 16rpx;background: #fff;padding: 30rpx" @click="goNeedsDetail(item, 3)">
<view class="entrepreneurialNeeds_name">
{{ item.personName }}的创业需求
</view>
@@ -251,8 +221,8 @@
>
</view>
</view>
</u-swipe-action-item>
</u-swipe-action>
</uni-swipe-action-item>
</uni-swipe-action>
<!-- <view class="requirementTitle">
<text>培训需求</text>
<text class="text"
@@ -260,15 +230,15 @@
>条求职需求</text
>
</view> -->
<u-swipe-action v-show="activeType == 3">
<u-swipe-action-item
:options="[{ text: '删除' }]"
<uni-swipe-action v-show="activeType == 3">
<uni-swipe-action-item
:right-options="[{ text: '删除' }]"
@click="removeRowData(item)"
class="entrepreneurialNeeds"
v-for="item in trainingList"
:key="item.id"
>
<view style="padding: 30rpx" @click="goNeedsDetail(item, 4)">
<view style="border-radius: 8rpx;margin-top: 16rpx;background: #fff;padding: 30rpx" @click="goNeedsDetail(item, 4)">
<view class="entrepreneurialNeeds_name">
{{ item.personName }}的培训需求
</view>
@@ -316,8 +286,8 @@
>
</view>
</view>
</u-swipe-action-item>
</u-swipe-action>
</uni-swipe-action-item>
</uni-swipe-action>
<!-- <view class="requirementTitle">
<text>其他需求</text>
<text class="text"
@@ -325,15 +295,15 @@
>条其他需求</text
>
</view> -->
<u-swipe-action v-show="activeType == 4">
<u-swipe-action-item
<uni-swipe-action v-show="activeType == 4">
<uni-swipe-action-item
:options="[{ text: '删除' }]"
@click="removeRowData(item)"
class="entrepreneurialNeeds"
v-for="item in otherList"
:key="item.id"
>
<view style="padding: 30rpx" @click="goNeedsDetail(item, 5)">
<view style="border-radius: 8rpx;margin-top: 16rpx;background: #fff;padding: 30rpx" @click="goNeedsDetail(item, 5)">
<view class="entrepreneurialNeeds_name">
{{ item.personName }}的其他需求
</view>
@@ -378,15 +348,15 @@
>
</view>
</view>
</u-swipe-action-item>
</u-swipe-action>
</uni-swipe-action-item>
</uni-swipe-action>
</view>
</view>
<view class="addNeeds" @click="goAddNeeds">
<img src="/packageRc/static/images/person/addNeeds.png" />
</view>
<u-popup :show="show" @close="close" @open="open">
<!-- <uni-popup ref="show" @close="close" @open="open">
<view class="dialog_div">
<view class="dialog_div_item" @click="goAddNeeds(1)">
<img
@@ -428,10 +398,10 @@
/>
其他需求
</view>
<view class="dialog_div_btn" @click="show = false"> </view>
<view class="dialog_div_btn" @click="closeShow"> </view>
</view>
</u-popup>
<u-datetime-picker
</uni-popup> -->
<!-- <u-datetime-picker
style="position: relative; z-index: 100"
:show="showTime"
v-model="hopeSolveDate"
@@ -440,26 +410,117 @@
@confirm="confirmDate"
@cancel="showTime = false"
@close="showTime = false"
></u-datetime-picker>
></u-datetime-picker> -->
<!-- 社区端 - 显示隐藏退出组件 -->
<exitPopup />
<DealDone ref="dealDone" @finished="getListPersonDemand();"/>
<!-- <uni-popup background-color="#fff" type="bottom"
ref="openDeal"
style="position: relative; z-index: 100"
closeOnClickOverlay
@close="openDeal = false"
>
<view style="padding: 32rpx;">
<uni-forms style="width: 100%;"
class="self-form"
labelPosition="top"
:model="formData"
:rules="rules"
ref="uForm"
labelWidth="300"
>
<uni-forms-item label="实际解决时间" prop="actualSolveDate" required>
<view
class="picker-view"
:class="{ selected: formData.actualSolveDate }"
@click="showTime = true"
>
<uni-datetime-picker
type="date"
:value="formData.actualSolveDate"
start="2021-3-20"
end="2030-6-20"
@change="change"
/>
</view>
</uni-forms-item>
<uni-forms-item label="经办人" prop="agentUserName" required>
<view class="input-view">
<uni-data-select
style="width: 100%"
v-model="formData.agentUserId"
placeholder="请选择经办人"
:localdata="jingbrList1"
@change="handleAgentChange"
>
</uni-data-select>
</view>
</uni-forms-item>
<uni-forms-item label="人员状态" prop="fileUrl">
<picker
@change="onpersonStatusChange"
:range="personStatusOptions.map(item => item.label)"
:value="getpersonStatusIndex(formData.personStatus)"
mode="selector"
>
<view style="border: 1px solid #e4e4e4;width: 100%;padding: 0 20rpx;line-height: 64rpx;white-space: nowrap;text-overflow: ellipsis;flex-grow: 1;">{{ getpersonStatusLabel(formData.personStatus) || "请选择" }}</view>
</picker>
</uni-forms-item>
<uni-forms-item label="附件" prop="fileUrl">
<ImageUpload
:fileList="fileList"
@update="changeFile"
:maxCount="6"
/>
</uni-forms-item>
<uni-forms-item label="解决说明" prop="solveDesc" required>
<view class="textarea-view">
<textarea
v-model="formData.solveDesc"
placeholder="请输入解决说明"
style="padding: 28rpx 36rpx;border: 1px solid #e4e4e4;padding: 10rpx;border-radius: 8rpx;font-size: 28rpx;color:#333333;height: 120rpx;"
></textarea>
</view>
</uni-forms-item>
</uni-forms>
</view>
<view class="button-area">
<view class="btn" @click="closeopenDeal">取消</view>
<view
class="btn reset"
@click="
formData.actualSolveDate = '';
formData.solveDesc = '';
"
>重置</view
>
<view class="btn save" @click="finishJobRecommend()"
>办结</view
>
</view>
</uni-popup> -->
</view>
</template>
<script>
import { getPersonInfo } from "../../api/company/index.js";
// import { listJobService, serviceTraceability } from "@/api/needs/jobService";
import { listPersonDemand, delPersonDemand } from "../../api/needs/personDemand";
// import { requirementCompletion } from "@/api/company";
// import { listEntrepreneurshipService } from "@/api/needs/entrepreneurshipService";
// import { listTrainService, delTrainService } from "@/api/needs/trainService";
import { listJobType } from "../../api/jobType/index";
// import ImageUpload from "@/components/ImageUpload";
// import { listJobService, serviceTraceability } from "@/api/needs/jobService";
import { listPersonDemand, delPersonDemand } from "../../api/needs/personDemand";
import { requirementCompletion } from "@/packageRc/apiRc/company/index";
// import { listEntrepreneurshipService } from "@/api/needs/entrepreneurshipService";
// import { listTrainService, delTrainService } from "@/api/needs/trainService";
import { listJobType } from "../../api/jobType/index";
// import ImageUpload from "@/packageRc/components/ImageUpload";
import {getJbrInfo} from "@/packageRc/apiRc/personinfo/index"
import DealDone from "../needs/dealDone.vue";
export default {
name: "serviceDetails",
components: {
//ImageUpload,
// ImageUpload,
DealDone,
},
data() {
@@ -523,14 +584,32 @@ export default {
disabled: false,
showPersonStatusPicker: false,
personStatusLabel: '',
jingbrList1: [],
personStatusOptions: [],
};
},
onLoad(options) {
this.form.id = options.id;
this.form.userId = options.name
this.form.userId = options.id; // 确保userId被正确赋值
this.form.userId = options.userId; // 确保userId被正确赋值
console.log("options", options);
this.getPersonInfo11();
this.$getDict('qcjy_ryzt').then(res => {
if (res.data && Array.isArray(res.data)) {
this.personStatusOptions = res.data.map(item => ({
value: item.dictValue,
label: item.dictLabel
}));
}
});
getJbrInfo().then(res => {
this.jingbrList1=res.map(ele => {
return {
value: ele.userId,
text: ele.nickName
}
})
})
},
onShow() {
@@ -541,42 +620,46 @@ export default {
created(){
},
mounted() {
// 注释掉getDicts调用避免运行时错误
/*
let arr = [
{
key: "qcjy_zgzpgz",
prop: "highRecruitmentSalary",
},
{
key: "qcjy_zgzpgz",
prop: "minRecruitmentSalary",
},
{
key: "qcjy_ryzt",
prop: "personStatusList",
},
];
arr.forEach((ele, index) => {
this.getDicts(ele.key).then((res) => {
this.dict[ele.prop] = res.data;
this.$forceUpdate();
});
});
*/
// 暂时注释掉workTypeRemoteMethod调用避免listJobType未定义错误
// if (typeof this.workTypeRemoteMethod === 'function') {
// this.workTypeRemoteMethod();
// }
// this.getListPersonDemand();
// this.getJobSearchList();
// this.getListOfEntrepreneurialNeeds();
// this.getTrainingList();
},
methods: {
// 获取帮扶内容标签
getpersonStatusLabel(value) {
let arr = this.personStatusOptions.filter(item => item.value == value)
return arr.length ? arr[0].label : ''
},
getpersonStatusIndex(value) {
if (!value) return 0;
const index = this.personStatusOptions.findIndex(item => item.value === value);
return index !== -1 ? index : 0;
},
// 处理人员状态选择变化
onpersonStatusChange(e) {
const index = e.detail.value;
if (this.personStatusOptions && this.personStatusOptions[index]) {
this.formData.personStatus = this.personStatusOptions[index].value;
}
},
// 获取经办人名称
getAgentUserName(userId) {
const agent = this.jingbrList1.find(item => item.value === userId);
return agent ? agent.nickName : '';
},
// 处理经办人选择变化
handleAgentChange(value) {
if (!value || !this.jingbrList1 || !this.jingbrList1.length) {
this.formData.agentUserName = '';
return;
}
const user = this.jingbrList1.find(item => item.value === value);
if (user) {
this.formData.agentUserName = user.nickName;
} else {
this.formData.agentUserName = '';
}
},
closeopenDeal() {
this.$refs.openDeal.close();
},
// 返回上一页
goBack() {
uni.navigateBack();
@@ -622,8 +705,8 @@ export default {
open() {
// console.log('open');
},
close() {
this.show = false;
closeShow() {
this.$refs.show.close();
// console.log('close');
},
@@ -636,20 +719,11 @@ export default {
try {
const url = `/packageRc/pages/daiban/addbangfu?id=${this.form?.userId || ''}&name=${this.form.name}`;
// const url = `/packageRc/pages/service/serviceDetail?id=${this.form?.userId || ''}&name=${this.form.name}`;
console.log("导航URL:", url);
uni.navigateTo({
url: url,
success: () => {
console.log("导航成功");
},
fail: (err) => {
console.error("导航失败:", err);
uni.showToast({
title: '导航失败: ' + JSON.stringify(err),
icon: 'none'
});
}
});
} catch (error) {
console.error("执行出错:", error);
@@ -659,19 +733,12 @@ export default {
});
}
},
goRecommend() {
this.$tab.navigateTo(
`/pages/services/serviceDetail?activeType=2&showTab=1&userId=${this.form.userId}&name=${this.form.name}`
);
},
goPush() {
this.$tab.navigateTo(
`/pages/services/serviceDetail?activeType=3&showTab=1&userId=${this.form.userId}&name=${this.form.name}`
);
},
goNeedsDetail(item, needsType) {
// uni.navigateTo({
// url: `/packageRc/pages/demand/demandail?id=${item.id}&type=${needsType}&showTab=1`,
// });
uni.navigateTo({
url: `/pages/needs/needDetail?id=${item.id}&type=${needsType}&showTab=1`,
url: `/packageRc/pages/needs/needDetail?id=${item.id}&type=${needsType}&showTab=1`,
});
},
calculateAge(data) {
@@ -698,14 +765,17 @@ export default {
}
}
},
confirmDate(e) {
this.showTime = false;
// 获取选中的日期
const date = e.value;
// 使用 uView 的 uTime 方法格式化日期,包含时分秒
const formattedDateTime = uni.$u.timeFormat(date, "yyyy-mm-dd hh:MM:ss");
// 设置表单数据
this.formData.actualSolveDate = formattedDateTime;
// confirmDate(e) {
// this.showTime = false;
// // 获取选中的日期
// const date = e.value;
// // 使用 uView 的 uTime 方法格式化日期,包含时分秒
// const formattedDateTime = uni.$u.timeFormat(date, "yyyy-mm-dd hh:MM:ss");
// // 设置表单数据
// this.formData.actualSolveDate = formattedDateTime;
// },
change(e) {
this.formData.actualSolveDate = e
},
removeRowData(data) {
//确实要删除的提示
@@ -713,40 +783,38 @@ export default {
title: "提示",
content: "你确定要删除吗",
success: (res) => {
delPersonDemand(data.id).then((res) => {
if (res.code == 200) {
uni.showToast({
title: "删除成功",
icon: "none",
});
//刷新列表
this.getListPersonDemand();
} else {
uni.showToast({
title: "删除失败",
icon: "none",
});
}
});
if(res.confirm){
delPersonDemand(data.id).then((res) => {
if (res.code == 200) {
uni.showToast({
title: "删除成功",
icon: "none",
});
//刷新列表
this.getListPersonDemand();
} else {
uni.showToast({
title: "删除失败",
icon: "none",
});
}
});
}
},
});
},
goAddNeeds(needsType) {
console.log("this.form.userId",this.form);
uni.navigateTo({
url: `/packageRc/pages/demand/demandail?activeType=${1}&id=${this.form.userId}&name=${this.form.name}`,
success: function() {
console.log('导航成功')
},
fail: function(err) {
console.error('导航失败:', err);
}
});
goAddNeeds() {
uni.navigateTo({
url: `/packageRc/pages/needs/needDetail?userId=${this.form.userId}&type=1&name=${this.form.name}`,
// url: `/packageRc/pages/demand/demandail?activeType=${1}&id=${this.form.userId}&name=${this.form.name}`,
success: function() {
console.log('导航成功')
},
fail: function(err) {
console.error('导航失败:', err);
}
});
},
getDictLabel(value, list) {
if (list) {
@@ -771,18 +839,18 @@ export default {
// 获取当前的需求类型字符串
const demandType = demandTypeMap[needsType] || "other";
// 使用映射后的字符串构建URL并导航
this.$tab.navigateTo(
`/pages/services/serviceTraceability?id=${item.id}&demandType=${demandType}`
);
uni.navigateTo({
url: `/pages/services/serviceTraceability?id=${item.id}&demandType=${demandType}`
});
},
// 办结按钮
async finishJobRecommend(needsType) {
async finishJobRecommend() {
uni.showLoading();
try {
// 先进行表单校验
await this.$refs.uForm.validate();
// 校验通过后再走后续逻辑
this.$showLoading();
const url = "/manage/personDemand/demandDone";
if (!url) {
throw new Error("无效的需求类型");
@@ -790,8 +858,8 @@ export default {
const { code, msg } = await requirementCompletion(url, this.formData);
if (code === 200) {
this.$u.toast('办结成功');
this.openDeal = false;
uni.showToast({title: '办结成功', icon: 'none'});
this.$refs.openDeal.close();
this.getListPersonDemand();
this.serviceTraceability();
}
@@ -806,21 +874,21 @@ export default {
} else {
msg = '请检查必填项填写';
}
this.$u.toast(msg);
uni.showToast({title: msg, icon: 'none'});
} finally {
this.$hideLoading();
uni.hideLoading();
}
},
// 需求推荐/培训
requirementTraining(item, index) {
if (index == 1) {
this.$tab.navigateTo(
`/pages/services/serviceDetail?personName=${item.personName}&personId=${item.personId}&jobDemandInfoId=${item.id}&jobWorkType=${item.jobWorkType}&type=3&showTab=1`
);
uni.navigateTo({
url: `/packageRc/pages/service/serviceDetail?personName=${item.personName}&personId=${item.personId}&jobDemandInfoId=${item.id}&jobWorkType=${item.jobWorkType}&type=3&showTab=1`
});
} else {
this.$tab.navigateTo(
`/pages/services/serviceDetail?personName=${item.personName}&personId=${item.personId}&skillTrainingId=${item.id}&personStatus=${item.personStatus}&type=4&showTab=1`
);
uni.navigateTo({
url: `/packageRc/pages/service/serviceDetail?personName=${item.personName}&personId=${item.personId}&skillTrainingId=${item.id}&personStatus=${item.personStatus}&type=4&showTab=1`
});
}
},
changeFile(e) {
@@ -834,23 +902,30 @@ export default {
this.formData.fileUrl.push(url);
}
}
this.formData.fileUrl = this.$arrayToString(this.formData.fileUrl);
this.formData.fileUrl = this.formData.fileUrl.join(',')
},
// 需求办结
requirementHandling(item, needsType) {
this.openDeal = true;
this.needsType = needsType;
this.formData = {
id: item.id,
currentStatus: "3",
userId: item.userId,
personStatus: item.personStatus || (this.dict.personStatusList[0] && this.dict.personStatusList[0].dictValue),
};
console.log("item",item)
this.$nextTick(() => {
this.$forceUpdate();
});
},
// this.openDeal = true;
// this.$refs.openDeal.open();
this.$refs.dealDone.init({
id: item.id,
currentStatus: "3",
userId: item.userId,
personStatus: item.personStatus || (this.dict.personStatusList[0] && this.dict.personStatusList[0].dictValue),
});
// this.needsType = needsType;
// this.formData = {
// id: item.id,
// currentStatus: "3",
// userId: item.userId,
// personStatus: item.personStatus || (this.dict.personStatusList[0] && this.dict.personStatusList[0].dictValue),
// };
console.log("item",item)
this.$nextTick(() => {
this.$forceUpdate();
});
},
onPersonStatusConfirm(e) {
const item = e.value[0];
this.formData.personStatus = item.dictValue;
@@ -1013,15 +1088,15 @@ export default {
}
.job-list {
&__navbar {
height: 80rpx;
}
height: 100%;;
background-repeat: no-repeat;
background-color: #F4F4F4;
&__content {
position: relative;
padding: 32rpx;
z-index: 10;
background-color: #d0dcee;
background-color: #F4F4F4;
border-radius: 32rpx 32rpx 0 0;
border: 1px solid #fff;
}
@@ -1108,18 +1183,17 @@ export default {
position: relative;
padding: 1rpx;
.content {
padding: 17px;
margin-top: 110rpx;
height: calc(100vh - 264rpx);
padding: 0 32rpx;
margin-top: 100rpx;
height: calc(100vh - 64rpx);
overflow: auto;
z-index: 10;
background-color: #d0dcee;
border-radius: 17px 17px 0 0;
border: 3px solid #fff !important;
// background-color: #d0dcee;
// border-radius: 17px 17px 0 0;
// border: 3px solid #fff !important;
}
}
.top_box_bg_service {
display:none;
position: absolute;
top: 20rpx;
left: 40rpx;
@@ -1212,6 +1286,7 @@ export default {
width: 100%;
height: 205rpx;
border-radius: 8px;
border-top-right-radius: 0;
background: #ffffff;
padding: 30rpx;
box-sizing: border-box;

View File

@@ -1,11 +1,11 @@
<!--
* @Date: 2024-10-08 14:29:36
* @LastEditors: shirlwang
* @LastEditTime: 2025-11-03 12:15:15
* @LastEditTime: 2025-11-04 15:55:41
-->
<template>
<view class="container" style="background-color: #eef1f5;">
<scroll-view scroll-y="true" :style="{height: edit?'calc(90vh - 150px)':'calc(100vh - 144px)'}">
<view class="container">
<scroll-view scroll-y="true" :style="{height: edit?'calc(100vh - 380rpx)':'calc(100vh - 194rpx)'}">
<view class="inner">
<view class="part-title" style="display: flex;justify-content: space-between;">创业需求信息
<view v-if="!edit&&formData.id&&formData.currentStatus!=3" class="btn"
@@ -463,7 +463,10 @@
}
.inner {
background: #eef1f5;
background: #fff;
width: calc(100% - 64rpx);
box-sizing: border-box;
margin: 0 auto;
border-radius: 16rpx;
padding: 32rpx;
margin-bottom: 24rpx;
@@ -486,7 +489,7 @@
margin-bottom: 24rpx;
background-color: #fff;
border-radius: 8rpx;
padding: 24rpx;
padding: 24rpx 0;
}
.form-label {
@@ -594,8 +597,7 @@
}
.button-area {
padding: 24rpx 32rpx 68rpx;
width: calc(100% + 64rpx);
margin-left: -32rpx;
width: 100%;
background: #fff;
display: flex;
box-sizing: border-box;

View File

@@ -1,11 +1,11 @@
<!--
* @Date: 2024-10-08 14:29:36
* @LastEditors: shirlwang
* @LastEditTime: 2025-11-03 12:15:48
* @LastEditTime: 2025-11-04 16:30:05
-->
<template>
<view class="container" style="background-color: #f7f7f7;">
<scroll-view scroll-y="true" >
<view class="container">
<scroll-view scroll-y="true" :style="{height: edit?'calc(100vh - 380rpx)':'calc(100vh - 194rpx)'}">
<view class="inner">
<view class="part-title" style="display: flex;justify-content: space-between;">求职需求信息
<view v-if="!edit&&formData.id&&formData.currentStatus!=3" class="btn"
@@ -160,6 +160,8 @@
<!-- 工种选择器弹窗 -->
<choose-person ref="personChooser" @confirm="personNameConfirm" />
<PlacePicker ref="placePicker" @selected="handleSelected" />
</scroll-view>
<view class="button-area" v-if="edit">
<view class="btn" @click="cancelPage">取消</view>
@@ -171,26 +173,24 @@
<script>
import {
getPersonBase
} from "@/packageRc/api/personinfo/index";
} from "@/packageRc/apiRc/person";
import {
addPersonDemand,
updatePersonDemand,
getPersonDemand
} from "@/packageRc/api/needs/personDemand";
} from "@/packageRc/apiRc/needs/personDemand";
import {
listJobType
} from "@/packageRc/api/jobType/index";
import ImageUpload from './ImageUpload'
import ChoosePerson from './choosePerson';
} from "@/packageRc/apiRc/jobType/index";
import ImageUpload from '/packageRc/components/ImageUpload'
import ChoosePerson from '/packageRc/pages/needs/components/choosePerson';
import PlacePicker from "/packageRc/components/placePicker";
//import uPopup from 'uview-ui/components/u-popup/u-popup.vue'
export default {
components: {
ChoosePerson,
ImageUpload,
PlacePicker,
// uPopup
},
props: {
needId: {
@@ -209,8 +209,6 @@
dates: {},
currentCommunityId: '',
showPickerPicker: false,
canChoosePerson: true,
canChoosePerson: true,
formData: {
demandType:"1",
personName: '',
@@ -228,7 +226,6 @@
jobDescription: '',
// fileUrl: []
},
bfnrzd:[],
rules: {
personName: [{
required: true,
@@ -253,11 +250,11 @@
message: '请选择最低薪酬',
trigger: ['blur', 'change'],
}, ],
jobDescription: [{
required: true,
message: '请填写求职说明',
trigger: ['blur', 'change'],
}, ]
jobDescription: [{
required: true,
message: '请填写求职说明',
trigger: ['blur', 'change'],
}, ]
// employmentType: [{
// required: true,
// message: '请选择用工形式',
@@ -300,12 +297,10 @@
workTypeIndexes: [0, 0, 0],
}
},
// 移除uView表单验证相关代码
onReady() {
this.$refs.uForm.setRules(this.rules)
},
created() {
getDicts('qcjy_fwnr').then(res => {
this.bfnrzd = res.data;
});
this.setName()
this.loading = true;
let arr = [{
key: 'qcjy_gznx',
@@ -336,7 +331,7 @@
prop: 'employmentWillingness'
},
]
// 使用 Promise.all 确保所有字典数据加载完成
Promise.all(arr.map(ele => this.getDicts(ele.key)))
.then(responses => {
@@ -382,15 +377,12 @@
}
},
setName(){
// 只有在name有值时才设置人员信息避免覆盖已有数据
if(this.name) {
this.formData.personName = this.name
this.formData.personId = this.needId
this.formData.userId = this.needId
}
this.formData.personName = this.name
this.formData.personId = this.needId
this.formData.userId = this.needId
},
personNameConfirm(event) {
// this.formData.personName = event.name
this.formData.personName = event.name
this.formData.personId = event.id
this.formData.userId = event.userId
@@ -462,7 +454,7 @@
cancelPicker(type) {
this.show[type] = false
},
getCityOptis(data) {
getCityOptions(data) {
if (data && data[0] && data[0].children) {
return [data].concat(this.getCityOptions(data[0].children))
} else {
@@ -495,7 +487,7 @@
if (this.edit) {
if(type === 'workTypeTree') {
if (!this.workTypeTreeColumns[0] || !this.workTypeTreeColumns[0].length) {
this.$u.toast('工种数据未加载,请稍后重试');
uni.showToast({title: '工种数据未加载,请稍后重试', icon: 'none'});
return;
}
// 弹窗打开时初始化临时columns和index
@@ -521,35 +513,21 @@
})
},
async saveInfo() {
this.setName()
uni.showLoading();
try {
console.log("this.formData.personName",this.formData.personName)
// 先检查求职说明是否为空,如果为空直接提示
if (!this.formData.jobDescription || this.formData.jobDescription.trim() === '') {
uni.showToast({ title: '请填写求职说明!', icon: 'none' });
uni.showToast({title: '请填写求职说明!', icon: 'none'});
return;
}
// 简单的表单验证
// 验证表单
console.log(this.formData)
if (!this.formData.personName) {
uni.showToast({ title: '请填写姓名!', icon: 'none' });
return;
}
if (!this.formData.jobWorkType) {
uni.showToast({ title: '请选择求职工种!', icon: 'none' });
return;
}
if (!this.formData.minRecruitmentSalary) {
uni.showToast({ title: '请填写最低薪酬!', icon: 'none' });
return;
}
if (!this.formData.highRecruitmentSalary) {
uni.showToast({ title: '请填写最高薪酬!', icon: 'none' });
return;
const isValid = await this.$refs.uForm.validate();
if (!isValid) {
throw new Error('表单验证失败');
}
// 显示全局加载
uni.showLoading({ title: '加载中...' });
this.formData.demandType = 1;
// this.formData.userId = this.formData.personId
// 根据 formData 是否有 id 来决定是更新还是新增
@@ -564,25 +542,25 @@
}
// 检查响应码是否为200
if (response.code === 200) {
uni.showToast({ title: successMessage });
uni.showToast({title: successMessage, icon: 'none'});
// 如果是编辑模式,关闭编辑状态;否则返回上一页
if (this.formData.id) {
this.edit = false;
} else {
// 延迟1秒后返回
setTimeout(() => {
uni.navigateBack();
}, 1000);
}, 2000);
}
}
} catch (error) {
if(error && error.length){
uni.showToast({ title: '请填写完整信息!', icon: 'none' });
} else {
uni.showToast({ title: '系统错误,请联系管理员!', icon: 'none' });
if(error.length){
uni.showToast({title: '请填写完整信息!', icon: 'none'});
}else{
uni.showToast({title: '系统错误,请联系管理员!', icon: 'none'});
}
}
finally {
// uni.showToast({title: '请检查必填项填写', icon: 'none'});
} finally {
// 确保加载页总是会被隐藏
uni.hideLoading();
}
@@ -607,32 +585,24 @@
this.$set(this.formData, "longitude", marker.location.lng);
},
// 处理树形数据为级联选择器格式
processWorkTypeTree(treeData) {
if (!treeData || !Array.isArray(treeData)) {
this.workTypeColumns = [[], [], []];
return;
}
// 第一级
const level1 = treeData.filter(item => item.level === "1");
// 第二级
const level2 = treeData.filter(item => item.level === "2");
// 第三级
const level3 = treeData.filter(item => item.level === "3");
// 构建级联数据
const columns = [];
columns[0] = level1;
// 根据第一级选择,过滤第二级
if (level1.length > 0) {
const firstLevelId = level1[0].id;
@@ -640,7 +610,7 @@
} else {
columns[1] = [];
}
// 根据第二级选择,过滤第三级
if (columns[1].length > 0) {
const secondLevelId = columns[1][0].id;
@@ -648,23 +618,23 @@
} else {
columns[2] = [];
}
this.workTypeColumns = columns;
console.log('级联数据构建完成:', this.workTypeColumns);
},
// 级联选择器列变化事件
onWorkTypeColumnChange(e) {
const { column, value } = e.detail;
const newIndexes = [...this.workTypeIndexes];
newIndexes[column] = value;
// 重置后续列的数据
if (column === 0) {
// 第一列变化,重置第二、三列
const selectedLevel1 = this.workTypeColumns[0][value];
if (selectedLevel1) {
const level2 = this.jobTypeList.filter(item =>
const level2 = this.jobTypeList.filter(item =>
item.level === "2" && item.parentId === selectedLevel1.id
);
this.workTypeColumns[1] = level2;
@@ -676,24 +646,24 @@
// 第二列变化,重置第三列
const selectedLevel2 = this.workTypeColumns[1][value];
if (selectedLevel2) {
const level3 = this.jobTypeList.filter(item =>
const level3 = this.jobTypeList.filter(item =>
item.level === "3" && item.parentId === selectedLevel2.id
);
this.workTypeColumns[2] = level3;
newIndexes[2] = 0;
}
}
this.workTypeIndexes = newIndexes;
},
// 级联选择器确认事件
onWorkTypePickerChange(e) {
const indexes = e.detail.value;
const selectedLevel1 = this.workTypeColumns[0][indexes[0]];
const selectedLevel2 = this.workTypeColumns[1][indexes[1]];
const selectedLevel3 = this.workTypeColumns[2][indexes[2]];
if (selectedLevel3) {
// 选择第三级
this.formData.jobWorkType = selectedLevel3.id;
@@ -707,16 +677,16 @@
this.formData.jobWorkType = selectedLevel1.id;
this.formData.jobWorkTypeName = selectedLevel1.workTypeName;
}
this.workTypeIndexes = indexes;
},
// 根据工种ID设置索引
setWorkTypeIndexes(workTypeId) {
// 在工种列表中查找对应的工种
const targetWorkType = this.jobTypeList.find(item => item.id == workTypeId);
if (!targetWorkType) return;
// 根据level确定是哪一级
if (targetWorkType.level === "1") {
const index = this.workTypeColumns[0].findIndex(item => item.id == workTypeId);
@@ -752,20 +722,11 @@
</script>
<style lang="scss">
.page ::v-deep .u-navbar__content {
background-color: transparent !important;
}
.page {
background-color: #3161c7;
height: 100vh;
background-image: url('https://rc.jinan.gov.cn/qcwjyH5/static/images/top.png');
background-repeat: no-repeat;
background-size: 100% auto;
}
.inner {
background: #eef1f5;
background: #fff;
width: calc(100% - 64rpx);
margin: 0 auto;
box-sizing: border-box;
border-radius: 16rpx;
padding: 32rpx;
margin-bottom: 24rpx;
@@ -788,7 +749,7 @@
margin-bottom: 24rpx;
background-color: #fff;
border-radius: 8rpx;
padding: 24rpx;
padding: 24rpx 0;
}
.form-label {
@@ -868,8 +829,7 @@
/* 按钮区域样式 */
.button-area {
padding: 24rpx 32rpx 68rpx;
width: calc(100% + 64rpx);
margin-left: -32rpx;
width: 100%;
background: #fff;
display: flex;
box-sizing: border-box;

View File

@@ -1,11 +1,11 @@
<!--
* @Date: 2024-10-08 14:29:36
* @LastEditors: lip
* @LastEditTime: 2025-05-07 10:03:20
* @LastEditors: shirlwang
* @LastEditTime: 2025-11-04 16:14:41
-->
<template>
<view class="container">
<scroll-view scroll-y="true" >
<scroll-view scroll-y="true" :style="{height: edit?'calc(100vh - 380rpx)':'calc(100vh - 194rpx)'}">
<view class="inner">
<view class="part-title" style="display: flex;justify-content: space-between;">需求信息
<view v-if="!edit&&formData.id&&formData.currentStatus!=3" class="btn"
@@ -32,12 +32,8 @@
</view>
</view>
</view>
<!-- 办理完成后 需求说明 -->
</scroll-view>
<choose-person ref="personChooser" @confirm="personNameConfirm" />
<view class="button-area" v-if="edit">
<view class="btn" @click="cancelPage">取消</view>
@@ -48,16 +44,28 @@
</template>
<script>
import { getPersonBase } from "@/packageRc/api/personinfo/index";
import { addPersonDemand, updatePersonDemand, getPersonDemand } from "@/packageRc/api/needs/personDemand";
//import reqComp from './req-comp';
import {
getPersonBase
} from "@/packageRc/apiRc/person";
import {
addPersonDemand,
updatePersonDemand,
getPersonDemand
} from "@/packageRc/apiRc/needs/personDemand";
import ImageUpload from '/packageRc/components/ImageUpload'
import ChoosePerson from '/packageRc/pages/needs/components/choosePerson';
import {
listJobType
} from "@/packageRc/apiRc/jobType/index";
import dayjs from "dayjs";
export default {
components: {
// reqComp
},
ChoosePerson,
ImageUpload
},
props: {
needId: {
needId: {
type: String,
default: ''
},
@@ -68,60 +76,65 @@ import { addPersonDemand, updatePersonDemand, getPersonDemand } from "@/packageR
},
data() {
return {
fileList: [],
edit: true,
canChoosePerson: false,
personBase: {},
dates: {},
formData: {
id: '',
personName: '',
personId: '',
demandType:"9",
userId: '',
demandTitle: '',
jobDescription: '',
actualSolveDate: '',
actualSolvePeople: '',
solveDesc: '',
fileUrl: '',
currentStatus: ''
}
isAcceptAssistance: '',
isAcceptApprovalResult: '',
qtxqsm: ''
},
rules: {
personName: [{
required: true,
message: '请填写姓名',
trigger: ['blur', 'change'],
}, ],
qtxqsm: [{
required: true,
message: '请填写需求说明',
trigger: ['blur', 'change'],
}, ],
},
dict: {},
show: {},
currentCityArr: [],
originalDept: [],
currentCity: '请选择',
bysj: '',
loading: false,
jobTypeList: [],
route: {},
canChoosePerson: false,
}
},
onReady() {
// 组件已准备就绪
this.$refs.uForm.setRules(this.rules)
},
created() {
this.loading = true;
// 直接使用传入的参数设置姓名信息
if(this.name && this.needId) {
this.formData.personName = this.name;
this.formData.personId = this.needId;
this.formData.userId = this.needId;
}
// 如果需要获取详情
if (this.needId) {
this.getDetail(this.needId);
}
},
methods: {
cancelPage() {
if (!this.formData.id) {
this.$u.navigateBack();
} else {
if (this.formData.id) {
this.edit = false;
this.getDetail(this.formData.id);
this.getDetail(this.formData.id)
} else {
uni.navigateBack()
}
},
// workTypeRemoteMethod(key) {
// listJobType({
// workTypeName: key,
// pageNum: 1,
// pageSize: 50
// }).then(
// (res) => {
// this.jobTypeList = res.rows;
// }
// );
// },
workTypeRemoteMethod(key) {
listJobType({
workTypeName: key,
pageNum: 1,
pageSize: 50
}).then(
(res) => {
this.jobTypeList = res.rows;
}
);
},
openPersonChooser() {
if (this.edit && this.canChoosePerson) {
this.$refs.personChooser.open();
@@ -131,121 +144,195 @@ import { addPersonDemand, updatePersonDemand, getPersonDemand } from "@/packageR
this.formData.personName = event.name
this.formData.personId = event.id
this.formData.userId = event.userId
this.formNameChange();
this.$forceUpdate();
},
changeFile(e) {
// 清空当前的 fileUrl 数组
this.formData.fileUrl = [];
// 如果 e 有长度(即用户选择了文件)
if (e.length) {
// 遍历每个文件对象并获取其 url
for (let data of e) {
const url = data.data ? data.data.url : data.url;
this.formData.fileUrl.push(url);
}
}
this.formData.fileUrl = this.$arrayToString(this.formData.fileUrl)
},
addOne() {
this.formData = {}
this.getPersonInfo()
if(this.name){
this.formData.personName = this.name
this.formData.userId = this.needid
}
this.edit = true
},
getDetail(id) {
this.$request({
url: '/mini/demand/getPersonDemandById',
method: 'GET',
data: {
id: id
}
}).then(res => {
if (res.code == 200) {
this.formData = res.data;
}
}).catch(err => {
console.log(err);
});
getPersonDemand(id).then(res => {
this.formData = res.data;
this.edit = false
})
},
confirmDate(type, e) {
this.show[type] = false;
let date = new Date(e.value)
this.formData[type] =
`${date.getFullYear()}-${(date.getMonth()+1)>9?(date.getMonth()+1):('0'+(date.getMonth()+1))}-${date.getDate()>9?date.getDate():('0'+date.getDate())}`
this.$forceUpdate();
},
goBack() {
uni.navigateBack();
},
setName() {
// 确保personName存在
if (!this.formData.personName) {
this.formData.personName = '未知用户';
}
let date = new Date();
let year = date.getFullYear();
let month = date.getMonth() + 1;
month = month < 10 ? '0' + month : month;
let day = date.getDate();
day = day < 10 ? '0' + day : day;
this.formData.demandTitle = `${this.formData.personName}_于${year}-${month}-${day}_提出其他需求`;
cancelPicker(type) {
this.show[type] = false
this.$forceUpdate();
},
saveInfo() {
console.log("执行")
getDictLabel(value, list) {
if (list) {
let arr = list.filter(ele => ele.dictValue == value)
if (arr.length) {
return arr[0].dictLabel
} else {
return '请选择'
}
}
},
pickerConfirm(type, event) {
this.show[type] = false
this.formData[type] = event.value[0].dictValue
this.$forceUpdate();
},
showPicker(type) {
if (this.edit) {
this.show[type] = true
this.$forceUpdate()
}
},
getPersonInfo() {
this.loading = true;
this.$store.dispatch("GetInfo").then((res) => {
if (res.data.roles.indexOf('qunzhong') == -1) {
this.canChoosePerson = true;
} else {
this.canChoosePerson = false;
getPersonBase(res.data.user.userId).then(resp => {
this.formData.personId = resp.data.id
this.formData.userId = resp.data.userId
this.formData.personName = resp.data.name
this.formNameChange();
this.$forceUpdate();
})
}
})
},
formNameChange() {
let date = new Date()
let day =
`${date.getFullYear()}-${(date.getMonth()+1) + 1 > 9 ? (date.getMonth()+1) + 1: '0'+((date.getMonth()+1) + 1)}-${date.getDate() > 9 ? date.getDate(): '0'+date.getDate()}`
const dayNew = dayjs(date).format("YYYY-MM-DD");
this.formData.demandTitle = `${this.formData.personName}_于${dayNew}_提出其他需求`
},
async saveInfo() {
uni.showLoading();
try {
// 验证必填项
if (!this.formData.personName) {
uni.showToast({
title: '请选择姓名',
icon: 'none'
});
return;
// 验证表单
const isValid = await this.$refs.uForm.validate();
if (!isValid) {
throw new Error('请检查必填项填写');
}
if (!this.formData.jobDescription) {
uni.showToast({
title: '请输入需求说明',
icon: 'none'
});
return;
// 显示全局加载
// 根据 formData 是否有 id 来决定是更新还是新增
let response;
let successMessage;
this.formData.demandType = 9;
// this.formData.userId = this.formData.personId
if (this.formData.id) {
response = await updatePersonDemand(this.formData);
successMessage = '修改成功';
} else {
response = await addPersonDemand(this.formData);
successMessage = '保存成功';
}
uni.showLoading({
title: '保存中...'
});
this.setName();
let params = {
...this.formData,
type: '3'
};
const requestFn = this.formData.id ? updatePersonDemand : addPersonDemand;
requestFn(params).then(res => {
if (res.code == 200) {
uni.showToast({
title: '保存成功',
icon: 'success'
});
// 检查响应码是否为200
if (response.code === 200) {
this.$u.toast(successMessage);
// 如果是编辑模式,关闭编辑状态;否则返回上一页
if (this.formData.id) {
this.edit = false;
if (!this.formData.id) {
this.formData.id = res.data;
}
} else {
uni.showToast({
title: res.message,
icon: 'none'
});
await this.$delay(1000); // 延迟1秒后返回上一页
uni.navigateBack();
}
}).catch(err => {
if (err.message) {
uni.showToast({
title: err.message,
icon: 'none'
});
}
});
} else {
throw new Error('服务器响应错误');
}
} catch (error) {
console.error('保存失败:', error);
if(error.length){
this.$u.toast('请填写完整信息!');
}else{
this.$u.toast('系统错误,请联系管理员!');
}
} finally {
// 确保加载页总是会被隐藏
uni.hideLoading();
}
}
// saveInfo() {
// this.$refs.uForm.validate().then(res => {
// if (this.formData.id) {
// updatePersonDemand(this.formData).then(res => {
// if (res.code == 200) {
// uni.showToast({
// title: '修改成功'
// })
// this.edit = false;
// }
// })
// } else {
// addPersonDemand(this.formData).then(res => {
// if (res.code == 200) {
// uni.showToast({
// title: '保存成功'
// })
// uni.navigateBack();
// }
// })
// }
// }).catch(() => {
// uni.showToast({
// title: '请检查必填项填写',
// icon: 'none'
// })
// })
// }
}
}
</script>
<style lang="scss"> .container {
height: 100vh;
overflow: hidden;
background-color: #f7f7f7;
}
<style lang="scss">
@import "/packageRc/static/scss/index.scss";
.inner {
background: #fff;
width: calc(100% - 64rpx);
margin: 0 auto;
box-sizing: border-box;
border-radius: 16rpx;
padding: 32rpx;
margin-bottom: 24rpx;
}
.inner-part {
width: 100%;
}
.self-form {
width: 100%;
}
@@ -256,7 +343,7 @@ import { addPersonDemand, updatePersonDemand, getPersonDemand } from "@/packageR
margin-bottom: 24rpx;
background-color: #fff;
border-radius: 8rpx;
padding: 24rpx;
padding: 24rpx 0;
}
.form-label {
@@ -298,15 +385,15 @@ import { addPersonDemand, updatePersonDemand, getPersonDemand } from "@/packageR
margin-left: 16rpx;
}
.button-area {
padding: 24rpx 32rpx 68rpx;
width: calc(100% + 64rpx);
margin-left: -32rpx;
background: #fff;
display: flex;
box-sizing: border-box;
margin-top: 40rpx;
border-radius: 16px 16px 0px 0px;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.05);
.btn {
line-height: 72rpx;
@@ -330,16 +417,6 @@ import { addPersonDemand, updatePersonDemand, getPersonDemand } from "@/packageR
flex-grow: 1;
}
}
.container {
background-color: #f7f7f7;
}
.inner {
background-color: #f7f7f7;
padding: 24rpx 32rpx;
}
.self-form {
width: 100%;
}

View File

@@ -1,11 +1,11 @@
<!--
* @Date: 2024-10-08 14:29:36
* @LastEditors: lip
* @LastEditTime: 2025-05-07 09:33:39
* @LastEditors: shirlwang
* @LastEditTime: 2025-11-04 15:56:09
-->
<template>
<view class="container">
<scroll-view scroll-y="true" :style="{height: edit?'calc(90vh - 150px)':'calc(100vh - 144px)', backgroundColor: '#eef1f5'}">
<scroll-view scroll-y="true" :style="{height: edit?'calc(100vh - 380rpx)':'calc(100vh - 194rpx)'}">
<view class="inner">
<view class="part-title" style="display: flex;justify-content: space-between;">培训需求信息
@@ -559,42 +559,12 @@ import uniDateformat from '@/uni_modules/uni-dateformat/components/uni-dateforma
</script>
<style lang="scss">
.date-picker-wrapper {
width: 100%;
padding: 10px;
box-sizing: border-box;
display: flex;
justify-content: space-between;
align-items: center;
border: 1px solid #ddd;
border-radius: 4px;
}
.date-picker-wrapper.noValue {
color: #999;
}
.date-value {
color: #333;
}
.page ::v-deep .u-navbar__content {
background-color: transparent !important;
}
.container {
height: 100vh;
overflow: hidden;
background-color: #f7f7f7;
}
.page {
background-color: #3161c7;
height: 100vh;
background-image: url('https://rc.jinan.gov.cn/qcwjyH5/static/images/top.png');
background-repeat: no-repeat;
background-size: 100% auto;
}
.inner {
background: #eef1f5;
background: #fff;
width: calc(100% - 64rpx);
margin: 0 auto;
box-sizing: border-box;
border-radius: 16rpx;
padding: 32rpx;
margin-bottom: 24rpx;
@@ -615,7 +585,7 @@ import uniDateformat from '@/uni_modules/uni-dateformat/components/uni-dateforma
margin-bottom: 24rpx;
background-color: #fff;
border-radius: 8rpx;
padding: 24rpx;
padding: 24rpx 0;
}
.form-label {
@@ -733,8 +703,7 @@ import uniDateformat from '@/uni_modules/uni-dateformat/components/uni-dateforma
.button-area {
padding: 24rpx 32rpx 68rpx;
width: calc(100% + 64rpx);
margin-left: -32rpx;
width: 100%;
background: #fff;
display: flex;
box-sizing: border-box;

View File

@@ -1,15 +1,15 @@
<!--
* @Date: 2024-10-08 14:29:36
* @LastEditors: lip
* @LastEditTime: 2025-05-06 15:18:11
* @LastEditors: shirlwang
* @LastEditTime: 2025-11-04 16:16:45
-->
<template>
<view class="page">
<view class="page-header df_flex" style="display:flex;align-items:center;justify-content:space-between;padding:20rpx 0rpx;">
<view class="page" style="background-image: url('../../../packageRc/static/pageBg.png');">
<!-- <view class="page-header df_flex" style="display:flex;align-items:center;justify-content:space-between;padding:20rpx 0rpx;">
<u-icon class="back-icon" name="arrow-left" color="#fff" size="16" @click="goBack()"></u-icon>
<view class="title df_flex_1" style="padding-left: 32rpx;" >{{isAdd ? '需求新增' : '需求维护'}}</view>
<u-icon style="margin-right: 32rpx;" @tap="$store.commit('SET_SHOWEXITPOPUP', true)" name="list" size="44rpx" color="#fff"></u-icon>
</view>
</view> -->
<view class="tab-list" v-if="showTab != 1">
<view class="tab" :class="{active: activeType == 1}" @click="canChangeType ? changeType(1) : ''">求职<br>需求
</view>
@@ -21,7 +21,6 @@
</view>
</view>
<jobService v-if="activeType == 1" :needId="id" :name="name" ref="type1" />
<assistService v-if="activeType == 2" :needId="id" :name="name" ref="type2" />
<entrepreneurshipService :needId="id" :name="name" v-if="activeType == 3" ref="type3" />
<trainService v-if="activeType == 4" :needId="id" :name="name" ref="type4" />
<otherService v-if="activeType == 5" :needId="id" :name="name" ref="type5" />
@@ -32,14 +31,12 @@
<script>
import jobService from './components/jobService.vue';
import assistService from './components/assistService.vue';
import entrepreneurshipService from './components/entrepreneurshipService.vue';
import trainService from './components/trainService.vue';
import otherService from './components/otherService.vue';
export default {
components: {
jobService,
assistService,
entrepreneurshipService,
trainService,
otherService,
@@ -54,6 +51,10 @@
}
},
onLoad(options) {
uni.setNavigationBarTitle({
title: '需求信息'
})
console.log("options",options)
this.showTab = options.showTab
this.id = options.id
console.log("this.id",this.id)
@@ -73,6 +74,9 @@
},
methods: {
changeType(type) {
uni.setNavigationBarTitle({
title: '新增需求'
})
this.activeType = type
this.$nextTick(() => {
this.$refs['type' + type].addOne()
@@ -87,52 +91,17 @@
<style lang="scss">
.page ::v-deep .u-navbar__content {
background-color: transparent !important;
}
@import "/packageRc/static/scss/index.scss";
.page {
background-color: #EEF1F5 !important;
background-color: #F4F4F4 !important;
height: 100vh;
background-image: url('https://rc.jinan.gov.cn/qcwjyH5/static/images/top.png');
background-repeat: no-repeat;
padding-top: 32rpx;
background-size: 100% auto;
}
.button-area {
padding: 24rpx 32rpx 68rpx;
width: calc(100% + 64rpx);
margin-left: -32rpx;
background: #fff;
display: flex;
box-sizing: border-box;
margin-top: 40rpx;
border-radius: 16px 16px 0px 0px;
.btn {
line-height: 72rpx;
width: 176rpx;
margin-right: 16rpx;
font-size: 28rpx;
border: 1px solid #B8C5D4;
color: #282828;
text-align: center;
border-radius: 8rpx;
}
.reset {
background: #DCE2E9;
}
.save {
background: linear-gradient(103deg, #1D64CF 0%, #1590D4 99%);
color: #fff;
border: 0;
flex-grow: 1;
}
}
.noValue {
color: rgb(192, 196, 204);
}

View File

@@ -1,18 +1,18 @@
<!--
* @Date: 2025-10-16 15:15:47
* @LastEditors: shirlwang
* @LastEditTime: 2025-10-22 09:54:53
* @LastEditors: lip
* @LastEditTime: 2025-11-07 12:08:01
-->
<template>
<!-- @scroll="handleScroll" @scrolltolower="scrollBottom" -->
<scroll-view :scroll-y="true" class="container" style="background-image: url('../../../packageRc/static/pageBg.png');">
<view style="padding: 40rpx 28rpx;">
<view class="kinggang">
<view>
<view @click="navTo('/packageA/pages/myResume/myResume')">
<image src="../../../packageRc/static/kinggang1.png"/>
<view>信息维护</view>
</view>
<view>
<view @click="navTo('/packageA/pages/Intendedposition/Intendedposition')">
<image src="../../../packageRc/static/kinggang5.png"/>
<view>投递记录</view>
</view>
@@ -21,57 +21,62 @@
<view>需求上报</view>
</view>
<view>
<image src="../../../packageRc/static/kinggang3.png"/>
<image @click="goAiAu" src="../../../packageRc/static/kinggang3.png"/>
<view>虚拟面试</view>
</view>
<view>
<view @click="goCa">
<image src="../../../packageRc/static/kinggang4.png"/>
<view>素质测评</view>
</view>
</view>
<view class="tabs">
<view class="tab" :class="{active: activeTab == 1}" @click="activeTab = 1">岗位列表</view>
<view class="tab" :class="{active: activeTab == 2}" @click="activeTab = 2">实习实训</view>
<view class="tab" :class="{active: activeTab == 3}" @click="activeTab = 3">社区实践</view>
<view class="tab" :class="{active: pageState.type == ''}" @click="changeJobType('')">岗位列表</view>
<view class="tab" :class="{active: pageState.type == 2}" @click="changeJobType(2)">实习实训</view>
<view class="tab" :class="{active: pageState.type == 3}" @click="changeJobType(3)">社区实践</view>
</view>
<view class="titles">
<view class="title-item" :class="{active: activeTitle == 1}" @click="activeTitle = 1"><view>推荐岗位</view></view>
<view class="title-item" :class="{active: activeTitle == 2}" @click="activeTitle = 2"><view>热门岗位</view></view>
<view class="title-item" :class="{active: activeTitle == 1}" @click="activeTitle = 1,getJobRecommed()"><view>推荐岗位</view></view>
<view class="title-item" :class="{active: activeTitle == 2}" @click="activeTitle = 2,getJobList()"><view>热门岗位</view></view>
</view>
<view v-for="(item, index) in jobList" :key="index" class="job-list">
<view v-for="(item, index) in jobList" :key="index" @click="nextDetail(item)" class="job-list">
<view class="top-line">
<view class="salary">4000-8000/</view>
<view class="time"><uni-icons color="#A2A2A2" type="info" size="12"></uni-icons>发布日期2025-10-20</view>
<view class="salary">{{item.minSalary}}-{{item.maxSalary}}/</view>
<view class="time"><uni-icons color="#A2A2A2" type="info" size="12"></uni-icons>发布日期{{ item.postingDate }}</view>
</view>
<view class="title">销售顾问</view>
<view class="title">{{ item.jobTitle }}</view>
<view class="infos">
<view>大专</view>
<view>1-3</view>
<view>喀什 市南区</view>
<view>
<dict-Label dictType="education" :value="item.education"></dict-Label>
</view>
<view>
<dict-Label dictType="experience" :value="item.experience"></dict-Label>
</view>
<view>{{ item.jobLocation }}</view>
</view>
<view class="bottom-line">
<view><uni-icons color="#A2A2A2" type="person" size="12"></uni-icons>6</view>
<view>青岛xx公司</view>
<view><uni-icons color="#A2A2A2" type="person" size="12"></uni-icons>{{item.vacancies}}</view>
<view>{{ item.companyName }}</view>
</view>
</view>
</view>
<view class="view-more-btn" @click="viewMore">查看更多内容</view>
<view class="titles" style="justify-content: space-between;">
<view class="title-item active"><view>政策专区</view></view>
<view>{{'查看更多 >'}}</view>
<view @click="toPolicyList">{{'查看更多 >'}}</view>
</view>
<view v-for="(item, index) in jobList" :key="index" class="job-list">
<view v-for="(item, index) in policyList" :key="index" class="job-list" @click="toPolicyDetail">
<view class="sign">推荐</view>
<view class="title">
<image src="../../../packageRc/static/zcLeft.png"/>
销售顾问</view>
{{item.zcmc}}</view>
<view class="infos">
<view>大专</view>
<view>1-3</view>
<view>喀什 市南区</view>
<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>发布日期2025-10-20</view>
<view>浏览数<text style="color: #6AA7E8">99+</text></view>
<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>
@@ -80,24 +85,57 @@
<script setup>
import { reactive, inject, watch, ref, onMounted, watchEffect, nextTick } from 'vue';
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 => {
policyList.value = res.rows
})
}
function toPolicyList() {
navTo(`/packageRc/pages/policy/policyList`)
}
function toPolicyDetail() {
navTo(`/packageRc/pages/policy/policyDetail?id=${item.id}`)
}
let activeTab = ref(1)
let activeTitle = ref(1)
let jobList = ref([{},{},{},{},{},{}])
function back() {
uni.navigateBack({
delta: 1
})
}
onMounted(()=>{
getJobRecommed()
getPolicy();
})
function goCa(){
if (checkLogin()) {
const userInfo = uni.getStorageSync('userInfo')
navTo(`/packageCa/search/search?userId=${userInfo.userId}&name=${userInfo.name}`);
}
}
// 跳转AI智能面试
function goAiAu(){
if (checkLogin()) {
const userInfo = uni.getStorageSync('userInfo')
navTo(`/packageCa/search/AIAudition?userId=${userInfo.userId}&name=${userInfo.name}`);
}
}
function viewMore() {
// uni.navigateTo({
// url: '/pages/jobList/jobList'
// })
navTo(`/packageRc/pages/jobList/jobList`);
}
function tiao(){
console.log('尝试导航到待办详情页面');
// 尝试直接使用uni.navigateTo使用正确的格式
uni.navigateTo({
url: '/packageRc/pages/demand/index',
url: `/packageRc/pages/needs/personNeeds`,
success: function() {
console.log('导航成功');
},
@@ -106,6 +144,80 @@ function tiao(){
}
});
}
import useUserStore from '@/stores/useUserStore';
const conditionSearch = ref({});
const pageState = reactive({
page: 0,
total: 0,
maxPage: 2,
pageSize: 10,
search: {
order: 0,
},
type:'',
});
let jobList = ref([])
// 获取推荐岗位
function getJobRecommed(){
let params = {
pageSize: pageState.pageSize,
sessionId: useUserStore().seesionId,
...pageState.search,
...conditionSearch.value,
isPublish: 1,
type:pageState.type
};
$api.createRequest('/app/job/recommend', params).then((resData) => {
jobList.value = resData.data
pageState.total = 0;
});
}
// 获取岗位列表
function getJobList(){
let params = {
current: pageState.page,
pageSize: pageState.pageSize,
...pageState.search,
// ...conditionSearch.value,
type:pageState.type
};
$api.createRequest('/app/job/list', params).then((resData) => {
jobList.value = resData.rows
pageState.total = 0;
});
}
// 更改实习实训等
function changeJobType(val){
pageState.type = val
if(activeTitle.value == 1){
getJobRecommed()
}else{
getJobList()
}
}
// 登录检查函数
import { storeToRefs } from 'pinia';
const { userInfo, hasLogin, token } = storeToRefs(useUserStore());
const checkLogin = () => {
const tokenValue = uni.getStorageSync('token') || '';
if (!tokenValue || !hasLogin.value) {
// 未登录,打开授权弹窗
wxAuthLoginRef.value?.open();
return false;
}
return true;
};
// 跳转到详情页面
function nextDetail(job) {
// 登录检查
if (checkLogin()) {
navTo(`/packageA/pages/post/post?jobId=${encodeURIComponent(job.jobId)}`);
}
}
</script>
<style lang="less" scoped>

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,132 @@
<template>
<view>
<uni-popup ref="showPersonChooser" background-color="#fff" type="bottom">
<view style="padding: 32rpx 32rpx 0">
<input @change="searchChange" placeholder="搜索选择人员" v-model="searchPerson"></input>
<scroll-view style="height: 500rpx;" :scroll-y="true">
<view v-for="(item, index) in personList" :key="index" :label="item.name" :value="item.name"
@click="bindPerson(item)" class="person-list" :class="{active: activePerson.id == item.id}">
<view style="display: flex;justify-content: space-between;font-size: 32rpx;font-weight: bold;">
{{ item.name }}
<view style="color: #8492a6; font-size: 13px;width: 50%;text-align: right;">{{ item.phone }}
</view>
</view>
<view style="color: #8492a6;margin-top: 7rpx;">现居住地{{item.currentResidentialAddress}}</view>
</view>
</scroll-view>
<view class="button-area">
<view class="btn" @click="closeshowPersonChooser">取消</view>
<view class="btn reset" @click="resetData">重置</view>
<view class="btn save" @click="saveInfo">确定</view>
</view>
</view>
</uni-popup>
</view>
</template>
<script>
import {
getPersonList
} from '@/packageRc/apiRc/needs/person'
export default {
data() {
return {
showPersonChooser: false,
activePerson: {},
searchPerson: '',
personList: [],
searcher: '',
}
},
mounted() {
this.doSearch()
},
methods: {
open() {
this.$refs.showPersonChooser.open();
this.activePerson = {}
},
saveInfo() {
this.$emit('confirm', this.activePerson)
this.$refs.showPersonChooser.close()
},
searchChange() {
if (this.searcher) {
clearTimeout(this.searcher)
this.doSearch()
} else {
this.doSearch()
}
},
doSearch() {
this.searcher = setTimeout(() => {
getPersonList({
name: this.searchPerson,
pageSize: 100,
pageNum: 1
}).then(res => {
this.personList = res.rows
clearTimeout(this.searcher)
})
}, 200)
},
resetData(){
this.searchPerson = '';
this.personList = [];
this.activePerson = {}
},
bindPerson(item) {
this.activePerson = item;
this.$forceUpdate();
},
}
}
</script>
<style lang="scss" scoped>
.person-list {
padding: 24rpx 32rpx;
border-radius: 8rpx;
box-sizing: border-box;
border: 1px solid #e4e4e4;
margin-top: 32rpx;
&.active {
border: 1px solid #1890ff;
}
}
.button-area {
box-shadow: 0 0 10rpx rgba(0, 0, 0, 0.1);
padding: 24rpx 32rpx 68rpx;
width: calc(100% + 64rpx);
margin-left: -32rpx;
background: #fff;
display: flex;
box-sizing: border-box;
margin-top: 40rpx;
border-radius: 16px 16px 0px 0px;
.btn {
line-height: 72rpx;
width: 176rpx;
margin-right: 16rpx;
font-size: 28rpx;
border: 1px solid #B8C5D4;
color: #282828;
text-align: center;
border-radius: 8rpx;
}
.reset {
background: #DCE2E9;
}
.save {
background: linear-gradient(103deg, #1D64CF 0%, #1590D4 99%);
color: #fff;
border: 0;
flex-grow: 1;
}
}
</style>

View File

@@ -0,0 +1,573 @@
<!--
* @Date: 2024-10-08 14:29:36
* @LastEditors: shirlwang
* @LastEditTime: 2025-11-06 12:14:22
-->
<template>
<view class="input-outer-part">
<scroll-view scroll-y="true" :style="{height: edit?'calc(100vh - 380rpx)':'calc(100vh - 194rpx)'}">
<view class="inner">
<view class="part-title" style="display: flex;justify-content: space-between;">创业需求信息
<view v-if="!edit&&formData.id&&formData.currentStatus!=3" class="btn"
style="font-weight: normal;display: flex;" @click="edit=true">编辑<u-icon name="edit-pen"
color="#A6A6A6"></u-icon></view>
</view>
<view class="inner-part">
<uni-forms labelPosition="right" :model="formData" :rules="rules" ref="uForm" class="self-form"
labelWidth="150rpx">
<uni-forms-item label="姓名" name="personName" required
v-if="$store.getters.roles.includes('shequn'|| $store.getters.roles.includes('gly'))"
>
<view class="input-area" style="width: 100%;" @click="openPersonChooser"
:class="{disabledLine: !edit||!canChoosePerson, noValue: !formData.personName}">
{{ formData.personName || '请选择' }}
</view>
<!-- <u-icon slot="right" name="edit-pen" color="#A6A6A6"></u-icon> -->
</uni-forms-item>
<!--
<uni-forms-item label="服务需求标题" name="serviceRequirementTitle" required>
<u--textarea :disabled="!edit" v-model="formData.serviceRequirementTitle"
placeholder="请输入"></u--textarea>
<u-icon slot="right" name="edit-pen" color="#A6A6A6"></u-icon>
</uni-forms-item> -->
<uni-forms-item label="有无场地需求" name="ywcdxq" required>
<!-- <radio-group :disabled="!edit" :value="formData.ywcdxq" placement="row">
<radio :customStyle="{marginRight: '16px'}" label="是" value="是"></radio>
<radio :customStyle="{marginRight: '16px'}" label="否" value="否"></radio>
</radio-group> -->
<view class="radio-group">
<view class="radio-item"
:class="!edit ? 'radio-disabled' : ''"
@click="edit ? formData.ywcdxq = '是': ''"
v-if="edit">
<view :class="['radio', { 'radio-checked': formData.ywcdxq === '是' }]"></view>
<text></text>
</view>
<view class="radio-item"
:class="!edit ? 'radio-disabled' : ''"
@click="edit ? formData.ywcdxq = '否': ''"
v-if="edit">
<view :class="['radio', { 'radio-checked': formData.ywcdxq === '否' }]"></view>
<text></text>
</view>
<view v-else>{{ formData.ywcdxq }}</view>
</view>
</uni-forms-item>
<uni-forms-item label="场地面积" name="cdmj">
<input class="input-area" :disabled="!edit" v-model="formData.cdmj" border="none"
placeholder="请输入"/>
<!-- <u-icon slot="right" name="edit-pen" color="#A6A6A6"></u-icon> -->
</uni-forms-item>
<uni-forms-item label="办公人数" name="bgrs">
<input class="input-area" :disabled="!edit" v-model="formData.bgrs" border="none"
placeholder="请输入"/>
<!-- <u-icon slot="right" name="edit-pen" color="#A6A6A6"></u-icon> -->
</uni-forms-item>
<uni-forms-item label="办公位置" name="bgdd">
<input class="input-area" :disabled="!edit" v-model="formData.bgdd" border="none"
placeholder="请输入"/>
<!-- <u-icon slot="right" name="edit-pen" color="#A6A6A6"></u-icon> -->
</uni-forms-item>
<uni-forms-item label="有无创业培训需求" name="ywcypxxq" required>
<!-- <radio-group :disabled="!edit" :value="formData.ywcypxxq"
placement="row">
<radio :customStyle="{marginRight: '16px'}" label="是" value="是"></radio>
<radio :customStyle="{marginRight: '16px'}" label="否" value="否"></radio>
</radio-group> -->
<view class="radio-group">
<view class="radio-item"
:class="!edit ? 'radio-disabled' : ''"
@click="edit ? formData.ywcypxxq = '是' : ''"
v-if="edit">
<view :class="['radio', { 'radio-checked': formData.ywcypxxq === '是' }]"></view>
<text></text>
</view>
<view class="radio-item"
:class="!edit ? 'radio-disabled' : ''"
@click="edit ? formData.ywcypxxq = '否' : ''"
v-if="edit">
<view :class="['radio', { 'radio-checked': formData.ywcypxxq === '否' }]"></view>
<text></text>
</view>
<view v-else>{{ formData.ywcypxxq }}</view>
</view>
</uni-forms-item>
<!-- <uni-forms-item label="是否意向接受创业培训" name="isInterestedEntrepreneurshipGuidance" required>-->
<!-- <radio-group :disabled="!edit" v-model="formData.isInterestedEntrepreneurshipGuidance"-->
<!-- placement="row">-->
<!-- <radio :customStyle="{marginRight: '16px'}" label="是" name="是"></radio>-->
<!-- <radio :customStyle="{marginRight: '16px'}" label="否" name="否"></radio>-->
<!-- </radio-group>-->
<!-- </uni-forms-item>-->
<uni-forms-item label="有无资金需求" name="ywzjxq" required>
<!-- <radio-group :disabled="!edit" :value="formData.ywzjxq" placement="row">
<radio :customStyle="{marginRight: '16px'}" label="是" value="是">是</radio>
<radio :customStyle="{marginRight: '16px'}" label="否" value="否">否</radio>
</radio-group> -->
<view class="radio-group">
<view class="radio-item"
:class="!edit ? 'radio-disabled' : ''"
@click="edit ? formData.ywzjxq = '是' : ''"
v-if="edit">
<view :class="['radio', { 'radio-checked': formData.ywzjxq === '是' }]"></view>
<text>是</text>
</view>
<view class="radio-item"
:class="!edit ? 'radio-disabled' : ''"
@click="edit ? formData.ywzjxq = '否' : ''"
v-if="edit">
<view :class="['radio', { 'radio-checked': formData.ywzjxq === '否' }]"></view>
<text>否</text>
</view>
<view v-else>{{ formData.ywzjxq }}</view>
</view>
</uni-forms-item>
<uni-forms-item label="需求说明" name="jobDescription" required>
<textarea style="width: 100%;box-sizing: border-box;" class="textarea" :disabled="!edit" v-model="formData.jobDescription" placeholder="请输入"></textarea>
</uni-forms-item>
<!-- <uni-forms-item label="希望解决日期" name="hopeSolveDate" required>
<view style="width: 100%;" @click="showPicker('hopeSolveDate')"
:class="{disabledLine: !edit, noValue: !formData.hopeSolveDate}">
{{ formData.hopeSolveDate||'请选择' }}
</view>
<u-icon slot="right" name="arrow-down" color="#A6A6A6"></u-icon>
</uni-forms-item> -->
</uni-forms>
</view>
</view>
<!-- <view class="inner" style="margin-top: 32rpx;">-->
<!-- <view class="inner-part">-->
<!-- <u&#45;&#45;form labelPosition="left" class="self-form" labelWidth="110">-->
<!-- <uni-forms-item label="需求说明" name="qtxqsm">-->
<!-- <textarea :disabled="!edit" v-model="formData.qtxqsm" placeholder="请输入"></textarea>-->
<!-- </uni-forms-item>-->
<!-- </u&#45;&#45;form>-->
<!-- </view>-->
<!-- </view>-->
<!-- <view class="inner">
<view class="part-title" style="margin-top: 32rpx;">附件信息</view>
<view class="inner-part">
<uni-forms labelPosition="left" class="self-form" labelWidth="110">
<uni-forms-item label="附件" name="fileUrl">
<ImageUpload :fileList="fileList" @update="changeFile" :maxCount="6" />
</uni-forms-item>
</uni-forms>
</view>
</view> -->
<!-- 办理完成后 需求说明 -->
<req-comp :form="{
actualSolveDate: formData.actualSolveDate,
actualSolvePeople: formData.actualSolvePeople,
solveDesc: formData.solveDesc,
fileUrl: formData.fileUrl
}" />
</scroll-view>
<u-datetime-picker :show="show.hopeSolveDate" v-model="dates.hopeSolveDate" mode="date"
@confirm="confirmDate('hopeSolveDate', $event)" @cancel="cancelPicker('hopeSolveDate')"></u-datetime-picker>
<choose-person ref="personChooser" @confirm="personNameConfirm" />
<view class="button-area" v-if="edit">
<view class="btn" @click="cancelPage">取消</view>
<view class="btn reset" @click="getPersonInfo()">重置</view>
<view class="btn save" @click="saveInfo">保存</view>
</view>
</view>
</template>
<script>
import {
getPersonBase
} from "@/packageRc/apiRc/person";
import {
addPersonDemand,
updatePersonDemand,
getPersonDemand
} from "@/packageRc/apiRc/needs/personDemand";
import ImageUpload from '/packageRc/components/ImageUpload'
import ChoosePerson from '/packageRc/pages/needs/components/choosePerson';
import dayjs from "dayjs";
export default {
components: {
ChoosePerson,
ImageUpload
},
props: {
needId: {
type: String,
default: ''
},
name: {
type: String,
default: ''
}
},
data() {
return {
fileList: [],
edit: true,
personBase: {},
dates: {},
formData: {
jobDescription:"",
demandType:"2",
personName: '',
personId:"",
userId:"",
serviceRequirementTitle: '',
isAcceptAssistance: '',
isAcceptApprovalResult: '',
},
rules: {
ywcdxq: [{
required: true,
message: '请选择有无场地需求',
trigger: ['blur', 'change'],
}, ],
ywcypxxq: [{
required: true,
message: '请选择有无创业培训需求',
trigger: ['blur', 'change'],
}, ],
isInterestedEntrepreneurshipGuidance: [{
required: true,
message: '请选择是否意向接受创业培训',
trigger: ['blur', 'change'],
}, ],
ywzjxq: [{
required: true,
message: '请选择有无资金需求',
trigger: ['blur', 'change'],
}, ],
},
dict: {},
show: {},
currentCityArr: [],
originalDept: [],
currentCity: '请选择',
bysj: '',
loading: false,
jobTypeList: [],
route: {},
canChoosePerson: false,
}
},
onReady() {
this.$refs.uForm.setRules(this.rules);
},
async created() {
this.loading = true;
// await this.$delay(600)
// this.setDefaultValues()
// setTimeout(() => {
// this.setName()
// }, 0);
},
methods: {
cancelPage() {
if (this.formData.id) {
this.edit = false;
this.getDetail(this.formData.id)
} else {
uni.navigateBack()
}
},
// setName(){
// this.formData.personName = this.name
// this.formData.personId = this.needId
// this.formData.userId = this.needId
// this.$forceUpdate();
// },
openPersonChooser() {
if (this.edit && this.canChoosePerson) {
this.$refs.personChooser.open();
}
},
personNameConfirm(event) {
this.formData.personName = event.name
this.formData.personId = event.id
this.formData.userId = event.userId
this.formNameChange();
this.$forceUpdate();
},
changeFile(e) {
// 清空当前的 fileUrl 数组
this.formData.fileUrl = [];
// 如果 e 有长度(即用户选择了文件)
if (e.length) {
// 遍历每个文件对象并获取其 url
for (let data of e) {
const url = data.data ? data.data.url : data.url;
this.formData.fileUrl.push(url);
}
}
this.formData.fileUrl = this.$arrayToString(this.formData.fileUrl)
},
addOne(userId) {
this.formData = {}
this.setDefaultValues()
this.getPersonInfo()
if(this.name){
this.formData.personName = this.name
this.formData.userId = userId
}
this.edit = true
},
getDetail(id) {
getPersonDemand(id).then(res => {
this.formData = res.data;
this.edit = false
this.fileList = this.$processFileUrl(this.formData.fileUrl)
})
},
confirmDate(type, e) {
this.show[type] = false;
let date = new Date(e.value)
this.formData[type] =
`${date.getFullYear()}-${(date.getMonth()+1)>9?(date.getMonth()+1):('0'+(date.getMonth()+1))}-${date.getDate()>9?date.getDate():('0'+date.getDate())}`
this.$forceUpdate();
},
goBack() {
uni.navigateBack();
},
cancelPicker(type) {
this.show[type] = false
this.$forceUpdate();
},
getDictLabel(value, list) {
if (list) {
let arr = list.filter(ele => ele.dictValue == value)
if (arr.length) {
return arr[0].dictLabel
} else {
return '请选择'
}
}
},
pickerConfirm(type, event) {
this.show[type] = false
this.formData[type] = event.value[0].dictValue
this.$forceUpdate();
},
showPicker(type) {
if (this.edit) {
this.show[type] = true
this.$forceUpdate()
}
},
getPersonInfo() {
this.loading = true;
this.$store.dispatch("GetInfo").then((res) => {
if (res.data.roles.indexOf('qunzhong') == -1) {
this.canChoosePerson = true;
} else {
this.canChoosePerson = false;
getPersonBase(res.data.user.userId).then(resp => {
this.formData.personId = resp.data.id
this.formData.userId = resp.data.userId
this.formData.personName = resp.data.name
this.formNameChange();
this.$forceUpdate();
})
}
})
},
formNameChange() {
let date = new Date()
// let day =
// `${date.getFullYear()}-${(date.getMonth()+1) + 1 > 9 ? (date.getMonth()+1) + 1: '0'+((date.getMonth()+1) + 1)}-${date.getDate() > 9 ? date.getDate(): '0'+date.getDate()}`
const dayNew = dayjs(date).format("YYYY-MM-DD");
this.formData.serviceRequirementTitle = `${this.formData.personName}_于${dayNew}_提出创业需求`
},
async saveInfo() {
uni.showLoading()
try {
if (!this.formData.jobDescription || this.formData.jobDescription.trim() === '') {
uni.showToast({title: '请填写需求说明!', icon: 'none'});
return;
}
// 验证表单
const isValid = await this.$refs.uForm.validate();
if (!isValid) {
throw new Error('请检查必填项填写');
}
// 显示全局加载
// 根据 formData 是否有 id 来决定是更新还是新增
let response;
this.formData.demandType = 2;
let successMessage;
if (this.formData.id) {
updatePersonDemand(this.formData).then(response => {
uni.showToast({title: '修改成功', icon: 'none'});
if (response.code == 200) {
// 如果是编辑模式,关闭编辑状态;否则返回上一页
if (this.formData.id) {
this.edit = false;
} else {
setTimeout(() => {
uni.navigateBack();
}, 2000);
}
}
})
} else {
addPersonDemand(this.formData).then(response => {
uni.showToast({title: '保存成功', icon: 'none'});
if (response.code == 200) {
// 如果是编辑模式,关闭编辑状态;否则返回上一页
if (this.formData.id) {
this.edit = false;
} else {
setTimeout(() => {
uni.navigateBack();
}, 2000);
}
}
})
}
} catch (error) {
if(error.length){
uni.showToast({title: '请填写完整信息!', icon: 'none'});
}else{
uni.showToast({title: '系统错误,请联系管理员!', icon: 'none'});
}
} finally {
// 确保加载页总是会被隐藏
uni.hideLoading();
}
},
// 设置默认选中
setDefaultValues(){
this.$set(this.formData, 'ywcdxq', '是')
this.$set(this.formData, 'ywcypxxq', '是')
this.$set(this.formData, 'isInterestedEntrepreneurshipGuidance', '是')
this.$set(this.formData, 'ywzjxq', '是')
}
// saveInfo() {
// this.$refs.uForm.validate().then(res => {
// if (this.formData.id) {
// updateEntrepreneurshipService(this.formData).then(res => {
// if (res.code == 200) {
// uni.showToast({
// title: '修改成功'
// })
// this.edit = false;
// }
// })
// } else {
// addEntrepreneurshipService(this.formData).then(res => {
// if (res.code == 200) {
// uni.showToast({
// title: '保存成功'
// })
// uni.navigateBack();
// }
// })
// }
// }).catch(() => {
// uni.showToast({
// title: '请检查必填项填写',
// icon: 'none'
// })
// })
// }
}
}
</script>
<style lang="scss">
.noValue {
color: rgb(192, 196, 204);
}
/* 单选框样式 */
.radio-group {
flex: 1;
display: flex;
align-items: center;
}
.radio-item {
display: flex;
align-items: center;
margin-right: 32rpx;
cursor: pointer;
}
.radio-item.radio-disabled {
cursor: not-allowed;
}
.radio {
width: 28rpx;
height: 28rpx;
border-radius: 50%;
border: 2rpx solid #dcdfe6;
margin-right: 12rpx;
position: relative;
}
.radio.radio-checked {
border-color: #409eff;
background-color: #409eff;
}
.radio.radio-checked::after {
content: '';
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
width: 12rpx;
height: 12rpx;
border-radius: 50%;
background-color: #fff;
}
.input-area{
padding: 0 24rpx;
height: 64rpx;
display: flex;
align-items: center;
border: 1px solid #e4e4e4;
border-radius: 8rpx;
box-sizing: border-box;
// &input{
// }
}
textarea{
box-sizing: border-box;
border: 1px solid #e4e4e4;
border-radius: 8rpx;
font-size: 26rpx;
padding: 12rpx;
}
.picker-view {
display: flex;
align-items: center;
justify-content: space-between;
// width: 100%;
padding: 0 24rpx;
height: 64rpx;
display: flex;
align-items: center;
background: #ffffff;
border: 2rpx solid #e5e5e5;
border-radius: 12rpx;
box-sizing: border-box;
transition: all 0.3s ease;
}
.disabledLine {
background: rgb(245, 247, 250);
cursor: not-allowed;
}
</style>

View File

@@ -0,0 +1,748 @@
<!--
* @Date: 2024-10-08 14:29:36
* @LastEditors: shirlwang
* @LastEditTime: 2025-11-06 12:09:01
-->
<template>
<view class="input-outer-part">
<scroll-view scroll-y="true" :style="{height: edit?'calc(100vh - 380rpx)':'calc(100vh - 194rpx)'}">
<view class="inner">
<view class="part-title" style="display: flex;justify-content: space-between;">求职需求信息
<view v-if="!edit&&formData.id&&formData.currentStatus!=3" class="btn"
style="font-weight: normal;display: flex;" @click="edit=true">编辑</view>
</view>
<view class="inner-part">
<uni-forms labelPosition="right" :model="formData" :rules="rules" ref="uForm" class="self-form" label-width="150rpx">
<!-- v-if="$store.getters.roles.includes('shequn') || $store.getters.roles.includes('gly')" -->
<uni-forms-item label="姓名" name="personName" required>
<view v-if="name" style="width: calc(100% - 150rpx);overflow: hidden;text-overflow: ellipsis;white-space: nowrap;box-sizing: border-box;"
class="input-area disabledLine">
{{ formData.personName || '请选择' }}
</view>
<view class="input-area" v-else @click="openPersonChooser" style="width: calc(100% - 150rpx);overflow: hidden;text-overflow: ellipsis;white-space: nowrap;box-sizing: border-box;"
:class="{disabledLine: !edit||!canChoosePerson, noValue: !formData.personName}">
{{ formData.personName || '请选择' }}
</view>
</uni-forms-item>
<uni-forms-item label="求职工种" name="jobWorkType">
<picker
mode="multiSelector"
:range="workTypeColumns"
range-key="workTypeName"
:value="workTypeIndexes"
@change="onWorkTypePickerChange"
@columnchange="onWorkTypeColumnChange"
v-if="workTypeColumns[0] && workTypeColumns[0].length"
>
<view class="picker-view">
<text>{{ formData.jobWorkTypeName || '请选择工种' }}</text>
</view>
</picker>
<view v-else class="picker-view">
<text>工种数据加载中...</text>
</view>
</uni-forms-item>
<uni-forms-item label="最低薪酬" name="minRecruitmentSalary" required>
<input class="input-area" :disabled="!edit" v-model="formData.minRecruitmentSalary" border="none"
placeholder="请输入"/>
</uni-forms-item>
<uni-forms-item label="最高薪酬" name="highRecruitmentSalary" required>
<input class="input-area" :disabled="!edit" v-model="formData.highRecruitmentSalary" border="none"
placeholder="请输入"/>
</uni-forms-item>
<uni-forms-item label="希望工作地点" name="addressDesc">
<view class="df_flex df_flex_1">
<input placeholder="请输入" border="none" v-model="formData.addressDesc"
class="ellipsis_1 input-area" @focus="$refs.placePicker.openDialog()"/>
</view>
</uni-forms-item>
<uni-forms labelPosition="left" class="self-form" labelWidth="110" >
<uni-forms-item label="求职说明" name="jobDescription" required >
<textarea style="width: 100%;box-sizing: border-box;" class="textarea" :disabled="!edit" v-model="formData.jobDescription"
placeholder="请输入" ></textarea>
</uni-forms-item>
</uni-forms>
</uni-forms>
</view>
</view>
<!-- 办理完成后 需求说明 -->
<req-comp :form="{
actualSolveDate: formData.actualSolveDate,
actualSolvePeople: formData.actualSolvePeople,
solveDesc: formData.solveDesc,
fileUrl: formData.fileUrl
}" />
<!-- <view class="inner">
<view class="part-title" style="margin-top: 32rpx;">附件信息</view>
<view class="inner-part">
<u--form labelPosition="left" class="self-form" labelWidth="110">
<uni-forms-item label="附件" name="fileUrl">
<ImageUpload :fileList="fileList" @update="changeFile" :maxCount="6" />
</uni-forms-item>
</u--form>
</view>
</view> -->
</scroll-view>
<view class="button-area" v-if="edit">
<view class="btn" @click="cancelPage">取消</view>
<view class="btn reset" @click="getDetail(formData.id)">重置</view>
<view class="btn save" @click="saveInfo">保存</view>
</view>
<choose-person ref="personChooser" @confirm="personNameConfirm" />
<PlacePicker ref="placePicker" @selected="handleSelected" />
</view>
</template>
<script>
import {
getPersonBase
} from "@/packageRc/apiRc/person";
import {
addPersonDemand,
updatePersonDemand,
getPersonDemand
} from "@/packageRc/apiRc/needs/personDemand";
import {
listJobType
} from "@/packageRc/apiRc/jobType/index";
import ImageUpload from '/packageRc/components/ImageUpload'
import ChoosePerson from '/packageRc/pages/needs/components/choosePerson';
import PlacePicker from "/packageRc/components/placePicker";
export default {
components: {
ChoosePerson,
ImageUpload,
PlacePicker,
},
props: {
needId: {
type: String,
default: ''
},
name: {
type: String,
default: ''
}
},
data() {
return {
edit: true,
personBase: {},
dates: {},
currentCommunityId: '',
showPickerPicker: false,
formData: {
demandType:"1",
personName: '',
personId:"",
userId:"",
jobWorkType: '',
jobWorkTypeName: '',
selectedWorkType: '',
selectedWorkTypeName: '',
highRecruitmentSalary: '',
minRecruitmentSalary: '',
employmentType: '',
currentCommunity: '',
addressDesc: '',
jobDescription: '',
// fileUrl: []
},
rules: {
personName: [{
required: true,
message: '请填写姓名',
trigger: ['blur', 'change'],
}],
jobWorkType: [{
required: true,
message: '请选择求职工种',
trigger: ['blur', 'change'],
validator: (rule, value) => {
return (Array.isArray(value) && value.length > 0) || (!!value);
}
}],
highRecruitmentSalary: [{
required: true,
message: '请选择最高薪酬',
trigger: ['blur', 'change'],
}, ],
minRecruitmentSalary: [{
required: true,
message: '请选择最低薪酬',
trigger: ['blur', 'change'],
}, ],
jobDescription: [{
required: true,
message: '请填写求职说明',
trigger: ['blur', 'change'],
}, ]
// employmentType: [{
// required: true,
// message: '请选择用工形式',
// trigger: ['blur', 'change'],
// }, ],
// addressDesc: [{
// required: true,
// message: '请选择希望工作地点',
// trigger: ['blur', 'change'],
// }, ],
},
dict: {
emplymentYear: [],
salaryType: [],
highRecruitmentSalary: [],
minRecruitmentSalary: [],
unitNature: [],
employmentWillingness: []
},
show: {
hopeSolveDate: false,
jobWorkType: false,
emplymentYear: false,
salaryType: false,
highRecruitmentSalary: false,
minRecruitmentSalary: false,
unitNature: false,
employmentType: false,
employmentWillingness: false
},
currentCity: '请选择',
bysj: '',
loading: false,
jobTypeList: [],
route: {},
canChoosePerson: false,
fileList: [],
workTypeList: [],
workTypeColumns: [[], [], []],
workTypeIndexes: [0, 0, 0],
}
},
onReady() {
this.$refs.uForm.setRules(this.rules)
},
created() {
this.loading = true;
let arr = [{
key: 'qcjy_gznx',
prop: 'emplymentYear'
},
{
key: 'qcjy_gzlx',
prop: 'salaryType'
},
{
key: 'qcjy_zgzpgz',
prop: 'highRecruitmentSalary'
},
{
key: 'qcjy_zgzpgz',
prop: 'minRecruitmentSalary'
},
{
key: 'qcjy_dwxz',
prop: 'unitNature'
},
// {
// key: 'qcjy_ygxs',
// prop: 'employmentType'
// },
{
key: 'qcjt_jyyy',
prop: 'employmentWillingness'
},
]
// 使用 Promise.all 确保所有字典数据加载完成
Promise.all(arr.map(ele => this.getDicts(ele.key)))
.then(responses => {
responses.forEach((res, index) => {
this.dict[arr[index].prop] = res.data || [];
});
this.loading = false;
})
.catch(error => {
console.error('加载字典数据失败:', error);
// 设置默认空数组
arr.forEach(ele => {
this.dict[ele.prop] = [];
});
this.loading = false;
});
this.workTypeRemoteMethod('');
},
methods: {
// 获取字典数据
getDicts(dictType) {
return new Promise((resolve, reject) => {
// 这里应该调用实际的API暂时返回空数组
// 如果需要真实的API调用请替换下面的代码
setTimeout(() => {
resolve({ data: [] });
}, 100);
});
},
cancelPage() {
if (this.formData.id) {
this.edit = false;
this.getDetail(this.formData.id)
} else {
uni.navigateBack()
}
},
openPersonChooser() {
if (this.edit && this.canChoosePerson) {
this.$refs.personChooser.open();
}
},
setName(){
this.formData.personName = this.name
this.formData.personId = this.needId
this.formData.userId = this.needId
},
personNameConfirm(event) {
this.formData.personName = event.name
this.formData.personId = event.id
this.formData.userId = event.userId
},
changeFile(e) {
// 清空当前的 fileUrl 数组
this.formData.fileUrl = [];
// 如果 e 有长度(即用户选择了文件)
if (e.length) {
// 遍历每个文件对象并获取其 url
for (let data of e) {
const url = data.data ? data.data.url : data.url;
this.formData.fileUrl.push(url);
}
}
this.formData.fileUrl = this.$arrayToString(this.formData.fileUrl)
},
addOne(userId) {
this.formData = {}
this.getPersonInfo()
if(this.name){
this.formData.personName = this.name
this.formData.userId = userId
}
this.edit = true
},
getDetail(id) {
getPersonDemand(id).then(res => {
this.formData = res.data;
// 设置工种索引(需要等工种数据加载完成后)
if (this.formData.jobWorkType && this.workTypeColumns[0].length) {
this.setWorkTypeIndexes(this.formData.jobWorkType);
}
this.currentCommunityId = +res.data.currentCommunity
this.formData.currentCommunity = res.data.currentCommunity
this.edit = false;
this.fileList = this.$processFileUrl(this.formData.fileUrl)
}).catch(error => {
console.error('Error fetching job detail:', error);
});
},
confirmDate(type, e) {
this.show[type] = false;
let date = new Date(e.value)
this.formData[type] =
`${date.getFullYear()}-${(date.getMonth()+1)>9?(date.getMonth()+1):('0'+(date.getMonth()+1))}-${date.getDate()>9?date.getDate():('0'+date.getDate())}`
},
workTypeRemoteMethod(key) {
listJobType({
workTypeName: key,
pageNum: 1,
pageSize: 50
}).then(
(res) => {
console.log('工种数据加载成功:', res.rows);
this.jobTypeList = res.rows;
// 处理树形数据为级联选择器格式
this.processWorkTypeTree(res.rows);
}
).catch(error => {
console.error('获取工种列表失败:', error);
this.workTypeList = [];
this.workTypeColumns = [[], [], []];
});
},
goBack() {
uni.navigateBack();
},
cancelPicker(type) {
this.show[type] = false
},
getCityOptions(data) {
if (data && data[0] && data[0].children) {
return [data].concat(this.getCityOptions(data[0].children))
} else {
return [data]
}
},
getDictLabel(value, list) {
if (list && Array.isArray(list)) {
let arr = list.filter(ele => ele.dictValue == value)
if (arr.length) {
return arr[0].dictLabel || '请选择'
} else {
return '请选择'
}
}
return '请选择'
},
pickerConfirm(type, event) {
this.show[type] = false
this.formData[type] = event.value[0].dictValue
},
jobTypeConfirm(type, event) {
this.show[type] = false
this.formData[type] = event.value[0].id
this.formData.jobWorkTypeName = event.value[0].workTypeName
},
showPicker(type) {
if (this.edit) {
if(type === 'workTypeTree') {
if (!this.workTypeTreeColumns[0] || !this.workTypeTreeColumns[0].length) {
uni.showToast({title: '工种数据未加载,请稍后重试', icon: 'none'});
return;
}
// 弹窗打开时初始化临时columns和index
this.tempWorkTypeTreeColumns = JSON.parse(JSON.stringify(this.workTypeTreeColumns));
this.tempWorkTypeTreeIndex = [...this.workTypeTreeIndex];
}
this.show[type] = true;
}
},
getPersonInfo() {
this.loading = true;
this.$store.dispatch("GetInfo").then((res) => {
if (res.data.roles.indexOf('qunzhong') == -1) {
this.canChoosePerson = true;
} else {
this.canChoosePerson = false;
getPersonBase(res.data.user.userId).then(resp => {
this.formData.personId = resp.data.id
this.formData.userId = resp.data.userId
this.formData.personName = resp.data.name
})
}
})
},
async saveInfo() {
uni.showLoading();
try {
// 先检查求职说明是否为空,如果为空直接提示
if (!this.formData.jobDescription || this.formData.jobDescription.trim() === '') {
uni.showToast({title: '请填写求职说明!', icon: 'none'});
return;
}
// 验证表单
console.log(this.formData)
const isValid = await this.$refs.uForm.validate();
if (!isValid) {
throw new Error('表单验证失败');
}
// 显示全局加载
this.formData.demandType = 1;
// this.formData.userId = this.formData.personId
// 根据 formData 是否有 id 来决定是更新还是新增
let successMessage;
if (this.formData.id) {
updatePersonDemand(this.formData).then(response => {
uni.showToast({title: '修改成功', icon: 'none'});
if (response.code == 200) {
// 如果是编辑模式,关闭编辑状态;否则返回上一页
if (this.formData.id) {
this.edit = false;
} else {
setTimeout(() => {
uni.navigateBack();
}, 2000);
}
}
})
} else {
addPersonDemand(this.formData).then(response => {
uni.showToast({title: '保存成功', icon: 'none'});
if (response.code == 200) {
// 如果是编辑模式,关闭编辑状态;否则返回上一页
if (this.formData.id) {
this.edit = false;
} else {
setTimeout(() => {
uni.navigateBack();
}, 2000);
}
}
})
}
} catch (error) {
if(error.length){
uni.showToast({title: '请填写完整信息!', icon: 'none'});
}else{
uni.showToast({title: '系统错误,请联系管理员!', icon: 'none'});
}
// uni.showToast({title: '请检查必填项填写', icon: 'none'});
} finally {
// 确保加载页总是会被隐藏
uni.hideLoading();
}
},
popupclosed() {
this.showPickerPicker = false
},
onChange(e) {
const arr = e.detail.value
this.formData.currentCity = arr[0].value || "";
this.formData.currentArea = arr[1].value || "";
this.formData.currentStreet = arr[2].value || "";
this.formData.currentCommunity = arr[3].value + '' || "";
this.$forceUpdate();
},
// 接收地图数据
handleSelected(marker) {
this.$set(this.formData, "addressDesc", marker.address);
this.$set(this.formData, "latitude", marker.location.lat);
this.$set(this.formData, "longitude", marker.location.lng);
},
// 处理树形数据为级联选择器格式
processWorkTypeTree(treeData) {
if (!treeData || !Array.isArray(treeData)) {
this.workTypeColumns = [[], [], []];
return;
}
// 第一级
const level1 = treeData.filter(item => item.level === "1");
// 第二级
const level2 = treeData.filter(item => item.level === "2");
// 第三级
const level3 = treeData.filter(item => item.level === "3");
// 构建级联数据
const columns = [];
columns[0] = level1;
// 根据第一级选择,过滤第二级
if (level1.length > 0) {
const firstLevelId = level1[0].id;
columns[1] = level2.filter(item => item.parentId === firstLevelId);
} else {
columns[1] = [];
}
// 根据第二级选择,过滤第三级
if (columns[1].length > 0) {
const secondLevelId = columns[1][0].id;
columns[2] = level3.filter(item => item.parentId === secondLevelId);
} else {
columns[2] = [];
}
this.workTypeColumns = columns;
console.log('级联数据构建完成:', this.workTypeColumns);
},
// 级联选择器列变化事件
onWorkTypeColumnChange(e) {
const { column, value } = e.detail;
const newIndexes = [...this.workTypeIndexes];
newIndexes[column] = value;
// 重置后续列的数据
if (column === 0) {
// 第一列变化,重置第二、三列
const selectedLevel1 = this.workTypeColumns[0][value];
if (selectedLevel1) {
const level2 = this.jobTypeList.filter(item =>
item.level === "2" && item.parentId === selectedLevel1.id
);
this.workTypeColumns[1] = level2;
this.workTypeColumns[2] = [];
newIndexes[1] = 0;
newIndexes[2] = 0;
}
} else if (column === 1) {
// 第二列变化,重置第三列
const selectedLevel2 = this.workTypeColumns[1][value];
if (selectedLevel2) {
const level3 = this.jobTypeList.filter(item =>
item.level === "3" && item.parentId === selectedLevel2.id
);
this.workTypeColumns[2] = level3;
newIndexes[2] = 0;
}
}
this.workTypeIndexes = newIndexes;
},
// 级联选择器确认事件
onWorkTypePickerChange(e) {
const indexes = e.detail.value;
const selectedLevel1 = this.workTypeColumns[0][indexes[0]];
const selectedLevel2 = this.workTypeColumns[1][indexes[1]];
const selectedLevel3 = this.workTypeColumns[2][indexes[2]];
if (selectedLevel3) {
// 选择第三级
this.formData.jobWorkType = selectedLevel3.id;
this.formData.jobWorkTypeName = `${selectedLevel1.workTypeName}/${selectedLevel2.workTypeName}/${selectedLevel3.workTypeName}`;
} else if (selectedLevel2) {
// 选择第二级
this.formData.jobWorkType = selectedLevel2.id;
this.formData.jobWorkTypeName = `${selectedLevel1.workTypeName}/${selectedLevel2.workTypeName}`;
} else if (selectedLevel1) {
// 选择第一级
this.formData.jobWorkType = selectedLevel1.id;
this.formData.jobWorkTypeName = selectedLevel1.workTypeName;
}
this.workTypeIndexes = indexes;
},
// 根据工种ID设置索引
setWorkTypeIndexes(workTypeId) {
// 在工种列表中查找对应的工种
const targetWorkType = this.jobTypeList.find(item => item.id == workTypeId);
if (!targetWorkType) return;
// 根据level确定是哪一级
if (targetWorkType.level === "1") {
const index = this.workTypeColumns[0].findIndex(item => item.id == workTypeId);
if (index !== -1) {
this.workTypeIndexes = [index, 0, 0];
}
} else if (targetWorkType.level === "2") {
// 需要先找到父级
const parent = this.jobTypeList.find(item => item.id == targetWorkType.parentId);
if (parent) {
const parentIndex = this.workTypeColumns[0].findIndex(item => item.id == parent.id);
const childIndex = this.workTypeColumns[1].findIndex(item => item.id == workTypeId);
if (parentIndex !== -1 && childIndex !== -1) {
this.workTypeIndexes = [parentIndex, childIndex, 0];
}
}
} else if (targetWorkType.level === "3") {
// 需要找到祖父级和父级
const parent = this.jobTypeList.find(item => item.id == targetWorkType.parentId);
const grandparent = this.jobTypeList.find(item => item.id == parent.parentId);
if (parent && grandparent) {
const grandparentIndex = this.workTypeColumns[0].findIndex(item => item.id == grandparent.id);
const parentIndex = this.workTypeColumns[1].findIndex(item => item.id == parent.id);
const childIndex = this.workTypeColumns[2].findIndex(item => item.id == workTypeId);
if (grandparentIndex !== -1 && parentIndex !== -1 && childIndex !== -1) {
this.workTypeIndexes = [grandparentIndex, parentIndex, childIndex];
}
}
}
}
}
}
</script>
<style lang="scss">
/* 为表单元素添加一些间距 */
.self-form {
width: 100%;
}
.noValue {
font-size: 28rpx;
color: #333;
}
.disabledLine {
background: rgb(245, 247, 250);
cursor: not-allowed;
}
.input-area{
padding: 0 24rpx;
height: 64rpx;
display: flex;
align-items: center;
border: 1px solid #e4e4e4;
border-radius: 8rpx;
box-sizing: border-box;
// &input{
// }
}
textarea{
box-sizing: border-box;
border: 1px solid #e4e4e4;
border-radius: 8rpx;
font-size: 26rpx;
padding: 12rpx;
}
.picker-view {
display: flex;
align-items: center;
justify-content: space-between;
// width: 100%;
padding: 0 24rpx;
height: 64rpx;
display: flex;
align-items: center;
background: #ffffff;
border: 2rpx solid #e5e5e5;
border-radius: 12rpx;
box-sizing: border-box;
transition: all 0.3s ease;
}
.picker-view:active {
background: #f8f9fa;
border-color: #007aff;
}
.picker-view text {
color: #333333;
font-size: 28rpx;
flex: 1;
}
.picker-view .u-icon {
margin-left: 16rpx;
color: #999999;
}
::v-deep .u-textarea{
background-color: red !important;
border-radius: 12rpx;
border: 2rpx solid red;
}
</style>

View File

@@ -0,0 +1,383 @@
<!--
* @Date: 2024-10-08 14:29:36
* @LastEditors: shirlwang
* @LastEditTime: 2025-11-06 12:09:11
-->
<template>
<view class="input-outer-part">
<scroll-view scroll-y="true" :style="{height: edit?'calc(100vh - 380rpx)':'calc(100vh - 194rpx)'}">
<view class="inner">
<view class="part-title" style="display: flex;justify-content: space-between;">需求信息
<view v-if="!edit&&formData.id&&formData.currentStatus!=3" class="btn"
style="font-weight: normal;display: flex;" @click="edit=true">编辑<u-icon name="edit-pen"
color="#A6A6A6"></u-icon></view>
</view>
<view class="inner-part">
<uni-forms labelPosition="right" :model="formData" :rules="rules" ref="uForm" class="self-form"
labelWidth="150rpx">
<uni-forms-item label="姓名" prop="personName" required
v-if="$store.getters.roles.includes('shequn')|| $store.getters.roles.includes('gly')">
<view class="input-area" style="width: 100%;" @click="openPersonChooser"
:class="{disabledLine: !edit||!canChoosePerson, noValue: !formData.personName}">
{{ formData.personName || '请选择' }}
</view>
<u-icon slot="right" name="edit-pen" color="#A6A6A6"></u-icon>
</uni-forms-item>
<uni-forms-item label="需求说明" prop="jobDescription" required>
<textarea style="width: 100%;box-sizing: border-box;" class="textarea" :disabled="!edit" v-model="formData.jobDescription" placeholder="请输入"></textarea>
</uni-forms-item>
</uni-forms>
</view>
</view>
<!-- 办理完成后 需求说明 -->
<req-comp :form="{
actualSolveDate: formData.actualSolveDate,
actualSolvePeople: formData.actualSolvePeople,
solveDesc: formData.solveDesc,
fileUrl: formData.fileUrl
}" />
</scroll-view>
<u-datetime-picker :show="show.hopeSolveDate" v-model="dates.hopeSolveDate" mode="date"
@confirm="confirmDate('hopeSolveDate', $event)" @cancel="cancelPicker('hopeSolveDate')"></u-datetime-picker>
<choose-person ref="personChooser" @confirm="personNameConfirm" />
<view class="button-area" v-if="edit">
<view class="btn" @click="cancelPage">取消</view>
<view class="btn reset" @click="getDetail(formData.id)">重置</view>
<view class="btn save" @click="saveInfo">保存</view>
</view>
</view>
</template>
<script>
import {
getPersonBase
} from "@/packageRc/apiRc/person";
import {
addPersonDemand,
updatePersonDemand,
getPersonDemand
} from "@/packageRc/apiRc/needs/personDemand";
import ImageUpload from '/packageRc/components/ImageUpload'
import ChoosePerson from '/packageRc/pages/needs/components/choosePerson';
import {
listJobType
} from "@/packageRc/apiRc/jobType/index";
import dayjs from "dayjs";
export default {
components: {
ChoosePerson,
ImageUpload
},
props: {
needId: {
type: String,
default: ''
},
name: {
type: String,
default: ''
}
},
data() {
return {
fileList: [],
edit: true,
personBase: {},
dates: {},
formData: {
isAcceptAssistance: '',
isAcceptApprovalResult: '',
qtxqsm: ''
},
rules: {
personName: [{
required: true,
message: '请填写姓名',
trigger: ['blur', 'change'],
}, ],
qtxqsm: [{
required: true,
message: '请填写需求说明',
trigger: ['blur', 'change'],
}, ],
},
dict: {},
show: {},
currentCityArr: [],
originalDept: [],
currentCity: '请选择',
bysj: '',
loading: false,
jobTypeList: [],
route: {},
canChoosePerson: false,
}
},
onReady() {
this.$refs.uForm.setRules(this.rules)
},
created() {
this.loading = true;
},
methods: {
cancelPage() {
if (this.formData.id) {
this.edit = false;
this.getDetail(this.formData.id)
} else {
uni.navigateBack()
}
},
workTypeRemoteMethod(key) {
listJobType({
workTypeName: key,
pageNum: 1,
pageSize: 50
}).then(
(res) => {
this.jobTypeList = res.rows;
}
);
},
openPersonChooser() {
if (this.edit && this.canChoosePerson) {
this.$refs.personChooser.open();
}
},
personNameConfirm(event) {
this.formData.personName = event.name
this.formData.personId = event.id
this.formData.userId = event.userId
this.formNameChange();
this.$forceUpdate();
},
changeFile(e) {
// 清空当前的 fileUrl 数组
this.formData.fileUrl = [];
// 如果 e 有长度(即用户选择了文件)
if (e.length) {
// 遍历每个文件对象并获取其 url
for (let data of e) {
const url = data.data ? data.data.url : data.url;
this.formData.fileUrl.push(url);
}
}
this.formData.fileUrl = this.$arrayToString(this.formData.fileUrl)
},
addOne(userId) {
this.formData = {}
this.getPersonInfo()
if(this.name){
this.formData.personName = this.name
this.formData.userId = userId
}
this.edit = true
},
getDetail(id) {
getPersonDemand(id).then(res => {
this.formData = res.data;
this.edit = false
})
},
confirmDate(type, e) {
this.show[type] = false;
let date = new Date(e.value)
this.formData[type] =
`${date.getFullYear()}-${(date.getMonth()+1)>9?(date.getMonth()+1):('0'+(date.getMonth()+1))}-${date.getDate()>9?date.getDate():('0'+date.getDate())}`
this.$forceUpdate();
},
goBack() {
uni.navigateBack();
},
cancelPicker(type) {
this.show[type] = false
this.$forceUpdate();
},
getDictLabel(value, list) {
if (list) {
let arr = list.filter(ele => ele.dictValue == value)
if (arr.length) {
return arr[0].dictLabel
} else {
return '请选择'
}
}
},
pickerConfirm(type, event) {
this.show[type] = false
this.formData[type] = event.value[0].dictValue
this.$forceUpdate();
},
showPicker(type) {
if (this.edit) {
this.show[type] = true
this.$forceUpdate()
}
},
getPersonInfo() {
this.loading = true;
this.$store.dispatch("GetInfo").then((res) => {
if (res.data.roles.indexOf('qunzhong') == -1) {
this.canChoosePerson = true;
} else {
this.canChoosePerson = false;
getPersonBase(res.data.user.userId).then(resp => {
this.formData.personId = resp.data.id
this.formData.userId = resp.data.userId
this.formData.personName = resp.data.name
this.formNameChange();
this.$forceUpdate();
})
}
})
},
formNameChange() {
let date = new Date()
let day =
`${date.getFullYear()}-${(date.getMonth()+1) + 1 > 9 ? (date.getMonth()+1) + 1: '0'+((date.getMonth()+1) + 1)}-${date.getDate() > 9 ? date.getDate(): '0'+date.getDate()}`
const dayNew = dayjs(date).format("YYYY-MM-DD");
this.formData.demandTitle = `${this.formData.personName}_于${dayNew}_提出其他需求`
},
async saveInfo() {
uni.showLoading();
try {
// 验证表单
const isValid = await this.$refs.uForm.validate();
if (!isValid) {
throw new Error('请检查必填项填写');
}
// 显示全局加载
// 根据 formData 是否有 id 来决定是更新还是新增
let response;
let successMessage;
this.formData.demandType = 9;
// this.formData.userId = this.formData.personId
if (this.formData.id) {
updatePersonDemand(this.formData).then(response => {
uni.showToast({title: '修改成功', icon: 'none'});
if (response.code == 200) {
// 如果是编辑模式,关闭编辑状态;否则返回上一页
if (this.formData.id) {
this.edit = false;
} else {
setTimeout(() => {
uni.navigateBack();
}, 2000);
}
}
uni.hideLoading();
})
} else {
addPersonDemand(this.formData).then(response => {
uni.showToast({title: '保存成功', icon: 'none'});
if (response.code == 200) {
// 如果是编辑模式,关闭编辑状态;否则返回上一页
if (this.formData.id) {
this.edit = false;
} else {
setTimeout(() => {
uni.navigateBack();
}, 2000);
}
}
uni.hideLoading();
})
}
} catch (error) {
if(error.length){
this.$u.toast('请填写完整信息!');
}else{
this.$u.toast('系统错误,请联系管理员!');
}
} finally {
// 确保加载页总是会被隐藏
uni.hideLoading();
}
}
// saveInfo() {
// this.$refs.uForm.validate().then(res => {
// if (this.formData.id) {
// updatePersonDemand(this.formData).then(res => {
// if (res.code == 200) {
// uni.showToast({
// title: '修改成功'
// })
// this.edit = false;
// }
// })
// } else {
// addPersonDemand(this.formData).then(res => {
// if (res.code == 200) {
// uni.showToast({
// title: '保存成功'
// })
// uni.navigateBack();
// }
// })
// }
// }).catch(() => {
// uni.showToast({
// title: '请检查必填项填写',
// icon: 'none'
// })
// })
// }
}
}
</script>
<style lang="scss">
.noValue {
color: rgb(192, 196, 204);
}
.input-area{
padding: 0 24rpx;
height: 64rpx;
display: flex;
align-items: center;
border: 1px solid #e4e4e4;
border-radius: 8rpx;
box-sizing: border-box;
// &input{
// }
}
textarea{
box-sizing: border-box;
border: 1px solid #e4e4e4;
border-radius: 8rpx;
font-size: 26rpx;
padding: 12rpx;
}
.picker-view {
display: flex;
align-items: center;
justify-content: space-between;
// width: 100%;
padding: 0 24rpx;
height: 64rpx;
display: flex;
align-items: center;
background: #ffffff;
border: 2rpx solid #e5e5e5;
border-radius: 12rpx;
box-sizing: border-box;
transition: all 0.3s ease;
}
.disabledLine {
background: rgb(245, 247, 250);
cursor: not-allowed;
}
</style>

View File

@@ -0,0 +1,609 @@
<!--
* @Date: 2024-10-08 14:29:36
* @LastEditors: shirlwang
* @LastEditTime: 2025-11-06 12:15:08
-->
<template>
<view class="input-outer-part">
<scroll-view scroll-y="true" :style="{height: edit?'calc(100vh - 380rpx)':'calc(100vh - 194rpx)'}">
<view class="inner">
<view class="part-title" style="display: flex;justify-content: space-between;">培训需求信息
<view v-if="!edit&&formData.id&&formData.currentStatus!=3" class="btn"
style="font-weight: normal;display: flex;" @click="edit=true">编辑<u-icon name="edit-pen"
color="#A6A6A6"></u-icon></view>
</view>
<view class="inner-part">
<uni-forms labelPosition="right" :model="formData" :rules="rules" ref="uForm" class="self-form"
labelWidth="150rpx">
<uni-forms-item label="姓名" prop="personName" required
v-if="$store.getters.roles.includes('shequn'|| $store.getters.roles.includes('gly'))">
<view class="input-area" style="width: 100%;" @click="openPersonChooser"
:class="{disabledLine: !edit||!canChoosePerson, noValue: !formData.personName}">
{{ formData.personName || '请选择' }}
</view>
<u-icon slot="right" name="edit-pen" color="#A6A6A6"></u-icon>
</uni-forms-item>
<uni-forms-item label="培训意愿工种" prop="qwpxgz" required>
<picker
mode="multiSelector"
:range="workTypeColumns"
range-key="workTypeName"
:value="workTypeIndexes"
@change="onWorkTypePickerChange"
@columnchange="onWorkTypeColumnChange"
v-if="workTypeColumns[0] && workTypeColumns[0].length"
>
<view class="picker-view">
<text>{{ formData.qwpxgzName || '请选择工种' }}</text>
<u-icon name="arrow-down" color="#999999"></u-icon>
</view>
</picker>
<view v-else class="picker-view">
<text>工种数据加载中...</text>
</view>
</uni-forms-item>
<uni-forms-item label="期望培训时间" prop="qwpxsj" required>
<uni-datetime-picker
type="date"
:value="formData.qwpxsj"
start="2021-3-20"
end="2030-6-20"
@change="change"
/>
<!-- <view class="bordered" style="width: 100%" @click="showTime = true"
:class="{ noValue: !formData.qwpxsj }">
{{ formData.qwpxsj || "请选择" }}</view>
<u-icon slot="right" name="arrow-down" color="#A6A6A6"></u-icon> -->
</uni-forms-item>
</uni-forms>
<uni-forms labelPosition="left" class="self-form" labelWidth="110">
<uni-forms-item label="需求说明" prop="jobDescription">
<textarea style="width: 100%;box-sizing: border-box;" class="textarea" :disabled="!edit" v-model="formData.jobDescription" placeholder="请输入"></textarea>
</uni-forms-item>
</uni-forms>
</view>
</view>
<!-- <view class="inner">
<view class="part-title" style="margin-top: 32rpx;">附件信息</view>
<view class="inner-part">
<uni-forms labelPosition="left" class="self-form" labelWidth="110">
<uni-forms-item label="附件" prop="fileUrl">
<ImageUpload :fileList="fileList" @update="changeFile" :maxCount="6" />
</uni-forms-item>
</uni-forms>
</view>
</view> -->
<!-- 办理完成后 需求说明 -->
<req-comp :form="{
actualSolveDate: formData.actualSolveDate,
actualSolvePeople: formData.actualSolvePeople,
solveDesc: formData.solveDesc,
fileUrl: formData.fileUrl
}" />
</scroll-view>
<u-datetime-picker :show="show.qwpxsj" v-model="dates.qwpxsj" mode="date"
@confirm="confirmDate('qwpxsj', $event)" @cancel="cancelPicker('qwpxsj')"></u-datetime-picker>
<u-picker :show="show.qwpxgz" :columns="[jobTypeList]" keyName="workTypeName"
@confirm="jobTypeConfirm('qwpxgz', $event)" @cancel="cancelPicker('qwpxgz')"></u-picker>
<choose-person ref="personChooser" @confirm="personNameConfirm" />
<u-datetime-picker style="position: relative; z-index: 100" :show="showTime" v-model="hopeSolveDate"
mode="datetime" closeOnClickOverlay @confirm="confirmDate" @cancel="showTime = false"
@close="showTime = false"></u-datetime-picker>
<view class="button-area" v-if="edit">
<view class="btn" @click="cancelPage">取消</view>
<view class="btn reset" @click="getDetail(formData.id)">重置</view>
<view class="btn save" @click="saveInfo">保存</view>
</view>
</view>
</template>
<script>
import {
getPersonBase
} from "@/packageRc/apiRc/person";
import {
addPersonDemand,
updatePersonDemand,
getPersonDemand
} from "@/packageRc/apiRc/needs/personDemand";
import {
listJobType
} from "@/packageRc/apiRc/jobType/index";
import ImageUpload from '/packageRc/components/ImageUpload'
import ChoosePerson from '/packageRc/pages/needs/components/choosePerson';
import dayjs from "dayjs";
export default {
components: {
ChoosePerson,
ImageUpload
},
props: {
needId: {
type: String,
default: ''
},
name: {
type: String,
default: ''
}
},
data() {
return {
fileList: [],
edit: true,
showTime: false,
personBase: {},
hopeSolveDate: Number(new Date()),
dates: {},
formData: {
demandType: "3",
personName: '',
personId: "",
userId: "",
demandTitle: '',
isAcceptAssistance: '',
isAcceptApprovalResult: '',
personName: '',
qwpxsj: '',
qwpxgz: '',
qwpxgzName: ''
},
rules: {
personName: [{
required: true,
message: '请填写姓名',
trigger: ['blur', 'change'],
}, ],
qwpxgz: [{
required: true,
message: '请选择培训意愿工种',
trigger: ['blur', 'change'],
validator: (rule, value) => {
// 允许数组且有值,或字符串有值
return (Array.isArray(value) && value.length > 0) || (!!value);
}
}, ],
qwpxsj: [{
required: true,
message: '请选择期望培训时间',
trigger: ['blur', 'change'],
}, ],
},
dict: {},
show: {},
currentCityArr: [],
originalDept: [],
currentCity: '请选择',
bysj: '',
loading: false,
jobTypeList: [],
route: {},
canChoosePerson: false,
workTypeTreeList: [],
searchKeyword: '',
workTypeList: [],
workTypeColumns: [[], [], []],
workTypeIndexes: [0, 0, 0],
}
},
onReady() {
this.$refs.uForm.setRules(this.rules)
},
created() {
this.loading = true;
this.workTypeRemoteMethod('');
},
methods: {
change(e) {
this.formData.qwpxsj = e;
},
cancelPage() {
if (this.formData.id) {
this.edit = false;
this.getDetail(this.formData.id)
} else {
uni.navigateBack()
}
},
openPersonChooser() {
if (this.edit && this.canChoosePerson) {
this.$refs.personChooser.open();
}
},
personNameConfirm(event) {
this.formData.personName = event.name
this.formData.personId = event.id
this.formData.userId = event.userId
this.formNameChange();
this.$forceUpdate();
},
confirmDate(e) {
this.showTime = false;
// 获取选中的日期
const date = e.value;
// 使用 uView 的 uTime 方法格式化日期,包含时分秒
const formattedDateTime = uni.$u.timeFormat(date, "yyyy-mm-dd");
// 设置表单数据
this.formData.qwpxsj = formattedDateTime;
},
changeFile(e) {
// 清空当前的 fileUrl 数组
this.formData.fileUrl = [];
// 如果 e 有长度(即用户选择了文件)
if (e.length) {
// 遍历每个文件对象并获取其 url
for (let data of e) {
const url = data.data ? data.data.url : data.url;
this.formData.fileUrl.push(url);
}
}
this.formData.fileUrl = this.$arrayToString(this.formData.fileUrl)
},
addOne(userId) {
this.formData = {}
this.getPersonInfo()
if(this.name){
this.formData.personName = this.name
this.formData.userId = userId
}
this.edit = true
},
workTypeRemoteMethod(key) {
listJobType({
workTypeName: key,
pageNum: 1,
pageSize: 50
}).then(
(res) => {
console.log('工种数据加载成功:', res.rows);
this.jobTypeList = res.rows;
// 处理树形数据为级联选择器格式
this.processWorkTypeTree(res.rows);
}
).catch(error => {
console.error('获取工种列表失败:', error);
this.workTypeList = [];
this.workTypeColumns = [[], [], []];
});
},
jobTypeConfirm(type, event) {
this.show[type] = false
this.formData[type] = event.value[0].id
this.formData.qwpxgzName = event.value[0].workTypeName
this.$forceUpdate();
},
getDetail(id) {
getPersonDemand(id).then(res => {
this.formData = res.data;
// 设置工种索引(需要等工种数据加载完成后)
if (this.formData.qwpxgz && this.workTypeColumns[0].length) {
this.setWorkTypeIndexes(this.formData.qwpxgz);
}
this.edit = false;
this.fileList = this.$processFileUrl(this.formData.fileUrl)
}).catch(error => {
console.error('Error fetching training detail:', error);
});
},
goBack() {
uni.navigateBack();
},
cancelPicker(type) {
this.$set(this.show, type, false)
this.$forceUpdate()
},
getDictLabel(value, list) {
if (list) {
let arr = list.filter(ele => ele.dictValue == value)
if (arr.length) {
return arr[0].dictLabel
} else {
return '请选择'
}
}
},
pickerConfirm(type, event) {
this.show[type] = false
this.formData[type] = event.value[0].dictValue
this.$forceUpdate();
},
showPicker(type) {
if (this.edit) {
this.show[type] = true
this.$forceUpdate()
}
},
getPersonInfo() {
this.loading = true;
this.$store.dispatch("GetInfo").then((res) => {
if (res.data.roles.indexOf('qunzhong') == -1) {
this.canChoosePerson = true;
} else {
this.canChoosePerson = false;
getPersonBase(res.data.user.userId).then(resp => {
this.formData.personId = resp.data.id
this.formData.userId = resp.data.userId
this.formData.personName = resp.data.name
this.formNameChange();
this.$forceUpdate();
})
}
})
},
formNameChange() {
let date = new Date()
const dayNew = dayjs(date).format("YYYY-MM-DD");
this.formData.demandTitle = `${this.formData.personName}_于${dayNew}_提出培训需求`
},
async saveInfo() {
uni.showLoading();
// // 手动检查培训意愿工种是否已选择
// if (!this.formData.qwpxgz || this.formData.qwpxgz.trim() === '') {
// uni.showToast({title: '请选择培训意愿工种!', icon: 'none'});
// return;
// }
// // 手动检查期望培训时间是否已选择
// if (!this.formData.qwpxsj || this.formData.qwpxsj.trim() === '') {
// uni.showToast({title: '请选择期望培训时间!', icon: 'none'});
// return;
// }
// 验证表单
const isValid = await this.$refs.uForm.validate();
if (isValid) {
this.formData.demandType = 3;
if (this.formData.id) {
updatePersonDemand(this.formData).then(response => {
uni.showToast({title: '修改成功', icon: 'none'});
if (response.code == 200) {
// 如果是编辑模式,关闭编辑状态;否则返回上一页
if (this.formData.id) {
this.edit = false;
} else {
setTimeout(() => {
uni.navigateBack();
}, 2000);
}
}
uni.hideLoading();
})
} else {
addPersonDemand(this.formData).then(response => {
uni.showToast({title: '保存成功', icon: 'none'});
if (response.code == 200) {
// 如果是编辑模式,关闭编辑状态;否则返回上一页
if (this.formData.id) {
this.edit = false;
} else {
setTimeout(() => {
uni.navigateBack();
}, 2000);
}
}
uni.hideLoading();
})
}
}else{
uni.showToast({title: '请填写完整信息!', icon: 'none'});
uni.hideLoading();
}
// 确保加载页总是会被隐藏
},
// getWorkTypeTree() {
// listJobType({
// workTypeName: '',
// pageNum: 1,
// pageSize: 9999
// }).then(res => {
// console.log("11111",this.workTypeTreeList)
// this.workTypeTreeList = Array.isArray(res.rows) ? res.rows : [];
// });
// },
// 处理树形数据为级联选择器格式
processWorkTypeTree(treeData) {
if (!treeData || !Array.isArray(treeData)) {
this.workTypeColumns = [[], [], []];
return;
}
// 第一级
const level1 = treeData.filter(item => item.level === "1");
// 第二级
const level2 = treeData.filter(item => item.level === "2");
// 第三级
const level3 = treeData.filter(item => item.level === "3");
// 构建级联数据
const columns = [];
columns[0] = level1;
// 根据第一级选择,过滤第二级
if (level1.length > 0) {
const firstLevelId = level1[0].id;
columns[1] = level2.filter(item => item.parentId === firstLevelId);
} else {
columns[1] = [];
}
// 根据第二级选择,过滤第三级
if (columns[1].length > 0) {
const secondLevelId = columns[1][0].id;
columns[2] = level3.filter(item => item.parentId === secondLevelId);
} else {
columns[2] = [];
}
this.workTypeColumns = columns;
console.log('级联数据构建完成:', this.workTypeColumns);
},
// 级联选择器列变化事件
onWorkTypeColumnChange(e) {
const { column, value } = e.detail;
const newIndexes = [...this.workTypeIndexes];
newIndexes[column] = value;
// 重置后续列的数据
if (column === 0) {
// 第一列变化,重置第二、三列
const selectedLevel1 = this.workTypeColumns[0][value];
if (selectedLevel1) {
const level2 = this.jobTypeList.filter(item =>
item.level === "2" && item.parentId === selectedLevel1.id
);
this.workTypeColumns[1] = level2;
this.workTypeColumns[2] = [];
newIndexes[1] = 0;
newIndexes[2] = 0;
}
} else if (column === 1) {
// 第二列变化,重置第三列
const selectedLevel2 = this.workTypeColumns[1][value];
if (selectedLevel2) {
const level3 = this.jobTypeList.filter(item =>
item.level === "3" && item.parentId === selectedLevel2.id
);
this.workTypeColumns[2] = level3;
newIndexes[2] = 0;
}
}
this.workTypeIndexes = newIndexes;
},
// 级联选择器确认事件
onWorkTypePickerChange(e) {
const indexes = e.detail.value;
const selectedLevel1 = this.workTypeColumns[0][indexes[0]];
const selectedLevel2 = this.workTypeColumns[1][indexes[1]];
const selectedLevel3 = this.workTypeColumns[2][indexes[2]];
// 使用$set确保响应式更新
if (selectedLevel3) {
// 选择第三级
this.$set(this.formData, 'qwpxgz', selectedLevel3.id);
this.$set(this.formData, 'qwpxgzName', `${selectedLevel1.workTypeName}/${selectedLevel2.workTypeName}/${selectedLevel3.workTypeName}`);
} else if (selectedLevel2) {
// 选择第二级
this.$set(this.formData, 'qwpxgz', selectedLevel2.id);
this.$set(this.formData, 'qwpxgzName', `${selectedLevel1.workTypeName}/${selectedLevel2.workTypeName}`);
} else if (selectedLevel1) {
// 选择第一级
this.$set(this.formData, 'qwpxgz', selectedLevel1.id);
this.$set(this.formData, 'qwpxgzName', selectedLevel1.workTypeName);
}
this.workTypeIndexes = indexes;
// 强制重新渲染组件
this.$forceUpdate();
},
// 根据工种ID设置索引
setWorkTypeIndexes(workTypeId) {
// 在工种列表中查找对应的工种
const targetWorkType = this.jobTypeList.find(item => item.id == workTypeId);
if (!targetWorkType) return;
// 根据level确定是哪一级
if (targetWorkType.level === "1") {
const index = this.workTypeColumns[0].findIndex(item => item.id == workTypeId);
if (index !== -1) {
this.workTypeIndexes = [index, 0, 0];
}
} else if (targetWorkType.level === "2") {
// 需要先找到父级
const parent = this.jobTypeList.find(item => item.id == targetWorkType.parentId);
if (parent) {
const parentIndex = this.workTypeColumns[0].findIndex(item => item.id == parent.id);
const childIndex = this.workTypeColumns[1].findIndex(item => item.id == workTypeId);
if (parentIndex !== -1 && childIndex !== -1) {
this.workTypeIndexes = [parentIndex, childIndex, 0];
}
}
} else if (targetWorkType.level === "3") {
// 需要找到祖父级和父级
const parent = this.jobTypeList.find(item => item.id == targetWorkType.parentId);
const grandparent = this.jobTypeList.find(item => item.id == parent.parentId);
if (parent && grandparent) {
const grandparentIndex = this.workTypeColumns[0].findIndex(item => item.id == grandparent.id);
const parentIndex = this.workTypeColumns[1].findIndex(item => item.id == parent.id);
const childIndex = this.workTypeColumns[2].findIndex(item => item.id == workTypeId);
if (grandparentIndex !== -1 && parentIndex !== -1 && childIndex !== -1) {
this.workTypeIndexes = [grandparentIndex, parentIndex, childIndex];
}
}
}
},
}
}
</script>
<style lang="scss">
.noValue {
color: rgb(192, 196, 204);
}
.disabledLine {
background: rgb(245, 247, 250);
cursor: not-allowed;
}
.bordered {
border: 1rpx solid #dadbde;
padding: 9px;
border-radius: 4px;
}
.input-area{
padding: 0 24rpx;
height: 64rpx;
display: flex;
align-items: center;
border: 1px solid #e4e4e4;
border-radius: 8rpx;
box-sizing: border-box;
// &input{
// }
}
textarea{
box-sizing: border-box;
border: 1px solid #e4e4e4;
border-radius: 8rpx;
font-size: 26rpx;
padding: 12rpx;
}
.picker-view {
display: flex;
align-items: center;
justify-content: space-between;
// width: 100%;
padding: 0 24rpx;
height: 64rpx;
display: flex;
align-items: center;
background: #ffffff;
border: 2rpx solid #e5e5e5;
border-radius: 12rpx;
box-sizing: border-box;
transition: all 0.3s ease;
}
</style>

View File

@@ -0,0 +1,287 @@
<template>
<uni-popup background-color="#fff" type="bottom"
ref="openDeal"
style="position: relative; z-index: 100"
>
<view style="padding: 32rpx;">
<uni-forms style="width: 100%;"
class="self-form"
labelPosition="top"
:model="formData"
:rules="rules"
ref="uForm"
labelWidth="300"
>
<uni-forms-item label="实际解决时间" prop="actualSolveDate" required>
<view
class="picker-view"
:class="{ selected: formData.actualSolveDate }"
>
<uni-datetime-picker
type="date"
:value="formData.actualSolveDate"
start="2021-3-20"
end="2030-6-20"
@change="change"
/>
</view>
</uni-forms-item>
<uni-forms-item label="经办人" prop="agentUserName" required>
<view class="input-view">
<uni-data-select
style="width: 100%"
v-model="formData.agentUserId"
placeholder="请选择经办人"
:localdata="jingbrList1"
@change="handleAgentChange"
>
</uni-data-select>
</view>
</uni-forms-item>
<uni-forms-item label="人员状态" prop="personStatus">
<picker
@change="onpersonStatusChange"
:range="personStatusOptions.map(item => item.label)"
:value="getpersonStatusIndex(formData.personStatus)"
mode="selector"
>
<view style="border: 1px solid #e4e4e4;width: 100%;box-sizing: border-box;padding: 0 20rpx;line-height: 64rpx;white-space: nowrap;text-overflow: ellipsis;flex-grow: 1;">{{ getpersonStatusLabel(formData.personStatus) || "请选择" }}</view>
</picker>
</uni-forms-item>
<uni-forms-item label="附件" prop="fileUrl">
<ImageUpload
:fileList="fileList"
@update="changeFile"
:maxCount="6"
/>
</uni-forms-item>
<uni-forms-item label="解决说明" prop="solveDesc" required>
<view class="textarea-view">
<textarea
v-model="formData.solveDesc"
placeholder="请输入解决说明"
style="width: 100%;padding: 28rpx 36rpx;border: 1px solid #e4e4e4;padding: 10rpx;border-radius: 8rpx;font-size: 28rpx;color:#333333;height: 120rpx;"
></textarea>
</view>
</uni-forms-item>
</uni-forms>
</view>
<view class="button-area">
<view class="btn" @click="closeopenDeal">取消</view>
<view
class="btn reset"
@click="
formData.actualSolveDate = '';
formData.solveDesc = '';
"
>重置</view
>
<view class="btn save" @click="finishJobRecommend(needsType)"
>办结</view
>
</view>
</uni-popup>
</template>
<script>
import ImageUpload from "@/packageRc/components/ImageUpload";
import { requirementCompletion } from "@/packageRc/apiRc/company/index";
import {getJbrInfo} from "@/packageRc/apiRc/personinfo/index"
export default {
components: {
ImageUpload,
},
data() {
return {
formData: {
actualSolveDate: '',
agentUserId: '',
personStatus: '',
fileUrl: '',
solveDesc: ''
},
fileList: [],
personStatusOptions: [],
rules: {
actualSolveDate: [
{
required: true,
message: "请选择实际解决时间",
trigger: ["blur", "change"],
},
],
agentUserName: [
{
required: true,
message: "请填写经办人",
trigger: ["blur", "change"],
},
],
personStatus: [
{
required: true,
message: "请填写人员状态",
trigger: ["blur", "change"],
},
],
solveDesc: [
{
required: true,
message: "请填写解决说明",
trigger: ["blur", "change"],
},
],
},
}
},
created() {
this.$getDict('qcjy_ryzt').then(res => {
if (res.data && Array.isArray(res.data)) {
this.personStatusOptions = res.data.map(item => ({
value: item.dictValue,
label: item.dictLabel
}));
}
});
getJbrInfo().then(res => {
this.jingbrList1=res.map(ele => {
return {
value: ele.userId,
text: ele.nickName
}
})
})
},
methods: {
init(formData) {
this.formData = formData;
this.$nextTick(() => {
this.$refs.openDeal.open()
})
},
// 获取帮扶内容标签
getpersonStatusLabel(value) {
let arr = this.personStatusOptions.filter(item => item.value == value)
return arr.length ? arr[0].label : ''
},
getpersonStatusIndex(value) {
if (!value) return 0;
const index = this.personStatusOptions.findIndex(item => item.value === value);
return index !== -1 ? index : 0;
},
// 处理人员状态选择变化
onpersonStatusChange(e) {
const index = e.detail.value;
if (this.personStatusOptions && this.personStatusOptions[index]) {
this.formData.personStatus = this.personStatusOptions[index].value;
}
},
// 获取经办人名称
getAgentUserName(userId) {
const agent = this.jingbrList1.find(item => item.value === userId);
return agent ? agent.nickName : '';
},
// 处理经办人选择变化
handleAgentChange(value) {
if (!value || !this.jingbrList1 || !this.jingbrList1.length) {
this.formData.agentUserName = '';
return;
}
const user = this.jingbrList1.find(item => item.value === value);
if (user) {
this.formData.agentUserName = user.nickName;
} else {
this.formData.agentUserName = '';
}
},
// 办结按钮
async finishJobRecommend() {
uni.showLoading();
try {
// 先进行表单校验
this.$refs.uForm.validate().then(res => {
console.log('res', res);
// 校验通过后再走后续逻辑
const url = "/manage/personDemand/demandDone";
requirementCompletion(url, this.formData).then(res => {
if (res.code === 200) {
uni.showToast({title: '办结成功', icon: 'none'});
this.$refs.openDeal.close();
this.$emit('finished')
}
})
}).catch((error) => {
console.log(error)
})
} catch (error) {
let msg = '';
if (error && error[0] && error[0].message) {
msg = error[0].message;
} else if (error && error.message) {
msg = error.message;
} else if (typeof error === 'string') {
msg = error;
} else {
msg = '请检查必填项填写';
}
uni.showToast({title: msg, icon: 'none'});
} finally {
uni.hideLoading();
}
},
changeFile(e) {
// 清空当前的 fileUrl 数组
this.formData.fileUrl = [];
// 如果 e 有长度(即用户选择了文件)
if (e.length) {
// 遍历每个文件对象并获取其 url
for (let data of e) {
const url = data.data ? data.data.url : data.url;
this.formData.fileUrl.push(url);
}
}
this.formData.fileUrl = this.formData.fileUrl.join(',')
},
change(e) {
this.formData.actualSolveDate = e
},
}
}
</script>
<style lang="scss" scoped>
.button-area {
padding: 24rpx 32rpx 68rpx;
background: #fff;
display: flex;
box-sizing: border-box;
border-radius: 16px 16px 0px 0px;
box-shadow: 0 0 5px rgba(0, 0, 0, 0.1);
.btn {
line-height: 72rpx;
width: 176rpx;
margin-right: 16rpx;
font-size: 28rpx;
border: 1px solid #b8c5d4;
color: #282828;
text-align: center;
border-radius: 8rpx;
}
.reset {
background: #dce2e9;
}
.save {
background: linear-gradient(103deg, #1d64cf 0%, #1590d4 99%);
color: #fff;
border: 0;
flex-grow: 1;
}
}
</style>

View File

@@ -0,0 +1,184 @@
<!--
* @Date: 2024-10-08 14:29:36
* @LastEditors: shirlwang
* @LastEditTime: 2025-11-04 17:16:49
-->
<template>
<view class="page" style="background-image: url('../../../packageRc/static/pageBg.png');">
<!-- 需求新增 -->
<view class="tab-list" v-if="showTab != 1">
<view class="tab" :class="{active: activeType == 1}" @click="canChangeType ? changeType(1, options) : ''">求职<br>需求
</view>
<view class="tab" :class="{active: activeType == 3}" @click="canChangeType ? changeType(3, options) : ''">创业<br>需求
</view>
<view class="tab" :class="{active: activeType == 4}" @click="canChangeType ? changeType(4, options) : ''">培训<br>需求
</view>
<view class="tab" :class="{active: activeType == 5}" @click="canChangeType ? changeType(5, options) : ''">其他<br>需求
</view>
</view>
<jobService v-if="activeType == 1" :needId="id" :name="name" ref="type1" />
<entrepreneurshipService :needId="id" :name="name" v-if="activeType == 3" ref="type3" />
<trainService v-if="activeType == 4" :needId="id" :name="name" ref="type4" />
<otherService v-if="activeType == 5" :needId="id" :name="name" ref="type5" />
<!-- 社区端 - 显示隐藏退出组件 -->
<exitPopup />
</view>
</template>
<script>
import jobService from './components/jobService.vue';
import entrepreneurshipService from './components/entrepreneurshipService.vue';
import trainService from './components/trainService.vue';
import otherService from './components/otherService.vue';
export default {
components: {
jobService,
entrepreneurshipService,
trainService,
otherService,
},
data() {
return {
isAdd: true,
activeType: 1,
canChangeType: true,
id: '',
name:"",
options: {}
}
},
onLoad(options) {
this.showTab = options.showTab
this.id = options.id
this.name = options.name
this.options=options
if (options.id && options.type) {
this.isAdd = false
this.activeType = options.type
this.canChangeType = false;
this.$nextTick(() => {
this.$refs['type' + options.type].getDetail(options.id)
})
} else {
// 添加需求的时候根据传入的类型 判断对应的表单
this.changeType(options.activeType || 1, options)
}
},
methods: {
changeType(type, options) {
this.activeType = type
this.$nextTick(() => {
this.$refs['type' + type].addOne(options.userId)
})
},
goBack() {
uni.navigateBack();
},
}
}
</script>
<style lang="scss">
@import "/packageRc/static/scss/index.scss";
.page {
background-color: #f4f4f4 !important;
height: 100vh;
background-repeat: no-repeat;
padding-top: 32rpx;
background-size: 100% auto;
}
.button-area {
padding: 24rpx 32rpx 68rpx;
background: #fff;
display: flex;
box-sizing: border-box;
margin-top: 40rpx;
border-radius: 16px 16px 0px 0px;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.05);
.btn {
line-height: 72rpx;
width: 176rpx;
margin-right: 16rpx;
font-size: 28rpx;
border: 1px solid #B8C5D4;
color: #282828;
text-align: center;
border-radius: 8rpx;
}
.reset {
background: #DCE2E9;
}
.save {
background: linear-gradient(103deg, #1D64CF 0%, #1590D4 99%);
color: #fff;
border: 0;
flex-grow: 1;
}
}
.noValue {
color: rgb(192, 196, 204);
}
.disabledLine {
background: rgb(245, 247, 250);
cursor: not-allowed;
}
.tab-list {
display: flex;
width: calc(100% - 64rpx);
margin: 16rpx auto 30rpx;
text-align: center;
border-radius: 16rpx;
background: #fff;
;
.tab {
width: 25%;
display: flex;
align-items: center;
justify-content: center;
border: 4rpx solid #FFFFFF;
background: #fff;
border-radius: 16rpx;
font-size: 28rpx;
color: #878787;
height: 106rpx;
&.active {
background: #1A62CE;
color: #fff;
position: relative;
font-weight: bold;
&::before {
content: '';
position: absolute;
bottom: -13rpx;
border-top: 14rpx solid #1A62CE;
border-left: 12rpx solid transparent;
border-right: 12rpx solid transparent;
left: calc(50% - 7rpx);
z-index: 2;
}
&::after {
content: '';
position: absolute;
z-index: 1;
bottom: -18rpx;
border-top: 14rpx solid #fff;
border-left: 12rpx solid transparent;
border-right: 12rpx solid transparent;
left: calc(50% - 7rpx);
}
}
}
}
</style>

View File

@@ -0,0 +1,847 @@
<template>
<view class="page" style="background-image: url('../../../packageRc/static/pageBg.png');">
<view class="input-outer-part"
style="padding: 24rpx 32rpx 0;max-height: unset;">
<view class="search-line">
<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-bottom: 16px;color: #000;">
<text> {{ total }} </text>
</view>
<scroll-view :scroll-y="true" style="height: calc(100vh - 342rpx);position: relative;z-index: 1;"
@scrolltolower="getBottomList">
<uni-swipe-action>
<uni-swipe-action-item @click="clickDelete(item)" v-for="(item, index) in tableData" :key="index"
style="margin-bottom: 24rpx;border-radius: 16rpx;" :right-options="options1">
<view class="job-item">
<view class="top-container" @click="goNeedsDetail(item)">
<view class="title-line">
<view class="title">{{ item.personName }}</view>
</view>
<!-- <view class="status-card" v-if="item.currentStatus == 3">已完成服务</view>
<view class="status-card in" v-else-if="item.untreatedCount <= 7">7天以内</view>
<view class="status-card out"
v-else-if="item.untreatedCount > 7&&item.untreatedCount <= 14">大于7天</view>
<view class="status-card far" v-else>已超期</view> -->
<view class="info"><text>状态</text><text
:class="item.currentStatus == 1 ? 'not' : item.currentStatus == 2 ? 'ing' : item.currentStatus == 3 ? 'finish' : '' ">
{{ getDictLabel(item.currentStatus, currentStatusList) }}
</text></view>
<view class="info" v-if="queryParams.demandType == 1">
<text>需求工种</text>{{ item.jobWorkTypeName }}
</view>
<view class="info" v-if="queryParams.demandType == 3">
<text>需求名称</text>{{ item.serviceRequirementTitle }}
</view>
<view class="info"
v-if="queryParams.demandType == 2||queryParams.demandType == 4||queryParams.demandType == 5">
<text>需求名称</text>{{ item.demandTitle }}
</view>
</view>
<!--
item.currentStatus = 1 待处理2 处理中 3 已完成
queryParams.demandType 1 求职需求 2 援助需求 3 创业需求 4 培训需求 5其他需求 展示办结按钮
item.currentStatus = 1待处理 item.currentStatus = 2 处理中
求职需求列表(queryParams.demandType = 1) 展示 推荐办理
培训需求列表(queryParams.demandType = 4) 展示 培训办理
援助创业其他列表 展示办理
item.currentStatus = 3 已完成
统一展示 服务追溯
-->
<view class="item_btn df_flex df_align_center df_justify_center">
<!-- 需求已处理完成的 展示服务追溯 -->
<view v-if="item.currentStatus == 3" class="df_flex_1">
<view type="primary" :plain="true" color="#BF5818" text="服务追溯"
@click="serviceTraceButton(item)" :customStyle="{border: 'none'}">服务追溯</view>
</view>
<!-- 需求处于待处理处理中 -->
<view v-else class="df_flex_1">
<!-- 求职需求 -->
<view v-if="queryParams.demandType == 1" class="df_flex">
<view type="primary" :plain="true" color="#BF5818" text="推荐"
:customStyle="{border: 'none'}"
@click="requirementTraining(item, 1)">推荐</view>
<view class="line"></view>
<view type="primary" :plain="true" color="#BF5818" text="办理"
:customStyle="{border: 'none'}" @click="requirementHandling(item)">办理</view>
</view>
<!-- 培训需求 -->
<view v-else-if="queryParams.demandType == 4" class="df_flex">
<view type="primary" :plain="true" color="#BF5818" text="培训"
:customStyle="{border: 'none'}"
@click="requirementTraining(item, 4)">培训</view>
<view class="line"></view>
<view type="primary" :plain="true" color="#BF5818" text="办理"
:customStyle="{border: 'none'}" @click="requirementHandling(item)">办理</view>
</view>
<!-- 其他需求 -->
<view v-else>
<view type="primary" :plain="true" color="#BF5818" text="办理"
:customStyle="{border: 'none'}" @click="requirementHandling(item)">办理</view>
</view>
</view>
</view>
</view>
</uni-swipe-action-item>
</uni-swipe-action>
<view style="padding-bottom: 24rpx;">
<img v-if="!total&&!loading" src="https://rc.jinan.gov.cn/qcwjyH5/static/images/person/empty.png"
style="width: 100%;display: block;margin: 0 auto;" />
<view v-if="loading"><u-loading-icon></u-loading-icon>
<view style="text-align: center;color: #8E8E8E;font-size: 24rpx;">加载中~</view>
</view>
<view v-else-if="showMorePage" style="text-align: center;color: #1A62CE;font-size: 24rpx;">加载更多
</view>
<view style="text-align: center;color: #8E8E8E;font-size: 24rpx;" v-else>没有更多数据了~</view>
</view>  
</scroll-view>
</view>
<DealDone ref="dealDone" @finished="search();"/>
<!-- <uni-popup ref="openDeal" background-color="#fff" type="bottom">
<view style="padding: 32rpx;padding-bottom: 0">
<uni-forms class="self-form" labelPosition="top" :model="formData" :rules="rules" ref="uForm"
labelWidth="300">
<uni-forms-item label="实际解决时间" prop="actualSolveDate" required>
<picker style="width: 100%;" mode="date" :value="formData.actualSolveDate" start="1900-01-01" end="2100-12-31" @change="onDateChange">
<view class="date-picker-wrapper" :class="{ noValue: !formData.actualSolveDate }">
<view v-if="formData.actualSolveDate" class="date-value">{{ formData.actualSolveDate }}</view>
<view v-else>请选择</view>
</view>
</picker>
</uni-forms-item>
<uni-forms-item label="附件" prop="fileUrl" >
<ImageUpload :fileList="fileList" @update="changeFile" :maxCount="6" />
</uni-forms-item>
<uni-forms-item label="解决说明" prop="solveDesc" required>
<textarea style="border: 1px solid #e4e4e4;width: 100%;border-radius: 8rpx;padding: 24rpx;box-sizing: border-box;" v-model="formData.solveDesc" placeholder="请输入"></textarea>
</uni-forms-item>
</uni-forms>
</view>
<view class="button-area" style="box-shadow: unset;border-top: 1px solid #e4e4e4;padding-bottom: 0;">
<view class="btn" @click="closeopenDeal">取消</view>
<view class="btn reset" @click="formData.actualSolveDate = '';formData.solveDesc = ''">重置</view>
<view class="btn save" @click="finishJobRecommend">办结</view>
</view>
</uni-popup> -->
<view class="addNeeds" @click="goAddNeeds()">
<img src="https://rc.jinan.gov.cn/qcwjyH5/static/images/person/addNeeds.png" />
</view>
<!-- <u-datetime-picker style="position: relative;z-index: 100;" :show="showTime" v-model="hopeSolveDate"
mode="datetime" @confirm="confirmDate" closeOnClickOverlay @close="showTime=false"
@cancel="showTime=false"></u-datetime-picker> -->
<!-- <u-datetime-picker
style="position: relative;z-index: 100;"
:show="showTime"
v-model="hopeSolveDate"
mode="datetime"
closeOnClickOverlay
@confirm="confirmDate"
@cancel="showTime=false"
@close="showTime=false"
></u-datetime-picker> -->
<!-- 社区端 - 显示隐藏退出组件 -->
<exitPopup />
</view>
</template>
<script>
import PopupList from "/packageRc/components/PopupLists.vue";
import ImageUpload from '/packageRc/components/ImageUpload'
import {
requirementCompletion
} from '@/packageRc/apiRc/company'
import {
listJobService,
delJobService
} from '@/packageRc/apiRc/needs/jobService'
import {
listAssistService,
delAssistService,
finishAssistService
} from '@/packageRc/apiRc/needs/assistService'
import {
listEntrepreneurshipService,
delEntrepreneurshipService,
finishEntrepreneurshipService
} from '@/packageRc/apiRc/needs/entrepreneurshipService'
import {
listTrainService,
delTrainService
} from '@/packageRc/apiRc/needs/trainService'
import {
listOtherService,
delOtherService,
finishOtherService
} from '@/packageRc/apiRc/needs/otherService'
import DealDone from './dealDone.vue'
export default {
components: {
PopupList,
ImageUpload,
DealDone,
},
data() {
return {
checkData: [],
options1: [{
text: '删除'
}],
queryParams: {
pageNum: 1,
pageSize: 10,
demandType: 1
},
total: 0,
showMorePage: true,
tableData: [],
person: {},
loading: false,
openDeal: false,
showTime: false,
formData: {
actualSolveDate: '',
solveDesc: ''
},
rules: {
actualSolveDate: [{
required: true,
message: '请选择实际解决时间',
trigger: ['blur', 'change'],
}, ],
solveDesc: [{
required: true,
message: '请填写解决说明',
trigger: ['blur', 'change'],
}, ],
},
hopeSolveDate: Number(new Date()),
currentStatusList: [],
fileList: [],
}
},
onLoad({
dictValue
}) {
this.queryParams.demandType = dictValue || 1
this.getCheckData()
},
onShow() {
this.search();
},
methods: {
// 日期选择变化处理
onDateChange(e) {
this.formData.actualSolveDate = e.detail.value;
},
closeopenDeal() {
this.$refs.openDeal.close()
},
// 新增需求
goAddNeeds() {
uni.navigateTo(`/packageRc/pages/needs/needDetail?activeType=${this.queryParams.demandType}&showTab=1`)
},
confirmDate(e) {
this.showTime = false;
// 获取选中的日期
const date = e.value;
// 使用 uView 的 uTime 方法格式化日期,包含时分秒
const formattedDateTime = uni.$u.timeFormat(date, 'yyyy-mm-dd hh:MM:ss');
// 设置表单数据
this.formData.actualSolveDate = formattedDateTime;
},
// 需求推荐/培训
requirementTraining(item, index) {
if (index == 1) {
uni.navigateTo({
url: `/packageRc/pages/service/serviceDetail?personName=${item.personName}&personId=${item.personId}&jobDemandInfoId=${item.id}&jobWorkType=${item.jobWorkType}&type=3&showTab=1`
})
} else {
uni.navigateTo({
url: `/packageRc/pages/service/serviceDetail?personName=${item.personName}&personId=${item.personId}&skillTrainingId=${item.id}&personStatus=${item.personStatus}&type=4&showTab=1`
})
}
},
clickDelete(item) {
this.loading = true;
if (this.queryParams.demandType == 1) {
delJobService(item.id).then((res) => {
this.deleteFinish(res)
});
} else if (this.queryParams.demandType == 2) {
delAssistService(item.id).then((res) => {
this.deleteFinish(res)
});
} else if (this.queryParams.demandType == 3) {
delEntrepreneurshipService(item.id).then((res) => {
this.deleteFinish(res)
});
} else if (this.queryParams.demandType == 4) {
delTrainService(item.id).then((res) => {
this.deleteFinish(res)
});
} else if (this.queryParams.demandType == 5) {
delOtherService(item.id).then((res) => {
this.deleteFinish(res)
});
}
},
deleteFinish() {
uni.showToast({
title: '删除成功'
})
this.search()
},
goNeedsDetail(item) {
uni.navigateTo({
url: `/packageRc/pages/needs/needDetail?id=${item.id}&type=${this.queryParams.demandType}&showTab=1`
})
},
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.tableData = [];
this.total = 0;
this.getList();
},
// 服务追溯
serviceTraceButton(item) {
// 定义需求类型与对应的字符串映射
const demandTypeMap = {
1: 'job', // 求职需求
2: 'assist', // 援助需求
3: 'entrepreneurship', // 创业需求
4: 'train', // 培训需求
5: 'other' // 其他需求
};
// 获取当前的需求类型字符串
const demandType = demandTypeMap[this.queryParams.demandType] || 'other';
uni.navigateTo({url: `/packageRc/pages/service/serviceTraceability?id=${item.id}&demandType=${demandType}`});
// 使用映射后的字符串构建URL并导航
},
// 触底加载
getBottomList() {
if (
this.queryParams.pageNum * this.queryParams.pageSize >=
this.total
) {
this.showMorePage = false;
} else if (
this.queryParams.pageNum * this.queryParams.pageSize <
this.total
) {
this.queryParams.pageNum++;
this.getList();
if (
this.queryParams.pageNum * this.queryParams.pageSize >=
this.total
) {
this.showMorePage = false;
}
}
},
// 获取列表
async getList() {
this.loading = true;
// if (this.queryParams.demandType == 1) {
listJobService(this.queryParams).then((res) => {
this.gettedData(res)
});
// } else if (this.queryParams.demandType == 2) {
// listAssistService(this.queryParams).then((res) => {
// this.gettedData(res)
// });
// } else if (this.queryParams.demandType == 3) {
// listEntrepreneurshipService(this.queryParams).then((res) => {
// this.gettedData(res)
// });
// } else if (this.queryParams.demandType == 4) {
// listTrainService(this.queryParams).then((res) => {
// this.gettedData(res)
// });
// } else if (this.queryParams.demandType == 5) {
// listOtherService(this.queryParams).then((res) => {
// this.gettedData(res)
// });
// }
},
gettedData(res) {
if (res.code == 200) {
if (res.rows.length < 10) {
this.showMorePage = false;
}
this.loading = false;
this.tableData = this.tableData.concat(res.rows);
this.total = res.total;
} else {
this.loading = false;
uni.showToast({
title: res.msg,
icon: "none",
});
}
},
// 需求办结
requirementHandling(item) {
// this.$refs.openDeal.open()
// this.formData = {
// id: item.id,
// currentStatus: '3'
// }
console.log(item, 'asdfjoiasiodfjoi')
this.$refs.dealDone.init({
id: item.id,
currentStatus: "3",
userId: item.userId,
// personStatus: item.personStatus || (this.dict.personStatusList[0] && this.dict.personStatusList[0].dictValue),
});
},
// 需求推荐
requirementRecommendation(item) {
this.$tab.navigateTo(
`/pages/services/serviceDetail?personName=${item.personName}&personId=${item.personId}&jobDemandInfoId=${item.id}&jobWorkType=${item.jobWorkType}&type=3&showTab=1`
)
},
// 办结按钮
async finishJobRecommend() {
uni.showLoading();
try {
// 检查必填项
if (!this.formData.actualSolveDate) {
throw new Error('解决时间不能为空');
}
if (!this.formData.solveDesc) {
throw new Error('解决说明不能为空');
}
// 根据 queryParams.demandType 获取对应的 URL
const obj = {
1: '/demand/personJobDemandInfo/JdJobDemandDone',
2: '/demand/personAssistDemandInfo/assistDone',
3: '/demand/personEntrepreneurshipDemandInfo/entrepreneurshipDone',
4: '/demand/personTrainDemandInfo/JdTrainDemandDone',
5: '/demand/personOtherDemandInfo/otherDemandDone',
};
const url = '/manage/personDemand/demandDone';//obj[this.queryParams.demandType];
if (!url) {
throw new Error('无效的需求类型');
}
const {
code,
msg
} = await requirementCompletion(url, this.formData);
// 检查响应码是否为200
if (code === 200) {
// 显示成功的提示信息
uni.showToast({title: msg, icon: 'none'});
// this.openDeal = false;
this.$refs.openDeal.close()
this.search();
}
} catch (error) {
// 处理错误并显示提示信息
uni.showToast({title: '请检查必填项填写', icon: 'none'});
} finally {
// 确保加载页总是会被隐藏
uni.hideLoading();
}
},
// async finishJobRecommend() {
// this.openDeal = true;
// const obj = {
// 1: '/demand/personJobDemandInfo/JdJobDemandDone',
// 2: '/demand/personAssistDemandInfo/assistDone',
// 3: '/demand/personEntrepreneurshipDemandInfo/entrepreneurshipDone',
// 4: '/demand/personTrainDemandInfo/JdTrainDemandDone',
// 5: '/demand/personOtherDemandInfo/otherDemandDone',
// }
// if (!this.formData.actualSolveDate) return uni.showToast({title: '解决时间不能为空', icon: 'none'});
// if (!this.formData.solveDesc) return uni.showToast({title: '解决说明不能为空', icon: 'none'});
// const {
// code,
// data,
// msg
// } = await requirementCompletion(obj[this.queryParams.demandType], this.formData)
// if (code == 200) {
// uni.showToast({title: ms, icon: 'none'}g)
// this.openDeal = false
// this.search()
// }
// },
changeFile(e) {
console.log(e, 34234234234234)
// 清空当前的 fileUrl 数组
this.formData.fileUrl = [];
// 如果 e 有长度(即用户选择了文件)
if (e.length) {
// 遍历每个文件对象并获取其 url
for (let data of e) {
const url = data.data ? data.data.url : data.url;
this.formData.fileUrl.push(url);
}
}
this.formData.fileUrl = this.formData.fileUrl.join(',');
},
}
}
</script>
<style lang="scss" scoped>
.page {
background-color: #f4f4f4 !important;
height: 100vh;
background-repeat: no-repeat;
background-size: 100% auto;
}
.search-line {
border-radius: 32px;
background: #FFFFFF;
box-sizing: border-box;
border: 1px solid #107AFD;
height: 64rpx;
border-radius: 32rpx;
padding: 0 32rpx;
display: flex;
align-items: center;
position: relative;
z-index: 1;
margin-top: 24rpx;
.search-icon {
width: 40rpx;
height: 40rpx;
}
}
.job-item {
position: relative;
margin-bottom: 24rpx;
background: #fff;
border-radius: 16rpx;
.item_btn{
height: 100rpx;
border-top: 1px solid #e3e8ee;
}
.line{
position: absolute;
right: 50%;
bottom: 20rpx;
width: 1px;
height: 60rpx;
background-color: #e3e8ee;
}
.status-card {
position: absolute;
right: 0;
top: 0;
border-radius: 0 16rpx 0 16rpx;
width: 160rpx;
line-height: 40rpx;
text-align: center;
color: #fff;
background: #B2C0D1;
border: 1px solid #9BA9B9;
font-size: 24rpx;
&.in {
background: #29D297;
border: 1px solid #1BBA83;
}
&.out {
background: #ECB83D;
border: 1px solid #D7892B;
}
&.far {
background: #EC7737;
border: 1px solid #C24F1A;
}
}
.top-container {
padding: 32rpx;
// margin-bottom: 24rpx;
.title-line {
display: flex;
align-items: center;
justify-content: space-between;
font-size: 32rpx;
font-weight: bold;
margin-bottom: 16rpx;
.type-tag {
line-height: 40rpx;
width: 128rpx;
font-size: 24rpx;
color: #fff;
text-align: center;
&.qz {
background: #28CB5E;
}
&.yz {
background: #DD6728;
}
&.cy {
background: #23B5C5;
}
&.px {
background: #DDA728;
}
&.qt {
background: #2870DD;
}
}
.title {
color: #3D3D3D;
width: calc(100% - 137rpx);
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
line-height: 40rpx;
}
.salary {
width: 33%;
color: #FA6553;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
text-align: right
}
}
.info {
color: #3D3D3D;
margin-bottom: 7rpx;
font-size: 28rpx;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
text {
color: #8E8E8E;
}
.not {
color: #EC7737;
font-weight: bold;
}
.ing {
color: #ECB83D;
font-weight: bold;
}
.finish {
color: #21C88D;
font-weight: bold;
}
}
}
.function-btn {
color: #BF5818;
border-top: 1px solid #E2E8EF;
padding-bottom: 6rpx;
line-height: 90rpx;
text-align: center;
}
}
.self-form {
padding: 32rpx;
.bordered {
border: 1rpx solid #dadbde;
padding: 9px;
border-radius: 4px;
}
}
.button-area {
padding: 24rpx 32rpx 68rpx;
background: #fff;
display: flex;
box-sizing: border-box;
border-radius: 16px 16px 0px 0px;
box-shadow: 0 0 5px rgba(0, 0, 0, 0.1);
.btn {
line-height: 72rpx;
width: 176rpx;
margin-right: 16rpx;
font-size: 28rpx;
border: 1px solid #B8C5D4;
color: #282828;
text-align: center;
border-radius: 8rpx;
}
.reset {
background: #DCE2E9;
}
.save {
background: linear-gradient(103deg, #1D64CF 0%, #1590D4 99%);
color: #fff;
border: 0;
flex-grow: 1;
}
}
.noValue {
color: rgb(192, 196, 204);
}
.addNeeds {
position: fixed;
right: 0;
bottom: 150rpx;
width: 150rpx;
overflow: hidden;
z-index: 10;
border-radius: 44rpx;
border-radius: 75rpx;
img {
display: block;
width: 100%;
}
}
.df_flex{
display: flex;
view{
flex-grow: 1;
text-align: center;
color: #4c6efb;
}
}
.df_flex_1{
flex: 1;
}
.df__direction_column {
flex-direction: column;
}
.df_align_center{
align-items: center;
}
.df_justify_center{
justify-content: center;
}
.df_content_between{
justify-content: space-between;
}
.df_shrink_0{
flex-shrink: 0;
}
/* 日期选择器样式 */
.date-picker-wrapper {
display: flex;
justify-content: space-between;
align-items: center;
width: 100%;
box-sizing: border-box;
padding: 0 24rpx;
height: 64rpx;
border: 1px solid #ddd;
border-radius: 4px;
background-color: #fff;
}
// .date-picker-wrapper.noValue {
// background-color: #f9f9f9;
// }
.date-value {
color: #333;
width: 100%
}
</style>

View File

@@ -0,0 +1,496 @@
<template>
<view>
<view class="page" style="background-image: url('../../../packageRc/static/pageBg.png');">
<view class="input-outer-part"
style="padding-top: 32rpx;padding-bottom: 0;max-height: unset;">
<!-- <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> -->
<scroll-view :scroll-y="true" style="height: calc(100vh - 242rpx);position: relative;z-index: 1;"
@scrolltolower="getBottomList">
<uni-swipe-action>
<uni-swipe-action-item @click="clickDelete(item)" v-for="(item, index) in tableData" :key="index"
style="margin-bottom: 24rpx;border-radius: 16rpx;" :right-options="options1">
<view @click="goNeedsDetail(item)" class="job-item">
<view class="title-line" v-if="queryParams.needsType==1">
<view class="type-tag qz">求职需求</view>
<view class="title">{{getJobWorkTypeName(item.jobWorkType)}}</view>
</view>
<view class="title-line" v-if="queryParams.needsType==2">
<view class="type-tag yz">援助需求</view>
<view class="title">{{ item.demandTitle }}</view>
</view>
<view class="title-line" v-if="queryParams.needsType==3">
<view class="type-tag cy">创业需求</view>
<view class="title">{{ item.personName }}的创业需求</view>
</view>
<view class="title-line" v-if="queryParams.needsType==4">
<view class="type-tag px">培训需求</view>
<view class="title">{{ item.personName }}的培训需求</view>
</view>
<view class="title-line" v-if="queryParams.needsType==5">
<view class="type-tag qt">其他需求</view>
<view class="title">{{ item.personName }}的其他需求</view>
</view>
<view class="info"><text>需求状态</text><text
:class="item.currentStatus == 1 ? 'not' : item.currentStatus == 2 ? 'ing' : item.currentStatus == 3 ? 'finish' : '' ">
{{ getDictLabel(item.currentStatus, currentStatusList) }}
</text></view>
<view class="bottom-line">
<view class="info"><text>提交时间</text>{{ item.createTime }}</view>
<view style="font-size:12px;">左划删除需求</view>
</view>
</view>
</uni-swipe-action-item>
</uni-swipe-action>
<img v-if="!total&&!loading" src="https://rc.jinan.gov.cn/qcwjyH5/static/images/person/empty.png"
style="width: 100%;display: block;margin: 0 auto;" />
<view v-if="loading"><u-loading-icon></u-loading-icon>
<view style="text-align: center;color: #8E8E8E;font-size: 24rpx;">加载中~</view>
</view>
<view v-else-if="showMorePage" style="text-align: center;color: #1A62CE;font-size: 24rpx;">加载更多
</view>
<view class="addNeeds" @click="goAddNeeds()">
<img src="https://rc.jinan.gov.cn/qcwjyH5/static/images/person/addNeeds.png" />
</view>
</scroll-view>
</view>
</view>
</view>
</template>
<script>
import {
getPersonBase
} from "@/packageRc/apiRc/person";
import {
listJobService,
delJobService
} from '@/packageRc/apiRc/needs/jobService'
import { listPersonDemand, delPersonDemand } from "@/packageRc/apiRc/needs/personDemand";
import {
listAssistService,
delAssistService
} from '@/packageRc/apiRc/needs/assistService'
import {
listEntrepreneurshipService,
delEntrepreneurshipService
} from '@/packageRc/apiRc/needs/entrepreneurshipService'
import {
listTrainService,
delTrainService
} from '@/packageRc/apiRc/needs/trainService'
import { listJobType } from "@/packageRc/apiRc/jobType/index";
import {
listOtherService,
delOtherService
} from '@/packageRc/apiRc/needs/otherService'
export default {
components: {
},
onShow() {
console.log('search',34224234)
this.search();
},
data() {
return {
checkData: [],
options1: [{
text: '删除'
}],
queryParams: {
pageNum: 1,
pageSize: 10,
userId: '',
needsType: 1,
},
jobTypeList:[],
total: 0,
showMorePage: true,
tableData: [],
person: {},
loading: false,
currentStatusList: [],
}
},
mounted() {
},
onLoad({
dictValue,userId
}) {
dictValue ? this.queryParams.needsType = dictValue : ''
this.queryParams.userId = userId
this.$getDict('qcjy_xqlc').then(res => {
this.currentStatusList = res.data;
})
this.workTypeRemoteMethod()
this.$getDict('qcjy_zgzpgz').then(res => {
this.salaryList = res.data;
})
console.log(this.$store.state.user, 234234234)
getPersonBase(this.$store.state.user.userId).then(resp => {
this.person = resp.data || {}
// this.queryParams.personId = resp.data.id
})
},
methods: {
getJobWorkTypeName(data){
if (data) {
let arr = this.jobTypeList.filter((ele) => ele.id == data);
if(arr.length){
return arr[0].workTypeName;
}else{
return '--'
}
}
},
workTypeRemoteMethod(key) {
listJobType({
workTypeName: key,
pageNum: 1,
pageSize: 50,
}).then((res) => {
this.jobTypeList = res.rows;
});
},
goAddNeeds() {
uni.navigateTo({
url: `/packageRc/pages/needs/needDetail?userId=${this.$store.state.user.userId}&type=1&name=${this.$store.state.user.nick}`,
// url: `/packageRc/pages/needs/needDetail?activeType=${this.queryParams.needsType}&showTab=1`
})
},
goBack() {
uni.navigateBack()
},
clickDelete(item) {
this.loading = true;
if (this.queryParams.needsType == 1) {
delJobService(item.id).then((res) => {
this.deleteFinish(res)
});
} else if (this.queryParams.needsType == 2) {
delAssistService(item.id).then((res) => {
this.deleteFinish(res)
});
} else if (this.queryParams.needsType == 3) {
delEntrepreneurshipService(item.id).then((res) => {
this.deleteFinish(res)
});
} else if (this.queryParams.needsType == 4) {
delTrainService(item.id).then((res) => {
this.deleteFinish(res)
});
} else if (this.queryParams.needsType == 5) {
delOtherService(item.id).then((res) => {
this.deleteFinish(res)
});
}
},
deleteFinish() {
uni.showToast({
title: '删除成功'
})
this.search()
},
goNeedsDetail(item) {
uni.navigateTo({
url: `/packageRc/pages/needs/needDetail?id=${item.id}&type=${this.queryParams.needsType}`
})
},
getDictLabel(value, list) {
if (list) {
let arr = list.filter(ele => ele.dictValue == value)
if (arr.length) {
return arr[0].dictLabel
} else {
return '请选择'
}
}
},
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.tableData = [];
this.total = 0;
this.getList();
},
// 触底加载
getBottomList() {
if (
this.queryParams.pageNum * this.queryParams.pageSize >=
this.total
) {
this.showMorePage = false;
} else if (
this.queryParams.pageNum * this.queryParams.pageSize <
this.total
) {
this.queryParams.pageNum++;
this.getList();
if (
this.queryParams.pageNum * this.queryParams.pageSize >=
this.total
) {
this.showMorePage = false;
}
}
},
// 获取列表
async getList() {
console.log('getlist',this.queryParams.needsType, 234234234)
this.loading = true;
if (this.queryParams.needsType == 1) {
this.queryParams.demandType = 1
listPersonDemand(this.queryParams).then((res) => {
this.gettedData(res)
});
} else if (this.queryParams.needsType == 2) {
listAssistService(this.queryParams).then((res) => {
this.gettedData(res)
});
} else if (this.queryParams.needsType == 3) {
this.queryParams.demandType = 2
listPersonDemand(this.queryParams).then((res) => {
this.gettedData(res)
});
} else if (this.queryParams.needsType == 4) {
this.queryParams.demandType = 3
listPersonDemand(this.queryParams).then((res) => {
this.gettedData(res)
});
} else if (this.queryParams.needsType == 5) {
this.queryParams.demandType = 9
listPersonDemand(this.queryParams).then((res) => {
this.gettedData(res)
});
}
},
gettedData(res) {
console.log('this.gettedData')
if (res.code == 200) {
if (res.rows.length < 10) {
this.showMorePage = false;
}
this.loading = false;
this.tableData = this.tableData.concat(res.rows);
this.total = res.total;
} else {
this.loading = false;
uni.showToast({
title: res.msg,
icon: "none",
});
}
}
}
}
</script>
<style lang="scss" scoped>
.page {
background-color: #f4f4f4 !important;
height: 100vh;
// background-image: url('https://rc.jinan.gov.cn/qcwjyH5/static/images/top.png');
background-repeat: no-repeat;
background-size: 100% auto;
}
.search-line {
border-radius: 32px;
background: #FFFFFF;
box-sizing: border-box;
border: 1px solid #107AFD;
height: 64rpx;
border-radius: 32rpx;
padding: 0 32rpx;
display: flex;
align-items: center;
position: relative;
z-index: 1;
margin-top: 24rpx;
.search-icon {
width: 40rpx;
}
}
.job-item {
border-radius: 16rpx; /* 增大圆角,使界面更圆润 */
padding: 24rpx 32rpx;
margin: 0 30rpx 24rpx 30rpx; /* 添加左右30rpx边距 */
background-color: #FFFFFF; /* 设置白色背景,避免与底层背景重合 */
box-shadow: 0 2rpx 10rpx rgba(0, 0, 0, 0.05); /* 添加轻微阴影增强层次感 */
.title-line {
display: flex;
align-items: center;
justify-content: space-between;
font-size: 32rpx;
font-weight: bold;
margin-bottom: 16rpx;
.type-tag {
line-height: 40rpx;
width: 128rpx;
font-size: 24rpx;
color: #fff;
text-align: center;
&.qz {
background: #28CB5E;
}
&.yz {
background: #DD6728;
}
&.cy {
background: #23B5C5;
}
&.px {
background: #DDA728;
}
&.qt {
background: #2870DD;
}
}
.title {
color: #3D3D3D;
width: calc(100% - 137rpx);
overflow: hidden;
padding-left: 24rpx;
text-align: left;
text-overflow: ellipsis;
white-space: nowrap;
line-height: 40rpx;
}
.salary {
width: 33%;
color: #FA6553;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
text-align: right
}
}
.info {
color: #3D3D3D;
margin-bottom: 7rpx;
font-size: 28rpx;
text {
color: #8E8E8E;
}
.not {
color: #EC7737;
font-weight: bold;
}
.ing {
color: #ECB83D;
font-weight: bold;
}
.finish {
color: #21C88D;
font-weight: bold;
}
}
.bottom-line {
display: flex;
justify-content: space-between;
margin-top: 21rpx;
.info {
margin-bottom: 0;
}
.toudi-btn {
background: linear-gradient(90deg, #1A62CE 0%, #1D8ACE 100%);
color: #fff;
width: 140rpx;
line-height: 40rpx;
display: flex;
align-items: center;
justify-content: center;
font-size: 28rpx;
border-radius: 20rpx;
img {
width: 22rpx;
margin-right: 10rpx;
}
}
}
}
.addNeeds {
position: fixed;
right: 10px;
bottom: 150rpx;
width: 150rpx; /* 改小一点,比如 100rpx */
height: 10vh; /* 新增高度 */
overflow: hidden;
z-index: 10;
border-radius: 50rpx; /* 圆角要和宽高一半一致,才能正圆 */
img {
display: block;
width: 100%;
height: 100%; /* 让图片填满容器 */
object-fit: cover; /* 保证图片不变形,裁剪多余部分 */
}
}
.page-header {
display: flex;
align-items: center;
justify-content: space-between;
position: relative;
height: 80rpx; // 可根据实际调整
}
.back-icon {
flex-shrink: 0;
margin-left: 20rpx;
}
.title {
flex: 1;
text-align: center;
font-size: 32rpx;
color: #fff;
font-weight: bold;
}
</style>

View File

@@ -41,9 +41,9 @@
</view>
</view>
<view
style="position: relative; padding-top: 16px; color: #000;display: flex;align-items: center;justify-content: space-between;">
style="position: relative; color: #000;display: flex;align-items: center;justify-content: space-between;">
<view v-if="total">
<text style="color:font-size:12rpx;margin-left:10rpx;">{{ total }}条信息</text>
<text style="margin-left:10rpx;">{{ total }}条信息</text>
</view>
<view style="display: flex;width: 200rpx" class="sort-type">
<!-- <view class="sort-type" @click="showSortPicker=true">{{ sortType ? sortType : '排序方式' }}</view> -->
@@ -143,7 +143,7 @@
<!-- <view class="post_job_btn" @tap.stop="$tab.navigateTo('/pages/community/personEdit?type=add')">
</view> -->
<uni-popup :show="show" ref="show" @close="close" @open="open">
<uni-popup :show="show" ref="show" @close="close" @open="open" type="bottom" background-color="#fff">
<view class="dialog_div">
<view class="dialog_div_top">
<view @click="close">取消</view>
@@ -258,7 +258,7 @@
</uni-popup>
<!-- 社区端 - 显示隐藏退出组件 -->
<exitPopup />
<!-- <exitPopup /> -->
</view>
</template>
@@ -275,12 +275,10 @@ import {
import exitPopup from "../../components/exitPopup.vue";
import {
getDicts
} from '@/apiRc/system/dict.js'
import PopupList from "../../components/PopupLists.vue";
} from '@/packageRc/apiRc/system/dict.js'
export default {
name: "personnelList",
components: {
PopupList,
exitPopup,
},
data() {

View File

@@ -0,0 +1,481 @@
<template>
<view class="page" style="background-image: url('../../../packageRc/static/pageBg.png');">
<scroll-view :scroll-y="true" style="height: 100vh;position: relative;z-index: 1;">
<view class="input-outer-part"
style="padding: 24rpx 32rpx 0;max-height: unset;">
<view class="basic-info-content-main" v-if="!loading">
<view class="part-item" style="padding-top: 20rpx;">
<view style="display: flex" class="top-line">
<view
class="left"
>
<image src="/packageRc/static/cyzc.png" />
</view>
<view class="right">
<view class="title-line">{{ policyDetail.zcmc }}</view>
</view>
</view>
<view class="tags">
<view class="tag">政策{{ policyDetail.zcLevel }}</view>
</view>
<view class="infos">
<view class="info">发文单位{{ policyDetail.sourceUnit }}</view>
<view class="info">受理单位{{ policyDetail.acceptingUnit }}</view>
<view class="info">发布时间{{ policyDetail.publishTime || '--' }}</view>
<view class="info">浏览次数{{ policyDetail.viewNum }}</view>
</view>
</view>
<view class="main-ceontent-list">
<!-- 人才政策 -->
<view v-if="policyDetail.zcsylx == '1'">
<view
class="main-ceontent-list-item"
v-if="policyDetail.applicableObjects"
>
<view class="main-ceontent-list-item-title">政策对象</view>
<view class="main-ceontent-list-item-content">
<span
v-if="policyDetail.applicableObjects"
v-html="policyDetail.applicableObjects"
></span>
<span v-else> -- </span>
</view>
</view>
<view
class="main-ceontent-list-item"
v-if="policyDetail.policyExplanation"
>
<view class="main-ceontent-list-item-title">政策说明</view>
<view class="main-ceontent-list-item-content">
<span
v-if="policyDetail.policyExplanation"
v-html="policyDetail.policyExplanation"
></span>
<span v-else> -- </span>
</view>
</view>
<view
class="main-ceontent-list-item"
v-if="policyDetail.applyCondition"
>
<view class="main-ceontent-list-item-title">申报条件</view>
<view class="main-ceontent-list-item-content">
<span
v-if="policyDetail.applyCondition"
v-html="policyDetail.applyCondition"
></span>
<span v-else> -- </span>
</view>
</view>
<view class="main-ceontent-list-item" v-if="policyDetail.zczc">
<view class="main-ceontent-list-item-title">政策内容</view>
<view class="main-ceontent-list-item-content">
<span v-if="policyDetail.zczc" v-html="policyDetail.zczc"></span>
<span v-else> -- </span>
</view>
</view>
<view class="main-ceontent-list-item" v-if="policyDetail.validity">
<view class="main-ceontent-list-item-title">政策申报时间</view>
<view class="main-ceontent-list-item-content">
{{ policyDetail.validity || "--" }}
</view>
</view>
</view>
<view class="main-ceontent-list-item" v-if="policyDetail.zcsylx == '2'">
<view class="main-ceontent-list-item-title">政策文件</view>
<view class="main-ceontent-list-item-content">
<span v-if="policyDetail.zcwj" v-html="policyDetail.zcwj"></span>
<span v-else> -- </span>
</view>
</view>
<view class="main-ceontent-list-item" v-if="policyDetail.zcsylx == '2'">
<view class="main-ceontent-list-item-title">补贴标准</view>
<view class="main-ceontent-list-item-content">
<span v-if="policyDetail.btbz" v-html="policyDetail.btbz"></span>
<span v-else> -- </span>
</view>
</view>
<view class="main-ceontent-list-item" v-if="policyDetail.zcsylx == '2'">
<view class="main-ceontent-list-item-title">经办渠道</view>
<view class="main-ceontent-list-item-content">
<span v-if="policyDetail.jbqd" v-html="policyDetail.jbqd"></span>
<span v-else> -- </span>
</view>
</view>
<view class="main-ceontent-list-item" v-if="policyDetail.zcsylx == '2'">
<view class="main-ceontent-list-item-title">申报条件</view>
<view class="main-ceontent-list-item-content">
<span
v-if="policyDetail.applyCondition"
v-html="policyDetail.applyCondition"
></span>
<span v-else> -- </span>
</view>
</view>
</view>
<!-- 社保政策 -->
<view class="main-ceontent-list" v-if="policyDetail.zcsylx == '3'">
<view class="main-ceontent-list-item">
<view class="main-ceontent-list-item-title">政策内容</view>
<view class="main-ceontent-list-item-content">
<span v-if="policyDetail.zczc" v-html="policyDetail.zczc"></span>
<span v-else> -- </span>
</view>
</view>
</view>
<view class="main-ceontent-list">
<view class="main-ceontent-list-item" v-if="policyDetail.sourceUnit">
<view class="main-ceontent-list-item-title">发文单位</view>
<view class="main-ceontent-list-item-content">
{{ policyDetail.sourceUnit || "--" }}
</view>
</view>
<view class="main-ceontent-list-item" v-if="policyDetail.publishTime">
<view class="main-ceontent-list-item-title">发文时间</view>
<view class="main-ceontent-list-item-content">
{{ policyDetail.publishTime || "--" }}
</view>
</view>
<view class="main-ceontent-list-item" v-if="policyDetail.acceptingUnit">
<view class="main-ceontent-list-item-title">受理单位</view>
<view class="main-ceontent-list-item-content">
{{ policyDetail.acceptingUnit || "--" }}
</view>
</view>
<view class="main-ceontent-list-item" v-if="policyDetail.phone">
<view class="main-ceontent-list-item-title">咨询电话</view>
<view class="main-ceontent-list-item-content">
<span v-if="policyDetail.phone" v-html="policyDetail.phone"></span>
<span v-else> -- </span>
</view>
</view>
</view>
<view
class="main-ceontent-list"
v-if="
policyDetail.applyGuide && policyDetail.zcsylx == '2' && policyDetail.sqcl
"
>
<view class="main-ceontent-list-item" v-if="policyDetail.applyGuide">
<view class="main-ceontent-list-item-title">申报指南</view>
<view class="main-ceontent-list-item-content">
<span
v-if="policyDetail.applyGuide"
v-html="policyDetail.applyGuide"
></span>
<span v-else> -- </span>
</view>
</view>
<!-- <view
class="main-ceontent-list-item"
v-if="policyDetail.zcsylx == '1' && policyDetail.practicable"
>
<view class="main-ceontent-list-item-title">申报流程</view>
<view class="main-ceontent-list-item-content">
{{ policyDetail.practicable || "--" }}
</view>
</view> -->
<view class="main-ceontent-list-item" v-if="policyDetail.zcsylx == '2'">
<view class="main-ceontent-list-item-title">申请材料</view>
<view class="main-ceontent-list-item-content">
<span v-if="policyDetail.sqcl" v-html="policyDetail.sqcl"></span>
<span v-else> -- </span>
</view>
</view>
</view>
<!-- <view class="main-ceontent-list" v-if="policyDetail.fileList">
<view class="main-ceontent-list-item">
<view class="main-ceontent-list-item-title">文件列表</view>
<view class="main-ceontent-list-item-content">
<el-table
ref="fileTable"
v-loading="fileTableLoading"
:data="fileTableData"
highlight-current-row
style="width: 100%"
header-row-class-name="header_class"
border
>
<el-table-column
label="序号"
type="index"
align="center"
width="100"
/>
<el-table-column
prop="fileName"
label="文件名称"
align="center"
show-overflow-tooltip=""
>
<template #default="scope">
<el-button
link
type="primary"
@click="downLoadFile(scope.row)"
>
{{ scope.row.fileName }}
</el-button>
</template>
</el-table-column>
<el-table-column
prop="operation"
label="操作"
align="center"
width="200"
show-overflow-tooltip
>
<template #default="scope">
<el-button
type="primary"
link
@click.stop="downLoadFile(scope.row)"
>
下载
</el-button>
</template>
</el-table-column>
</el-table>
</view>
</view>
</view> -->
</view>
</view>
</scroll-view>
</view>
</template>
<script>
import { getPolicyDetail } from "@/packageRc/apiRc/policy";
export default {
data() {
return {
policyDetail: {},
loading: false,
}
},
onLoad(options) {
this.getPolicy(options.id);
},
onShow() {
},
methods: {
getPolicy(id) {
getPolicyDetail({id}).then(res => {
this.policyDetail = res.data
})
},
getDictLabel(value, list) {
if (list) {
let arr = list.filter(ele => ele.dictValue == value)
if (arr.length) {
return arr[0].dictLabel
} else {
return '--'
}
}
},
}
}
</script>
<style lang="scss" scoped>
.page {
background-color: #f4f4f4 !important;
height: 100vh;
background-repeat: no-repeat;
background-size: 100% auto;
}
.basic-info-content-main {
margin: 0 auto;
box-sizing: border-box;
}
.part-item{
background: #fff;
border-radius: 16rpx;
padding: 40rpx 32rpx;
margin-bottom: 32rpx;
}
.top-line {
display: flex;
margin-bottom: 24rpx;
align-items: center;
.left {
margin-right: 24rpx;
width: 86rpx;
color: #fff;
font-size: 22rpx;
height: 86rpx;
border-radius: 8rpx;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
image {
width: 100%;
height: 100%;
}
.text {
text-align: center;
}
}
.right {
width: calc(100% - 110rpx);
.title-line {
font-size: 32rpx;
font-weight: bold;
color: #3d3d3d;
width: 100%;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
}
}
.infos{
margin-top: 16rpx;
font-size: 24rpx;
.info{
margin-top: 5rpx;
color: #3D3D3D;
}
}
.part-title{
font-weight: bold;
font-size: 28rpx;
margin-bottom: 32rpx;
}
.part-info{
font-size: 28rpx;
}
.part-inline{
margin-bottom: 32rpx;
display: flex;
.part-title{
width: 180rpx;
text-align: right;
margin-bottom: 0;
}
.part-info{
margin-left: 20rpx;
flex-grow: 1;
flex-shrink: 1;
}
}
.notice-list {
.notice-item {
background-color: #fff;
color: #333;
// box-shadow: 0 0 10px #e4e4e4;
}
.title {
font-size: 36rpx;
text-align: center;
font-weight: bold;
margin-bottom: 8rpx;
}
.from-title {
font-size: 24rpx;
color: #a9b4c3;
text-align: center;
}
.notice-content {
min-height: 800rpx;
font-size: 24rpx;
text-align: justify;
padding-top: 20rpx;
border-top: 1rpx solid #d8d8d8;
margin-top: 14rpx;
}
}
.enclosure-list {
margin: 30rpx 0;
padding: 0 40rpx;
.enclosure-item {
font-size: 24rpx;
color: #006cd9;
}
}
.main-ceontent-list {
width: 100%;
border-radius: 4px;
min-height: 80rpx;
padding: 32rpx;
margin-top: 24rpx;
background-color: #fff;
box-sizing: border-box;
.main-ceontent-list-top {
font-family: Alimama ShuHeiTi;
font-size: 28rpx;
display: flex;
justify-content: space-between;
font-weight: bold;
}
.main-ceontent-list-title {
font-family: Source Han Sans;
font-size: 28rpx;
font-weight: bold;
line-height: normal;
text-align: center;
font-feature-settings: "kern" on;
color: #3d3d3d;
margin-top: 24rpx;
}
}
.main-ceontent-list-item {
margin-bottom: 24rpx;
.main-ceontent-list-item-title {
font-family: Source Han Sans;
font-size: 28rpx;
font-weight: bold;
line-height: 40rpx;
letter-spacing: 0.04em;
margin-bottom: 16rpx;
font-variation-settings: "opsz" auto;
font-feature-settings: "kern" on;
color: #055ed9;
}
.main-ceontent-list-item-content {
flex-direction: column;
box-sizing: border-box;
padding: 10px;
gap: 10px;
font-family: Source Han Sans;
font-size: 28rpx;
font-weight: normal;
line-height: 40rpx;
letter-spacing: 0.04em;
font-variation-settings: "opsz" auto;
font-feature-settings: "kern" on;
color: #000000;
background: linear-gradient(
270deg,
rgba(222, 233, 245, 0.32) 0%,
#dee9f5 100%
);
}
}
</style>

View File

@@ -0,0 +1,539 @@
<template>
<view class="page" style="background-image: url('../../../packageRc/static/pageBg.png');">
<view class="input-outer-part"
style="padding: 24rpx 32rpx 0;max-height: unset;">
<view class="search-line">
<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;"
@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="sign">推荐</view>
<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>
<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 style="padding-bottom: 24rpx;">
<img v-if="!total&&!loading" src="https://rc.jinan.gov.cn/qcwjyH5/static/images/person/empty.png"
style="width: 100%;display: block;margin: 0 auto;" />
<view v-if="loading"><u-loading-icon></u-loading-icon>
<view style="text-align: center;color: #8E8E8E;font-size: 24rpx;">加载中~</view>
</view>
<view v-else-if="showMorePage" style="text-align: center;color: #1A62CE;font-size: 24rpx;">加载更多
</view>
<view style="text-align: center;color: #8E8E8E;font-size: 24rpx;" v-else>没有更多数据了~</view>
</view>  
</scroll-view>
</view>
</view>
</template>
<script>
import PopupList from "/packageRc/components/PopupLists.vue";
import { getPolicyList } from "@/packageRc/apiRc/policy";
export default {
components: {
PopupList,
},
data() {
return {
checkData: [],
queryParams: {
pageNum: 1,
pageSize: 10,
},
total: 0,
showMorePage: true,
tableData: [],
loading: false,
}
},
onLoad() {
this.getCheckData()
},
onShow() {
this.search();
},
methods: {
goPolicyDetail(item) {
uni.navigateTo({
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.tableData = [];
this.total = 0;
this.getList();
},
// 触底加载
getBottomList() {
if (
this.queryParams.pageNum * this.queryParams.pageSize >=
this.total
) {
this.showMorePage = false;
} else if (
this.queryParams.pageNum * this.queryParams.pageSize <
this.total
) {
this.queryParams.pageNum++;
this.getList();
if (
this.queryParams.pageNum * this.queryParams.pageSize >=
this.total
) {
this.showMorePage = false;
}
}
},
// 获取列表
async getList() {
this.loading = true;
getPolicyList(this.queryParams).then((res) => {
this.gettedData(res)
});
},
gettedData(res) {
if (res.code == 200) {
if (res.rows.length < 10) {
this.showMorePage = false;
}
this.loading = false;
this.tableData = this.tableData.concat(res.rows);
this.total = res.total;
} else {
this.loading = false;
uni.showToast({
title: res.msg,
icon: "none",
});
}
},
}
}
</script>
<style lang="scss" scoped>
.page {
background-color: #f4f4f4 !important;
height: 100vh;
background-repeat: no-repeat;
background-size: 100% auto;
}
.search-line {
border-radius: 32px;
background: #FFFFFF;
box-sizing: border-box;
border: 1px solid #107AFD;
height: 64rpx;
border-radius: 32rpx;
padding: 0 32rpx;
display: flex;
align-items: center;
position: relative;
z-index: 1;
margin-top: 24rpx;
.search-icon {
width: 40rpx;
height: 40rpx;
}
}
.job-item {
position: relative;
margin-bottom: 24rpx;
background: #fff;
border-radius: 16rpx;
.item_btn{
height: 100rpx;
border-top: 1px solid #e3e8ee;
}
.line{
position: absolute;
right: 50%;
bottom: 20rpx;
width: 1px;
height: 60rpx;
background-color: #e3e8ee;
}
.status-card {
position: absolute;
right: 0;
top: 0;
border-radius: 0 16rpx 0 16rpx;
width: 160rpx;
line-height: 40rpx;
text-align: center;
color: #fff;
background: #B2C0D1;
border: 1px solid #9BA9B9;
font-size: 24rpx;
&.in {
background: #29D297;
border: 1px solid #1BBA83;
}
&.out {
background: #ECB83D;
border: 1px solid #D7892B;
}
&.far {
background: #EC7737;
border: 1px solid #C24F1A;
}
}
.top-container {
padding: 32rpx;
// margin-bottom: 24rpx;
.title-line {
display: flex;
align-items: center;
justify-content: space-between;
font-size: 32rpx;
font-weight: bold;
margin-bottom: 16rpx;
.type-tag {
line-height: 40rpx;
width: 128rpx;
font-size: 24rpx;
color: #fff;
text-align: center;
&.qz {
background: #28CB5E;
}
&.yz {
background: #DD6728;
}
&.cy {
background: #23B5C5;
}
&.px {
background: #DDA728;
}
&.qt {
background: #2870DD;
}
}
.title {
color: #3D3D3D;
width: calc(100% - 137rpx);
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
line-height: 40rpx;
}
.salary {
width: 33%;
color: #FA6553;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
text-align: right
}
}
.info {
color: #3D3D3D;
margin-bottom: 7rpx;
font-size: 28rpx;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
text {
color: #8E8E8E;
}
.not {
color: #EC7737;
font-weight: bold;
}
.ing {
color: #ECB83D;
font-weight: bold;
}
.finish {
color: #21C88D;
font-weight: bold;
}
}
}
.function-btn {
color: #BF5818;
border-top: 1px solid #E2E8EF;
padding-bottom: 6rpx;
line-height: 90rpx;
text-align: center;
}
}
.self-form {
padding: 32rpx;
.bordered {
border: 1rpx solid #dadbde;
padding: 9px;
border-radius: 4px;
}
}
.button-area {
padding: 24rpx 32rpx 68rpx;
background: #fff;
display: flex;
box-sizing: border-box;
border-radius: 16px 16px 0px 0px;
box-shadow: 0 0 5px rgba(0, 0, 0, 0.1);
.btn {
line-height: 72rpx;
width: 176rpx;
margin-right: 16rpx;
font-size: 28rpx;
border: 1px solid #B8C5D4;
color: #282828;
text-align: center;
border-radius: 8rpx;
}
.reset {
background: #DCE2E9;
}
.save {
background: linear-gradient(103deg, #1D64CF 0%, #1590D4 99%);
color: #fff;
border: 0;
flex-grow: 1;
}
}
.noValue {
color: rgb(192, 196, 204);
}
.addNeeds {
position: fixed;
right: 0;
bottom: 150rpx;
width: 150rpx;
overflow: hidden;
z-index: 10;
border-radius: 44rpx;
border-radius: 75rpx;
img {
display: block;
width: 100%;
}
}
.df_flex{
display: flex;
view{
flex-grow: 1;
text-align: center;
color: #4c6efb;
}
}
.df_flex_1{
flex: 1;
}
.df__direction_column {
flex-direction: column;
}
.df_align_center{
align-items: center;
}
.df_justify_center{
justify-content: center;
}
.df_content_between{
justify-content: space-between;
}
.df_shrink_0{
flex-shrink: 0;
}
/* 日期选择器样式 */
.date-picker-wrapper {
display: flex;
justify-content: space-between;
align-items: center;
width: 100%;
box-sizing: border-box;
padding: 0 24rpx;
height: 64rpx;
border: 1px solid #ddd;
border-radius: 4px;
background-color: #fff;
}
// .date-picker-wrapper.noValue {
// background-color: #f9f9f9;
// }
.date-value {
color: #333;
width: 100%
}
.policy-list{
width: 100%;
margin: 0 auto;
color: #333333;
border-radius: 24rpx;
background: #FFFFFF;
padding: 32rpx;
margin-bottom: 24rpx;
box-sizing: border-box;
position: relative;
.sign{
position: absolute;
font-size: 24rpx;
right: 0;
top: 0;
padding: 4rpx 14rpx;
border: 1rpx solid #EC4827;
background: rgba(227, 79, 49, 0.09);
border-top-right-radius: 24rpx;
border-bottom-left-radius: 24rpx;
color: #EC4827;
}
.top-line{
display: flex;
justify-content: space-between;
font-size: 24rpx;
color: #A2A2A2;
margin-bottom: 16rpx;
.salary{
font-size: 32rpx;
color: #4C6EFB;
font-weight: bold;
}
}
.title{
font-size: 32rpx;
font-weight: bold;
color: #282828;
margin-bottom: 16rpx;
display: flex;
image{
width: 46rpx;
height: 46rpx;
margin-right: 11rpx;
}
}
.infos{
display: flex;
flex-wrap: wrap;
font-size: 24rpx;
margin-bottom: 16rpx;
line-height: 42rpx;
view{
padding: 0 16rpx;
margin-right: 10rpx;
background: #F2F2F2;
}
}
.bottom-line{
display: flex;
justify-content: space-between;
font-size: 24rpx;
color: #A2A2A2;
margin-top: 12rpx;
}
}
</style>

View File

@@ -0,0 +1,134 @@
<template>
<uni-popup ref="showPersonChooser" type="bottom" round background-color="#fff">
<view style="width: 100%;position: relative;z-index: 100;box-sizing: border-box;background: #fff;padding-top: 10px;">
<input class="search" @change="searchChange" placeholder="搜索选择人员" v-model="searchPerson"/>
<scroll-view style="height: 500rpx;padding: 0 32rpx;box-sizing: border-box;" :scroll-y="true">
<view v-for="(item, index) in personList" :key="index" @click="bindPerson(item)"
class="person-list" :class="{active: activePerson.id == item.id}">
<template v-if="choiceType==3">
<view>{{ item.personName }}</view>
<view style="color: #8492a6;margin-top: 7rpx;">期望工种{{item.jobWorkTypeName}}</view>
</template>
<template v-else-if="choiceType==4">
<view>{{ item.personName }}</view>
<view style="color: #8492a6;margin-top: 7rpx;">意愿培训工种{{item.trainingIntentionWorkTypeName}}</view>
</template>
<template v-else>
<view style="display: flex;justify-content: space-between;font-size: 32rpx;font-weight: bold;">{{ item.name }}
<view style="color: #8492a6; font-size: 13px;width: 50%;text-align: right;">{{ item.phone }}</view>
</view>
<view style="color: #8492a6;margin-top: 7rpx;">现居住地{{item.currentResidentialAddress}}</view>
</template>
</view>
</scroll-view>
<view class="button-area" style="position: relative;">
<view class="btn" @click="closeshowPersonChooser">取消</view>
<view class="btn reset" @click="resetData">重置</view>
<view class="btn save" @click="saveInfo">确定</view>
</view>
</view>
</uni-popup>
</template>
<script>
import {getPersonList} from '@/packageRc/apiRc/needs/person'
import { listJobService } from "@/packageRc/apiRc/needs/jobService";
import { listTrainService } from "@/packageRc/apiRc/needs/trainService";
export default {
props: {
choiceType: {
default: 1
}
},
mounted() {
this.doSearch()
},
data() {
return {
showPersonChooser: false,
activePerson: {},
searchPerson: '',
personList: [],
searcher: '',
}
},
methods: {
open() {
this.$refs.showPersonChooser.open();
this.activePerson = {}
},
closeshowPersonChooser() {
this.$refs.showPersonChooser.close()
},
saveInfo() {
this.$emit('confirm', this.activePerson)
this.$refs.showPersonChooser.close()
},
searchChange(){
console.log('搜索内容:' + this.searchPerson);
if(this.searcher){
clearTimeout(this.searcher)
this.doSearch()
}else{
this.doSearch()
}
},
doSearch() {
this.searcher = setTimeout(() => {
uni.showLoading('加载中...');
// alert("选择的choiceType" + this.choiceType );
if(this.choiceType == 3) {
listJobService({personName: this.searchPerson, pageSize: 100, pageNum: 1}).then(res => {
uni.hideLoading();
this.personList = res.rows
clearTimeout(this.searcher)
})
}else if(this.choiceType == 4) {
listTrainService({personName: this.searchPerson, pageSize: 100, pageNum: 1}).then(res => {
uni.hideLoading();
this.personList = res.rows
clearTimeout(this.searcher)
})
}else{
getPersonList({name: this.searchPerson, pageSize: 100, pageNum: 1}).then(res => {
uni.hideLoading();
this.personList = res.rows
clearTimeout(this.searcher)
})
}
}, 200)
},
resetData(){
this.searchPerson = '';
this.personList = [];
this.activePerson = {}
},
bindPerson(item) {
this.activePerson = item;
this.$forceUpdate();
},
}
}
</script>
<style lang="scss" scoped>
.person-list{
padding: 24rpx 32rpx;
border-radius: 8rpx;
box-sizing: border-box;
border: 1px solid #e4e4e4;
margin-top: 32rpx;
&.active{
border: 1px solid #1890ff;
}
}
.search{
margin: 0 32rpx;
border: 1px solid #e4e4e4;
border-radius: 50rpx;
height: 64rpx;
padding: 0 20rpx;
}
</style>

View File

@@ -0,0 +1,752 @@
<!--
* @Date: 2024-10-08 14:29:36
* @LastEditors: shirlwang
* @LastEditTime: 2025-11-04 16:18:33
-->
<template>
<view class="input-outer-part">
<scroll-view scroll-y="true" :style="{height: edit?'calc(100vh - 150px)':'calc(100vh - 144px)'}">
<view class="inner">
<view class="part-title" style="display: flex;justify-blqksm: space-between;">服务信息
<view v-if="!edit&&formData.id" class="btn" style="font-weight: normal;display: flex;"
@click="edit=true">编辑<u-icon name="edit-pen" color="#A6A6A6"></u-icon></view>
</view>
<view class="inner-part">
<u--form labelPosition="left" :model="formData" :rules="rules" ref="uForm" class="self-form"
labelWidth="110">
<u-form-item label="类型" v-if="!userId" required>
<view class="status_radio df_flex df_flex_1">
<u-radio-group v-model="formData.type" placement="column">
<u-radio v-for="(item, index) in validType" :key="index" :label="item.label"
:name="item.value">
</u-radio>
</u-radio-group>
</view>
</u-form-item>
<u-form-item label="被服务对象" prop="serviceObjectName" required v-if="formData.type == 0">
<view class="picker-view" :class="{selected: formData.serviceObjectName}" @click="openPersonChooser">
<text :class="formData.serviceObjectName ? 'picker-text' : 'picker-placeholder'">
{{ formData.serviceObjectName || '请选择被服务对象' }}
</text>
</view>
</u-form-item>
<u-form-item label="被服务对象" prop="serviceObjectName" required v-else>
<view class="picker-view" :class="{selected: formData.serviceObjectName}" @click="$refs.enterpriseChooser.open()">
<text :class="formData.serviceObjectName ? 'picker-text' : 'picker-placeholder'">
{{ formData.serviceObjectName || '请选择被服务对象' }}
</text>
</view>
</u-form-item>
<u-form-item label="服务时间" prop="practicalSolutionTime" required>
<view class="picker-view" :class="{selected: formData.practicalSolutionTime}" @click="showPicker('practicalSolutionTime')">
<text :class="formData.practicalSolutionTime ? 'picker-text' : 'picker-placeholder'">
{{ formData.practicalSolutionTime || '请选择服务时间' }}
</text>
</view>
</u-form-item>
<u-form-item label="经办人" prop="agentUserName" required>
<u--input :disabled="!edit" v-model="formData.agentUserName" border="none"
placeholder="请输入"></u--input>
<u-icon slot="right" name="edit-pen" color="#A6A6A6"></u-icon>
</u-form-item>
<u-form-item label="服务类型" prop="demandType" required>
<view class="picker-view" :class="{selected: formData.demandType}" @click="showPicker('demandType')">
<text :class="formData.demandType ? 'picker-text' : 'picker-placeholder'">
{{ getDictLabel(formData.demandType, dict.demandType) || '请选择服务类型' }}
</text>
</view>
</u-form-item>
<u-form-item label="服务内容" prop="serviceContent" required>
<view class="picker-view" :class="{selected: formData.serviceContent}" @tap="showServiceContentSelect">
<text :class="formData.serviceContent ? 'picker-text' : 'picker-placeholder'">
{{ getMultiDictLabel(formData.serviceContent, dict.serviceContent) || '请选择服务内容' }}
</text>
</view>
</u-form-item>
<u-form-item label="电话沟通结果" prop="dhgtjg" v-if="formData.demandType == '5'" required>
<view class="picker-view" :class="{selected: formData.dhgtjg}" @click="showPicker('dhgtjg')">
<text :class="formData.dhgtjg ? 'picker-text' : 'picker-placeholder'">
{{ getDictLabel(formData.dhgtjg, dict.dhgtjg) || '请选择电话沟通结果' }}
</text>
</view>
</u-form-item>
<!-- 新增人员状态展示方式与服务类型一致 -->
<u-form-item label="人员状态" prop="personStatus" required >
<view class="picker-view" :class="{selected: formData.personStatus}" @click="showPicker('personStatus')">
<text :class="formData.personStatus ? 'picker-text' : 'picker-placeholder'">
{{ getDictLabel(formData.personStatus, dict.personStatus) || '请选择人员状态' }}
</text>
</view>
</u-form-item>
<u-form-item label="服务情况说明" prop="blqksm" required>
<u-textarea :disabled="!edit" v-model="formData.blqksm" placeholder="请输入"></u-textarea>
</u-form-item>
</u--form>
</view>
</view>
<view class="inner">
<view class="part-title" style="margin-top: 32rpx;">附件信息</view>
<view class="inner-part">
<u--form labelPosition="left" class="self-form" labelWidth="110">
<u-form-item label="附件" prop="fileUrl">
<ImageUpload :fileList="fileList" @update="changeFile" :maxCount="6" />
</u-form-item>
</u--form>
</view>
</view>
<!-- 办理完成后 需求说明 -->
<req-comp :form="{
actualSolveDate: formData.actualSolveDate,
actualSolvePeople: formData.actualSolvePeople,
solveDesc: formData.solveDesc,
fileUrl: formData.fileUrl
}" />
</scroll-view>
<u-datetime-picker :show="show.practicalSolutionTime" v-model="hopeSolveDate" mode="date" @confirm="confirmDate('practicalSolutionTime', $event)"
@cancel="cancelPicker('practicalSolutionTime')" @close="cancelPicker('practicalSolutionTime')" closeOnClickOverlay></u-datetime-picker>
<choose-person ref="personChooser" @confirm="personNameConfirm" />
<enterprise-list-pop ref="enterpriseChooser" @confirm="enterpriseConfirm" />
<u-picker :show="show.dhgtjg" :columns="[dict.dhgtjg]" keyName="dictLabel"
@confirm="pickerConfirm('dhgtjg', $event)" @cancel="cancelPicker('dhgtjg')"></u-picker>
<u-picker :show="show.demandType" :columns="[dict.demandType]" keyName="dictLabel"
@confirm="pickerConfirm('demandType', $event)" @cancel="cancelPicker('demandType')"></u-picker>
<u-picker :show="show.personStatus" :columns="[dict.personStatus]" keyName="dictLabel"
@confirm="pickerConfirm('personStatus', $event)" @cancel="cancelPicker('personStatus')"></u-picker>
<u-popup :show="show.serviceContent" mode="bottom" @close="cancelSelect">
<view class="select-content">
<view class="select-header">
<text @tap="cancelSelect">取消</text>
<text class="title">服务内容</text>
<text @tap="confirmSelect">确定</text>
</view>
<scroll-view scroll-y class="checkbox-scroll">
<view class="checkbox-group">
<u-checkbox-group v-model="tempServiceContent" placement="column">
<view
v-for="(item, index) in dict.serviceContent"
:key="index"
class="checkbox-item"
>
<u-checkbox
:name="item.dictValue"
:label="item.dictLabel"
></u-checkbox>
</view>
</u-checkbox-group>
</view>
</scroll-view>
</view>
</u-popup>
<view class="button-area" v-if="edit">
<view class="btn" @click="cancelPage">取消</view>
<view class="btn reset" @click="formData = {}" v-if="!formData.id">重置</view>
<view class="btn save" @click="saveInfo">保存</view>
</view>
</view>
</template>
<script>
import {
addInvestigate,
updateInvestigate,
getInvestigate
} from "@/packageRc/apiRc/service/investigate";
import ImageUpload from '@/packageRc/components/ImageUpload'
import ChoosePerson from './choosePerson.vue';
export default {
components: {
ChoosePerson,
ImageUpload,
},
props: {
userId: {
type: String,
default: ''
},
name:{
type: String,
default: ''
}
},
data() {
return {
edit: true,
personBase: {},
dates: {},
hopeSolveDate: Number(new Date()),
formData: {
type: 0,
serviceContent: [],
personStatus: '' // 新增字段
},
rules: {
serviceObjectName: [{
required: true,
message: '请选择被服务人员',
trigger: ['blur', 'change'],
}, ],
unitName: [{
required: true,
message: '请选择被服务对象',
trigger: ['blur', 'change'],
}],
practicalSolutionTime: [{
required: true,
message: '请选择服务时间',
trigger: ['blur', 'change'],
}, ],
agentUserName: [{
required: true,
message: '请填写服务人员',
trigger: ['blur', 'change'],
}, ],
demandType: [{
required: true,
message: '请填写服务类型',
trigger: ['blur', 'change'],
}, ],
blqksm:[{
required: true,
message: '请填写服务情况说明',
trigger: ['blur', 'change'],
}],
dhgtjg: [
{
required: false,
validator: (rule, value, callback) => {
if (this.formData.demandType === '5' && (!value || value === '')) {
callback(new Error('请输入电话沟通结果'));
} else {
callback();
}
},
trigger: ['blur', 'change'],
}
],
personStatus: [{
required: true,
message: '请选择人员状态',
trigger: ['blur', 'change'],
}]
},
dict: {
serviceContent: [],
personStatus: [] // 新增
},
show: {
serviceContent: false,
personStatus: false // 新增
},
loading: false,
fileList: [],
validType: [{
label: "个人",
value: "0",
},
{
label: "企业",
value: "1",
},
],
serviceContentList: [],
tempServiceContent: [],
}
},
onReady() {
this.$refs.uForm.setRules(this.rules)
},
created() {
this.serviceontent();
this.loading = true;
let arr = [{
key: 'qyjy_dhgtjg',
prop: 'dhgtjg'
},
{
key: 'qyjy_zdfwlx',
prop: 'demandType'
},
// 新增人员状态字典
{
key: 'qcjy_ryzt', // 如有实际key请替换
prop: 'personStatus'
},
]
arr.forEach(ele => {
this.$getDict(ele.key).then(res => {
this.dict[ele.prop] = res.data
this.$forceUpdate();
})
})
this.$getDict("qcjy_fwnr").then(res => {
console.log("获取到的服务内容数据:", res.data);
this.dict.serviceContent = res.data;
this.$forceUpdate();
});
},
mounted() {
setTimeout(() => {
this.setName()
}, 0)
},
methods: {
serviceontent(){
this.$getDict("qcjy_fwnr").then(res=>{
console.log("服务内容列表",res.data)
})
},
cancelPage() {
if (this.formData.id) {
this.edit = false;
this.getDetail(this.formData.id)
} else {
uni.navigateBack()
}
},
setName(){
this.formData.serviceObjectName = this.name
this.formData.serviceObjectId = this.userId
this.formData.userId = this.userId
this.$forceUpdate();
},
openPersonChooser() {
if (this.edit) {
this.$refs.personChooser.open();
}
},
personNameConfirm(event) {
this.formData.serviceObjectName = event.name
this.formData.serviceObjectId = event.id
this.$forceUpdate();
},
// 选择企业
enterpriseConfirm({
unitName,
id
}) {
this.$set(this.formData, 'serviceObjectName', unitName)
this.$set(this.formData, 'serviceObjectId', id)
},
changeFile(e) {
// 清空当前的 fileUrl 数组
this.formData.fileUrl = [];
// 如果 e 有长度(即用户选择了文件)
if (e.length) {
// 遍历每个文件对象并获取其 url
for (let data of e) {
const url = data.data ? data.data.url : data.url;
this.formData.fileUrl.push(url);
}
}
this.formData.fileUrl = this.$arrayToString(this.formData.fileUrl)
},
addOne() {
this.formData = {
type: "0"
}
this.edit = true
},
getDetail(id) {
getInvestigate(id).then(res => {
const data = res.data;
// 处理服务内容为数组
if (data.serviceContent) {
data.serviceContent = typeof data.serviceContent === 'string'
? data.serviceContent.split(',').filter(Boolean)
: data.serviceContent;
} else {
data.serviceContent = [];
}
this.formData = data;
this.edit = false;
this.fileList = this.$processFileUrl(this.formData.fileUrl);
})
},
confirmDate(type, e) {
this.show[type] = false;
// 获取选中的日期
const date = e.value;
// 使用 uView 的 uTime 方法格式化日期,包含时分秒
const formattedDateTime = uni.$u.timeFormat(date, "yyyy-mm-dd hh:MM:ss");
this.formData[type] = formattedDateTime
this.$forceUpdate();
},
goBack() {
uni.navigateBack();
},
cancelPicker(type) {
this.show[type] = false
this.$forceUpdate();
},
getDictLabel(value, list) {
if (list) {
let arr = list.filter(ele => ele.dictValue == value)
if (arr.length) {
return arr[0].dictLabel
} else {
return '请选择'
}
}
},
pickerConfirm(type, event) {
this.show[type] = false;
if (type === 'serviceContent') {
// 多选处理
this.formData[type] = event.value.map(item => item.dictValue);
} else {
// 其他字段保持原样
this.formData[type] = event.value[0].dictValue;
}
this.$forceUpdate();
},
showPicker(type) {
if (this.edit) {
this.show[type] = true
this.$forceUpdate()
}
},
async saveInfo() {
try {
const isValid = await this.$refs.uForm.validate();
if (!isValid) {
throw new Error('请检查必填项填写');
}
let demandType = this.formData.demandType;
// 确保 serviceContent 是数组并且有值
if (!Array.isArray(this.formData.serviceContent) || this.formData.serviceContent.length === 0) {
this.$u.toast("请选择服务内容!");
return;
}
// 处理服务内容数组
this.formData.fwnr = this.formData.serviceContent.join(',');
// 显示全局加载
this.$showLoading();
// 根据 formData 是否有 id 来决定是更新还是新增
let response;
let successMessage;
if (this.formData.id) {
response = await updateInvestigate(this.formData);
successMessage = '修改成功';
} else {
console.log("h5表单",this.formData)
delete this.formData.type
response = await addInvestigate(this.formData);
successMessage = '保存成功';
}
// 检查响应码是否为200
if (response.code === 200) {
this.$u.toast(successMessage);
// 如果是编辑模式,关闭编辑状态;否则返回上一页
if (this.formData.id) {
this.edit = false;
} else {
await this.$delay(1000); // 延迟1秒后返回上一页
uni.navigateBack();
}
}
} catch (error) {
this.$u.toast("请填写完整内容");
} finally {
// 确保加载页总是会被隐藏
this.$hideLoading();
}
},
getMultiDictLabel(values, list) {
if (!values || !list) return '';
const valueArray = typeof values === 'string' ? values.split(',') : values;
if (!Array.isArray(valueArray)) return '';
return valueArray.map(value => {
const item = list.find(ele => ele.dictValue == value);
return item ? item.dictLabel : '';
}).filter(Boolean).join('、');
},
checkboxGroupChange(values) {
this.formData.serviceContent = values;
this.$forceUpdate();
},
processServiceContentList() {
this.serviceContentList = this.dict.serviceContent.map(item => ({
label: item.dictLabel,
value: item.dictValue
}));
},
showServiceContentSelect() {
console.log("点击了服务内容");
if (this.edit) {
this.tempServiceContent = Array.isArray(this.formData.serviceContent)
? [...this.formData.serviceContent]
: [];
this.show.serviceContent = true;
this.$forceUpdate();
}
},
cancelSelect() {
console.log("取消选择");
this.show.serviceContent = false;
this.$forceUpdate();
},
confirmSelect() {
console.log("确认选择", this.tempServiceContent);
this.formData.serviceContent = [...this.tempServiceContent];
this.show.serviceContent = false;
this.$forceUpdate();
},
}
}
</script>
<style lang="scss">
.page ::v-deep .u-navbar__content {
background-color: transparent !important;
}
.input-outer-part {
.status_radio {
.u-radio-group {
display: flex;
flex-direction: row;
}
.u-radio {
margin-right: 50rpx;
}
}
}
.page {
background-color: #EEF1F5 !important;
height: 100vh;
background-image: url('https://rc.jinan.gov.cn/qcwjyH5/static/images/top.png');
background-repeat: no-repeat;
background-size: 100% auto;
}
.button-area {
padding: 24rpx 32rpx 68rpx;
width: calc(100% + 64rpx);
margin-left: -32rpx;
background: #fff;
display: flex;
box-sizing: border-box;
margin-top: 40rpx;
border-radius: 16px 16px 0px 0px;
.btn {
line-height: 72rpx;
width: 176rpx;
margin-right: 16rpx;
font-size: 28rpx;
border: 1px solid #B8C5D4;
color: #282828;
text-align: center;
border-radius: 8rpx;
}
.reset {
background: #DCE2E9;
}
.save {
background: linear-gradient(103deg, #1D64CF 0%, #1590D4 99%);
color: #fff;
border: 0;
flex-grow: 1;
}
}
.noValue {
color: rgb(192, 196, 204);
}
.disabledLine {
background: rgb(245, 247, 250);
cursor: not-allowed;
}
// 改进选择器样式
.picker-view {
display: flex;
align-items: center;
justify-content: space-between;
width: 100%;
padding: 28rpx 36rpx;
background: #ffffff;
border: 2rpx solid #e5e5e5;
border-radius: 12rpx;
min-height: 88rpx;
box-sizing: border-box;
transition: all 0.3s ease;
position: relative;
&:active {
background: #f8f9fa;
border-color: #007aff;
transform: scale(0.98);
}
&::after {
content: '';
position: absolute;
right: 36rpx;
top: 50%;
transform: translateY(-50%);
width: 0;
height: 0;
border-left: 12rpx solid transparent;
border-right: 12rpx solid transparent;
border-top: 12rpx solid #999999;
}
.picker-text {
color: #333333;
font-size: 28rpx;
flex: 1;
}
.picker-placeholder {
color: #999999;
font-size: 28rpx;
}
}
// 选中状态的样式
.picker-view.selected {
border-color: #1D64CF;
background: #f0f8ff;
&::after {
border-top-color: #1D64CF;
}
}
.checkbox-container {
padding: 10rpx 0;
.u-checkbox-group {
display: flex;
flex-wrap: wrap;
gap: 20rpx;
}
.u-checkbox {
margin-right: 30rpx;
margin-bottom: 20rpx;
}
}
.select-content {
background-color: #fff;
border-radius: 24rpx 24rpx 0 0;
.select-header {
display: flex;
justify-content: space-between;
align-items: center;
padding: 30rpx;
border-bottom: 1px solid #EBEEF5;
text {
font-size: 28rpx;
&:first-child {
color: #909399;
padding: 10rpx 20rpx;
}
&:last-child {
color: #1D64CF;
font-weight: 500;
padding: 10rpx 20rpx;
}
&.title {
font-size: 32rpx;
color: #303133;
font-weight: 500;
}
}
}
.checkbox-scroll {
max-height: 700rpx;
padding: 20rpx 0;
}
.checkbox-group {
padding: 0 30rpx;
}
.checkbox-item {
padding: 24rpx 0;
border-bottom: 1px solid #F2F6FC;
display: flex;
align-items: center;
&:last-child {
border-bottom: none;
}
// 修改 checkbox 样式
::v-deep .u-checkbox {
width: 100%;
margin: 0;
display: flex;
align-items: center;
&__label {
font-size: 28rpx;
color: #303133;
margin-left: 16rpx;
}
&__icon-wrap {
width: 36rpx;
height: 36rpx;
border-radius: 6rpx;
border: 2rpx solid #DCDFE6;
display: flex;
align-items: center;
justify-content: center;
&--checked {
background-color: #1D64CF;
border-color: #1D64CF;
}
}
}
}
}
// 增加选中态的样式
::v-deep .u-checkbox__icon-wrap--checked {
.u-checkbox__icon {
color: #fff;
transform: scale(0.8);
}
}
</style>

View File

@@ -0,0 +1,629 @@
<!--
* @Date: 2024-10-08 14:29:36
* @LastEditors: shirlwang
* @LastEditTime: 2025-11-04 16:18:56
-->
<template>
<view>
<view class="input-outer-part">
<scroll-view scroll-y="true" :style="{height: edit?'calc(100vh - 200rpx)':'calc(100vh - 194rpx)'}">
<view class="inner">
<view class="part-title" style="display: flex;justify-content: space-between;">服务信息
<view v-if="!edit&&formData.id" class="btn" style="font-weight: normal;display: flex;"
@click="edit=true">编辑<u-icon name="edit-pen" color="#A6A6A6"></u-icon></view>
</view>
<view class="inner-part">
<view class="self-form">
<view class="form-item">
<view class="form-label ">人员姓名<text class="required">*</text></view>
<view style="width: calc(100% - 120rpx);word-break: break-all;" @click="openPersonChooser"
:class="{disabledLine: !edit, noValue: !formData.personName}">
{{ formData.personName || '请选择' }}
</view>
<view class="icon-right" style="width: 40rpx; height: 40rpx;"></view>
</view>
<view class="form-item">
<view class="form-label ">标题<text class="required">*</text></view>
<textarea :disabled="!edit" v-model="formData.recommendTopic"
:class="['form-textarea', { 'form-textarea-disabled': !edit }]"
placeholder="请输入"></textarea>
<view class="icon-right" style="width: 40rpx; height: 40rpx;"></view>
</view>
<view class="form-item">
<view class="form-label ">备注</view>
<textarea :disabled="!edit" v-model="formData.remark"
:class="['form-textarea', { 'form-textarea-disabled': !edit }]"
placeholder="请输入"></textarea>
<view class="icon-right" style="width: 40rpx; height: 40rpx;"></view>
</view>
<view class="form-item">
<view class="form-label ">附件</view>
<ImageUpload :fileList="fileList" @update="changeFile" :maxCount="6" />
</view>
</view>
</view>
</view>
<view class="inner" v-if="showInfo != '1'">
<view class="part-title" style="margin-top: 32rpx;">求职需求信息</view>
<view class="inner-part">
<view class="self-form">
<view class="form-item">
<view class="form-label ">求职工种</view>
<view style="width: calc(100% - 120rpx);word-break: break-all;"
class="disabledLine">
{{ getJobWorkTypeName(activePersonInfo.jobWorkType) }}
</view>
</view>
<view class="form-item">
<view class="form-label ">最低薪酬</view>
<view style="width: calc(100% - 120rpx);word-break: break-all;"
class="disabledLine">
{{ activePersonInfo.minRecruitmentSalary || '--' }}
</view>
</view>
<view class="form-item">
<view class="form-label ">最高薪酬</view>
<view style="width: calc(100% - 120rpx);word-break: break-all;"
class="disabledLine">
{{ activePersonInfo.highRecruitmentSalary || '--' }}
</view>
</view>
</view>
<view class="tuijian-btn" v-if="edit" @click="showPositionChooser">推荐岗位</view>
</view>
</view>
<view class="inner">
<view class="part-title" style="margin-top: 32rpx;">人员推荐记录</view>
<view class="inner-part">
<view v-for="(item, index) in tuijianList" :key="index" class="job-list">
<view>{{ item.postName }}</view>
<view style="color: #8492a6;margin-top: 7rpx;">工种{{item.recruitWorkTypeName}}</view>
<view style="color: #8492a6;margin-top: 7rpx;">单位名称{{item.unitName}}</view>
<view class="del-btn" @click="removeTuijian(item)">删除</view>
</view>
<img v-if="!tuijianList.length" src="https://rc.jinan.gov.cn/qcwjyH5/static/images/person/empty.png"
style="width: 100%;display: block;margin: 0 auto;" />
<view v-if="!tuijianList.length" style="text-align: center;color: #8E8E8E;font-size: 24rpx;">暂无数据~
</view>
</view>
</view>
<!-- 办理完成后 需求说明 -->
<req-comp :form="{
actualSolveDate: formData.actualSolveDate,
actualSolvePeople: formData.actualSolvePeople,
solveDesc: formData.solveDesc,
fileUrl: formData.fileUrl
}" />
</scroll-view>
<choose-person style="width: 100%;position: relative;z-index: 2;" :choiceType="3" ref="personChooser" @confirm="personNameConfirm" />
<positionChooser ref="positionChooser" @confirm="jobListConfirm" />
<!-- <u-datetime-picker :show="show.actualSolveDate" v-model="dates.actualSolveDate" mode="date"
@confirm="confirmDate('actualSolveDate', $event)"
@cancel="cancelPicker('hopeSolveDate')"></u-datetime-picker> -->
<!-- <uni-popup ref="openDeal" style="position: relative;z-index: 2;">
<u--form class="self-form popup" labelPosition="top" :model="formData" :rules="rules" ref="uForm"
labelWidth="300" style="width: calc(100% - 64rpx);margin: 0 auto;">
<u-form-item label="实际办理时间" prop="actualSolveDate" required>
<view class="bordered" style="width: 100%;" @click="showPicker('actualSolveDate')"
:class="{noValue: !formData.actualSolveDate}">{{ formData.actualSolveDate||'请选择' }}</view>
<u-icon slot="right" name="arrow-down" color="#A6A6A6"></u-icon>
</u-form-item>
<u-form-item label="办理说明" prop="solveDesc" required>
<u-textarea v-model="formData.solveDesc" placeholder="请输入"></u-textarea>
</u-form-item>
</u--form>
<view class="button-area" style="width: 100%;margin-left: 0;box-shadow: 0 0 10rpx rgba(0, 0, 0, 0.1);">
<view class="btn" @click="closeDeal">取消</view>
<view class="btn reset" @click="form.actualSolveDate = '';formData.solveDesc = ''">重置</view>
</view>
</uni-popup> -->
</view>
<view class="button-area" v-if="edit">
<view class="btn" @click="cancelPage">取消</view>
<!-- <view class="btn save" @click="finishJobRecommend">办结</view> -->
<view class="btn save" @click="formData.currentStatus='2';saveInfo()">保存</view>
</view>
</view>
</template>
<script>
import {
deptTreeSelect
} from "@/packageRc/apiRc/person";
import {
addJobRecommend,
updateJobRecommend,
getJobRecommend,
getAddedJobs,
saveJobRecommend
} from "@/packageRc/apiRc/service/jobRecommend";
import {
getPersonDemand
} from "@/packageRc/apiRc/needs/personDemand";
import { listJobType } from "@/packageRc/apiRc/jobType/index";
import ImageUpload from '@/packageRc/components/ImageUpload'
import ChoosePerson from './choosePerson.vue';
import positionChooser from './positionChooser.vue';
import dayjs from "dayjs";
export default {
components: {
ChoosePerson,
positionChooser,
ImageUpload
},
props: {
showInfo: {
type: String,
default: '0'
}
},
data() {
return {
fileList: [],
jobTypeList:[],
edit: true,
originalDept: [],
personBase: {},
dates: {},
formData: {
recommendTopic: '',
personName: '',
},
rules: {
personName: [{
required: true,
message: '请填写姓名',
trigger: ['blur', 'change'],
}, ],
recommendTopic: [{
required: true,
message: '请填写服务需求标题',
trigger: ['blur', 'change'],
}, ],
},
dict: {},
show: {},
loading: false,
workParams: {},
activePersonInfo: {},
tuijianList: [],
openDeal: false,
}
},
onReady() {
this.$refs.uForm.setRules(this.rules)
},
created() {
this.loading = true;
this.$getDict('qcjy_zgzpgz').then(res => {
this.dict.salary = res.data
})
this.workTypeRemoteMethod()
},
methods: {
closeDeal() {
this.$refs.openDeal.close()
},
// saveDeal() {
// if (!this.formData.actualSolveDate) {
// uni.showToast({
// title: '请填写实际解决时间!',
// icon: 'none'
// })
// return;
// }
// if (!this.formData.solveDesc) {
// uni.showToast({
// title: '请填写办理说明!',
// icon: 'none'
// })
// return;
// }
// this.formData.currentStatus = '3'
// this.$refs.openDeal.close();
// this.saveInfo()
// },
// finishJobRecommend() {
// this.$refs.uForm.validate().then(res => {
// this.$refs.openDeal.open()
// }).catch(() => {
// uni.showToast({
// title: '请检查必填项填写',
// icon: 'none'
// })
// })
// },
cancelPage() {
if (this.formData.id) {
this.edit = false;
this.getDetail(this.formData.id)
} else {
uni.navigateBack()
}
},
removeTuijian({
id
}) {
if (!this.edit) return
this.tuijianList = this.tuijianList.filter(t => t.id !== id);
},
openPersonChooser() {
if (this.edit) {
console.log("this",this.activePersonInfo)
this.$refs.personChooser.open();
}
},
showPositionChooser() {
if (this.edit) {
console.log("this.params",this.workParams)
this.workParams.latitude=this.activePersonInfo.latitude
this.workParams.longitude=this.activePersonInfo.longitude
this.$refs.positionChooser.open(this.workParams);
}
},
personNameConfirm(event) {
this.formData.personName = event.personName
this.formData.personId = event.personId
this.formData.jobDemandInfoId = event.id
// this.form.personStatus = event.currentStatus;
this.activePersonInfo = event;
console.log("event",event)
this.formNameChange(event);
this.$forceUpdate();
},
jobListConfirm(event) {
this.tuijianList = event;
},
// changeFile(e) {
// if (e.length) {
// let data = e[0];
// this.formData.fileUrl = data.data ? data.data.url : data.url
// } else {
// this.formData.fileUrl = ''
// }
// },
changeFile(e) {
// 清空当前的 fileUrl 数组
this.formData.fileUrl = [];
// 如果 e 有长度(即用户选择了文件)
if (e.length) {
// 遍历每个文件对象并获取其 url
for (let data of e) {
const url = data.data ? data.data.url : data.url;
this.formData.fileUrl.push(url);
}
}
this.formData.fileUrl = this.$arrayToString(this.formData.fileUrl)
},
addOne() {
this.formData = {}
this.edit = true
},
addForPerson({
jobDemandInfoId
}) {
if (!jobDemandInfoId) return
getPersonDemand(jobDemandInfoId).then(res => {
this.activePersonInfo = res.data
this.formNameChange(this.activePersonInfo)
})
},
// 单独设置 人员姓名 和 id
setPersonName(data){
this.formData.personName = data.personName
this.formData.personId = data.personId
this.formData.jobDemandInfoId = data.jobDemandInfoId
this.addForPerson(data)
},
getDetail(id) {
// 查询角色详情
getJobRecommend(id).then(res => {
this.formData = res.data;
this.fileList = this.$processFileUrl(this.formData.fileUrl)
// 获取详情的时候 调用方法 拿到求职需求详情
this.addForPerson(res.data)
this.edit = false
this.getAddedJobsList(res.data)
})
},
// 获取推荐人员列表
getAddedJobsList({
postIdList
}) {
getAddedJobs({
postIdList,
pageNum: 1,
pageSize: 10000
}).then((res) => {
this.tuijianList = res.rows;
});
},
confirmDate(type, e) {
this.show[type] = false;
let date = new Date(e.value)
this.formData[type] =
`${date.getFullYear()}-${(date.getMonth()+1)>9?(date.getMonth()+1):('0'+(date.getMonth()+1))}-${date.getDate()>9?date.getDate():('0'+date.getDate())}`
this.$forceUpdate();
},
goBack() {
uni.navigateBack();
},
cancelPicker(type) {
this.show[type] = false
this.$forceUpdate();
},
getDictLabel(value, list) {
if (list) {
let arr = list.filter(ele => ele.dictValue == value)
if (arr.length) {
return arr[0].dictLabel
} else {
return '请选择'
}
}
},
workTypeRemoteMethod(key) {
listJobType({
workTypeName: key,
pageNum: 1,
pageSize: 50,
}).then((res) => {
this.jobTypeList = res.rows;
});
},
getJobWorkTypeName(data){
if (data) {
let arr = this.jobTypeList.filter((ele) => ele.id == data);
if(arr.length){
return arr[0].workTypeName;
}else{
return '--'
}
}
},
pickerConfirm(type, event) {
this.show[type] = false
this.formData[type] = event.value[0].dictValue
this.$forceUpdate();
},
// showPicker(type) {
// if (this.edit) {
// this.show[type] = true
// this.$forceUpdate()
// }
// },
formNameChange(e) {
let date = new Date()
// let day =
// `${date.getFullYear()}-${(date.getMonth()+1) + 1 > 9 ? (date.getMonth()+1) + 1: '0'+((date.getMonth()+1) + 1)}-${date.getDate() > 9 ? date.getDate(): '0'+date.getDate()}`
const dayNew = dayjs(date).format("YYYY-MM-DD");
this.formData.recommendTopic =
`${this.$store.state.user.nick}_于${dayNew}对人员_${this.formData.personName}_进行_${this.getJobWorkTypeName(e.jobWorkType)}岗位推荐`;
this.$set(this.workParams, "recruitWorkType", e.jobWorkType);
this.$set(this.workParams, "workLocation", e.hopeWorkLocation);
this.$set(this.workParams, "minRecruitmentSalary", e.minRecruitmentSalary);
this.$set(this.workParams, "highRecruitmentSalary", e.highRecruitmentSalary);
this.$set(this.workParams, "longitude", e.longitude);
this.$set(this.workParams, "latitude", e.latitude);
// this.$set(this.workParams, "userId", e.userId);
},
async saveInfo() {
uni.showLoading();
try {
// 验证表单
let isValid = true
// = await this.$refs.uForm.validate();
for(let prop in this.rules){
this.rules[prop].forEach(ele => {
if(ele.required = false && !this.formData[prop]){
isValid = false
}
})
}
if (!isValid) {
uni.showToast({
title: '请检查必填项填写',
icon: 'none'
})
// throw new Error('请检查必填项填写');
}
// 显示全局加载
// 更新 formData 中的 postIdList
this.formData.postIdList = this.tuijianList.map((ele) => ele.id);
this.formData.id = this.formData.jobDemandInfoId;
// 保存职位推荐
const response = await saveJobRecommend(this.formData);
// 检查响应码是否为200
if (response.code === 200) {
uni.showToast({title: '提交成功', icon: 'none'});
}
// 延迟1秒后返回上一页
setTimeout(() => {
uni.navigateBack();
}, 1000);
} catch (error) {
uni.showToast({title: '错误详情:' + error, icon: 'none'});
} finally {
// 确保加载页总是会被隐藏
uni.hideLoading();
}
},
// saveInfo() {
// this.$refs.uForm.validate().then(res => {
// this.formData.postIdList = this.tuijianList.map((ele) => ele.id)
// saveJobRecommend(this.formData).then(response => {
// if (response.code == 200) {
// uni.showToast({
// title: '提交成功'
// })
// }
// uni.navigateBack();
// });
// if(this.formData.id){
// updateJobRecommend(this.formData).then(res => {
// if(res.code == 200) {
// uni.showToast({
// title: '修改成功'
// })
// this.edit = false;
// }
// })
// }else{
// addJobRecommend(this.formData).then(res => {
// if(res.code == 200) {
// uni.showToast({
// title: '保存成功'
// })
// uni.navigateBack();
// }
// })
// }
// }).catch((e) => {
// uni.showToast({
// title: '请检查必填项填写',
// icon: 'none'
// })
// })
// }
}
}
</script>
<style lang="scss">
.noValue {
color: rgb(192, 196, 204);
}
.disabledLine {
background: rgb(245, 247, 250);
cursor: not-allowed;
width: 100%;
}
// 改进选择器样式
.picker-view {
display: flex;
align-items: center;
justify-content: space-between;
width: 100%;
padding: 28rpx 36rpx;
background: #ffffff;
border: 2rpx solid #e5e5e5;
border-radius: 12rpx;
min-height: 88rpx;
box-sizing: border-box;
transition: all 0.3s ease;
position: relative;
&:active {
background: #f8f9fa;
border-color: #007aff;
transform: scale(0.98);
}
&::after {
content: '';
position: absolute;
right: 36rpx;
top: 50%;
transform: translateY(-50%);
width: 0;
height: 0;
border-left: 12rpx solid transparent;
border-right: 12rpx solid transparent;
border-top: 12rpx solid #999999;
}
.picker-text {
color: #333333;
font-size: 28rpx;
flex: 1;
}
.picker-placeholder {
color: #999999;
font-size: 28rpx;
}
}
// 选中状态的样式
.picker-view.selected {
border-color: #1D64CF;
background: #f0f8ff;
&::after {
border-top-color: #1D64CF;
}
}
.tuijian-btn {
background: #197cd2;
line-height: 60rpx;
width: 176rpx;
margin-right: 16rpx;
margin-top: 24rpx;
font-size: 28rpx;
color: #fff;
text-align: center;
border-radius: 8rpx;
margin: 0 auto;
}
.job-list {
padding: 24rpx 32rpx;
border-radius: 8rpx;
box-sizing: border-box;
border: 1px solid #e4e4e4;
margin-bottom: 24rpx;
position: relative;
&.active {
border: 1px solid #1890ff;
}
.del-btn {
background: #E95A49;
line-height: 48rpx;
width: 120rpx;
margin-right: 0;
margin-top: 0rpx;
margin-left: auto;
font-size: 24rpx;
color: #fff;
text-align: center;
border-radius: 8rpx;
}
}
.self-form.popup {
padding-top: 32rpx;
.bordered {
border: 1rpx solid #dadbde;
padding: 9px;
border-radius: 4px;
}
}
.form-label{
width: 120rpx;
}
</style>

View File

@@ -1,82 +1,82 @@
<!--
* @Date: 2024-10-09 17:07:39
* @LastEditors: lip
* @LastEditTime: 2025-05-07 09:34:25
* @Date: 2024-10-08 14:29:36
* @LastEditors: shirlwang
* @LastEditTime: 2025-11-04 14:16:13
-->
<template>
<view class="input-outer-part">
<scroll-view scroll-y="true" :style="{height: edit?'calc(100vh - 325rpx)':'calc(100vh - 200rpx)'}">
<scroll-view scroll-y="true" :style="{height: edit?'calc(100vh - 150px)':'calc(100vh - 144px)'}">
<view class="inner">
<view class="part-title" style="display: flex;justify-content: space-between;">需求信息
<view v-if="!edit&&formData.id&&formData.currentStatus!=3&&formData.currentStatus!=2" class="btn"
style="font-weight: normal;display: flex;" @click="edit=true">编辑<u-icon name="edit-pen"
color="#A6A6A6"></u-icon></view>
<view class="part-title" style="display: flex;justify-content: space-between;">服务信息
<view v-if="!edit&&formData.id" class="btn" style="font-weight: normal;display: flex;"
@click="edit=true">编辑<u-icon name="edit-pen" color="#A6A6A6"></u-icon></view>
</view>
<view class="inner-part">
<u--form labelPosition="left" :model="formData" :rules="rules" ref="uForm" class="self-form"
labelWidth="100">
<u-form-item label="姓名" prop="personName" required
v-if="$store.getters.roles.includes('shequn')|| $store.getters.roles.includes('gly')"
>
<view style="width: 100%; margin-left: 30rpx;" @click="openPersonChooser"
:class="{disabledLine: !edit||!canChoosePerson, noValue: !formData.personName}">
labelWidth="110">
<u-form-item label="姓名" prop="personName" required>
<view style="width: 100%;" @click="openPersonChooser"
:class="{disabledLine: !edit, noValue: !formData.personName}">
{{ formData.personName || '请选择' }}
</view>
<u-icon slot="right" name="edit-pen" color="#A6A6A6"></u-icon>
</u-form-item>
<u-form-item label="需求说明" prop="demandDesc">
<u-textarea :disabled="!edit" v-model="formData.demandDesc" placeholder="请输入"></u-textarea>
</u-form-item>
<!-- <u-form-item label="需求标题" prop="demandTitle" required>
<u--textarea :disabled="!edit" v-model="formData.demandTitle" placeholder="请输入"
style="margin-left: 30rpx;"></u--textarea>
<u-icon slot="right" name="edit-pen" color="#A6A6A6"></u-icon>
</u-form-item> -->
<!-- <u-form-item label="是否意向接受援助" prop="isAcceptAssistance" required>
<view style="margin-left: 30rpx;">
<u-radio-group :disabled="!edit" v-model="formData.isAcceptAssistance" placement="row">
<u-radio :customStyle="{marginRight: '16px'}" label="是" name="是"
value="1"></u-radio>
<u-radio :customStyle="{marginRight: '16px'}" label="否" name="否"
value="0"></u-radio>
</u-radio-group>
</view>
</u-form-item> -->
<!-- <u-form-item label="是否接受审批结果" prop="isAcceptApprovalResult" required>
<view style="margin-left: 30rpx;">
<u-radio-group :disabled="!edit" v-model="formData.isAcceptApprovalResult"
placement="row">
<u-radio :customStyle="{marginRight: '16px'}" label="是" name="是"
value="1"></u-radio>
<u-radio :customStyle="{marginRight: '16px'}" label="否" name="否"
value="0"></u-radio>
</u-radio-group>
</view>
</u-form-item> -->
<!-- <u-form-item label="希望解决日期" prop="hopeSolveDate" required>
<view style="width: 100%; margin-left: 30rpx;" @click="showPicker('hopeSolveDate')"
:class="{disabledLine: !edit, noValue: !formData.hopeSolveDate}">
{{ formData.hopeSolveDate||'请选择' }}
<u-form-item label="人员状态" prop="personStatus">
<view style="width: 100%;" @click="showPicker('personStatus')"
:class="{disabledLine: !edit, noValue: !formData.personStatus}">
{{ getDictLabel(formData.personStatus, dict.personStatus)||'请选择' }}
</view>
<u-icon slot="right" name="arrow-down" color="#A6A6A6"></u-icon>
</u-form-item> -->
</u-form-item>
<u-form-item label="就业类别" prop="employmentType" required>
<view style="width: 100%;" @click="showPicker('employmentType')"
:class="{disabledLine: !edit, noValue: !formData.employmentType}">
{{ getDictLabel(formData.employmentType, dict.employmentType)||'请选择' }}
</view>
<u-icon slot="right" name="arrow-down" color="#A6A6A6"></u-icon>
</u-form-item>
<u-form-item label="就业单位" prop="employmentUnit" required>
<u--input :disabled="!edit" v-model="formData.employmentUnit" border="none"
placeholder="请输入"></u--input>
<u-icon slot="right" name="edit-pen" color="#A6A6A6"></u-icon>
</u-form-item>
<u-form-item label="就业状态" prop="employmentStatus" required>
<view style="width: 100%;" @click="showPicker('employmentStatus')"
:class="{disabledLine: !edit, noValue: !formData.employmentStatus}">
{{ getDictLabel(formData.employmentStatus, dict.employmentStatus)||'请选择' }}
</view>
<u-icon slot="right" name="arrow-down" color="#A6A6A6"></u-icon>
</u-form-item>
<u-form-item label="就业岗位" prop="employmentPosition">
<u--input :disabled="!edit" v-model="formData.employmentPosition" border="none"
placeholder="请输入"></u--input>
<u-icon slot="right" name="edit-pen" color="#A6A6A6"></u-icon>
</u-form-item>
<u-form-item label="岗位工资" prop="money">
<u--input :disabled="!edit" v-model="formData.money" border="none"
placeholder="请输入"></u--input>
<u-icon slot="right" name="edit-pen" color="#A6A6A6"></u-icon>
</u-form-item>
<u-form-item label="就业时间" prop="time">
<view style="width: 100%;" @click="showPicker('time')"
:class="{disabledLine: !edit, noValue: !formData.time}">{{ formData.time||'请选择' }}
</view>
<u-icon slot="right" name="arrow-down" color="#A6A6A6"></u-icon>
</u-form-item>
</u--form>
</view>
</view>
<!-- <view class="inner" style="margin-top: 32rpx;">
<view class="inner-part">
<u--form labelPosition="left" class="self-form" labelWidth="110" ref="uForm" :model="formData"
:rules="rules">
<u-form-item label="需求说明" prop="demandDesc">
<u-textarea :disabled="!edit" v-model="formData.demandDesc" placeholder="请输入"></u-textarea>
</u-form-item>
</u--form>
</view>
</view> -->
<!-- <view class="inner">
<view class="inner" style="margin-top: 32rpx;">
<view class="inner-part">
<u--form labelPosition="left" class="self-form" labelWidth="110">
<u-form-item label="备注" prop="remark">
<u-textarea :disabled="!edit" v-model="formData.remark" placeholder="请输入"></u-textarea>
</u-form-item>
</u--form>
</view>
</view>
<view class="inner">
<view class="part-title" style="margin-top: 32rpx;">附件信息</view>
<view class="inner-part">
<u--form labelPosition="left" class="self-form" labelWidth="110">
@@ -85,8 +85,7 @@
</u-form-item>
</u--form>
</view>
</view> -->
</view>
<!-- 办理完成后 需求说明 -->
<req-comp :form="{
actualSolveDate: formData.actualSolveDate,
@@ -94,98 +93,73 @@
solveDesc: formData.solveDesc,
fileUrl: formData.fileUrl
}" />
</scroll-view>
<u-datetime-picker :show="show.hopeSolveDate" v-model="dates.hopeSolveDate" mode="date"
@confirm="confirmDate('hopeSolveDate', $event)" @cancel="cancelPicker('hopeSolveDate')"></u-datetime-picker>
<u-datetime-picker :show="show.time" v-model="dates.time" mode="date" @confirm="confirmDate('time', $event)"
@cancel="cancelPicker('time')"></u-datetime-picker>
<u-picker :show="show.personStatus" :columns="[dict.personStatus]" keyName="dictLabel"
@confirm="pickerConfirm('personStatus', $event)" @cancel="cancelPicker('personStatus')"></u-picker>
<u-picker :show="show.employmentType" :columns="[dict.employmentType]" keyName="dictLabel"
@confirm="pickerConfirm('employmentType', $event)" @cancel="cancelPicker('employmentType')"></u-picker>
<u-picker :show="show.employmentStatus" :columns="[dict.employmentStatus]" keyName="dictLabel"
@confirm="pickerConfirm('employmentStatus', $event)" @cancel="cancelPicker('employmentStatus')"></u-picker>
<choose-person ref="personChooser" @confirm="personNameConfirm" />
<view class="button-area" v-if="edit">
<view class="btn" @click="cancelPage">取消</view>
<view class="btn reset" @click="getDetail(formData.id)">重置</view>
<view class="btn reset" @click="formData = {}" v-if="!formData.id">重置</view>
<view class="btn save" @click="saveInfo">保存</view>
</view>
</view>
</template>
<script>
// import {
// getPersonBase
// } from "@/api/person";
// import {
// addAssistService,
// updateAssistService,
// getAssistService
// } from "@/api/needs/assistService";
// import ImageUpload from '@/components/ImageUpload'
// import ChoosePerson from '@/pages/needs/components/choosePerson';
// import dayjs from "dayjs";
import {
addJobTrack,
updateJobTrack,
getJobTrack
} from "@/packageRc/apiRc/service/jobTrack";
import ImageUpload from '@/packageRc/components/ImageUpload'
import ChoosePerson from './choosePerson.vue';
export default {
components: {
// ChoosePerson,
// ImageUpload,
ChoosePerson,
ImageUpload
},
data() {
return {
fileList: [],
edit: true,
personBase: {},
dates: {},
formData: {
demandDesc: ''
// demandTitle: '',
// isAcceptAssistance: '',
// isAcceptApprovalResult: '',
// personName: '',
personName: '',
time: '',
visitor: '',
},
rules: {
// demandTitle: [{
// required: true,
// message: '',
// trigger: ['blur', 'change'],
// }, ],
// isAcceptAssistance: [{
// required: true,
// message: '',
// trigger: ['blur', 'change'],
// }, ],
// isAcceptApprovalResult: [{
// required: true,
// message: '',
// trigger: ['blur', 'change'],
// }, ],
// personName: [{
// required: true,
// message: '',
// trigger: ['blur', 'change'],
// }, ],
// hopeSolveDate: [{
// required: true,
// message: '',
// trigger: ['blur', 'change'],
// }, ],
personName: [{
required: true,
message: '请填写姓名',
trigger: ['blur', 'change'],
}, ],
demandDesc: [{
employmentType: [{
required: true,
message: '请填写需求说明',
message: '请选择就业类别',
trigger: ['blur', 'change'],
}, ],
employmentUnit: [{
required: true,
message: '请填写就业单位',
trigger: ['blur', 'change'],
}, ],
employmentStatus: [{
required: true,
message: '请选择就业状态',
trigger: ['blur', 'change'],
}, ],
},
dict: {},
show: {},
currentCityArr: [],
originalDept: [],
currentCity: '请选择',
bysj: '',
loading: false,
route: {},
canChoosePerson: false,
fileList: [],
}
},
onReady() {
@@ -193,6 +167,25 @@
},
created() {
this.loading = true;
let arr = [{
key: 'qcjy_ryzt',
prop: 'personStatus'
},
{
key: 'qcjy_jylb',
prop: 'employmentType'
},
{
key: 'qcjy_jyzt',
prop: 'employmentStatus'
},
]
arr.forEach(ele => {
this.$getDict(ele.key).then(res => {
this.dict[ele.prop] = res.data
this.$forceUpdate();
})
})
},
methods: {
cancelPage() {
@@ -204,15 +197,13 @@
}
},
openPersonChooser() {
if (this.edit && this.canChoosePerson) {
if (this.edit) {
this.$refs.personChooser.open();
}
},
personNameConfirm(event) {
this.formData.personName = event.name
this.formData.personId = event.id
this.formData.userId = event.userId
this.formNameChange();
this.$forceUpdate();
},
changeFile(e) {
@@ -230,15 +221,10 @@
},
addOne() {
this.formData = {}
this.getPersonInfo()
if(this.name){
this.formData.personName = this.name
this.formData.userId = this.needid
}
this.edit = true
},
getDetail(id) {
getAssistService(id).then(res => {
getJobTrack(id).then(res => {
this.formData = res.data;
this.edit = false
this.fileList = this.$processFileUrl(this.formData.fileUrl)
@@ -249,7 +235,6 @@
let date = new Date(e.value)
this.formData[type] =
`${date.getFullYear()}-${(date.getMonth()+1)>9?(date.getMonth()+1):('0'+(date.getMonth()+1))}-${date.getDate()>9?date.getDate():('0'+date.getDate())}`
console.log(this.show[type], type)
this.$forceUpdate();
},
goBack() {
@@ -280,55 +265,33 @@
this.$forceUpdate()
}
},
getPersonInfo() {
this.loading = true;
this.$store.dispatch("GetInfo").then((res) => {
if (res.data.roles.indexOf('qunzhong') == -1) {
this.canChoosePerson = true;
} else {
this.canChoosePerson = false;
getPersonBase(res.data.user.userId).then(resp => {
this.formData.personId = resp.data.id
this.formData.userId = resp.data.userId
this.formData.personName = resp.data.name
this.formNameChange();
this.$forceUpdate();
})
}
})
},
formNameChange() {
let date = new Date()
// let day =
// `${date.getFullYear()}-${(date.getMonth()+1) + 1 > 9 ? (date.getMonth()+1) + 1: '0'+((date.getMonth()+1) + 1)}-${date.getDate() > 9 ? date.getDate(): '0'+date.getDate()}`
const dayNew = dayjs(date).format("YYYY-MM-DD");
this.formData.demandTitle = `${this.formData.personName}_于${dayNew}_提出援助需求`
},
async saveInfo() {
try {
//
const isValid = await this.$refs.uForm.validate();
console.log(isValid)
if (!isValid) {
throw new Error('请检查必填项填写');
}
//
this.$showLoading();
// formData id
let response;
let successMessage;
let response;
if (this.formData.id) {
response = await updateAssistService(this.formData);
response = await updateJobTrack(this.formData);
successMessage = '修改成功';
} else {
response = await addAssistService(this.formData);
response = await addJobTrack(this.formData);
successMessage = '保存成功';
}
// 200
if (response.code === 200) {
this.$u.toast(successMessage);
//
if (this.formData.id) {
this.edit = false;
@@ -338,21 +301,19 @@
}
}
} catch (error) {
if(error.length){
this.$u.toast('请填写完整信息!');
}else{
this.$u.toast('系统错误,请联系管理员!');
}
this.$u.toast('错误详情:' + error);
} finally {
//
this.$hideLoading();
uni.hideLoading();
}
},
// saveInfo() {
// this.$refs.uForm.validate().then(res => {
// if (this.formData.id) {
// updateAssistService(this.formData).then(res => {
// updateJobTrack(this.formData).then(res => {
// if (res.code == 200) {
// uni.showToast({
// title: ''
@@ -361,7 +322,7 @@
// }
// })
// } else {
// addAssistService(this.formData).then(res => {
// addJobTrack(this.formData).then(res => {
// if (res.code == 200) {
// uni.showToast({
// title: ''
@@ -382,7 +343,6 @@
</script>
<style lang="scss">
.page ::v-deep .u-navbar__content {
background-color: transparent !important;
}

View File

@@ -0,0 +1,331 @@
<!--
* @Date: 2024-10-09 17:07:39
* @LastEditors: shirlwang
* @LastEditTime: 2025-11-04 14:16:17
-->
<template>
<view class="input-outer-part">
<scroll-view scroll-y="true" :style="{height: edit?'calc(100vh - 150px)':'calc(100vh - 144px)'}">
<view class="inner">
<view class="part-title" style="display: flex;justify-content: space-between;">服务信息
<view v-if="!edit&&formData.id" class="btn" style="font-weight: normal;display: flex;"
@click="edit=true">编辑<u-icon name="edit-pen" color="#A6A6A6"></u-icon></view>
</view>
<view class="inner-part">
<u--form labelPosition="left" :model="formData" :rules="rules" ref="uForm" class="self-form"
labelWidth="110">
<u-form-item label="姓名" prop="personName" required>
<view style="width: 100%;" @click="openPersonChooser"
:class="{disabledLine: !edit, noValue: !formData.personName}">
{{ formData.personName || '请选择' }}
</view>
<!-- <u--input disabled v-model="formData.personName" border="none" placeholder="请输入" ></u--input> -->
<u-icon slot="right" name="edit-pen" color="#A6A6A6"></u-icon>
</u-form-item>
<u-form-item label="咨询时间" prop="time" required>
<view style="width: 100%;" @click="showPicker('time')"
:class="{disabledLine: !edit, noValue: !formData.time}">{{ formData.time||'请选择' }}
</view>
<u-icon slot="right" name="arrow-down" color="#A6A6A6"></u-icon>
</u-form-item>
<u-form-item label="咨询讲解人员" prop="expositor" required>
<u--input :disabled="!edit" v-model="formData.expositor" border="none"
placeholder="请输入"></u--input>
<u-icon slot="right" name="edit-pen" color="#A6A6A6"></u-icon>
</u-form-item>
</u--form>
</view>
</view>
<view class="inner" style="margin-top: 32rpx;">
<view class="inner-part">
<u--form labelPosition="left" class="self-form" labelWidth="110">
<u-form-item label="情况说明" prop="content">
<u-textarea :disabled="!edit" v-model="formData.content" placeholder="请输入"></u-textarea>
</u-form-item>
</u--form>
</view>
</view>
<view class="inner">
<view class="part-title" style="margin-top: 32rpx;">附件信息</view>
<view class="inner-part">
<u--form labelPosition="left" class="self-form" labelWidth="110">
<u-form-item label="附件" prop="fileUrl">
<ImageUpload :fileList="fileList" @update="changeFile" :maxCount="6" />
</u-form-item>
</u--form>
</view>
</view>
<handler-data style="margin-top: 30rpx;" v-if="false"/>
</scroll-view>
<u-datetime-picker :show="show.time" v-model="dates.time" mode="date" @confirm="confirmDate('time', $event)"
@cancel="cancelPicker('time')"></u-datetime-picker>
<choose-person ref="personChooser" @confirm="personNameConfirm" />
<view class="button-area" v-if="edit">
<view class="btn" @click="cancelPage">取消</view>
<view class="btn reset" @click="formData = {}" v-if="!formData.id">重置</view>
<view class="btn save" @click="saveInfo">保存</view>
</view>
</view>
</template>
<script>
import {
addPolicyConsultation,
updatePolicyConsultation,
getPolicyConsultation
} from "@/packageRc/apiRc/service/policyConsultation";
import ImageUpload from '@/packageRc/components/ImageUpload'
import ChoosePerson from './choosePerson.vue';
export default {
components: {
ChoosePerson,
ImageUpload,
},
data() {
return {
fileList: [],
edit: true,
personBase: {},
dates: {},
formData: {
demandTitle: '',
isAcceptAssistance: '',
isAcceptApprovalResult: '',
personName: '',
},
rules: {
time: [{
required: true,
message: '请填写咨询讲解人员',
trigger: ['blur', 'change'],
}, ],
expositor: [{
required: true,
message: '请选择咨询时间',
trigger: ['blur', 'change'],
}, ],
personName: [{
required: true,
message: '请填写姓名',
trigger: ['blur', 'change'],
}, ],
},
show: {},
loading: false,
}
},
onReady() {
this.$refs.uForm.setRules(this.rules)
},
created() {
this.loading = true;
},
methods: {
cancelPage() {
if (this.formData.id) {
this.edit = false;
this.getDetail(this.formData.id)
} else {
uni.navigateBack()
}
},
openPersonChooser() {
if (this.edit) {
this.$refs.personChooser.open();
}
},
personNameConfirm(event) {
this.formData.personName = event.name
this.formData.personId = event.id
this.$forceUpdate();
},
changeFile(e) {
// 清空当前的 fileUrl 数组
this.formData.fileUrl = [];
// 如果 e 有长度(即用户选择了文件)
if (e.length) {
// 遍历每个文件对象并获取其 url
for (let data of e) {
const url = data.data ? data.data.url : data.url;
this.formData.fileUrl.push(url);
}
}
this.formData.fileUrl = this.$arrayToString(this.formData.fileUrl)
},
addOne() {
this.formData = {}
this.edit = true
},
getDetail(id) {
getPolicyConsultation(id).then(res => {
this.formData = res.data;
this.edit = false
this.fileList = this.$processFileUrl(this.formData.fileUrl)
})
},
confirmDate(type, e) {
this.show[type] = false;
let date = new Date(e.value)
this.formData[type] =
`${date.getFullYear()}-${(date.getMonth()+1)>9?(date.getMonth()+1):('0'+(date.getMonth()+1))}-${date.getDate()>9?date.getDate():('0'+date.getDate())}`
console.log(this.show[type], type)
this.$forceUpdate();
},
goBack() {
uni.navigateBack();
},
cancelPicker(type) {
this.show[type] = false
this.$forceUpdate();
},
getDictLabel(value, list) {
if (list) {
let arr = list.filter(ele => ele.dictValue == value)
if (arr.length) {
return arr[0].dictLabel
} else {
return '请选择'
}
}
},
pickerConfirm(type, event) {
this.show[type] = false
this.formData[type] = event.value[0].dictValue
this.$forceUpdate();
},
showPicker(type) {
if (this.edit) {
this.show[type] = true
this.$forceUpdate()
}
},
async saveInfo() {
try {
// 验证表单
const isValid = await this.$refs.uForm.validate();
if (!isValid) {
throw new Error('请检查必填项填写');
}
// 显示全局加载
this.$showLoading();
// 根据 formData 是否有 id 来决定是更新还是新增
let response;
let successMessage;
if (this.formData.id) {
response = await updatePolicyConsultation(this.formData);
successMessage = '修改成功';
} else {
response = await addPolicyConsultation(this.formData);
successMessage = '保存成功';
}
// 检查响应码是否为200
if (response.code === 200) {
this.$u.toast(successMessage);
// 如果是编辑模式,关闭编辑状态;否则返回上一页
if (this.formData.id) {
this.edit = false;
} else {
await this.$delay(1000); // 延迟1秒后返回上一页
uni.navigateBack();
}
}
} catch (error) {
this.$u.toast('错误详情:' + error);
} finally {
// 确保加载页总是会被隐藏
uni.hideLoading();
}
},
// saveInfo() {
// this.$refs.uForm.validate().then(res => {
// if (this.formData.id) {
// updatePolicyConsultation(this.formData).then(res => {
// if (res.code == 200) {
// uni.showToast({
// title: '修改成功'
// })
// this.edit = false;
// }
// })
// } else {
// addPolicyConsultation(this.formData).then(res => {
// if (res.code == 200) {
// uni.showToast({
// title: '保存成功'
// })
// uni.navigateBack();
// }
// })
// }
// }).catch(() => {
// uni.showToast({
// title: '请检查必填项填写',
// icon: 'none'
// })
// })
// }
}
}
</script>
<style lang="scss">
.page ::v-deep .u-navbar__content {
background-color: transparent !important;
}
.page {
background-color: #EEF1F5 !important;
height: 100vh;
background-image: url('https://rc.jinan.gov.cn/qcwjyH5/static/images/top.png');
background-repeat: no-repeat;
background-size: 100% auto;
}
.button-area {
padding: 24rpx 32rpx 68rpx;
width: calc(100% + 64rpx);
margin-left: -32rpx;
background: #fff;
display: flex;
box-sizing: border-box;
margin-top: 40rpx;
border-radius: 16px 16px 0px 0px;
.btn {
line-height: 72rpx;
width: 176rpx;
margin-right: 16rpx;
font-size: 28rpx;
border: 1px solid #B8C5D4;
color: #282828;
text-align: center;
border-radius: 8rpx;
}
.reset {
background: #DCE2E9;
}
.save {
background: linear-gradient(103deg, #1D64CF 0%, #1590D4 99%);
color: #fff;
border: 0;
flex-grow: 1;
}
}
.noValue {
color: rgb(192, 196, 204);
}
.disabledLine {
background: rgb(245, 247, 250);
cursor: not-allowed;
}
</style>

View File

@@ -0,0 +1,388 @@
<template>
<uni-popup ref="showPersonChooser" type="bottom" round background-color="#fff">
<view style="padding: 32rpx 0">
<!-- <u--input @change="searchChange" placeholder="搜索选择岗位" v-model="searchPerson"></u--input> -->
<scroll-view style="height: 900rpx;" :scroll-y="true" @scrolltolower="getBottomList">
<!-- 搜索区域 -->
<view class="search-area">
<view class="search-inputs">
<input
v-model="searchValue"
placeholder="请输入公司/岗位名称"
border="surround"
clearable
class="search-input"
/>
</view>
<button type="primary" @click="onSearch" class="search-btn">搜索</button>
</view>
<!-- 岗位列表 -->
<view v-for="(item, index) in jobList"
:key="index"
@click="chooseJob(item)"
class="job-card"
:class="{active: activeJobList.indexOf(item.id)!=-1}">
<!-- 岗位名称和薪资 -->
<view class="job-header">
<text class="job-title">{{item.postName}}</text>
<text class="job-salary">{{formatSalary(item.minRecruitmentSalary, item.highRecruitmentSalary)}}</text>
</view>
<!-- 标签区域 -->
<view class="tag-area">
<text class="tag">{{getDictLabel(item.minEducation, xue_li) || '学历不限'}}</text>
<text class="tag">{{item.profession || '专业不限'}}</text>
<text class="tag">全职</text>
</view>
<!-- 公司信息 -->
<view class="company-info">
<view class="company-detail">
<text class="company-name">{{item.unitName}}</text>
<view class="location-line">
<text class="location">
<text class="location-icon">📍</text>
{{item.workLocation || '暂无地址'}}
</text>
</view>
</view>
</view>
<!-- 推荐标记 -->
<view class="recommend-tag" v-if="choosedIdList.indexOf(item.id) != -1">推荐</view>
</view>
<view v-if="loadingJob">加载中...</view>
<div v-if="jobList.length == 0&&!loadingJob" :text="'暂无数据'"></div>
</scroll-view>
<view class="button-area">
<view class="btn" @click="closeshowPersonChooser">取消</view>
<view class="btn save" @click="saveInfo">确定</view>
</view>
<!-- <view style="color: #8492a6;margin-top: 7rpx;">距离
<text style="color: #fa6553;">{{item.distance || '--'}} km</text>
</view> -->
</view>
</uni-popup>
</template>
<script>
import { getWorkListReq } from '@/packageRc/apiRc/service/jobRecommend'
export default {
data() {
return {
showPersonChooser: false,
activeJobList: [],
searchPerson: '',
searcher: '',
workParams: {},
jobList: [],
jobTotal: 0,
showMorePage: true,
choosedIdList: [],
loadingJob: false,
xue_li:[],
searchValue: '',
searchJob: '',
}
},
methods: {
onSearch() {
// 重置页码和列表
this.workParams.pageNum = 1;
this.jobList = [];
// 添加搜索条件
this.workParams.searchValue = this.searchValue;
this.doSearch();
},
formatSalary(min, max) {
if (!min && !max) return '薪资面议';
if (!min) return `${max}元/月`;
if (!max) return `${min}元/月`;
return `${min}-${max}元/月`;
},
closeshowPersonChooser() {
this.$refs.showPersonChooser.close()
},
open(workParams) {
console.log("workparams",workParams)
this.$refs.showPersonChooser.open()
this.activeJobList = []
// this.workParams = workParams
this.workParams = {
// ...workParams,
recruitWorkType: workParams.recruitWorkType,
// longitude: workParams.longitude,
// latitude: workParams.latitude,
pageNum: 1,
pageSize: 10,
latitude:workParams.latitude,
longitude:workParams.longitude
}
this.jobTotal = 0;
this.jobList = [];
this.doSearch()
},
saveInfo() {
this.$emit('confirm', this.activeJobList)
this.$refs.showPersonChooser.close()
},
searchChange(){
if(this.searcher){
clearTimeout(this.searcher)
this.doSearch()
}else{
this.doSearch()
}
}, // 触底加载
getBottomList() {
if (this.workParams.pageNum * this.workParams.pageSize >= this.jobTotal) {
this.showMorePage = false;
} else if (this.workParams.pageNum * this.workParams.pageSize < this.jobTotal) {
this.workParams.pageNum++;
this.doSearch();
if (this.workParams.pageNum * this.workParams.pageSize >= this.jobTotal) {
this.showMorePage = false;
}
}
},
getDictLabel(value, list) {
if (list && value) {
const found = list.find(ele => ele.dictValue === value);
return found ? found.dictLabel : '学历不限';
}
return '学历不限';
},
doSearch() {
this.loadingJob = true;
// 先获取学历字典
this.$getDict('qcjy_jycd').then(res => {
this.xue_li = res.data;
// 再获取岗位列表
getWorkListReq(this.workParams).then((res) => {
this.loadingJob = false;
if (res.code == 200) {
if (res.rows.length < 10) {
this.showMorePage = false;
}
this.loading = false;
this.jobList = this.jobList.concat(res.rows);
this.jobTotal = res.total;
} else {
this.loading = false;
uni.showToast({
title: res.msg,
icon: "none",
});
}
});
});
},
chooseJob(item) {
let index = this.choosedIdList.indexOf(item.id);
if(index == -1){
this.activeJobList.push(item);
this.choosedIdList.push(item.id);
}else{
this.activeJobList.splice(index, 1);
this.choosedIdList.splice(index, 1);
}
this.$forceUpdate();
},
}
}
</script>
<style lang="scss" scoped>
.person-list{
padding: 24rpx 32rpx;
border-radius: 8rpx;
box-sizing: border-box;
border: 1px solid #e4e4e4;
margin-top: 32rpx;
position: relative;
&.active{
border: 1px solid #1890ff;
}
.tjBtn{
position: absolute;
right: -16rpx;
top: 0;
line-height: 48rpx;
width: 120rpx;
margin-right: 16rpx;
font-size: 24rpx;
color: #fff;
text-align: center;
border-radius: 0 8rpx 0 8rpx;
background: #1D64CF;
}
}
// .button-area{
// box-shadow: 0 0 10rpx rgba(0,0,0,0.1);
// padding: 24rpx 32rpx 68rpx;
// width: calc(100% + 64rpx);
// margin-left: -32rpx;
// background: #fff;
// display: flex;
// box-sizing: border-box;
// margin-top: 40rpx;
// border-radius: 16px 16px 0px 0px;
// .btn{
// line-height: 72rpx;
// width: 176rpx;
// margin-right: 16rpx;
// font-size: 28rpx;
// border: 1px solid #B8C5D4;
// color: #282828;
// text-align: center;
// border-radius: 8rpx;
// }
// .reset{
// background: #DCE2E9;
// }
// .save{
// background: linear-gradient(103deg, #1D64CF 0%, #1590D4 99%);
// color: #fff;
// border: 0;
// flex-grow: 1;
// }
// }
.part-title{
margin-bottom: 10rpx;
font-size: 28rpx;
font-weight: bold;
}
.search-area {
padding: 20rpx 32rpx;
display: flex;
align-items: center;
gap: 16rpx;
.search-inputs {
flex: 1;
display: flex;
gap: 16rpx;
.search-input {
flex: 1;
border: 1px solid #e4e4e4;
border-radius: 40rpx;
height: 60rpx;
padding: 0 16rpx;
}
}
.search-btn {
width: 140rpx;
height: 60rpx;
line-height: 60rpx;
margin: 0;
background: #1890ff;
color: #fff;
font-size: 24rpx;
}
}
.job-card {
background: #FFFFFF;
border-radius: 12rpx;
padding: 24rpx;
margin: 0 32rpx 20rpx;
position: relative;
border: 1px solid #EBEEF5;
&.active {
border: 1px solid #1890ff;
}
}
.job-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 16rpx;
}
.job-title {
font-size: 32rpx;
font-weight: 500;
color: #333333;
}
.job-salary {
font-size: 28rpx;
color: #FA6553;
font-weight: 500;
}
.tag-area {
display: flex;
gap: 12rpx;
margin-bottom: 16rpx;
flex-wrap: wrap;
}
.tag {
font-size: 24rpx;
color: #666666;
background: #F5F7FA;
padding: 4rpx 12rpx;
border-radius: 4rpx;
}
.company-info {
display: flex;
align-items: center;
}
.company-detail {
flex: 1;
}
.company-name {
font-size: 26rpx;
color: #666666;
display: block;
}
.location-line {
display: flex;
align-items: center;
gap: 16rpx;
margin-top: 4rpx;
}
.location {
font-size: 24rpx;
color: #666666;
display: flex;
align-items: center;
.location-icon {
font-size: 24rpx;
margin-right: 4rpx;
}
}
.post-date {
font-size: 24rpx;
color: #999999;
}
.recommend-tag {
position: absolute;
right: -2rpx;
top: 0;
background: #1D64CF;
color: #FFFFFF;
font-size: 24rpx;
padding: 4rpx 16rpx;
border-radius: 0 12rpx 0 12rpx;
}
</style>

View File

@@ -0,0 +1,445 @@
<!--
* @Date: 2024-10-08 14:29:36
* @LastEditors: shirlwang
* @LastEditTime: 2025-11-04 14:16:11
-->
<template>
<view class="input-outer-part">
<scroll-view scroll-y="true" :style="{height: edit?'calc(100vh - 150px)':'calc(100vh - 144px)'}">
<view class="inner">
<view class="part-title" style="display: flex;justify-content: space-between;">服务信息
<view v-if="!edit&&formData.id" class="btn" style="font-weight: normal;display: flex;"
@click="edit=true">编辑<u-icon name="edit-pen" color="#A6A6A6"></u-icon></view>
</view>
<view class="inner-part">
<u--form labelPosition="left" :model="formData" :rules="rules" ref="uForm" class="self-form"
labelWidth="110">
<u-form-item label="姓名" prop="personName" required>
<view style="width: 100%;" @click="openPersonChooser"
:class="{disabledLine: !edit, noValue: !formData.personName}">
{{ formData.personName || '请选择' }}
</view>
<u-icon slot="right" name="edit-pen" color="#A6A6A6"></u-icon>
</u-form-item>
<!-- <u-form-item label="人员状态" prop="personStatus">
<view style="width: 100%;" @click="showPicker('personStatus')" :class="{disabledLine: !edit, noValue: !formData.personStatus}">{{ getDictLabel(formData.personStatus, dict.personStatus)||'请选择' }}</view>
<u-icon slot="right" name="arrow-down" color="#A6A6A6" ></u-icon>
</u-form-item> -->
<u-form-item label="培训人员" prop="trainingStaff" required>
<u--input :disabled="!edit" v-model="formData.trainingStaff" border="none"
placeholder="请输入"></u--input>
<u-icon slot="right" name="edit-pen" color="#A6A6A6"></u-icon>
</u-form-item>
<u-form-item label="培训时间" prop="time" required>
<view style="width: 100%;" @click="showPicker('time')"
:class="{disabledLine: !edit, noValue: !formData.time}">{{ formData.time||'请选择' }}
</view>
<u-icon slot="right" name="arrow-down" color="#A6A6A6"></u-icon>
</u-form-item>
<u-form-item label="培训题目" prop="trainingTopic" required>
<u-textarea :disabled="!edit" v-model="formData.trainingTopic"
placeholder="请输入"></u-textarea>
</u-form-item>
<u-form-item label="培训内容" prop="trainingContent" required>
<u-textarea :disabled="!edit" v-model="formData.trainingContent"
placeholder="请输入"></u-textarea>
</u-form-item>
</u--form>
</view>
</view>
<view class="inner">
<view class="part-title" style="margin-top: 32rpx;">附件信息</view>
<view class="inner-part">
<u--form labelPosition="left" class="self-form" labelWidth="110">
<u-form-item label="附件" prop="fileUrl">
<ImageUpload :fileList="fileList" @update="changeFile" :maxCount="6" />
</u-form-item>
</u--form>
</view>
</view>
<!-- 办理完成后 需求说明 -->
<req-comp :form="{
actualSolveDate: formData.actualSolveDate,
actualSolvePeople: formData.actualSolvePeople,
solveDesc: formData.solveDesc,
fileUrl: formData.fileUrl
}" />
</scroll-view>
<u-datetime-picker :show="show.time" v-model="dates.time" mode="date" @confirm="confirmDate('time', $event)"
@cancel="cancelPicker('time')"></u-datetime-picker>
<u-datetime-picker :show="show.actualSolveDate" v-model="dates.actualSolveDate" mode="date"
@confirm="confirmDate('actualSolveDate', $event)"
@cancel="cancelPicker('actualSolveDate')"></u-datetime-picker>
<!-- <u-picker :show="show.personStatus" :columns="[dict.personStatus]" keyName="dictLabel" @confirm="pickerConfirm('personStatus', $event)" @cancel="cancelPicker('personStatus')"></u-picker> -->
<choose-person :choiceType="4" ref="personChooser" @confirm="personNameConfirm" />
<u-popup :show="openDeal" style="position: relative;z-index: 2;">
<u--form class="self-form popup" labelPosition="top" :model="formData" :rules="rules" ref="uForm"
labelWidth="300" style="width: calc(100% - 64rpx);margin: 0 auto;">
<u-form-item label="实际办理时间" prop="actualSolveDate" required>
<view class="bordered" style="width: 100%;" @click="showPicker('actualSolveDate')"
:class="{noValue: !formData.actualSolveDate}">{{ formData.actualSolveDate||'请选择' }}</view>
<u-icon slot="right" name="arrow-down" color="#A6A6A6"></u-icon>
</u-form-item>
<u-form-item label="办理说明" prop="solveDesc" required>
<u-textarea v-model="formData.solveDesc" placeholder="请输入"></u-textarea>
</u-form-item>
</u--form>
<view class="button-area" style="width: 100%;margin-left: 0;box-shadow: 0 0 10rpx rgba(0, 0, 0, 0.1);">
<view class="btn" @click="openDeal = false">取消</view>
<view class="btn reset" @click="form.actualSolveDate = '';formData.solveDesc = ''">重置</view>
<!-- <view class="btn save" @click="saveDeal">办结</view> -->
</view>
</u-popup>
<view class="button-area" v-if="edit">
<view class="btn" @click="cancelPage">取消</view>
<!-- <view class="btn save" @click="finishSkillTrain">办结</view> -->
<view class="btn save" @click="formData.skillTrainingStatus='2';saveInfo()">保存</view>
</view>
</view>
</template>
<script>
import {
addSkillTrain,
updateSkillTrain,
getSkillTrain
} from "@/packageRc/apiRc/service/skillTrain";
import ImageUpload from '@/packageRc/components/ImageUpload'
import ChoosePerson from './choosePerson.vue';
export default {
components: {
ChoosePerson,
ImageUpload
},
data() {
return {
fileList: [],
edit: true,
personBase: {},
dates: {},
formData: {
personName: '',
trainingStaff: '',
time: '',
trainingTopic: '',
trainingContent: '',
},
rules: {
personName: [{
required: true,
message: '请填写姓名',
trigger: ['blur', 'change'],
}, ],
trainingStaff: [{
required: true,
message: '请填写培训人员',
trigger: ['blur', 'change'],
}, ],
time: [{
required: true,
message: '请选择培训时间',
trigger: ['blur', 'change'],
}, ],
trainingTopic: [{
required: true,
message: '请填写培训题目',
trigger: ['blur', 'change'],
}, ],
trainingContent: [{
required: true,
message: '请填写培训内容',
trigger: ['blur', 'change'],
}, ],
},
dict: {},
show: {},
loading: false,
openDeal: false,
form: {},
}
},
onReady() {
this.$refs.uForm.setRules(this.rules)
},
created() {
this.$getDict('qcjy_ryzt').then(res => {
this.dict.personStatus = res.data
})
this.loading = true;
},
methods: {
cancelPage() {
if (this.formData.id) {
this.edit = false;
this.getDetail(this.formData.id)
} else {
uni.navigateBack()
}
},
saveDeal() {
if (!this.formData.actualSolveDate) {
uni.showToast({
title: '请填写实际解决时间!',
icon: 'none'
})
return;
}
if (!this.formData.solveDesc) {
uni.showToast({
title: '请填写办理说明!',
icon: 'none'
})
return;
}
this.formData.skillTrainingStatus = '3'
this.openDeal = false;
this.saveInfo()
},
finishSkillTrain() {
this.$refs.uForm.validate().then(res => {
this.openDeal = true;
}).catch(() => {
uni.showToast({
title: '请检查必填项填写',
icon: 'none'
})
})
},
openPersonChooser() {
if (this.edit) {
this.$refs.personChooser.open();
}
},
personNameConfirm(event) {
this.formData.personName = event.personName
this.formData.personId = event.personId
this.formData.skillTrainingId = event.id
this.formNameChange();
this.$forceUpdate();
},
changeFile(e) {
// 清空当前的 fileUrl 数组
this.formData.fileUrl = [];
// 如果 e 有长度(即用户选择了文件)
if (e.length) {
// 遍历每个文件对象并获取其 url
for (let data of e) {
const url = data.data ? data.data.url : data.url;
this.formData.fileUrl.push(url);
}
}
this.formData.fileUrl = this.$arrayToString(this.formData.fileUrl)
},
addOne() {
this.formData = {}
this.edit = true
},
// addForPerson(options) {
// this.formData = {
// personName: options.personName,
// personId: options.personId,
// skillTrainingId: options.skillTrainingId
// }
// this.edit = true
// },
getDetail(id) {
getSkillTrain(id).then(res => {
this.formData = res.data || {};
this.edit = false
if(this.formData.fileUrl) {
this.fileList = this.$processFileUrl(this.formData.fileUrl)
}
})
},
confirmDate(type, e) {
this.show[type] = false;
let date = new Date(e.value)
this.formData[type] =
`${date.getFullYear()}-${(date.getMonth()+1)>9?(date.getMonth()+1):('0'+(date.getMonth()+1))}-${date.getDate()>9?date.getDate():('0'+date.getDate())}`
this.$forceUpdate();
},
goBack() {
uni.navigateBack();
},
cancelPicker(type) {
this.show[type] = false
this.$forceUpdate();
},
// 单独设置 人员姓名 和 id
setPersonName(data){
this.formData.personName = data.personName
this.formData.personId = data.personId
this.formData.skillTrainingId = data.skillTrainingId
// this.addForPerson(data)
},
getDictLabel(value, list) {
if (list) {
let arr = list.filter(ele => ele.dictValue == value)
if (arr.length) {
return arr[0].dictLabel
} else {
return '请选择'
}
}
},
pickerConfirm(type, event) {
this.show[type] = false
this.formData[type] = event.value[0].dictValue
this.$forceUpdate();
},
showPicker(type) {
if (this.edit) {
this.show[type] = true
this.$forceUpdate()
}
},
formNameChange() {
let date = new Date()
let day =
`${date.getFullYear()}-${(date.getMonth()+1) + 1 > 9 ? (date.getMonth()+1) + 1: '0'+((date.getMonth()+1) + 1)}-${date.getDate() > 9 ? date.getDate(): '0'+date.getDate()}`
this.formData.trainingTopic =
`${this.$store.state.user.nick}_于${day}对人员_${this.formData.personName}_进行XXXX培训`;
},
async saveInfo() {
try {
// 验证表单
const isValid = await this.$refs.uForm.validate();
if (!isValid) {
throw new Error('请检查必填项填写');
}
// 显示全局加载
this.$showLoading();
// 根据 formData 是否有 id 来决定是更新还是新增
let response;
let successMessage;
if (this.formData.id) {
response = await updateSkillTrain(this.formData);
successMessage = '修改成功';
} else {
response = await addSkillTrain(this.formData);
successMessage = '保存成功';
}
if (response.code === 200) {
this.$u.toast(successMessage);
// 如果是编辑模式,关闭编辑状态;否则返回上一页
if (this.formData.id) {
this.edit = false;
} else {
await this.$delay(1000); // 延迟1秒后返回上一页
uni.navigateBack();
}
}
} catch (error) {
// 处理错误并显示提示信息
this.$u.toast('错误详情:' + error);;
} finally {
// 确保加载页总是会被隐藏
uni.hideLoading();
}
},
// saveInfo() {
// this.$refs.uForm.validate().then(res => {
// if (this.formData.id) {
// updateSkillTrain(this.formData).then(res => {
// if (res.code == 200) {
// uni.showToast({
// title: '修改成功'
// })
// this.edit = false;
// }
// })
// } else {
// addSkillTrain(this.formData).then(res => {
// if (res.code == 200) {
// uni.showToast({
// title: '保存成功'
// })
// uni.navigateBack();
// }
// })
// }
// }).catch(() => {
// uni.showToast({
// title: '请检查必填项填写',
// icon: 'none'
// })
// })
// }
}
}
</script>
<style lang="scss">
.page ::v-deep .u-navbar__content {
background-color: transparent !important;
}
.page {
background-color: #EEF1F5 !important;
height: 100vh;
background-image: url('https://rc.jinan.gov.cn/qcwjyH5/static/images/top.png');
background-repeat: no-repeat;
background-size: 100% auto;
}
.button-area {
padding: 24rpx 32rpx 68rpx;
width: calc(100% + 64rpx);
margin-left: -32rpx;
background: #fff;
display: flex;
box-sizing: border-box;
margin-top: 40rpx;
border-radius: 16px 16px 0px 0px;
.btn {
line-height: 72rpx;
width: 176rpx;
margin-right: 16rpx;
font-size: 28rpx;
border: 1px solid #B8C5D4;
color: #282828;
text-align: center;
border-radius: 8rpx;
}
.reset {
background: #DCE2E9;
}
.save {
background: linear-gradient(103deg, #1D64CF 0%, #1590D4 99%);
color: #fff;
border: 0;
flex-grow: 1;
}
}
.noValue {
color: rgb(192, 196, 204);
}
.self-form.popup {
padding-top: 32rpx;
.bordered {
border: 1rpx solid #dadbde;
padding: 9px;
border-radius: 4px;
}
}
.disabledLine {
background: rgb(245, 247, 250);
cursor: not-allowed;
}
</style>

View File

@@ -0,0 +1,224 @@
<!--
* @Date: 2024-10-08 14:29:36
* @LastEditors: shirlwang
* @LastEditTime: 2025-11-04 17:11:33
-->
<template>
<view class="page" style="background-image: url('../../../packageRc/static/pageBg.png');position:relative;">
<view class="tab-list" v-if="showTab != 1">
<view class="tab" :class="{active: activeType == 1}" @click="canChangeType ? changeType(1) : ''">走访<br>调查
</view>
<view class="tab" :class="{active: activeType == 2}" @click="canChangeType ? changeType(2) : ''">政策法规<br>咨询
</view>
<view class="tab" :class="{active: activeType == 3}" @click="canChangeType ? changeType(3) : ''">岗位<br>推荐
</view>
<view class="tab" :class="{active: activeType == 4}" @click="canChangeType ? changeType(4) : ''">技术培训<br>操作
</view>
<view class="tab" :class="{active: activeType == 5}" @click="canChangeType ? changeType(5) : ''">就业<br>跟踪
</view>
</view>
<investigate :userId="userId" :name="name" v-if="activeType == 1" ref="type1" />
<policyConsultation v-if="activeType == 2" ref="type2" />
<jobRecommend v-if="activeType == 3" ref="type3" :showInfo="showInfo"/>
<skillTrain v-if="activeType == 4" ref="type4" />
<jobTrack v-if="activeType == 5" ref="type5" />
</view>
</template>
<script>
import investigate from './components/investigate.vue';
import policyConsultation from './components/policyConsultation.vue';
import jobRecommend from './components/jobRecommend.vue';
import skillTrain from './components/skillTrain.vue';
import jobTrack from './components/jobTrack.vue';
export default {
components: {
investigate,
policyConsultation,
jobRecommend,
skillTrain,
jobTrack,
},
data() {
return {
isAdd: true,
activeType: 1,
showTab: undefined,
canChangeType: true,
userId: '',
name:"",
showInfo: '0'
}
},
onLoad(options) {
this.userId = options.userId
this.name = options.name
this.showTab = options.showTab
this.showInfo = options.showInfo || '0'
if (options.id && options.type) {
this.activeType = options.type
this.canChangeType = false;
this.isAdd = false
// 获取服务详情
this.$nextTick(() => {
this.$refs['type' + options.type].getDetail(options.id)
})
} else if (options.personName && options.personId) {
this.canChangeType = false;
this.activeType = options.type
this.$nextTick(() => {
this.$refs['type' + options.type].setPersonName(options)
})
}
// else if (options.personName && options.personId) {
// this.canChangeType = false;
// this.activeType = options.type
// this.$nextTick(() => {
// // 获取求职需求详情
// this.$refs['type' + options.type].addForPerson(options)
// })
// }
else {
this.changeType(options.activeType || 1)
}
},
onReady() {},
created() {},
methods: {
changeType(type) {
this.activeType = type
this.$nextTick(() => {
this.$refs['type' + type].addOne()
})
},
goBack() {
uni.navigateBack();
},
}
}
</script>
<style lang="scss">
@import "/packageRc/static/scss/index.scss";
.page {
background-color: #F4F4F4 !important;
height: 100vh;
background-repeat: no-repeat;
background-size: 100% auto;
position: relative;
}
.button-area {
padding: 24rpx 32rpx 68rpx;
background: #fff;
display: flex;
width: 100%;
box-sizing: border-box;
margin-top: 40rpx;
border-radius: 16px 16px 0px 0px;
position: absolute;
bottom: 0;
left: 0;
box-shadow: 0 0 10rpx rgba(0, 0, 0, 0.1);
.btn {
line-height: 72rpx;
width: 176rpx;
margin-right: 16rpx;
font-size: 28rpx;
border: 1px solid #B8C5D4;
color: #282828;
text-align: center;
border-radius: 8rpx;
}
.reset {
background: #DCE2E9;
}
.save {
background: linear-gradient(103deg, #1D64CF 0%, #1590D4 99%);
color: #fff;
border: 0;
flex-grow: 1;
}
}
.noValue {
color: rgb(192, 196, 204);
}
.disabledLine {
background: rgb(245, 247, 250);
cursor: not-allowed;
}
.inner {
background: #fff;
border-radius: 16rpx;
padding: 32rpx;
margin-bottom: 24rpx;
}
.input-outer-part{
// width: calc(100% - 64rpx);
padding-top: 32rpx;
// margin: 0 auto;;
}
.inner-part {
width: 100%;
}
.tab-list {
display: flex;
width: calc(100% - 64rpx);
margin: 16rpx auto 30rpx;
text-align: center;
border-radius: 16rpx;
background: #fff;
;
.tab {
width: 25%;
display: flex;
align-items: center;
justify-content: center;
border: 4rpx solid #FFFFFF;
background: #fff;
border-radius: 16rpx;
font-size: 28rpx;
color: #878787;
height: 106rpx;
&.active {
background: #1A62CE;
color: #fff;
position: relative;
font-weight: bold;
&::before {
content: '';
position: absolute;
bottom: -13rpx;
border-top: 14rpx solid #1A62CE;
border-left: 12rpx solid transparent;
border-right: 12rpx solid transparent;
left: calc(50% - 7rpx);
z-index: 2;
}
&::after {
content: '';
position: absolute;
z-index: 1;
bottom: -18rpx;
border-top: 14rpx solid #fff;
border-left: 12rpx solid transparent;
border-right: 12rpx solid transparent;
left: calc(50% - 7rpx);
}
}
}
}
</style>

View File

@@ -0,0 +1,285 @@
<template>
<view class="job-list" style="background-image: url('../../../packageRc/static/pageBg.png');position:relative;">
<view class="job-list__content">
<scroll-view class="job-list__scroll" scroll-y="true">
<view class="job-list__item" v-for="job in perlist" :key="job.id" @tap="toDetails(job)">
<view class="job-list__item-detail">
<text>经办人:</text>
<text>{{ job.agentUserName || '-' }}</text>
</view>
<view class="job-list__item-detail">
<text>经办时间:</text>
<text>{{ job.practicalSolutionTime }}</text>
</view>
<view class="job-list__item-detail">
<text>经办部门:</text>
<text>{{ job.agentDeptName }}</text>
</view>
<view class="job-list__item-detail">
<text>说明:</text>
<text>{{ job.blqksm || '--'}}</text>
</view>
</view>
</scroll-view>
</view>
</view>
</template>
<script>
import {
serviceTraceability
} from '@/packageRc/apiRc/company/index.js';
export default {
name: 'personnelList',
computed: {
filterColor() {
return (status) => {
const item = this.alertTibs.find(item => item.value === status);
return item ? item.color : '';
}
}
},
data() {
return {
openDeal: false,
showTime: false,
validType: [{
label: '是',
value: '1'
},
{
label: '否',
value: '0'
},
],
alertTibs: [{
value: '1',
label: '已超期',
color: '#ea362b'
},
{
value: '2',
label: '七天之内',
color: '#f1a945'
},
{
value: '3',
label: '大于七天',
color: '#377e27'
},
{
value: '0',
label: '已完成服务',
color: '#808080'
}
],
total: 0,
// 去除加载更多相关的状态和方法
// status: 'more',
// loadMoreJobs: function() {},
hopeSolveDate: '',
searchKeyword: '',
queryParams: {
pageNum: 1,
pageSize: 10,
id: undefined,
demandType: '',
},
perlist: [],
loading: false,
formData: {},
};
},
onLoad({
id,
demandType
}) {
this.queryParams.id = id
this.queryParams.demandType = demandType
this.getList(true);
},
methods: {
// 获取列表
async getList(reset = false) {
if (this.loading) return;
this.loading = true;
// 重置数据
if (reset) {
this.perlist = [];
this.queryParams.pageNum = 1;
}
const {
code,
data,
total
} = await serviceTraceability(this.queryParams)
if (code === 200) {
this.perlist = data; // 直接赋值获取到的数据,不再进行拼接
this.total = total;
}
this.loading = false;
},
// 搜索功能处理
handleSearch() {
this.getList(true);
},
// 根据 value 查找 label
getLabelByValue(list, value) {
const found = list.find(item => item.value === value);
return found ? found.label : '-';
},
getDictLabel(list, dictValue) {
let arr = list.filter((ele) => ele.dictValue == dictValue);
if (arr.length) {
return arr[0].dictLabel;
} else {
return "--";
}
},
toDetails({
businessType,
id
}) {
// 定义一个映射对象,将 businessType 映射到相应的页面路径和参数
const navigationMap = {
interview: {
path: '/pages/services/serviceDetail',
params: `?id=${id}&type=1&showTab=1`
},
assist: {
path: '/pages/needs/needDetail',
params: `?id=${id}&type=2&showTab=1`
},
entrepreneurship: {
path: '/pages/needs/needDetail',
params: `?id=${id}&type=3&showTab=1`
},
jobDemand: {
path: '/pages/needs/needDetail',
params: `?id=${id}&type=1&showTab=1&showInfo=1`
},
jobRecommendation: {
path: '/pages/services/serviceDetail',
params: `?id=${id}&type=3&showTab=1&showInfo=1`
},
otherNeeds: {
path: '/pages/needs/needDetail',
params: `?id=${id}&type=5&showTab=1`
},
policy: {
path: '/pages/services/serviceDetail',
params: `?id=${id}&type=2&showTab=1`
},
trainingNeeds: {
path: '/pages/needs/needDetail',
params: `?id=${id}&type=4&showTab=1`
},
trainingService: {
path: '/pages/needs/needDetail',
params: `?id=${id}&type=4&showTab=1`
}
};
// // 检查 businessType 是否存在于映射中
// if (businessType in navigationMap) {
// const {
// path,
// params
// } = navigationMap[businessType];
// this.$tab.navigateTo(`${path}${params}`);
// } else {
// // 如果 businessType 不匹配任何已知的类型,可以这里处理错误或忽略
// console.warn(`Unknown businessType: ${businessType}`);
// }
}
},
};
</script>
<style lang="scss" scoped>
.job-list {
background-color: #f4f4f4 !important;
height: 100vh;
background-repeat: no-repeat;
background-size: 100% auto;
padding: 32rpx;
&__content {
position: relative;
padding: 32rpx;
z-index: 10;
background-color: #fff;
border-radius: 32rpx 32rpx 0 0;
border: 1px solid #fff;
width: calc(100% - 64rpx);
}
&__scroll {
margin-top: 10rpx;
height: calc(100vh - 200rpx);
}
&__item {
position: relative;
padding: 32rpx;
margin-bottom: 32rpx;
background-color: #d0dcee;
border-radius: 16rpx;
font-size: 28rpx;
}
&__item-detail {
margin-top: 20rpx;
color: #8e8e8e;
&>text:nth-child(1) {
width: 200rpx;
}
view,
text:last-child {
margin-left: 10rpx;
color: #333;
}
}
.items {
margin-top: 30rpx;
}
.post_job_btn {
position: fixed;
bottom: 120rpx;
right: 16rpx;
width: 150rpx;
height: 150rpx;
border-radius: 50%;
z-index: 20;
background: url('https://rc.jinan.gov.cn/qcwjyH5/static/images/addPersonnel.png') no-repeat;
background-size: 100% 100%;
}
.dialog_form {
padding: 30rpx;
width: 80vw;
.tadio {
height: 100rpx;
}
.btn {
margin-top: 100rpx;
}
}
}
</style>

BIN
packageRc/static/cyzc.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 71 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 516 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 896 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 137 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 47 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 357 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.2 KiB

View File

@@ -0,0 +1,92 @@
.inner-part {
width: 100%;
}
.self-form {
width: 100%;
}
.form-item {
display: flex;
align-items: flex-start;
// margin-bottom: 24rpx;
background-color: #fff;
border-radius: 8rpx;
padding: 24rpx 0;
}
.form-label {
width: 200rpx;
font-size: 28rpx;
color: #333;
flex-shrink: 0;
line-height: 48rpx;
}
.required {
color: #f56c6c;
margin-left: 4rpx;
}
.form-textarea {
flex: 1;
border: none;
outline: none;
font-size: 28rpx;
color: #333;
background: none;
min-height: 120rpx;
line-height: 40rpx;
}
.form-textarea-disabled {
color: #909399;
background-color: #f5f7fa;
}
.icon-right {
width: 40rpx;
height: 40rpx;
display: flex;
align-items: center;
justify-content: center;
color: #A6A6A6;
margin-left: 16rpx;
}
.input-outer-part{
position: relative;
box-sizing: border-box;
.inner{
z-index: 1;
position: relative;
background: #fff;
width: calc(100% - 64rpx);
margin: 0 auto;
box-sizing: border-box;
border-radius: 16rpx;
padding: 32rpx;
margin-bottom: 24rpx;
.part-title{
color: #3D3D3D;
font-weight: bold;
line-height: 28rpx;
margin-top: 9rpx;
padding-left: 12rpx;
border-left: 6rpx solid #1A62CE;
font-size: 32rpx;
margin-bottom: 24rpx;
}
.inner-part{
background: #fff;
border-radius: 16rpx;
.self-form{
.u-form-item__body{
padding: 14px 0;
}
}
}
}
}