Merge branch 'feature/GFRS-717【0402】人力发展-活动量管理' into dev

# Conflicts:
#	src/assets/js/utils/validator.js
#	src/router/ebiz/index.js
This commit is contained in:
tian.guangyuan
2020-03-17 13:56:46 +08:00
27 changed files with 1884 additions and 4 deletions

View File

@@ -1,3 +1,3 @@
public
dist
node_modules
node_modules

View File

@@ -0,0 +1,90 @@
import request from '@/assets/js/utils/request'
import getUrl from '@/assets/js/utils/get-url'
// 个人中心 - 查询接口
export function getPersonalInfo(data) {
return request({
url: getUrl('/agent/personal/getInfo', 1),
method: 'post',
data
})
}
// 人才库列表查询接口
export function getAgentPersonnelList(data = {}) {
return request({
url: getUrl('/agent/personnel/queryList', 1),
method: 'post',
data
})
}
// 人才库 - 新增人才
export function saveAgentPersonnel(data) {
return request({
url: getUrl('/agent/personnel/saveOrUpdate', 1),
method: 'post',
data
})
}
// 人才库 - 查询详情
export function getAgentPersonnelDetail(data) {
return request({
url: getUrl('/agent/personnel/queryDetail', 1),
method: 'post',
data
})
}
// 人才库 - 查询人才库列表 - 导航页
export function getAgentPersonnelListFirst(data = {}) {
return request({
url: getUrl('/agent/personnel/queryListFirst', 1),
method: 'post',
data
})
}
// 活动量统计周报
export function queryWeekly(data) {
return request({
url: getUrl('/agent/activityRecord/queryWeekly', 1),
method: 'post',
data
})
}
// 查询日志页面增员列表
export function queryRecordList(data) {
return request({
url: getUrl('/agent/activityRecord/queryList', 1),
method: 'post',
data
})
}
// 日志详情查询
export function queryRecordDetail(data) {
return request({
url: getUrl('/agent/activityRecord/queryDetail', 1),
method: 'post',
data
})
}
// 新增日志
export function saveRecord(data) {
return request({
url: getUrl('/agent/activityRecord/saveOrUpdate', 1),
method: 'post',
data
})
}
export function getTokenForUserModel(data = {}) {
return request({
url: getUrl('/agent/enter/getTokenForUserModel', 1),
method: 'get',
params: {
data
}
})
}

View File

@@ -2017,5 +2017,28 @@ export default {
{ code: '01', value: '寿险' },
{ code: '02', value: '重疾' },
{ code: '03', value: '年金' }
],
// 活动量管理 - 人才库 - 状态
talentPoolStatus: [
{ id: 0, text: '暂不考虑' },
{ id: 1, text: '已加盟' },
{ id: 2, text: '确认加盟' },
{ id: 3, text: '三次接触以上' },
{ id: 4, text: '二次接触' },
{ id: 5, text: '首次接触 ' }
],
// 活动量管理 - 人才库 - 过往职业
talentPoolPastOccu: [
{ id: '01', text: '一般内勤职员' },
{ id: '02', text: '其他金融行业' },
{ id: '03', text: '家庭主妇' },
{ id: '04', text: '自由职业' },
{ id: '05', text: '离退休人员' },
{ id: '06', text: '个体经营者' },
{ id: '07', text: '销售' },
{ id: '08', text: '公务员' },
{ id: '09', text: '保险外勤' },
{ id: '10', text: '保险内勤' },
{ id: '11', text: '其他' }
]
}

View File

@@ -60,6 +60,13 @@ Validator.extend('age', {
return value > 17 && /^\d{1,3}$/.test(value)
}
})
//年龄不得大于100周岁
Validator.extend('maxAge', {
getMessage: () => '年龄不得大于100周岁',
validate: value => {
return value <= 100 && /^\d{1,3}$/.test(value)
}
})
//被保险人年龄不得小于18周岁
Validator.extend('appntAge', {
getMessage: () => '年龄不得小于18周岁',
@@ -138,4 +145,26 @@ Validator.extend('avoirdupois', {
validate: value => {
return /^[0-9]+([.]{1}[0-9]{1})?$/.test(value) && value > 0.1
}
})
})
//同业公司
Validator.extend('sameCompany', {
getMessage: () => '同业公司长度不超过120个字符不支持特殊字符',
validate: value => {
return /^[0-9a-zA-Z\.\s\u4e00-\u9fa5]{1,120}$/.test(value)
}
})
//从业年限
Validator.extend('workYears', {
getMessage: () => '从业年限仅支持阿拉伯数字,最多精确到一位小数',
validate: value => {
return /^[0-9]+([.]{1}[0-9]{1})?$/.test(value) && value > 0
}
})
//最大长度120字符
Validator.extend('max120', {
getMessage: () => '输入内容不得超过120哥字符',
validate: value => {
return value.length < 121
}
})

View File

@@ -0,0 +1,66 @@
<template>
<div>
<van-cell-group>
<van-cell :title="ActivityLogInfo.name" title-class="ml10" :is-link="isEdit" value-class="text-left" @click="toEdit">
<van-icon slot="icon" :name="ActivityLogInfo.avatarUrl || defaultAcatarUrl" style="line-height: inherit;" size="22" />
<span class="mr20">{{ ActivityLogInfo.age }}</span>
<span>{{ ActivityLogInfo.type == 0 ? '同业' : '白板' }}</span>
<van-icon slot="right-icon" name="edit" style="line-height: inherit;" :color="isEdit ? '#1989fa' : 'transparent'" size="24" />
</van-cell>
</van-cell-group>
</div>
</template>
<script>
import formatDate from '@/assets/js/utils/date-utils'
import { Cell, CellGroup, Image } from 'vant'
export default {
components: {
[Cell.name]: Cell,
[CellGroup.name]: CellGroup,
[Image.name]: Image
},
props: {
ActivityLogInfo: {
type: Object,
required: true,
default: () => {
return {
recordCode: '',
name: '王辉',
// avatarUrl: 'https://img.yzcdn.cn/vant/cat.jpeg',
age: '35岁',
type: '同业',
recordDate: ''
}
}
}
},
data() {
return {
defaultAcatarUrl: 'https://b.yzcdn.cn/vant/icon-demo-1126.png'
}
},
methods: {
toEdit() {
this.$jump({
flag: 'h5',
extra: {
url: location.origin + `/#/manpower/ActivityLog/Edit?code=${this.ActivityLogInfo.recordCode}&isEdit=${this.isEdit ? '0' : '1'}`,
forbidSwipeBack: '1'
},
routerInfo: { path: `/manpower/ActivityLog/Edit?code=${this.ActivityLogInfo.recordCode}&isEdit=${this.isEdit ? '0' : '1'}` }
})
}
},
computed: {
isEdit() {
if (this.ActivityLogInfo.recordDate === formatDate.formatDate().split(' ')[0]) {
return true
} else {
return false
}
}
}
}
</script>

