| | |
| | | }, |
| | | data () { |
| | | return{ |
| | | entity:{}, |
| | | entity:{ |
| | | dateTime: [] |
| | | }, |
| | | down:false, |
| | | add:false, |
| | | componentData: { |
| | |
| | | } |
| | | } |
| | | }, |
| | | created() { |
| | | this.setDate() |
| | | }, |
| | | mounted(){ |
| | | this.getCurrentWeekNumber() |
| | | this.selectEnumByCategory() |
| | |
| | | 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 formattedDate = `${year}-${month}-${day} 00:00:00`; |
| | | this.entity.dateTime.push(formattedDate); |
| | | this.entity.dateTime.push(formattedDate); |
| | | this.$nextTick(() => { |
| | | this.refreshTable() |
| | | }) |
| | | }, |
| | | getPower(){ |
| | | let power = JSON.parse(sessionStorage.getItem('power')) |
| | | let del = false |