fix : 修复页面bug

This commit is contained in:
2024-07-18 22:06:23 +08:00
parent 3ec7a9c78e
commit 9d5c393ebe
28 changed files with 562 additions and 286 deletions

View File

@@ -37,20 +37,14 @@
import {getAllocationSummaryDetails} from "@/api/expense-manage";
import {shareExportExcel} from "@/api/expense-manage";
const tableData = ref([{
id: '12987122',
name: 'Tom',
amount1: '234',
amount2: '3.2',
amount3: 10,
},
{
id: '12987123',
name: 'Tom',
amount1: '165',
amount2: '4.43',
amount3: 12,
}])
const props = defineProps({
allocationName :{
type: String,
default: ''
}
})
const tableData = ref()
const loading = ref(false)
const table = ref()
const route = useRoute()
@@ -91,11 +85,7 @@ const getSummaries = (param) => {
const exportExcelHandler = () => {
shareExportExcel(route.query.id).then(res => {
console.log(res)
let reg = /filename=([^&]+)/;
let contentDisposition = decodeURI(res.headers['content-disposition'])
let result = reg.exec(contentDisposition)
let fileName = result[1]
fileName = fileName.replace(/\"/g, '')
let fileName = `科技创新项目费用分摊表-${props.allocationName}.zip`
const blob = new Blob([res.data])
let a = document.createElement('a')
a.href = URL.createObjectURL(blob)