View File

@@ -0,0 +1,70 @@
<!-- 导航 元素 -->
<template>
<!-- <div class="nav-item"> -->
<van-cell is-link class="relative" @click="rout(config)">
<template slot="title">
<van-icon v-if="config.icon" class="t-cell-icon" size="6.4vw" :name="config.icon" />
<img v-else class="t-cell-icon" :src="config.src" alt="config" />
<span class="custom-title"> {{ config.title }}</span>
</template>
</van-cell>
<!-- </div> -->
</template>
<script>
import { Cell } from 'vant'
import { weixinShare } from '@/assets/js/utils/wxShare.js'
export default {
name: 'NavItem',
components: {
[Cell.name]: Cell
},
props: {
config: {
type: Object,
required: true,
default: function() {
return {
title: '默认title',
path: '/404',
src: 'http://localhost:8080/favicon.ico'
}
}
}
},
data() {
return {}
},
created() {},
methods: {
rout(config) {
if (!config.share) {
let url = config.path.split('/').pop()
let path = config.path
this.$jump({
flag: 'h5',
extra: {
url: location.origin + `/#${url}`
},
routerInfo: { path: path }
})
} else {
weixinShare(config.shareConfig)
}
}
}
}
</script>
<style lang="scss" scoped>
// .nav-item {
.t-cell-icon {
position: absolute;
width: 6.4vw;
height: 6.4vw;
}
.custom-title {
margin-left: 8.4vw;
}
// }
</style>

View File

@@ -0,0 +1,51 @@
<template>
<van-cell :title="talentPoolInfo.name" title-class="ml10" is-link value-class="text-left">
<van-icon slot="icon" :name="talentPoolInfo.avatarUrl || defaultAcatarUrl" style="line-height: inherit;" size="24" />
<span>{{ talentPoolInfo.sameCompany }}</span>
<van-icon slot="right-icon" name="edit" style="line-height: inherit;" color="#1989fa" size="24" @click="edit(talentPoolInfo.personnelCode)" />
</van-cell>
</template>
<script>
import { Cell, CellGroup, Image } from 'vant'
export default {
components: {
[Cell.name]: Cell,
[CellGroup.name]: CellGroup,
[Image.name]: Image
},
props: {
talentPoolInfo: {
type: Object,
required: true,
default: () => {
return {
name: '王辉',
sameCompany: '中国人寿'
}
}
}
},
data() {
return {
defaultAcatarUrl: 'https://b.yzcdn.cn/vant/icon-demo-1126.png'
}
},
methods: {
edit(personnelCode) {
if (personnelCode) {
localStorage.setItem('personnelCode', personnelCode)
this.$jump({
flag: 'h5',
extra: {
url: location.origin + '/#/manpower/talentPool/Edit'
},
routerInfo: {
path: '/manpower/talentPool/Edit'
}
})
}
}
}
}
</script>

View File

@@ -0,0 +1,58 @@
<!-- 头部用户信息 -->
<template>
<div class="user-info flex align-items-c p15">
<img class="w40" src="../../../assets/images/bnf_avatar.png" />
<div class="add-list flex1 ml10">
<p>{{ userInfo.name }}</p>
<div class="c-gray-base">工号 | {{ userInfo.jobNo }}</div>
</div>
</div>
</template>
<script>
import { getAgentInfo } from '@/api/ebiz/my/my.js'
export default {
name: 'UserInfoHeader',
data() {
return {
userInfo: '', // 代理人信息
activeNames: ['1']
}
},
created() {
this.getInfo()
},
methods: {
async getInfo() {
// 获取代理人信息
let userInfo = localStorage.getItem('userInfo')
if (userInfo) {
this.userInfo = JSON.parse(userInfo)
} else {
const res = await getAgentInfo({})
if (res.result == 0) {
this.userInfo = res
localStorage.setItem('agentCode', res.jobNo)
localStorage.setItem('userInfo', JSON.stringify(res))
} else {
this.$toast(res.resultMessage)
}
}
}
},
components: {}
}
</script>
<style lang="scss" scoped>
.user-info {
color: #666;
.send-main {
border-bottom: 10px solid #f5f5f5;
}
.add-list {
color: #333;
line-height: 22px;
}
}
</style>

17
src/config/manpower.js Normal file
View File

@@ -0,0 +1,17 @@
// 人力发展
let mockBaseUrl = 'http://rap2api.taobao.org/app/mock/247074'
export default {
// 例子
'/demo/url': mockBaseUrl + '/demo/url',
// 查询日志统计周报
'/agent/activityRecord/queryWeekly': mockBaseUrl + '/agent/activityRecord/queryWeekly',
// 查询日志页面人才库列表
'/agent/personnel/queryListFirst': mockBaseUrl + '/agent/personnel/queryListFirst',
// 查询日志页面增员列表
'/agent/activityRecord/queryList': mockBaseUrl + '/agent/activityRecord/queryList',
// 日志详情查询
'/agent/activityRecord/queryDetail': mockBaseUrl + '/agent/activityRecord/queryDetail',
// 新增日志
'/agent/activityRecord/saveOrUpdate': mockBaseUrl + '/agent/activityRecord/saveOrUpdate'
}

View File

