2bc45da1 by lihua

fix: 详情给交付物添加下载功能

1 parent bc825221
......@@ -226,9 +226,9 @@ export const getPastTime = (duration, type) => {
}
/** 根据流获取url地址,用于文件查看。 */
export const getDownloadUrl = (data, fileName, type: any = null,flag=true) => {
export const getDownloadUrl= (data, fileName, type: any = null,flag=true) => {
let mineType = 'application/octet-stream'
if (type == 'excel') {
if (type == 'excel' || type == 'xlsx' || type == 'xls' || type == 'csv') {
mineType = 'application/vnd.ms-excel'
} else if (type == 'word') {
mineType = 'application/msword'
......
......@@ -168,18 +168,17 @@ const getTaskDetail = () => {
})
}
const toPath = () => {
userStore.setTabbar(userStore.tabbar.filter((tab: any) => tab.fullPath !== fullPath));
assetStore.set(true);
router.push({
name: 'contractManagement',
})
}
const btnClick = async (btn) => {
const type = btn.value;
if (type == 'cancel') {
toPath()
userStore.setTabbar(userStore.tabbar.filter((tab: any) => tab.fullPath !== fullPath));
router.push({
name: 'registerCatalogDetail',
query: {
guid: route.query.damGuid,
type: 'asset'
}
})
}
}
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!