|
|
@@ -142,14 +142,15 @@
|
|
|
<!-- 左侧 -->
|
|
|
<div style="display: flex;justify-content: space-around;align-items: center;margin-left: 10px;">
|
|
|
<!-- 前进后退 -->
|
|
|
- <div style="display: flex;justify-content: space-around;align-items: center;margin-right: 5px;" >
|
|
|
+ <!-- <div style="display: flex;justify-content: space-around;align-items: center;margin-right: 5px;" >
|
|
|
<img style="display:block;width: 11px;height: 11px;" :src="blueLeft" alt=""
|
|
|
@click="arrowLift">
|
|
|
<img style="display:block;width: 16px;height: 16px;" :src="grayRight" alt="">
|
|
|
- </div>
|
|
|
+ </div> -->
|
|
|
<!-- 面包屑 -->
|
|
|
<div class="topPath">
|
|
|
- {{ topPath }}
|
|
|
+ <span @click="backTopPath">{{ topPath }}</span>
|
|
|
+ <PathLabel v-if="!loadingPreview" @folderClick="folderClick" :pathLabelData='pathLabelData'></PathLabel>
|
|
|
<!-- <BreadMenu></BreadMenu> -->
|
|
|
</div>
|
|
|
</div>
|
|
|
@@ -435,6 +436,7 @@ import level3 from "@/assets/images/level3.png";
|
|
|
import level4 from "@/assets/images/level4.png";
|
|
|
import { ElMessage ,ElLoading } from 'element-plus'
|
|
|
import ImgPreview from '@/components/ImgPreview/ImgPreview.vue'
|
|
|
+import PathLabel from '@/components/PathLabel/index.vue'
|
|
|
import { preview } from "@/api/common/common.js";
|
|
|
import historyList from "@/components/historyList/index.vue"; //选择文件发送的列表,历史版本
|
|
|
import inputPassword from "./components/inputPassword.vue"; //选择文件发送的列表,历史版本
|
|
|
@@ -658,6 +660,8 @@ export default {
|
|
|
const spaceName = ref()
|
|
|
const isDept = ref(false)// 是否管理员
|
|
|
const loadingUpload = ref(false);//文件上传加载
|
|
|
+ const pathLabelData = ref([
|
|
|
+ ])
|
|
|
//控制宫格展示
|
|
|
const isList = ref(false); //控制显示方式
|
|
|
const changeShow = (fileGrids) => {
|
|
|
@@ -677,6 +681,11 @@ export default {
|
|
|
// 获取文件夹,中栏,文件
|
|
|
function getAllTop() {
|
|
|
documents.getTop(2).then(res => {
|
|
|
+ console.log('getAllTopres',res);
|
|
|
+ if(!res){
|
|
|
+ console.log('nores');
|
|
|
+ return
|
|
|
+ }
|
|
|
let userMe = [res]
|
|
|
impDirId.value = userMe[0].dirId//固定
|
|
|
impSpaceId.value = userMe[0].spaceId//固定
|
|
|
@@ -727,7 +736,7 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
function getSpaceList() {
|
|
|
- myfile.fileType(3).then(res => {
|
|
|
+ myfile.fileType(2).then(res => {
|
|
|
useSpace.value = res.data.usedCap
|
|
|
allSpace.value = res.data.spaceCap
|
|
|
})
|
|
|
@@ -741,7 +750,7 @@ export default {
|
|
|
addFolderAdd(addData) //加了这句代码界面会渲染两次
|
|
|
thisFolder.value = row
|
|
|
console.log('row2',row);
|
|
|
- topPath.value = row.dirPath
|
|
|
+ // topPath.value = row.dirPath
|
|
|
if(row.isEncrypt === "Y"){
|
|
|
getLeveldetailFn(row.encryptLevel)
|
|
|
}else{
|
|
|
@@ -1168,7 +1177,16 @@ export default {
|
|
|
}
|
|
|
|
|
|
// 文件夹每行点击事件
|
|
|
- function folderClick(row, list) {
|
|
|
+ function folderClick(row, list,e,jump) {
|
|
|
+ if(!pathLabelData.value[0]){
|
|
|
+ // 创建标签
|
|
|
+ const addData = {
|
|
|
+ path: '/myfile' + row.dirId,
|
|
|
+ name: row.dirName,
|
|
|
+ clickRowId: toRaw(row)
|
|
|
+ }
|
|
|
+ addFolderAdd(addData)
|
|
|
+ }
|
|
|
// 初始化分页数据
|
|
|
tableBeEnd.value = true
|
|
|
filePageNum.value = 1
|
|
|
@@ -1178,6 +1196,23 @@ export default {
|
|
|
if(row){
|
|
|
backFolder.value = thisFolder.value
|
|
|
thisFolder.value = row;
|
|
|
+ if(pathLabelData.value[0]){
|
|
|
+ // 有值就说明是二级及以后的数据
|
|
|
+ const oldArr = toRaw(pathLabelData.value)
|
|
|
+ // console.log('oldArr',oldArr);
|
|
|
+ let newArr
|
|
|
+ console.log('jump',jump);
|
|
|
+ if(jump == undefined){
|
|
|
+ newArr = oldArr.push({
|
|
|
+ name:toRaw(row).dirName,
|
|
|
+ dirId:toRaw(row).dirId
|
|
|
+ })
|
|
|
+ }else{ // jump有值说明是点击过来的 后面的要截取掉
|
|
|
+ newArr = oldArr.splice(jump+1)
|
|
|
+ }
|
|
|
+ console.log('newArr',newArr);
|
|
|
+ pathLabelData.value = JSON.parse(JSON.stringify(oldArr))
|
|
|
+ }
|
|
|
}else{
|
|
|
row =thisFolder.value
|
|
|
}
|
|
|
@@ -1188,7 +1223,7 @@ export default {
|
|
|
}
|
|
|
thisRole.value = row.dirRole?row.dirRole.split(','):[]
|
|
|
// console.log('row1', toRaw(row));
|
|
|
- topPath.value = row.dirPath
|
|
|
+ // topPath.value = row.dirPath
|
|
|
// console.log('topPath',toRaw(topPath.value));
|
|
|
newDirId.value = row.dirId
|
|
|
newSpaceId.value = row.spaceId
|
|
|
@@ -1499,6 +1534,10 @@ export default {
|
|
|
|
|
|
collects.value = true
|
|
|
}
|
|
|
+ const backTopPath = ()=>{
|
|
|
+ pathLabelData.value = ([])
|
|
|
+ getAllTop()
|
|
|
+ }
|
|
|
// 取消文件收藏
|
|
|
const delCollect = async (row,isfolder)=>{
|
|
|
const thisRow = toRaw(row)
|
|
|
@@ -1696,6 +1735,12 @@ export default {
|
|
|
myfile.getDir(newRow).then(res=>{
|
|
|
// console.log('tores',res);
|
|
|
thisFolder.value = res.data
|
|
|
+ // 这里点的是一级目录 所以重新给pathLabelData赋值
|
|
|
+ const labelItem = {
|
|
|
+ name:res.data.dirName,
|
|
|
+ dirId:res.data.dirId
|
|
|
+ }
|
|
|
+ pathLabelData.value = [labelItem]
|
|
|
refreshFile()
|
|
|
})
|
|
|
}
|
|
|
@@ -1704,29 +1749,29 @@ export default {
|
|
|
|
|
|
})
|
|
|
// 监听路由变化
|
|
|
- onBeforeRouteUpdate((to,from)=>{
|
|
|
- console.log('to',to);
|
|
|
- console.log('from',from);
|
|
|
- if(to.name == 'department'){
|
|
|
- loadingPreview.value = true
|
|
|
- const thisdirId = to.params.dirId
|
|
|
- console.log('thisdirId',thisdirId);
|
|
|
- setTimeout(()=>{
|
|
|
- if(thisdirId){
|
|
|
- myfile.getDir(thisdirId).then(res=>{
|
|
|
- console.log('tores',res);
|
|
|
- thisFolder.value = res.data
|
|
|
- refreshFile()
|
|
|
- })
|
|
|
- }
|
|
|
- loadingPreview.value = false
|
|
|
- },500)
|
|
|
- }
|
|
|
- // docId = to.query.clickRowId
|
|
|
- // console.log(docId, "doc");
|
|
|
- // console.log(copyRow, "row");
|
|
|
- // edit();
|
|
|
- })
|
|
|
+ // onBeforeRouteUpdate((to,from)=>{
|
|
|
+ // console.log('to',to);
|
|
|
+ // console.log('from',from);
|
|
|
+ // if(to.name == 'department'){
|
|
|
+ // loadingPreview.value = true
|
|
|
+ // const thisdirId = to.params.dirId
|
|
|
+ // console.log('thisdirId',thisdirId);
|
|
|
+ // setTimeout(()=>{
|
|
|
+ // if(thisdirId){
|
|
|
+ // myfile.getDir(thisdirId).then(res=>{
|
|
|
+ // console.log('tores',res);
|
|
|
+ // thisFolder.value = res.data
|
|
|
+ // refreshFile()
|
|
|
+ // })
|
|
|
+ // }
|
|
|
+ // loadingPreview.value = false
|
|
|
+ // },500)
|
|
|
+ // }
|
|
|
+ // // docId = to.query.clickRowId
|
|
|
+ // // console.log(docId, "doc");
|
|
|
+ // // console.log(copyRow, "row");
|
|
|
+ // // edit();
|
|
|
+ // })
|
|
|
return {
|
|
|
getSpaceList,
|
|
|
folderList,//文件夹的数据
|
|
|
@@ -1917,7 +1962,10 @@ export default {
|
|
|
closeUpload,
|
|
|
handleRemove,
|
|
|
loadingUpload,
|
|
|
- fileBlur
|
|
|
+ fileBlur,
|
|
|
+ pathLabelData,
|
|
|
+ backTopPath
|
|
|
+
|
|
|
}
|
|
|
},
|
|
|
watch: {
|
|
|
@@ -1935,7 +1983,8 @@ export default {
|
|
|
SpaceBig,
|
|
|
PlaceGridFolder,
|
|
|
PalaceGridFile,
|
|
|
- inputPassword
|
|
|
+ inputPassword,
|
|
|
+ PathLabel
|
|
|
},
|
|
|
}
|
|
|
|
|
|
@@ -2114,6 +2163,7 @@ p {
|
|
|
background-color: #F6F7F9;
|
|
|
|
|
|
.topPath {
|
|
|
+ display: flex;
|
|
|
margin-left: 4px;
|
|
|
cursor: pointer;
|
|
|
color: #6F85B5;
|
|
|
@@ -2289,7 +2339,7 @@ p {
|
|
|
}
|
|
|
.file-title{
|
|
|
color: #2E6BC8;
|
|
|
- margin-left: 30px;
|
|
|
+ margin-left: 3%;
|
|
|
}
|
|
|
::v-deep .el-collapse-item__arrow {
|
|
|
position: relative;
|