Selaa lähdekoodia

统计加载更多的显示

zhuliu 1 vuosi sitten
vanhempi
commit
6617ca3881

+ 18 - 8
src/views/report/components/patentList/components/customFields/index.vue

@@ -255,7 +255,7 @@ export default {
         if (row.filedKind != -1 && (row.type == 'Array' || row.type == 'tree')) {
           if (row.filedKind == 0) {
             const [num, option] = await Promise.allSettled([this.esCountAnalysis(row), this.queryCustomOption(row)])
-            var nums = num.status == 'fulfilled' ? num.value : []
+            var nums = num.status == 'fulfilled' ? num.value.detailDTOS : []
             var options = option.status == 'fulfilled' ? option.value : []
             var obj = nums.find(item=>{
               return item.name == '未选择'
@@ -282,7 +282,7 @@ export default {
               9: '3'
             }
             const [num,option] = await Promise.allSettled([this.esCountAnalysis(row),this.queryProductCategory(row,type[row.filedKind])])
-            var nums = num.status == 'fulfilled' ? num.value : []
+            var nums = num.status == 'fulfilled' ? num.value.detailDTOS : []
             var options = option.status == 'fulfilled' ? option.value : []
             this.$set(row, 'options', options)
             if (!sign) {
@@ -292,7 +292,7 @@ export default {
           }
         } else {
           const [num] = await Promise.allSettled([this.esCountAnalysis(row)])
-          var nums = num.status == 'fulfilled' ? num.value : []
+          var nums = num.status == 'fulfilled' ? num.value.detailDTOS : []
           // if(row.groupBy == "company"){
             for(var i = 0;i<nums.length;i++){
               if(nums[i].name == '其他'){
@@ -305,13 +305,23 @@ export default {
           if (!sign) {
             this.$set(row, 'check', []) 
           }
-          if (row.optionsLength == nums.length || nums.length<10) {
+          if(nums.length>0){
+            row.optionsLength = num.value.remainingNum
+          }else{
+            row.optionsLength = 0
+          }
+          if(row.optionsLength == 0){
             this.$set(row, 'isShowBtn', false)
-            this.$set(row, 'optionsLength', nums.length)
-          } else {
+          }else{
             this.$set(row, 'isShowBtn', true)
-            this.$set(row, 'optionsLength', nums.length)
           }
+          // if (row.optionsLength == nums.length || nums.length<10) {
+          //   this.$set(row, 'isShowBtn', false)
+          //   this.$set(row, 'optionsLength', nums.length)
+          // } else {
+          //   this.$set(row, 'isShowBtn', true)
+          //   this.$set(row, 'optionsLength', nums.length)
+          // }
         }
       }
     },
@@ -349,7 +359,7 @@ export default {
         countVOS: countVOS,//栏位的聚合入参
         customFields: this.customFields,//自定义栏位查询
       }
-      return await this.$api.esCountAnalysis(params).then(res => res.data.detailDTOS)
+      return await this.$api.esCountAnalysis(params).then(res => res.data)
       this.$api.esCountAnalysis(params).then(res => {
         if (res.code == 200) {
           var data = []