提交 f450256c authored 作者: 王鹏飞's avatar 王鹏飞

chore: 新增大赛监控

上级 a7cbd6a2
...@@ -73,48 +73,48 @@ const listOptions = $computed(() => { ...@@ -73,48 +73,48 @@ const listOptions = $computed(() => {
{ label: '已评分', prop: 'checked_flag_name' }, { label: '已评分', prop: 'checked_flag_name' },
{ label: '得分', prop: 'score_name', slots: 'table-score' }, { label: '得分', prop: 'score_name', slots: 'table-score' },
{ label: '更新时间', prop: 'updated_time' }, { label: '更新时间', prop: 'updated_time' },
{ // {
label: '模块一', // label: '模块一',
prop: 'module_1', // prop: 'module_1',
computed({ row }: { row: any }) { // computed({ row }: { row: any }) {
return getModuleStatus(row, 0) // return getModuleStatus(row, 0)
} // }
}, // },
{ // {
label: '模块二', // label: '模块二',
prop: 'module_2', // prop: 'module_2',
computed({ row }: { row: any }) { // computed({ row }: { row: any }) {
return getModuleStatus(row, 1) // return getModuleStatus(row, 1)
} // }
}, // },
{ // {
label: '模块三', // label: '模块三',
prop: 'module_3', // prop: 'module_3',
computed({ row }: { row: any }) { // computed({ row }: { row: any }) {
return getModuleStatus(row, 2) // return getModuleStatus(row, 2)
} // }
}, // },
{ // {
label: '模块四', // label: '模块四',
prop: 'module_4', // prop: 'module_4',
computed({ row }: { row: any }) { // computed({ row }: { row: any }) {
return getModuleStatus(row, 3) // return getModuleStatus(row, 3)
} // }
}, // },
{ // {
label: '模块五', // label: '模块五',
prop: 'module_5', // prop: 'module_5',
computed({ row }: { row: any }) { // computed({ row }: { row: any }) {
return getModuleStatus(row, 4) // return getModuleStatus(row, 4)
} // }
}, // },
{ // {
label: '模块六', // label: '模块六',
prop: 'module_6', // prop: 'module_6',
computed({ row }: { row: any }) { // computed({ row }: { row: any }) {
return getModuleStatus(row, 5) // return getModuleStatus(row, 5)
} // }
}, // },
{ label: '操作', slots: 'table-x', width: 100 } { label: '操作', slots: 'table-x', width: 100 }
] ]
} }
...@@ -128,19 +128,19 @@ function onUpdateSuccess() { ...@@ -128,19 +128,19 @@ function onUpdateSuccess() {
appList?.refetch() appList?.refetch()
} }
function getModuleStatus(row: any, index: number) { // function getModuleStatus(row: any, index: number) {
const [first] = row.student_module_status_list // const [first] = row.student_module_status_list
try { // try {
const data: any = JSON.parse(first.data) // const data: any = JSON.parse(first.data)
const status: number = data[index].status // const status: number = data[index].status
if (status == 0) return '未开始' // if (status == 0) return '未开始'
if (status == 1) return '<span class="is-inProgress">进行中</span>' // if (status == 1) return '<span class="is-inProgress">进行中</span>'
if (status == 2) return '<span class="is-completed">已完成</span>' // if (status == 2) return '<span class="is-completed">已完成</span>'
} catch (error) { // } catch (error) {
// console.log(error) // // console.log(error)
} // }
return '未开始' // return '未开始'
} // }
</script> </script>
<template> <template>
......
import httpRequest from '@/utils/axios'
// 获取赛项列表
export function getCompetitionItems() {
return httpRequest.get('/api/lab/v1/expert/competition/items')
}
// 获取赛项的统计详情
export function getCompetitionStatistics(params: { competition_id: string; platform_key: string }) {
return httpRequest.get('/api/lab/v1/expert/competition/statistics', { params })
}
// 获取所有的参赛学员列表
export function getCompetitionCompetitors(params: { competition_id: string; platform_key: string }) {
return httpRequest.get('/api/lab/v1/expert/competition/competitors', { params })
}
// 获取平台标识列表
export function getPlatformKeys(params?: { competition_id: string }) {
return httpRequest.get('/api/resource/v1/backend/competition-book/platform-keys', { params })
}
import type { RouteRecordRaw } from 'vue-router'
import AppLayout from '@/components/layout/Index.vue'
export const routes: Array<RouteRecordRaw> = [
{
path: '/admin/contest/dashboard',
component: AppLayout,
children: [{ path: '', component: () => import('./views/Index.vue') }]
}
]
...@@ -40,6 +40,7 @@ const adminMenus: IMenuItem[] = [ ...@@ -40,6 +40,7 @@ const adminMenus: IMenuItem[] = [
{ name: '参赛选手管理', path: '/admin/contest/contestants', tag: 'competition-competitor' }, { name: '参赛选手管理', path: '/admin/contest/contestants', tag: 'competition-competitor' },
{ name: '评分专家管理', path: '/admin/contest/experts', tag: 'expert' }, { name: '评分专家管理', path: '/admin/contest/experts', tag: 'expert' },
{ name: '大赛训练答疑', path: '/admin/contest/discuss', tag: 'v1-teacher-train-discussion' }, { name: '大赛训练答疑', path: '/admin/contest/discuss', tag: 'v1-teacher-train-discussion' },
{ name: '大赛监控', path: '/admin/contest/dashboard', tag: 'v1-expert-statistic' },
{ name: '大赛评分', path: '/admin/contest/check', tag: 'v1-expert-check' }, { name: '大赛评分', path: '/admin/contest/check', tag: 'v1-expert-check' },
{ name: '大赛发布成绩', path: '/admin/contest/score', tag: 'v1-expert-score' } { name: '大赛发布成绩', path: '/admin/contest/score', tag: 'v1-expert-score' }
] ]
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论