parent
15819c385b
commit
7ea0ac13e6
|
@ -183,20 +183,23 @@ export default {
|
||||||
this.getTreeList()
|
this.getTreeList()
|
||||||
},
|
},
|
||||||
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_END转换为Date对象(假设它是一个有效的日期字符串)
|
||||||
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
|
||||||
|
|
|
@ -349,6 +349,8 @@ export default {
|
||||||
APPOINT_USER_ID: '',
|
APPOINT_USER_ID: '',
|
||||||
APPOINT_USER_NAME: '',
|
APPOINT_USER_NAME: '',
|
||||||
OPINION: '',
|
OPINION: '',
|
||||||
|
BACK_NAME:'',
|
||||||
|
BACK_STEP: '',
|
||||||
user: '',
|
user: '',
|
||||||
list: [],
|
list: [],
|
||||||
tm: new Date().getTime()
|
tm: new Date().getTime()
|
||||||
|
@ -365,6 +367,8 @@ export default {
|
||||||
APPOINT_USER_ID: '',
|
APPOINT_USER_ID: '',
|
||||||
APPOINT_USER_NAME: '',
|
APPOINT_USER_NAME: '',
|
||||||
OPINION: '',
|
OPINION: '',
|
||||||
|
BACK_NAME:'',
|
||||||
|
BACK_STEP: '',
|
||||||
user: '',
|
user: '',
|
||||||
list: [],
|
list: [],
|
||||||
tm: new Date().getTime()
|
tm: new Date().getTime()
|
||||||
|
@ -406,6 +410,7 @@ export default {
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
backPoint(num, name) {
|
backPoint(num, name) {
|
||||||
|
console.log(this.form)
|
||||||
this.form.BACK_STEP = num
|
this.form.BACK_STEP = num
|
||||||
this.form.BACK_NAME = name
|
this.form.BACK_NAME = name
|
||||||
this.$forceUpdate()
|
this.$forceUpdate()
|
||||||
|
|
Loading…
Reference in New Issue