修改
This commit is contained in:
@@ -86,14 +86,6 @@ export default {
|
||||
this.destroy()
|
||||
},
|
||||
mounted() {
|
||||
const startTime = moment().startOf('week').format('YYYY-MM-DD')
|
||||
const endTime = moment().format('YYYY-MM-DD')
|
||||
console.log(this.date, 'date')
|
||||
this.date = [startTime, endTime]
|
||||
// this.weekDay = this.weekArr[moment(this.date).format('e')]
|
||||
// this.getData()
|
||||
this.loopTime()
|
||||
console.log(1111);
|
||||
const _this = this;
|
||||
_this.beilv = document.documentElement.clientWidth / 1920
|
||||
window.onresize = () => {
|
||||
@@ -104,39 +96,6 @@ export default {
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
handleTimeChange(data) {
|
||||
console.log(data);
|
||||
|
||||
},
|
||||
windowWidth(value) {
|
||||
this.clientWidth = value
|
||||
this.beilv2 = this.clientWidth / 1920
|
||||
},
|
||||
getToday8StartTimestamp() {
|
||||
const date = new Date(); // 获取当前时间
|
||||
// 将时设为8、分0、秒0、毫秒0
|
||||
date.setHours(8, 0, 0, 0);
|
||||
return date.getTime(); // 转换为时间戳(毫秒)
|
||||
},
|
||||
|
||||
// 获取第二天早上八点的时间戳
|
||||
getTomorrow8EndTimestamp() {
|
||||
const date = new Date(); // 获取当前时间
|
||||
// 先加一天,再设置为早上八点
|
||||
date.setDate(date.getDate() + 1);
|
||||
date.setHours(8, 0, 0, 0);
|
||||
return date.getTime(); // 转换为时间戳(毫秒)
|
||||
},
|
||||
|
||||
|
||||
|
||||
loopTime() {
|
||||
const _this = this
|
||||
_this.timer = setInterval(
|
||||
function() {
|
||||
// _this.getData()
|
||||
}, 60000)
|
||||
},
|
||||
change() {
|
||||
this.isFullScreen = screenfull.isFullscreen
|
||||
},
|
||||
@@ -173,37 +132,6 @@ export default {
|
||||
}
|
||||
screenfull.toggle(this.$refs.dayReportB)
|
||||
},
|
||||
changeDate(val) {
|
||||
this.date = val
|
||||
// this.weekDay = this.weekArr[moment(this.date).format('e')]
|
||||
// this.getData()
|
||||
if (this.date === moment().format('yyyy-MM-DD')) {
|
||||
this.loopTime()
|
||||
} else {
|
||||
clearInterval(this.timer)
|
||||
}
|
||||
},
|
||||
// 导出
|
||||
// exportPDF() {
|
||||
// this.$message.success('正在导出,请稍等!')
|
||||
// const element = document.getElementById('dayRepDom')
|
||||
// element.style.display = 'block'
|
||||
// const fileName = '株洲碲化镉生产日报' + moment().format('yyMMDD') + '.pdf'
|
||||
// html2canvas(element, {
|
||||
// dpi: 300, // Set to 300 DPI
|
||||
// scale: 3 // Adjusts your resolution
|
||||
// }).then(function(canvas) {
|
||||
// const imgWidth = 595.28
|
||||
// const imgHeight = 841.89
|
||||
// const pageData = canvas.toDataURL('image/jpeg', 1.0)
|
||||
// const PDF = new JsPDF('', 'pt', [imgWidth, imgHeight])
|
||||
// PDF.addImage(pageData, 'JPEG', 0, 0, imgWidth, imgHeight)
|
||||
// setTimeout(() => {
|
||||
// PDF.save(fileName) // 导出文件名
|
||||
// }, 1000)
|
||||
// })
|
||||
// element.style.display = 'none'
|
||||
// }
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user