“yueshang” 2 лет назад
Родитель
Сommit
849c80a052

+ 2 - 1
index.html

@@ -9,9 +9,10 @@
 		<link rel="icon" href="/favicon.ico">
 		<title>聚合智慧文档管理系统</title>
 		<!--引入onlyoffice组件-->
-		<script type="text/javascript" src="https://doc.jujutong.cloud:19443/web-apps/apps/api/documents/api.js" charset="utf-8" async></script>
+		<!-- <script type="text/javascript" src="https://doc.jujutong.cloud:19443/web-apps/apps/api/documents/api.js" charset="utf-8" async></script> -->
 		<!-- <script type="text/javascript" src="http://192.168.1.28:19531/web-apps/apps/api/documents/api.js" charset="utf-8" async></script> -->
 		<!-- <script type="text/javascript" src="http://8.142.173.95:19531/web-apps/apps/api/documents/api.js" charset="utf-8" async></script> -->
+		<script type="text/javascript" src="https://192.168.1.28:19443/web-apps/apps/api/documents/api.js" charset="utf-8" async></script>
 		<!--[if lt IE 11]><script>window.location.href='/html/ie.html';</script><![endif]-->
 		<style>
 			html,

+ 22 - 0
src/components/PathLabel/LabelItem.vue

@@ -0,0 +1,22 @@
+<template>
+  <div>
+    / {{ name }} 
+  </div>
+</template>
+
+<script setup>
+import { onMounted, ref, toRaw, watch, inject } from "vue";
+const props = defineProps({
+  name: {
+    type: String,
+    default: "",
+  },
+  dirId: {
+    type: Number,
+    default: 0,
+  },
+});
+</script>
+
+<style lang="scss" scoped>
+</style>

+ 42 - 0
src/components/PathLabel/index.vue

@@ -0,0 +1,42 @@
+<template>
+  <div class="box">
+    <div v-for="(item,index) in toRaw(pathLabelData)" :key="item.dirId">
+      <LabelItem
+        :name="item.name"
+        @click="clickItem(item.dirId,index)"
+        :dirId="item.dirId"
+      ></LabelItem>
+    </div>
+  </div>
+</template>
+
+<script setup>
+import { onMounted, ref, toRaw, watch, inject } from "vue";
+import LabelItem from "@/components/PathLabel/LabelItem.vue";
+import { getDir } from "@/api/biz/dir.js";
+const props = defineProps({
+  pathLabelData: {
+    type: Array,
+    default: () => [],
+  },
+});
+const emit = defineEmits(["folderClick"]);
+watch(
+  () => props.pathLabelData,
+  (newValue) => {
+    console.log(111, newValue);
+  }
+);
+const clickItem = async (dirId,index) => {
+  const res = await getDir(dirId);
+  const row = res.data
+  // console.log("labelIndex", index);
+  emit("folderClick", row,null,null,index)
+};
+</script>
+
+<style lang="scss" scoped>
+.box {
+  display: flex;
+}
+</style>

+ 2 - 2
src/components/historyList/index.vue

@@ -138,10 +138,10 @@ const clickIndex = ref("");
 const emit = defineEmits(["changeMsgClose"]);
 //点击预览
 const previewFileClick =async (item) => {
-  // console.log('preitem',item);
+  console.log('preitem',item);
   const res =await getInfo(item.docId)
   // console.log('res',res);
-  addFileTab(res.data,0,0,1);
+  addFileTab(res.data,0,0,1,item.fileId);
   // emit("changeMsgClose", true, item);
   isOpen.value = false;
 };

+ 7 - 7
src/layout/indexCommon.vue

@@ -114,10 +114,10 @@
             </router-view>
           </div>
           <div v-show="!isAlive" style="width: 100%">
-            <div v-for="item in iFrameData" :key="item.id">
+            <div v-for="item in iFrameData" :id="item.src" :key="item.src">
               <div style="width: 100%" v-show="item.show">
                 <iframe :src="item.src" frameborder="0" :id="`iframe${item.id}`" :name="`iframe${item.id}`" width="100%"
