|
|
|
@ -103,12 +103,22 @@ function onShareMember(row:matterInfo){ |
|
|
|
|
|
|
|
//文件预览 |
|
|
|
function onShareView(row:matterInfo){ |
|
|
|
if(row.name.endsWith('...')){ |
|
|
|
row.name="archive.zip" |
|
|
|
let a=row.name; |
|
|
|
if(a.endsWith('...')){ |
|
|
|
a=`${row.uuid}-${row.code}.zip` |
|
|
|
} |
|
|
|
let _url=`${siteHost}${apiURL}/share/zip?shareUuid=${row.uuid}&code=${row.code}&puuid=root&rootUuid=root&fullfilename=${row.name}` |
|
|
|
|
|
|
|
//由于预览服务在缓存文件时,直接按文件名缓存,所以同名文件就会出现覆盖错乱的问题 |
|
|
|
a=a.match("(\.[a-zA-Z]+)$") |
|
|
|
if (a && a.length>0) { |
|
|
|
a=`${row.uuid}-${row.code}${a[0]}` |
|
|
|
}else{ |
|
|
|
a=`${row.uuid}${row.name}` |
|
|
|
} |
|
|
|
|
|
|
|
let _url=`${siteHost}${apiURL}/share/zip?shareUuid=${row.uuid}&code=${row.code}&uid=${uid}&puuid=root&rootUuid=root&fullfilename=${a}` |
|
|
|
dynamicVNode.value=h(preview,{ |
|
|
|
url:`${officeHost}/onlinePreview?url=`+encodeURIComponent(btoa(_url)), |
|
|
|
url:`${officeHost}/onlinePreview?url=`+window.btoa(unescape(encodeURIComponent(_url))), |
|
|
|
closeFunc:()=>dynamicVNode.value=null |
|
|
|
}) |
|
|
|
} |
|
|
|
|