|
|
@ -16,10 +16,12 @@ import { |
|
|
Delete,View,Download,Share,Search,Edit, |
|
|
Delete,View,Download,Share,Search,Edit, |
|
|
Avatar,Plus,Grid,List, |
|
|
Avatar,Plus,Grid,List, |
|
|
Setting, |
|
|
Setting, |
|
|
|
|
|
Bell, |
|
|
} from '@element-plus/icons-vue' |
|
|
} from '@element-plus/icons-vue' |
|
|
import {ElSelect,ElOption, ElText,ElInput,TableInstance,ElMessage,UploadFile, |
|
|
import {ElSelect,ElOption, ElText,ElInput,TableInstance,ElMessage,UploadFile, |
|
|
UploadFiles,ElPagination,ElTree,TreeNode,ElDropdown,ElDropdownItem} from "element-plus"; |
|
|
UploadFiles,ElPagination,ElTree,TreeNode,ElDropdown,ElDropdownItem} from "element-plus"; |
|
|
import preview from './preview.vue'; |
|
|
import preview from './preview.vue'; |
|
|
|
|
|
import uploadlog from './uploadlog.vue'; |
|
|
import space from './space.vue'; |
|
|
import space from './space.vue'; |
|
|
import spacePermission from './spacePermission.vue'; |
|
|
import spacePermission from './spacePermission.vue'; |
|
|
import SvgIcon from "@/components/SvgIcon/index.vue"; |
|
|
import SvgIcon from "@/components/SvgIcon/index.vue"; |
|
|
@ -74,6 +76,7 @@ const modRecycling=ref(false) |
|
|
//进度条 |
|
|
//进度条 |
|
|
const percentage=ref(0) |
|
|
const percentage=ref(0) |
|
|
const onprogress=ref(false) |
|
|
const onprogress=ref(false) |
|
|
|
|
|
const tabName = ref('logs') |
|
|
|
|
|
|
|
|
const Departs = computed(() => { |
|
|
const Departs = computed(() => { |
|
|
return `${'p0'+userStore.userInfoCont.userId},${userStore.userInfoCont.company},${userStore.userInfoCont.department},${userStore.userInfoCont.organization}` |
|
|
return `${'p0'+userStore.userInfoCont.userId},${userStore.userInfoCont.company},${userStore.userInfoCont.department},${userStore.userInfoCont.organization}` |
|
|
@ -294,10 +297,25 @@ function onSearchFile(name?:string){ |
|
|
|
|
|
|
|
|
//获取回收站文件 |
|
|
//获取回收站文件 |
|
|
function showRecycling(){ |
|
|
function showRecycling(){ |
|
|
|
|
|
tabName.value="main" |
|
|
modRecycling.value=true |
|
|
modRecycling.value=true |
|
|
currentNode.value={} //清空当前节点 |
|
|
currentNode.value={} //清空当前节点 |
|
|
if(!PRIVATESPACE.value) { //共享空间模式要切换到个人空间 |
|
|
if(!PRIVATESPACE.value) { //共享空间模式要切换到个人空间 |
|
|
PRIVATESPACE.value=true |
|
|
PRIVATESPACE.value=true |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
getRecyclingList(uid,{}).then((resp)=>{ |
|
|
|
|
|
paginInfo.value={total:1,page:0} |
|
|
|
|
|
matterList.value=resp.data |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
//获取上传日志 |
|
|
|
|
|
function showlogs(){ |
|
|
|
|
|
modRecycling.value=true |
|
|
|
|
|
currentNode.value={} //清空当前节点 |
|
|
|
|
|
if(!PRIVATESPACE.value) { //共享空间模式要切换到个人空间 |
|
|
|
|
|
PRIVATESPACE.value=true |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
getRecyclingList(uid,{}).then((resp)=>{ |
|
|
getRecyclingList(uid,{}).then((resp)=>{ |
|
|
@ -305,6 +323,7 @@ function showRecycling(){ |
|
|
matterList.value=resp.data |
|
|
matterList.value=resp.data |
|
|
}) |
|
|
}) |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
//恢复删除文件 |
|
|
//恢复删除文件 |
|
|
function restoreMatter(row:matterInfo){ |
|
|
function restoreMatter(row:matterInfo){ |
|
|
if (row.uuid){ |
|
|
if (row.uuid){ |
|
|
@ -431,6 +450,7 @@ function onNodeExpand(node: TreeNode, resolve: (data: matterTree[]) => void, rej |
|
|
} |
|
|
} |
|
|
//树节点单击 |
|
|
//树节点单击 |
|
|
function onNodeClick(data:matterTree,node:TreeNode,self:any,env:any){ |
|
|
function onNodeClick(data:matterTree,node:TreeNode,self:any,env:any){ |
|
|
|
|
|
tabName.value="main" |
|
|
modRecycling.value=false |
|
|
modRecycling.value=false |
|
|
if(!PRIVATESPACE.value) { |
|
|
if(!PRIVATESPACE.value) { |
|
|
PRIVATESPACE.value=true |
|
|
PRIVATESPACE.value=true |
|
|
@ -561,11 +581,16 @@ async function onCustomUpload(e:Event){ |
|
|
}) |
|
|
}) |
|
|
percentage.value = Number(((index + 1) / count).toPrecision(2)) * 100 |
|
|
percentage.value = Number(((index + 1) / count).toPrecision(2)) * 100 |
|
|
} |
|
|
} |
|
|
if(result!="") alert(result) |
|
|
if(result!=""){ |
|
|
|
|
|
dynamicVNode.value=h(uploadlog,{ |
|
|
|
|
|
content:result |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
onLoadMatterList() //刷新 |
|
|
onLoadMatterList() //刷新 |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
async function handleSingleFile(ff:File){ |
|
|
async function handleSingleFile(ff:File){ |
|
|
const fields=new FormData() |
|
|
const fields=new FormData() |
|
|
fields.append("userUuid",uploadFormData.value.userUuid) |
|
|
fields.append("userUuid",uploadFormData.value.userUuid) |
|
|
@ -575,7 +600,7 @@ async function handleSingleFile(ff:File){ |
|
|
const res = await doFileUpload(fields,'/hxpan/api/matter/upload') |
|
|
const res = await doFileUpload(fields,'/hxpan/api/matter/upload') |
|
|
if(res.code!=200){ |
|
|
if(res.code!=200){ |
|
|
console.log(ff.name+"上传失败! ") |
|
|
console.log(ff.name+"上传失败! ") |
|
|
throw new Error(ff.name+"上传失败!\n ") |
|
|
throw new Error(ff.name+"上传失败!<br> ") |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
@ -591,11 +616,15 @@ async function uploadFolder(e:Event){ |
|
|
const f = files[index] |
|
|
const f = files[index] |
|
|
await handleFolderFile(f).catch((err)=>{ |
|
|
await handleFolderFile(f).catch((err)=>{ |
|
|
console.log(err) |
|
|
console.log(err) |
|
|
result+= (f as File).name+"上传失败\n" |
|
|
result+= (f as File).name+"上传失败<br>" |
|
|
}) |
|
|
}) |
|
|
percentage.value = Number(((index + 1) / count).toPrecision(2)) * 100 |
|
|
percentage.value = Number(((index + 1) / count).toPrecision(2)) * 100 |
|
|
} |
|
|
} |
|
|
if(result!="") alert(result) |
|
|
if(result!=""){ |
|
|
|
|
|
dynamicVNode.value=h(uploadlog,{ |
|
|
|
|
|
content:result |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
onLoadMatterList() //刷新 |
|
|
onLoadMatterList() //刷新 |
|
|
} |
|
|
} |
|
|
@ -622,7 +651,7 @@ async function handleFolderFile(option:File){ |
|
|
puuid=newnodes[0].uuid |
|
|
puuid=newnodes[0].uuid |
|
|
}else{ |
|
|
}else{ |
|
|
console.log(_path+"上传失败! ") |
|
|
console.log(_path+"上传失败! ") |
|
|
throw new Error(_path +" 上传失败!\n ") |
|
|
throw new Error(_path +" 上传失败!<br> ") |
|
|
return |
|
|
return |
|
|
} |
|
|
} |
|
|
}else{ |
|
|
}else{ |
|
|
@ -636,7 +665,7 @@ async function handleFolderFile(option:File){ |
|
|
const res = await doFileUpload(fields,'/hxpan/api/matter/upload') |
|
|
const res = await doFileUpload(fields,'/hxpan/api/matter/upload') |
|
|
if(res.code!=200){ |
|
|
if(res.code!=200){ |
|
|
console.log(_path+"上传失败! ") |
|
|
console.log(_path+"上传失败! ") |
|
|
throw new Error(_path +" 上传失败!\n ") |
|
|
throw new Error(_path +" 上传失败!<br> ") |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
@ -685,6 +714,7 @@ function handleSigLoadErr(error: Error, uploadFile: UploadFile, uploadFiles:Uplo |
|
|
|
|
|
|
|
|
//-------------------space feature--------------------- |
|
|
//-------------------space feature--------------------- |
|
|
function onNewSpace(){ |
|
|
function onNewSpace(){ |
|
|
|
|
|
tabName.value="main" |
|
|
const newname=ref("") |
|
|
const newname=ref("") |
|
|
ElMessageBox({ |
|
|
ElMessageBox({ |
|
|
title:"请输入空间名称", |
|
|
title:"请输入空间名称", |
|
|
@ -709,6 +739,7 @@ function onNewSpace(){ |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
function onSpaceNodeClick(data:matterTree,node:TreeNode,self:any,env:any){ |
|
|
function onSpaceNodeClick(data:matterTree,node:TreeNode,self:any,env:any){ |
|
|
|
|
|
tabName.value="main" |
|
|
if(PRIVATESPACE.value) { //如果打开了个人空间,突然点击共享空间,要及时切换状态 |
|
|
if(PRIVATESPACE.value) { //如果打开了个人空间,突然点击共享空间,要及时切换状态 |
|
|
PRIVATESPACE.value=false |
|
|
PRIVATESPACE.value=false |
|
|
modRecycling.value=false |
|
|
modRecycling.value=false |
|
|
@ -835,6 +866,7 @@ onMounted(() => { |
|
|
// {name:'个人空间',uuid:'root',dir:false}, |
|
|
// {name:'个人空间',uuid:'root',dir:false}, |
|
|
// currentNode.value.uuid |
|
|
// currentNode.value.uuid |
|
|
// ) |
|
|
// ) |
|
|
|
|
|
|
|
|
currentNode.value={uuid:"root"} |
|
|
currentNode.value={uuid:"root"} |
|
|
//加载我的空间列表 |
|
|
//加载我的空间列表 |
|
|
getMySpaces(uid,{roles:Departs.value}).then((resp)=>{ |
|
|
getMySpaces(uid,{roles:Departs.value}).then((resp)=>{ |
|
|
@ -927,11 +959,16 @@ const handleSelectionChange = (val:matterInfo[]) => { |
|
|
</div> |
|
|
</div> |
|
|
</template> |
|
|
</template> |
|
|
</el-tree> |
|
|
</el-tree> |
|
|
|
|
|
<div class="area_header" @click="tabName='logs'"> |
|
|
|
|
|
<el-icon :size="20"><Bell /></el-icon><span class="area_name" > 上传日志</span> |
|
|
|
|
|
</div> |
|
|
<div class="area_header" @click="showRecycling"> |
|
|
<div class="area_header" @click="showRecycling"> |
|
|
<el-icon :size="20"><Delete /></el-icon><span class="area_name" > 回收站</span> |
|
|
<el-icon :size="20"><Delete /></el-icon><span class="area_name" > 回收站</span> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
|
|
|
|
|
|
|
|
|
<el-tabs v-model="tabName"> |
|
|
|
|
|
<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"><span style="margin: 12px 0px;font-weight: bold;font-size: 20px;"> 回收站 </span> </el-row> |
|
|
<el-row v-else :gutter="24" style="margin: 12px 0px;"> |
|
|
<el-row v-else :gutter="24" style="margin: 12px 0px;"> |
|
|
@ -1066,10 +1103,16 @@ const handleSelectionChange = (val:matterInfo[]) => { |
|
|
:officeHost="officeHost" :site-host="siteHost" :api-u-r-l="apiURL" |
|
|
:officeHost="officeHost" :site-host="siteHost" :api-u-r-l="apiURL" |
|
|
:flushSpaceTree="flushSpaceTree"></space> |
|
|
:flushSpaceTree="flushSpaceTree"></space> |
|
|
</div> |
|
|
</div> |
|
|
|
|
|
</el-tab-pane> |
|
|
|
|
|
<el-tab-pane name="logs"> |
|
|
|
|
|
Comming soon.... |
|
|
|
|
|
</el-tab-pane> |
|
|
|
|
|
</el-tabs> |
|
|
|
|
|
|
|
|
<div v-if="dynamicVNode"> |
|
|
<div v-if="dynamicVNode"> |
|
|
<component :is="dynamicVNode" /> |
|
|
<component :is="dynamicVNode" /> |
|
|
</div> |
|
|
</div> |
|
|
|
|
|
|
|
|
</div> |
|
|
</div> |
|
|
</template> |
|
|
</template> |
|
|
|
|
|
|
|
|
@ -1117,7 +1160,6 @@ const handleSelectionChange = (val:matterInfo[]) => { |
|
|
margin: 0 5px 0 auto; |
|
|
margin: 0 5px 0 auto; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.app_container { |
|
|
.app_container { |
|
|
padding: 10px 30px 0px 30px; |
|
|
padding: 10px 30px 0px 30px; |
|
|
height: calc(100% - 10px); |
|
|
height: calc(100% - 10px); |
|
|
@ -1202,4 +1244,8 @@ const handleSelectionChange = (val:matterInfo[]) => { |
|
|
:root{ |
|
|
:root{ |
|
|
--el-index-normal:auto; |
|
|
--el-index-normal:auto; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.el-tabs__header{ |
|
|
|
|
|
display: none; |
|
|
|
|
|
} |
|
|
</style> |
|
|
</style> |