From e4e7444affec0d4eaa380557376558558fa03e6c Mon Sep 17 00:00:00 2001
From: odjbin <1042039504@qq.com>
Date: Sat, 18 May 2024 20:59:35 +0800
Subject: [PATCH] =?UTF-8?q?fix=20:=20=E4=BF=AE=E5=A4=8D=E9=9C=80=E6=B1=82?=
=?UTF-8?q?=E5=BE=81=E9=9B=86=E8=AF=A6=E6=83=85=E7=BB=84=E4=BB=B6=E4=B8=8B?=
=?UTF-8?q?=E8=BD=BDbug?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/views/project-management/initiation/detail.vue | 12 +++++++++++-
src/views/project-management/initiation/index.vue | 2 +-
2 files changed, 12 insertions(+), 2 deletions(-)
diff --git a/src/views/project-management/initiation/detail.vue b/src/views/project-management/initiation/detail.vue
index 261efd6..4659bd5 100644
--- a/src/views/project-management/initiation/detail.vue
+++ b/src/views/project-management/initiation/detail.vue
@@ -8,7 +8,7 @@
>
+ :companyOption="companyOption" @getInfo="getDemandCollectionInfo" @download="downloadDetailFile"/>
@@ -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) {
diff --git a/src/views/project-management/initiation/index.vue b/src/views/project-management/initiation/index.vue
index c47dcbc..094c11e 100644
--- a/src/views/project-management/initiation/index.vue
+++ b/src/views/project-management/initiation/index.vue
@@ -165,7 +165,7 @@ const tableConfig = reactive({
}
}
],
- api: '',
+ api: '/workflow/mosr/requirement',
params: {},
})