Commit fdc11a34 authored by 黄自鹏's avatar 黄自鹏

调整首页周任务排查率

parent d8021fa5
......@@ -274,6 +274,7 @@
gsid:'',
// ksrq:new Date(new Date().setHours(0, 0, 0, 0)).getTime(),
// jsrq:new Date(new Date().setHours(23,59,59,999)).getTime()
ksrq:new Date().getTime(),
jsrq:new Date().getTime()
......@@ -303,6 +304,10 @@
methods:{
query:doQueryDcl,
doQueryfx(){
if(this.queryParams1.rwlx=='W'){
this.queryParams1.ksrq=new Date(new Date(this.getFirstWeek()).Format('yyyy/MM/dd')+" 00:00:00").getTime();
this.queryParams1.jsrq=new Date(new Date(this.getlastWeek()).Format('yyyy/MM/dd')+" 23:59:59").getTime();
}
doQueryfx(this.queryParams1).then(res=>{
if(res.success){
let value
......@@ -320,6 +325,20 @@
}
})
},
getFirstWeek(){
let nowDate = new Date();
let first = nowDate.getDate() - nowDate.getDay()+1;//getDate()从nowDate对象返回一个月中的某一天;getDay()从nowDate对象返回一周中的某一天
let firstDate = new Date(nowDate.setDate(first)).toUTCString();//setDate()设置nowDate对象中月的某一天;toUTCString()根据世界时,把nowDate对象转换为字符串。
console.log(firstDate);
return firstDate;
},
getlastWeek(){
let nowDate = new Date();
let first = nowDate.getDate() - nowDate.getDay()+1;
let last = first + 6; // last day is the first day + 6
let lastday = new Date(nowDate.setDate(last)).toUTCString();
return lastday
},
doQueryyh(){
doQueryyh(this.queryParams2).then(res=>{
if(res.success){
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment