diff --git a/src/api/martial/judgeInvite.js b/src/api/martial/judgeInvite.js index c8f3212..42c8c87 100644 --- a/src/api/martial/judgeInvite.js +++ b/src/api/martial/judgeInvite.js @@ -264,17 +264,3 @@ export const getInviteByJudge = (competitionId, judgeId) => { params: { competitionId, judgeId } }) } - -/** - * 更新邀请的项目分配 - * @param {Object} data - 更新参数 - * @param {Number} data.inviteId - 邀请ID - * @param {String} data.projects - 项目列表(JSON字符串) - */ -export const updateInviteProjects = (data) => { - return request({ - url: '/api/martial/judgeInvite/updateProjects', - method: 'put', - data - }) -} diff --git a/src/views/martial/judgeInvite/index.vue b/src/views/martial/judgeInvite/index.vue index 323dc62..5ac2622 100644 --- a/src/views/martial/judgeInvite/index.vue +++ b/src/views/martial/judgeInvite/index.vue @@ -162,9 +162,6 @@ 查看 - - 编辑项目 - 删除 @@ -210,23 +207,6 @@ /> - - - - - @@ -325,43 +305,6 @@ - - - - - {{ editingInvite.judgeName }} - - - {{ editingInvite.venueName || "全部场地" }} - - - - - - - - - @@ -375,7 +318,6 @@ import { Download, FolderOpened, View, - Edit, } from '@element-plus/icons-vue' import { getJudgeInviteList, @@ -417,11 +359,6 @@ const judgeLoading = ref(false) const judgeList = ref([]) const judgeTotal = ref(0) const selectedJudges = ref([]) - -// 编辑项目对话框 -const editProjectsDialogVisible = ref(false) -const editingInvite = ref({}) -const editingProjectIds = ref([]) const judgeQueryParams = reactive({ current: 1, size: 10, @@ -736,50 +673,6 @@ const handleConfirmImport = async () => { } } -// 编辑项目 -const handleEditProjects = async (row) => { - // Load project list first - await loadVenueAndProjectList() - editingInvite.value = row - // 解析现有项目 - if (row.projects) { - try { - editingProjectIds.value = JSON.parse(row.projects) - } catch (e) { - editingProjectIds.value = [] - } - } else { - editingProjectIds.value = [] - } - editProjectsDialogVisible.value = true -} - -// 保存项目分配 -const handleSaveProjects = async () => { - if (!editingProjectIds.value || editingProjectIds.value.length === 0) { - ElMessage.warning("请至少选择一个项目") - return - } - - try { - const res = await updateInviteProjects({ - inviteId: editingInvite.value.id, - projects: JSON.stringify(editingProjectIds.value) - }) - - if (res.data?.success) { - ElMessage.success("项目分配更新成功") - editProjectsDialogVisible.value = false - await fetchData() - } else { - ElMessage.error(res.data?.msg || "更新失败") - } - } catch (error) { - console.error("更新项目分配失败:", error) - ElMessage.error("更新失败,请重试") - } -} - // 查看 const handleView = async (row) => { try {