修改比对
This commit is contained in:
@@ -193,7 +193,7 @@
|
||||
|
||||
import InternalDetailPage from '../../../components/InternalDetailPage.vue'
|
||||
import { getComparisonDetail, clauseComparison } from '../../../api/documentToolApi.js'
|
||||
import { postAction } from '../../../api/manage'
|
||||
import { downFile, postAction } from '../../../api/manage'
|
||||
|
||||
export default {
|
||||
name: 'DocumentDataComparison',
|
||||
@@ -458,7 +458,44 @@ export default {
|
||||
// }
|
||||
},
|
||||
handleExportXls () {
|
||||
|
||||
const fileName = '全文比对信息'
|
||||
const fileSuffix = '.xlsx'
|
||||
const param = {}
|
||||
param.id = this.$route.query.id
|
||||
param.exportName = fileName + fileSuffix
|
||||
// 加一个大的提示
|
||||
const modalLoading = this.$info({
|
||||
title: this.$t('tips'),
|
||||
content: <span>{this.$t('exportTip')}
|
||||
<a-spin size="small" /></span>,
|
||||
keyboard: false
|
||||
})
|
||||
// 把知道了这个按钮去掉
|
||||
this.$nextTick(() => {
|
||||
document.getElementsByClassName('ant-modal-confirm-btns')[0].style = 'display:none'
|
||||
})
|
||||
downFile('/compare/sarFileCompareInfo/exportFullTextCompareXls', param).then((data) => {
|
||||
if (!data) {
|
||||
this.$message.warning(this.$t('fileDownloadFail'))
|
||||
return
|
||||
}
|
||||
if (typeof window.navigator.msSaveBlob !== 'undefined') {
|
||||
window.navigator.msSaveBlob(new Blob([data], { type: 'application/vnd.ms-excel' }), fileName + fileSuffix)
|
||||
} else {
|
||||
const url = window.URL.createObjectURL(new Blob([data], { type: 'application/vnd.ms-excel' }))
|
||||
const link = document.createElement('a')
|
||||
link.style.display = 'none'
|
||||
link.href = url
|
||||
link.setAttribute('download', fileName + fileSuffix)
|
||||
document.body.appendChild(link)
|
||||
link.click()
|
||||
document.body.removeChild(link) // 下载完成移除元素
|
||||
window.URL.revokeObjectURL(url) // 释放掉blob对象
|
||||
}
|
||||
}).finally(() => {
|
||||
// 销毁这个提示
|
||||
modalLoading.destroy()
|
||||
})
|
||||
},
|
||||
modalSave (item) {
|
||||
const query = {
|
||||
|
||||
Reference in New Issue
Block a user