Browse Source

修改搜索框不选择条件时不能应用的问题

57862207 1 năm trước cách đây
mục cha
commit
4f92feac82
1 tập tin đã thay đổi với 24 bổ sung6 xóa
  1. 24 6
      src/store/modules/bench/mutations.js

+ 24 - 6
src/store/modules/bench/mutations.js

@@ -143,22 +143,40 @@ export default {
           state.filterBenchList = state.filterBenchList.filter(s => s.name.toUpperCase().indexOf(data.value.toUpperCase())>-1);
           break;
         case 'status':
-          state.filterBenchList = state.filterBenchList.filter(s => s.status == data.value);
+          if(data.value!=='Status')
+          {
+            state.filterBenchList = state.filterBenchList.filter(s => s.status == data.value);
+          }
           break;
         case 'project':
-          state.filterBenchList = state.filterBenchList.filter(s => s.Project == data.value);
+          if(data.value!=='Project')
+          {
+            state.filterBenchList = state.filterBenchList.filter(s => s.Project == data.value);
+          }
           break;
         case 'carline':
-          state.filterBenchList = state.filterBenchList.filter(s => s.Carline == data.value);
+          if(data.value!=='Carline')
+          {
+            state.filterBenchList = state.filterBenchList.filter(s => s.Carline == data.value);
+          }
           break;
         case 'variant':
-          state.filterBenchList = state.filterBenchList.filter(s => s.Variant == data.value);
+          if(data.value!=='Variant')
+          {
+            state.filterBenchList = state.filterBenchList.filter(s => s.Variant == data.value);
+          }
           break;
         case 'cluster':
-          state.filterBenchList = state.filterBenchList.filter(s => s.Cluster == data.value);
+          if(data.value!=='Cluster')
+          {
+            state.filterBenchList = state.filterBenchList.filter(s => s.Cluster == data.value);
+          }
           break;
         case 'market':
-          state.filterBenchList = state.filterBenchList.filter(s => s.Market == data.value);
+          if(data.value!=='Market')
+          {
+            state.filterBenchList = state.filterBenchList.filter(s => s.Market == data.value);
+          }
           break;
       }
     })