From b7ca30eafc9dd2c724038e9d1045178da27532b2 Mon Sep 17 00:00:00 2001 From: han2015 <1019850453@qq.com> Date: Mon, 13 Oct 2025 11:27:41 +0800 Subject: [PATCH] =?UTF-8?q?yunpan:=20=E4=BF=AE=E5=A4=8D=E7=AC=AC=E4=B8=80?= =?UTF-8?q?=E6=AC=A1=E6=89=93=E5=BC=80=E6=B2=A1=E6=9C=89=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/doc/type.ts | 8 ++ src/utils/router/index.ts | 5 + src/views/doc/agent.vue | 18 ++- src/views/doc/favourite.vue | 222 ++++++++++++++++++++++++++++++++++++ src/views/doc/index.vue | 8 +- 5 files changed, 256 insertions(+), 5 deletions(-) create mode 100644 src/views/doc/favourite.vue diff --git a/src/api/doc/type.ts b/src/api/doc/type.ts index 6afc9d9..722a144 100644 --- a/src/api/doc/type.ts +++ b/src/api/doc/type.ts @@ -52,6 +52,14 @@ export interface shareItem{ expireTime?:string; permitList?:string; } +//收藏夹数据结构 +export interface favourItem{ + name:string; + uuid:string; //文件uuid + userUuid:string; //owner uuid + path:string; + permitVal:number; //该值是当前用户permits的解析结果 +} export interface matterTree extends matterInfo { manager?:boolean; diff --git a/src/utils/router/index.ts b/src/utils/router/index.ts index 8c59511..9863310 100644 --- a/src/utils/router/index.ts +++ b/src/utils/router/index.ts @@ -101,6 +101,11 @@ export const staticRouting : RouteRecordRaw[] = [ component: () => import('@/views/doc/agent.vue'), meta: { hidden: true }, }, + // { + // path: '/favourites', + // component: () => import('@/views/doc/favourite.vue'), + // meta: { hidden: true }, + // }, { path: '/spaces/:spaceid', name: 'spaces', diff --git a/src/views/doc/agent.vue b/src/views/doc/agent.vue index 3849d89..787c4f6 100644 --- a/src/views/doc/agent.vue +++ b/src/views/doc/agent.vue @@ -6,7 +6,7 @@ + + + + 返回 + + + + + + + + + + + {{ scope.row.name }} + {e.stopPropagation(); showPopup=true; currentHoverRow=scope.row;}"> + + + + + + + + + + + + + + {{ currentHoverRow.name }} + 关闭 + + + + + 预览 + + 详情 + + 下载 + + 删除 + + + + + + + + + + diff --git a/src/views/doc/index.vue b/src/views/doc/index.vue index ffc4a5f..69fee9c 100644 --- a/src/views/doc/index.vue +++ b/src/views/doc/index.vue @@ -37,8 +37,12 @@ function onSelectSpace(data:matterInfo,recycling?:number){ state:{ space: toRaw(data), //这里一定要用toRaw } - }); + }); }else{ + if(recycling==1) { + router.push({ path: "/favourites",query:{fa:7}}); + return + } if(recycling==3) { router.push({ path: "/mysapce",query:{fa:7,recycling:recycling}}); return @@ -174,7 +178,7 @@ function onSpaceConfig(row:matterInfo){ onMounted(()=>{ if(userStore.userInfoCont == ""){ userStore.getInfo().then(()=>{ - getMySpaces(uid,{roles:Departs.value}).then((resp)=>{ + getMySpaces(btoa("p0"+userStore.userInfoCont.userId),{roles:Departs.value}).then((resp)=>{ resp.data.forEach((item)=>{ let ismanager=false if(item.userUuid==rawUid || item.managers.includes(rawUid)) ismanager=true;