diff --git a/admin/config/config.ts b/admin/config/config.ts index 82d6c11..545bf37 100644 --- a/admin/config/config.ts +++ b/admin/config/config.ts @@ -77,6 +77,10 @@ export default defineConfig({ icon: 'table', name: '课程管理', routes: [ + { + path: '/course', + redirect: '/course/subject', + }, { name: '主题设置', icon: 'smile', @@ -124,6 +128,10 @@ export default defineConfig({ icon: 'table', name: '题库维护', routes: [ + { + path: '/questionbank', + redirect: '/questionbank/normal', + }, { name: '常规题库维护', icon: 'smile', @@ -144,7 +152,7 @@ export default defineConfig({ name: '考试规则维护', routes: [ { - name: '模拟考试规则维护', + name: '模拟考试规则设置', icon: 'smile', path: '/examinationrules/normal', component: './examinationrules/normal', @@ -164,7 +172,7 @@ export default defineConfig({ hideInMenu: true, }, { - name: '资质考试规则维护', + name: '资质考试规则设置', icon: 'smile', path: '/examinationrules/attestation', component: './examinationrules/attestation', @@ -212,7 +220,7 @@ export default defineConfig({ name: '制证名单', icon: 'smile', hideInMenu: true, - path: '/examination/certificate/person/:id/:accreditation_status', + path: '/examination/certificate/person/:id/:accreditation_status/:name', component: './examination/certificate/person', }, ], diff --git a/admin/src/pages/examination/certificate/index.tsx b/admin/src/pages/examination/certificate/index.tsx index ccbe003..7560d2a 100644 --- a/admin/src/pages/examination/certificate/index.tsx +++ b/admin/src/pages/examination/certificate/index.tsx @@ -208,7 +208,7 @@ const CourseList: React.FC = () => { { - history.push('/examination/certificate/person/' + record.examination_id + "/" + record.accreditation_status) + history.push('/examination/certificate/person/' + record.examination_id + "/" + record.accreditation_status + "/" + encodeURIComponent(record.examination_name)) }} > diff --git a/admin/src/pages/examination/certificate/person.tsx b/admin/src/pages/examination/certificate/person.tsx index 39ae0a3..efbb5b1 100644 --- a/admin/src/pages/examination/certificate/person.tsx +++ b/admin/src/pages/examination/certificate/person.tsx @@ -1,7 +1,7 @@ import React, { useState, useRef } from 'react'; -import { useRequest, useParams } from 'umi'; +import { useRequest, useParams, Link } from 'umi'; import { PlusOutlined, TagsOutlined, UploadOutlined } from '@ant-design/icons'; -import { Button, message, Input, Drawer, Modal, Col, Row, Space, Upload, Select } from 'antd'; +import { Button, message, Input, Drawer, Modal, Col, Row, Space, Upload, Select, Breadcrumb } from 'antd'; import { PageContainer, FooterToolbar } from '@ant-design/pro-layout'; import type { ProColumns, ActionType } from '@ant-design/pro-table'; import ProTable from '@ant-design/pro-table'; @@ -207,7 +207,23 @@ const CourseList: React.FC = () => { ]; return ( - + { + return + + 考试管理 + + + 制证管理 + + + {decodeURIComponent(params?.name)} + + + } + }} + > headerTitle={false} actionRef={actionRef} diff --git a/admin/src/pages/examinationrules/attestation/step/index.tsx b/admin/src/pages/examinationrules/attestation/step/index.tsx index f4d8171..d8e2fb3 100644 --- a/admin/src/pages/examinationrules/attestation/step/index.tsx +++ b/admin/src/pages/examinationrules/attestation/step/index.tsx @@ -320,7 +320,7 @@ export default () => { // tooltip="限制考试时长的情况下,用户考试中离开,倒计时不会停止。" /> - + )} diff --git a/admin/src/pages/examinationrules/components/ScoreSetter.tsx b/admin/src/pages/examinationrules/components/ScoreSetter.tsx index 006b2c6..560710a 100644 --- a/admin/src/pages/examinationrules/components/ScoreSetter.tsx +++ b/admin/src/pages/examinationrules/components/ScoreSetter.tsx @@ -94,7 +94,7 @@ const ScoreSetter = (props: any, ref: any) => { { (record?.code === 1) && <> 错选、漏选得: - { + { // const _data = []; console.log('typeScore',typeScore) @@ -202,7 +202,7 @@ const ScoreSetter = (props: any, ref: any) => { > { - return 共计 {sumQuestion} 题, 总计 {sumScore} 分 通过分数线 + return 共计 {sumQuestion} 题,总计 {sumScore} 分 通过分数线 { setPassScore(value) }} /> diff --git a/admin/src/pages/examinationrules/normal/step/index.tsx b/admin/src/pages/examinationrules/normal/step/index.tsx index 72c6200..e10b2a2 100644 --- a/admin/src/pages/examinationrules/normal/step/index.tsx +++ b/admin/src/pages/examinationrules/normal/step/index.tsx @@ -337,7 +337,9 @@ export default () => { onFinish={async () => { console.log(formRef.current?.getFieldsValue()); setCurrentStep(2) // 设置步骤号 - runPaper({ rules_id: params?.id }) + //alert(params?.id || rulesId) + + runPaper({ rules_id: params?.id || rulesId }) return true; }} > diff --git a/admin/src/pages/questionbank/components/AnswersEditor.tsx b/admin/src/pages/questionbank/components/AnswersEditor.tsx index 29f44cc..7d741cd 100644 --- a/admin/src/pages/questionbank/components/AnswersEditor.tsx +++ b/admin/src/pages/questionbank/components/AnswersEditor.tsx @@ -37,11 +37,11 @@ const formItemLayoutWithOutLabel = { }, }; console.log('first'); -const AnswersSelector = () => { - +const AnswersSelector = (props) => { + const {type} = props; return ( { > - {fields.length > 1 ? ( + {(fields.length > 1) && (type !== 2) && remove(field.name)} /> - ) : null} + } ))} + { (type !== 2) && + } )} diff --git a/admin/src/pages/questionbank/index.tsx b/admin/src/pages/questionbank/index.tsx index feb08ad..ee7b139 100644 --- a/admin/src/pages/questionbank/index.tsx +++ b/admin/src/pages/questionbank/index.tsx @@ -207,7 +207,7 @@ const QuestionBank = () => { hideInForm: false, hideInSearch: true, renderFormItem: (item, { defaultRender, ...rest }, form) => ( - + ), formItemProps: { rules: [ @@ -239,12 +239,13 @@ const QuestionBank = () => { console.log('====0') } console.log('answers??',form.getFieldValue('answers')?.length) - console.log('addType?.value', addType?.value) + console.log('addType?.value', addType?.value) + // 0 单选 1 多选 2 判断 - return ((addType?.value === 0) || (Number(form.getFieldValue('question_type')) === 0) || Number(form.getFieldValue('question_type')) === 2) ? + return ((addType?.value === 0 || addType?.value === 2) || (Number(form.getFieldValue('question_type')) === 0) || Number(form.getFieldValue('question_type')) === 2) ? : { return [ , - - - - - } - /> - + { + subject_data.length!==0? + {subject_data ? subject_data.subject_name : '--'}} + hoverable={false} + className={styles.card} + actions={[]} + > + } + title={false} + description={ + <> + + + {subject_data ? +
+ : '--'} + + + + + + + + + percent === 100 ? '100%' : `${percent}%`} + /> + + 章节模拟考试进度 + + + + } + /> + + :
+ } + + +
); @@ -178,7 +196,7 @@ const CardList = () => {
{item?.course_name}
{item?.finish_count}题/{item?.question_count}题
- + percent === 100 ? '100%' : `${percent}%`}/>