|
|
@@ -88,6 +88,11 @@
|
|
|
<!-- <el-table-column type="selection" width="55" align="center" />-->
|
|
|
<el-table-column label="比赛ID" align="center" prop="id" width="70" />
|
|
|
<el-table-column label="比赛名" align="center" prop="name" />
|
|
|
+ <el-table-column label="比赛项目" align="center" prop="gameVariant">
|
|
|
+ <template #default="scope">
|
|
|
+ {{ getGameVariantText(scope.row.gameVariant) }}
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
<el-table-column label="比赛Logo" align="center" width="90">
|
|
|
<template #default="scope">
|
|
|
<el-image
|
|
|
@@ -129,6 +134,27 @@
|
|
|
}}
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
+ <el-table-column label="比赛类目" align="center">
|
|
|
+ <template #default="scope">
|
|
|
+ <span v-if="scope.row.categoryName && scope.row.categoryName.length > 0">
|
|
|
+ <el-tag v-for="(category, index) in scope.row.categoryName" :key="index" type="primary" style="margin-right: 4px">
|
|
|
+ {{ category }}
|
|
|
+ </el-tag>
|
|
|
+ </span>
|
|
|
+ <span v-else>-</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+
|
|
|
+ <el-table-column label="比赛标签" align="center">
|
|
|
+ <template #default="scope">
|
|
|
+ <span v-if="scope.row.tagName && scope.row.tagName.length > 0">
|
|
|
+ <el-tag v-for="(tag, index) in scope.row.tagName" :key="index" type="success" style="margin-right: 4px">
|
|
|
+ {{ tag }}
|
|
|
+ </el-tag>
|
|
|
+ </span>
|
|
|
+ <span v-else>-</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
|
|
|
<el-table-column label="截止盲注等级" align="center" prop="lateRegistrationLevel" />
|
|
|
<el-table-column label="盲注表" align="center" prop="blindStructuresName" />
|
|
|
@@ -161,11 +187,7 @@
|
|
|
</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column label="玩法类型" align="center" prop="gameVariant">
|
|
|
- <template #default="scope">
|
|
|
- {{ getGameVariantText(scope.row.gameVariant) }}
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
+
|
|
|
|
|
|
<!-- <el-table-column label="是否删除" align="center">
|
|
|
<template #default="scope">
|
|
|
@@ -381,7 +403,15 @@
|
|
|
|
|
|
<el-form-item label="比赛标签" prop="tagId">
|
|
|
<div style="display: flex; align-items: center">
|
|
|
- <el-select v-model="form.tagId" placeholder="选项" style="width: 200px" :disabled="dialog.mode === 'view'">
|
|
|
+ <el-select
|
|
|
+ v-model="form.tagId"
|
|
|
+ placeholder="选项"
|
|
|
+ style="width: 200px"
|
|
|
+ :disabled="dialog.mode === 'view'"
|
|
|
+ multiple
|
|
|
+ collapse-tags
|
|
|
+ collapse-tags-tooltip
|
|
|
+ >
|
|
|
<el-option v-for="item in itemOptionsTagList" :key="item.id" :label="item.label" :value="item.id" />
|
|
|
</el-select>
|
|
|
<el-button type="primary" :disabled="dialog.mode === 'view'" @click="handleGoToTag"> 标签管理 </el-button>
|
|
|
@@ -389,7 +419,15 @@
|
|
|
</el-form-item>
|
|
|
<el-form-item label="比赛类目" prop="categoryId">
|
|
|
<div style="display: flex; align-items: center">
|
|
|
- <el-select v-model="form.categoryId" placeholder="选项" style="width: 200px" :disabled="dialog.mode === 'view'">
|
|
|
+ <el-select
|
|
|
+ v-model="form.categoryId"
|
|
|
+ placeholder="选项"
|
|
|
+ style="width: 200px"
|
|
|
+ :disabled="dialog.mode === 'view'"
|
|
|
+ multiple
|
|
|
+ collapse-tags
|
|
|
+ collapse-tags-tooltip
|
|
|
+ >
|
|
|
<el-option v-for="item in itemOptionsCategoryList" :key="item.id" :label="item.label" :value="item.id" />
|
|
|
</el-select>
|
|
|
<el-button type="primary" :disabled="dialog.mode === 'view'" @click="handleGoToCategory"> 类目管理 </el-button>
|
|
|
@@ -1001,7 +1039,9 @@ const initFormData: TournamentsForm = {
|
|
|
delayCardTime: 15,
|
|
|
isSponsor: 1, // 添加赞助商标识,默认为否
|
|
|
isDelay: 1,
|
|
|
- rebuyLimit: null
|
|
|
+ rebuyLimit: null,
|
|
|
+ tagId: [], // 修改为数组形式以支持多选
|
|
|
+ categoryId: []
|
|
|
};
|
|
|
const data = reactive<PageData<TournamentsForm, TournamentsQuery>>({
|
|
|
form: { ...initFormData },
|
|
|
@@ -1245,6 +1285,16 @@ const handleUpdate = async (row?: TournamentsVO, mode: 'edit' | 'view' = 'edit')
|
|
|
form.value.rebuy = res.data.rebuy;
|
|
|
form.value.rebuyLimit = null;
|
|
|
}
|
|
|
+ // 确保tagId是数组格式
|
|
|
+ if (!Array.isArray(form.value.tagId)) {
|
|
|
+ form.value.tagId = form.value.tagId ? [form.value.tagId] : [];
|
|
|
+ }
|
|
|
+
|
|
|
+ // 确保categoryId是数组格式
|
|
|
+ if (!Array.isArray(form.value.categoryId)) {
|
|
|
+ form.value.categoryId = form.value.categoryId ? [form.value.categoryId] : [];
|
|
|
+ }
|
|
|
+
|
|
|
// 处理奖励表单数据
|
|
|
const prizeItems = res.data.itemsPrizeList || [];
|
|
|
if (prizeItems.length > 0) {
|
|
|
@@ -1287,10 +1337,19 @@ const submitForm = () => {
|
|
|
if (data.form.rebuy === 1) {
|
|
|
submitRebuyValue = data.form.rebuyLimit;
|
|
|
}
|
|
|
-
|
|
|
+ // 确保tagId始终是数组格式
|
|
|
+ let submitTagId = data.form.tagId;
|
|
|
+ if (!Array.isArray(submitTagId)) {
|
|
|
+ submitTagId = submitTagId ? [submitTagId] : [];
|
|
|
+ }
|
|
|
+ // 确保categoryId是数组格式
|
|
|
+ if (!Array.isArray(form.value.categoryId)) {
|
|
|
+ form.value.categoryId = form.value.categoryId ? [form.value.categoryId] : [];
|
|
|
+ }
|
|
|
// 构造最终要提交的数据对象
|
|
|
const formData: TournamentsForm = {
|
|
|
...data.form,
|
|
|
+ tagId: submitTagId, // 使用处理后的tagId值
|
|
|
rebuy: submitRebuyValue, // 使用处理后的rebuy值
|
|
|
competitionIcon: data.form.competitionIcon, // 确保 iconUrl 存在
|
|
|
itemsPrizeList: formPrize.rewards.map((reward) => ({
|
|
|
@@ -1942,20 +2001,7 @@ const handleSelectVisibleChange = async (visible: boolean) => {
|
|
|
await remoteMethod('');
|
|
|
}
|
|
|
};
|
|
|
-// 添加游戏玩法类型文本转换函数
|
|
|
-const getGameVariantText = (value: string | number | null | undefined): string => {
|
|
|
- const numValue = Number(value);
|
|
|
- switch (numValue) {
|
|
|
- case 0:
|
|
|
- return '德州扑克';
|
|
|
- case 1:
|
|
|
- return '奥马哈';
|
|
|
- case 2:
|
|
|
- return '短牌';
|
|
|
- default:
|
|
|
- return '未知';
|
|
|
- }
|
|
|
-};
|
|
|
+
|
|
|
const handleQualifierTypeChange = (value: string) => {
|
|
|
// Clear the qualifierValue when qualifierType changes
|
|
|
form.value.qualifierValue = null;
|
|
|
@@ -2023,6 +2069,19 @@ const handleIsDelayChange = (value: number) => {
|
|
|
form.value.delayCardNum = 4;
|
|
|
}
|
|
|
};
|
|
|
+const getGameVariantText = (value: string | number | null | undefined): string => {
|
|
|
+ const numValue = Number(value);
|
|
|
+ switch (numValue) {
|
|
|
+ case 0:
|
|
|
+ return '德州扑克';
|
|
|
+ case 1:
|
|
|
+ return '奥马哈';
|
|
|
+ case 2:
|
|
|
+ return '短牌';
|
|
|
+ default:
|
|
|
+ return '未知';
|
|
|
+ }
|
|
|
+};
|
|
|
</script>
|
|
|
<style scoped>
|
|
|
.more-rewards {
|