diff --git a/components/list/apply.vue b/components/list/apply.vue
index af78f3d..a492509 100644
--- a/components/list/apply.vue
+++ b/components/list/apply.vue
@@ -41,13 +41,15 @@
+
{{ item.upFullName || item.upAgencyName ? ("@" + (item.upFullName || item.upAgencyName)) : '' }}
- {{ item.time }}
+
+ {{ item.time }}
+
{{ item.status_text }}
diff --git a/components/list/applyPage.vue b/components/list/applyPage.vue
index 7f966fa..b7cdbb2 100644
--- a/components/list/applyPage.vue
+++ b/components/list/applyPage.vue
@@ -104,30 +104,37 @@ export default {
{
name: "全部",
tip: "",
+ classify: 0,
},
{
name: "审核中",
tip: "10",
+ classify: 40,
},
{
name: "待接待",
tip: "20",
+ classify: 0,
},
{
name: "待面试",
tip: "25",
+ classify: 70,
},
{
name: "待入职",
tip: "30",
+ classify: 80,
},
{
name: "在职中",
tip: "40,48",
+ classify: 90,
},
{
name: "已完成",
tip: "21,26,35,45,50",
+ classify: 110,
},
],
},
@@ -293,7 +300,7 @@ export default {
// classify: that.tabActive + 1,
statusStr: that.tabInfo[that.tabActive].childList[that.menuActive].tip,
},
- (res) => {
+ (res) => {
console.log("res", res);
// return
if (res.recordCount == 0) {
@@ -339,6 +346,41 @@ export default {
})[0].name;
}
+ if (that.tabInfo[that.tabActive].classify == 2030) {
+ // 当前
+ item.right_time_str = that.G.setDeadLine(item.notifyTime || new Date().getTime(), "task");
+ } else if (that.tabInfo[that.tabActive].classify == 30) {
+ // 稍后
+ item.right_time_str = that.G.setDeadLine(item.notifyTime || new Date().getTime(), "task");
+ } else if (that.tabInfo[that.tabActive].classify == 40) {
+ // 待审核
+ item.right_time_str = that.G.setLWTRightTime(item.status10OperateTime || item.createTime || new Date().getTime(), that.tabInfo[that.tabActive].classify);
+ } else if (that.tabInfo[that.tabActive].classify == 50) {
+ // 新简历
+ item.right_time_str = that.G.setLWTRightTime(item.createTime || new Date().getTime(), that.tabInfo[that.tabActive].classify);
+ } else if (that.tabInfo[that.tabActive].classify == 60) {
+ // 推工作
+ item.right_time_str = that.G.setLWTRightTime(item.updateTime || new Date().getTime(), that.tabInfo[that.tabActive].classify);
+ } else if (that.tabInfo[that.tabActive].classify == 70) {
+ // 待面试
+ item.right_time_str = that.G.setLWTRightTime(item.interviewTime || new Date().getTime(), that.tabInfo[that.tabActive].classify);
+ } else if (that.tabInfo[that.tabActive].classify == 80) {
+ // 待入职
+ item.right_time_str = that.G.setLWTRightTime(item.willEntryTime || new Date().getTime(), that.tabInfo[that.tabActive].classify);
+ } else if (that.tabInfo[that.tabActive].classify == 90) {
+ // 在职中
+ item.right_time_str = that.G.setLWTRightTime(item.updateTime || new Date().getTime(), that.tabInfo[that.tabActive].classify);
+ } else if (that.tabInfo[that.tabActive].classify == 110) {
+ // 已完成
+ if (item.statusFailOperateTime) {
+ item.right_time_str = that.G.setLWTRightTime(item.updateTime || new Date().getTime(), that.tabInfo[that.tabActive].classify);
+ } else if (item.leaveTime) {
+ item.right_time_str = that.G.setLWTRightTime(item.updateTime || new Date().getTime(), that.tabInfo[that.tabActive].classify);
+ } else {
+ item.right_time_str = that.G.setLWTRightTime(item.updateTime || new Date().getTime(), that.tabInfo[that.tabActive].classify);
+ }
+ }
+
item.setTitle = that.G.titleToStr(item);
});
} else {
diff --git a/utils/common.js b/utils/common.js
index d41ad50..2b05e23 100644
--- a/utils/common.js
+++ b/utils/common.js
@@ -693,6 +693,323 @@ let data = {
}
return $obj;
},
+ setDeadLine (time, type) {
+
+ if (type) {
+ // 劳务通的倒计时
+ let differenceTime = new Date().getTime() - new Date(time).getTime()
+ let absTime = Math.abs(differenceTime)
+ var D = Math.floor(absTime / (24 * 60 * 60 * 1000));
+ var leave1 = absTime % (24 * 3600 * 1000);
+ var H = Math.floor(leave1 / (3600 * 1000));
+ var leave2 = leave1 % (3600 * 1000);
+ var M = Math.floor(leave2 / (60 * 1000));
+ var leave3 = leave2 % (60 * 1000);
+ var S = Math.floor(leave3 / 1000);
+ // 时间正负的判断标识
+ let symbol = true
+ if (differenceTime < 0) {
+ symbol = false
+ }
+ // // console.log('type', type);
+ if (type == 'jiaofu') {
+ if (D > 0) {
+ return D + (symbol ? "天前" : '天后');
+ } else if (H > 0) {
+ return H + (symbol ? "小时前" : '小时后');
+ } else if (M > 0) {
+ return M + (symbol ? "分钟前" : '分钟后');
+ } else {
+ // return S + (symbol ? "秒前" : '秒后');
+ return '刚刚';
+ }
+ } else if (type == '在职') {
+ // 处理在职中的时间显示
+ if (D > 0) {
+ return type + D + '天'
+ } else if (H > 0) {
+ return type + H + '小时'
+ } else if (M > 0) {
+ return type + M + '分钟'
+ } else {
+ return type + S + '秒'
+ }
+ } else if (type == '后入职') {
+ // 处理 待入职 的时间显示
+ // console.log('后入职');
+ if (D > 0) {
+ return D + '天' + type
+ } else if (H > 0) {
+ return H + '小时' + type
+ } else if (M > 0) {
+ return M + '分钟' + type
+ } else {
+ return S + '秒' + type
+ }
+ } else if (type == 'task') {
+ // 处理 待入职 的时间显示
+ let mark = '剩余'
+ if (symbol) {
+ mark = '逾期'
+ }
+ // console.log('后入职');
+ if (D > 0) {
+ return mark + (D >= 999 ? '999+' : D) + '天'
+ } else if (H > 0) {
+ return mark + H + '小时'
+ } else if (M > 0) {
+ return mark + M + '分钟'
+ } else {
+ return '刚刚'
+ }
+ }
+
+ } else {
+ let differenceTime = new Date(time).getTime() - new Date().getTime()
+ let absTime = Math.abs(differenceTime)
+ let D = Math.floor(absTime / (24 * 60 * 60 * 1000))
+ let leave1 = absTime % (24 * 3600 * 1000)
+ let H = Math.floor(leave1 / (3600 * 1000)) > 9 ? Math.floor(leave1 / (3600 * 1000)) : '0' + Math.floor(leave1 / (3600 * 1000))
+ let leave2 = leave1 % (3600 * 1000)
+ let M = Math.floor(leave2 / (60 * 1000)) > 9 ? Math.floor(leave2 / (60 * 1000)) : '0' + Math.floor(leave2 / (60 * 1000))
+ let leave3 = leave2 % (60 * 1000)
+ let S = Math.floor(leave3 / 1000) > 9 ? Math.floor(leave3 / 1000) : '0' + Math.floor(leave3 / 1000)
+ // 倒计时到期的判断
+ let symbol = ''
+ if (differenceTime < 0) {
+ symbol = '-'
+ }
+ if (D > 0) {
+ return symbol + D + '天'
+ } else if (H > 0) {
+ return symbol + H + ':' + M + ':' + S
+ } else if (M > 0) {
+ return symbol + M + ':' + S
+ } else {
+ return symbol + S + '秒'
+ // return '刚刚'
+ }
+ }
+ },
+ setLWTRightTime ($time = '', $type = '') {
+ let str = '';
+ // console.log('$type1', $type);
+ if (!$time) {
+ // console.log('1914 001')
+ $time = new Date().getTime();
+ }
+ // 将时间戳转换为毫秒
+ const timestamp = parseInt($time);
+ const currentTime = new Date().getTime();
+ const timeDiff = currentTime - timestamp; // 毫秒差值
+ // console.log('timeDiff 000', timeDiff);
+
+ // 计算时间差
+ const seconds = Math.floor(Math.abs(timeDiff) / 1000);
+ const minutes = Math.floor(seconds / 60);
+ const hours = Math.floor(minutes / 60);
+ const days = Math.floor(hours / 24);
+ // console.log('$type 111', $type, '===', days, hours, minutes, seconds);
+
+ if (new Date().getTime() - $time > 0) {
+ // $time 是过去的某个时间(之前)
+ if ($type == 60) {// 60推工作
+ if (minutes < 1) {
+ // 1分钟内
+ str = '刚刚';
+ } else if (minutes >= 1 && minutes <= 60) {
+ // 1分钟~60分钟内
+ str = `${Math.min(minutes, 60)}分钟前`;
+ } else if (minutes > 60 && hours <= 24) {
+ // 60分钟~24小时内
+ str = `${Math.min(hours, 24)}小时前`;
+ } else if (days >= 0) {
+ // 超过1天
+ if ($type == 40) {
+ str = `${days}天前提交`;
+ } else {
+ str = `${days}天前`;
+ }
+ } else {
+ console.log('1914 001')
+ }
+ }
+ } else {
+ // $time 是未来的某个时间(之后)
+ if ($type == 60) {// 60推工作
+ if (minutes < 1) {
+ // 1分钟内
+ str = '刚刚';
+ } else if (minutes >= 1 && minutes <= 60) {
+ // 1分钟~60分钟内
+ str = `${Math.min(minutes, 60)}分钟后`;
+ } else if (minutes > 60 && hours <= 24) {
+ // 60分钟~24小时内
+ str = `${Math.min(hours, 24)}小时后`;
+ } else if (days >= 0) {
+ // 超过1天
+ str = `${days}天后`;
+ } else {
+ console.log('1914 001')
+ }
+ }
+ }
+
+ if ($type == 50 || $type == 40) {// 50新简历 40待审核
+ if (minutes < 1) {
+ // 1分钟内
+ str = '刚刚';
+ } else if (minutes >= 1 && minutes <= 60) {
+ // 1分钟~60分钟内
+ str = `${Math.min(minutes, 60)}分钟前`;
+ } else if (minutes > 60 && hours <= 24) {
+ // 60分钟~24小时内
+ str = `${Math.min(hours, 24)}小时前`;
+ } else if (days >= 0) {
+ // 超过1天
+ if ($type == 40) {
+ str = `${days}天前提交`;
+ } else {
+ str = `${days}天前`;
+ }
+ } else {
+ console.log('1914 001')
+ }
+ }
+ // console.log('$type', $type);
+ if ($type == 70) {// 待面试
+ // const timeDiff = timestamp - currentTime; // 毫秒差值,正数表示未来时间,负数表示过去时间
+ // console.log('timeDiff111', timeDiff);
+ if (timeDiff < 0) {
+ // 面试时间在未来
+ // const hours = Math.floor(timeDiff / (1000 * 60 * 60));
+ // const days = Math.floor(hours / 24);
+ if (minutes < 1) {
+ // 1分钟内
+ str = '此刻应面试';
+ } else if (minutes >= 1 && minutes <= 60) {
+ // 1分钟~60分钟内
+ str = `${minutes}分钟后面试`;
+ } else if (minutes > 60 && hours <= 24) {
+ // 60分钟~24小时内
+ str = `${hours}小时后面试`;
+ } else if (days >= 0) {
+ // 超过1天
+ str = `${days}天后面试`;
+ }
+ // if (hours < 24) {
+ // str = `${hours}小时后面试`;
+ // } else {
+ // str = `${days}天后面试`;
+ // }
+ } else {
+ // 已超过面试时间
+ // const absTimeDiff = Math.abs(timeDiff);
+ // const hours = Math.floor(absTimeDiff / (1000 * 60 * 60));
+ // const days = Math.floor(hours / 24);
+ if (minutes < 1) {
+ // 1分钟内
+ str = '此刻应面试';
+ } else if (minutes >= 1 && minutes <= 60) {
+ // 1分钟~60分钟内
+ str = `超过${minutes}分钟`;
+ } else if (minutes > 60 && hours <= 24) {
+ // 60分钟~24小时内
+ str = `超过${hours}小时`;
+ } else if (days >= 0) {
+ // 超过1天
+ str = `超过${days}天`;
+ }
+ // if (hours < 24) {
+ // str = `超过${hours}小时`;
+ // } else {
+ // str = `超过${days}天`;
+ // }
+ }
+ }
+ if ($type == 80) {// 待入职
+ // const timeDiff = timestamp - currentTime; // 毫秒差值,正数表示未来时间,负数表示过去时间
+
+ if (timeDiff < 0) {
+ // 入职时间在未来
+ // const hours = Math.floor(timeDiff / (1000 * 60 * 60));
+ // const days = Math.floor(hours / 24);
+ if (minutes < 1) {
+ // 1分钟内
+ str = '此刻应入职';
+ } else if (minutes >= 1 && minutes <= 60) {
+ // 1分钟~60分钟内
+ str = `${minutes}分钟后入职`;
+ } else if (minutes > 60 && hours <= 24) {
+ // 60分钟~24小时内
+ str = `${hours}小时后入职`;
+ } else if (days >= 0) {
+ // 超过1天
+ str = `${days}天后入职`;
+ }
+ // if (hours < 24) {
+ // str = `${hours}小时后入职`;
+ // } else {
+ // str = `${days}天后入职`;
+ // }
+ } else {
+ // 已超过入职时间
+ // const absTimeDiff = Math.abs(timeDiff);
+ // const hours = Math.floor(absTimeDiff / (1000 * 60 * 60));
+ // const days = Math.floor(hours / 24);
+ if (minutes < 1) {
+ // 1分钟内
+ str = '此刻应入职';
+ } else if (minutes >= 1 && minutes <= 60) {
+ // 1分钟~60分钟内
+ str = `超过${minutes}分钟`;
+ } else if (minutes > 60 && hours <= 24) {
+ // 60分钟~24小时内
+ str = `超过${hours}小时`;
+ } else if (days >= 0) {
+ // 超过1天
+ str = `超过${days}天`;
+ }
+ }
+ }
+
+ if ($type == 90) {// 在职中
+ if (minutes < 1) {
+ // 1分钟内
+ str = '刚刚跟进';
+ } else if (minutes >= 1 && minutes <= 60) {
+ // 1分钟~60分钟内
+ str = `${Math.min(minutes, 60)}分钟前跟进`;
+ } else if (minutes > 60 && hours <= 24) {
+ // 60分钟~24小时内
+ str = `${Math.min(hours, 24)}小时前跟进`;
+ } else if (days >= 0) {
+ // 超过1天
+ str = `${days}天前跟进`;
+ }
+ }
+
+ if ($type == 110) {// 已完成
+ if (minutes < 1) {
+ // 1分钟内
+ str = '刚刚跟进';
+ } else if (minutes >= 1 && minutes <= 35) {
+ // 1分钟~35分钟内
+ str = `${Math.min(minutes, 35)}分钟前跟进`;
+ } else if (minutes > 35 && hours <= 24) {
+ // 35分钟~24小时内
+ str = `${Math.min(hours, 24)}小时前跟进`;
+ } else if (days >= 0 && days < 99) {
+ // 超过1天但小于99天
+ str = `${days}天前跟进`;
+ } else if (days >= 99) {
+ // 超过99天
+ str = '99+天前跟进';
+ }
+ }
+
+ return str;
+ },
}
export default data;
\ No newline at end of file