Sfoglia il codice sorgente

feat(tournaments): 过滤盲注级别中的break项

- 更新类型定义以包含 isBreak 字段
- 在数据处理逻辑中排除 isBreak 为 1 的项
- 确保下拉选项中不显示标记为 break 的级别
fugui001 1 mese fa
parent
commit
3f06605e65
1 ha cambiato i file con 8 aggiunte e 5 eliminazioni
  1. 8 5
      src/views/system/physical/tournaments/index.vue

+ 8 - 5
src/views/system/physical/tournaments/index.vue

@@ -792,14 +792,17 @@ const handleBlindStructureChange = async (value: number) => {
     const res = await selectPhysicalBlindLevelsById(value);
     if (res.code === 200) {
       // 使用 unknown 中间类型进行类型转换
-      const data2 = res.data as unknown as { id: number; levelNumber: number }[];
+      const data2 = res.data as unknown as { id: number; levelNumber: number; isBreak: number }[];
       const list = [];
       for (let i = 0; i < data2.length; i++) {
         const item = data2[i];
-        list.push({
-          id: item.levelNumber,
-          label: item.levelNumber
-        });
+        // 排除 is_break(是Break) 为 1 的项
+        if (!item.isBreak) {
+          list.push({
+            id: item.levelNumber,
+            label: item.levelNumber
+          });
+        }
       }
       itemOptionsStructuresLevel.value = list;
       // 判断当前选择的 lateRegistrationLevel 是否在新列表中