From 252ba922666555b237afedf91012ee141038a349 Mon Sep 17 00:00:00 2001 From: zhangxiaohua <827885272@qq.com> Date: Thu, 15 Jan 2026 18:00:42 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=BD=9C=E5=93=81=E8=AF=A6?= =?UTF-8?q?=E6=83=85=E9=A1=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/router/index.ts | 8 +- .../contests/components/WorkDetailModal.vue | 505 ++++++++++++++++++ .../src/views/contests/results/Detail.vue | 21 +- .../views/contests/reviews/ProgressDetail.vue | 22 +- .../src/views/contests/works/WorksDetail.vue | 373 +++++++------ frontend/src/views/model/ModelViewer.vue | 30 +- 6 files changed, 795 insertions(+), 164 deletions(-) create mode 100644 frontend/src/views/contests/components/WorkDetailModal.vue diff --git a/frontend/src/router/index.ts b/frontend/src/router/index.ts index 3cc7891..93969cc 100644 --- a/frontend/src/router/index.ts +++ b/frontend/src/router/index.ts @@ -381,13 +381,13 @@ router.beforeEach(async (to, _from, next) => { userTenantCode, to.path.replace(`/${tenantCodeFromUrl}`, "") ) - next({ path: correctedPath, replace: true }) + next({ path: correctedPath, query: to.query, replace: true }) return } // 如果URL中没有租户编码,添加租户编码 if (!tenantCodeFromUrl) { const correctedPath = buildPathWithTenantCode(userTenantCode, to.path) - next({ path: correctedPath, replace: true }) + next({ path: correctedPath, query: to.query, replace: true }) return } } @@ -493,7 +493,7 @@ router.beforeEach(async (to, _from, next) => { userTenantCode, to.path.replace(`/${tenantCodeFromUrl}`, "") ) - next({ path: correctedPath, replace: true }) + next({ path: correctedPath, query: to.query, replace: true }) return } // 如果URL中没有租户编码,添加租户编码(排除不需要认证的特殊路由) @@ -501,7 +501,7 @@ router.beforeEach(async (to, _from, next) => { const shouldSkipTenantCode = skipTenantCodePaths.some(p => to.path.startsWith(p)) if (!tenantCodeFromUrl && !shouldSkipTenantCode) { const correctedPath = buildPathWithTenantCode(userTenantCode, to.path) - next({ path: correctedPath, replace: true }) + next({ path: correctedPath, query: to.query, replace: true }) return } } diff --git a/frontend/src/views/contests/components/WorkDetailModal.vue b/frontend/src/views/contests/components/WorkDetailModal.vue new file mode 100644 index 0000000..c66a545 --- /dev/null +++ b/frontend/src/views/contests/components/WorkDetailModal.vue @@ -0,0 +1,505 @@ + + + + + diff --git a/frontend/src/views/contests/results/Detail.vue b/frontend/src/views/contests/results/Detail.vue index 01ce5bd..f09842a 100644 --- a/frontend/src/views/contests/results/Detail.vue +++ b/frontend/src/views/contests/results/Detail.vue @@ -68,6 +68,9 @@ + + + + @@ -107,6 +116,7 @@ import { ReloadOutlined, } from "@ant-design/icons-vue" import { resultsApi } from "@/api/contests" +import WorkDetailModal from "../components/WorkDetailModal.vue" const route = useRoute() const router = useRouter() @@ -120,6 +130,10 @@ const contestInfo = ref<{ resultState: string } | null>(null) +// 作品详情弹框 +const workDetailModalVisible = ref(false) +const currentWorkId = ref(null) + // 列表状态 const loading = ref(false) const publishLoading = ref(false) @@ -145,7 +159,6 @@ const columns = [ }, { title: "作品编号", - dataIndex: "workNo", key: "workNo", width: 120, }, @@ -231,6 +244,12 @@ const handleBack = () => { router.push(`/${tenantCode}/contests/results`) } +// 查看作品详情 +const handleViewWorkDetail = (record: any) => { + currentWorkId.value = record.id + workDetailModalVisible.value = true +} + // 发布/撤回赛果 const handlePublish = () => { const isPublished = contestInfo.value?.resultState === "published" diff --git a/frontend/src/views/contests/reviews/ProgressDetail.vue b/frontend/src/views/contests/reviews/ProgressDetail.vue index d11da0b..faad85c 100644 --- a/frontend/src/views/contests/reviews/ProgressDetail.vue +++ b/frontend/src/views/contests/reviews/ProgressDetail.vue @@ -83,6 +83,9 @@ + @@ -214,6 +217,12 @@ + + + (null) + // 列表状态 const loading = ref(false) const dataSource = ref([]) @@ -287,7 +301,7 @@ const searchParams = reactive({ // 表格列定义 const columns = [ { title: "序号", key: "index", width: 70 }, - { title: "作品编号", dataIndex: "workNo", key: "workNo", width: 120 }, + { title: "作品编号", key: "workNo", width: 120 }, { title: "报名账号", key: "username", width: 150 }, { title: "评委评分", key: "judgeScore", width: 100 }, { title: "评审进度", key: "reviewProgress", width: 100 }, @@ -461,6 +475,12 @@ const handleBack = () => { router.back() } +// 查看作品详情 +const handleViewWorkDetail = (record: ContestWork) => { + currentWorkId.value = record.id + workDetailModalVisible.value = true +} + // 开始评审 const handleStartReview = async () => { try { diff --git a/frontend/src/views/contests/works/WorksDetail.vue b/frontend/src/views/contests/works/WorksDetail.vue index b1581ac..a474b80 100644 --- a/frontend/src/views/contests/works/WorksDetail.vue +++ b/frontend/src/views/contests/works/WorksDetail.vue @@ -21,11 +21,18 @@ - + @@ -108,31 +115,44 @@ {{ (pagination.current - 1) * pagination.pageSize + index + 1 }}