|
@@ -114,6 +114,11 @@
|
|
|
<el-tooltip content="编辑" placement="top">
|
|
<el-tooltip content="编辑" placement="top">
|
|
|
<el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row, 'edit')">编辑</el-button>
|
|
<el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row, 'edit')">编辑</el-button>
|
|
|
</el-tooltip>
|
|
</el-tooltip>
|
|
|
|
|
+
|
|
|
|
|
+ <el-tooltip content="复制" placement="top">
|
|
|
|
|
+ <el-button link type="primary" icon="Copy" @click="handleCopy(scope.row)">复制</el-button>
|
|
|
|
|
+ </el-tooltip>
|
|
|
|
|
+
|
|
|
<el-tooltip content="领奖审核" placement="top">
|
|
<el-tooltip content="领奖审核" placement="top">
|
|
|
<el-button link type="primary" icon="Edit" @click="openAuditDialog(scope.row.id, 'audit')">领奖审核</el-button>
|
|
<el-button link type="primary" icon="Edit" @click="openAuditDialog(scope.row.id, 'audit')">领奖审核</el-button>
|
|
|
</el-tooltip>
|
|
</el-tooltip>
|
|
@@ -1185,4 +1190,43 @@ const handleViewLevelsSee = (tournamentsVO: TournamentsVO | undefined | null) =>
|
|
|
dialogParams.value.name = tournamentsVO.blindStructuresName ?? '';
|
|
dialogParams.value.name = tournamentsVO.blindStructuresName ?? '';
|
|
|
levelsDialogVisible.value = true;
|
|
levelsDialogVisible.value = true;
|
|
|
};
|
|
};
|
|
|
|
|
+
|
|
|
|
|
+/** 修改按钮操作 */
|
|
|
|
|
+const handleCopy = async (row?: TournamentsVO) => {
|
|
|
|
|
+ reset(); // 重置表单
|
|
|
|
|
+
|
|
|
|
|
+ const _id = row?.id || ids.value[0];
|
|
|
|
|
+ const res = await getTournaments(_id);
|
|
|
|
|
+ // 确保 gameType 是 number 类型
|
|
|
|
|
+ const gameType = Number(res.data.gameType);
|
|
|
|
|
+ const signTime = Number(res.data.signTime);
|
|
|
|
|
+ debugger;
|
|
|
|
|
+ // 设置表单数据
|
|
|
|
|
+ res.data.id = null;
|
|
|
|
|
+ Object.assign(form.value, res.data);
|
|
|
|
|
+ form.value.gameType = gameType; // 确保赋值正确
|
|
|
|
|
+ form.value.signTime = signTime;
|
|
|
|
|
+
|
|
|
|
|
+ competitionIcon.value = res.data.competitionIcon;
|
|
|
|
|
+ // 处理奖励表单数据
|
|
|
|
|
+ const prizeItems = res.data.itemsPrizeList || [];
|
|
|
|
|
+ if (prizeItems.length > 0) {
|
|
|
|
|
+ formPrize.rewards = prizeItems.map((item, index) => ({
|
|
|
|
|
+ ranking: item.ranking || index + 1,
|
|
|
|
|
+ itemId: Number(item.itemId),
|
|
|
|
|
+ quantity: Number(item.quantity)
|
|
|
|
|
+ }));
|
|
|
|
|
+ } else {
|
|
|
|
|
+ formPrize.rewards = [
|
|
|
|
|
+ {
|
|
|
|
|
+ ranking: 1,
|
|
|
|
|
+ itemId: null,
|
|
|
|
|
+ quantity: null
|
|
|
|
|
+ }
|
|
|
|
|
+ ];
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ dialog.visible = true;
|
|
|
|
|
+ dialog.title = '创建比赛';
|
|
|
|
|
+};
|
|
|
</script>
|
|
</script>
|