|
@@ -410,7 +410,7 @@ export default {
|
|
},
|
|
},
|
|
//过去一周按钮事件
|
|
//过去一周按钮事件
|
|
lastWeekHandle() {
|
|
lastWeekHandle() {
|
|
-
|
|
|
|
|
|
+ this.loading = true
|
|
let lastStart =
|
|
let lastStart =
|
|
moment()
|
|
moment()
|
|
.subtract(7, 'days')
|
|
.subtract(7, 'days')
|
|
@@ -421,11 +421,11 @@ export default {
|
|
this.dateRange=[lastStart,lastEnd]
|
|
this.dateRange=[lastStart,lastEnd]
|
|
console.log(this.dateRange);
|
|
console.log(this.dateRange);
|
|
this.timedata=this.dateRange
|
|
this.timedata=this.dateRange
|
|
- this.timedata=this.dateRange
|
|
|
|
- // console.log(this.dateRange)
|
|
|
|
|
|
+ // this.timedata=this.dateRange
|
|
|
|
+ console.log(this.dateRange)
|
|
this.totalSelect = 7
|
|
this.totalSelect = 7
|
|
this.daysFlag = true
|
|
this.daysFlag = true
|
|
- this.timedata=[this.dateRange[0]._i,this.dateRange[1]._i]
|
|
|
|
|
|
+ this.timedata=[moment(this.dateRange[0]._d).format('YYYY-MM-DD'),moment(this.dateRange[1]._d).format('YYYY-MM-DD')]
|
|
postAction('/toutiao/videoReportDaily/bytedanceVideoInfoListWeek', {
|
|
postAction('/toutiao/videoReportDaily/bytedanceVideoInfoListWeek', {
|
|
startDate: this.timedata[0],
|
|
startDate: this.timedata[0],
|
|
endDate: this.timedata[1],
|
|
endDate: this.timedata[1],
|
|
@@ -487,12 +487,12 @@ export default {
|
|
signature: this.signature
|
|
signature: this.signature
|
|
}).then(res => {
|
|
}).then(res => {
|
|
let blob = new Blob([res], {
|
|
let blob = new Blob([res], {
|
|
- type: 'application/vnd.ms-excel'
|
|
|
|
|
|
+ type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'
|
|
})
|
|
})
|
|
let downloadElement = document.createElement('a')
|
|
let downloadElement = document.createElement('a')
|
|
let href = window.URL.createObjectURL(blob) //创建下载的链接
|
|
let href = window.URL.createObjectURL(blob) //创建下载的链接
|
|
downloadElement.href = href
|
|
downloadElement.href = href
|
|
- downloadElement.download = name + '-' +this.timedata[0] + '-' + this.timedata[1] //下载后文件名
|
|
|
|
|
|
+ downloadElement.download = name + '-' +this.timedata[0] + '-' + this.timedata[1] +'.xlsx' //下载后文件名
|
|
document.body.appendChild(downloadElement)
|
|
document.body.appendChild(downloadElement)
|
|
downloadElement.click() //点击下载
|
|
downloadElement.click() //点击下载
|
|
document.body.removeChild(downloadElement) //下载完成移除元素
|
|
document.body.removeChild(downloadElement) //下载完成移除元素
|