|
@@ -5,7 +5,7 @@
|
|
|
<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-row :gutter="10" class="mb8">
|
|
<el-row :gutter="10" class="mb8">
|
|
|
- <el-form-item label="赛事ID" prop="userName">
|
|
|
|
|
|
|
+ <el-form-item label="赛事ID" prop="tournamentId">
|
|
|
<el-input
|
|
<el-input
|
|
|
v-model="queryParams.tournamentId"
|
|
v-model="queryParams.tournamentId"
|
|
|
style="width: 300px; min-width: 300px"
|
|
style="width: 300px; min-width: 300px"
|
|
@@ -16,7 +16,7 @@
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
<el-form-item label="报名用户" prop="userName">
|
|
<el-form-item label="报名用户" prop="userName">
|
|
|
<el-input
|
|
<el-input
|
|
|
- v-model="queryParams.userName"
|
|
|
|
|
|
|
+ v-model="queryParams.name"
|
|
|
style="width: 300px; min-width: 300px"
|
|
style="width: 300px; min-width: 300px"
|
|
|
placeholder="请输入报名用户"
|
|
placeholder="请输入报名用户"
|
|
|
clearable
|
|
clearable
|
|
@@ -42,8 +42,9 @@
|
|
|
type="date"
|
|
type="date"
|
|
|
value-format="YYYY-MM-DD"
|
|
value-format="YYYY-MM-DD"
|
|
|
placeholder="请选择报名时间"
|
|
placeholder="请选择报名时间"
|
|
|
- />
|
|
|
|
|
|
|
+ ></el-date-picker>
|
|
|
</el-form-item>
|
|
</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>
|
|
@@ -57,19 +58,6 @@
|
|
|
<el-card shadow="never">
|
|
<el-card shadow="never">
|
|
|
<template #header>
|
|
<template #header>
|
|
|
<el-row :gutter="10" class="mb8">
|
|
<el-row :gutter="10" class="mb8">
|
|
|
- <!-- <el-col :span="1.5">
|
|
|
|
|
- <el-button type="primary" plain icon="Plus" @click="handleAdd" v-hasPermi="['physical:participants:add']">新增</el-button>
|
|
|
|
|
- </el-col>
|
|
|
|
|
- <el-col :span="1.5">
|
|
|
|
|
- <el-button type="success" plain icon="Edit" :disabled="single" @click="handleUpdate()" v-hasPermi="['physical:participants:edit']"
|
|
|
|
|
- >修改</el-button
|
|
|
|
|
- >
|
|
|
|
|
- </el-col>
|
|
|
|
|
- <el-col :span="1.5">
|
|
|
|
|
- <el-button type="danger" plain icon="Delete" :disabled="multiple" @click="handleDelete()" v-hasPermi="['physical:participants:remove']"
|
|
|
|
|
- >删除</el-button
|
|
|
|
|
- >
|
|
|
|
|
- </el-col>-->
|
|
|
|
|
<el-col :span="1.5">
|
|
<el-col :span="1.5">
|
|
|
<el-button type="warning" plain icon="Download" @click="handleExport" v-hasPermi="['physical:participants:export']">导出</el-button>
|
|
<el-button type="warning" plain icon="Download" @click="handleExport" v-hasPermi="['physical:participants:export']">导出</el-button>
|
|
|
</el-col>
|
|
</el-col>
|
|
@@ -101,7 +89,6 @@
|
|
|
|
|
|
|
|
<pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum" v-model:limit="queryParams.pageSize" @pagination="getList" />
|
|
<pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum" v-model:limit="queryParams.pageSize" @pagination="getList" />
|
|
|
</el-card>
|
|
</el-card>
|
|
|
- <!-- 添加或修改线下用户报名对话框 -->
|
|
|
|
|
<el-dialog :title="dialog.title" v-model="dialog.visible" width="500px" append-to-body>
|
|
<el-dialog :title="dialog.title" v-model="dialog.visible" width="500px" append-to-body>
|
|
|
<el-form ref="participantsFormRef" :model="form" :rules="rules" label-width="80px">
|
|
<el-form ref="participantsFormRef" :model="form" :rules="rules" label-width="80px">
|
|
|
<el-form-item label="" prop="tournamentId">
|
|
<el-form-item label="" prop="tournamentId">
|
|
@@ -157,6 +144,9 @@
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<script setup name="Participants" lang="ts">
|
|
<script setup name="Participants" lang="ts">
|
|
|
|
|
+import { ref, reactive, onMounted, toRefs } from 'vue';
|
|
|
|
|
+import { ElFormInstance } from 'element-plus';
|
|
|
|
|
+import { ComponentInternalInstance, getCurrentInstance } from 'vue';
|
|
|
import {
|
|
import {
|
|
|
listParticipants,
|
|
listParticipants,
|
|
|
getParticipants,
|
|
getParticipants,
|
|
@@ -167,6 +157,7 @@ import {
|
|
|
} from '@/api/system/physical/participants';
|
|
} from '@/api/system/physical/participants';
|
|
|
import { ParticipantsVO, ParticipantsQuery, ParticipantsForm } from '@/api/system/physical/participants/types';
|
|
import { ParticipantsVO, ParticipantsQuery, ParticipantsForm } from '@/api/system/physical/participants/types';
|
|
|
import { parseTime } from '@/utils/dateUtils';
|
|
import { parseTime } from '@/utils/dateUtils';
|
|
|
|
|
+
|
|
|
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
|
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
|
|
|
|
|
|
|
const participantsList = ref<ParticipantsVO[]>([]);
|
|
const participantsList = ref<ParticipantsVO[]>([]);
|
|
@@ -181,7 +172,7 @@ const total = ref(0);
|
|
|
const queryFormRef = ref<ElFormInstance>();
|
|
const queryFormRef = ref<ElFormInstance>();
|
|
|
const participantsFormRef = ref<ElFormInstance>();
|
|
const participantsFormRef = ref<ElFormInstance>();
|
|
|
|
|
|
|
|
-const dialog = reactive<DialogOption>({
|
|
|
|
|
|
|
+const dialog = reactive({
|
|
|
visible: false,
|
|
visible: false,
|
|
|
title: ''
|
|
title: ''
|
|
|
});
|
|
});
|
|
@@ -201,20 +192,27 @@ const initFormData: ParticipantsForm = {
|
|
|
finalRank: undefined,
|
|
finalRank: undefined,
|
|
|
finalReward: undefined
|
|
finalReward: undefined
|
|
|
};
|
|
};
|
|
|
|
|
+
|
|
|
|
|
+interface PageData<T, Q> {
|
|
|
|
|
+ form: T;
|
|
|
|
|
+ queryParams: Q & { pageNum: number; pageSize: number; params?: {} };
|
|
|
|
|
+ rules: Record<string, unknown[]>;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
const data = reactive<PageData<ParticipantsForm, ParticipantsQuery>>({
|
|
const data = reactive<PageData<ParticipantsForm, ParticipantsQuery>>({
|
|
|
form: { ...initFormData },
|
|
form: { ...initFormData },
|
|
|
queryParams: {
|
|
queryParams: {
|
|
|
pageNum: 1,
|
|
pageNum: 1,
|
|
|
pageSize: 10,
|
|
pageSize: 10,
|
|
|
- tournamentId: undefined,
|
|
|
|
|
|
|
+ tournamentId: '',
|
|
|
playerId: undefined,
|
|
playerId: undefined,
|
|
|
- name: undefined,
|
|
|
|
|
- mobile: undefined,
|
|
|
|
|
|
|
+ name: '',
|
|
|
|
|
+ mobile: '',
|
|
|
avatar: undefined,
|
|
avatar: undefined,
|
|
|
currentChips: undefined,
|
|
currentChips: undefined,
|
|
|
rebuy: undefined,
|
|
rebuy: undefined,
|
|
|
eliminatedTime: undefined,
|
|
eliminatedTime: undefined,
|
|
|
- registrationTime: undefined,
|
|
|
|
|
|
|
+ registrationTime: '',
|
|
|
status: undefined,
|
|
status: undefined,
|
|
|
finalRank: undefined,
|
|
finalRank: undefined,
|
|
|
finalReward: undefined,
|
|
finalReward: undefined,
|
|
@@ -260,8 +258,12 @@ const handleQuery = () => {
|
|
|
|
|
|
|
|
/** 重置按钮操作 */
|
|
/** 重置按钮操作 */
|
|
|
const resetQuery = () => {
|
|
const resetQuery = () => {
|
|
|
- queryFormRef.value?.resetFields();
|
|
|
|
|
- handleQuery();
|
|
|
|
|
|
|
+ queryParams.value.tournamentId = '';
|
|
|
|
|
+ queryParams.value.name = '';
|
|
|
|
|
+ queryParams.value.mobile = '';
|
|
|
|
|
+ queryParams.value.registrationTime = '';
|
|
|
|
|
+ queryParams.value.pageNum = 1;
|
|
|
|
|
+ getList();
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
/** 多选框选中数据 */
|
|
/** 多选框选中数据 */
|
|
@@ -287,6 +289,7 @@ const handleUpdate = async (row?: ParticipantsVO) => {
|
|
|
dialog.visible = true;
|
|
dialog.visible = true;
|
|
|
dialog.title = '修改线下用户报名';
|
|
dialog.title = '修改线下用户报名';
|
|
|
};
|
|
};
|
|
|
|
|
+
|
|
|
//晋级
|
|
//晋级
|
|
|
const getNextTournament = async (row?: ParticipantsVO) => {
|
|
const getNextTournament = async (row?: ParticipantsVO) => {
|
|
|
try {
|
|
try {
|
|
@@ -309,6 +312,7 @@ const getNextTournament = async (row?: ParticipantsVO) => {
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
};
|
|
};
|
|
|
|
|
+
|
|
|
/** 提交按钮 */
|
|
/** 提交按钮 */
|
|
|
const submitForm = () => {
|
|
const submitForm = () => {
|
|
|
participantsFormRef.value?.validate(async (valid: boolean) => {
|
|
participantsFormRef.value?.validate(async (valid: boolean) => {
|