|
|
@@ -40,9 +40,10 @@
|
|
|
<el-card shadow="never">
|
|
|
<template #header>
|
|
|
<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="['physical:tournamentsRegistration:add']">新增</el-button>
|
|
|
</el-col>
|
|
|
+ <!--
|
|
|
<el-col :span="1.5">
|
|
|
<el-button
|
|
|
type="success"
|
|
|
@@ -171,20 +172,20 @@
|
|
|
<el-form-item label="用户ID" prop="userId">
|
|
|
<el-input v-model="form.userId" placeholder="请输入用户ID" />
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="锦标联赛-赛事ID" prop="leagueTournamentId">
|
|
|
- <el-input v-model="form.leagueTournamentId" placeholder="请输入锦标联赛-赛事ID" />
|
|
|
+ <el-form-item label="用户姓名">
|
|
|
+ <el-input v-model="form.userName" disabled placeholder="请输入用户姓名" />
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="上传的审核图片地址" prop="imageUrl">
|
|
|
+ <!-- <el-form-item label="上传的审核图片地址" prop="imageUrl">
|
|
|
<el-input v-model="form.imageUrl" type="textarea" placeholder="请输入内容" />
|
|
|
</el-form-item>
|
|
|
<el-form-item label="审核备注" prop="remark">
|
|
|
<el-input v-model="form.remark" type="textarea" placeholder="请输入内容" />
|
|
|
- </el-form-item>
|
|
|
+ </el-form-item>-->
|
|
|
</el-form>
|
|
|
<template #footer>
|
|
|
<div class="dialog-footer">
|
|
|
+ <el-button @click="verificationUser">核验</el-button>
|
|
|
<el-button :loading="buttonLoading" type="primary" @click="submitForm">确 定</el-button>
|
|
|
- <el-button @click="cancel">取 消</el-button>
|
|
|
</div>
|
|
|
</template>
|
|
|
</el-dialog>
|
|
|
@@ -201,6 +202,7 @@ import {
|
|
|
auditTournamentsRegistration
|
|
|
} from '@/api/system/physical/tournamentsRegistration';
|
|
|
import { selectPhysicalLeagueTournamentSelList } from '@/api/system/physical/leagueTournament';
|
|
|
+import { getUser } from '@/api/system/business/apiUsers';
|
|
|
import {
|
|
|
TournamentsRegistrationVO,
|
|
|
TournamentsRegistrationQuery,
|
|
|
@@ -214,7 +216,6 @@ import { onMounted } from 'vue';
|
|
|
const route = useRoute();
|
|
|
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
|
|
|
|
|
-
|
|
|
const tournamentsRegistrationList = ref<TournamentsRegistrationVO[]>([]);
|
|
|
const buttonLoading = ref(false);
|
|
|
const loading = ref(true);
|
|
|
@@ -286,13 +287,35 @@ onMounted(() => {
|
|
|
getList();
|
|
|
}
|
|
|
});
|
|
|
-
|
|
|
+const verificationLoading = ref(false);
|
|
|
/** 取消按钮 */
|
|
|
const cancel = () => {
|
|
|
reset();
|
|
|
dialog.visible = false;
|
|
|
};
|
|
|
-
|
|
|
+//核验用户
|
|
|
+const verificationUser = async () => {
|
|
|
+ if (!form.value.userId) {
|
|
|
+ proxy?.$modal.msgWarning('请先输入用户ID');
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ verificationLoading.value = true;
|
|
|
+ try {
|
|
|
+ const { data } = await getUser(form.value.userId);
|
|
|
+ if (data) {
|
|
|
+ // 用户姓名优先取真实姓名,其次昵称,最后登录名
|
|
|
+ form.value.userName = data.realName || data.nickName || data.loginName;
|
|
|
+ proxy?.$modal.msgSuccess('核验成功');
|
|
|
+ } else {
|
|
|
+ proxy?.$modal.msgWarning('未找到对应用户信息');
|
|
|
+ }
|
|
|
+ } catch (error) {
|
|
|
+ console.error('核验用户失败:', error);
|
|
|
+ proxy?.$modal.msgError('核验用户失败,请稍后重试');
|
|
|
+ } finally {
|
|
|
+ verificationLoading.value = false;
|
|
|
+ }
|
|
|
+};
|
|
|
/** 表单重置 */
|
|
|
const reset = () => {
|
|
|
form.value = { ...initFormData };
|
|
|
@@ -387,8 +410,10 @@ onMounted(() => {
|
|
|
const getStatusText = (autoStatus: number, status: string) => {
|
|
|
if (autoStatus === 1) {
|
|
|
return '自动绑定';
|
|
|
+ }else if (autoStatus === 3) {
|
|
|
+ return '手动添加';
|
|
|
}
|
|
|
- switch (status) {
|
|
|
+ switch (status) {
|
|
|
case 'pending':
|
|
|
return '待审核';
|
|
|
case 'approved':
|