You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
36 lines
972 B
36 lines
972 B
2 years ago
|
// 窗口改变,页面刷新
|
||
|
var addEventResizeFlesh = function(){
|
||
|
window.addEventListener('resize',function(){
|
||
|
window.location.reload()
|
||
|
})
|
||
|
}
|
||
|
|
||
|
// 时间查询(agTable)
|
||
|
var dateFilterParams = {
|
||
|
comparator: (filterLocalDateAtMidnight, cellValue) => {
|
||
|
var dateAsString = cellValue;
|
||
|
if (dateAsString == null) return -1;
|
||
|
var dateParts = dateAsString.split('/');
|
||
|
var cellDate = new Date(
|
||
|
Number(dateParts[2]),
|
||
|
Number(dateParts[1]) - 1,
|
||
|
Number(dateParts[0])
|
||
|
);
|
||
|
if (filterLocalDateAtMidnight.getTime() === cellDate.getTime()) {
|
||
|
return 0;
|
||
|
}
|
||
|
if (cellDate < filterLocalDateAtMidnight) {
|
||
|
return -1;
|
||
|
}
|
||
|
if (cellDate > filterLocalDateAtMidnight) {
|
||
|
return 1;
|
||
|
}
|
||
|
return 0;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
export default {
|
||
|
waitTime:20000,//滚屏列表刷新等待间隔配置项
|
||
|
addEventResizeFlesh:addEventResizeFlesh,
|
||
|
dateFilterParams:dateFilterParams
|
||
|
}
|