|
|
@@ -289,9 +289,9 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
- switchTab(item, index) {
|
|
|
+ switchTab (item, index) {
|
|
|
this.active = index
|
|
|
- this.onLoad({projectStage: item.dictKey})
|
|
|
+ this.onLoad({ projectStage: item.dictKey })
|
|
|
},
|
|
|
onLoad (query = {}) {
|
|
|
this.loading = true
|
|
|
@@ -410,7 +410,7 @@ export default {
|
|
|
})
|
|
|
})
|
|
|
},
|
|
|
- projectSave() {
|
|
|
+ projectSave () {
|
|
|
if (this.disable) {
|
|
|
this.$message.error('正在处理,请稍后...')
|
|
|
return
|
|
|
@@ -433,6 +433,20 @@ export default {
|
|
|
})
|
|
|
}
|
|
|
})
|
|
|
+ },
|
|
|
+ exportExcel (res) {
|
|
|
+ const data = Object.assign(this.queryData, { columnName: res })
|
|
|
+ this.$api.params.exportResult(data).then(res => {
|
|
|
+ const url = window.URL.createObjectURL(new Blob([res], { type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8' }))
|
|
|
+ const link = document.createElement('a')
|
|
|
+ link.style.display = 'none'
|
|
|
+ link.href = url
|
|
|
+ const excelName = new Date().getTime() + '.xlsx'
|
|
|
+ link.setAttribute('download', excelName)
|
|
|
+ document.body.appendChild(link)
|
|
|
+ link.click()
|
|
|
+ link.remove()
|
|
|
+ })
|
|
|
}
|
|
|
}
|
|
|
}
|