fix: 详情给交付物添加下载功能
Showing
3 changed files
with
10 additions
and
11 deletions
| ... | @@ -226,9 +226,9 @@ export const getPastTime = (duration, type) => { | ... | @@ -226,9 +226,9 @@ export const getPastTime = (duration, type) => { |
| 226 | } | 226 | } |
| 227 | 227 | ||
| 228 | /** 根据流获取url地址,用于文件查看。 */ | 228 | /** 根据流获取url地址,用于文件查看。 */ |
| 229 | export const getDownloadUrl = (data, fileName, type: any = null,flag=true) => { | 229 | export const getDownloadUrl= (data, fileName, type: any = null,flag=true) => { |
| 230 | let mineType = 'application/octet-stream' | 230 | let mineType = 'application/octet-stream' |
| 231 | if (type == 'excel') { | 231 | if (type == 'excel' || type == 'xlsx' || type == 'xls' || type == 'csv') { |
| 232 | mineType = 'application/vnd.ms-excel' | 232 | mineType = 'application/vnd.ms-excel' |
| 233 | } else if (type == 'word') { | 233 | } else if (type == 'word') { |
| 234 | mineType = 'application/msword' | 234 | mineType = 'application/msword' | ... | ... |
| ... | @@ -168,18 +168,17 @@ const getTaskDetail = () => { | ... | @@ -168,18 +168,17 @@ const getTaskDetail = () => { |
| 168 | }) | 168 | }) |
| 169 | } | 169 | } |
| 170 | 170 | ||
| 171 | const toPath = () => { | ||
| 172 | userStore.setTabbar(userStore.tabbar.filter((tab: any) => tab.fullPath !== fullPath)); | ||
| 173 | assetStore.set(true); | ||
| 174 | router.push({ | ||
| 175 | name: 'contractManagement', | ||
| 176 | }) | ||
| 177 | } | ||
| 178 | |||
| 179 | const btnClick = async (btn) => { | 171 | const btnClick = async (btn) => { |
| 180 | const type = btn.value; | 172 | const type = btn.value; |
| 181 | if (type == 'cancel') { | 173 | if (type == 'cancel') { |
| 182 | toPath() | 174 | userStore.setTabbar(userStore.tabbar.filter((tab: any) => tab.fullPath !== fullPath)); |
| 175 | router.push({ | ||
| 176 | name: 'registerCatalogDetail', | ||
| 177 | query: { | ||
| 178 | guid: route.query.damGuid, | ||
| 179 | type: 'asset' | ||
| 180 | } | ||
| 181 | }) | ||
| 183 | } | 182 | } |
| 184 | } | 183 | } |
| 185 | 184 | ... | ... |
This diff is collapsed.
Click to expand it.
-
Please register or sign in to post a comment