Browse Source

Merge branch 'need-pool#756'

cxmo 1 year ago
parent
commit
631bf629d3

+ 8 - 0
src/api/modules/pptApi.js

@@ -146,6 +146,14 @@ export default{
     searchPPTByKeyWorld:params=>{
       return http.get('/pptv2/share/ppt/list',params)
     },
+    /**
+     * 搜索PPT,范围为 我的+公共
+     * @param {String} Keyword 
+     * @returns 
+     */
+    searchPPTByKeyWorldV2:params=>{
+        return http.get('/pptv2/ppt/search',params)
+    },
     /**
      * 移动目录里的ppt
      * GroupPptId

+ 8 - 0
src/api/modules/pptEnApi.js

@@ -131,6 +131,14 @@ export const pptEnInterface = {
     searchPPTByKeyWorld:params=>{
       return http.get('/ppt_english/share/ppt/list',params)
     },
+    /**
+     * 搜索PPT,范围为 我的+公共
+     * @param {String} Keyword 
+     * @returns 
+     */
+    searchPPTByKeyWorldV2:params=>{
+        return http.get('/ppt_english/ppt/search',params)
+      },
     /**
      * 移动目录里的ppt
      * GroupPptId

+ 28 - 14
src/views/ppt_manage/newVersion/pptCatalog.vue

@@ -385,20 +385,34 @@ export default {
   watch:{
     searchTitle(newVal){
       let data = null
-      this.publicList.forEach((item)=>{
+      let search='private'
+      this.privateList.forEach((item)=>{
         item.children.forEach(i=>{
-          if(i.PptId===newVal){
-            data = i
-          }
+            if(i.PptId===newVal){
+                data = i
+                search='private'
+            }
         })
       })
-      this.default_tab = '3';
-      //选中该节点
-      this.$refs.publicTree.setCurrentKey('ppt'+newVal)
-      //展开该节点的父节点...
-      const node = this.$refs.publicTree.getCurrentNode()
-      this.publicExpandKeys.push(node.catalogId)
-      this.nodeChange(data,_,'public')
+      if(!data){
+        this.publicList.forEach((item)=>{
+            item.children.forEach(i=>{
+                if(i.PptId===newVal){
+                    data = i
+                    search='public'
+                }
+            })
+        })
+      }
+      if(data){
+        this.default_tab = search==='public'?'3':'1';
+        //选中该节点
+        this.$refs[`${search}Tree`].setCurrentKey('ppt'+newVal)
+        //展开该节点的父节点...
+        const node = this.$refs[`${search}Tree`].getCurrentNode()
+        this[`${search}ExpandKeys`].push(node.catalogId)
+        this.nodeChange(data,_,search)
+      }
       this.searchOptions=[]
     },
 /*     default_tab(newVal){
@@ -1055,7 +1069,7 @@ export default {
     //搜索ppt标题
     searchHandle(keyword){
       //searchPPT->searchPPTByKeyWorld
-      pptInterface.searchPPTByKeyWorld({
+      pptInterface.searchPPTByKeyWorldV2({
         Keyword:keyword
       }).then(res=>{
         if(res.Ret===200){
@@ -1259,7 +1273,7 @@ export default {
       height: 0;
     }
     .el-tabs__item.is-active {
-      border-bottom: 2px solid #409EFF;
+      border-bottom: 2px solid #0052D9;
     }
     .el-tabs__item { font-size: 16px; }
     .ppt-list-wrap{
@@ -1375,7 +1389,7 @@ export default {
       h3{
         span{
           margin-left: 20px;
-          color:#409EFF;
+          color:#0052D9;
           font-size: 12px;
           font-weight: normal;
         }

+ 32 - 18
src/views/ppt_manage/newVersion/pptEnCatalog.vue

@@ -373,22 +373,36 @@ export default {
   },
   watch:{
     searchTitle(newVal){
-      let data = null
-      this.publicList.forEach((item)=>{
-        item.children.forEach(i=>{
-          if(i.PptId===newVal){
-            data = i
-          }
+        let data = null
+        let search='private'
+        this.privateList.forEach((item)=>{
+            item.children.forEach(i=>{
+                if(i.PptId===newVal){
+                    data = i
+                    search='private'
+                }
+            })
         })
-      })
-      this.default_tab = '3';
-      //选中该节点
-      this.$refs.publicTree.setCurrentKey('ppt'+newVal)
-      //展开该节点的父节点...
-      const node = this.$refs.publicTree.getCurrentNode()
-      this.publicExpandKeys.push(node.catalogId)
-      this.nodeChange(data,_,'public')
-      this.searchOptions=[]
+        if(!data){
+            this.publicList.forEach((item)=>{
+                item.children.forEach(i=>{
+                    if(i.PptId===newVal){
+                        data = i
+                        search='public'
+                    }
+                })
+            })
+        }
+        if(data){
+            this.default_tab = search==='public'?'3':'1';
+            //选中该节点
+            this.$refs[`${search}Tree`].setCurrentKey('ppt'+newVal)
+            //展开该节点的父节点...
+            const node = this.$refs[`${search}Tree`].getCurrentNode()
+            this[`${search}ExpandKeys`].push(node.catalogId)
+            this.nodeChange(data,_,search)
+        }
+        this.searchOptions=[]
     },
   },
   methods: {
@@ -974,7 +988,7 @@ export default {
     },
     //搜索ppt标题
     searchHandle(keyword){
-      pptEnInterface.searchPPTByKeyWorld({
+      pptEnInterface.searchPPTByKeyWorldV2({
         Keyword:keyword
       }).then(res=>{
         if(res.Ret===200){
@@ -1154,7 +1168,7 @@ export default {
       height: 0;
     }
     .el-tabs__item.is-active {
-      border-bottom: 2px solid #409EFF;
+      border-bottom: 2px solid #0052D9;
     }
     .el-tabs__item { font-size: 16px; }
     .ppt-list-wrap{
@@ -1269,7 +1283,7 @@ export default {
       h3{
         span{
           margin-left: 20px;
-          color:#409EFF;
+          color:#0052D9;
           font-size: 12px;
           font-weight: normal;
         }