Commit 3dbd35d2 by Lin

feat:招聘管理入口文件配置

1 parent 02de293f
......@@ -58,5 +58,14 @@ module.exports = {
/** 获取首页统计数据 */
getStaticData(data) {
return api.post('dj.api.smartcarlife.shopmallActivity.getMerchantCrowdfundingStatistics', data)
}
},
/** 待处理招聘统计 */
waitstaffstateAPI(data) {
return api.post(
'dj.api.staff.miniprogram.recruitment.demand.stat',
data,
[],
'/rop-dj-staff-miniprogram/router'
)
}
}
......@@ -2,6 +2,7 @@
const IMG_URL = 'https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/'
import api from '~/packageCrowdFunding/api'
import NP from 'number-precision'
import { waitstaffstateAPI} from '~/api/api'
Component({
/**
* 组件的属性列表
......@@ -75,6 +76,14 @@ Component({
isTab: true,
tabIndex: 1
},
{
menuText: '招聘管理',
icon: 'event_management',
path: '',
isTab: true,
tabIndex: 1,
tipsNum: 99
},
// {
// menuText: '话术库',
// icon: 'script _library',
......@@ -104,12 +113,22 @@ Component({
icon: "sceneMarket",
navigateToUrl: "/packageEquity/pages/sceneMarket/index/index",
})
// 仅区域运营展示招聘管理模块
if ((userInfo.loginRole == 3) && menuList.every((item) => item.menuText != "招聘管理")) menuList.push({
menuText: "招聘管理",
icon: "recruit-manage",
path: 'packageEquity.recruitManage',
isTab: true,
tabIndex: 1,
tipsNum: 0
})
this.setData({
loginRole,
userInfo,
menuList
})
this.getData()
this.getWaitStaff() // 在组件加载时调用
}
},
......@@ -138,6 +157,24 @@ Component({
}
})
},
// 招聘管理首页需求分析
getWaitStaff() {
const { menuList } = this.data
const index = menuList.findIndex(e => e.menuText === '招聘管理')
waitstaffstateAPI()
.then(result => {
const { code, data } = result
if (code == 0) {
this.setData({
[`menuList[${index}].tipsNum`]: data.waitProcessCount || 0
})
}
})
.catch(err => {
console.error('获取招聘管理统计失败:', err)
})
},
navGo(e) {
console.log(e)
const thisPage = wx.$router.getPageInstance()
......
import api from '~/subvehicleConversion/api'
import NP from 'number-precision'
const IMG_URL = 'https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/'
import { waitstaffstateAPI} from '~/api/api'
Component({
properties: {
navBarHeight: Number
......@@ -19,12 +20,14 @@ Component({
{title: '调查问卷', imgName: 'questionnaire', isOpen: false},
{title: '营销素材', imgName: 'marketingMaterial', isOpen: false},
{title: '业务申请', imgName: 'businessApplication', isOpen: false},
{title: '招聘管理', imgName: 'businessApplication', isOpen: false, tipsNum:99},
],
exhibitionToolsList: [
{title: '调查问卷', icon: 'questionnaire', isOpen: false},
{title: '营销素材', icon: 'marketing_materials', isOpen: false},
{title: '业务申请', icon: 'business_application', isOpen: false},
{title: '活动管理', icon: 'event_management', isOpen: true,path:'activityManagement', isTab: true, tabIndex: 2},
{title: '招聘管理', imgName: 'businessApplication', isOpen: false, tipsNum:99},
// {title: '话术库', icon: 'script _library', isOpen: false},
{title: '订单补录', icon: 'supplementary_order', isOpen: true, path: 'supplementaryOrderList', isTab: true, tabIndex: 1}
],
......@@ -75,6 +78,23 @@ Component({
if (isTab) return thisPage.changeTabBar && thisPage.changeTabBar({detail: tabIndex})
wx.$router.go(path)
},
// 获取招聘管理待处理数量
getWaitStaff() {
waitstaffstateAPI()
.then(result => {
const { code, data } = result
if (code == 0) {
const { exhibitionToolsList } = this.data
const index = exhibitionToolsList.findIndex(e => e.title === '招聘管理')
this.setData({
[`exhibitionToolsList[${index}].tipsNum`]: 14
})
}
})
.catch(err => {
console.error('获取招聘管理统计失败:', err)
})
},
onLoad() {
const userInfo = wx.$util.getUserInfo(),
{exhibitionToolsList} = this.data
......@@ -88,6 +108,24 @@ Component({
exhibitionToolsList
})
}
// 仅区域运营角色展示招聘管理模块
if ((userInfo.loginRole == 3 ) && exhibitionToolsList.every((item) => item.title != "招聘管理")) {
exhibitionToolsList.push({
title: "招聘管理",
icon: "recruit-manage",
path: 'packageEquity.recruitManage',
isOpen: true,
isTab: true,
tabIndex: 1,
tipsNum: 0
});
this.setData({
exhibitionToolsList
}, () => {
// 在设置完成后再获取招聘管理统计
this.getWaitStaff()
})
}
const params = {
merchantId: wx.$util.getUserInfo()?.default4SStoreInfo_newCarConversion?.merchantId || ''
}
......
......@@ -2,7 +2,7 @@
import mixins from './index_mixins'
import api from '../../api.js'
import NP from 'number-precision'
import { getWaitAuditCountAPI } from '~/api/api'
import { getWaitAuditCountAPI,waitstaffstateAPI } from '~/api/api'
import {
getYQInfo,
get4SStoreList,
......@@ -751,8 +751,7 @@ Page({
},
// 招聘管理首页需求分析
getWaitStaff(userInfo, index) {
api
.waitstaffstateAPI()
waitstaffstateAPI()
.then(result => {
let {
code,
......@@ -1495,17 +1494,17 @@ Page({
})
}
//区域督导和超管角色
if (
(userInfo?.isSuper || userInfo?.loginRole === 3 || userInfo?.loginRole === 5) &&
menu.every(item => item.name != '技师工单')
) {
menu.push({
name: '技师工单',
url: 'tabWorkOrder.technicianSearchList',
recordId: 17,
icon: 'technician'
})
}
// if (
// (userInfo?.isSuper || userInfo?.loginRole === 3 || userInfo?.loginRole === 5) &&
// menu.every(item => item.name != '技师工单')
// ) {
// menu.push({
// name: '技师工单',
// url: 'tabWorkOrder.technicianSearchList',
// recordId: 17,
// icon: 'technician'
// })
// }
// if ((userInfo?.loginRole == 3 || userInfo.loginRole == 5) && menu.every((item) => item.name != '积分审批')) {
// menu.push({
// name: '积分审批',
......
......@@ -221,16 +221,23 @@ page ::-webkit-scrollbar {
.menu .item .hot_icon {
position: absolute;
right: 0;
right: var(--fontSize12);
top: 0;
width: var(--fontSize38);
height: var(--fontSize32);
min-width: var(--fontSize24);
height: var(--fontSize24);
background: #F24724;
border-radius: var(--fontSize16);
border-radius: 50%;
color: #FFFFFF;
font-size: var(--fontSize22);
font-size: var(--fontSize20);
display: flex;
justify-content: center;
align-items: center;
padding:var(--fontSize2);
border:var(--fontSize2) solid #ffffff;
}
.menu .item .bubble_icon {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!