|
|
@@ -171,9 +171,14 @@
|
|
|
<el-option v-for="item in leagueTournamentOptions" :key="item.id" :label="item.title" :value="item.id" />
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="所属赛区" prop="leagueTournamentRegion">
|
|
|
- <el-input v-model="form.leagueTournamentRegion" placeholder="请输入赛区" />
|
|
|
+ <el-form-item label="所属赛区" prop="leagueTournamentId">
|
|
|
+ <el-select v-model="form.leagueTournamentRegionId" placeholder="请选择赛区" style="width: 100%" @change="handleCompetitionZoneChange">
|
|
|
+ <el-option v-for="item in competitionZoneOptions" :key="item.id" :label="item.zoneName" :value="item.id" />
|
|
|
+ </el-select>
|
|
|
</el-form-item>
|
|
|
+<!-- <el-form-item label="所属赛区" prop="leagueTournamentRegion">
|
|
|
+ <el-input v-model="form.leagueTournamentRegion" placeholder="请输入赛区" />
|
|
|
+ </el-form-item>-->
|
|
|
<el-form-item label="比赛项目" prop="gameVariant">
|
|
|
<el-select aria-required="true" v-model="form.gameVariant" placeholder="请选择" :disabled="dialog.mode === 'view'">
|
|
|
<el-option v-for="dict in game_variant_type" :key="dict.value" :label="dict.label" :value="dict.value"> </el-option>
|
|
|
@@ -433,12 +438,7 @@
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="晋级条件类型" prop="qualifierType" v-if="form.tournamentType === 1">
|
|
|
- <el-select
|
|
|
- aria-required="true"
|
|
|
- v-model="form.qualifierType"
|
|
|
- placeholder="请选择"
|
|
|
- :disabled="dialog.mode === 'view'"
|
|
|
- >
|
|
|
+ <el-select aria-required="true" v-model="form.qualifierType" placeholder="请选择" :disabled="dialog.mode === 'view'">
|
|
|
<el-option v-for="dict in qualifier_type" :key="dict.value" :label="dict.label" :value="dict.value" />
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
@@ -490,12 +490,14 @@ import { selectPhysicalBlindLevelsById } from '@/api/system/physical/blindLevels
|
|
|
import { uploadTournament } from '@/api/system/business/tournaments';
|
|
|
import { selectPhysicalLeagueTournamentSelList } from '@/api/system/physical/leagueTournament';
|
|
|
import { selectPhysicalJudgeSelList } from '@/api/system/physical/judge';
|
|
|
+import { selectCompetitionZoneSelList } from '@/api/system/physical/competitionZone';
|
|
|
import { parseTime } from '@/utils/dateUtils';
|
|
|
import LevelsIndex from '@/views/system/physical/blindLevels/index.vue';
|
|
|
import { LeagueTournamentVO } from '@/api/system/physical/leagueTournament/types';
|
|
|
import { JudgeVO } from '@/api/system/physical/judge/types';
|
|
|
import { ElSelect } from 'element-plus';
|
|
|
import { ref } from 'vue';
|
|
|
+import { CompetitionZoneVO } from '@/api/system/physical/competitionZone/types';
|
|
|
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
|
|
const { game_variant_type, tournaments_time, physical_tournaments_type, qualifier_type } = toRefs<any>(
|
|
|
proxy?.useDict('game_variant_type', 'tournaments_time', 'physical_tournaments_type', 'qualifier_type')
|
|
|
@@ -950,6 +952,7 @@ onMounted(() => {
|
|
|
loadJudgeOptions();
|
|
|
loadItemPrizeOptions();
|
|
|
loadLeagueRelatedTournaments();
|
|
|
+ loadCompetitionZoneOptions();
|
|
|
});
|
|
|
// 监听路由变化,重新加载数据
|
|
|
watch(
|
|
|
@@ -965,6 +968,7 @@ watch(
|
|
|
loadJudgeOptions();
|
|
|
loadItemPrizeOptions();
|
|
|
loadLeagueRelatedTournaments();
|
|
|
+ loadCompetitionZoneOptions();
|
|
|
}
|
|
|
},
|
|
|
{ immediate: false }
|
|
|
@@ -1354,7 +1358,20 @@ const loadJudgeOptions = async () => {
|
|
|
ElMessage.error('请求失败,请检查网络');
|
|
|
}
|
|
|
};
|
|
|
-
|
|
|
+const competitionZoneOptions = ref<CompetitionZoneVO[]>([]);
|
|
|
+const loadCompetitionZoneOptions = async () => {
|
|
|
+ try {
|
|
|
+ const res = await selectCompetitionZoneSelList();
|
|
|
+ if (res.code === 200 && Array.isArray(res.data)) {
|
|
|
+ competitionZoneOptions.value = res.data;
|
|
|
+ } else {
|
|
|
+ ElMessage.error('加载失败:' + res.msg);
|
|
|
+ }
|
|
|
+ } catch (error) {
|
|
|
+ console.error('请求出错:', error);
|
|
|
+ ElMessage.error('请求失败,请检查网络');
|
|
|
+ }
|
|
|
+};
|
|
|
// 报名条件数据结构
|
|
|
const formConditions = reactive({
|
|
|
conditions: [
|
|
|
@@ -1435,7 +1452,15 @@ const loadTargetTournaments = (query: string) => {
|
|
|
selectOptions.value = leagueRelatedTournaments.value;
|
|
|
return;
|
|
|
}
|
|
|
- // 这里可加模糊搜索逻辑(如 filter)
|
|
|
+ // 这里可加模糊搜索逻辑(如 filter)222
|
|
|
selectOptions.value = leagueRelatedTournaments.value.filter((item) => item.name.toLowerCase().includes(query.toLowerCase()));
|
|
|
};
|
|
|
+const handleCompetitionZoneChange = (value: number) => {
|
|
|
+ const selectedZone = competitionZoneOptions.value.find((item) => item.id === value);
|
|
|
+ if (selectedZone) {
|
|
|
+ form.value.leagueTournamentRegion = selectedZone.zoneName;
|
|
|
+ } else {
|
|
|
+ form.value.leagueTournamentRegion = '';
|
|
|
+ }
|
|
|
+};
|
|
|
</script>
|