Ver código fonte

筛选中场

flyzto 3 meses atrás
pai
commit
f02a215b34
1 arquivos alterados com 14 adições e 0 exclusões
  1. 14 0
      web/apps/web-antd/src/views/match/datatest/index.vue

+ 14 - 0
web/apps/web-antd/src/views/match/datatest/index.vue

@@ -74,6 +74,9 @@
           <Button @click="filterLive" :disabled="buttonDisabled">
             筛选滚球
           </Button>
+          <Button @click="filterHalf" :disabled="buttonDisabled">
+            筛选中场
+          </Button>
         </div>
       </div>
     </div>
@@ -204,6 +207,17 @@ const filterLive = () => {
   console.log('liveSolutions', liveSolutions);
 }
 
+const filterHalf = () => {
+  const solutions = gamesSolution.value.solutions;
+  const halfSolutions = solutions.filter((solution) => {
+    const { info: { ob, hg, ps } } = solution;
+    return ps.stage === 'HT';
+  });
+  dataCount.value = `${halfSolutions.length}`;
+  showDataPretty(halfSolutions, 2);
+  console.log('halfSolutions', halfSolutions);
+}
+
 // const currentTime = ref('')
 
 // const updateTime = () => {