|
@@ -1,5 +1,5 @@
|
|
|
<template>
|
|
|
- <div style="overflow: hidden;">
|
|
|
+ <div>
|
|
|
<div class="bigBox">
|
|
|
<div class="settingBox">
|
|
|
<!-- 设置盒子顶部搜索 -->
|
|
@@ -435,7 +435,7 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import { ref, toRaw } from 'vue'
|
|
|
+import { ref, toRaw, onMounted } from 'vue'
|
|
|
import myfile from '../../api/myfile/myfile'
|
|
|
import documents from '../../api/document/document'
|
|
|
import fileSpace from '../../api/filespace/fileSpace'
|
|
@@ -585,10 +585,10 @@ export default {
|
|
|
img: ImgFile.textbox,
|
|
|
name: "重命名"
|
|
|
},
|
|
|
- {
|
|
|
- img: ImgFile.goon,
|
|
|
- name: "发送"
|
|
|
- },
|
|
|
+ // {
|
|
|
+ // img: ImgFile.goon,
|
|
|
+ // name: "发送"
|
|
|
+ // },
|
|
|
{
|
|
|
img: ImgFile.share,
|
|
|
name: "分享"
|
|
@@ -614,7 +614,7 @@ export default {
|
|
|
name: "预览"
|
|
|
},
|
|
|
{
|
|
|
- img: ImgFile.share,
|
|
|
+ img: ImgFile.trash,
|
|
|
name: "删除"
|
|
|
}
|
|
|
])
|
|
@@ -727,13 +727,19 @@ export default {
|
|
|
newSpaceId.value = row.spaceId
|
|
|
documents.getALLdocument({ parentId: row.dirId - 0, spaceId: row.spaceId - 0 }).then(res => {
|
|
|
folderList.value = res.data
|
|
|
- if (res.code === 200) {
|
|
|
- myfile.getAllFileMenu({ dirId: res.data[0].dirId - 0 }).then(res => {
|
|
|
+ // if (res.code === 200) {
|
|
|
+ console.log("准备调用 myfile.getAllFileMenu");
|
|
|
+ myfile.getAllFileMenu({ parentId: res.data[0].dirId - 0 })
|
|
|
+ .then(res => {
|
|
|
+ console.log("myfile.getAllFileMenu 调用成功");
|
|
|
if (res.code === 200) {
|
|
|
- fileList.value = res.rows
|
|
|
+ fileList.value = res.rows;
|
|
|
}
|
|
|
})
|
|
|
- }
|
|
|
+ .catch(error => {
|
|
|
+ console.error("myfile.getAllFileMenu 调用失败:", error);
|
|
|
+ });
|
|
|
+ // }
|
|
|
})
|
|
|
this.selectedIndex = num
|
|
|
const newItem = {
|
|
@@ -761,7 +767,6 @@ export default {
|
|
|
// 文件名表格每一行点击事件
|
|
|
function handleRowClick(row) {
|
|
|
copyRow.value = row
|
|
|
- console.log('row = ', toRaw(row));
|
|
|
clickRowId.value = row.docId
|
|
|
copyDirId.value = row.dirId
|
|
|
copySpaceId.value = row.spaceId
|
|
@@ -851,10 +856,6 @@ export default {
|
|
|
transferModal.value = true
|
|
|
anyP.value = false
|
|
|
}
|
|
|
- function getSpace() {
|
|
|
-
|
|
|
- }
|
|
|
-
|
|
|
function createNewMenu(num) {
|
|
|
impNum.value = num
|
|
|
addBoser.value = true
|
|
@@ -935,11 +936,11 @@ export default {
|
|
|
// 确认上传
|
|
|
function sureUpload() {
|
|
|
if (fileArr.value.length > 0) {
|
|
|
- for (var i = 0; i <= fileArr.value.length; i++) {
|
|
|
+ for (var i = 1; i <= fileArr.value.length; i++) {
|
|
|
myfile.uploadFile({
|
|
|
spaceId: newSpaceId.value - 0,
|
|
|
dirId: newDirId.value - 0,
|
|
|
- file: fileArr.value[i]
|
|
|
+ file: fileArr.value[i - 1]
|
|
|
}).then(res => {
|
|
|
if (res.code === 200) {
|
|
|
ElMessage({
|
|
@@ -997,10 +998,6 @@ export default {
|
|
|
folderName.value = true
|
|
|
selectedBox.value = row.dirId
|
|
|
}
|
|
|
- // 重命名失焦事件
|
|
|
- function nameChange(row, index) {
|
|
|
-
|
|
|
- }
|
|
|
function getMenu(row, num) {
|
|
|
if (row.name === '删除') {
|
|
|
// 文件夹删除
|
|
@@ -1045,8 +1042,8 @@ export default {
|
|
|
let numP = 0
|
|
|
if (useSpace.value) {
|
|
|
numP = parseInt(useSpace.value / (allSpace.value * 1024) * 100)
|
|
|
- return numP
|
|
|
}
|
|
|
+ return numP
|
|
|
}
|
|
|
// 文件夹每行点击事件
|
|
|
function folderClick(row, list) {
|
|
@@ -1154,13 +1151,13 @@ export default {
|
|
|
}
|
|
|
// 判断id
|
|
|
function isId() {
|
|
|
- if (this.directoryId === '') {
|
|
|
- this.directoryId = 0
|
|
|
- this.getAllTop()
|
|
|
+ if (directoryId.value === '') {
|
|
|
+ directoryId.value = 0
|
|
|
+ getAllTop()
|
|
|
}
|
|
|
- if (this.folderId === '') {
|
|
|
- this.folderId = 0
|
|
|
- this.getAllTop()
|
|
|
+ if (folderId.value === '') {
|
|
|
+ folderId.value = 0
|
|
|
+ getAllTop()
|
|
|
}
|
|
|
}
|
|
|
// 中栏重命名
|
|
@@ -1184,138 +1181,134 @@ export default {
|
|
|
// console.log('close');
|
|
|
showPreview.value = false
|
|
|
// 子传父的数据
|
|
|
- function getChildren(data) {
|
|
|
- fileTrees.value = data
|
|
|
-
|
|
|
- }
|
|
|
- return {
|
|
|
- allBag,
|
|
|
- folderList,//文件夹的数据
|
|
|
- fileList,//文件夹的数据
|
|
|
- searchFire,//搜索文件的model
|
|
|
- changeFile,//切换右侧视图的file
|
|
|
- menuList,//右侧切换
|
|
|
- tableChange,//改变class点击事件
|
|
|
- selectedIndex,//当前选中下标
|
|
|
- shotdown,//筛选出当前数据
|
|
|
- useMenu,
|
|
|
- arrorMenu,
|
|
|
- blueLeft,//返回
|
|
|
- grayRight,//前进
|
|
|
- squre,//视图切换
|
|
|
- sort,//排序
|
|
|
- folder,
|
|
|
- files,
|
|
|
- handleRowClick,
|
|
|
- askApply,//申请扩容
|
|
|
- askTo,
|
|
|
- sureAsk,
|
|
|
- askNum,
|
|
|
- askTalk,
|
|
|
- cliCC,
|
|
|
- mouseCli,//文件点击弹框
|
|
|
- chooseSet,
|
|
|
- transferModal,
|
|
|
- trandata,
|
|
|
- tranvalue,
|
|
|
- anyP,
|
|
|
- chooseSet1,
|
|
|
- getSpace,//获取内存空间
|
|
|
- fileMenu,
|
|
|
- addBoser,
|
|
|
- boserForm,
|
|
|
- createNewMenu,
|
|
|
- sureAddBoser,
|
|
|
- // delBoser,
|
|
|
- clickRowId,
|
|
|
- addFile,
|
|
|
- createNewFile,
|
|
|
- fileForm,
|
|
|
- sureAddFile,
|
|
|
- // fileUpload,
|
|
|
- getImage,//筛选文件类型
|
|
|
- handleSelectionChange,
|
|
|
- handleSelectionChange1,
|
|
|
- selectedBox,//重命名相关
|
|
|
- restName,//重命名相关
|
|
|
- newName,//重命名相关
|
|
|
- nameChange,
|
|
|
- getMenu,
|
|
|
- folderId,
|
|
|
- fileId,
|
|
|
- // getAllMiddle,//拿到所有空间信息
|
|
|
- delName,//删除空间信息
|
|
|
- useSpace,//使用空间
|
|
|
- allSpace,//总空间
|
|
|
- percent,
|
|
|
- arrowClick,
|
|
|
- uploadModal,
|
|
|
- sureUpload,
|
|
|
- onSuccess,
|
|
|
- fileArr,
|
|
|
- directoryId,
|
|
|
- folderClick,
|
|
|
- copyDirId,//复制移动需要的↓
|
|
|
- copyDocId,
|
|
|
- copySpaceId,
|
|
|
- copyFileId,
|
|
|
- copyFileName,
|
|
|
- copyFileSize,
|
|
|
- copyFileType,
|
|
|
- sureChangeName,//文件重命名
|
|
|
- fileNameChange,//文件重命名模态框
|
|
|
- nameForm,
|
|
|
- getAllUser,//获取所有用户
|
|
|
- allTreeProps,//树形控件需要显示键名
|
|
|
- allTreeData,//树形控件数据
|
|
|
- allTreeChange,
|
|
|
- sureShare,
|
|
|
- openTree,
|
|
|
- chooseTagData,
|
|
|
- handleClose,
|
|
|
- collectImg,//收藏小星星
|
|
|
- fileCollect,
|
|
|
- collectForm,
|
|
|
- sureCollect,
|
|
|
- getAllCollect,//获取所有收藏文件夹
|
|
|
- collectList,//文件收藏表
|
|
|
- createTag,
|
|
|
- tagCollect,
|
|
|
- tagBlur,
|
|
|
- newTag,
|
|
|
- collectChange,
|
|
|
- sortNum,
|
|
|
- needBag,
|
|
|
- isId,
|
|
|
- editOnline,//在线编辑
|
|
|
- copyParentId,
|
|
|
- folderName,
|
|
|
- sureFolderName,
|
|
|
- copyRow,
|
|
|
- getAllTop,
|
|
|
- spaceValue,
|
|
|
- spaceSelect,
|
|
|
- newDirId,
|
|
|
- newSpaceId,
|
|
|
- showPreview,//控制图片预览
|
|
|
- closeImgPreview,//关闭预览事件
|
|
|
- previewData,//预览文件数据
|
|
|
- fileTrees,
|
|
|
- getChildren,//子传父
|
|
|
- copyOrMove,
|
|
|
- impDirId,
|
|
|
- impNum,
|
|
|
- impSpaceId
|
|
|
- }
|
|
|
}
|
|
|
- },
|
|
|
- created() {
|
|
|
- this.getAllTop()
|
|
|
- this.getSpace()
|
|
|
- this.getAllUser()
|
|
|
- this.getAllCollect()
|
|
|
- this.isId()
|
|
|
+ function getChildren(data) {
|
|
|
+ fileTrees.value = data
|
|
|
|
|
|
+ }
|
|
|
+ onMounted(() => {
|
|
|
+ getAllTop()
|
|
|
+ getAllUser()
|
|
|
+ getAllCollect()
|
|
|
+ isId()
|
|
|
+ })
|
|
|
+ return {
|
|
|
+ allBag,
|
|
|
+ folderList,//文件夹的数据
|
|
|
+ fileList,//文件夹的数据
|
|
|
+ searchFire,//搜索文件的model
|
|
|
+ changeFile,//切换右侧视图的file
|
|
|
+ menuList,//右侧切换
|
|
|
+ tableChange,//改变class点击事件
|
|
|
+ selectedIndex,//当前选中下标
|
|
|
+ shotdown,//筛选出当前数据
|
|
|
+ useMenu,
|
|
|
+ arrorMenu,
|
|
|
+ blueLeft,//返回
|
|
|
+ grayRight,//前进
|
|
|
+ squre,//视图切换
|
|
|
+ sort,//排序
|
|
|
+ folder,
|
|
|
+ files,
|
|
|
+ handleRowClick,
|
|
|
+ askApply,//申请扩容
|
|
|
+ askTo,
|
|
|
+ sureAsk,
|
|
|
+ askNum,
|
|
|
+ askTalk,
|
|
|
+ cliCC,
|
|
|
+ mouseCli,//文件点击弹框
|
|
|
+ chooseSet,
|
|
|
+ transferModal,
|
|
|
+ trandata,
|
|
|
+ tranvalue,
|
|
|
+ anyP,
|
|
|
+ chooseSet1,
|
|
|
+ fileMenu,
|
|
|
+ addBoser,
|
|
|
+ boserForm,
|
|
|
+ createNewMenu,
|
|
|
+ sureAddBoser,
|
|
|
+ // delBoser,
|
|
|
+ clickRowId,
|
|
|
+ addFile,
|
|
|
+ createNewFile,
|
|
|
+ fileForm,
|
|
|
+ sureAddFile,
|
|
|
+ // fileUpload,
|
|
|
+ getImage,//筛选文件类型
|
|
|
+ handleSelectionChange,
|
|
|
+ handleSelectionChange1,
|
|
|
+ selectedBox,//重命名相关
|
|
|
+ restName,//重命名相关
|
|
|
+ newName,//重命名相关
|
|
|
+ getMenu,
|
|
|
+ folderId,
|
|
|
+ fileId,
|
|
|
+ // getAllMiddle,//拿到所有空间信息
|
|
|
+ delName,//删除空间信息
|
|
|
+ useSpace,//使用空间
|
|
|
+ allSpace,//总空间
|
|
|
+ percent,
|
|
|
+ arrowClick,
|
|
|
+ uploadModal,
|
|
|
+ sureUpload,
|
|
|
+ onSuccess,
|
|
|
+ fileArr,
|
|
|
+ directoryId,
|
|
|
+ folderClick,
|
|
|
+ copyDirId,//复制移动需要的↓
|
|
|
+ copyDocId,
|
|
|
+ copySpaceId,
|
|
|
+ copyFileId,
|
|
|
+ copyFileName,
|
|
|
+ copyFileSize,
|
|
|
+ copyFileType,
|
|
|
+ sureChangeName,//文件重命名
|
|
|
+ fileNameChange,//文件重命名模态框
|
|
|
+ nameForm,
|
|
|
+ getAllUser,//获取所有用户
|
|
|
+ allTreeProps,//树形控件需要显示键名
|
|
|
+ allTreeData,//树形控件数据
|
|
|
+ allTreeChange,
|
|
|
+ sureShare,
|
|
|
+ openTree,
|
|
|
+ chooseTagData,
|
|
|
+ handleClose,
|
|
|
+ collectImg,//收藏小星星
|
|
|
+ fileCollect,
|
|
|
+ collectForm,
|
|
|
+ sureCollect,
|
|
|
+ getAllCollect,//获取所有收藏文件夹
|
|
|
+ collectList,//文件收藏表
|
|
|
+ createTag,
|
|
|
+ tagCollect,
|
|
|
+ tagBlur,
|
|
|
+ newTag,
|
|
|
+ collectChange,
|
|
|
+ sortNum,
|
|
|
+ needBag,
|
|
|
+ isId,
|
|
|
+ editOnline,//在线编辑
|
|
|
+ copyParentId,
|
|
|
+ folderName,
|
|
|
+ sureFolderName,
|
|
|
+ copyRow,
|
|
|
+ getAllTop,
|
|
|
+ spaceValue,
|
|
|
+ spaceSelect,
|
|
|
+ newDirId,
|
|
|
+ newSpaceId,
|
|
|
+ showPreview,//控制图片预览
|
|
|
+ closeImgPreview,//关闭预览事件
|
|
|
+ previewData,//预览文件数据
|
|
|
+ fileTrees,
|
|
|
+ getChildren,//子传父
|
|
|
+ copyOrMove,
|
|
|
+ impDirId,
|
|
|
+ impNum,
|
|
|
+ impSpaceId
|
|
|
+ }
|
|
|
},
|
|
|
watch: {
|
|
|
},
|
|
@@ -1338,6 +1331,7 @@ p {
|
|
|
.bigBox {
|
|
|
display: flex;
|
|
|
justify-content: flex-start;
|
|
|
+ overflow: hidden;
|
|
|
}
|
|
|
|
|
|
.settingBox {
|
|
@@ -1484,7 +1478,7 @@ p {
|
|
|
|
|
|
.setCli {
|
|
|
width: 156px;
|
|
|
- height: 400px;
|
|
|
+ height: 380px;
|
|
|
position: absolute;
|
|
|
top: -70px;
|
|
|
left: 300px;
|
|
@@ -1497,7 +1491,7 @@ p {
|
|
|
|
|
|
.setCli1 {
|
|
|
width: 156px;
|
|
|
- height: 400px;
|
|
|
+ height: 380px;
|
|
|
position: absolute;
|
|
|
top: 185px;
|
|
|
left: 155px;
|