|
@@ -27,6 +27,9 @@
|
|
<el-col :span="1.5">
|
|
<el-col :span="1.5">
|
|
<el-button type="primary" plain icon="Plus" @click="handleAdd" v-hasPermi="['system:gameEventProject:add']"> 新增 </el-button>
|
|
<el-button type="primary" plain icon="Plus" @click="handleAdd" v-hasPermi="['system:gameEventProject:add']"> 新增 </el-button>
|
|
</el-col>
|
|
</el-col>
|
|
|
|
+ <el-col :span="1.5">
|
|
|
|
+ <el-button type="info" plain icon="Collection" @click="handleViewProjectLibrary()"> 项目库 </el-button>
|
|
|
|
+ </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="['system:gameEventProject:edit']"
|
|
<el-button type="success" plain icon="Edit" :disabled="single" @click="handleUpdate()" v-hasPermi="['system:gameEventProject:edit']"
|
|
>修改
|
|
>修改
|
|
@@ -89,18 +92,26 @@
|
|
</el-table-column>
|
|
</el-table-column>
|
|
<!-- <el-table-column label="参赛组数" align="center" prop="groupNum" />
|
|
<!-- <el-table-column label="参赛组数" align="center" prop="groupNum" />
|
|
<el-table-column label="参赛人数" align="center" prop="participateNum" /> -->
|
|
<el-table-column label="参赛人数" align="center" prop="participateNum" /> -->
|
|
- <el-table-column label="轮次" align="center" prop="roundType" v-if="columns[9].visible" />
|
|
|
|
|
|
+ <el-table-column label="录取名次" align="center" prop="roundType" v-if="columns[9].visible" />
|
|
<el-table-column label="排序方式" align="center" prop="orderType" v-if="columns[10].visible">
|
|
<el-table-column label="排序方式" align="center" prop="orderType" v-if="columns[10].visible">
|
|
<template #default="scope">
|
|
<template #default="scope">
|
|
{{ scope.row.orderType === '0' ? '升序' : '降序' }}
|
|
{{ scope.row.orderType === '0' ? '升序' : '降序' }}
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
<el-table-column label="积分分值" align="center" prop="scoreValue" v-if="columns[11].visible" />
|
|
<el-table-column label="积分分值" align="center" prop="scoreValue" v-if="columns[11].visible" />
|
|
- <!-- <el-table-column label="奖项" align="center" prop="award" />
|
|
|
|
- <el-table-column label="计时点名称" align="center" prop="timePoint" />
|
|
|
|
- <el-table-column label="控制盒编号" align="center" prop="boxCode" />
|
|
|
|
- <el-table-column label="状态" align="center" prop="status" />
|
|
|
|
- <el-table-column label="备注" align="center" prop="remark" /> -->
|
|
|
|
|
|
+ <!-- <el-table-column label="奖项" align="center" prop="award" /> -->
|
|
|
|
+ <el-table-column label="比赛轮次" align="center" prop="gameRound" v-if="columns[12].visible">
|
|
|
|
+ <template #default="scope">
|
|
|
|
+ <dict-tag :options="game_round" :value="scope.row.gameRound || ''" />
|
|
|
|
+ </template>
|
|
|
|
+ </el-table-column>
|
|
|
|
+ <el-table-column label="比赛阶段" align="center" prop="gameStage" v-if="columns[13].visible">
|
|
|
|
+ <template #default="scope">
|
|
|
|
+ <dict-tag :options="game_stage" :value="scope.row.gameStage || ''" />
|
|
|
|
+ </template>
|
|
|
|
+ </el-table-column>
|
|
|
|
+ <!-- <el-table-column label="状态" align="center" prop="status" /> -->
|
|
|
|
+ <!-- <el-table-column label="备注" align="center" prop="remark" /> -->
|
|
<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">
|
|
@@ -146,6 +157,16 @@
|
|
<el-form-item label="参赛人数" prop="participateNum">
|
|
<el-form-item label="参赛人数" prop="participateNum">
|
|
<el-input v-model="form.participateNum" placeholder="请输入参赛人数" />
|
|
<el-input v-model="form.participateNum" placeholder="请输入参赛人数" />
|
|
</el-form-item> -->
|
|
</el-form-item> -->
|
|
|
|
+ <el-form-item label="比赛阶段" prop="gameStage">
|
|
|
|
+ <el-radio-group v-model="form.gameStage" style="width: 100%">
|
|
|
|
+ <el-radio v-for="dict in game_stage" :key="dict.value" :label="dict.label" :value="dict.value" />
|
|
|
|
+ </el-radio-group>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ <el-form-item label="比赛轮次" prop="gameRound">
|
|
|
|
+ <el-radio-group v-model="form.gameRound" style="width: 100%">
|
|
|
|
+ <el-radio v-for="dict in game_round" :key="dict.value" :label="dict.label" :value="dict.value" />
|
|
|
|
+ </el-radio-group>
|
|
|
|
+ </el-form-item>
|
|
<el-form-item label="计算规则" prop="scoreRule">
|
|
<el-form-item label="计算规则" prop="scoreRule">
|
|
<el-select v-model="form.scoreRule" placeholder="请选择计算规则" style="width: 100%">
|
|
<el-select v-model="form.scoreRule" placeholder="请选择计算规则" style="width: 100%">
|
|
<el-option v-for="dict in game_score_type" :key="dict.value" :label="dict.label" :value="dict.value" />
|
|
<el-option v-for="dict in game_score_type" :key="dict.value" :label="dict.label" :value="dict.value" />
|
|
@@ -157,11 +178,20 @@
|
|
<el-radio value="1">降序</el-radio>
|
|
<el-radio value="1">降序</el-radio>
|
|
</el-radio-group>
|
|
</el-radio-group>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
- <el-form-item label="积分分值" prop="scoreValue">
|
|
|
|
- <el-input v-model="form.scoreValue" placeholder="请输入积分分值" />
|
|
|
|
|
|
+ <el-form-item label="录取名次" prop="roundType">
|
|
|
|
+ <el-input v-model="form.roundType" placeholder="请输入录取名次" />
|
|
</el-form-item>
|
|
</el-form-item>
|
|
- <el-form-item label="轮次" prop="roundType">
|
|
|
|
- <el-input v-model="form.roundType" placeholder="请输入轮次" />
|
|
|
|
|
|
+ <el-form-item label="积分分值" prop="scoreValue">
|
|
|
|
+ <template #label>
|
|
|
|
+ <span>
|
|
|
|
+ <el-tooltip content="各值之间以英文逗号分隔" placement="top">
|
|
|
|
+ <el-icon>
|
|
|
|
+ <question-filled />
|
|
|
|
+ </el-icon>
|
|
|
|
+ </el-tooltip>
|
|
|
|
+ 积分</span>
|
|
|
|
+ </template>
|
|
|
|
+ <el-input v-model="form.scoreValue" placeholder="请输入名次对应的积分" />
|
|
</el-form-item>
|
|
</el-form-item>
|
|
<el-form-item label="开始时间" prop="startTime">
|
|
<el-form-item label="开始时间" prop="startTime">
|
|
<el-date-picker clearable v-model="form.startTime" type="datetime" value-format="YYYY-MM-DD HH:mm:ss" placeholder="请选择开始时间">
|
|
<el-date-picker clearable v-model="form.startTime" type="datetime" value-format="YYYY-MM-DD HH:mm:ss" placeholder="请选择开始时间">
|
|
@@ -173,14 +203,9 @@
|
|
</el-form-item>
|
|
</el-form-item>
|
|
<!-- <el-form-item label="奖项" prop="award">
|
|
<!-- <el-form-item label="奖项" prop="award">
|
|
<el-input v-model="form.award" placeholder="请输入奖项" />
|
|
<el-input v-model="form.award" placeholder="请输入奖项" />
|
|
- </el-form-item>
|
|
|
|
- <el-form-item label="计时点名称" prop="timePoint">
|
|
|
|
- <el-input v-model="form.timePoint" placeholder="请输入计时点名称" />
|
|
|
|
- </el-form-item>
|
|
|
|
- <el-form-item label="控制盒编号" prop="boxCode">
|
|
|
|
- <el-input v-model="form.boxCode" placeholder="请输入控制盒编号" />
|
|
|
|
- </el-form-item>
|
|
|
|
- <el-form-item label="备注" prop="remark">
|
|
|
|
|
|
+ </el-form-item> -->
|
|
|
|
+
|
|
|
|
+ <!-- <el-form-item label="备注" prop="remark">
|
|
<el-input v-model="form.remark" type="textarea" placeholder="请输入内容" />
|
|
<el-input v-model="form.remark" type="textarea" placeholder="请输入内容" />
|
|
</el-form-item> -->
|
|
</el-form-item> -->
|
|
</el-form>
|
|
</el-form>
|
|
@@ -194,6 +219,9 @@
|
|
|
|
|
|
<!-- 裁判组查看对话框 -->
|
|
<!-- 裁判组查看对话框 -->
|
|
<RefereeGroupDialog ref="refereeGroupDialogRef" />
|
|
<RefereeGroupDialog ref="refereeGroupDialogRef" />
|
|
|
|
+
|
|
|
|
+ <!-- 项目库查看对话框 -->
|
|
|
|
+ <ProjectLibraryDialog ref="projectLibraryDialog" @confirm="handleLibraryConfirm" />
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
@@ -203,16 +231,18 @@ import {
|
|
getGameEventProject,
|
|
getGameEventProject,
|
|
delGameEventProject,
|
|
delGameEventProject,
|
|
addGameEventProject,
|
|
addGameEventProject,
|
|
- updateGameEventProject
|
|
|
|
|
|
+ updateGameEventProject,
|
|
|
|
+ BatchAddProject
|
|
} from '@/api/system/gameEventProject';
|
|
} from '@/api/system/gameEventProject';
|
|
import { listGameEventGroup } from '@/api/system/gameEventGroup';
|
|
import { listGameEventGroup } from '@/api/system/gameEventGroup';
|
|
import { GameEventProjectVO, GameEventProjectQuery, GameEventProjectForm } from '@/api/system/gameEventProject/types';
|
|
import { GameEventProjectVO, GameEventProjectQuery, GameEventProjectForm } from '@/api/system/gameEventProject/types';
|
|
import RefereeGroupDialog from './RefereeGroupDialog.vue';
|
|
import RefereeGroupDialog from './RefereeGroupDialog.vue';
|
|
|
|
+import ProjectLibraryDialog from './ProjectLibraryDialog.vue';
|
|
|
|
|
|
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
|
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
|
-const { game_score_type, game_project_type, game_project_classification } = toRefs<any>(proxy?.useDict('game_score_type', 'game_project_type','game_project_classification'));
|
|
|
|
|
|
+const { game_score_type, game_project_type, game_project_classification, game_round, game_stage } = toRefs<any>(proxy?.useDict('game_score_type', 'game_project_type', 'game_project_classification', 'game_round', 'game_stage'));
|
|
|
|
|
|
-const gameEventGroupList = ref<any[]>([]); // 赛事分组列表
|
|
|
|
|
|
+const gameEventGroupList = ref<any[]>([]); // ���·����б�
|
|
|
|
|
|
const gameEventProjectList = ref<GameEventProjectVO[]>([]);
|
|
const gameEventProjectList = ref<GameEventProjectVO[]>([]);
|
|
const buttonLoading = ref(false);
|
|
const buttonLoading = ref(false);
|
|
@@ -230,8 +260,13 @@ const gameEventProjectFormRef = ref<ElFormInstance>();
|
|
interface RefereeGroupDialogInstance {
|
|
interface RefereeGroupDialogInstance {
|
|
openDialog: (refereeGroups: string[], projectName: string) => void;
|
|
openDialog: (refereeGroups: string[], projectName: string) => void;
|
|
}
|
|
}
|
|
|
|
+// 定义 ProjectLibraryDialog 组件的类型
|
|
|
|
+interface ProjectLibraryDialogInstance {
|
|
|
|
+ openDialog: () => void;
|
|
|
|
+}
|
|
|
|
|
|
const refereeGroupDialogRef = ref<(InstanceType<typeof RefereeGroupDialog> & RefereeGroupDialogInstance) | null>(null);
|
|
const refereeGroupDialogRef = ref<(InstanceType<typeof RefereeGroupDialog> & RefereeGroupDialogInstance) | null>(null);
|
|
|
|
+const projectLibraryDialog = ref<(InstanceType<typeof ProjectLibraryDialog> & ProjectLibraryDialogInstance) | null>(null);
|
|
|
|
|
|
const dialog = reactive<DialogOption>({
|
|
const dialog = reactive<DialogOption>({
|
|
visible: false,
|
|
visible: false,
|
|
@@ -252,6 +287,8 @@ const columns = ref<FieldOption[]>([
|
|
{ key: 9, label: '录取名次', visible: true },
|
|
{ key: 9, label: '录取名次', visible: true },
|
|
{ key: 10, label: '积分分值', visible: true },
|
|
{ key: 10, label: '积分分值', visible: true },
|
|
{ key: 11, label: '排序方式', visible: true },
|
|
{ key: 11, label: '排序方式', visible: true },
|
|
|
|
+ { key: 12, label: '比赛轮次', visible: true },
|
|
|
|
+ { key: 13, label: '比赛阶段', visible: true },
|
|
]);
|
|
]);
|
|
|
|
|
|
const initFormData: GameEventProjectForm = {
|
|
const initFormData: GameEventProjectForm = {
|
|
@@ -271,8 +308,8 @@ const initFormData: GameEventProjectForm = {
|
|
scoreRule: undefined,
|
|
scoreRule: undefined,
|
|
scoreValue: undefined,
|
|
scoreValue: undefined,
|
|
award: undefined,
|
|
award: undefined,
|
|
- timePoint: undefined,
|
|
|
|
- boxCode: undefined,
|
|
|
|
|
|
+ gameRound: undefined,
|
|
|
|
+ gameStage: undefined,
|
|
status: undefined,
|
|
status: undefined,
|
|
remark: undefined
|
|
remark: undefined
|
|
};
|
|
};
|
|
@@ -417,6 +454,25 @@ const handleViewRefereeGroup = (refereeGroups: string[], projectName: string) =>
|
|
refereeGroupDialogRef.value?.openDialog(refereeGroups, projectName);
|
|
refereeGroupDialogRef.value?.openDialog(refereeGroups, projectName);
|
|
};
|
|
};
|
|
|
|
|
|
|
|
+/** 查看项目库 */
|
|
|
|
+const handleViewProjectLibrary = () => {
|
|
|
|
+ projectLibraryDialog.value?.openDialog();
|
|
|
|
+};
|
|
|
|
+
|
|
|
|
+/** 处理项目库选择确认 */
|
|
|
|
+const handleLibraryConfirm = async (projects: GameEventProjectVO[]) => {
|
|
|
|
+ try {
|
|
|
|
+ // 调用添加接口
|
|
|
|
+ await BatchAddProject(projects);
|
|
|
|
+ } catch (error) {
|
|
|
|
+ console.error('添加项目失败:', error);
|
|
|
|
+ proxy?.$modal.msgError(`添加项目失败`);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ proxy?.$modal.msgSuccess(`成功添加${projects.length}个项目`);
|
|
|
|
+ getList(); // 刷新列表
|
|
|
|
+};
|
|
|
|
+
|
|
onMounted(() => {
|
|
onMounted(() => {
|
|
getList();
|
|
getList();
|
|
// getGameEventGroupList();
|
|
// getGameEventGroupList();
|