diff --git a/web/config/config.ts b/web/config/config.ts
index 5ccadc3..845566b 100644
--- a/web/config/config.ts
+++ b/web/config/config.ts
@@ -127,8 +127,23 @@ export default defineConfig({
{
name: '模拟考试',
icon: 'dashboard',
- path: '/test',
- component: './test',
+ path: '/RulesList',
+ routes: [
+ {
+ name: '考试概况(暂时废弃)',
+ icon: 'smile',
+ path: '/examination/intro',
+ component: './examination/intro',
+ hideInMenu: true,
+ },
+ {
+ name: '考试信息',
+ icon: 'smile',
+ path: '/examination/info/:examination_id',
+ component: './examination/info',
+ hideInMenu: true,
+ },
+ ]
},
{
path: '/examination',
@@ -142,6 +157,13 @@ export default defineConfig({
component: './examination/intro',
hideInMenu: true,
},
+ {
+ name: '考试信息',
+ icon: 'smile',
+ path: '/examination/info/:examination_id',
+ component: './examination/info',
+ hideInMenu: true,
+ },
{
name: '考试试卷',
icon: 'smile',
diff --git a/web/src/pages/dashboard/workplace/index.tsx b/web/src/pages/dashboard/workplace/index.tsx
index 85d6bf2..3606ca5 100644
--- a/web/src/pages/dashboard/workplace/index.tsx
+++ b/web/src/pages/dashboard/workplace/index.tsx
@@ -63,7 +63,7 @@ const examinationColumns = [
dataIndex: 'appyTime',
key: 'appyTime',
render: (dom, entity) => {
- return
{entity.apply_start_time}
{entity.apply_end_time}
+ return 开始时间:{entity.apply_start_time}
结束时间:{entity.apply_end_time}
},
},
@@ -72,7 +72,7 @@ const examinationColumns = [
dataIndex: 'examTime',
key: 'examTime',
render: (dom, entity) => {
- return {entity.examination_start_time}
{entity.examination_end_time}
+ return 开始时间:{entity.examination_start_time}
结束时间:{entity.examination_end_time}
},
},
{
@@ -80,7 +80,26 @@ const examinationColumns = [
dataIndex: 'option',
key: 'option',
render: (_, record, index, action) => {
- return record?.status === 0 ? :
+ // return record?.status === 0 ? :
+ switch (record.status_type) {
+ case 0:
+ return "待报名"
+ break;
+ case 1:
+ return "报名中"
+ break;
+ case 2:
+ return "待考试"
+ break;
+ case 3:
+ return
+ break;
+ case 4:
+ return "考试完成"
+ break;
+ default:
+ break;
+ }
},
},
];
@@ -97,7 +116,7 @@ const certificateColumns = [
dataIndex: 'examTime',
key: 'examTime',
render: (dom, entity) => {
- return {entity.examination_start_time}
{entity.examination_end_time}
+ return 开始时间:{entity.examination_start_time}
结束时间:{entity.examination_end_time}
},
},
@@ -209,7 +228,7 @@ const Workplace: FC = () => {
return (
<>
-
+
{
-
+
{
+ const params = useParams();
+
+
+ // 获取考试详情
+ // const { loading: personExaminationLoading, data: examinationInfo = [] } = useRequest(
+ // () => getExaminationById(
+ // {
+ // examination_id: params.examination_id
+ // }), {
+ // formatResult: (result) => {
+ // return result.bean;
+ // }
+ // });
+
+ // useEffect(() => {
+ // console.log('examinationInfo', examinationInfo)
+
+ // })
+
+
+
+ const actionRef = useRef();
+
+
+
+
+ return (
+
+
+ {
+ const examinationInfo = await getExaminationById({ examination_id: params.examination_id })
+
+ const rulesInfo = await getRulesById({ id: examinationInfo.bean.rules_id })
+
+ const exData = { data: { ...examinationInfo.bean, ...rulesInfo.bean } }
+ console.log("exData", exData);
+
+ return exData;
+ }}
+ layout='horizontal'
+ columns={[
+ {
+ title: '考试项目',
+ key: 'text',
+ dataIndex: 'examination_name',
+ },
+
+ {
+ title: '考试时间',
+ key: 'state2',
+ render: (dom, entity, index, action) => {
+ return entity.examination_start_time + " - " + entity.examination_end_time
+ },
+ },
+ {
+ title: '考试时长',
+ key: 'examination_time',
+ dataIndex: 'examination_time',
+ valueType: 'text',
+ render: (dom, entity, index, action) => {
+ // return entity.examination_start_time + " - " + entity.examination_start_time
+ const d1 = new Date(entity.examination_start_time);
+ const d2 = new Date(entity.examination_end_time);
+ const examination_time = parseInt((d2 - d1) / 1000 / 60)
+ return examination_time + "分钟"
+ },
+ },
+ {
+ title: '满分',
+ key: 'sum_score',
+ dataIndex: 'sum_score',
+ valueType: 'text',
+
+ },
+ {
+ title: '通过标准',
+ key: 'pass_score',
+ dataIndex: 'pass_score',
+ valueType: 'text',
+ },
+
+ {
+ title: '操作',
+ valueType: 'option',
+ render: () => [
+
+ 链路
+ ,
+
+ 报警
+ ,
+
+ 查看
+ ,
+ ],
+ },
+ ]}
+ column={1}
+ >
+
+
+
+
+
+
+
+ {/*
+
+ {this.data.id}
+
+
+
+
+
+
+
+ */}
+
+
+
+
+ );
+};
+
+export default CardList;
diff --git a/web/src/pages/examination/service.ts b/web/src/pages/examination/service.ts
index fee9a31..67933d4 100644
--- a/web/src/pages/examination/service.ts
+++ b/web/src/pages/examination/service.ts
@@ -1,10 +1,31 @@
import { request } from 'umi';
import type { CardListItemDataType } from './data.d';
-export async function queryFakeList(params: {
- count: number;
+/**
+ * 获取考试详情
+ * /dsideal_yy/zygh/training/examination/getExaminationById
+ * @param params
+ * @returns
+ */
+export async function getExaminationById(params: {
+ page_size: number;
+ //count: number;
}): Promise<{ data: { list: CardListItemDataType[] } }> {
- return request('/api/card_fake_list', {
+ return request('/dsideal_yy/zygh/training/examination/getExaminationById', {
params,
});
}
+/**
+ * 获取考试规则详情
+ * /dsideal_yy/zygh/training/rules/getRulesById
+ * @param params
+ * @returns
+ */
+export async function getRulesById(params: {
+ page_size: number;
+ //count: number;
+}): Promise<{ data: { list: CardListItemDataType[] } }> {
+ return request('/dsideal_yy/zygh/training/rules/getRulesById', {
+ params,
+ });
+}
\ No newline at end of file