[问题修复](dev):

- 证件信息即将过期显示未过期没有重新推送按钮问题修复
hyx_allXgfPerson
huangyuxuan 2024-12-03 17:58:57 +08:00
parent 15819c385b
commit 7ea0ac13e6
2 changed files with 21 additions and 13 deletions

View File

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

View File

@ -349,6 +349,8 @@ export default {
APPOINT_USER_ID: '',
APPOINT_USER_NAME: '',
OPINION: '',
BACK_NAME:'',
BACK_STEP: '',
user: '',
list: [],
tm: new Date().getTime()
@ -365,6 +367,8 @@ export default {
APPOINT_USER_ID: '',
APPOINT_USER_NAME: '',
OPINION: '',
BACK_NAME:'',
BACK_STEP: '',
user: '',
list: [],
tm: new Date().getTime()
@ -406,6 +410,7 @@ export default {
})
},
backPoint(num, name) {
console.log(this.form)
this.form.BACK_STEP = num
this.form.BACK_NAME = name
this.$forceUpdate()