diff --git a/common/utils.js b/common/utils.js index a401968..1673e6c 100644 --- a/common/utils.js +++ b/common/utils.js @@ -336,10 +336,23 @@ function handleReduceAMonth(nowTime,newTime){ let howDay = this.getThisMonthDay(`${y}-${m}`) let newHowDay = this.getThisMonthDay(`${newY}-${newM}`) - - if (d === howDay){ - console.log('111',`${y}-${newM}-${newHowDay}`) - return `${newY}-${newM}-${newHowDay}` + console.log('d',d) + console.log('newHowDay',newHowDay) + const nowDate = new Date() + let nowM =nowDate.getMonth() + 1 + let nowD = nowDate.getDate() + console.log('nowD',nowD) + if (d === newHowDay){ + if (dnewHowDay){ @@ -350,8 +363,26 @@ function handleReduceAMonth(nowTime,newTime){ return `${newY}-${newM}-${d}` } }else{ - console.log('333',`${y}-${newM}-${d}`) - return `${newY}-${newM}-${d}` + console.log('nowD',nowD) + console.log('d',d) + if (nowD{{item.list[0].SERVERPARTList[0].MEETING_PLACE}} - - - - {{item.list[0].SERVERPARTList[0].MEETING_DATE}} - - - - {{item.list[0].SERVERPARTList[0].MEETING_PERSONS.slice(0,16)}}{{`等${10}人`}} - - {{item.list[0].SERVERPARTList[0].MEETING_PERSONS}} - - - - {{item.list[0].SERVERPARTList[0].MEETING_CONTENT}} - - {{item.list[0].SERVERPARTList[0].MEETING_CONTENT}} + + +

暂无会议内容

+
+ + + + + {{item.list[0].SERVERPARTList[0].MEETING_DATE}} + + + + {{item.list[0].SERVERPARTList[0].MEETING_PERSONS.slice(0,16)}}{{`等${10}人`}} + + {{item.list[0].SERVERPARTList[0].MEETING_PERSONS}} + + + + {{item.list[0].SERVERPARTList[0].MEETING_CONTENT}} + + {{item.list[0].SERVERPARTList[0].MEETING_CONTENT}} + +
@@ -161,7 +168,6 @@

暂无数据

- @@ -294,7 +300,7 @@ export default { this.current='item'+month // 日期选择器 this.selectDate = `${year}-${month}-${day}` - this.currentDate = 'item'+`${year}-${month}-${day}` + this.currentDate = 'item'+`${year}-${month}-${day - 4>0?day - 4:1}` }, // 是否显示弹出框 handleShowPopup(value,obj){ @@ -346,27 +352,27 @@ export default { let howDay = this.$util.getThisMonthDay(`${y}-${this.selectMonth}`) this.searchTime = `${y}-${this.selectMonth}-${howDay}` } + + // 月份改变之后 重新渲染选择日期的数组 + this.dateList = this.$util.getThisMonthDateList(`${y}-${this.selectMonth}`) + // 当月份改变了之后 日期栏也会根据当前选中的时间 选择新月份默认的时间 + this.selectDate = this.$util.handleReduceAMonth(`${this.selectDate}`,`${y}-${this.selectMonth}`) + // 日期的自动滚动设置 + const selectTime = new Date(this.selectDate) + let selectY = selectTime.getFullYear() + let selectM = selectTime.getMonth() + 1 + let selectD = selectTime.getDate() - 4>0?selectTime.getDate() - 4:1 + this.currentDate = 'item' + `${selectY}-${selectM}-${selectD}` + if (this.selectTab===1){ // 选中的是考核管理 调用拿到考核管理的列表 this.getManagerList() }else if (this.selectTab===2){ // 选中日常巡检 就调用拿到日常巡检的方法 - // 月份改变之后 重新渲染选择日期的数组 - this.dateList = this.$util.getThisMonthDateList(`${y}-${this.selectMonth}`) - // 当月份改变了之后 日期栏也会根据当前选中的时间 选择新月份默认的时间 - this.selectDate = this.$util.handleReduceAMonth(`${this.selectDate}`,`${y}-${this.selectMonth}`) - // 日期的自动滚动设置 - this.currentDate = 'item'+this.selectDate // 调用日常巡检的方法 this.getDailyInspectionList() }else if(this.selectTab===3){ // 选中日常巡检 就调用拿到日常巡检的方法 - // 月份改变之后 重新渲染选择日期的数组 - this.dateList = this.$util.getThisMonthDateList(`${y}-${this.selectMonth}`) - // 当月份改变了之后 日期栏也会根据当前选中的时间 选择新月份默认的时间 - this.selectDate = this.$util.handleReduceAMonth(`${this.selectDate}`,`${y}-${this.selectMonth}`) - // 日期的自动滚动设置 - this.currentDate = 'item'+this.selectDate // 晨会管理列表 this.getMeetingDetail() } @@ -397,16 +403,20 @@ export default { }, // 选择日期的方法 handleChangeDate(value){ - const date = new Date(this.lastDay) + let time = `${value.split('-')[0]}-${value.split('-')[1]<10?'0'+value.split('-')[1]:value.split('-')[1]}-${value.split('-')[2]}` + const date = new Date() + let m = date.getMonth() +1 let d = date.getDate() - const selectDay = new Date(value) + const selectDay = new Date(time) + let selectM = selectDay.getMonth() +1 let selectd = selectDay.getDate() - if (d