|
@@ -16,7 +16,7 @@
|
|
|
<!-- 方块点击盒子 -->
|
|
|
<div style="height: 75vh;overflow-y: auto;">
|
|
|
<div class="searchBox">
|
|
|
- <div v-if="leftShowList == 1" style="width:100%">
|
|
|
+ <div v-if="leftShowList === 2" style="width:100%">
|
|
|
<el-input v-model="searchFire" @keyup.enter="fileBlur" class="searchFire" size="large"
|
|
|
placeholder="搜索文件夹" />
|
|
|
<el-icon class="SearchIcon" @click="fileBlur">
|
|
@@ -31,12 +31,12 @@
|
|
|
</el-icon>
|
|
|
</div>
|
|
|
<div class="left_changeShow">
|
|
|
- <img v-if="leftShowList == 1" src="@/assets/images/squre.png" @click="changeLeftShow" alt="">
|
|
|
+ <img v-if="leftShowList === 2" src="@/assets/images/squre.png" @click="changeLeftShow" alt="">
|
|
|
<img v-else src="@/assets/images/Frame_187.png" @click="changeLeftShow" alt="">
|
|
|
</div>
|
|
|
</div>
|
|
|
<!-- v-for盒子 -->
|
|
|
- <div v-if="leftShowList == 1"
|
|
|
+ <div v-if="leftShowList === 2"
|
|
|
style="display: flex;justify-content: flex-start;align-items: flex-start;flex-wrap: wrap;align-content: flex-start;overflow-y: auto;">
|
|
|
<template v-for="(item, index) in fileMenu" :key="index">
|
|
|
<div class="setBox">
|
|
@@ -105,7 +105,7 @@
|
|
|
<!-- 众多功能 -->
|
|
|
<div class="manyUse">
|
|
|
<div class="useMenu">
|
|
|
- <div v-if="thisFolder.dirType == '1' && (pathLabelData.length || leftShowList == 0) && thisFolder.parentId != 0"
|
|
|
+ <div v-if="thisFolder.dirType == '1' && (pathLabelData.length || leftShowList === 1) && thisFolder.parentId != 0"
|
|
|
style="display: flex;width: 92px;height: 32px;justify-content: flex-start;align-items: center;line-height: 18px;">
|
|
|
<div style="margin-left: 5px;">
|
|
|
<img src="../../assets/images/upload.png" style="width: 24px;height: 24px;" alt="">
|
|
@@ -201,7 +201,7 @@
|
|
|
<span>使用右键进行文件操作</span>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <div v-show="leftShowList == 1">
|
|
|
+ <div v-show="leftShowList === 2">
|
|
|
<!-- 面包屑功能栏 -->
|
|
|
<div class="breadBox">
|
|
|
<!-- 左侧 -->
|
|
@@ -382,7 +382,7 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <ListShow v-show="leftShowList == 0" @handleSelectionChange="handleSelectionChange" :fileList="fileList" @changeListSort="changeListSort" @delCollect="delCollect" @collectByStar="collectByStar" @handleRowClick="handleRowClick"></ListShow>
|
|
|
+ <ListShow v-show="leftShowList === 1" @handleSelectionChange="handleSelectionChange" :fileList="fileList" @changeListSort="changeListSort" @delCollect="delCollect" @collectByStar="collectByStar" @handleRowClick="handleRowClick"></ListShow>
|
|
|
|
|
|
</div>
|
|
|
</div>
|
|
@@ -790,24 +790,33 @@ export default {
|
|
|
const inputTitle = ref()//验证框标题
|
|
|
const isCode = ref(false)// 验证的类型
|
|
|
const isAsc = ref("asc");
|
|
|
- const leftShowList = ref(localStorage.getItem('leftShowList') ||1)
|
|
|
+ const leftShowList = ref()
|
|
|
const thisFirst = ref()
|
|
|
const ListtreeData = ref()
|
|
|
const searchFolderTree = ref()
|
|
|
const showTreeMenu = ref(false)
|
|
|
const changeSort = async () => {
|
|
|
isAsc.value == "asc" ? (isAsc.value = "desc") : (isAsc.value = "asc");
|
|
|
- refreshFile()
|
|
|
+ // refreshFile()
|
|
|
let obj = {
|
|
|
pageNum: 1,
|
|
|
pageSize: 9999,
|
|
|
isAsc: isAsc.value,
|
|
|
orderByColumn: "createTime"
|
|
|
}
|
|
|
- documents.getALLdocumentByType({ parentId: impDirId.value, spaceId: impSpaceId.value,isAsc: isAsc.value,orderByColumn: "createTime", pageNum: obj.pageNum, pageSize: obj.pageSize },3).then(res => {
|
|
|
- fileMenu.value = res.rows
|
|
|
- // folderList.value = res.rows
|
|
|
- })
|
|
|
+ documents.getALLdocumentByType({ parentId: thisFolder.value.dirId?thisFolder.value.dirId:impDirId.value, spaceId: impSpaceId.value,isAsc: isAsc.value,orderByColumn: "createTime",pageNum: obj.pageNum, pageSize: obj.pageSize },3).then(res => {
|
|
|
+ // fileMenu.value = res.rows
|
|
|
+ folderList.value = res.rows
|
|
|
+ })
|
|
|
+ const query = `${thisFolder.value.dirId?thisFolder.value.dirId:impDirId.value}?isAsc=${isAsc.value}&orderByColumn=createTime&pageSize=9999&pageNum=1`
|
|
|
+ myfile.getById(query).then(res => {
|
|
|
+ if (res.code === 200) {
|
|
|
+ fileList.value = res.rows
|
|
|
+ fileTotal.value = res.total
|
|
|
+ // console.log('fileList.value',fileList.value);
|
|
|
+ }
|
|
|
+ // console.log('not200');
|
|
|
+ })
|
|
|
};
|
|
|
const changeListSort = async (listAsc)=>{
|
|
|
const query = `${thisFolder.value.dirId}?isAsc=${listAsc}&orderByColumn=createTime&pageSize=9999&pageNum=1`
|
|
@@ -874,7 +883,7 @@ export default {
|
|
|
documents.getALLdocumentByType({ parentId: userMe[0].dirId - 0, spaceId: userMe[0].spaceId,isAsc: isAsc.value,orderByColumn: "createTime", pageNum: obj.pageNum, pageSize: obj.pageSize }, 3).then(res => {
|
|
|
fileMenu.value = res.rows
|
|
|
folderList.value = res.rows
|
|
|
- console.log('folderList.value',folderList.value);
|
|
|
+ // console.log('folderList.value',folderList.value);
|
|
|
})
|
|
|
myfile.getById(userMe[0].dirId - 0, obj).then(res => {
|
|
|
if (res.code === 200) {
|
|
@@ -1621,7 +1630,7 @@ export default {
|
|
|
// console.log('row',row);
|
|
|
// console.log('rightRow',row);
|
|
|
// 如果label没有值说明点的是一级目录
|
|
|
- if(!pathLabelData.value[0] && leftShowList.value == 1){
|
|
|
+ if(!pathLabelData.value[0] && leftShowList.value === 2){
|
|
|
// 创建标签
|
|
|
const addData = {
|
|
|
path: '/myfile' + row.dirId,
|
|
@@ -2023,10 +2032,10 @@ export default {
|
|
|
if(edit){
|
|
|
getFirstFolder()
|
|
|
}
|
|
|
- if (toRaw(thisFolder.value)?.dirId && !leftNewFile.value && leftShowList.value == 1 ) {//如果点开了文件夹
|
|
|
+ if (toRaw(thisFolder.value)?.dirId && !leftNewFile.value && leftShowList.value === 2 ) {//如果点开了文件夹
|
|
|
folderClick()
|
|
|
console.log(111);
|
|
|
- } else if(toRaw(thisFolder.value)?.dirId && !leftNewFile.value && leftShowList.value == 0){
|
|
|
+ } else if(toRaw(thisFolder.value)?.dirId && !leftNewFile.value && leftShowList.value === 1){
|
|
|
listfolderClick()
|
|
|
console.log('treeRe');
|
|
|
}else {
|
|
@@ -2329,11 +2338,11 @@ export default {
|
|
|
}
|
|
|
const changeLeftShow = ()=>{
|
|
|
console.log('changeLeftShow',leftShowList.value);
|
|
|
- leftShowList.value = leftShowList.value == 1?0:1
|
|
|
+ leftShowList.value = leftShowList.value == 1?2:1
|
|
|
console.log('changeLeftShow-',leftShowList.value);
|
|
|
thisFolder.value = {}
|
|
|
localStorage.setItem('leftShowList',leftShowList.value)
|
|
|
- if(!leftShowList.value){
|
|
|
+ if(leftShowList.value === 1){
|
|
|
console.log('toList');
|
|
|
// 创建标签
|
|
|
const addData = {
|
|
@@ -2397,7 +2406,15 @@ export default {
|
|
|
});
|
|
|
onMounted(() => {
|
|
|
// if(!thisFolder.value){
|
|
|
- leftShowList.value = localStorage.getItem('leftShowList') ||0
|
|
|
+ const hasMsg = localStorage.getItem('leftShowList')
|
|
|
+ if(!hasMsg){
|
|
|
+ getConfigKey("dir.style.config").then(response => {
|
|
|
+ leftShowList.value = response.msg - 0;
|
|
|
+ console.log('leftShowList == ',leftShowList.value);
|
|
|
+ });
|
|
|
+ }else{
|
|
|
+ leftShowList.value = hasMsg - 0
|
|
|
+ }
|
|
|
getAllTop()
|
|
|
// }
|
|
|
getSpaceList()
|
|
@@ -2449,7 +2466,14 @@ export default {
|
|
|
refreshFile()
|
|
|
})
|
|
|
}
|
|
|
- leftShowList.value = localStorage.getItem('leftShowList') ||0
|
|
|
+ const hasMsg = localStorage.getItem('leftShowList')
|
|
|
+ if(!hasMsg){
|
|
|
+ getConfigKey("dir.style.config").then(response => {
|
|
|
+ leftShowList.value = response.msg - 0;
|
|
|
+ });
|
|
|
+ }else{
|
|
|
+ leftShowList.value = hasMsg - 0
|
|
|
+ }
|
|
|
loadingPreview.value = false
|
|
|
}, 500)
|
|
|
|