Browse Source

完善运营导出

master
曲树通 6 years ago
parent
commit
4fa145bf81
  1. 22
      src/views/modules/analysis/export/operation.vue

22
src/views/modules/analysis/export/operation.vue

@ -1,5 +1,6 @@
<template> <template>
<el-card shadow="never" <el-card shadow="never"
v-loading="loading"
class="aui-card--fill"> class="aui-card--fill">
<div class="mod-news__news}"> <div class="mod-news__news}">
<el-form :inline="true" <el-form :inline="true"
@ -137,10 +138,12 @@ export default {
}).catch(() => { }) }).catch(() => { })
}, },
exportHandlee () { exportHandlee () {
this.loading = true
this.$http.post('/analysis/user/export/exportOperationData', this.dataForm, { responseType: 'arraybuffer' }).then((res) => { this.$http.post('/analysis/user/export/exportOperationData', this.dataForm, { responseType: 'arraybuffer' }).then((res) => {
if (res.code !== 0) { this.loading = false
return this.$message.error(res.msg) // if (res.code !== 0) {
} // return this.$message.error(res.msg)
// }
let fileName = '运营数据报表.xls' let fileName = '运营数据报表.xls'
let blob = new Blob([res.data], { type: 'application/x-xls' }) let blob = new Blob([res.data], { type: 'application/x-xls' })
if (window.navigator.msSaveOrOpenBlob) { if (window.navigator.msSaveOrOpenBlob) {
@ -157,6 +160,17 @@ export default {
}, },
components: { components: {
}, },
mixins: [mixinViewModule] mixins: [mixinViewModule],
watch: {
'timeFlag': function (val) {
if (val == 0) {
this.dataForm.operationStartTime = ''
this.dataForm.operationEndTime = ''
this.time = []
} else {
this.dataForm.endTime = ''
}
}
}
} }
</script> </script>

Loading…
Cancel
Save