Commit a8b531f0 by 张立顺

fix 需求修改

1 parent c3b8f40d
<template>
<div id="app">
<!-- <template v-if="showWindow"> -->
<transition name="fade">
<keep-alive v-if="$route.meta.keepAlive">
<router-view></router-view>
</keep-alive>
</transition>
<transition name="fade">
<router-view v-if="!$route.meta.keepAlive"></router-view>
</transition>
<!-- </template> -->
<template v-if="showWindow">
<transition name="fade">
<keep-alive v-if="$route.meta.keepAlive">
<router-view></router-view>
</keep-alive>
</transition>
<transition name="fade">
<router-view v-if="!$route.meta.keepAlive"></router-view>
</transition>
</template>
</div>
</template>
<script>
......
......@@ -29,7 +29,7 @@ const actions = {
},
async login({ dispatch }) {
console.log('login')
return
// return
try {
const wwCode = getParams('code'),
{ corpId, agentId } = util.getLocalStorage('ww_storage_info') || {},
......@@ -83,12 +83,12 @@ const actions = {
if (agentId && agentId != 'undefined') ww_storage_info.agentId = agentId
util.setLocalStorage('ww_storage_info', ww_storage_info)
}
// if (userInfo) {
// state.showWindow = true
// } else {
// util.showLoading()
// dispatch('login')
// }
if (userInfo) {
state.showWindow = true
} else {
util.showLoading()
dispatch('login')
}
}
}
const getParams = name => {
......
const djStaffUrl = '/rop-dj-staff-miniprogram/router'
const djBusinessUrl = '/rop-dj-business-school-miniprogram/router'
const djSmartCarlifeUrl = '/dj.api.smartcarlife' // Just a guess, checking previous api.js usage
import { util } from 'utils'
// Helper function to simulate api.post from the original file using window.$DJ_HTTP
// Original: api.post(method, data, [], url)
function post(method, data = {}, url, options = {}) {
// Merge method into data as per ssoApi.js pattern for $DJ_HTTP
const userInfo = util.getLocalStorage('ww_userInfo') || {}
const payload = {
method,
technicalSupervisorName: '梁老湿', // 技术督导姓名
technicalSupervisorPhone: '15814019200', // 技术督导手机号
sessionId: '8bcad25d-8bfa-41a8-a5e8-ef06ace89ee8',
technicalSupervisorName: userInfo.name || '', // 技术督导姓名
technicalSupervisorPhone: userInfo.phone || '', // 技术督导手机号
// sessionId: '8bcad25d-8bfa-41a8-a5e8-ef06ace89ee8',
...data
}
return window.$DJ_HTTP({
......@@ -75,24 +76,6 @@ export default {
// return post('dj.api.businessSchool.miniProgram.teachTask.count', data, djBusinessUrl)
// },
// The following APIs didn't have a specific URL in the original file,
// they just had 2 args: api.post(method, data).
// I'll assume they might use a default URL or I need to check where they point.
// Original: return api.post('dj.api.smartcarlife.selectOrderGoods.list', data)
// ssoApi.js uses window.$DJ_HTTP for 'dj.api.*'.
// I will use a default URL or the biUrl from ssoApi if appropriate, but ssoApi used '/rop-dj-pe-analysis/router'.
// Let's assume they go to the default DJ gateway if no URL provided?
// But wait, the original api.post signature was (method, data, [], url).
// When url is missing, what does it default to?
// In `ssoApi.js`, `loginByPhone` uses `/rop-dj-pe-analysis/router`.
// I will leave the URL blank or use a default if I can find one.
// For now, I'll map them to `window.$DJ_HTTP` without a specific URL if not known,
// or maybe they are not used in this module?
// The module is `recruitManage`. `selectOrderGoods` seems unrelated?
// I will comment them out or keep them as is with a TODO if they seem unrelated.
// They seem like copy-paste leftovers (smartcarlife, updateCustomerphotos).
// I'll include them but using a generic post wrapper.
// 根据商户号获取可选商品列表
getSelectOrderGoodsList(data) {
// Assuming default gateway if no URL specified
......
// packageEquity/pages/recruitManage/pages/recruitDetail/recruitDetail.js
import { unix } from 'dayjs'
import { getRecruitDetailAPI, processResumeAPI } from '../api'
const IMG_URL =
'https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/'
const IMG_URL = 'https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/'
// 统计列表配置映射
const STATISTICS_CONFIG = [
{ title: '需求数量', field: 'recruitmentQuantity' },
......@@ -37,7 +36,7 @@ const RECRUITMENT_INFO_CONFIG = [
const RECRUIT_STATUS_CONFIG = {
// mixResult状态映射
0: { text: '待处理', class: 'pending', canProcess: true },
1: { text: '人员不匹配', class: 'mismatch', canProcess: false },
1: { text: '人员不符合', class: 'mismatch', canProcess: false },
2: { text: '面试通过', class: 'pass', canProcess: false },
3: { text: '面试不通过', class: 'fail', canProcess: false }
}
......@@ -175,9 +174,7 @@ Page({
const obj = this.data.recruitmentPlans[index]
const { reasonMaxLen } = this.data
this.setData({
[`recruitmentPlans[${index}].recommendedReasonTxt`]: obj.isShowReasonAll
? obj.recommendedReason.slice(0, reasonMaxLen) + '...'
: obj.recommendedReason,
[`recruitmentPlans[${index}].recommendedReasonTxt`]: obj.isShowReasonAll ? obj.recommendedReason.slice(0, reasonMaxLen) + '...' : obj.recommendedReason,
[`recruitmentPlans[${index}].isShowReasonAll`]: !obj.isShowReasonAll
})
},
......@@ -216,10 +213,7 @@ Page({
// 节流控制:1秒内只能触发一次
const now = Date.now()
const throttleTime = 1000 // 节流时间:1秒
if (
this.lastViewResumeTime &&
now - this.lastViewResumeTime < throttleTime
) {
if (this.lastViewResumeTime && now - this.lastViewResumeTime < throttleTime) {
return
}
this.lastViewResumeTime = now
......@@ -287,24 +281,14 @@ Page({
id: id
})
.then(res => {
let {
stat,
onboardingPlans,
recruitmentPlans,
recruitment,
trialOnboardingPlans
} = res.data
let { stat, onboardingPlans, recruitmentPlans, recruitment, trialOnboardingPlans } = res.data
const { reasonMaxLen } = this.data
// 格式化 recruitmentPlans 中的 createdDate
if (recruitmentPlans && recruitmentPlans.length > 0) {
recruitmentPlans = recruitmentPlans.map(item => ({
...item,
createdDate: this.formatDate(item.createdDate),
recommendedReasonTxt: item.recommendedReason
? item.recommendedReason.length > reasonMaxLen
? item.recommendedReason.slice(0, reasonMaxLen) + '...'
: item.recommendedReason
: '-',
recommendedReasonTxt: item.recommendedReason ? (item.recommendedReason.length > reasonMaxLen ? item.recommendedReason.slice(0, reasonMaxLen) + '...' : item.recommendedReason) : '-',
isShowReasonAll: false
}))
}
......@@ -330,15 +314,13 @@ Page({
// 根据 businessType 动态过滤招聘信息配置
// 当 businessType == 1 时,显示拒绝理由;否则过滤掉拒绝理由项
const filteredRecruitmentInfoConfig = RECRUITMENT_INFO_CONFIG.filter(
item => {
// 特殊处理:拒绝理由字段仅在招聘状态为被驳回status:3时显示
if (item.field === 'recallReason') {
return recruitment.status == 3
}
return true
const filteredRecruitmentInfoConfig = RECRUITMENT_INFO_CONFIG.filter(item => {
// 特殊处理:拒绝理由字段仅在招聘状态为被驳回status:3时显示
if (item.field === 'recallReason') {
return recruitment.status == 3
}
)
return true
})
// 将stat数据更新到statisticsList(使用配置映射,代码更简洁)
this.setData({
......@@ -400,7 +382,7 @@ Page({
// 当切换"处理结果"标签时,初始化相关表单数据
if (field === 'processResult') {
// 切换到"人员不匹配"时,清空面试相关字段
// 切换到"人员不符合"时,清空面试相关字段
if (value == 1) {
formData.interviewTime = ''
formData.dipalyTime = ''
......@@ -514,10 +496,7 @@ Page({
return
}
// 对于面试通过和面试不通过,都需要选择面试时间
if (
(formData.processResult == 2 || formData.processResult == 3) &&
!formData.interviewTime
) {
if ((formData.processResult == 2 || formData.processResult == 3) && !formData.interviewTime) {
wx.showToast({
title: '请选择面试时间',
icon: 'none'
......@@ -525,10 +504,7 @@ Page({
return
}
// 对于面试通过和面试不通过,都需要选择面试时间
if (
(formData.processResult == 2 || formData.processResult == 3) &&
!formData.interviewResult
) {
if ((formData.processResult == 2 || formData.processResult == 3) && !formData.interviewResult) {
wx.showToast({
title: '请选择面试结果',
icon: 'none'
......
......@@ -155,7 +155,7 @@ page {
background: #52c41a1a;
}
// 人员不匹配状态
// 人员不符合状态
&.tag-mismatch {
color: #ff4d4f;
background: #ff4d4f1a;
......
......@@ -234,7 +234,7 @@
<!-- 时间选择器 -->
<van-popup v-model="timeShow" position="bottom" round get-container="body" @touchmove.prevent>
<van-datetime-picker v-model="currentDate" type="date" :formatter="formatter" :max-date="today" @confirm="bindDateChange" @cancel="calcelDate" />
<van-datetime-picker v-model="currentDate" type="date" :formatter="formatter" :min-date="minDate" :max-date="maxDate" @confirm="bindDateChange" @cancel="calcelDate" />
</van-popup>
</div>
</template>
......@@ -281,6 +281,20 @@ export default {
components: {
// EmptyCard
},
computed: {
minDate() {
if (this.popupType === 'initial') {
return new Date()
}
return new Date(2010, 0, 1)
},
maxDate() {
if (this.popupType === 'initial') {
return new Date(2030, 11, 31)
}
return new Date()
}
},
data() {
return {
IMG_URL,
......@@ -406,7 +420,18 @@ export default {
if (['png', 'jpg', 'jpeg', 'gif'].includes(resumeType)) {
ImagePreview([url])
} else {
window.open(url)
// 复制链接并提示
const input = document.createElement('input')
input.setAttribute('readonly', 'readonly')
input.setAttribute('value', url)
document.body.appendChild(input)
input.select()
input.setSelectionRange(0, 9999)
if (document.execCommand('copy')) {
document.execCommand('copy')
this.$toast('简历链接已复制,请在浏览器中打开')
}
document.body.removeChild(input)
}
},
getDetail(id) {
......@@ -561,9 +586,7 @@ export default {
this.isProcessing = true
let requestParams = {
id: formData.id,
technicalSupervisorName: this.recruitment.technicalSupervisorName || '',
technicalSupervisorPhone: this.recruitment.technicalSupervisorPhone || ''
id: formData.id
}
if (this.popupType === 'initial') {
......
......@@ -206,7 +206,7 @@
<text class="required">*</text>
</view>
<view class="value">
<text class="tag {{ formData.processResult == 1 ? 'active' : '' }}" bindtap="selectTag" data-field="processResult" data-value="1">人员不匹配</text>
<text class="tag {{ formData.processResult == 1 ? 'active' : '' }}" bindtap="selectTag" data-field="processResult" data-value="1">人员不符合</text>
<text class="tag {{ formData.processResult == 2 ? 'active' : '' }}" bindtap="selectTag" data-field="processResult" data-value="2">已完成面试</text>
</view>
</view>
......
......@@ -113,42 +113,16 @@ export default {
},
// 获取招聘任务统计数据
getWaitstaffstate() {
// 模拟接口数据
const mockData = {
code: 0,
data: {
waitAuditCount: 5,
waitProcessCount: 12,
totalCount: 30
},
message: 'success'
}
// 模拟异步请求
Promise.resolve(mockData).then(res => {
let { code, data, message } = res
if (code == 0) {
// 0:全部,1:待审核,2:待处理
this.tabList = [`待审核(${data.waitAuditCount || 0})`, `待处理(${data.waitProcessCount || 0})`, `全部(${data.totalCount || 0})`]
} else {
this.$toast(message)
}
})
/* 暂时注释掉真实接口调用
// return
api.getDemandStatAPI({}).then(res => {
let { code, data, message } = res
if (code == 0) {
// 0:全部,1:待审核,2:待处理
// 假设接口返回字段为 waitAuditCount, waitProcessCount, totalCount
// 如果接口字段不同,请根据实际情况调整
this.tabList = [`待审核(${data.waitAuditCount || 0})`, `待处理(${data.waitProcessCount || 0})`, `全部(${data.totalCount || 0})`]
} else {
this.$toast(message)
}
})
*/
api
.getDemandStatAPI({})
.then(res => {
const data = res || {}
// 0:待审核, 1:待处理, 2:全部
this.tabList = [`待审核(${data.waitCheckCount || 0})`, `待处理(${data.waitProcessCount || 0})`, `全部(${data.totalCount || 0})`]
})
.catch(error => {
console.error(error)
})
},
// 标签切换
......
......@@ -17,12 +17,22 @@
<div class="info-item">
<span class="label">主营品牌</span>
<div class="value">{{ formatValue(detail.brand) }}</div>
<van-popover v-model="showBrandPopover" trigger="click" placement="bottom-end" class="popover-wrapper">
<div class="popover-content">{{ detail.brand }}</div>
<template #reference>
<div class="value text-ellipsis">{{ formatValue(detail.brand) }}</div>
</template>
</van-popover>
</div>
<div class="info-item">
<span class="label">门店地址</span>
<div class="value">{{ formatValue(detail.merchantAddress) }}</div>
<van-popover v-model="showAddressPopover" trigger="click" placement="bottom-end" class="popover-wrapper">
<div class="popover-content">{{ detail.merchantAddress }}</div>
<template #reference>
<div class="value text-ellipsis">{{ formatValue(detail.merchantAddress) }}</div>
</template>
</van-popover>
</div>
<div class="info-item">
......@@ -47,7 +57,7 @@
<div class="info-item">
<span class="label">需求描述</span>
<div class="value">{{ formatValue(detail.requirementDescription) }}</div>
<div class="value" v-html="detail.requirementDescription"></div>
</div>
<div class="info-item">
......@@ -107,18 +117,23 @@
<script>
import api from '../api'
import { Toast, Dialog } from 'vant'
import { Toast, Dialog, Popover } from 'vant'
const IMG_URL = 'https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/'
export default {
name: 'RecruitmentReview',
components: {
[Popover.name]: Popover
},
data() {
return {
IMG_URL,
detail: {},
showRejectDialog: false,
rejectReason: ''
rejectReason: '',
showBrandPopover: false,
showAddressPopover: false
}
},
created() {
......@@ -227,6 +242,13 @@ export default {
align-items: center;
flex-wrap: wrap;
word-break: break-all;
&.text-ellipsis {
display: block;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
}
.ji {
......@@ -290,6 +312,21 @@ export default {
}
/* Custom Dialog Styles */
.popover-wrapper {
flex: 1;
min-width: 0;
display: flex;
justify-content: flex-end;
}
.popover-content {
padding: 10px;
max-width: 200px;
word-break: break-all;
font-size: 14px;
color: #333;
}
::v-deep .reject-dialog {
width: 90%;
max-width: 320px;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!