|
|
@@ -134,9 +134,9 @@
|
|
|
<!-- 展示文件夹盒子 -->
|
|
|
<!-- 文件夹 -->
|
|
|
<div class="detailBox file-jia" @click="mouseClick">
|
|
|
- <el-collapse v-model="folder" accordion class="collapseSell">
|
|
|
+ <el-collapse v-model="folder">
|
|
|
<el-collapse-item title="文件夹" name="1" class="custom-collapse-item">
|
|
|
- <el-table v-if="folderGrid" :data="folderList" style="width: 100%"
|
|
|
+ <el-table v-if="folderGrid" :data="folderList" style="width: 100%" :scrollbar-always-on="true"
|
|
|
@selection-change="handleSelectionChange1" :single-select="true" @row-click="folderClick"
|
|
|
@row-contextmenu="folderRClick" ref="taskTableRef">
|
|
|
<el-table-column type="selection" width="55" />
|
|
|
@@ -192,9 +192,9 @@
|
|
|
</div>
|
|
|
<!-- 文件 -->
|
|
|
<div class="fileTable">
|
|
|
- <el-collapse v-model="files" accordion class="collapse" style="height: 200px;">
|
|
|
+ <el-collapse v-model="files" >
|
|
|
<el-collapse-item title="文件" name="2" class="">
|
|
|
- <el-table v-if="fileGrid" :data="fileList" style="width: 100%;position: relative;"
|
|
|
+ <el-table v-if="fileGrid" :data="fileList" height="250" :scrollbar-always-on="true" style="width: 100%;position: relative;"
|
|
|
@row-contextmenu="handleRowClick" @selection-change="handleSelectionChange"
|
|
|
@row-click="mouseClick" :default-sort="{ prop: 'createTime', order: 'descending' }">
|
|
|
<el-table-column type="selection" width="55" />
|
|
|
@@ -270,7 +270,7 @@
|
|
|
<!-- 文件上传 -->
|
|
|
<div>
|
|
|
<el-dialog v-model="uploadModal" title="文件上传" width="30%">
|
|
|
- <el-upload class="upload-demo" drag :http-request="onSuccess" multiple>
|
|
|
+ <el-upload class="upload-demo" :file-list="fileArr" drag :http-request="onSuccess" multiple>
|
|
|
<el-icon class="el-icon--upload"><upload-filled /></el-icon>
|
|
|
<div class="el-upload__text">拖入或<em>点击上传</em></div>
|
|
|
<template #tip>
|
|
|
@@ -424,8 +424,7 @@ export default {
|
|
|
let xz = ref(0)
|
|
|
let yz = ref(0)
|
|
|
const fileUserTreeData = reactive({ data: {} });
|
|
|
- let fileList = ref([
|
|
|
- ])
|
|
|
+ let fileList = ref()
|
|
|
let menuList = ref([
|
|
|
{
|
|
|
name: "我的空间",
|
|
|
@@ -553,6 +552,7 @@ export default {
|
|
|
const topPath = ref()//顶部路径
|
|
|
const isFolder = ref('N') //是否为文件夹
|
|
|
const clickRow = ref()//当前右键的行数据
|
|
|
+ const backFolder = ref()//上一级的文件夹
|
|
|
// 获取文件夹,中栏,文件
|
|
|
function getAllTop() {
|
|
|
documents.getTop(3).then(res => {
|
|
|
@@ -587,7 +587,9 @@ export default {
|
|
|
})
|
|
|
}
|
|
|
}
|
|
|
+ // console.log('fileList.value',fileList.value);
|
|
|
}
|
|
|
+ // console.log('not200');
|
|
|
})
|
|
|
})
|
|
|
}
|
|
|
@@ -990,11 +992,12 @@ export default {
|
|
|
// 上一级dirId就是下一级的parentId
|
|
|
// 判断是点击打开还是右键菜单打开
|
|
|
if(row){
|
|
|
+ backFolder.value = thisFolder.value
|
|
|
thisFolder.value = row;
|
|
|
}else{
|
|
|
row =clickRow.value
|
|
|
}
|
|
|
- console.log('row', toRaw(row));
|
|
|
+ console.log('row1', toRaw(row));
|
|
|
topPath.value = row.dirPath
|
|
|
// console.log('topPath',toRaw(topPath.value));
|
|
|
newDirId.value = row.dirId
|
|
|
@@ -1013,7 +1016,8 @@ export default {
|
|
|
} else {
|
|
|
myfile.getById(newDirId.value).then(res => {
|
|
|
if (res.code === 200) {
|
|
|
- fileList.value = res.rows
|
|
|
+ fileList.value = JSON.parse(JSON.stringify(res.rows))
|
|
|
+ // console.log('fileList',toRaw(fileList.value));
|
|
|
}
|
|
|
})
|
|
|
}
|
|
|
@@ -1171,8 +1175,34 @@ export default {
|
|
|
collects.value = true
|
|
|
}
|
|
|
// 左箭头事件
|
|
|
- const arrowLift = () => {
|
|
|
+ const arrowLift =async () => {
|
|
|
// router.go(-1)
|
|
|
+ // console.log(1);
|
|
|
+ topPath.value = backFolder.value.dirPath
|
|
|
+ // console.log('topPath',toRaw(topPath.value));
|
|
|
+ newDirId.value = backFolder.value.parentId
|
|
|
+ newSpaceId.value = backFolder.value.spaceId
|
|
|
+ documents.getALLdocument({
|
|
|
+ parentId: newDirId.value - 0,
|
|
|
+ spaceId: newSpaceId.value - 0
|
|
|
+ }).then(res => {
|
|
|
+ folderList.value = res.data
|
|
|
+ if (res.data.length === 0) {
|
|
|
+ myfile.getById(newDirId.value).then(res => {
|
|
|
+ if (res.code === 200) {
|
|
|
+ fileList.value = res.rows
|
|
|
+ }
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ myfile.getById(newDirId.value).then(res => {
|
|
|
+ if (res.code === 200) {
|
|
|
+ fileList.value = JSON.parse(JSON.stringify(res.rows))
|
|
|
+ // console.log('fileList',toRaw(fileList.value));
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
+
|
|
|
}
|
|
|
// 归档
|
|
|
function goLock() {
|
|
|
@@ -1412,7 +1442,8 @@ export default {
|
|
|
shareBack,
|
|
|
folderBack,
|
|
|
refreshFile,
|
|
|
- delCollect
|
|
|
+ delCollect,
|
|
|
+ backFolder,
|
|
|
}
|
|
|
},
|
|
|
watch: {
|