Procházet zdrojové kódy

Merge branch 'debug' of http://8.136.199.33:3000/eta_gn_front/eta_front into debug

Karsa před 5 měsíci
rodič
revize
3f9e49c470
1 změnil soubory, kde provedl 27 přidání a 8 odebrání
  1. 27 8
      src/views/approve_manage/approveSetting.vue

+ 27 - 8
src/views/approve_manage/approveSetting.vue

@@ -91,8 +91,9 @@ export default {
     data() {
         return {
             /* 列表筛选项 */
-            ClassifyFirstId:0,//研报倒数第二级分类id
-            ClassifySecondId:0,//研报最后一级分类id
+            ClassifyFirstId:0,//研报第一级分类id
+            ClassifySecondId:0,//研报第二级分类id
+            ClassifyThirdld:0,//研报第三级分类id
             ReportType:0,//研报类型 1-中文研报;2-英文研报;3-智能研报
             SortRule:0,//排序规则:1-正序; 2-倒序(默认)
             ClassifyId:0,//bi审批看板选中分类id
@@ -119,6 +120,7 @@ export default {
           this.ReportType = 0;
           this.ClassifyFirstId = 0;
           this.ClassifySecondId = 0;
+          this.ClassifyThirdld = 0;
           this.ClassifyId = 0;
           this.$refs.reftable&&this.$refs.reftable.clearSort();
           tabName == 'report' ? this.getClassifyTree() : this.getBIClassifyTree();
@@ -130,18 +132,34 @@ export default {
         },
         handleSearchChange(){
             if(this.activeMainTab == 'report'){
+                // this.ClassifySecondId = this.classify[this.classify.length-1]||0
+                // if(this.classify.length>=3){
+                //     this.ClassifyFirstId = this.classify[this.classify.length-2]||0
+                // }else{
+                //     this.ClassifyFirstId = 0
+                // }
                 this.ReportType = this.classify[0]||0
-                this.ClassifySecondId = this.classify[this.classify.length-1]||0
-                if(this.classify.length>=3){
-                    this.ClassifyFirstId = this.classify[this.classify.length-2]||0
-                }else{
-                    this.ClassifyFirstId = 0
-                }
+                this.handleReportClassifyId()
             } else {
                 this.ClassifyId = this.classify[0] || 0;
             }
             this.handleCurrentChange(1)
         },
+        handleReportClassifyId(){
+            if(this.classify.length === 2){
+                this.ClassifyFirstId = this.classify[this.classify.length-1]||0;
+                this.ClassifySecondId = 0;
+                this.ClassifyThirdld = 0;
+            } else if(this.classify.length === 3){
+                this.ClassifyFirstId = this.classify[this.classify.length-2]||0
+                this.ClassifySecondId = this.classify[this.classify.length-1]||0
+                this.ClassifyThirdld = 0;
+            } else {  //分类最多只有三级
+                this.ClassifyFirstId = this.classify.length > 1 ? this.classify[this.classify.length-3]||0 : 0;
+                this.ClassifySecondId = this.classify.length > 1 ? this.classify[this.classify.length-2]||0 : 0;
+                this.ClassifyThirdld = this.classify.length > 1 ? this.classify[this.classify.length-1]||0 : 0;
+            }
+        },
         sortChange({prop,order}){
             this.SortRule = order==='ascending'?1:2
             if(!order) this.SortRule = 0;
@@ -161,6 +179,7 @@ export default {
                     ReportType:this.ReportType,
                     ClassifyFirstId:this.ClassifyFirstId,
                     ClassifySecondId:this.ClassifySecondId,
+                    ClassifyThirdld:this.ClassifyThirdld,
                 }).then(res=>{
                     if(res.Ret!==200) return 
                     const {List=[],Paging={}} = res.Data||{}