|
@@ -31,11 +31,11 @@
|
|
|
<el-col :span="1.5">
|
|
<el-col :span="1.5">
|
|
|
<el-button type="primary" plain icon="Plus" @click="handleAdd" v-hasPermi="['business:tournaments:add']">创立比赛</el-button>
|
|
<el-button type="primary" plain icon="Plus" @click="handleAdd" v-hasPermi="['business:tournaments:add']">创立比赛</el-button>
|
|
|
</el-col>
|
|
</el-col>
|
|
|
- <el-col :span="1.5">
|
|
|
|
|
|
|
+ <!-- <el-col :span="1.5">
|
|
|
<el-button type="success" plain icon="Edit" :disabled="single" @click="handleUpdate()" v-hasPermi="['business:tournaments:edit']"
|
|
<el-button type="success" plain icon="Edit" :disabled="single" @click="handleUpdate()" v-hasPermi="['business:tournaments:edit']"
|
|
|
>编辑</el-button
|
|
>编辑</el-button
|
|
|
>
|
|
>
|
|
|
- </el-col>
|
|
|
|
|
|
|
+ </el-col>-->
|
|
|
<!-- <el-col :span="1.5">
|
|
<!-- <el-col :span="1.5">
|
|
|
<el-button type="danger" plain icon="Delete" :disabled="multiple" @click="handleDelete()" v-hasPermi="['business:tournaments:remove']"
|
|
<el-button type="danger" plain icon="Delete" :disabled="multiple" @click="handleDelete()" v-hasPermi="['business:tournaments:remove']"
|
|
|
>删除</el-button
|
|
>删除</el-button
|
|
@@ -47,11 +47,15 @@
|
|
|
|
|
|
|
|
<!-- 新增的 “盲注管理” 按钮 -->
|
|
<!-- 新增的 “盲注管理” 按钮 -->
|
|
|
<el-col :span="1.5">
|
|
<el-col :span="1.5">
|
|
|
- <el-button type="info" plain icon="Operation" v-hasPermi="['business:tournaments:manager']">
|
|
|
|
|
|
|
+ <el-button type="warning" plain icon="Operation" v-hasPermi="['business:tournaments:manager']">
|
|
|
<router-link to="/business/structures">盲注表管理</router-link>
|
|
<router-link to="/business/structures">盲注表管理</router-link>
|
|
|
</el-button>
|
|
</el-button>
|
|
|
</el-col>
|
|
</el-col>
|
|
|
-
|
|
|
|
|
|
|
+ <el-col :span="1.5">
|
|
|
|
|
+ <el-button type="success" plain icon="Operation" v-hasPermi="['business:tournaments:manager']">
|
|
|
|
|
+ <router-link to="/business/config">自动比赛管理</router-link>
|
|
|
|
|
+ </el-button>
|
|
|
|
|
+ </el-col>
|
|
|
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
|
|
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
|
|
|
</el-row>
|
|
</el-row>
|
|
|
</template>
|
|
</template>
|
|
@@ -112,7 +116,7 @@
|
|
|
<el-button link type="primary" icon="View" @click="openAuditDialog(scope.row.id, 'view')">查看</el-button>
|
|
<el-button link type="primary" icon="View" @click="openAuditDialog(scope.row.id, 'view')">查看</el-button>
|
|
|
</el-tooltip>
|
|
</el-tooltip>
|
|
|
|
|
|
|
|
- <el-tooltip content="编辑" placement="top" v-hasPermi="['business:tournaments:edit']">
|
|
|
|
|
|
|
+ <el-tooltip content="编辑" v-if="scope.row.status === 0" placement="top" v-hasPermi="['business:tournaments:edit']">
|
|
|
<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>
|
|
|
|
|
|
|
@@ -788,17 +792,12 @@ const resetFormPrize = () => {
|
|
|
/** 修改按钮操作 */
|
|
/** 修改按钮操作 */
|
|
|
const handleUpdate = async (row?: TournamentsVO, mode: 'edit' | 'view' = 'edit') => {
|
|
const handleUpdate = async (row?: TournamentsVO, mode: 'edit' | 'view' = 'edit') => {
|
|
|
reset(); // 重置表单
|
|
reset(); // 重置表单
|
|
|
-
|
|
|
|
|
const _id = row?.id || ids.value[0];
|
|
const _id = row?.id || ids.value[0];
|
|
|
const res = await getTournaments(_id);
|
|
const res = await getTournaments(_id);
|
|
|
- // 确保 gameType 是 number 类型
|
|
|
|
|
- const gameType = Number(res.data.gameType);
|
|
|
|
|
- const signTime = Number(res.data.signTime);
|
|
|
|
|
// 设置表单数据
|
|
// 设置表单数据
|
|
|
Object.assign(form.value, res.data);
|
|
Object.assign(form.value, res.data);
|
|
|
- form.value.gameType = gameType; // 确保赋值正确
|
|
|
|
|
- form.value.signTime = signTime;
|
|
|
|
|
-
|
|
|
|
|
|
|
+ form.value.signTime = String(res.data.signTime);
|
|
|
|
|
+ form.value.gameType = String(res.data.gameType); // 转为字符串
|
|
|
competitionIcon.value = res.data.competitionIcon;
|
|
competitionIcon.value = res.data.competitionIcon;
|
|
|
// 处理奖励表单数据
|
|
// 处理奖励表单数据
|
|
|
const prizeItems = res.data.itemsPrizeList || [];
|
|
const prizeItems = res.data.itemsPrizeList || [];
|
|
@@ -887,6 +886,8 @@ const handleExport = () => {
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
onMounted(() => {
|
|
onMounted(() => {
|
|
|
|
|
+ console.log('tournaments_type:', tournaments_type.value);
|
|
|
|
|
+ console.log('tournaments_time:', tournaments_time.value);
|
|
|
getList();
|
|
getList();
|
|
|
loadItemOptions();
|
|
loadItemOptions();
|
|
|
loadItemStructuresOptions();
|
|
loadItemStructuresOptions();
|
|
@@ -1210,14 +1211,11 @@ const handleCopy = async (row?: TournamentsVO) => {
|
|
|
reset(); // 重置表单
|
|
reset(); // 重置表单
|
|
|
const _id = row?.id || ids.value[0];
|
|
const _id = row?.id || ids.value[0];
|
|
|
const res = await getTournaments(_id);
|
|
const res = await getTournaments(_id);
|
|
|
- // 确保 gameType 是 number 类型
|
|
|
|
|
- const gameType = Number(res.data.gameType);
|
|
|
|
|
- const signTime = Number(res.data.signTime);
|
|
|
|
|
// 设置表单数据
|
|
// 设置表单数据
|
|
|
res.data.id = null;
|
|
res.data.id = null;
|
|
|
Object.assign(form.value, res.data);
|
|
Object.assign(form.value, res.data);
|
|
|
- form.value.gameType = gameType; // 确保赋值正确
|
|
|
|
|
- form.value.signTime = signTime;
|
|
|
|
|
|
|
+ form.value.signTime = String(res.data.signTime);
|
|
|
|
|
+ form.value.gameType = String(res.data.gameType); // 转为字符串
|
|
|
form.value.status = 0;
|
|
form.value.status = 0;
|
|
|
competitionIcon.value = res.data.competitionIcon;
|
|
competitionIcon.value = res.data.competitionIcon;
|
|
|
// 处理奖励表单数据
|
|
// 处理奖励表单数据
|