|
|
|
@ -67,7 +67,6 @@ const props = withDefaults(defineProps<{ |
|
|
|
siteHost:string, |
|
|
|
owner:string, |
|
|
|
apiURL:string, |
|
|
|
roles:string, |
|
|
|
listOrGrid:boolean, |
|
|
|
ismanager:boolean, |
|
|
|
spacePermit:matterPermit, |
|
|
|
@ -138,7 +137,6 @@ function onDelMatter(row:matterInfo){ |
|
|
|
doDelSpaceMatter(props.uid,{ |
|
|
|
"uuid":row.uuid, |
|
|
|
"space":props.spaceid, |
|
|
|
"roles":props.roles, |
|
|
|
}).then(()=>{ |
|
|
|
currentNode.value.uuid = row.puuid ?? "" |
|
|
|
currentNode.value.name = row.path ? row.path.replace(`/${row.name}`,'').match(/[^/]+$/g)?.pop() :"上级目录" |
|
|
|
@ -172,7 +170,6 @@ function onLoadMatterList(){ |
|
|
|
puuid:currentNode.value.uuid, |
|
|
|
deleted:false, |
|
|
|
space:props.spaceid, |
|
|
|
roles:props.roles, |
|
|
|
}; |
|
|
|
|
|
|
|
getSpaceMatterList(props.uid,_page).then((resp)=>{ |
|
|
|
@ -245,7 +242,6 @@ function onCreateDir(){ |
|
|
|
puuid:currentNode.value.uuid, |
|
|
|
name:newdirName.value, |
|
|
|
space:props.spaceid, |
|
|
|
roles:props.roles, |
|
|
|
}).then((resp)=> { |
|
|
|
newdirName.value="" |
|
|
|
onLoadMatterList() |
|
|
|
@ -254,6 +250,7 @@ function onCreateDir(){ |
|
|
|
ElMessage.error(e.msg) |
|
|
|
}) |
|
|
|
} |
|
|
|
|
|
|
|
//------------------------------------------ |
|
|
|
// @cell-dblclick="handleDoubleClick" 取消了目录双击打开功能 |
|
|
|
//打开一个目录 |
|
|
|
@ -308,13 +305,11 @@ function handleDoubleClick(row:matterInfo,ind?:number){ |
|
|
|
onLoadMatterList() |
|
|
|
} |
|
|
|
*/ |
|
|
|
}else{ |
|
|
|
onPrivateView(row) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
function checkMatterPermit(){ |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
function handleMouseEnter(row:any){ |
|
|
|
currentHoverRow.value=row.name |
|
|
|
} |
|
|
|
@ -416,7 +411,6 @@ async function doCreateMultyDir(path:string,uuid:string){ |
|
|
|
puuid:uuid, |
|
|
|
name:dirs[i], |
|
|
|
space:props.spaceid, |
|
|
|
roles:props.roles, |
|
|
|
}).then((resp)=> { |
|
|
|
uuid=resp.data.uuid //第一级别的uuid, 是第二级的puuid |
|
|
|
list.push(resp.data) |
|
|
|
@ -549,12 +543,13 @@ function isOwner(){ |
|
|
|
<div> |
|
|
|
<el-row :gutter="24" style="margin: 12px 0px;"> |
|
|
|
<span class="el-breadcrumb" style="font-weight: bold;">[ {{ props.spacename }} ] : </span> |
|
|
|
<el-breadcrumb separator="/"> |
|
|
|
<!-- <el-breadcrumb separator="/"> |
|
|
|
<el-breadcrumb-item v-for="(item,index) in breadcrumbList" |
|
|
|
:key="index" @click="handleDoubleClick(item,index)"> |
|
|
|
<span style="font-weight: bold;">{{ item.name }}</span> |
|
|
|
<span style="font-weight: bold;cursor: pointer;">{{ item.name }}</span> |
|
|
|
</el-breadcrumb-item> |
|
|
|
</el-breadcrumb> |
|
|
|
</el-breadcrumb> --> |
|
|
|
<span style="font-weight: bold;margin:0 5px;align-content:center;">{{ currentNode.name }}</span> |
|
|
|
</el-row> |
|
|
|
|
|
|
|
<el-row :gutter="24"> |
|
|
|
@ -597,7 +592,7 @@ function isOwner(){ |
|
|
|
<el-table-column width="450" property="name" label="文件名"> |
|
|
|
<template #default="scope"> |
|
|
|
<input v-if="scope.row.name===''" v-model="newdirName" type="text" autofocus placeholder="文件夹名" style="border:groove;height:30px;" @change="onCreateDir" /> |
|
|
|
<div v-else style="display: flex; align-items: center;"> |
|
|
|
<div v-else style="display: flex; align-items: center;" @dblclick="handleDoubleClick(scope.row)" > |
|
|
|
<svg-icon v-if="scope.row.dir" icon-class="folder-icon" :size="30"/> |
|
|
|
<el-image v-else-if="getFileIcon(scope.row.name)==='img'" style="width: 30px;" :preview-src-list="[getSpaceImageDURL(scope.row.uuid,scope.row.name)]" :src="getSpaceImageViewURL(scope.row.uuid,scope.row.name)" /> |
|
|
|
<svg-icon v-else :icon-class="getFileIcon(scope.row.name)+'-icon'" :size="30" /> |
|
|
|
@ -636,7 +631,7 @@ function isOwner(){ |
|
|
|
<input v-model="newdirName" type="text" autofocus placeholder="文件夹名" style="border:groove;height:30px;" @change="onCreateDir" /> |
|
|
|
</div> |
|
|
|
|
|
|
|
<div v-else class="grid-box" @mouseenter="handleMouseEnter(row)"> |
|
|
|
<div v-else class="grid-box" @dblclick="handleDoubleClick(row)" @contextmenu.prevent="handleMouseEnter(row)" > |
|
|
|
<svg-icon v-if="row.dir" icon-class="folder-icon" size="80px"/> |
|
|
|
<el-image v-else-if="getFileIcon(row.name)==='img'" style="width: 80px;" :preview-src-list="[getSpaceImageDURL(row.uuid,row.name)]" :src="getSpaceImageViewURL(row.uuid,row.name)" /> |
|
|
|
<svg-icon v-else :icon-class="getFileIcon(row.name)+'-icon'" size="80px"/> |
|
|
|
@ -644,15 +639,15 @@ function isOwner(){ |
|
|
|
<el-tag v-if="row.agent" effect="dark" size="small" type="success" round >智能体</el-tag> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div v-if="row.name!=''" class="grid-menus" v-show="currentHoverRow === row.name"> |
|
|
|
<el-button v-if="getFileIcon(row.name)!='img'" size="small" :icon="View" circle @click="onPrivateView(row)"></el-button> |
|
|
|
<el-button v-if="row.permitVal! >= PERMITS.DOWNLOAD" size="small" :icon="Download" circle @click="onDownload(row)"></el-button> |
|
|
|
<el-button v-if="row.permitVal! >= PERMITS.EDIT" size="small" :icon="Edit" circle @click="onlyOfficeEdit(row)"></el-button> |
|
|
|
<ul v-if="row.name!=''" class="grid-menus" v-show="currentHoverRow === row.name" @mouseleave="currentHoverRow=''"> |
|
|
|
<li v-if="getFileIcon(row.name)!='img'" @click="onPrivateView(row)">预览</li> |
|
|
|
<li v-if="row.permitVal! >= PERMITS.DOWNLOAD" @click="onDownload(row)">下载</li> |
|
|
|
<li v-if="row.permitVal! >= PERMITS.EDIT" @click="onlyOfficeEdit(row)">编辑</li> |
|
|
|
<span v-if="row.permitVal! >= PERMITS.MANAGER" > |
|
|
|
<el-button size="small" :icon="Delete" circle @click="onDelMatter(row)"></el-button> |
|
|
|
<el-button size="small" :icon="Setting" circle @click="onSpacePManage(row)"></el-button> |
|
|
|
<li @click="onDelMatter(row)">删除</li> |
|
|
|
<li @click="onSpacePManage(row)">权限</li> |
|
|
|
</span> |
|
|
|
</div> |
|
|
|
</ul> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</el-row> |
|
|
|
@ -684,10 +679,10 @@ function isOwner(){ |
|
|
|
flex-wrap: wrap; /* 关键属性,允许子元素自动换行 */ |
|
|
|
.grid-item{ |
|
|
|
position: relative; |
|
|
|
height: 134px; |
|
|
|
width: 134px; |
|
|
|
margin: 5px; |
|
|
|
.grid-box{ |
|
|
|
height: 150px; |
|
|
|
display: flex; |
|
|
|
flex-direction: column; |
|
|
|
overflow: hidden; |
|
|
|
@ -697,9 +692,17 @@ function isOwner(){ |
|
|
|
.grid-menus{ |
|
|
|
position: absolute; |
|
|
|
top: 10px; |
|
|
|
button{ |
|
|
|
color: black; |
|
|
|
margin: 4px; |
|
|
|
left: 72px; |
|
|
|
background-color: #ffffff; |
|
|
|
width: 60px; |
|
|
|
line-height: 27px; |
|
|
|
text-align: center; |
|
|
|
color: #878989; |
|
|
|
z-index: 999; |
|
|
|
box-shadow:0px 0px 12px rgba(0,0,0,0.12); |
|
|
|
li{ |
|
|
|
cursor: pointer; |
|
|
|
border-bottom: 1px solid #ccc; |
|
|
|
} |
|
|
|
} |
|
|
|
.grid{ |
|
|
|
|