Jelajahi Sumber

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

57862207 1 tahun lalu
induk
melakukan
4f92feac82
1 mengubah file dengan 24 tambahan dan 6 penghapusan
  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;
       }
     })