0302导出周几问题

This commit is contained in:
shijing 2023-03-02 09:36:20 +08:00
parent 6adc906c06
commit c68b834b98
1 changed files with 6 additions and 2 deletions

View File

@ -172,16 +172,20 @@ export default {
exportList(){
let that = this;
this.dLoading = true;
if(this.query.employee__belong_dept && this.query.year && this.query.month){
if(this.query.employee__belong_dept!=undefined &&this.query.employee__belong_dept!=null &&
this.query.year!=undefined &&this.query.year!=null && this.query.month!=undefined&& this.query.month!=null){
}else{
this.$message.warning("请选择部门和月份后导出")
this.dLoading = false;
return;
}
let days = new Date(this.query.year, this.query.month , 0).getDate();
let weekList = ['姓名','星期'],daysList=['姓名','日期'],titleData = [];
for(var i = 1;i<= days;i++){
let weekNum = new Date(this.query.year,this.query.month,i).getDay();
let weekNum = new Date(this.query.year+'-'+this.query.month+'-'+i).getDay();
// debugger;
console.log(weekNum)
let week=that.getDayWeek(weekNum)
daysList.push(i);
weekList.push(week);