|
|
@@ -107,11 +107,14 @@
|
|
|
<el-table-column type="selection" width="55" align="center" />
|
|
|
|
|
|
<!-- 第二列:操作列 -->
|
|
|
- <el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="120">
|
|
|
+ <el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="160">
|
|
|
<template #default="scope">
|
|
|
<el-tooltip content="修改" placement="top">
|
|
|
<el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)" v-hasPermi="['system:gameEvent:edit']"> 修改 </el-button>
|
|
|
</el-tooltip>
|
|
|
+ <el-tooltip content="生成赛事链接" placement="top">
|
|
|
+ <el-button link type="warning" icon="Edit" @click="handleUpdateCode(scope.row)" v-hasPermi="['system:gameEvent:edit']"> 生成赛事码 </el-button>
|
|
|
+ </el-tooltip>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column label="赛事id" align="center" prop="eventId" v-if="columns[0].visible" />
|
|
|
@@ -138,9 +141,9 @@
|
|
|
<span>{{ parseTime(scope.row.endTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column label="赛事链接" align="center" prop="eventUrlUrl" width="100" v-if="columns[8].visible">
|
|
|
+ <el-table-column label="赛事链接" align="center" prop="eventUrl" width="100" v-if="columns[8].visible">
|
|
|
<template #default="scope">
|
|
|
- <image-preview :src="scope.row.eventUrlUrl" :width="50" :height="50" />
|
|
|
+ <image-preview :src="scope.row.eventUrl" :width="50" :height="50" />
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column label="裁判码" align="center" prop="refereeUrlUrl" width="100" v-if="columns[9].visible">
|
|
|
@@ -401,7 +404,7 @@
|
|
|
</template>
|
|
|
|
|
|
<script setup name="GameEvent" lang="ts">
|
|
|
-import { listGameEvent, changeEventDefault, delGameEvent, addGameEvent, updateGameEvent, generateNumberTable } from '@/api/system/gameEvent';
|
|
|
+import { listGameEvent, changeEventDefault, delGameEvent, addGameEvent, updateGameEvent, updateGameEventWxCode } from '@/api/system/gameEvent';
|
|
|
import { GameEventVO, GameEventQuery, GameEventForm } from '@/api/system/gameEvent/types';
|
|
|
import { getEventMdByEventAndType, editEventMd } from '@/api/system/eventMd';
|
|
|
import { EventMdVO, EventMdForm } from '@/api/system/eventMd/types';
|
|
|
@@ -579,6 +582,13 @@ const handleUpdate = async (row?: GameEventVO) => {
|
|
|
router.push(`/system/gameEvent/edit/${_eventId}`);
|
|
|
};
|
|
|
|
|
|
+/** 生成赛事码按钮操作 */
|
|
|
+const handleUpdateCode = async (row?: GameEventVO) => {
|
|
|
+ const _eventId = row?.eventId || ids.value[0];
|
|
|
+ await updateGameEventWxCode(_eventId);
|
|
|
+ await getList();
|
|
|
+};
|
|
|
+
|
|
|
/** 提交按钮 */
|
|
|
const submitForm = () => {
|
|
|
gameEventFormRef.value?.validate(async (valid: boolean) => {
|