Quellcode durchsuchen

Merge branch 'v3' of ssh://94.191.59.107:10222/houwenfeng/cloudfile-ui into v3

“yueshang” vor 2 Jahren
Ursprung
Commit
271476b8a9
4 geänderte Dateien mit 26 neuen und 13 gelöschten Zeilen
  1. 2 2
      src/api/biz/favorite.js
  2. 1 1
      src/views/collect/index.vue
  3. 22 9
      src/views/myfile/MyFile.vue
  4. 1 1
      src/views/search/index.vue

+ 2 - 2
src/api/biz/favorite.js

@@ -8,10 +8,10 @@ export function listFavorite(query) {
     params: query
   })
 }
-// 查询文件收藏列表
+// 根据标签收藏列表
 export function listFavoriteById(query) {
   return request({
-    url: '/biz/favorite/listByLabelId',
+    url: '/biz/favorite/list/'+query,
     method: 'get',
     params: query
   })

+ 1 - 1
src/views/collect/index.vue

@@ -354,7 +354,7 @@ const delTabs = async () => {
 };
 //获取收藏数据
 const getCollectList = async () => {
-  const res = await listFavoriteById({labelId :18});
+  const res = await listFavoriteById(17);
     console.log("collectres = ", res);
   if (res.code === 200 && res.rows.length > 0) {
     tableData.value = res.rows;

+ 22 - 9
src/views/myfile/MyFile.vue

@@ -116,8 +116,9 @@
                                 <img style="display:block;width: 16px;height: 16px;" :src="grayRight" alt="">
                             </div>
                             <!-- 面包屑 -->
-                            <div>
-                                <BreadMenu></BreadMenu>
+                            <div class="topPath">
+                                {{topPath}}
+                                <!-- <BreadMenu></BreadMenu> -->
                             </div>
                         </div>
                         <!-- 右侧 -->
@@ -542,6 +543,7 @@ export default {
         const fileCheckout = ref(false)//是否有勾选
         const haveCheck = ref(false)//是否有勾选
         const onlyView = ref(false) //预览
+        const topPath = ref()//顶部路径
         // 获取文件夹,中栏,文件
         function getAllTop() {
             documents.getTop(3).then(res => {
@@ -550,6 +552,7 @@ export default {
                 impSpaceId.value = userMe[0].spaceId//固定
                 newSpaceId.value = userMe[0].spaceId//变化
                 newDirId.value = userMe[0].dirId//变化
+                topPath.value = userMe[0].dirPath
                 let obj = {
                     pageNum: 1,
                     pageSize: 10
@@ -634,6 +637,7 @@ export default {
         }
         // 文件名表格每一行点击事件
         function handleRowClick(row, col, e) {
+            console.log('row',row);
             e.preventDefault();
             e.stopPropagation();
             console.log(e, 'xxyy');
@@ -922,6 +926,9 @@ export default {
             // 上一级dirId就是下一级的parentId
             // 判断是点击打开还是右键菜单打开
             row = row ? row : thisFolder.value
+            // console.log('row', toRaw(row));
+            topPath.value = row.dirPath
+            // console.log('topPath',toRaw(topPath.value));
             newDirId.value = row.dirId
             newSpaceId.value = row.spaceId
             documents.getALLdocument({ parentId: row.dirId - 0, spaceId: row.spaceId - 0 }).then(res => {
@@ -1021,17 +1028,18 @@ export default {
         }
 
         //对mouseCli数组进行筛选,实现菜单的区分显示
-        const filterMouseCli = () => {
-            const array = ['.doc', '.docm', '.docx', '.dot', '.dotm', '.dotx', '.epub', '.fodt', '.htm', '.html', '.mht', '.odt', '.ott', '.pdf', '.rtf', '.txt', '.djvu', '.xps', 'csv', 'fods', 'ods', 'ots', 'xls', 'xlsm', 'xlsx', 'xlt', 'xltm', 'xltx', 'fodp', 'odp', 'otp', 'pot', 'potm', 'potx', 'pps', 'ppsm', 'ppsx', 'ppt', 'pptm', 'pptx']
-            const typeArr = ['.png', '.jpg', '.jpeg', '.JPG', '.mp3', '.mp4', '.pdf']
-            const imgTypeArr = ['.png', '.jpg', '.jpeg', '.JPG']
+        const filterMouseCli = ()=>{
+            const canPreviewArray = ['.doc', '.docm', '.docx', '.dot', '.dotm', '.dotx', '.epub', '.fodt', '.htm', '.html', '.mht', '.odt', '.ott', '.pdf', '.rtf', '.txt', '.djvu', '.xps','csv', 'fods', 'ods', 'ots', 'xls', 'xlsm', 'xlsx', 'xlt', 'xltm', 'xltx','fodp', 'odp', 'otp', 'pot', 'potm', 'potx', 'pps', 'ppsm', 'ppsx', 'ppt', 'pptm', 'pptx']
+            const typeArr = ['.png','.jpg','.jpeg','.JPG','.mp3','.mp4']
+            const imgTypeArr = ['.png','.jpg','.jpeg','.JPG']
+            const canEditArr = ['.doc', '.docm', '.docx', '.dot', '.dotm', '.dotx', '.txt', '.djvu', '.xps','csv', 'fods', 'ods', 'ots', 'xls', 'xlsm', 'xlsx', 'xlt', 'xltm', 'xltx','fodp', 'odp', 'otp']
             let arr = []
-            if (!(typeArr.includes(copyFileType.value) || array.includes(copyFileType.value))) {
+            if (!(typeArr.includes(copyFileType.value) || canPreviewArray.includes(copyFileType.value)) ) {
                 arr = mouseCli.value.filter(item => item.name !== "预览")
             } else {
                 arr = toRaw(mouseCli.value)
             }
-            if (!array.includes(copyFileType.value)) {
+            if(!canEditArr.includes(copyFileType.value)){
                 arr = arr.filter(item => item.name !== "在线编辑" && item.name !== "协作" && item.name !== "历史版本")
             }
             if (!imgTypeArr.includes(copyFileType.value)) {
@@ -1208,6 +1216,7 @@ export default {
             folderTotal,
             fileTotal,
             delMoreFile,//删除多个文件夹
+            topPath
         }
     },
     watch: {
@@ -1358,7 +1367,11 @@ p {
     display: flex;
     justify-content: space-between;
     align-items: center;
-    background-color: #D9E0F0;
+    background-color: #F6F7F9;
+    .topPath{
+        color: #6F85B5;
+        font-size: 12px;
+    }
 }
 
 :deep(.el-collapse-item__header) {

+ 1 - 1
src/views/search/index.vue

@@ -243,7 +243,7 @@ const setIcon = (fileType) => {
 const setType = (fileType) => {
   switch (fileType) {
     case "doc":
-      return ['.txt',".ppd", ".pdf", ".docx", ".csv"];
+      return ['.txt',".ppd", ".pdf", ".docx", ".csv",".wps"];
       break;
     case "img":
       return [".png", ".jpg", ".jpeg"];