Browse Source

Merge branch 'space2'

lwx_v28
han2015 3 days ago
parent
commit
6b84834494
  1. 20
      src/api/doc/index.ts
  2. 2
      src/views/doc/logpanel.vue
  3. 64
      src/views/doc/manage.vue
  4. 2
      src/views/doc/share.vue
  5. 24
      src/views/doc/space.vue

20
src/api/doc/index.ts

@ -136,7 +136,7 @@ export function postCreateDir(uid:string,data?: createDir){
*/
export function postDelMatter(uid:string,data?: any){
return request({
url: '/hxpan/api/matter/delete',
url: '/hxpan/api/matter/soft/delete',
method: 'post',
headers: {
'Identifier':uid,
@ -145,10 +145,28 @@ export function postDelMatter(uid:string,data?: any){
data: data
});
}
/**
*
*/
export function postDelMatBatch(uid:string,data?: any){
return request({
url: '/hxpan/api/matter/soft/delete/batch',
method: 'post',
headers: {
'Identifier':uid,
'Content-Type': 'application/x-www-form-urlencoded'
},
data: data
});
}
/**
*
*/
export function postClearDelsBatch(uid:string,data?: any){
return request({
url: '/hxpan/api/matter/delete/batch',
method: 'post',

2
src/views/doc/logpanel.vue

@ -1,7 +1,7 @@
<!--
@ 作者: han2015
@ 时间: 2025-05-12 15:39:13
@ 备注: 档管理组
@ 备注: 文件上传错误日志
-->
<script lang="ts" setup>
import { getUploadErrList,ErrUploadLog} from "@/api/doc/type"

64
src/views/doc/manage.vue

@ -7,7 +7,7 @@
import { getExpirTime, getFileIcon, readableSize,fileType} from "./tools"
import sharePermission from './sharePermission.vue';
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"
import { matterPage,matterInfo,respCreateShare,matterTree, doFileUpload,matterPermit} from "@/api/doc/type"
import { h } from 'vue'
@ -178,7 +178,7 @@ function onShareMatter(row?:matterInfo){
}
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({
title: '分享详情',
customStyle: { '--el-messagebox-width':'800px',padding:'40px'},
@ -202,7 +202,7 @@ function onDelNodeMatter(row:matterInfo){
//
function onDelMatter(row:matterInfo,dir?:boolean){
if (row.uuid){
ElMessageBox.confirm(`确认删除( ${row.name}) ?删除后不可恢复!取消则放弃删除操作。`, "警告", {
ElMessageBox.confirm(`确认删除( ${row.name}) 到回收站?取消则放弃删除操作。`, "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
@ -217,14 +217,14 @@ function onDelMatter(row:matterInfo,dir?:boolean){
}
currentNode.value.uuid = row.puuid ?? "root"
}
onLoadMatterList()
onLoadMatterList()
})
})
}
}
function onDelMatBatch(){
ElMessageBox.confirm("确认删除选择的内容?", "警告", {
ElMessageBox.confirm("确认删除选择的内容到回收站?", "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
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){
ElMessageBox.confirm("确认下载此数据项?", "提示", {
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(){
@ -803,6 +826,14 @@ function flushSpaceTree(uuid:string,data:matterTree[]){
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(){
dynamicVNode.value = h(sharePermission, {
@ -1038,10 +1069,17 @@ const handleSelectionChange = (val:matterInfo[]) => {
<el-tabs v-model="tabName">
<el-tab-pane name="main">
<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-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 &&currentNode.name!=='root'" @click="gotoParentLevel">
<span style="font-weight: bold;margin: 0 5px;align-content: center;"> {{ '< 返回上一级' }} </span>/
</el-link>
<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>
<el-button @click="createDir">新建目录</el-button>
<span v-if="tabSelected.length>1" style="margin:12px">
<el-button @click="onShareMatter()">分享</el-button>
<el-button @click="onDelMatBatch">删除</el-button>
<!-- <el-button @click="onShareMatter()">分享</el-button> -->
<el-button @click="onDelMatBatch">批量删除</el-button>
</span>
</el-col>
<el-button-group style="margin:0 50px 0 auto;">
@ -1093,7 +1131,7 @@ v-if="modListOrGrild"
:row-style ="() => ({ lineHeight: '36px' })"
@selection-change="handleSelectionChange"
@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="文件名">
<template #default="scope">
<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 v-else class="app_container">
<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"
:owner="SpaceID.userUuid" :ismanager="SpaceID.manager"
:office-host="officeHost" :site-host="siteHost" :api-u-r-l="apiURL"
:flush-space-tree="flushSpaceTree"></space>
:officeHost="officeHost" :site-host="siteHost" :api-u-r-l="apiURL"
:flushSpaceTree="flushSpaceTree" :backToParent="goSpaceParentLevel"></space>
</div>
</el-tab-pane>
<el-tab-pane name="logs">

2
src/views/doc/share.vue

@ -43,7 +43,7 @@ const dynamicVNode = ref<VNode | null>(null) //permission 组件的父组件
function showShareMessage(row:{uuid:string,code:string,name:string,expireTime:string}){
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({
title: '分享详情',
customStyle: { '--el-messagebox-width':'800px',padding:'40px'},

24
src/views/doc/space.vue

@ -78,7 +78,8 @@ const props = withDefaults(defineProps<{
ismanager:boolean,
spacePermit:matterPermit,
flushSpaceTree:(uuid:string,data:matterTree[])=>void
flushSpaceTree:(uuid:string,data:matterTree[])=>void,
backToParent:(uuid:string)=>void
}>(),{})
//
@ -310,7 +311,16 @@ function onSpaceMatterRename(row:matterInfo){
})
}
//------------------------------------------
//------------------------------------------
const goBackToParent=(puuid:string)=>{
if(puuid=="root"){
handleDoubleClick(breadcrumbList.value[0])
return
}
props.backToParent(puuid)
}
// @cell-dblclick="handleDoubleClick"
//
function handleDoubleClick(row:matterInfo,ind?:number){
@ -371,6 +381,9 @@ function handleDoubleClick(row:matterInfo,ind?:number){
function handleMouseEnter(row:any){
currentHoverRow.value=row.name
}
//------------------------------------------------------------------------------------
//----------------------------------------------------------------------------------
//
function handleSingleUpload(response:any){
handleAiUpload(response.data)
@ -553,7 +566,7 @@ function handleAiDelete(info:matterInfo){
//
const onShareSpaceFile=(row:matterInfo)=>{
const str=btoa(encodeURIComponent(`${props.spaceid}|${row.puuid}|${row.name}`))
let _shareURL=`${siteHost}/#/doc/manage?s_token=${str}`
let _shareURL=`${siteHost}/#/doc/manage?s_token=${str}&分享=${row.name}`
ElMessageBox({
title: '文件分享:',
customStyle: { '--el-messagebox-width':'800px',padding:'40px'},
@ -671,9 +684,12 @@ function isOwner(){
<el-breadcrumb-item
v-for="(item,index) in breadcrumbList"
:key="index" @click="handleDoubleClick(item,index)">
<span style="font-weight: bold;cursor: pointer;">{{ item.name }}</span>
<span style="font-weight: bold;cursor: pointer;">{{ item.name }} </span>
</el-breadcrumb-item>
</el-breadcrumb>
<el-link v-if="currentNode.uuid!=='root'" @click="goBackToParent(currentNode.puuid)">
<span style="font-weight: bold;margin: 0 5px;align-content: center;">/ {{ '< 返回上一级' }}</span>
</el-link>
<span v-if="currentNode.uuid!='root'" style="font-weight: bold;margin:0 5px;align-content:center;">/ {{ currentNode.name }}</span>
<el-col :span="6" class="search">

Loading…
Cancel
Save