-
+
@@ -781,8 +808,9 @@ const handleSelectionChange = (val:matterInfo[]) => {
@@ -862,6 +890,7 @@ const handleSelectionChange = (val:matterInfo[]) => {
display: flex;
flex-wrap: wrap; /* 关键属性,允许子元素自动换行 */
.grid-item{
+ position: relative;
height: 134px;
width: 134px;
margin: 5px;
@@ -872,6 +901,14 @@ const handleSelectionChange = (val:matterInfo[]) => {
align-items: center;
text-align:center;
}
+ .grid-menus{
+ position: absolute;
+ top: 10px;
+ button{
+ color: #000000;
+ margin: 4px;
+ }
+ }
.grid{
:hover {
background-color: #c4c4c4; /* 悬停时的背景色 */
diff --git a/src/views/doc/onlyoffice.vue b/src/views/doc/onlyoffice.vue
index 5520fbf..11f254e 100644
--- a/src/views/doc/onlyoffice.vue
+++ b/src/views/doc/onlyoffice.vue
@@ -50,7 +50,7 @@ onMounted(()=>{
if (query.fileurl){
const info=query.info?.toString()??"error"
const _info=decodeURIComponent(atob(info))
- const _url=decodeURIComponent(query.fileurl)
+ const _url=decodeURIComponent(window.atob(query.fileurl))
const name=query.name?.toString()??""
const dtype=query.dtype?.toString()??"word"
//验证一下文件名是否合规
diff --git a/src/views/doc/recentVisited.vue b/src/views/doc/recentVisited.vue
index ea18c34..447f9e5 100644
--- a/src/views/doc/recentVisited.vue
+++ b/src/views/doc/recentVisited.vue
@@ -141,7 +141,7 @@ onUnmounted(()=>{
-
+
diff --git a/src/views/doc/share.vue b/src/views/doc/share.vue
index e0cb2b8..0dbe785 100644
--- a/src/views/doc/share.vue
+++ b/src/views/doc/share.vue
@@ -119,7 +119,7 @@ function onShareView(row:matterInfo){
if(_type!==""){ //office file
const info =btoa(encodeURIComponent(`${row.name}`)) //预览模式不需要绝对路径,只核对一下文件名即可
const _url=`${siteHost}${apiURL}/share/zip?shareUuid=${row.uuid}&code=${row.code}&uid=${uid}&dprt=${udprt}&puuid=root&rootUuid=root`
- window.open(`/#/onlyoffice?name=${row.name}&dtype=${_type}&info=${info}&fileurl=`+encodeURIComponent(_url),"_blank")
+ window.open(`/#/onlyoffice?name=${row.name}&dtype=${_type}&info=${info}&fileurl=`+window.btoa(encodeURIComponent(_url)),"_blank")
}else{
//by kkFilePreview
let a = row.name ?? '';
@@ -145,7 +145,7 @@ function onShareView(row:matterInfo){
}
}
-//onlyoffice在线编辑
+//onlyoffice在线编辑,现在看来分享的不适合编辑,只保留预览
async function onlyOfficeEdit(row:matterInfo){
const _type=fileType(row.name!)
if(_type===""){
@@ -166,7 +166,7 @@ async function onlyOfficeEdit(row:matterInfo){
const _verify = btoa(row.uuid.match(/(\w+-\w+)/)![0]+"true") //增加一个权限验证的标记
const info =btoa(encodeURIComponent(`${row.userUuid}/root${filepath}`)) //编辑模式必须要全路径
const _url=`${siteHost}${apiURL}/share/zip?shareUuid=${row.uuid}&code=${row.code}&uid=${uid}&dprt=${udprt}&puuid=root&rootUuid=root`
- window.open(`/#/onlyoffice?name=${row.name}&dtype=${_type}&info=${info}&verify=${_verify}&fileurl=`+encodeURIComponent(_url),"_blank")
+ window.open(`/#/onlyoffice?name=${row.name}&dtype=${_type}&info=${info}&verify=${_verify}&fileurl=`+window.btoa(encodeURIComponent(_url)),"_blank")
})
}
@@ -232,10 +232,8 @@ onMounted(() => {
-
-
-
-
+
+
{{ checkExpirTime(scope.row)?scope.row.name+' (已过期)':scope.row.name }}
@@ -243,7 +241,7 @@ onMounted(() => {
-
+
{drawerModel=true; permitListRef=scope.row.permitInfos}">
diff --git a/src/views/doc/space.vue b/src/views/doc/space.vue
index de41b8b..1a7ee35 100644
--- a/src/views/doc/space.vue
+++ b/src/views/doc/space.vue
@@ -403,7 +403,7 @@ function onPrivateView(row:matterInfo){
const info =btoa(encodeURIComponent(`${row.name}`)) //预览模式不需要绝对路径,只核对一下文件名即可
const _url=`${props.siteHost}${props.apiURL}/space/download/${row.uuid}/${row.name}?space=${props.spaceid}`
//前半部分内容是为了校验信息,主要内容是fileurl
- window.open(`/#/onlyoffice?name=${row.name}&dtype=${_type}&info=${info}&fileurl=`+encodeURIComponent(_url),"_blank")
+ window.open(`/#/onlyoffice?name=${row.name}&dtype=${_type}&info=${info}&fileurl=`+window.btoa(encodeURIComponent(_url)),"_blank")
}else{
alert("暂不支持该类型预览")
}
@@ -427,7 +427,7 @@ async function onlyOfficeEdit(row:matterInfo){
const _verify = btoa(row.uuid.match(/(\w+-\w+)/)![0]+"true") //增加一个权限验证的标记
const info =btoa(encodeURIComponent(`${row.userUuid}/root${row.path}`)) //编辑模式必须要全路径
const _url=`${props.siteHost}${props.apiURL}/space/download/${row.uuid}/${row.name}?space=${props.spaceid}`
- window.open(`/#/onlyoffice?name=${row.name}&dtype=${_type}&info=${info}&verify=${_verify}&fileurl=`+encodeURIComponent(_url),"_blank")
+ window.open(`/#/onlyoffice?name=${row.name}&dtype=${_type}&info=${info}&verify=${_verify}&fileurl=`+window.btoa(encodeURIComponent(_url)),"_blank")
})
}
@@ -548,7 +548,7 @@ function isOwner(){
-
+
@@ -591,6 +591,7 @@ function isOwner(){
display: flex;
flex-wrap: wrap; /* 关键属性,允许子元素自动换行 */
.grid-item{
+ position: relative;
height: 134px;
width: 134px;
margin: 5px;
@@ -601,6 +602,14 @@ function isOwner(){
align-items: center;
text-align:center;
}
+ .grid-menus{
+ position: absolute;
+ top: 10px;
+ button{
+ color: black;
+ margin: 4px;
+ }
+ }
.grid{
:hover {
background-color: #c4c4c4; /* 悬停时的背景色 */