Przeglądaj źródła

feat(system): 在比赛和模板页面添加上传新盲注按钮的功能- 在 tournaments 和 tournamentsTemplate 页面中,为上传新盲注按钮添加点击事件处理函数
- 实现 handleGoToStructures 方法,用于关闭当前弹窗并跳转到盲注表页面
- 优化按钮布局,确保预览按钮在上传新盲注按钮之后

fugui001 4 miesięcy temu
rodzic
commit
d53a48243b

+ 9 - 1
src/views/system/business/tournaments/index.vue

@@ -256,7 +256,7 @@
               <el-option v-for="item in itemOptionsStructures" :key="item.id" :label="item.label" :value="item.id" />
               <el-option v-for="item in itemOptionsStructures" :key="item.id" :label="item.label" :value="item.id" />
             </el-select>
             </el-select>
 
 
-            <el-button type="primary" :disabled="dialog.mode === 'view'">上传新盲注</el-button>
+            <el-button type="primary" :disabled="dialog.mode === 'view'" @click="handleGoToStructures"> 上传新盲注 </el-button>
             <el-button type="primary" @click="handleViewLevels" :disabled="dialog.mode === 'view'">预览</el-button>
             <el-button type="primary" @click="handleViewLevels" :disabled="dialog.mode === 'view'">预览</el-button>
           </div>
           </div>
         </el-form-item>
         </el-form-item>
@@ -1244,4 +1244,12 @@ const handleViewHistory = (row: ClaimsVO) => {
   });
   });
   auditDialog.value.visible = false;
   auditDialog.value.visible = false;
 };
 };
+// 跳转到盲注表页面,并关闭当前弹窗
+const handleGoToStructures = () => {
+  dialog.visible = false; // 关闭弹窗
+  // 使用 nextTick 确保关闭动画完成后跳转(可选)
+  nextTick(() => {
+    proxy?.$router.push('/business/structures');
+  });
+};
 </script>
 </script>

+ 9 - 1
src/views/system/business/tournamentsTemplate/index.vue

@@ -204,7 +204,7 @@
               <el-option v-for="item in itemOptionsStructures" :key="item.id" :label="item.label" :value="item.id" />
               <el-option v-for="item in itemOptionsStructures" :key="item.id" :label="item.label" :value="item.id" />
             </el-select>
             </el-select>
 
 
-            <el-button type="primary" :disabled="dialog.mode === 'view'">上传新盲注</el-button>
+            <el-button type="primary" :disabled="dialog.mode === 'view'" @click="handleGoToStructures"> 上传新盲注 </el-button>
             <el-button type="primary" @click="handleViewLevels" :disabled="dialog.mode === 'view'">预览</el-button>
             <el-button type="primary" @click="handleViewLevels" :disabled="dialog.mode === 'view'">预览</el-button>
           </div>
           </div>
         </el-form-item>
         </el-form-item>
@@ -915,4 +915,12 @@ const handleSortChange = ({ prop, order }) => {
     getList();
     getList();
   }
   }
 };
 };
+// 跳转到盲注表页面,并关闭当前弹窗
+const handleGoToStructures = () => {
+  dialog.visible = false; // 关闭弹窗
+  // 使用 nextTick 确保关闭动画完成后跳转(可选)
+  nextTick(() => {
+    proxy?.$router.push('/business/structures');
+  });
+};
 </script>
 </script>