فهرست منبع

统计去除其他选项

zhuliu 1 سال پیش
والد
کامیت
238cfdd919
1فایلهای تغییر یافته به همراه12 افزوده شده و 3 حذف شده
  1. 12 3
      src/views/report/components/patentList/components/customFields/index.vue

+ 12 - 3
src/views/report/components/patentList/components/customFields/index.vue

@@ -257,7 +257,7 @@ export default {
             var obj = nums.find(item=>{
               return item.name == '未选择'
             })
-            if(obj){
+            if(obj && obj.number!=0){
               options.push(
                 {
                   id: "未选择",
@@ -290,10 +290,19 @@ export default {
         } else {
           const [num] = await Promise.allSettled([this.esCountAnalysis(row)])
           var nums = num.status == 'fulfilled' ? num.value : []
+          if(row.groupBy == "company"){
+            for(var i = 0;i<nums.length;i++){
+              if(nums[i].name == '其他'){
+                nums.splice(i,1)
+                break;
+              }
+            }
+          }
           this.$set(row, 'options', nums)
           if (!sign) {
-             this.$set(row, 'check', []) 
-            }
+            this.$set(row, 'check', []) 
+          }
+          
           if (row.optionsLength == nums.length || nums.length<10) {
             this.$set(row, 'isShowBtn', false)
             this.$set(row, 'optionsLength', nums.length)