@@ -11,6 +11,7 @@ import product from './product'
import serve from './serve'
import common from './common'
import survey from './survey'
import manpower from './manpower'
const mockBaseUrl = 'http://rap2api.taobao.org/app/mock'
let baseObj = {
@@ -18,6 +19,6 @@ let baseObj = {
'/user/info': mockBaseUrl + '/223948/info',
'/user/logout': mockBaseUrl + '/223948/logout'
}
Object.assign(baseObj, proposal, sale, customer, my, product, serve, common, survey)
Object.assign(baseObj, proposal, sale, customer, my, product, serve, common, survey, manpower)
export default baseObj

View File

@@ -13,6 +13,7 @@ import claims from './claims'
import report from './report'
import nbs from './nbs'
import survey from './survey'
import manpower from './manpower'
export default [
...proposal,
...sale,
@@ -27,5 +28,6 @@ export default [
...claims,
...report,
...nbs,
...survey
...survey,
...manpower
] //根据需要进行删减

119
src/router/ebiz/manpower.js Normal file
View File

@@ -0,0 +1,119 @@
//人力发展 定义相关组件
const Navigation = () => import('@/views/ebiz/manpower/Navigation')
const PersonalCenter = () => import('@/views/ebiz/manpower/PersonalCenter')
const IncreaseStaffTools = () => import('@/views/ebiz/manpower/IncreaseStaffTools')
const Training = () => import('@/views/ebiz/manpower/Training')
const ActiveManagement = () => import('@/views/ebiz/manpower/ActiveManagement')
const TalentPoolList = () => import('@/views/ebiz/manpower/talentPool/List')
const TalentPoolAdd = () => import('@/views/ebiz/manpower/talentPool/Add')
const TalentPoolEdit = () => import('@/views/ebiz/manpower/talentPool/Edit')
const ActivityLogList = () => import('@/views/ebiz/manpower/activityLog/List')
const ActivityLogEdit = () => import('@/views/ebiz/manpower/activityLog/Edit')
export default [{
// 人力发展
path: '/manpower/Navigation',
name: 'Navigation',
component: Navigation,
meta: {
title: '人力发展',
index: 1
}
},
{
// 个人中心
path: '/manpower/PersonalCenter',
name: 'PersonalCenter',
component: PersonalCenter,
meta: {
title: '人力发展',
index: 2
}
},
{
// 增员工具
path: '/manpower/IncreaseStaffTools',
name: 'IncreaseStaffTools',
component: IncreaseStaffTools,
meta: {
title: '增员工具',
index: 3
}
},
{
// 培训上岗
path: '/manpower/Training',
name: 'Training',
component: Training,
meta: {
title: '培训上岗',
index: 100
}
},
{
// 活动量管理
path: '/manpower/ActiveManagement',
name: 'ActiveManagement',
component: ActiveManagement,
meta: {
title: '活动量管理',
index: 100
}
},
{
// 人才库
path: '/manpower/TalentPool/',
name: 'TalentPoolList',
component: TalentPoolList,
meta: {
title: '人才库',
index: 101
}
},
{
// 人才库-新增人才
path: '/manpower/TalentPool/Add',
name: 'TalentPoolAdd',
component: TalentPoolAdd,
meta: {
title: '基本信息',
index: 102
}
},
{
// 人才库-修改人才
path: '/manpower/TalentPool/Edit',
name: 'TalentPoolEdit',
component: TalentPoolEdit,
meta: {
title: '基本信息',
index: 103
}
},
{
// 当日增员活动日志
path: '/manpower/ActivityLog/List',
name: 'ActivityLogList',
component: ActivityLogList,
meta: {
title: '当日增员活动日志',
index: 100
}
},
{
// 日志详情
path: '/manpower/ActivityLog/Edit',
name: 'ActivityLogEdit',
component: ActivityLogEdit,
meta: {
title: '日志详情',
index: 100
}
}
]

View File

@@ -0,0 +1,221 @@
<!-- 活动量管理 -->
<template>
<div class="pb40">
<van-collapse v-model="weeklyNames">
<van-collapse-item title="活动量统计周报" title-class="fs16 fwb" name="1">
<van-grid :column-num="2">
<van-grid-item>
<p class="fs14">周白板面谈数量</p>
<p class="fs14 mt20 fwb">{{ weeklyInfo.whiteboard }}</p>
</van-grid-item>
<van-grid-item>
<p class="fs14">周同业面谈数量</p>
<p class="fs14 mt20 fwb">{{ weeklyInfo.sameTrade }}</p>
</van-grid-item>
</van-grid>
</van-collapse-item>
</van-collapse>
<!-- 人才库 -->
<div class="bg-white">
<van-collapse v-model="talentPoolCollapse" v-if="talentPoolList.length > 0">
<van-collapse-item name="1" title-class="fs16 fwb">
<div slot="title" class="flex justify-content-s align-items-c">
人才库
<van-icon class="mr10" name="plus" @click.stop="addTalentPool" />
</div>
<van-cell-group>
<TalentPoolItem v-for="talentPoolInfo in talentPoolList" :key="talentPoolInfo.personnelCode" :talentPoolInfo="talentPoolInfo"></TalentPoolItem>
</van-cell-group>
<p v-if="showMoreTalentPool" class="p15 text-right blue" @click="toListTalentPool">查看全部>>></p>
</van-collapse-item>
</van-collapse>
<template v-else>
<van-cell class="fs16 fwb">
<div slot="title" class="flex justify-content-s align-items-c">
人才库
</div>
</van-cell>
<van-cell>
<template slot="title">
<div class="text-center"><van-icon name="add-square" size="50" color="#1989fa" @click="addTalentPool" /></div>
</template>
</van-cell>
</template>
</div>
<!-- 当日增员活动日志 -->
<div class="bg-white">
<div class="p15" v-if="recordList.length == 0">
<p class="fs16 fwb">当日增员活动日志</p>
<div class="text-center van-hairline--top"><van-icon name="add-square" size="50" color="#1989fa" @click="toEdit" /></div>
</div>
<van-collapse v-model="recordNames" v-else>
<van-collapse-item name="1" title-class="fs16 fwb">
<div slot="title" class="flex justify-content-s align-items-c">当日增员活动日志 <van-icon class="mr10" name="plus" @click.stop="toEdit" /></div>
<ActivityLogItem :ActivityLogInfo="info" v-for="(info, index) in recordList" :key="index"></ActivityLogItem>
<p v-if="showMore" class="p15 text-right blue" @click="toList">查看全部>>></p>
</van-collapse-item>
</van-collapse>
</div>
</div>
</template>
<script>
import formatDate from '@/assets/js/utils/date-utils'
import { Collapse, CollapseItem, Grid, GridItem, Cell, CellGroup } from 'vant'
import TalentPoolItem from '@/components/ebiz/manpower/TalentPoolItem'
import ActivityLogItem from '@/components/ebiz/manpower/ActivityLogItem'
import { getAgentPersonnelListFirst, queryWeekly, queryRecordList } from '@/api/ebiz/manpower/manpower'
export default {
components: {
[Collapse.name]: Collapse,
[CollapseItem.name]: CollapseItem,
[Grid.name]: Grid,
[GridItem.name]: GridItem,
[Cell.name]: Cell,
[CellGroup.name]: CellGroup,
TalentPoolItem,
ActivityLogItem
},
data() {
return {
weeklyNames: ['1'],
personnelNames: ['1'],
recordNames: ['1'],
talentPoolInfo: {
name: '王辉',
sameCompany: '中国人寿'
},
ActivityLogInfo: {
recordCode: '',
name: '王辉',
// avatarUrl: 'https://img.yzcdn.cn/vant/cat.jpeg',
age: '35岁',
type: '同业',
recordDate: formatDate.formatDate().split(' ')[0]
},
// 日志统计周报信息
weeklyInfo: {
whiteboard: '', // 白板
sameTrade: '' // 同业
},
// 人才列表
showMoreTalentPool: false,
talentPoolCollapse: ['1'],
talentPoolList: [],
// 日志列表
showMore: false,
// 增员日志列表
recordList: []
}
},
mounted() {
this.queryWeekly()
this.getAgentPersonnelListFirst()
this.queryRecordList()
},
methods: {
// 获取日志统计周报
queryWeekly() {
queryWeekly({})
.then(res => {
console.log(res)
if (res.result == 0) {
this.weeklyInfo = res.content.weekly
} else {
this.$toast(res.resultMessage)
}
})
.catch(err => {
console.log(err)
})
},
// 查询增员日志列表
queryRecordList() {
let data = {
recordDate: ''
}
queryRecordList(data)
.then(res => {
if (res.result == 0) {
let data = res.content.records
if (data.length > 5) {
this.showMore = true
data = data.slice(0, 5)
} else {
this.showMore = false
}
this.recordList = data
} else {
this.$toast(res.resultMessage)
}
})
.catch(err => {
console.log(err)
})
},
toList() {
this.$jump({
flag: 'h5',
extra: {
url: location.origin + `/#/manpower/ActivityLog/List`,
forbidSwipeBack: '1'
},
routerInfo: { path: '/manpower/ActivityLog/List' }
})
},
toEdit() {
this.$jump({
flag: 'h5',
extra: {
url: location.origin + `/#/manpower/ActivityLog/Edit?isEdit=1`,
forbidSwipeBack: '1'
},
routerInfo: { path: '/manpower/ActivityLog/Edit?isEdit=1' }
})
},
addTalentPool() {
this.$jump({
flag: 'h5',
extra: {
url: location.origin + '/#/manpower/talentPool/Add'
},
routerInfo: {
path: '/manpower/talentPool/Add'
}
})
},
toListTalentPool() {
this.$jump({
flag: 'h5',
extra: {
url: location.origin + '/#/manpower/talentPool/'
},
routerInfo: {
path: '/manpower/talentPool/'
}
})
},
getAgentPersonnelListFirst() {
getAgentPersonnelListFirst()
.then(res => {
if (res.result == 0) {
let data = res.content.personnels
if (data.length > 5) {
this.showMoreTalentPool = true
data = data.slice(0, 5)
} else {
this.showMoreTalentPool = false
}
this.talentPoolList = data
} else {
this.$toast(res.resultMessage)
}
})
.catch(() => {})
}
}
}
</script>
<style lang="scss" scoped></style>

View File

@@ -0,0 +1,53 @@
<!-- 增员工具 -->
<template>
<div>
<UserInfoHeader />
<van-cell-group>
<NavItem v-for="(item, index) of navList" :key="index" :config="item" />
</van-cell-group>
</div>
</template>
<script>
import UserInfoHeader from '@/components/ebiz/manpower/UserInfoHeader'
import NavItem from '@/components/ebiz/manpower/NavItem'
import { CellGroup } from 'vant'
export default {
name: 'IncreaseStaffTools',
components: {
[UserInfoHeader.name]: UserInfoHeader,
[NavItem.name]: NavItem,
[CellGroup.name]: CellGroup
},
data() {
return {
active: 0,
navList: [
{
title: '公司介绍',
src: 'http://localhost:8080/favicon.ico',
path: '/',
},
{
title: '政策方案',
src: 'http://localhost:8080/favicon.ico',
path: '/'
},
{
title: '产品信息',
src: 'http://localhost:8080/favicon.ico',
path: '/'
},
{
title: '培训体系',
src: 'http://localhost:8080/favicon.ico',
path: '/'
}
]
}
},
methods: {}
}
</script>
<style lang="scss" scoped></style>

View File

@@ -0,0 +1,52 @@
<template>
<div>
<UserInfoHeader />
<van-cell-group>
<NavItem v-for="(item, index) of navList" :key="index" :config="item" />
</van-cell-group>
</div>
</template>
<script>
import UserInfoHeader from '@/components/ebiz/manpower/UserInfoHeader'
import NavItem from '@/components/ebiz/manpower/NavItem'
import { CellGroup } from 'vant'
export default {
name: 'Navigation',
components: {
[UserInfoHeader.name]: UserInfoHeader,
[NavItem.name]: NavItem,
[CellGroup.name]: CellGroup
},
data() {
return {
active: 0,
navList: [
{
title: '个人中心',
icon: 'user-o',
path: '/manpower/PersonalCenter'
},
{
title: '增员工具',
icon: 'friends-o',
path: '/manpower/IncreaseStaffTools'
},
{
title: '活动量管理',
icon: 'todo-list-o',
path: '/manpower/ActiveManagement'
},
{
title: '培训上岗',
icon: 'records',
path: '/manpower/Training'
}
]
}
},
methods: {}
}
</script>
<style lang="scss" scoped></style>

View File

@@ -0,0 +1,198 @@
<template>
<div class="personal-center-main" v-if="success">
<van-cell-group class="pl15 mt10">
<van-cell title="姓名" :value="agentInfo.name" />
<van-cell title="入职职级" :value="agentInfo.entryGrade" />
<van-cell title="现任职级" :value="agentInfo.presentGrade" />
<van-cell title="入职时间" :value="agentInfo.entryTime" />
<van-cell title="现任职级时间" :value="agentInfo.presentGradeTime" />
</van-cell-group>
<van-tabs v-model="active" class="mt10" sticky>
<van-tab title="团队人力架构">
<van-cell-group class="pl15">
<van-cell title="直辖组人力" :value="teamInfo.jurisdictionGroupNum" />
<van-cell title="直辖部人力" :value="teamInfo.jurisdictionDepartNum" />
<van-cell title="直辖部主管数" :value="teamInfo.jurisdictionGroupManagerNum" />
<van-cell title="大直辖人力" :value="teamInfo.majorJurisdictionNum" />
<van-cell title="直接增援人数" :value="teamInfo.directReinforceNum" />
<van-cell title="直接育成主管数量" :value="teamInfo.directBredManagerNum" />
<van-cell title="直接育成部门数量" :value="teamInfo.directBredDepartNum" />
<van-cell title="全辖团队人力" :value="teamInfo.allTeamNum" />
</van-cell-group>
</van-tab>
<van-tab title="实时新增数据">
<van-grid :border="true" :column-num="2" class="p15">
<van-grid-item>
当月个人新增
<span class="c-gray-darker fwb mt20">{{ realAddDataInfo.currentMonthPersonalAdd }}</span>
</van-grid-item>
<van-grid-item>
直辖组新增
<span class="c-gray-darker fwb mt20">{{ realAddDataInfo.jurisdictionGroupAdd }}</span>
</van-grid-item>
<van-grid-item>
直辖部新增
<span class="c-gray-darker fwb mt20">{{ realAddDataInfo.jurisdictionDepartAdd }}</span>
</van-grid-item>
<van-grid-item>
大直辖新增
<span class="c-gray-darker fwb mt20">{{ realAddDataInfo.majorJurisdictionAdd }}</span>
</van-grid-item>
</van-grid>
</van-tab>
<van-tab title="人力架构">
<van-collapse v-model="activeNames" accordion>
<van-collapse-item v-for="(item, index) of frameworkInfoLstAdmin" :name="item.gradeChineseName" :key="index">
<div slot="title">
<span class="tagJOB">{{ item.gradeEnglishName }}</span>
{{ item.gradeChineseName }} ({{ item.manageStaffNum }})
</div>
<van-grid :border="true" :column-num="2" class="p15">
<van-grid-item>
当月个人新增
<span class="c-gray-darker fwb mt20">{{ item.personalRealAddDataInfo.currentMonthPersonalAdd }}</span>
</van-grid-item>
<van-grid-item>
直辖组新增
<span class="c-gray-darker fwb mt20">{{ item.personalRealAddDataInfo.jurisdictionGroupAdd }}</span>
</van-grid-item>
<van-grid-item>
直辖部新增
<span class="c-gray-darker fwb mt20">{{ item.personalRealAddDataInfo.jurisdictionDepartAdd }}</span>
</van-grid-item>
<van-grid-item>
大直辖新增
<span class="c-gray-darker fwb mt20">{{ item.personalRealAddDataInfo.majorJurisdictionAdd }}</span>
</van-grid-item>
</van-grid>
</van-collapse-item>
</van-collapse>
<van-cell-group class="">
<van-cell v-for="(item, index) of frameworkInfoLstNotAdmin" :key="index">
<div slot="title">
<span class="tagJOB">{{ item.gradeEnglishName }}</span>
<span class="name">{{ item.gradeChineseName }}</span>
</div>
</van-cell>
</van-cell-group>
</van-tab>
</van-tabs>
</div>
</template>
<script>
const isAdmin = {
BD: true,
SBM: true,
BM: true,
SAS: true,
AS: true,
CM: false,
CA: false
}
import { Cell, CellGroup, Tab, Tabs, Grid, GridItem, Collapse, CollapseItem } from 'vant'
import { getPersonalInfo } from '@/api/ebiz/manpower/manpower'
export default {
name: 'PersonalCenter',
components: {
[Cell.name]: Cell,
[CellGroup.name]: CellGroup,
[Tab.name]: Tab,
[Tabs.name]: Tabs,
[Grid.name]: Grid,
[GridItem.name]: GridItem,
[Collapse.name]: Collapse,
[CollapseItem.name]: CollapseItem
},
data() {
return {
activeNames: [],
active: '',
success: false,
agentInfo: null,
realAddDataInfo: null,
frameworkInfoLst: null,
teamInfo: null
}
},
computed: {
frameworkInfoLstAdmin: function() {
if (this.frameworkInfoLst) {
return this.frameworkInfoLst.filter(item => {
return isAdmin[item.gradeEnglishName]
})
}
return []
},
frameworkInfoLstNotAdmin: function() {
if (this.frameworkInfoLst) {
return this.frameworkInfoLst.filter(item => {
return !isAdmin[item.gradeEnglishName]
})
}
return []
}
},
watch: {},
created() {
getPersonalInfo({
agentCode: localStorage.getItem('agentCode')
})
.then(res => {
if (res.result == 0) {
for (let key of Object.keys(res.content)) {
this[key] = res.content[key]
}
this.success = true
} else {
this.$toast(res.resultMessage)
}
})
.catch(() => {})
},
mounted() {},
methods: {}
}
</script>
<style scoped="scoped" lang="scss">
.personal-center-main {
/deep/.van-cell:not(:last-child)::after {
position: absolute;
box-sizing: border-box;
content: ' ';
pointer-events: none;
right: 0;
bottom: 0;
left: 0;
border-bottom: 1px solid #dadada;
-webkit-transform: scaleY(0.5);
transform: scaleY(0.5);
}
/deep/ .van-cell__value {
text-align: left !important;
}
/deep/.van-collapse-item__title {
padding-left: 60px;
}
.tagJOB {
display: inline-block;
position: absolute;
width: 30px;
height: 30px;
line-height: 30px;
font-size: 3vw;
left: 20px;
top: 7px;
text-align: center;
border-radius: 999px;
background-color: #5ca7de;
color: #fff;
}
.name {
padding-left: 45px;
}
}
</style>

View File

@@ -0,0 +1,61 @@
<template>
<div>
<UserInfoHeader />
<van-cell-group>
<NavItem v-for="(item, index) of navList" :key="index" :config="item" />
</van-cell-group>
</div>
</template>
<script>
import UserInfoHeader from '@/components/ebiz/manpower/UserInfoHeader'
import NavItem from '@/components/ebiz/manpower/NavItem'
import { CellGroup } from 'vant'
import { getTokenForUserModel } from '@/api/ebiz/manpower/manpower'
export default {
name: 'Navigation',
components: {
[UserInfoHeader.name]: UserInfoHeader,
[NavItem.name]: NavItem,
[CellGroup.name]: CellGroup
},
data() {
return {
active: 0,
navList: [
{
title: '增员分享',
icon: 'cluster-o',
path: '/',
share: true,
shareConfig: null
},
{
title: '增员审批',
icon: 'comment-o',
path: '/agentEenter/approve/ApproveList'
}
]
}
},
created() {
this.getInfo()
},
methods: {
async getInfo() {
const res = await getTokenForUserModel()
if (res.result == 0) {
delete res.result
delete res.resultMessage
this.navList[0].shareConfig = res
} else {
this.$toast(res.resultMessage)
}
}
}
}
</script>
<style lang="scss" scoped></style>

View File

@@ -0,0 +1,229 @@
<!-- 活动日志-修改日志 -->
<template>
<div>
<van-cell-group>
<van-field readonly v-model="recordInfo.recordDate" label="日期" />
<van-field required v-model="recordInfo.name" label="姓名" placeholder="请输入姓名" v-validate="'required|name'" data-vv-name="姓名" />
<van-field
required
v-model="recordInfo.age"
type="digit"
label="年龄"
placeholder="请输入年龄"
v-validate="'required|onlyNumber|maxAge'"
data-vv-name="年龄"
/>
<van-cell title="类型" required value-class="text-left">
<span
v-for="(item, index) in typeArr"
:key="index"
class="type-tag inline-flex justify-content-c align-items-c mr20"
@click="slectType(item)"
:class="recordInfo.type == index ? 'select-tag' : ''"
>
{{ item.text }}
</span>
</van-cell>
<van-field
required
v-model="recordInfo.interviewNum"
type="digit"
label="面谈次数"
placeholder="请输入面谈次数"
v-validate="'required|onlyNumber'"
data-vv-name="面谈次数"
/>
<van-field
required
readonly
v-model="logResult"
label="面谈结果"
placeholder="请选择面谈结果"
@click="handleRsult"
v-validate="'required'"
data-vv-name="面谈结果"
/>
<van-field
required
readonly
v-model="logOccupation"
label="过往职业"
placeholder="请选择过往职业"
@click="handleOccupation"
v-validate="'required'"
data-vv-name="过往职业"
/>
</van-cell-group>
<van-button color="#1989fa" type="primary" class="bottom-btn" size="large" v-no-more-click="1000" v-if="isEdit == 0" @click="subInfo">保存</van-button>
<van-popup v-model="showResultArr" position="bottom" :style="{ height: '30%' }">
<van-picker show-toolbar :columns="resultArr" @cancel="showResultArr = false" @confirm="selectResult" />
</van-popup>
<van-popup v-model="showOccupationArr" position="bottom" :style="{ height: '30%' }">
<van-picker show-toolbar :columns="occupationArr" @cancel="showOccupationArr = false" @confirm="selectOccupation" />
</van-popup>
</div>
</template>
<script>
import formatDate from '@/assets/js/utils/date-utils'
import { Field, CellGroup, Popup, Picker, Cell, Button } from 'vant'
import { queryRecordDetail, saveRecord } from '@/api/ebiz/manpower/manpower'
export default {
components: {
[Cell.name]: Cell,
[Field.name]: Field,
[CellGroup.name]: CellGroup,
[Button.name]: Button,
[Popup.name]: Popup,
[Picker.name]: Picker
},
data() {
return {
recordInfo: {
recordDate: formatDate.formatDate().split(' ')[0],
name: '',
age: '',
type: 0,
interviewNum: '', // 面试次数
interviewResult: '', // 面谈结果
pastOccu: '' // 过往职业
},
recordCode: '',
isEdit: '',
// 面试结果
showResultArr: false,
// 职业选择
showOccupationArr: false,
typeArr: [{ id: 0, text: '同业' }, { id: 1, text: '白板' }],
resultArr: [{ id: '0', text: '不加盟' }, { id: '1', text: '考虑中' }, { id: '2', text: '进班了解' }, { id: '3', text: '统一加盟' }],
occupationArr: [
{ id: '001', text: '一般内勤职员' },
{ id: '002', text: '其他金融行业' },
{ id: '003', text: '家庭主妇' },
{ id: '004', text: '自由职业' },
{ id: '005', text: '离退休人员' },
{ id: '006', text: '个体经营者' },
{ id: '007', text: '销售' },
{ id: '008', text: '公务员' },
{ id: '009', text: '保险外勤' },
{ id: '010', text: '保险内勤' },
{ id: '011', text: '其他' }
]
}
},
mounted() {
this.recordCode = this.$route.query.code || ''
this.isEdit = this.$route.query.isEdit
this.queryRecordDetail()
},
computed: {
logResult() {
if (this.recordInfo.interviewResult) {
return this.resultArr.find(ele => ele.id === this.recordInfo.interviewResult).text
} else {
return ''
}
},
logOccupation() {
if (this.recordInfo.pastOccu) {
return this.occupationArr.find(ele => ele.id === this.recordInfo.pastOccu).text
} else {
return ''
}
}
},
methods: {
queryRecordDetail() {
let data = {
recordCode: this.recordCode
}
queryRecordDetail(data)
.then(res => {
console.log(res)
if (res.result == 0) {
this.recordInfo = res.content.record
} else {
this.$toast(res.resultMessage)
}
})
.catch(err => {
console.log(err)
})
},
subInfo() {
this.$validator.validateAll().then(result => {
if (result) {
let data = {
recordCode: this.recordCode,
name: this.recordInfo.name,
age: this.recordInfo.age,
type: this.recordInfo.type || '0',
interviewNum: this.recordInfo.interviewNum,
interviewResult: this.recordInfo.interviewResult,
pastOccu: this.recordInfo.pastOccu
}
console.log(data)
saveRecord(data)
.then(res => {
console.log(res)
if (res.result == 0) {
this.$jump({
flag: 'goBack',
extra: {
refresh: '1',
index: '-1',
forbidSwipeBack: '1'
},
routerInfo: {
type: 2
}
})
} else {
this.$toast(res.resultMessage)
}
})
.catch(err => {
console.log(err)
})
} else {
this.$toast(this.errors.all()[0])
}
})
},
slectType(type) {
this.recordInfo.type = type.id
},
handleRsult() {
this.showResultArr = true
},
handleOccupation() {
this.showOccupationArr = true
},
selectResult(val) {
this.recordInfo.interviewResult = val.id
this.showResultArr = false
},
selectOccupation(val) {
this.recordInfo.pastOccu = val.id
this.showOccupationArr = false
}
}
}
</script>
<style lang="scss" scoped>
::v-deep .van-cell__title {
max-width: 90px;
}
.type-tag {
// display: inline-block;
width: 40px;
height: 16px;
border: 1px solid gray;
border-radius: 4px;
}
.select-tag {
background: #1989fa;
color: white;
border: none;
}
</style>

View File

@@ -0,0 +1,104 @@
<!-- 活动日志-日志列表 -->
<template>
<div class="pb60">
<div class="p15 flex justify-content-s align-items-c">
<p>
<span v-if="isToday" class="fwb">今天</span>
<span v-else class="blue" @click="backToday">回到今天</span>
</p>
<p @click="openCalendar">{{ showTime }}</p>
</div>
<ActivityLogItem :ActivityLogInfo="item" v-for="(item, index) in recordList" :key="index"></ActivityLogItem>
<div class="bottom-btn text-center">
<van-icon name="add-square" size="50" color="#1989fa" @click="toEdit" />
</div>
<van-popup v-model="showDateTime" position="bottom" :style="{ height: '30%' }">
<van-datetime-picker v-model="selectTime" type="date" :max-date="maxDate" @confirm="confirm" @cancel="cancel" />
</van-popup>
</div>
</template>
<script>
import formatDate from '@/assets/js/utils/date-utils'
import { DatetimePicker, Popup } from 'vant'
import ActivityLogItem from '@/components/ebiz/manpower/ActivityLogItem'
import { queryRecordList } from '@/api/ebiz/manpower/manpower'
export default {
components: {
[DatetimePicker.name]: DatetimePicker,
[Popup.name]: Popup,
ActivityLogItem
},
data() {
return {
isToday: true,
showTime: `< ${formatDate.formatDate().split(' ')[0]} >`,
todayTime: `< ${formatDate.formatDate().split(' ')[0]} >`,
selectTime: new Date(),
maxDate: new Date(),
showDateTime: false,
ActivityLogInfo: {
name: '王辉',
// avatarUrl: 'https://img.yzcdn.cn/vant/cat.jpeg',
age: '35岁',
flag: '同业',
recordDate: ''
},
recordList: []
}
},
mounted() {
this.queryRecordList(formatDate.formatDate().split(' ')[0])
},
methods: {
queryRecordList(date) {
let data = {
recordDate: date
}
queryRecordList(data)
.then(res => {
console.log(res)
if (res.result == 0) {
this.recordList = res.content.records
} else {
this.$toast(res.resultMessage)
}
})
.catch(err => {
console.log(err)
})
},
toEdit() {
this.$jump({
flag: 'h5',
extra: {
url: location.origin + `/#/manpower/ActivityLog/Edit?isEdit=1`,
forbidSwipeBack: '1'
},
routerInfo: { path: '/manpower/ActivityLog/Edit?isEdit=1' }
})
},
openCalendar() {
this.showDateTime = true
},
confirm(val) {
this.showTime = `< ${formatDate.formatDate(val).split(' ')[0]} >`
this.ActivityLogInfo.recordDate = formatDate.formatDate(val).split(' ')[0]
if (this.showTime !== this.todayTime) {
this.isToday = false
}
this.queryRecordList(formatDate.formatDate(val).split(' ')[0])
this.showDateTime = false
},
cancel() {
this.showDateTime = false
},
backToday() {
this.showTime = this.todayTime
this.ActivityLogInfo.recordDate = formatDate.formatDate().split(' ')[0]
this.isToday = true
this.queryRecordList(formatDate.formatDate().split(' ')[0])
}
}
}
</script>

View File

@@ -0,0 +1 @@
<!-- 公司介绍 -->

View File

@@ -0,0 +1 @@
<!-- 政策方案 -->

View File

@@ -0,0 +1 @@
<!-- 产品信息 -->

View File

@@ -0,0 +1 @@
<!-- 培训体系 -->

View File

@@ -0,0 +1,5 @@
//验证
export function demo(par) {
}

View File

@@ -0,0 +1,157 @@
<!-- 人才库-新增人才 -->
<template>
<div class="container">
<van-field v-model="formData.name" required clearable label="姓名" name="姓名" placeholder="请输入" v-validate="'required|name'" />
<van-field v-model="formData.mobile" clearable label="手机号码" name="手机号码" placeholder="请输入" maxlength="11" type="tel" v-validate="'mobile'" />
<select-radio :radios="isSame" label="是否同业" name="是否同业" :value.sync="formData.isSame" :required="true"></select-radio>
<!-- 异业公司 要求填写 -->
<template v-if="formData.isSame == '1'">
<van-field
:value="formData.pastOccu | idToText('talentPoolPastOccu')"
readonly
required
label="过往职业"
name="过往职业"
right-icon="arrow"
placeholder="请选择"
@click="toSelect('pastOccu')"
/>
</template>
<!-- 异业公司 要求填写 end-->
<!-- 同业公司 要求填写 -->
<template v-if="formData.isSame == '0'">
<van-field v-model="formData.sameCompany" required clearable label="同业公司" name="同业公司" placeholder="请输入" v-validate="'required|sameCompany'" />
<select-radio
:radios="gradeType"
label="岗位类型"
name="岗位类型"
:value.sync="formData.gradeType"
:required="true"
v-validate="'required'"
></select-radio>
<van-field v-model="formData.grade" required clearable label="职级/岗位" name="职级/岗位" placeholder="请输入" v-validate="'required|max120'" />
<van-field v-model="formData.workYears" required clearable label="从业年限" name="从业年限" placeholder="请输入" v-validate="'required|workYears'" />
</template>
<!-- 同业公司 要求填写 end -->
<van-field
:value="formData.status | idToText('talentPoolStatus')"
readonly
required
label="状态"
name="状态"
right-icon="arrow"
placeholder="请选择"
@click="toSelect('status')"
/>
<van-button color="#1989fa" type="primary" class="bottom-btn" size="large" @click="save">保存</van-button>
<van-popup v-model="popupShow" position="bottom"><van-picker show-toolbar :columns="columns" @confirm="onConfirm" @cancel="popupShow = false"/></van-popup>
</div>
</template>
<script>
import { Field, CellGroup, Cell, Popup, Picker } from 'vant'
import filter from '@/filters/index'
import DataDictionary from '@/assets/js/utils/data-dictionary'
import SelectRadio from '@/components/ebiz/SelectRadio'
import { saveAgentPersonnel } from '@/api/ebiz/manpower/manpower'
export default {
name: 'TalentPoolAdd',
components: {
[Field.name]: Field,
[CellGroup.name]: CellGroup,
[Cell.name]: Cell,
[Popup.name]: Popup,
[Picker.name]: Picker,
[SelectRadio.name]: SelectRadio
},
filters: {
idToText: filter.idToText
},
data() {
return {
selected: '',
popupShow: false,
formData: {
name: '',
mobile: '',
isSame: '0',
pastOccu: '01',
sameCompany: '',
gradeType: '0',
grade: '',
workYears: '',
status: 0
},
gradeType: [
{
label: '内勤',
value: '0'
},
{
label: '外勤',
value: '1'
}
],
isSame: [
{
label: '是',
value: '0'
},
{
label: '否',
value: '1'
}
],
columns: null
}
},
watch: {},
created() {},
mounted() {},
methods: {
toSelect(name) {
this.selected = name
this.popupShow = true
switch (name) {
case 'pastOccu':
this.columns = DataDictionary.talentPoolPastOccu
break
case 'status':
this.columns = DataDictionary.talentPoolStatus
break
default:
break
}
},
onConfirm(value) {
this.popupShow = false
this.formData[this.selected] = value.id
},
save() {
this.$validator.validateAll().then(result => {
if (result) {
saveAgentPersonnel(this.formData)
.then(res => {
if (res.result == 0) {
//eslint-disable-next-line
EWebBridge.webCallAppInJs('goBack', {
refresh: '1',
index: '-1'
})
} else {
this.$toast(res.resultMessage)
}
})
.catch(() => {})
} else {
this.$toast(this.errors.all()[0])
}
})
}
}
}
</script>
<style scoped="scoped" lang="scss"></style>

View File

@@ -0,0 +1,169 @@
<!-- 人才库-修改人才 -->
<template>
<div class="container">
<van-field v-model="formData.name" required clearable label="姓名" name="姓名" placeholder="请输入" v-validate="'required|name'" />
<van-field v-model="formData.mobile" clearable label="手机号码" name="手机号码" placeholder="请输入" maxlength="11" type="tel" v-validate="'mobile'" />
<select-radio :disabled="true" :radios="isSame" label="是否同业" name="是否同业" :value.sync="formData.isSame" :required="true"></select-radio>
<!-- 异业公司 要求填写 -->
<template v-if="formData.isSame == '1'">
<van-field
:value="formData.pastOccu | idToText('talentPoolPastOccu')"
readonly
required
label="过往职业"
name="过往职业"
right-icon="arrow"
placeholder="请选择"
@click="toSelect('pastOccu')"
/>
</template>
<!-- 异业公司 要求填写 end-->
<!-- 同业公司 要求填写 -->
<template v-if="formData.isSame == '0'">
<van-field v-model="formData.sameCompany" required clearable label="同业公司" name="同业公司" placeholder="请输入" v-validate="'required|sameCompany'" />
<select-radio
:radios="gradeType"
label="岗位类型"
name="岗位类型"
:value.sync="formData.gradeType"
:required="true"
v-validate="'required'"
></select-radio>
<van-field v-model="formData.grade" required clearable label="职级/岗位" name="职级/岗位" placeholder="请输入" v-validate="'required|max120'" />
<van-field v-model="formData.workYears" required clearable label="从业年限" name="从业年限" placeholder="请输入" v-validate="'required|workYears'" />
</template>
<!-- 同业公司 要求填写 end -->
<van-field
:value="formData.status | idToText('talentPoolStatus')"
readonly
required
label="状态"
name="状态"
right-icon="arrow"
placeholder="请选择"
@click="toSelect('status')"
/>
<van-button color="#1989fa" type="primary" class="bottom-btn" size="large" @click="save">保存</van-button>
<van-popup v-model="popupShow" position="bottom"><van-picker show-toolbar :columns="columns" @confirm="onConfirm" @cancel="popupShow = false"/></van-popup>
</div>
</template>
<script>
import { Field, CellGroup, Cell, Popup, Picker } from 'vant'
import filter from '@/filters/index'
import DataDictionary from '@/assets/js/utils/data-dictionary'
import SelectRadio from '@/components/ebiz/SelectRadio'
import { getAgentPersonnelDetail, saveAgentPersonnel } from '@/api/ebiz/manpower/manpower'
export default {
name: 'TalentPoolAdd',
components: {
[Field.name]: Field,
[CellGroup.name]: CellGroup,
[Cell.name]: Cell,
[Popup.name]: Popup,
[Picker.name]: Picker,
[SelectRadio.name]: SelectRadio
},
filters: {
idToText: filter.idToText
},
data() {
return {
selected: '',
popupShow: false,
formData: {
name: '',
mobile: '',
isSame: '0',
pastOccu: '01',
sameCompany: '',
gradeType: '0',
grade: '',
workYears: '',
status: 0
},
gradeType: [
{
label: '内勤',
value: '0'
},
{
label: '外勤',
value: '1'
}
],
isSame: [
{
label: '是',
value: '0'
},
{
label: '否',
value: '1'
}
],
columns: null
}
},
watch: {},
created() {
const personnelCode = localStorage.getItem('personnelCode')
getAgentPersonnelDetail({ personnelCode: personnelCode })
.then(res => {
console.log(res)
if (res.result == 0) {
this.formData = res.content.personnel
} else {
this.$toast(res.resultMessage)
}
})
.catch(() => {})
},
mounted() {},
methods: {
toSelect(name) {
this.selected = name
this.popupShow = true
switch (name) {
case 'pastOccu':
this.columns = DataDictionary.talentPoolPastOccu
break
case 'status':
this.columns = DataDictionary.talentPoolStatus
break
default:
break
}
},
onConfirm(value) {
this.popupShow = false
this.formData[this.selected] = value.id
},
save() {
this.$validator.validateAll().then(result => {
if (result) {
saveAgentPersonnel(this.formData)
.then(res => {
if (res.result == 0) {
//eslint-disable-next-line
EWebBridge.webCallAppInJs('goBack', {
refresh: '1',
index: '-1'
})
} else {
this.$toast(res.resultMessage)
}
})
.catch(() => {})
} else {
this.$toast(this.errors.all()[0])
}
})
}
}
}
</script>
<style scoped="scoped" lang="scss"></style>

View File

@@ -0,0 +1,101 @@
<!-- 人才库-人才列表 -->
<template>
<div class="container">
<van-search placeholder="请输入要查询人的姓名" v-model="searchName" @change="searchList" />
<div v-if="hasTalentPoolList" class="mb60">
<van-index-bar :index-list="indexList">
<div v-for="(item, key) in talentPoolList" :key="key" class="bg-white mb10 mr20">
<van-index-anchor :index="key" class="border-gb" />
<van-cell-group>
<TalentPoolItem v-for="talentPoolInfo in item" :key="talentPoolInfo.personnelCode" :talentPoolInfo="talentPoolInfo"> </TalentPoolItem>
</van-cell-group>
</div>
</van-index-bar>
</div>
<div v-else class="text-center">
<img class="mt40" src="@/assets/images/pic_page-non.png" />
<div class="fs17 mt40">暂无数据</div>
</div>
<van-button type="info" class="bottom-btn" size="large" @click="add" v-no-more-click="1000">新增</van-button>
</div>
</template>
<script>
import { Search, Cell, IndexBar, IndexAnchor, Popup, Button, Tag, CellGroup } from 'vant'
import TalentPoolItem from '@/components/ebiz/manpower/TalentPoolItem'
import { getAgentPersonnelList } from '@/api/ebiz/manpower/manpower'
export default {
name: 'TalentPoolList',
components: {
[Search.name]: Search,
[Cell.name]: Cell,
[CellGroup.name]: CellGroup,
[IndexBar.name]: IndexBar,
[IndexAnchor.name]: IndexAnchor,
[Popup.name]: Popup,
[Button.name]: Button,
[Tag.name]: Tag,
TalentPoolItem
},
data() {
return {
hasTalentPoolList: false,
searchName: '',
indexList: ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', '#'],
talentPoolList: {}
}
},
watch: {},
created() {
this.searchList()
},
mounted() {},
methods: {
searchList() {
this.hasTalentPoolList = false
getAgentPersonnelList({ name: this.searchName })
.then(res => {
if (res.result == 0) {
if (Object.keys(res.content.personnels).length == 0) {
return false
}
const data = res.content.personnels
this.talentPoolList = {}
for (let item of this.indexList) {
if (data[item]) {
this.talentPoolList[item] = data[item]
}
}
this.hasTalentPoolList = true
}
})
.catch(() => {})
},
add() {
this.$jump({
flag: 'h5',
extra: {
url: location.origin + '/#/manpower/talentPool/Add'
},
routerInfo: {
path: '/manpower/talentPool/Add'
}
})
}
}
}
</script>
<style scoped="scoped" lang="scss">
.container {
.van-search__content {
background: #fff !important;
border-radius: 10px;
}
.van-search {
background: none !important;
}
}
</style>