zhengpengju 3 years ago
parent b58188330b
commit c8498abbad

@ -77,6 +77,10 @@ export default defineConfig({
icon: 'table', icon: 'table',
name: '课程管理', name: '课程管理',
routes: [ routes: [
{
path: '/course',
redirect: '/course/subject',
},
{ {
name: '主题设置', name: '主题设置',
icon: 'smile', icon: 'smile',
@ -124,6 +128,10 @@ export default defineConfig({
icon: 'table', icon: 'table',
name: '题库维护', name: '题库维护',
routes: [ routes: [
{
path: '/questionbank',
redirect: '/questionbank/normal',
},
{ {
name: '常规题库维护', name: '常规题库维护',
icon: 'smile', icon: 'smile',
@ -212,7 +220,7 @@ export default defineConfig({
name: '制证名单', name: '制证名单',
icon: 'smile', icon: 'smile',
hideInMenu: true, hideInMenu: true,
path: '/examination/certificate/person/:id/:accreditation_status', path: '/examination/certificate/person/:id/:accreditation_status/:name',
component: './examination/certificate/person', component: './examination/certificate/person',
}, },
], ],

@ -208,7 +208,7 @@ const CourseList: React.FC = () => {
<a <a
key="detail" key="detail"
onClick={() => { onClick={() => {
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))
}} }}
> >

@ -1,7 +1,7 @@
import React, { useState, useRef } from 'react'; 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 { 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 { PageContainer, FooterToolbar } from '@ant-design/pro-layout';
import type { ProColumns, ActionType } from '@ant-design/pro-table'; import type { ProColumns, ActionType } from '@ant-design/pro-table';
import ProTable from '@ant-design/pro-table'; import ProTable from '@ant-design/pro-table';
@ -207,7 +207,23 @@ const CourseList: React.FC = () => {
]; ];
return ( return (
<PageContainer> <PageContainer
header={{
breadcrumbRender: (props, originBreadcrumb)=>{
return <Breadcrumb>
<Breadcrumb.Item>
<Link to="/examination/option"></Link>
</Breadcrumb.Item>
<Breadcrumb.Item>
<Link to="/examination/certificate"></Link>
</Breadcrumb.Item>
<Breadcrumb.Item>
<Link to="">{decodeURIComponent(params?.name)}</Link>
</Breadcrumb.Item>
</Breadcrumb>
}
}}
>
<ProTable<TableListItem, TableListPagination> <ProTable<TableListItem, TableListPagination>
headerTitle={false} headerTitle={false}
actionRef={actionRef} actionRef={actionRef}

@ -320,7 +320,7 @@ export default () => {
// tooltip="限制考试时长的情况下,用户考试中离开,倒计时不会停止。" // tooltip="限制考试时长的情况下,用户考试中离开,倒计时不会停止。"
/> />
<ProFormDateRangePicker name="dateRange" label="试卷有效期" initialValue={[ruleData.start_time, ruleData.end_time]} /> <ProFormDateRangePicker name="dateRange" label="试卷有效期" initialValue={[ruleData.start_time, ruleData.end_time]} rules={[{ required: true, message: '请输试卷有效期' }]} />
</> </>
)} )}
</Col> </Col>

@ -207,7 +207,7 @@ const QuestionBank = () => {
hideInForm: false, hideInForm: false,
hideInSearch: true, hideInSearch: true,
renderFormItem: (item, { defaultRender, ...rest }, form) => ( renderFormItem: (item, { defaultRender, ...rest }, form) => (
<AnswersSelector type={addType?.value} /> <AnswersSelector type={addType?.value || Number(form.getFieldValue('question_type'))} />
), ),
formItemProps: { formItemProps: {
rules: [ rules: [
@ -245,7 +245,7 @@ const QuestionBank = () => {
return ((addType?.value === 0 || addType?.value === 2) || (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) ?
<Radio.Group <Radio.Group
name="answertrue" name="answertrue"
options={addType?.value === 0 ? ['A', 'B', 'C', 'D'] : ['A', 'B']} options={addType?.value === 0 || (Number(form.getFieldValue('question_type')) === 0) ? ['A', 'B', 'C', 'D'] : ['A', 'B']}
/> />
: :
<Checkbox.Group <Checkbox.Group

Loading…
Cancel
Save