Эх сурвалжийг харах

改ppt搜索范围 英文

cxmo 1 жил өмнө
parent
commit
de8a66f49f

+ 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

+ 2 - 2
src/views/ppt_manage/newVersion/pptCatalog.vue

@@ -1273,7 +1273,7 @@ export default {
       height: 0;
     }
     .el-tabs__item.is-active {
-      border-bottom: 2px solid #0052D9;;
+      border-bottom: 2px solid #0052D9;
     }
     .el-tabs__item { font-size: 16px; }
     .ppt-list-wrap{
@@ -1389,7 +1389,7 @@ export default {
       h3{
         span{
           margin-left: 20px;
-          color:#0052D9;;
+          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;
         }