|
@@ -20,8 +20,8 @@
|
|
|
<img src="../../../assets/首页图标1.png" alt="">
|
|
<img src="../../../assets/首页图标1.png" alt="">
|
|
|
</div>
|
|
</div>
|
|
|
<div class="todo-item-text">
|
|
<div class="todo-item-text">
|
|
|
- <span class="todo-tag">4位候选人待处理</span>
|
|
|
|
|
- <span class="todo-text">2025年6月12日 15:00最新投递</span>
|
|
|
|
|
|
|
+ <span class="todo-tag">{{ getPendingCandidatesCount() }}位候选人待处理</span>
|
|
|
|
|
+ <span class="todo-text">{{ getLatestApplicationTime() }}</span>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
<div class="todo-item-right">
|
|
<div class="todo-item-right">
|
|
@@ -131,7 +131,7 @@
|
|
|
<p style="margin-top: 20px; font-size: 12px; color:#808080;">通过情况概览</p>
|
|
<p style="margin-top: 20px; font-size: 12px; color:#808080;">通过情况概览</p>
|
|
|
<div class="demo-collapse">
|
|
<div class="demo-collapse">
|
|
|
<el-collapse v-model="activeCollapse">
|
|
<el-collapse v-model="activeCollapse">
|
|
|
- <el-collapse-item :title="`在此期间共计${Math.min(filteredCandidates.filter(c => Number(c.comprehensive_score) > 60).length, 5)} 位候选人${selectedStatus==2?'通过面试':'被录用'}`" name="1">
|
|
|
|
|
|
|
+ <el-collapse-item :title="`在此期间共计${Math.min(filteredCandidates.filter(c => Number(c.comprehensive_score) > 60).length, 5)} 位候选人${selectedStatus==='2'?'通过面试':'被录用'}`" name="1">
|
|
|
<div class="score-list">
|
|
<div class="score-list">
|
|
|
<div class="score-item clickable-item" v-for="item in filteredCandidates.filter(c => Number(c.comprehensive_score) > 60).slice(0, 5)" :key="item.id" @click="handleCandidateClick(item)">
|
|
<div class="score-item clickable-item" v-for="item in filteredCandidates.filter(c => Number(c.comprehensive_score) > 60).slice(0, 5)" :key="item.id" @click="handleCandidateClick(item)">
|
|
|
<div class="score-name">{{ item.applicant_name || item.name }}</div>
|
|
<div class="score-name">{{ item.applicant_name || item.name }}</div>
|
|
@@ -1018,6 +1018,44 @@ export default defineComponent({
|
|
|
}
|
|
}
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
|
|
+ // 获取待处理候选人数量
|
|
|
|
|
+ const getPendingCandidatesCount = () => {
|
|
|
|
|
+ if (!state.filteredCandidates || state.filteredCandidates.length === 0) {
|
|
|
|
|
+ return 0;
|
|
|
|
|
+ }
|
|
|
|
|
+ // 统计状态为2(已面试)的候选人数量
|
|
|
|
|
+ return state.filteredCandidates.filter(candidate =>
|
|
|
|
|
+ candidate.status === 2 || candidate.status === '2'
|
|
|
|
|
+ ).length;
|
|
|
|
|
+ };
|
|
|
|
|
+
|
|
|
|
|
+ // 获取最新投递时间
|
|
|
|
|
+ const getLatestApplicationTime = () => {
|
|
|
|
|
+ if (!state.filteredCandidates || state.filteredCandidates.length === 0) {
|
|
|
|
|
+ return '暂无投递';
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ // 找到最新的投递时间
|
|
|
|
|
+ const latestApplication = state.filteredCandidates.reduce((latest, current) => {
|
|
|
|
|
+ const currentTime = current.created_at || current.application_time || '';
|
|
|
|
|
+ const latestTime = latest.created_at || latest.application_time || '';
|
|
|
|
|
+ const currentDate = new Date(currentTime);
|
|
|
|
|
+ const latestDate = new Date(latestTime);
|
|
|
|
|
+ return currentDate > latestDate ? current : latest;
|
|
|
|
|
+ });
|
|
|
|
|
+
|
|
|
|
|
+ const date = new Date();
|
|
|
|
|
+
|
|
|
|
|
+ // 格式化为"YYYY年MM月DD日 HH:mm"
|
|
|
|
|
+ const year = date.getFullYear();
|
|
|
|
|
+ const month = (date.getMonth() + 1).toString().padStart(2, '0');
|
|
|
|
|
+ const day = date.getDate().toString().padStart(2, '0');
|
|
|
|
|
+ const hours = date.getHours().toString().padStart(2, '0');
|
|
|
|
|
+ const minutes = date.getMinutes().toString().padStart(2, '0');
|
|
|
|
|
+ console.log(year,month,day,hours,minutes)
|
|
|
|
|
+ return `${year}年${month}月${day}日 ${hours}:${minutes}最新投递`;
|
|
|
|
|
+ };
|
|
|
|
|
+
|
|
|
return {
|
|
return {
|
|
|
homeLineRef,
|
|
homeLineRef,
|
|
|
homePieRef,
|
|
homePieRef,
|
|
@@ -1031,6 +1069,8 @@ export default defineComponent({
|
|
|
getStatusClass,
|
|
getStatusClass,
|
|
|
formatTime,
|
|
formatTime,
|
|
|
passRate,
|
|
passRate,
|
|
|
|
|
+ getLatestApplicationTime,
|
|
|
|
|
+ getPendingCandidatesCount,
|
|
|
...toRefs(state),
|
|
...toRefs(state),
|
|
|
};
|
|
};
|
|
|
},
|
|
},
|