Compare commits
2 Commits
96c97d9c29
...
933a5e995b
Author | SHA1 | Date |
---|---|---|
|
933a5e995b | |
|
d70d18039f |
|
@ -79,6 +79,7 @@
|
|||
</el-table>
|
||||
<div class="page-btn-group">
|
||||
<div>
|
||||
<el-button type="primary" icon="el-icon-plus" @click="handleAdd">批量推送</el-button>
|
||||
</div>
|
||||
<pagination :total="total" :page.sync="listQuery.page" :limit.sync="listQuery.limit" @pagination="getList" />
|
||||
</div>
|
||||
|
@ -184,20 +185,23 @@ export default {
|
|||
this.getList()
|
||||
},
|
||||
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_END转换为Date对象(假设它是一个有效的日期字符串)
|
||||
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
|
||||
|
@ -367,6 +371,17 @@ export default {
|
|||
})
|
||||
}).catch(() => {})
|
||||
},
|
||||
handleAdd() {
|
||||
const _selectData = this.$refs.multipleTable.selection
|
||||
if (_selectData == null || _selectData.length === 0) {
|
||||
this.$message({
|
||||
message: '未勾选人员...',
|
||||
type: 'error'
|
||||
})
|
||||
return false
|
||||
}
|
||||
this.$refs.sendUtil.init(_selectData)
|
||||
},
|
||||
// 判断按钮权限,用于是否显示按钮
|
||||
hasButton: function() {
|
||||
var keys = 'corpinfo:add,corpinfo:del,corpinfo:edit,toExcel'
|
||||
|
|
Loading…
Reference in New Issue