fix : 修复需求征集详情组件下载bug
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
>
|
||||
<el-tab-pane label="需求征集" name="first">
|
||||
<collection-detail :formData="collectionData.formData" :data="collectionData" :processViewer="processViewer"
|
||||
:companyOption="companyOption" @getInfo="getDemandCollectionInfo"/>
|
||||
:companyOption="companyOption" @getInfo="getDemandCollectionInfo" @download="downloadDetailFile"/>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="需求上报" name="second"></el-tab-pane>
|
||||
<el-tab-pane label="项目立项" name="third" :disabled="true"></el-tab-pane>
|
||||
@@ -21,6 +21,7 @@ import {getInfo} from "@/api/project-demand/index.js";
|
||||
import {getSubCompOpt} from '@/api/user/user.js'
|
||||
import {useProcessStore} from '@/stores/processStore.js';
|
||||
import CollectionDetail from "@/components/DetailComponent/CollectionDetail.vue";
|
||||
import {downloadFile} from "@/api/project-demand";
|
||||
|
||||
const route = useRoute()
|
||||
const activeName = ref('first')
|
||||
@@ -51,6 +52,15 @@ const getDemandCollectionInfo = async () => {
|
||||
})
|
||||
})
|
||||
}
|
||||
const downloadDetailFile = (row) => {
|
||||
downloadFile(row.fileId).then(res => {
|
||||
const blob = new Blob([res])
|
||||
let a = document.createElement('a')
|
||||
a.href = URL.createObjectURL(blob)
|
||||
a.download = row.originalFileName
|
||||
a.click()
|
||||
})
|
||||
}
|
||||
const handleClick = (tab, event) => {
|
||||
console.log(tab, event)
|
||||
if (tab.index.value === 0) {
|
||||
|
||||
@@ -165,7 +165,7 @@ const tableConfig = reactive({
|
||||
}
|
||||
}
|
||||
],
|
||||
api: '',
|
||||
api: '/workflow/mosr/requirement',
|
||||
params: {},
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user