-                  height="800px" class="iframeBox" v-show="item.show"></iframe>
+                  height="800px" class="iframeBox" ></iframe>
               </div>
             </div>
           </div>
@@ -643,7 +643,7 @@ const filePaneClick = (item) => {
   //   console.log("editableTabsValue", editableTabsValue.value);
 };
 // 创建文件的标签
-const addFileTab = (data, bool,copy,history) => {
+const addFileTab = (data, bool,copy,history,fileId) => {
   // console.log("addFileTab", data);
   history = history?history:0
   const thisData = JSON.parse(JSON.stringify(toRaw(data)));
@@ -655,7 +655,7 @@ const addFileTab = (data, bool,copy,history) => {
     // 已存在打开当前的并且改变编辑状态
     const thisPane = toRaw(hasThis)
     // 如果编辑状态改变了 先删除旧的 再新建
-    if(thisPane.src != `${window.location.origin}/fileEdit?clickRowId=${thisData.docId}&canEdit=${bool}&canCopy=${copy}&history=${history}&fileId=${thisData.fileId}` ){
+    if(thisPane.src != `${window.location.origin}/fileEdit?clickRowId=${thisData.docId}&canEdit=${bool}&canCopy=${copy}&history=${history}&fileId=${fileId}` ){
       // console.log('buyiyang',`${window.location.origin}/fileEdit?clickRowId=${thisData.docId}&canEdit=${bool}`);
       const arr = oldIFrameData.map((par) => {
           if (par.id === thisPane.id) {
@@ -670,7 +670,7 @@ const addFileTab = (data, bool,copy,history) => {
         if (!par.src) {
           if (thisData.docId) {
             // par.src = `${window.location.origin}/fileEdit?clickRowId=${thisData.docId}`;
-            par.src = `${window.location.origin}/fileEdit?clickRowId=${thisData.docId}&canEdit=${bool}&canCopy=${copy}&history=${history}&fileId=${thisData.fileId}`;
+            par.src = `${window.location.origin}/fileEdit?clickRowId=${thisData.docId}&canEdit=${bool}&canCopy=${copy}&history=${history}&fileId=${fileId}`;
             par.name = data.fileName;
             par.docId = data.docId
             par.show = true
@@ -692,7 +692,7 @@ const addFileTab = (data, bool,copy,history) => {
     // console.log('hasThis',thisPane);
     const arr = oldIFrameData.map((par) => {
       if (par.id == thisPane.id) {
-        `${window.location.origin}/fileEdit?clickRowId=${thisData.docId}&canEdit=${bool}&canCopy=${copy}&history=${history}&fileId=${thisData.fileId}`
+        `${window.location.origin}/fileEdit?clickRowId=${thisData.docId}&canEdit=${bool}&canCopy=${copy}&history=${history}&fileId=${fileId}`
         par.show = true
         editableTabsValue.value = par.id// 标签跳转
         setTimeout(() => {
@@ -712,7 +712,7 @@ const addFileTab = (data, bool,copy,history) => {
     if (!par.src) {
       if (thisData.docId) {
         // par.src = `${window.location.origin}/fileEdit?clickRowId=${thisData.docId}`;
-        par.src = `${window.location.origin}/fileEdit?clickRowId=${thisData.docId}&canEdit=${bool}&canCopy=${copy}&history=${history}&fileId=${thisData.fileId}`;
+        par.src = `${window.location.origin}/fileEdit?clickRowId=${thisData.docId}&canEdit=${bool}&canCopy=${copy}&history=${history}&fileId=${fileId}`;
         par.name = data.fileName;
         par.docId = data.docId
         par.show = true

+ 1 - 1
src/views/biz/recent/index.vue

@@ -876,7 +876,7 @@ const downLoadfile = () => {
 }
 .collapseItem_title {
   position: relative;
-  left: 40px;
+  left: 3%;
   color: #2e6bc8;
   font-family: Inter-Medium;
   font-size: 12px;

+ 2 - 36
src/views/collect/index.vue

@@ -2,7 +2,6 @@
   <div class="container" v-if="!showPreview">
     <div class="statistics">
       <div class="left_box">
-        <div class="dataNum">共查询到个相关结果</div>
       </div>
       <div class="right_box">
         <img
@@ -34,39 +33,6 @@
     <!-- 标签 -->
     <div class="tags">
       <!-- TODO 标签可以拖动位置 -->
-      <!-- 
-      <el-tabs v-if="false" v-model="clickCollect" class="demo-tabs tabSign">
-        <el-tab-pane label="常用" name="first"></el-tab-pane>
-        <el-tab-pane label="默认" name="second"></el-tab-pane>
-        <draggable
-          :list="toRaw(tabList)"
-          ghost-class="ghost"
-          chosen-class="chosenClass"
-          animation="300"
-        >
-          <template #item="{ element }">
-            <el-tab-pane>
-              <template #label>
-                <div
-                  v-if="isChangeTabName !== element.labelId"
-                  @click.right="tabClick($event, element)"
-                >
-                  {{ element.labelName }}
-                </div>
-                <div v-else>
-                  <el-input
-                    v-model="changeTabName"
-                    size="mini"
-                    @blur="reTabName"
-                    maxlength="32"
-                    :autofocus="true"
-                  ></el-input>
-                </div>
-              </template>
-            </el-tab-pane>
-          </template>
-        </draggable>
-      </el-tabs> -->
 
       <el-tabs
         v-model="clickCollect"
@@ -626,7 +592,7 @@ const setIcon = (fileType) => {
   .statistics {
     width: 100%;
     height: 40px;
-    background-color: #d9e0f0;
+    background-color: #fff;
     padding-left: 16px;
     display: flex;
     justify-content: space-between;
@@ -750,7 +716,7 @@ const setIcon = (fileType) => {
 }
 .collapseItem_title {
   position: relative;
-  left: 40px;
+  left: 3%;
   color: #2e6bc8;
   font-family: Inter-Medium;
   font-size: 12px;

+ 83 - 33
src/views/department/MyFile.vue

@@ -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;

+ 81 - 30
src/views/myfile/MyFile.vue

@@ -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) => {
@@ -697,6 +701,10 @@ export default {
         // 获取文件夹,中栏,文件
         function getAllTop() {
             documents.getTop(3).then(res => {
+                if(!res){
+                    console.log('nores');
+                    return
+                }
                 let userMe;
                 userMe = [res];
                 impDirId.value = userMe[0].dirId//固定
@@ -753,7 +761,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 +1330,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 +1351,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 +1376,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 +1574,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 +1832,10 @@ export default {
             // console.log('query',query);
             // console.log('fileList',fileList.value);
         }
+        const backTopPath = ()=>{
+            pathLabelData.value = ([])
+            getAllTop()
+        }
         onMounted(() => {
             // if(!thisFolder.value){
             getAllTop()
@@ -1829,6 +1869,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 +1884,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 +2093,9 @@ export default {
             throttleSureUpload,
             getLevelList,
             levelList,
-            setTablelevel
+            setTablelevel,
+            pathLabelData,
+            backTopPath
         }
     },
     watch: {
@@ -2065,7 +2114,8 @@ export default {
         SpaceBig,
         PlaceGridFolder,
         PalaceGridFile,
-        inputPassword
+        inputPassword,
+        PathLabel
     },
 }
 
@@ -2251,6 +2301,7 @@ p {
     background-color: #F6F7F9;
 
     .topPath {
+        display: flex;
         margin-left: 4px;
         cursor: pointer;
         color: #6F85B5;
@@ -2430,7 +2481,7 @@ p {
 }
 .file-title{
     color: #2E6BC8;
-    margin-left: 30px;
+    margin-left: 3%;
 }
 ::v-deep .el-collapse-item__arrow {
   position: relative;

+ 5 - 3
src/views/myfile/components/FileEdit.vue

@@ -95,7 +95,7 @@ export default {
           };
         });
       } else if (fileId && history == '1') {
-        // console.log('history',history);
+        console.log('history',history);
             getInfo(docId).then((response) => {
           const obj = response.data;
           obj.isEdit = false;
@@ -105,7 +105,8 @@ export default {
           option.value.isCopy = obj.isCopy;
            option.value.url = `${window.location.origin}${
           import.meta.env.VITE_APP_BASE_API
-        }/api/history/${obj.fileId}`;
+        }/api/history/${fileId}`;
+        console.log('url = ',option.value.url);
         //  option.value.url = `http://8.142.173.95:19527/api/history/${fileId}`;
           //  console.log('option.value.url',option.value.url);
           option.value.title = obj.fileName;
@@ -155,7 +156,8 @@ export default {
           // copyRow = JSON.parse(route.query.copyRow)
       }
       if(route.query.fileId){
-          fileId = route.query.fileId
+        fileId = route.query.fileId
+        console.log('fileId',fileId);
           // copyRow = JSON.parse(route.query.copyRow)
       }
         // console.log('route.query.canEdit',route.query.canEdit);

+ 2 - 2
src/views/myjoin/MyJoin.vue

@@ -10,7 +10,7 @@
                         </div>
                         <div>
                             <el-table :data="myEjoy" style="width: 100%;cursor: pointer;" @row-click="rowClickFN">
-                                <el-table-column type="selection" width="55" />
+                                <!-- <el-table-column type="selection" width="55" /> -->
                                 <el-table-column label="名称" width="200">
                                     <template #default="scope">
                                         <span style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" class="juzhong">
@@ -37,7 +37,7 @@
                     </el-tab-pane>
                     <el-tab-pane label="我参与的" name="second">
                         <el-table :data="myPack" style="width: 100%;cursor: pointer;" @row-click="rowClickFN">
-                            <el-table-column type="selection" width="55" />
+                            <!-- <el-table-column type="selection" width="55" /> -->
                             <el-table-column label="名称" width="200">
                                 <template #default="scope">
                                     <span style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" class="juzhong">

+ 77 - 32
src/views/publicment/MyFile.vue

@@ -147,7 +147,8 @@
                             </div> -->
                             <!-- 面包屑 -->
                             <div class="topPath">
-                                {{ topPath }}
+                                <span @click="backTopPath">{{ topPath }}</span>
+                                <PathLabel v-if="!loadingPreview" @folderClick="folderClick" :pathLabelData='pathLabelData'></PathLabel>
                                 <!-- <BreadMenu></BreadMenu> -->
                             </div>
                         </div>
@@ -443,6 +444,7 @@ import { getLeveldetail } from '../../api/level/level';
 import { encrypt, decrypt } from "@/utils/jsencrypt";
 import ordinaryList from "@/assets/images/ordinaryList.png";
 import ordinary from "@/assets/images/ordinary.png";
+import PathLabel from '@/components/PathLabel/index.vue'
 import fileStyle from "@/assets/images/fileStyle.png";
 import fileBox from "@/assets/images/fileBox.png";
 import Cookies from "js-cookie";
@@ -666,6 +668,8 @@ export default {
         const tableBeEnd = ref(true)//控制下拉是否到底
         const tableTotal = ref(0)//表格数据总数
         const isDept = ref(false)// 是否管理员
+        const pathLabelData = ref([
+        ])
         //控制宫格展示
         const isList = ref(false); //控制显示方式
         const changeShow = (fileGrids) => {
@@ -728,7 +732,7 @@ export default {
             })
         }
         function getSpaceList() {
-            myfile.fileType(3).then(res => {
+            myfile.fileType(1).then(res => {
                 useSpace.value = res.data.usedCap
                 allSpace.value = res.data.spaceCap
             })
@@ -753,7 +757,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{
@@ -1174,7 +1178,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
@@ -1184,6 +1197,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
             }
@@ -1193,8 +1223,8 @@ export default {
                 thisFolderRole.value = {}
             }
             thisRole.value = row.dirRole?row.dirRole.split(','):[]
-            console.log('row1', toRaw(row));
-            topPath.value = row.dirPath
+            // console.log('row1', toRaw(row));
+            // topPath.value = row.dirPath
             // console.log('topPath',toRaw(topPath.value));
             newDirId.value = row.dirId
             newSpaceId.value = row.spaceId
@@ -1692,6 +1722,10 @@ export default {
             oneOrTwo.value = 1
             folderCase.value = true
         }
+        const backTopPath = ()=>{
+            pathLabelData.value = ([])
+            getAllTop()
+        }
         onMounted(() => {
             getAllTop()
             getSpaceList()
@@ -1712,6 +1746,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()
                     })
                 }
@@ -1719,29 +1759,29 @@ export default {
             },500)
 
         })
-        onBeforeRouteUpdate((to,from)=>{
-        console.log('to',to);
-        console.log('from',from);
-        if(to.name == 'publicment'){
-            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 == 'publicment'){
+        //     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,//文件夹的数据
@@ -1932,7 +1972,10 @@ export default {
              closeUpload,
             handleRemove,
             loadingUpload,
-            fileBlur
+            fileBlur,
+            pathLabelData,
+            fileBlur,
+            backTopPath
         }
     },
     watch: {
@@ -1950,7 +1993,8 @@ export default {
         SpaceBig,
         PlaceGridFolder,
         PalaceGridFile,
-        inputPassword
+        inputPassword,
+        PathLabel
     },
 }
 
@@ -2130,6 +2174,7 @@ p {
 
     .topPath {
          margin-left: 4px;
+        display: flex;
         cursor: pointer;
         color: #6F85B5;
         font-size: 12px;
@@ -2298,7 +2343,7 @@ p {
 }
 .file-title{
   color: #2E6BC8;
-  margin-left: 30px;
+  margin-left: 3%;
 }
 ::v-deep .el-collapse-item__arrow {
  position: relative;

+ 2 - 2
src/views/publicment/components/createTasnsfer.vue

@@ -129,11 +129,11 @@ function allTreeChange(e) {
 }
 // 获取用户树
 function getAllUser() {
-  userTree.getMentUserTree({}).then((res) => {
+  userTree.getUserTree({}).then((res) => {
     console.log("userTree", res);
     allTreeData.value = [res];
     console.log('open', open.value);
-    userTree.getMentUserTree({}).then((res) => {
+    userTree.getUserTree({}).then((res) => {
       allTreeData.value = [res];
       // 递归函数来获取所有节点的 id
       function getAllNodeIds(nodes) {

+ 4 - 4
vite.config.js

@@ -39,19 +39,19 @@ export default defineConfig(({
 			proxy: {
 				// https://cn.vitejs.dev/config/#server-proxy
 				'/dev-api': {
-					// target: 'http://192.168.1.28:8080/',
+					target: 'http://192.168.1.28:8080/',
 					// target: 'http://192.168.1.11:8080/',
 					// target: 'http://localhost:8080/',
 					// target:'http://192.168.1.28:8080/',
-					target:'http://8.142.173.95:19527',
+					// target:'http://8.142.173.95:19527',
 					changeOrigin: true,
 					rewrite: (p) => p.replace(/^\/dev-api/, '')
 				},
 				//websocket代理
 				'/websocket': {
 					// target:'ws://localhost:8080/websocket',
-					// target:'ws://192.168.1.28:8080/websocket',
-					target:'ws://8.142.173.95:19527/websocket',
+					target:'ws://192.168.1.28:8080/websocket',
+					// target:'ws://8.142.173.95:19527/websocket',
 					// target:'ws://192.168.1.11:8080/websocket',
 					changeOrigin: true,
 					rewrite: (p) => p.replace(/^\/websocket/, '')