[问题修复](dev):

证件信息即将过期显示未过期没有重新推送按钮问题修复
hyx_Batch-moderation
huangyuxuan 2024-12-03 18:02:51 +08:00
parent 96c97d9c29
commit d70d18039f
1 changed files with 16 additions and 13 deletions

View File

@ -184,20 +184,23 @@ export default {
this.getList() this.getList()
}, },
methods: { methods: {
getCardStatus(VALIDITY_PERIOD_END){ getCardStatus(VALIDITY_PERIOD_END) {
const nowDate = new Date() const now = new Date(); //
const nextDate = new Date((new Date).getFullYear() + '-' + ((new Date).getMonth() + 3) + '-' + (new Date).getDate()) const threeMonthsLater = new Date(now); //
console.log('当前时间 ==>'+nowDate) threeMonthsLater.setMonth(threeMonthsLater.getMonth() + 3); //
console.log('两个月后的时间 ==>'+nextDate) // VALIDITY_PERIOD_ENDDate
console.log('证件到期日 ==>'+new Date(VALIDITY_PERIOD_END)) const validityPeriodEnd = new Date(VALIDITY_PERIOD_END);
if (nowDate > new Date(VALIDITY_PERIOD_END)){
return 1
}else if (new Date(VALIDITY_PERIOD_END) > nowDate && new Date(VALIDITY_PERIOD_END) < nextDate){
return 2
}else {
return 0
}
//
if (now > validityPeriodEnd) {
//
return 1;
} else if (validityPeriodEnd > now && validityPeriodEnd <= threeMonthsLater) {
//
return 2;
} else {
return 0;
}
}, },
filterNode(value, data) { filterNode(value, data) {
if (!value) return true if (!value) return true