|
@@ -1,33 +1,28 @@
|
|
|
<template>
|
|
<template>
|
|
|
<div class="p-2">
|
|
<div class="p-2">
|
|
|
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
|
|
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
|
|
|
- <div v-show="showSearch" class="mb-[10px]">
|
|
|
|
|
|
|
+ <div v-show="showSearch" class="mb-[20px]">
|
|
|
<el-card shadow="hover">
|
|
<el-card shadow="hover">
|
|
|
<el-form ref="queryFormRef" :model="queryParams" :inline="true">
|
|
<el-form ref="queryFormRef" :model="queryParams" :inline="true">
|
|
|
<el-form-item label="赛事名称" prop="name">
|
|
<el-form-item label="赛事名称" prop="name">
|
|
|
<el-input v-model="queryParams.name" placeholder="请输入赛事名称" clearable @keyup.enter="handleQuery" />
|
|
<el-input v-model="queryParams.name" placeholder="请输入赛事名称" clearable @keyup.enter="handleQuery" />
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
- <el-form-item label="比赛开始时间" prop="startTime">
|
|
|
|
|
|
|
+ <el-form-item label="开始时间" prop="startTime">
|
|
|
<el-date-picker clearable v-model="queryParams.startTime" type="date" value-format="YYYY-MM-DD" placeholder="请选择比赛开始时间" />
|
|
<el-date-picker clearable v-model="queryParams.startTime" type="date" value-format="YYYY-MM-DD" placeholder="请选择比赛开始时间" />
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
- <el-form-item label="起始记分牌数量" prop="startingChips">
|
|
|
|
|
|
|
+ <el-form-item label="记分牌数量" prop="startingChips">
|
|
|
<el-input v-model="queryParams.startingChips" placeholder="请输入起始记分牌数量" clearable @keyup.enter="handleQuery" />
|
|
<el-input v-model="queryParams.startingChips" placeholder="请输入起始记分牌数量" clearable @keyup.enter="handleQuery" />
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
- <el-form-item label="级别持续时间" prop="levelDuration">
|
|
|
|
|
|
|
+ <el-form-item label="持续时间" prop="levelDuration">
|
|
|
<el-input v-model="queryParams.levelDuration" placeholder="请输入级别持续时间" clearable @keyup.enter="handleQuery" />
|
|
<el-input v-model="queryParams.levelDuration" placeholder="请输入级别持续时间" clearable @keyup.enter="handleQuery" />
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
- <el-form-item label="截止报名级别" prop="lateRegistrationLevel">
|
|
|
|
|
|
|
+ <el-form-item label="报名级别" prop="lateRegistrationLevel">
|
|
|
<el-input v-model="queryParams.lateRegistrationLevel" placeholder="请输入截止报名级别" clearable @keyup.enter="handleQuery" />
|
|
<el-input v-model="queryParams.lateRegistrationLevel" placeholder="请输入截止报名级别" clearable @keyup.enter="handleQuery" />
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
<el-form-item label="最大参赛人数" prop="maxPlayers">
|
|
<el-form-item label="最大参赛人数" prop="maxPlayers">
|
|
|
<el-input v-model="queryParams.maxPlayers" placeholder="请输入最大参赛人数" clearable @keyup.enter="handleQuery" />
|
|
<el-input v-model="queryParams.maxPlayers" placeholder="请输入最大参赛人数" clearable @keyup.enter="handleQuery" />
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
- <el-form-item label="" prop="createdAt">
|
|
|
|
|
- <el-date-picker clearable v-model="queryParams.createdAt" type="date" value-format="YYYY-MM-DD" placeholder="请选择" />
|
|
|
|
|
- </el-form-item>
|
|
|
|
|
- <el-form-item label="" prop="updatedAt">
|
|
|
|
|
- <el-date-picker clearable v-model="queryParams.updatedAt" type="date" value-format="YYYY-MM-DD" placeholder="请选择" />
|
|
|
|
|
- </el-form-item>
|
|
|
|
|
|
|
+
|
|
|
<el-form-item>
|
|
<el-form-item>
|
|
|
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
|
|
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
|
|
|
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
|
|
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
|
|
@@ -41,20 +36,20 @@
|
|
|
<template #header>
|
|
<template #header>
|
|
|
<el-row :gutter="10" class="mb8">
|
|
<el-row :gutter="10" class="mb8">
|
|
|
<el-col :span="1.5">
|
|
<el-col :span="1.5">
|
|
|
- <el-button type="primary" plain icon="Plus" @click="handleAdd" v-hasPermi="['demo: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="['demo: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="['demo:tournaments:remove']"
|
|
|
|
|
|
|
+ <el-button type="danger" plain icon="Delete" :disabled="multiple" @click="handleDelete()" v-hasPermi="['business:tournaments:remove']"
|
|
|
>删除</el-button
|
|
>删除</el-button
|
|
|
>
|
|
>
|
|
|
</el-col>
|
|
</el-col>
|
|
|
<el-col :span="1.5">
|
|
<el-col :span="1.5">
|
|
|
- <el-button type="warning" plain icon="Download" @click="handleExport" v-hasPermi="['demo:tournaments:export']">导出</el-button>
|
|
|
|
|
|
|
+ <el-button type="warning" plain icon="Download" @click="handleExport" v-hasPermi="['business:tournaments:export']">导出</el-button>
|
|
|
</el-col>
|
|
</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>
|
|
@@ -62,11 +57,11 @@
|
|
|
|
|
|
|
|
<el-table v-loading="loading" border :data="tournamentsList" @selection-change="handleSelectionChange">
|
|
<el-table v-loading="loading" border :data="tournamentsList" @selection-change="handleSelectionChange">
|
|
|
<el-table-column type="selection" width="55" align="center" />
|
|
<el-table-column type="selection" width="55" align="center" />
|
|
|
- <el-table-column label="" align="center" prop="id" v-if="true" />
|
|
|
|
|
|
|
+ <el-table-column label="" align="center" prop="id" v-if="false" />
|
|
|
<el-table-column label="赛事名称" align="center" prop="name" />
|
|
<el-table-column label="赛事名称" align="center" prop="name" />
|
|
|
- <el-table-column label="比赛开始时间" align="center" prop="startTime" width="180">
|
|
|
|
|
|
|
+ <el-table-column label="开始时间" align="center" prop="startTime" width="180">
|
|
|
<template #default="scope">
|
|
<template #default="scope">
|
|
|
- <span>{{ parseTime(scope.row.startTime, '{y}-{m}-{d}') }}</span>
|
|
|
|
|
|
|
+ <span>{{ parseTime(scope.row.startTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
|
|
|
</template>
|
|
</template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
<el-table-column label="游戏类型" align="center" prop="gameType" />
|
|
<el-table-column label="游戏类型" align="center" prop="gameType" />
|
|
@@ -79,10 +74,10 @@
|
|
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
|
|
<template #default="scope">
|
|
<template #default="scope">
|
|
|
<el-tooltip content="修改" placement="top">
|
|
<el-tooltip content="修改" placement="top">
|
|
|
- <el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)" v-hasPermi="['demo:tournaments:edit']"></el-button>
|
|
|
|
|
|
|
+ <el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)" v-hasPermi="['business:tournaments:edit']"></el-button>
|
|
|
</el-tooltip>
|
|
</el-tooltip>
|
|
|
<el-tooltip content="删除" placement="top">
|
|
<el-tooltip content="删除" placement="top">
|
|
|
- <el-button link type="primary" icon="Delete" @click="handleDelete(scope.row)" v-hasPermi="['demo:tournaments:remove']"></el-button>
|
|
|
|
|
|
|
+ <el-button link type="primary" icon="Delete" @click="handleDelete(scope.row)" v-hasPermi="['business:tournaments:remove']"></el-button>
|
|
|
</el-tooltip>
|
|
</el-tooltip>
|
|
|
</template>
|
|
</template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
@@ -132,8 +127,8 @@
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<script setup name="Tournaments" lang="ts">
|
|
<script setup name="Tournaments" lang="ts">
|
|
|
-import { listTournaments, getTournaments, delTournaments, addTournaments, updateTournaments } from '@/api/demo/tournaments';
|
|
|
|
|
-import { TournamentsVO, TournamentsQuery, TournamentsForm } from '@/api/demo/tournaments/types';
|
|
|
|
|
|
|
+import { listTournaments, getTournaments, delTournaments, addTournaments, updateTournaments } from '@/api/system/business/tournaments';
|
|
|
|
|
+import { TournamentsVO, TournamentsQuery, TournamentsForm } from '@/api/system/business/tournaments/types';
|
|
|
|
|
|
|
|
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
|
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
|
|
|
|
|
|
@@ -243,7 +238,7 @@ const handleSelectionChange = (selection: TournamentsVO[]) => {
|
|
|
const handleAdd = () => {
|
|
const handleAdd = () => {
|
|
|
reset();
|
|
reset();
|
|
|
dialog.visible = true;
|
|
dialog.visible = true;
|
|
|
- dialog.title = '添加【请填写功能名称】';
|
|
|
|
|
|
|
+ dialog.title = '添加【赛事信息】';
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
/** 修改按钮操作 */
|
|
/** 修改按钮操作 */
|
|
@@ -253,7 +248,7 @@ const handleUpdate = async (row?: TournamentsVO) => {
|
|
|
const res = await getTournaments(_id);
|
|
const res = await getTournaments(_id);
|
|
|
Object.assign(form.value, res.data);
|
|
Object.assign(form.value, res.data);
|
|
|
dialog.visible = true;
|
|
dialog.visible = true;
|
|
|
- dialog.title = '修改【请填写功能名称】';
|
|
|
|
|
|
|
+ dialog.title = '修改【赛事信息】';
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
/** 提交按钮 */
|
|
/** 提交按钮 */
|
|
@@ -276,7 +271,7 @@ const submitForm = () => {
|
|
|
/** 删除按钮操作 */
|
|
/** 删除按钮操作 */
|
|
|
const handleDelete = async (row?: TournamentsVO) => {
|
|
const handleDelete = async (row?: TournamentsVO) => {
|
|
|
const _ids = row?.id || ids.value;
|
|
const _ids = row?.id || ids.value;
|
|
|
- await proxy?.$modal.confirm('是否确认删除【请填写功能名称】编号为"' + _ids + '"的数据项?').finally(() => (loading.value = false));
|
|
|
|
|
|
|
+ await proxy?.$modal.confirm('是否确认删除【赛事信息】编号为"' + _ids + '"的数据项?').finally(() => (loading.value = false));
|
|
|
await delTournaments(_ids);
|
|
await delTournaments(_ids);
|
|
|
proxy?.$modal.msgSuccess('删除成功');
|
|
proxy?.$modal.msgSuccess('删除成功');
|
|
|
await getList();
|
|
await getList();
|
|
@@ -285,11 +280,11 @@ const handleDelete = async (row?: TournamentsVO) => {
|
|
|
/** 导出按钮操作 */
|
|
/** 导出按钮操作 */
|
|
|
const handleExport = () => {
|
|
const handleExport = () => {
|
|
|
proxy?.download(
|
|
proxy?.download(
|
|
|
- 'demo/tournaments/export',
|
|
|
|
|
|
|
+ 'business/tournaments/export',
|
|
|
{
|
|
{
|
|
|
...queryParams.value
|
|
...queryParams.value
|
|
|
},
|
|
},
|
|
|
- `tournaments_${new Date().getTime()}.xlsx`
|
|
|
|
|
|
|
+ `赛事列表_${new Date().getTime()}.xlsx`
|
|
|
);
|
|
);
|
|
|
};
|
|
};
|
|
|
|
|
|