|
|
@@ -358,7 +358,7 @@
|
|
|
|
|
|
<!-- 道具选择 -->
|
|
|
<el-select v-model="reward.itemId" placeholder="选项" style="width: 120px; margin-right: 8px" :disabled="dialog.mode === 'view'">
|
|
|
- <el-option v-for="item in itemOptions" :key="item.id" :label="item.label" :value="item.id" />
|
|
|
+ <el-option v-for="item in itemPrizeOptions" :key="item.id" :label="item.label" :value="item.id" />
|
|
|
</el-select>
|
|
|
|
|
|
<!-- 数量输入 -->
|
|
|
@@ -418,7 +418,7 @@
|
|
|
<script setup name="Tournaments" lang="ts">
|
|
|
import { listTournaments, getTournaments, delTournaments, addTournaments, updateTournaments } from '@/api/system/physical/tournaments';
|
|
|
import { TournamentsVO, TournamentsQuery, TournamentsForm } from '@/api/system/physical/tournaments/types';
|
|
|
-import { selectItemsSelList } from '@/api/system/business/items';
|
|
|
+import { selectItemsSelList, selectXianXiaItemsSelList } from '@/api/system/business/items';
|
|
|
import { selectPhysicalBlingStructuresInfo } from '@/api/system/physical/blindStructures';
|
|
|
import { selectPhysicalBlindLevelsById } from '@/api/system/physical/blindLevels';
|
|
|
import { uploadTournament } from '@/api/system/business/tournaments';
|
|
|
@@ -858,12 +858,13 @@ onMounted(() => {
|
|
|
loadItemStructuresOptions();
|
|
|
loadLeagueTournamentOptions();
|
|
|
loadJudgeOptions();
|
|
|
+ loadItemPrizeOptions();
|
|
|
});
|
|
|
const itemOptions = ref<{ id: number; label: string }[]>([]);
|
|
|
// 加载报名条件选项
|
|
|
const loadItemOptions = async () => {
|
|
|
try {
|
|
|
- const res = await selectItemsSelList();
|
|
|
+ const res = await selectXianXiaItemsSelList();
|
|
|
if (res.code === 200) {
|
|
|
// 类型断言
|
|
|
const data = res.data as unknown as { id: number; name: string }[];
|
|
|
@@ -883,6 +884,31 @@ const loadItemOptions = async () => {
|
|
|
ElMessage.error('请求失败,请检查网络');
|
|
|
}
|
|
|
};
|
|
|
+const itemPrizeOptions = ref<{ id: number; label: string }[]>([]);
|
|
|
+// 加载报名条件选项
|
|
|
+const loadItemPrizeOptions = async () => {
|
|
|
+ try {
|
|
|
+ const res = await selectItemsSelList();
|
|
|
+ if (res.code === 200) {
|
|
|
+ // 类型断言
|
|
|
+ const data = res.data as unknown as { id: number; name: string }[];
|
|
|
+
|
|
|
+ // 过滤掉 id === 2 的项,并映射为 { id, label }
|
|
|
+ itemPrizeOptions.value = data
|
|
|
+ .filter((item) => item.id !== 2) // ✅ 过滤 id 为 2 的
|
|
|
+ .map((item) => ({
|
|
|
+ id: item.id,
|
|
|
+ label: item.name
|
|
|
+ }));
|
|
|
+ } else {
|
|
|
+ ElMessage.error('加载失败:' + res.msg);
|
|
|
+ }
|
|
|
+ } catch (error) {
|
|
|
+ console.error('请求出错:', error);
|
|
|
+ ElMessage.error('请求失败,请检查网络');
|
|
|
+ }
|
|
|
+};
|
|
|
+
|
|
|
// 下拉选项数据 selectPhysicalBlingStructuresInfo
|
|
|
const itemOptionsStructures = ref<{ id: number; label: string }[]>([]);
|
|
|
const loadItemStructuresOptions = async () => {
|