| | |
| | | }, |
| | | data () { |
| | | return{ |
| | | entity:{}, |
| | | entity:{ |
| | | dateTime: [] |
| | | }, |
| | | down:false, |
| | | add:false, |
| | | componentData: { |
| | |
| | | } |
| | | } |
| | | }, |
| | | created() { |
| | | this.setDate() |
| | | }, |
| | | mounted(){ |
| | | this.getCurrentWeekNumber() |
| | | this.selectEnumByCategory() |
| | |
| | | this.entityCopy1 = this.HaveJson(this.componentData1.entity); |
| | | this.componentData.tagField.weekDay.select = this.weekList |
| | | this.componentData.selectField.weekDay.select = this.weekList |
| | | this.getPower() |
| | | }, |
| | | methods:{ |
| | | /** 将时间选择器默认选为当天的日期 */ |
| | | setDate(){ |
| | | let currentDate = new Date(); |
| | | let year = currentDate.getFullYear(); |
| | | let month = String(currentDate.getMonth() + 1).padStart(2, '0'); |
| | | let day = String(currentDate.getDate()).padStart(2, '0'); |
| | | let formattedDate1 = `${year}-${month}-${day} 00:00:00`; |
| | | let formattedDate2 = `${year}-${month}-${day} 23:59:59`; |
| | | this.entity.dateTime.push(formattedDate1); |
| | | this.entity.dateTime.push(formattedDate2); |
| | | }, |
| | | getPower(){ |
| | | let power = JSON.parse(sessionStorage.getItem('power')) |
| | | let del = false |
| | |
| | | if (power[i].menuMethod == 'insertAuxiliaryWorkingHoursDay') { |
| | | add = true |
| | | } |
| | | console.log(add) |
| | | if (power[i].menuMethod == 'updateAuxiliaryWorkingHoursDay') { |
| | | up = true |
| | | } |
| | |
| | | ratify = true |
| | | } |
| | | } |
| | | if (!approve) { |
| | | if (!ratify) { |
| | | this.componentData.do.splice(3, 1) |
| | | } |
| | | if (!check) { |