@@ -1,131 +1,225 @@
< template >
< AppLayout :title = "title" :show-bg-image = "false" >
< view class = "tab-list" >
< view class = "tab" : class = "{active: activeType == 1}" > 求职 < br > 需求
< view class = "tab" : class = "{active: activeType == 1}" @click ="tabChange(1)" > 岗位推荐
< / view >
< view class = "tab" : class = "{active: activeType == 2}" > 创业 < br > 需求
< view class = "tab" : class = "{active: activeType == 2}" @click ="tabChange(2)" > 政策推荐
< / view >
< view class = "tab" : class = "{active: activeType == 3}" > 培训 < br > 需求
< / view >
< view class = "tab" : class = "{active: activeType == 4}" > 其他 < br > 需求
< view class = "tab" : class = "{active: activeType == 3}" @click ="tabChange(3)" > 培训推荐
< / view >
< / view >
< view class = "main-list" :style = "getBackgroundStyle('k.png') " >
< view class = "list-top ">
< view class = "list-title" >
< text > 帮扶记录详情 < / text >
< view class = "title-line" > < / view >
< view class = "page-container " >
< scroll-view :scroll-y = "true" class = "nearby-scroll" @scrolltolower ="scrollBottom" lower -threshold = " 50 ">
< view class = "main-list" :style = "getBackgroundStyle('k.png')" v-if = "activeType==1" >
< view class = "list-top" >
< view class = "list-title" >
< text > 推荐岗位列表 < / text >
< view class = "title-line" style = "left: 70rpx;" > < / view >
< / view >
< view class = "title-total" >
共 < text class = "total-num" > { { totalNum } } < / text > 个
< / view >
< / view >
< view class = "list-box" v-if = "dataList.length>0" >
< view class = "con-box" v-for = "(item,index) in dataList" :key="index" >
< view class = "form-item" >
< view class = "item-left" >
< image class = "item-img" :src = "baseUrl+'/dispatch/person.png'" mode = "" > < / image >
< view class = "item-label" >
岗位名称 :
< / view >
< / view >
< view class = "item-right" >
{ { item . jobTitle } }
< / view >
< / view >
< view class = "form-item" >
< view class = "item-left" >
< image class = "item-img" :src = "baseUrl+'/dispatch/help.png'" mode = "" > < / image >
< view class = "item-label" >
公司名称 :
< / view >
< / view >
< view class = "item-right" >
{ { item . companyName } }
< / view >
< / view >
< view class = "form-item" >
< view class = "item-left" >
< image class = "item-img" :src = "baseUrl+'/dispatch/base.png'" mode = "" > < / image >
< view class = "item-label" >
薪资待遇 :
< / view >
< / view >
< view class = "item-right" >
{ { item . minSalary } } - { { item . maxSalary } }
< / view >
< / view >
< view class = "form-item" >
< view class = "item-left" >
< image class = "item-img" :src = "baseUrl+'/dispatch/num.png'" mode = "" > < / image >
< view class = "item-label" >
工作地点 :
< / view >
< / view >
< view class = "item-right" >
{ { item . jobLocation } }
< / view >
< / view >
< / view >
< / view >
< empty v-else pdTop = "200" > < / empty >
< / view >
< / view >
< view class = "form-container " >
< view class = "form-item " >
< view class = "item-label" >
人员姓名 :
< view class = "main-list" :style = "getBackgroundStyle('k.png')" v-if = "activeType==2" >
< view class = "list-top " >
< view class = "list-title " >
< text > 推荐政策列表 < / text >
< view class = "title-line" style = "left: 70rpx;" > < / view >
< / view >
< view class = "title-total" >
共 < text class = "total-num" > { { totalNum } } < / text > 项
< / view >
< / view >
< view class = "item-value" >
{ { formData . name } }
< view class = "list-box" v-if = "dataList.length>0" >
< view class = "con-box" v-for = "(item,index) in dataList" :key="index" >
< view class = "form-item" >
< view class = "item-left" >
< image class = "item-img" :src = "baseUrl+'/dispatch/person.png'" mode = "" > < / image >
< view class = "item-label" >
政策名称 :
< / view >
< / view >
< view class = "item-right" >
{ { item . zcmc } }
< / view >
< / view >
< view class = "form-item" >
< view class = "item-left" >
< image class = "item-img" :src = "baseUrl+'/dispatch/help.png'" mode = "" > < / image >
< view class = "item-label" >
政策类型 :
< / view >
< / view >
< view class = "item-right" >
{ { item . type === '3' ? '个人就业政策' : '单位就业政策' } }
< / view >
< / view >
< view class = "form-item" >
< view class = "item-left" >
< image class = "item-img" :src = "baseUrl+'/dispatch/base.png'" mode = "" > < / image >
< view class = "item-label" >
政策级别 :
< / view >
< / view >
< view class = "item-right" >
{ { item . zcLevel } }
< / view >
< / view >
< view class = "form-item" >
< view class = "item-left" >
< image class = "item-img" :src = "baseUrl+'/dispatch/num.png'" mode = "" > < / image >
< view class = "item-label" >
发文单位 :
< / view >
< / view >
< view class = "item-right" >
{ { item . sourceUnit } }
< / view >
< / view >
< view class = "form-item" >
< view class = "item-left" >
< image class = "item-img" :src = "baseUrl+'/dispatch/date.png'" mode = "" > < / image >
< view class = "item-label" >
发布时间 :
< / view >
< / view >
< view class = "item-right" >
{ { item . publishTime } }
< / view >
< / view >
< / view >
< / view >
< empty v-else pdTop = "200" > < / empty >
< / view >
< view class = "form-item" >
< view class = "item-label " >
身份证号 :
< view class = "main-list" :style = "getBackgroundStyle('k.png')" v-if = "activeType==3" >
< view class = "list-top " >
< view class = "list-title" >
< text > 推荐培训列表 < / text >
< view class = "title-line" style = "left: 70rpx;" > < / view >
< / view >
< view class = "title-total" >
共 < text class = "total-num" > { { totalNum } } < / text > 门
< / view >
< / view >
< view class = "item-value" >
{ { formData . id _card } }
< view class = "list-box" v-if = "dataList.length>0" >
< view class = "con-box" v-for = "(item,index) in dataList" :key="index" >
< view class = "form-item" >
< view class = "item-left" >
< image class = "item-img" :src = "baseUrl+'/dispatch/person.png'" mode = "" > < / image >
< view class = "item-label" >
课程标题 :
< / view >
< / view >
< view class = "item-right" >
{ { item . videoTitle } }
< / view >
< / view >
< view class = "form-item" >
< view class = "item-left" >
< image class = "item-img" :src = "baseUrl+'/dispatch/help.png'" mode = "" > < / image >
< view class = "item-label" >
课程分类 :
< / view >
< / view >
< view class = "item-right" >
{ { getabelByValue ( item . category , classificationOptions ) } }
< / view >
< / view >
< view class = "form-item" >
< view class = "item-left" >
< image class = "item-img" :src = "baseUrl+'/dispatch/base.png'" mode = "" > < / image >
< view class = "item-label" >
讲师 :
< / view >
< / view >
< view class = "item-right" >
{ { item . teacherName } }
< / view >
< / view >
< view class = "form-item" >
< view class = "item-left" >
< image class = "item-img" :src = "baseUrl+'/dispatch/num.png'" mode = "" > < / image >
< view class = "item-label" >
时长 :
< / view >
< / view >
< view class = "item-right" >
{ { formatDuration ( item . hour ) } }
< / view >
< / view >
< / view >
< / view >
< empty v-else pdTop = "200" > < / empty >
< / view >
< view class = "form-item" >
< view class = "item-label" >
联系电话 :
< / view >
< view class = "item-value" >
{ { formData . phone } }
< / view >
< / view >
< view class = "form-item" >
< view class = "item-label" >
帮扶类型 :
< / view >
< view class = "item-value" >
{ { formData . task _type } }
< / view >
< / view >
< view class = "form-item" >
< view class = "item-label" >
帮扶人员 :
< / view >
< view class = "item-value" >
{ { formData . create _by _name } }
< / view >
< / view >
< view class = "form-item" >
< view class = "item-label" >
帮扶日期 :
< / view >
< view class = "item-value" >
{ { formData . follow _date } }
< / view >
< / view >
< view class = "form-item" >
< view class = "item-label" >
下次联系 :
< / view >
< view class = "item-value" >
{ { formData . next _contact _date } }
< / view >
< / view >
< view class = "form-item" >
< view class = "item-label" >
人员标签 :
< / view >
< view class = "item-value" >
{ { formData . tag _name } }
< / view >
< / view >
< view class = "form-item" >
< view class = "item-label" >
帮扶内容 :
< / view >
< view class = "item-value" >
{ { formData . detailRecords } }
< / view >
< / view >
< / view >
< / view >
< / scroll-view >
< / view >
< / AppLayout >
< / template >
< script setup >
import { inject , ref , reactive , onMounted } from 'vue' ;
import { onLoad } from '@dcloudio/uni-app' ;
import { inject , ref , reactive , onMounted } from 'vue' ;
import { onLoad , onShow } from '@dcloudio/uni-app' ;
const { $api , navTo , navBack } = inject ( 'globalFunction' ) ;
import config from "@/config.js"
const title = ref ( '' ) ;
const activeType = ref ( 1 )
const formData = reactive ( {
taskName : '' ,
taskType : '' ,
priority : '' ,
createTime : '' ,
allocationStatus : '' ,
taskAllocation : {
goalPersonCount : null ,
executeDeptId : '' ,
executeDeptName : '' ,
executeDeptAncestors : '' ,
allocationStatus : '1' ,
allocationNote : '' ,
deadline : null ,
goalPersonList : [ ]
}
} )
const taskTypeOptions = ref ( [ ] )
const priorityOptions = ref ( [ ] )
const allocationStatusOptions = ref ( [ ] )
const executeDeptOptions = ref ( [ ] )
// 表单引用
const formRef = ref ( null )
const pageNum = ref ( 1 )
const pageSize = ref ( 10 )
const totalNum = ref ( 0 )
const dataList = ref ( [ ] )
const classificationOptions = ref ( [ ] )
const goalPersonId = ref ( [ ] )
const baseUrl = config . imgBaseUrl
const getBackgroundStyle = ( imageName ) => ( {
backgroundImage : ` url( ${ baseUrl } /dispatch/ ${ imageName } ) ` ,
@@ -133,34 +227,41 @@ const getBackgroundStyle = (imageName) => ({
backgroundPosition : 'center' , // 居中
backgroundRepeat : 'no-repeat'
} ) ;
function tabChange ( val ) {
activeType . value = val
getDataList ( )
}
function formatDuration ( duration ) {
// 如果已经是字符串格式,直接返回
if ( typeof duration === 'string' ) {
return duration
}
// 如果是数字(秒数),格式化为时间字符串
if ( typeof duration === 'number' ) {
const hours = Math . floor ( duration / 3600 )
const minutes = Math . floor ( ( duration % 3600 ) / 60 )
const secs = duration % 60
if ( hours > 0 ) {
return ` ${ hours } : ${ minutes . toString ( ) . padStart ( 2 , '0' ) } : ${ secs . toString ( ) . padStart ( 2 , '0' ) } `
} else {
return ` ${ minutes } : ${ secs . toString ( ) . padStart ( 2 , '0' ) } `
}
}
return duration
}
function getDictionary ( ) {
$api . myRequest ( '/system/public/dict/data/type/assist_task_type ' ) . then ( ( resData ) => {
$api . myRequest ( '/system/public/dict/data/type/question_classification ' ) . then ( ( resData ) => {
if ( resData && resData . code == 200 ) {
resData . data . forEach ( item => {
const obj = {
value : item . dictValue ,
text : item . dictLabel
}
taskType Options. value . push ( obj )
classification Options. value . push ( obj )
} )
}
} ) ;
}
function getDetail ( id ) {
let header = {
'Authorization' : uni . getStorageSync ( 'Padmin-Token' ) ,
'Content-Type' : "application/x-www-form-urlencoded"
}
let params = {
goalPersonId : id
}
$api . myRequest ( '/dispatch/assist/records/getDetail' , params , 'get' , 9100 , header ) . then ( ( resData ) => {
console . log ( "resData" , resData )
resData . data . task _type = getabelByValue ( resData . data . task _type , taskTypeOptions . value )
Object . assign ( formData , resData . data )
} ) ;
}
function getabelByValue ( value , arr ) {
if ( ! Array . isArray ( arr ) ) {
return ''
@@ -168,34 +269,143 @@ function getabelByValue(value,arr) {
const item = arr . find ( item => item . value === String ( value ) )
return item ? item . text : '暂无'
}
onLoad ( ( options ) => {
runAsyncTasks ( options )
} ) ;
const runAsyncTasks = as ync ( options ) => {
await getD ictionary ( )
await getDetail ( options . id )
function getDataList ( ) {
dataList . value = [ ]
let header = {
'Authorization' : uni . getStorageS ync ( 'Padmin-Token' ) ,
'Content-Type' : "appl ica tion/x-www-form-urlencoded"
}
if ( activeType . value == 1 ) {
let params = {
goalPersonId : goalPersonId . value ,
pageNum : 1 ,
pageSize : 1
}
$api . myRequest ( '/dispatch/job/willingness/list' , params , 'get' , 9100 , header ) . then ( ( resData ) => {
if ( resData . rows && resData . rows . length > 0 ) {
const education = resData . rows [ 0 ] . education ? resData . rows [ 0 ] . education : ''
const jobType = resData . rows [ 0 ] . jobType ? resData . rows [ 0 ] . jobType : ''
const type = resData . rows [ 0 ] . type ? resData . rows [ 0 ] . type : ''
const jobParams = {
education ,
jobType ,
type
} ;
$api . myRequest ( '/ks/cms/job/recommend?education' , jobParams , 'get' , 9100 , header , false , 'jobRecommend' ) . then ( ( resData ) => {
dataList . value = resData . data
if ( dataList . value . length > 10 ) {
dataList . value = dataList . value . slice ( 0 , 10 )
}
} )
} else {
$api . myRequest ( '/ks/cms/job/recommend?education' , { } , 'get' , 9100 , header , false , 'jobRecommend' ) . then ( ( resData ) => {
dataList . value = resData . data
if ( dataList . value . length > 10 ) {
dataList . value = dataList . value . slice ( 0 , 10 )
}
} )
}
} ) ;
} else if ( activeType . value == 2 ) {
let policyParams = {
pageNum : 1 ,
pageSize : 5
}
$api . myRequest ( '/portal/policyInfo/portalList' , policyParams , 'get' , 9100 , header , false , 'policyRecommend' ) . then ( ( resData ) => {
dataList . value = resData . rows
} )
} else if ( activeType . value == 3 ) {
let willingParams = {
goalPersonId : goalPersonId . value ,
pageNum : 1 ,
pageSize : 1
}
$api . myRequest ( '/dispatch/train/willingness/list' , willingParams , 'get' , 9100 , header ) . then ( ( resData ) => {
if ( resData . code == 200 ) {
let train = { } ;
if ( resData . rows && resData . rows . length > 0 ) {
train = resData . rows [ 0 ] ;
}
let trainParams = {
category : train . courseType || '' ,
pageNum : 1 ,
pageSize : 5
} ;
$api . myRequest ( '/dispatch/train/trainVideo/table' , trainParams , 'get' , 9100 , header ) . then ( ( resData ) => {
dataList . value = resData . rows
} )
} else {
}
} ) ;
}
}
function scrollBottom ( ) {
// if(pageNum.value<totalNum.value/pageSize.value){
// pageNum.value++
// getDataList()
// }
}
onLoad ( ( options ) => {
goalPersonId . value = options . goalPersonId
} ) ;
const runAsyncTasks = async ( ) => {
await getDictionary ( )
await getDataList ( )
}
onShow ( ( ) => {
dataList . value = [ ]
pageNum . value = 1
runAsyncTasks ( )
} )
< / script >
< style lang = "stylus" scoped >
. tab - list
display : flex
margin : 16 rpx 30 rpx 3 0rpx
margin : 16 rpx 30 rpx 0 rpx
text - align : center
border - radius : 16 rpx
background : # fff
align - items : center
justify - content : space - between
padding : 20 rpx 40 rpx 0 rpx
. tab
padding - bottom : 10 rpx
font - size : 30 rpx
. active
background : # 1 A62CE
color : # fff
color : # 1 A62CE
border - bottom : 4 rpx solid # 1 A62CE
position : relative
font - weight : bold
image
height : 100 %
width : 100 %
. page - container {
display : flex ;
flex - direction : column ;
height : calc ( 100 vh - var ( -- window - top ) ) ; /* 如果 AppLayout 有 header, 需减去 */
/* 或者简单用: height: 100vh; */
padding - bottom : 140 rpx
}
. nearby - scroll
// 使用flex布局让scroll-view自适应高度, 占据剩余空间
flex : 1
// overflow: hidden;
. task - box
display : flex
align - items : center
. task - label
font - size : 30 rpx
color : # 6 E7E9B
. task - name
font - weight : bold
font - size : 30 rpx
color : # 3 D61AC
. main - list
background - color : # ffffff
padding : 20 rpx 20 rpx 28 rpx 20 rpx
@@ -229,15 +439,50 @@ image
margin - right : 4 rpx
font - weight : bold
font - size : 26 rpx
. list - box
margin - top : 40 rpx
: deep ( . uni - forms - item _ _label )
width : 194 rpx ! important
font - size : 28 rpx ;
color : # 404040 ;
. search - container
padding : 20 rpx 0 rpx 0 rpx 0 rpx
. title - total
font - size : 24 rpx
color : # 999999
. total - num
color : # 3088 FF
margin - left : 4 rpx
margin - right : 4 rpx
font - weight : bold
font - size : 26 rpx
. search - item
display : flex
align - items : center
margin - bottom : 30 rpx
. label
width : 160 rpx
font - size : 28 rpx
color : # 404040
flex - shrink : 0
. input ,
. picker
background : # FFFFFF
flex : 1
. picker - value
color : # 666
. form - container
margin - top : 30 rpx
min - width : 0
. search - box - btn
border - radius : 32 rpx ! important
background : # 3088 FF ! important
margin - right : 16 rpx
. reset - box - btn
border - radius : 32 rpx ! important
background : # 02 B44D
color : # fff
. con - box
background : # fff
padding : 20 rpx
@@ -245,12 +490,26 @@ image
border - radius : 24 rpx
border : 1 rpx solid # EDF5FF
margin - top : 30 rpx
. form - title
display : flex
align - items : center
. form - name
font - weight : bold
font - size : 30 rpx
color : # 595959
margin - right : 16 rpx
. form - type
border - radius : 8 rpx ;
border : 2 rpx solid # FF7D26 ;
font - size : 24 rpx
color : # F1690E
padding : 4 rpx 10 rpx
. form - item
display : flex
align - items : center
margin - bottom : 20 rpx
. mb - 30
margin - bottom : 30 rpx
justify - content : space - between
margin - top : 30 rpx
. item - left
display : flex
align - items : center
@@ -258,38 +517,54 @@ image
width : 26 rpx
height : 26 rpx
margin - right : 10 rpx
. item - label1
. item - label
font - size : 26 rpx
color : # B3B3B3
width : 13 0 rpx
. item - label
width : 200 rpx
text - align : left
font - size : 30 rpx
color : # 606266
height : 72 rpx
padding : 0 24 rpx 0 0
vertical - align : middle
flex - shrink : 0
box - sizing : border - box
. item - value
col or : # 333
font - size : 3 0rpx
he ight: 7 2rpx
padding : 0 24 rpx 0 0
vertical - align : middle
flex - shrink : 0
box - sizing : border - box
: deep ( . uni - forms - item _ _label )
width : 194 rpx ! important
font - size : 28 rpx ;
color : # 404040 ;
. butt on- group {
display : flex ;
justify - content : space - between ;
padding : 40 rpx 20 rpx 20 rpx ;
}
width : 19 0 rpx
. item - right
font - size : 26 rpx
color : # 737373
// overflow: hidden
// text-overflow: ellipsis
// white-space: nowrap
word - wrap : break - word
o verflow - wrap : break - word
white - space : normal
. form - btns
margin - top : 30 rpx
. f orm - box - btn
border - radius : 5 0rpx ! important
margin - r ight: 24 rpx
padding : 0 rpx 4 0rpx
. detail - btn
background : # EDF5FF
border : 1 px solid # 3088 FF
font - size : 28 rpx
color : # 3088 FF
. follow - btn
background : # EEF9F3
border : 1 px solid # 00933 E
f ont - size : 28 rpx
color : # 00933 E
. recommend - btn
background : linear - gradient ( 92 deg , # 0 DCCFF 0 % , # 4760 FF 100 % )
font - size : 28 rpx
color : # FFFFFF
. button - group
position : fixed
bottom : 0
left : 0
width : 100 %
height : 120 rpx
background : # fff
. btns
height : 120 rpx
width : 100 %
line - height : 120 px
display : flex
align - items : center
justify - content : space - between
box - shadow : 0 - 2 rpx 10 rpx rgba ( 0 , 0 , 0 , 0.1 )
. btn {
width : 45 % ;
@@ -307,15 +582,16 @@ image
background - color : # 368 BFF ;
color : white ;
}
. choice - btn {
width : 100 % ;
height : 7 0rpx ;
font - size : 28 rpx ;
border - radius : 8 rpx ;
background - color : # 368 BFF ;
color : white ;
margin - left : 0 ;
. float - btn {
position : fixed ;
bottom : 10 0rpx ;
right : 50 rpx ;
background : # 368 BFF ;
width : 100 rpx ;
height : 100 rpx ;
border - radius : 50 % ;
line - height : 100 rpx ;
text - align : center ;
color : # fff ;
}
: deep ( . uni - easyinput _ _content )
background : rgba ( 0 , 0 , 0 , 0 ) ! important
< / style >