|
@@ -176,7 +176,8 @@
|
|
|
<!-- 面包屑 -->
|
|
|
<div class="topPath">
|
|
|
<!-- <el-icon><ArrowDown /></el-icon> -->
|
|
|
- {{ topPath }}
|
|
|
+ <span @click="backTopPath">{{ topPath }}</span>
|
|
|
+ <PathLabel v-if="!loadingPreview" @folderClick="folderClick" :pathLabelData='pathLabelData'></PathLabel>
|
|
|
<!-- <BreadMenu></BreadMenu> -->
|
|
|
</div>
|
|
|
</div>
|
|
@@ -468,6 +469,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"; //选择文件发送的列表,历史版本
|
|
@@ -680,6 +682,8 @@ export default {
|
|
|
const tableTotal = ref(0)//表格数据总数
|
|
|
const clickFileData = ref(null);
|
|
|
let fileBig = ref(0);
|
|
|
+ const pathLabelData = ref([
|
|
|
+ ])
|
|
|
//控制宫格展示
|
|
|
const isList = ref(false); //控制显示方式
|
|
|
const changeShow = (fileGrids) => {
|
|
@@ -753,7 +757,7 @@ export default {
|
|
|
}
|
|
|
addFolderAdd(addData) //加了这句代码界面会渲染两次
|
|
|
thisFolder.value = row
|
|
|
- topPath.value = row.dirPath
|
|
|
+ // topPath.value = row.dirPath
|
|
|
if (row.isEncrypt === "Y") {
|
|
|
getLeveldetailFn(row.encryptLevel)
|
|
|
} else {
|
|
@@ -1322,7 +1326,18 @@ export default {
|
|
|
}
|
|
|
|
|
|
// 文件夹每行点击事件
|
|
|
- function folderClick(row, list) {
|
|
|
+ function folderClick(row, list,e,jump) {
|
|
|
+ // console.log('rightRow',row);
|
|
|
+ // 如果label没有值说明点的是一级目录
|
|
|
+ if(!pathLabelData.value[0]){
|
|
|
+ // 创建标签
|
|
|
+ const addData = {
|
|
|
+ path: '/myfile' + row.dirId,
|
|
|
+ name: row.dirName,
|
|
|
+ clickRowId: toRaw(row)
|
|
|
+ }
|
|
|
+ addFolderAdd(addData)
|
|
|
+ }
|
|
|
// 初始化分页数据
|
|
|
tableBeEnd.value = true
|
|
|
filePageNum.value = 1
|
|
@@ -1332,6 +1347,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
|
|
|
}
|
|
@@ -1340,7 +1372,7 @@ export default {
|
|
|
} else {
|
|
|
thisFolderRole.value = null
|
|
|
}
|
|
|
- topPath.value = row.dirPath
|
|
|
+ // topPath.value = row.dirPath
|
|
|
newDirId.value = row.dirId
|
|
|
newSpaceId.value = row.spaceId
|
|
|
clickFileData.value = row
|
|
@@ -1538,7 +1570,7 @@ export default {
|
|
|
const arrowLift = async () => {
|
|
|
// router.go(-1)
|
|
|
// console.log(1);
|
|
|
- topPath.value = backFolder.value.dirPath
|
|
|
+ // topPath.value = backFolder.value.dirPath
|
|
|
// console.log('topPath',toRaw(topPath.value));
|
|
|
newDirId.value = backFolder.value.parentId
|
|
|
newSpaceId.value = backFolder.value.spaceId
|
|
@@ -1796,6 +1828,10 @@ export default {
|
|
|
// console.log('query',query);
|
|
|
// console.log('fileList',fileList.value);
|
|
|
}
|
|
|
+ const backTopPath = ()=>{
|
|
|
+ pathLabelData.value = ([])
|
|
|
+ getAllTop()
|
|
|
+ }
|
|
|
onMounted(() => {
|
|
|
// if(!thisFolder.value){
|
|
|
getAllTop()
|
|
@@ -1829,6 +1865,13 @@ 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]
|
|
|
+ // console.log('pathLabelData',pathLabelData.value);
|
|
|
refreshFile()
|
|
|
})
|
|
|
}
|
|
@@ -1837,28 +1880,28 @@ export default {
|
|
|
|
|
|
})
|
|
|
// 监听路由变化
|
|
|
- onBeforeRouteUpdate((to, from) => {
|
|
|
- // console.log('to',to);
|
|
|
- // console.log('from',from);
|
|
|
- if (to.name == 'myfile') {
|
|
|
- loadingPreview.value = true
|
|
|
- const thisdirId = to.params.dirId
|
|
|
- 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 == 'myfile') {
|
|
|
+ // loadingPreview.value = true
|
|
|
+ // const thisdirId = to.params.dirId
|
|
|
+ // 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,//文件夹的数据
|
|
@@ -2046,7 +2089,9 @@ export default {
|
|
|
throttleSureUpload,
|
|
|
getLevelList,
|
|
|
levelList,
|
|
|
- setTablelevel
|
|
|
+ setTablelevel,
|
|
|
+ pathLabelData,
|
|
|
+ backTopPath
|
|
|
}
|
|
|
},
|
|
|
watch: {
|
|
@@ -2065,7 +2110,8 @@ export default {
|
|
|
SpaceBig,
|
|
|
PlaceGridFolder,
|
|
|
PalaceGridFile,
|
|
|
- inputPassword
|
|
|
+ inputPassword,
|
|
|
+ PathLabel
|
|
|
},
|
|
|
}
|
|
|
|
|
@@ -2251,6 +2297,7 @@ p {
|
|
|
background-color: #F6F7F9;
|
|
|
|
|
|
.topPath {
|
|
|
+ display: flex;
|
|
|
margin-left: 4px;
|
|
|
cursor: pointer;
|
|
|
color: #6F85B5;
|
|
@@ -2430,7 +2477,7 @@ p {
|
|
|
}
|
|
|
.file-title{
|
|
|
color: #2E6BC8;
|
|
|
- margin-left: 30px;
|
|
|
+ margin-left: 3%;
|
|
|
}
|
|
|
::v-deep .el-collapse-item__arrow {
|
|
|
position: relative;
|