refactor reports in downloading on diffrent os

This commit is contained in:
Jay_Makwana
2019-11-13 17:28:40 +05:30
parent 80178423ad
commit b0a1b4a5fa
4 changed files with 33 additions and 5 deletions

View File

@ -200,7 +200,14 @@ export default {
return true
},
downloadReport () {
this.url += '&download=true'
if (!this.getReports()) {
return false
}
if (navigator.appVersion.indexOf('Mac') !== -1) {
this.url += '&download=true'
} else {
window.open(this.getReportUrl + '&download=true')
}
setTimeout(() => {
this.url = `${this.siteURL}?from_date=${moment(this.formData.from_date).format('DD/MM/YYYY')}&to_date=${moment(this.formData.to_date).format('DD/MM/YYYY')}`
}, 200)