|
|
@ -7,7 +7,7 @@ |
|
|
import { getExpirTime, getFileIcon, readableSize,fileType} from "./tools" |
|
|
import { getExpirTime, getFileIcon, readableSize,fileType} from "./tools" |
|
|
import sharePermission from './sharePermission.vue'; |
|
|
import sharePermission from './sharePermission.vue'; |
|
|
import { useUserStore } from "@/store/modules/user"; |
|
|
import { useUserStore } from "@/store/modules/user"; |
|
|
import { getMatterList,postCreateDir,postDelMatter,postCreateShare,postMatterRename,postMatterMove, |
|
|
import { getMatterList,postCreateDir,postDelMatter,postClearDelsBatch,postCreateShare,postMatterRename,postMatterMove, |
|
|
postDelMatBatch,getMySpaces,doCreateSpace,getRecyclingList} from "@/api/doc/index" |
|
|
postDelMatBatch,getMySpaces,doCreateSpace,getRecyclingList} from "@/api/doc/index" |
|
|
import { matterPage,matterInfo,respCreateShare,matterTree, doFileUpload,matterPermit} from "@/api/doc/type" |
|
|
import { matterPage,matterInfo,respCreateShare,matterTree, doFileUpload,matterPermit} from "@/api/doc/type" |
|
|
import { h } from 'vue' |
|
|
import { h } from 'vue' |
|
|
@ -178,7 +178,7 @@ function onShareMatter(row?:matterInfo){ |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
function showShareMessage(row:respCreateShare){ |
|
|
function showShareMessage(row:respCreateShare){ |
|
|
let _shareURL=`${siteHost}/#/doc/share/?uuid=${row.uuid}&code=${row.code}` |
|
|
let _shareURL=`${siteHost}/#/doc/share/?uuid=${row.uuid}&code=${row.code}&分享=${row.name}` |
|
|
ElMessageBox({ |
|
|
ElMessageBox({ |
|
|
title: '分享详情', |
|
|
title: '分享详情', |
|
|
customStyle: { '--el-messagebox-width':'800px',padding:'40px'}, |
|
|
customStyle: { '--el-messagebox-width':'800px',padding:'40px'}, |
|
|
@ -202,7 +202,7 @@ function onDelNodeMatter(row:matterInfo){ |
|
|
//删除 |
|
|
//删除 |
|
|
function onDelMatter(row:matterInfo,dir?:boolean){ |
|
|
function onDelMatter(row:matterInfo,dir?:boolean){ |
|
|
if (row.uuid){ |
|
|
if (row.uuid){ |
|
|
ElMessageBox.confirm(`确认删除( ${row.name}) ?删除后不可恢复!取消则放弃删除操作。`, "警告", { |
|
|
ElMessageBox.confirm(`确认删除( ${row.name}) 到回收站?取消则放弃删除操作。`, "警告", { |
|
|
confirmButtonText: "确定", |
|
|
confirmButtonText: "确定", |
|
|
cancelButtonText: "取消", |
|
|
cancelButtonText: "取消", |
|
|
type: "warning", |
|
|
type: "warning", |
|
|
@ -217,14 +217,14 @@ function onDelMatter(row:matterInfo,dir?:boolean){ |
|
|
} |
|
|
} |
|
|
currentNode.value.uuid = row.puuid ?? "root" |
|
|
currentNode.value.uuid = row.puuid ?? "root" |
|
|
} |
|
|
} |
|
|
onLoadMatterList() |
|
|
onLoadMatterList() |
|
|
}) |
|
|
}) |
|
|
}) |
|
|
}) |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
function onDelMatBatch(){ |
|
|
function onDelMatBatch(){ |
|
|
ElMessageBox.confirm("确认删除选择的内容?", "警告", { |
|
|
ElMessageBox.confirm("确认删除选择的内容到回收站?", "警告", { |
|
|
confirmButtonText: "确定", |
|
|
confirmButtonText: "确定", |
|
|
cancelButtonText: "取消", |
|
|
cancelButtonText: "取消", |
|
|
type: "warning", |
|
|
type: "warning", |
|
|
@ -237,6 +237,20 @@ function onDelMatBatch(){ |
|
|
}) |
|
|
}) |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
function onClearDelsBatch(){ |
|
|
|
|
|
ElMessageBox.confirm("确认删除选择的内容, 不可恢复!!!", "警告", { |
|
|
|
|
|
confirmButtonText: "确定", |
|
|
|
|
|
cancelButtonText: "取消", |
|
|
|
|
|
type: "warning", |
|
|
|
|
|
}).then(()=>{ |
|
|
|
|
|
postClearDelsBatch(uid,{ |
|
|
|
|
|
"uuids":tabSelected.value.map((item:matterInfo)=>item.uuid).join(",") |
|
|
|
|
|
}).then(()=>{ |
|
|
|
|
|
router.replace({ query: { t: Date.now() } }) |
|
|
|
|
|
}) |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
function onDownload(row:matterInfo){ |
|
|
function onDownload(row:matterInfo){ |
|
|
ElMessageBox.confirm("确认下载此数据项?", "提示", { |
|
|
ElMessageBox.confirm("确认下载此数据项?", "提示", { |
|
|
confirmButtonText: "确定", |
|
|
confirmButtonText: "确定", |
|
|
@ -370,6 +384,15 @@ function restoreMatter(row:matterInfo){ |
|
|
}) |
|
|
}) |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
//处理个人空间上一级目录跳转问题 |
|
|
|
|
|
const gotoParentLevel=()=>{ |
|
|
|
|
|
const pnode=treeRef.value.getNode(currentNode.value.puuid) |
|
|
|
|
|
if(pnode){ |
|
|
|
|
|
onNodeClick(pnode.data, null as unknown as TreeNode, null, null) |
|
|
|
|
|
}else if(treeData.value.length>=0){ |
|
|
|
|
|
onNodeClick(treeData.value[0], null as unknown as TreeNode, null, null) |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
//加载目录文件列表 |
|
|
//加载目录文件列表 |
|
|
function onLoadMatterList(){ |
|
|
function onLoadMatterList(){ |
|
|
@ -803,6 +826,14 @@ function flushSpaceTree(uuid:string,data:matterTree[]){ |
|
|
spaceTreeRef.value.updateKeyChildren(uuid,data) |
|
|
spaceTreeRef.value.updateKeyChildren(uuid,data) |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
//处理共享空间上一级目录跳转问题,因为树组件都在manager容器内,共享空间需要触发-> |
|
|
|
|
|
const goSpaceParentLevel=(puuid:string)=>{ |
|
|
|
|
|
const pnode=spaceTreeRef.value.getNode(puuid) |
|
|
|
|
|
if(pnode){ |
|
|
|
|
|
onSpaceNodeClick(pnode.data,null,null,null) |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
//空间成员管理 |
|
|
//空间成员管理 |
|
|
function onAccessManage(){ |
|
|
function onAccessManage(){ |
|
|
dynamicVNode.value = h(sharePermission, { |
|
|
dynamicVNode.value = h(sharePermission, { |
|
|
@ -1038,10 +1069,17 @@ const handleSelectionChange = (val:matterInfo[]) => { |
|
|
<el-tabs v-model="tabName"> |
|
|
<el-tabs v-model="tabName"> |
|
|
<el-tab-pane name="main"> |
|
|
<el-tab-pane name="main"> |
|
|
<div v-if="PRIVATESPACE" class="app_container"> |
|
|
<div v-if="PRIVATESPACE" class="app_container"> |
|
|
<el-row v-if="modRecycling"><span style="margin: 12px 0px;font-weight: bold;font-size: 20px;"> 回收站 </span> </el-row> |
|
|
<el-row v-if="modRecycling"> |
|
|
|
|
|
<div style="display: flex;margin: 10px ;width: 97%;font-weight: bold;font-size: 20px;"> 回收站 |
|
|
|
|
|
<el-button style="margin:0 5px 0 auto;" @click="onClearDelsBatch">选中删除</el-button> |
|
|
|
|
|
</div> |
|
|
|
|
|
</el-row> |
|
|
<el-row v-else :gutter="24" style="margin: 12px 0px;"> |
|
|
<el-row v-else :gutter="24" style="margin: 12px 0px;"> |
|
|
<el-link v-if="currentNode.name!=='root'" @click="onNodeClick(treeData[0], null as unknown as TreeNode, null, null)"> |
|
|
<el-link v-if="currentNode.name!=='root'" @click="onNodeClick(treeData[0], null as unknown as TreeNode, null, null)"> |
|
|
<span style="font-weight: bold;margin-right: 5px;align-content: center;">根目录</span>/ |
|
|
<span style="font-weight: bold;margin-right: 5px;align-content: center;">根目录</span>/ |
|
|
|
|
|
</el-link> |
|
|
|
|
|
<el-link v-if="currentNode.name &¤tNode.name!=='root'" @click="gotoParentLevel"> |
|
|
|
|
|
<span style="font-weight: bold;margin: 0 5px;align-content: center;"> {{ '< 返回上一级' }} </span>/ |
|
|
</el-link> |
|
|
</el-link> |
|
|
<span style="font-weight: bold;margin:0 5px;align-content:center;">{{ currentNode.name }}</span> |
|
|
<span style="font-weight: bold;margin:0 5px;align-content:center;">{{ currentNode.name }}</span> |
|
|
|
|
|
|
|
|
@ -1071,8 +1109,8 @@ type="file" style="position: absolute;opacity: 0;width: 50px;" |
|
|
</div> |
|
|
</div> |
|
|
<el-button @click="createDir">新建目录</el-button> |
|
|
<el-button @click="createDir">新建目录</el-button> |
|
|
<span v-if="tabSelected.length>1" style="margin:12px"> |
|
|
<span v-if="tabSelected.length>1" style="margin:12px"> |
|
|
<el-button @click="onShareMatter()">分享</el-button> |
|
|
<!-- <el-button @click="onShareMatter()">分享</el-button> --> |
|
|
<el-button @click="onDelMatBatch">删除</el-button> |
|
|
<el-button @click="onDelMatBatch">批量删除</el-button> |
|
|
</span> |
|
|
</span> |
|
|
</el-col> |
|
|
</el-col> |
|
|
<el-button-group style="margin:0 50px 0 auto;"> |
|
|
<el-button-group style="margin:0 50px 0 auto;"> |
|
|
@ -1093,7 +1131,7 @@ v-if="modListOrGrild" |
|
|
:row-style ="() => ({ lineHeight: '36px' })" |
|
|
:row-style ="() => ({ lineHeight: '36px' })" |
|
|
@selection-change="handleSelectionChange" |
|
|
@selection-change="handleSelectionChange" |
|
|
@cell-mouse-enter="handleMouseEnter"> |
|
|
@cell-mouse-enter="handleMouseEnter"> |
|
|
<!-- <el-table-column type="selection" width="50" /> --> |
|
|
<el-table-column type="selection" width="50" /> |
|
|
<el-table-column width="450" property="name" label="文件名"> |
|
|
<el-table-column width="450" property="name" label="文件名"> |
|
|
<template #default="scope"> |
|
|
<template #default="scope"> |
|
|
<input v-if="scope.row.name===''" v-model="newdirName" type="text" autofocus placeholder="文件夹名" style="border:groove;height:30px;" @change="onCreateDir" /> |
|
|
<input v-if="scope.row.name===''" v-model="newdirName" type="text" autofocus placeholder="文件夹名" style="border:groove;height:30px;" @change="onCreateDir" /> |
|
|
@ -1171,11 +1209,11 @@ v-if="modListOrGrild" |
|
|
</div> |
|
|
</div> |
|
|
<div v-else class="app_container"> |
|
|
<div v-else class="app_container"> |
|
|
<space |
|
|
<space |
|
|
ref="spaceEleRef" :uid="uid" :raw-uid="rawUid" :list-or-grid="modListOrGrild" |
|
|
ref="spaceEleRef" :uid="uid" :raw-uid="rawUid" :list-or-grid="modListOrGrild" |
|
|
:spaceid="SpaceID.uuid" :roles="Departs" :spacename="SpaceID.name" :space-permit="SpaceID.permits" |
|
|
:spaceid="SpaceID.uuid" :roles="Departs" :spacename="SpaceID.name" :space-permit="SpaceID.permits" |
|
|
:owner="SpaceID.userUuid" :ismanager="SpaceID.manager" |
|
|
:owner="SpaceID.userUuid" :ismanager="SpaceID.manager" |
|
|
:office-host="officeHost" :site-host="siteHost" :api-u-r-l="apiURL" |
|
|
:officeHost="officeHost" :site-host="siteHost" :api-u-r-l="apiURL" |
|
|
:flush-space-tree="flushSpaceTree"></space> |
|
|
:flushSpaceTree="flushSpaceTree" :backToParent="goSpaceParentLevel"></space> |
|
|
</div> |
|
|
</div> |
|
|
</el-tab-pane> |
|
|
</el-tab-pane> |
|
|
<el-tab-pane name="logs"> |
|
|
<el-tab-pane name="logs"> |
|
|
|