|
|
|
@ -1,5 +1,5 @@
|
|
|
|
|
import React, { useEffect, useRef, useState } from 'react';
|
|
|
|
|
import { history } from 'umi';
|
|
|
|
|
import { history, useParams, useRequest } from 'umi';
|
|
|
|
|
import type { ProFormInstance } from '@ant-design/pro-form';
|
|
|
|
|
import { BetaSchemaForm, ProFormRadio, ProFormUploadButton } from '@ant-design/pro-form';
|
|
|
|
|
import ProForm, {
|
|
|
|
@ -12,7 +12,7 @@ import ProForm, {
|
|
|
|
|
ProFormDateRangePicker,
|
|
|
|
|
} from '@ant-design/pro-form';
|
|
|
|
|
import ProCard from '@ant-design/pro-card';
|
|
|
|
|
import { Button, Checkbox, Col, Divider, List, Menu, message, Modal, Radio, Row, Space, Typography } from 'antd';
|
|
|
|
|
import { Button, Checkbox, Col, Divider, List, Menu, message, Modal, Radio, Result, Row, Space, Typography } from 'antd';
|
|
|
|
|
import { PageContainer } from '@ant-design/pro-layout';
|
|
|
|
|
import ProDescriptions from '@ant-design/pro-descriptions';
|
|
|
|
|
import styles from './index.less'
|
|
|
|
@ -23,7 +23,11 @@ import ProFormRichEdit from '../components/ProFormRichEdit';
|
|
|
|
|
import type { ActionType, ProColumns } from '@ant-design/pro-table';
|
|
|
|
|
import ProTable from '@ant-design/pro-table';
|
|
|
|
|
import type { TableListItem, TableListPagination } from '../../option/data';
|
|
|
|
|
import { getSubjectInfo, saveSubject } from '../../option/service';
|
|
|
|
|
import { queryCourseList, queryCourseListByTag, queryTagList, saveSubject } from '../../option/service';
|
|
|
|
|
import { commitSubject, getSubjectInfo, queryListChapterBySubject, saveChapter } from '../service';
|
|
|
|
|
import { v4 as uuidv4 } from 'uuid';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** 列表项定义 */
|
|
|
|
|
const columns: ProColumns<TableListItem>[] = [
|
|
|
|
@ -35,32 +39,108 @@ const columns: ProColumns<TableListItem>[] = [
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: '章节名称',
|
|
|
|
|
dataIndex: 'course_name',
|
|
|
|
|
dataIndex: 'chapter_name',
|
|
|
|
|
valueType: 'text',
|
|
|
|
|
hideInTable: false,
|
|
|
|
|
hideInDescriptions: false,
|
|
|
|
|
hideInForm: false,
|
|
|
|
|
hideInSearch: true,
|
|
|
|
|
formItemProps: {
|
|
|
|
|
rules: [
|
|
|
|
|
{
|
|
|
|
|
required: true,
|
|
|
|
|
message: '请填写章节名称',
|
|
|
|
|
},
|
|
|
|
|
]
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: '简介',
|
|
|
|
|
dataIndex: 'lecture_teacher',
|
|
|
|
|
valueType: 'text',
|
|
|
|
|
dataIndex: 'chapter_describe',
|
|
|
|
|
valueType: 'textarea',
|
|
|
|
|
sorter: false,
|
|
|
|
|
hideInTable: false,
|
|
|
|
|
hideInForm: false,
|
|
|
|
|
hideInSearch: true,
|
|
|
|
|
formItemProps: {
|
|
|
|
|
rules: [
|
|
|
|
|
{
|
|
|
|
|
required: true,
|
|
|
|
|
message: '请填写章节简介',
|
|
|
|
|
},
|
|
|
|
|
]
|
|
|
|
|
},
|
|
|
|
|
renderText: (val: string) => (<div dangerouslySetInnerHTML={{__html: val}} />),
|
|
|
|
|
renderFormItem: (item, { defaultRender, ...rest }, form) => (
|
|
|
|
|
<ProFormRichEdit
|
|
|
|
|
name="chapter_describe"
|
|
|
|
|
label=""
|
|
|
|
|
width="xl"
|
|
|
|
|
// tooltip="最长为 6 位汉字,需要与考生身份证一致"
|
|
|
|
|
placeholder="请输入介绍"
|
|
|
|
|
// rules={[{ required: true }]}
|
|
|
|
|
value="锦书"
|
|
|
|
|
// disabled
|
|
|
|
|
|
|
|
|
|
/>
|
|
|
|
|
),
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: '标签',
|
|
|
|
|
valueType: 'select',
|
|
|
|
|
dataIndex: 'tags',
|
|
|
|
|
sorter: false,
|
|
|
|
|
hideInTable: true,
|
|
|
|
|
hideInForm: false,
|
|
|
|
|
hideInSearch: true,
|
|
|
|
|
fieldProps: {
|
|
|
|
|
mode: "multiple"
|
|
|
|
|
},
|
|
|
|
|
renderText: (val: string) => `${val}`,
|
|
|
|
|
request: async () => {
|
|
|
|
|
const { data: Items } = await queryTagList({});
|
|
|
|
|
console.log('queryTagList...')
|
|
|
|
|
const tags = []
|
|
|
|
|
for (let i = 0; i < Items.length; i++) {
|
|
|
|
|
tags.push({ label: Items[i].tag_name, value: Items[i].tag_id })
|
|
|
|
|
}
|
|
|
|
|
console.log(tags, 'tags:::');
|
|
|
|
|
return tags;
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: '课程',
|
|
|
|
|
valueType: 'textarea',
|
|
|
|
|
dataIndex: 'course_describe',
|
|
|
|
|
valueType: 'select',
|
|
|
|
|
dataIndex: 'course_ids',
|
|
|
|
|
sorter: false,
|
|
|
|
|
hideInTable: false,
|
|
|
|
|
hideInForm: false,
|
|
|
|
|
hideInSearch: true,
|
|
|
|
|
fieldProps: {
|
|
|
|
|
mode: "multiple"
|
|
|
|
|
},
|
|
|
|
|
formItemProps: {
|
|
|
|
|
rules: [
|
|
|
|
|
{
|
|
|
|
|
required: true,
|
|
|
|
|
message: '请填选择课程',
|
|
|
|
|
},
|
|
|
|
|
]
|
|
|
|
|
},
|
|
|
|
|
renderText: (val: string) => `${val}`,
|
|
|
|
|
dependencies: ['tags'],
|
|
|
|
|
request: async (params) => {
|
|
|
|
|
const {tags} = params;
|
|
|
|
|
const { data: Items } = await queryCourseListByTag({tag_ids: tags?.toString()});
|
|
|
|
|
console.log('queryCourseListByTag...')
|
|
|
|
|
const courses = []
|
|
|
|
|
for (let i = 0; i < Items?.length; i++) {
|
|
|
|
|
courses.push({ label: Items[i]?.course_name, value: Items[i]?.course_id })
|
|
|
|
|
}
|
|
|
|
|
console.log(courses, 'courses:::');
|
|
|
|
|
return courses;
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: '学时',
|
|
|
|
@ -68,14 +148,16 @@ const columns: ProColumns<TableListItem>[] = [
|
|
|
|
|
valueType: 'text',
|
|
|
|
|
sorter: false,
|
|
|
|
|
hideInTable: false,
|
|
|
|
|
hideInForm: false,
|
|
|
|
|
hideInForm: true,
|
|
|
|
|
hideInSearch: true,
|
|
|
|
|
renderText: (val: string) => `${val}`,
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
{
|
|
|
|
|
title: '操作',
|
|
|
|
|
dataIndex: 'option',
|
|
|
|
|
valueType: 'option',
|
|
|
|
|
width: 200,
|
|
|
|
|
render: (_dom: any, record: React.SetStateAction<TableListItem | undefined>) => [
|
|
|
|
|
<a
|
|
|
|
|
key="detail"
|
|
|
|
@ -103,18 +185,35 @@ const columns: ProColumns<TableListItem>[] = [
|
|
|
|
|
},
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
const waitTime = (time: number = 100) => {
|
|
|
|
|
return new Promise((resolve) => {
|
|
|
|
|
setTimeout(() => {
|
|
|
|
|
resolve(true);
|
|
|
|
|
}, time);
|
|
|
|
|
});
|
|
|
|
|
/**
|
|
|
|
|
* 添加章节
|
|
|
|
|
*
|
|
|
|
|
* @param fields
|
|
|
|
|
*/
|
|
|
|
|
const handleAddChapter = async (fields: TableListItem) => {
|
|
|
|
|
const hide = message.loading('正在添加');
|
|
|
|
|
try {
|
|
|
|
|
const {course_ids} = fields
|
|
|
|
|
const {code, msg} = await saveChapter({ ...fields, course_ids: course_ids.toString()});
|
|
|
|
|
if(code === 2000){
|
|
|
|
|
hide();
|
|
|
|
|
message.success('添加成功');
|
|
|
|
|
return true;
|
|
|
|
|
}else{
|
|
|
|
|
hide();
|
|
|
|
|
message.warn(msg);
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
} catch (error) {
|
|
|
|
|
hide();
|
|
|
|
|
message.error('添加失败请重试!');
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
const numbers = [];
|
|
|
|
|
for (let i = 0; i < 50; i++) {
|
|
|
|
|
numbers.push({ id: `${i}` })
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export default () => {
|
|
|
|
|
const uuid = uuidv4();
|
|
|
|
|
|
|
|
|
|
const formRef = useRef<ProFormInstance>();
|
|
|
|
|
const actionRef = useRef<ActionType>();
|
|
|
|
|
|
|
|
|
@ -123,15 +222,49 @@ export default () => {
|
|
|
|
|
const [detailModalVisible, handleDetailModalVisible] = useState<boolean>(false);
|
|
|
|
|
const [updateModalVisible, handleUpdateModalVisible] = useState<boolean>(false);
|
|
|
|
|
|
|
|
|
|
const [uploadFileName, SetUploadFileName] = useState<string>();
|
|
|
|
|
const [uploadFileExt, SetUploadFileExt] = useState<string>();
|
|
|
|
|
|
|
|
|
|
const [subjectIntro, setSubjectIntro] = useState({});
|
|
|
|
|
|
|
|
|
|
const formMapRef = useRef<React.MutableRefObject<ProFormInstance<any> | undefined>[]>([]);
|
|
|
|
|
|
|
|
|
|
const params = useParams();
|
|
|
|
|
//console.log('params', params);
|
|
|
|
|
|
|
|
|
|
const {data:subjectInfo} = useRequest(() => {
|
|
|
|
|
return getSubjectInfo({subject_id: params?.id});
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
useEffect(() => {
|
|
|
|
|
waitTime(1000).then(() => {
|
|
|
|
|
// 编辑场景下需要使用formMapRef循环设置formData
|
|
|
|
|
formMapRef.current.forEach((formInstanceRef) => {
|
|
|
|
|
formInstanceRef.current?.setFieldsValue({subject_name:'123'});
|
|
|
|
|
});
|
|
|
|
|
console.log('getSubjectInfo', subjectInfo);
|
|
|
|
|
console.log('url', subjectInfo?.attachment_json?.url);
|
|
|
|
|
// 编辑场景下需要使用formMapRef循环设置formData
|
|
|
|
|
formMapRef.current.forEach((formInstanceRef) => {
|
|
|
|
|
let fieldsValue;
|
|
|
|
|
const subjectValue = {
|
|
|
|
|
subject_name:subjectInfo?.subject_name,
|
|
|
|
|
subject_describe:subjectInfo?.subject_describe,
|
|
|
|
|
}
|
|
|
|
|
if(params?.id && subjectInfo?.attachment_json?.url){
|
|
|
|
|
fieldsValue = {
|
|
|
|
|
...subjectValue,
|
|
|
|
|
upload:[
|
|
|
|
|
{
|
|
|
|
|
name: subjectInfo?.attachment_json?.name,
|
|
|
|
|
status: 'done',
|
|
|
|
|
url: `/dsideal_yy/html/${subjectInfo?.attachment_json?.url}`
|
|
|
|
|
}
|
|
|
|
|
]
|
|
|
|
|
}
|
|
|
|
|
}else{
|
|
|
|
|
// 无附件
|
|
|
|
|
fieldsValue = subjectValue;
|
|
|
|
|
}
|
|
|
|
|
formInstanceRef.current?.setFieldsValue(fieldsValue);
|
|
|
|
|
});
|
|
|
|
|
}, []);
|
|
|
|
|
|
|
|
|
|
}, [subjectInfo]);
|
|
|
|
|
|
|
|
|
|
return (
|
|
|
|
|
<PageContainer content={''} extraContent={''}>
|
|
|
|
@ -141,8 +274,8 @@ export default () => {
|
|
|
|
|
}>
|
|
|
|
|
formMapRef={formMapRef}
|
|
|
|
|
formRef={formRef}
|
|
|
|
|
onFinish={async () => {
|
|
|
|
|
await waitTime(1000);
|
|
|
|
|
onFinish={async (values) => {
|
|
|
|
|
console.log('values::', values)
|
|
|
|
|
message.success('提交成功');
|
|
|
|
|
}}
|
|
|
|
|
formProps={{
|
|
|
|
@ -162,53 +295,48 @@ export default () => {
|
|
|
|
|
stepProps={{
|
|
|
|
|
description: false,
|
|
|
|
|
}}
|
|
|
|
|
/*
|
|
|
|
|
request={async () => {
|
|
|
|
|
|
|
|
|
|
const data = await getSubjectInfo(5);
|
|
|
|
|
console.log(data);
|
|
|
|
|
console.log('getSubjectInfo', data);
|
|
|
|
|
|
|
|
|
|
// return { data: bean }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
onFinish={async (value) => {
|
|
|
|
|
}}*/
|
|
|
|
|
onFinish={async (value: any) => {
|
|
|
|
|
console.log(value, "vvvvv");
|
|
|
|
|
|
|
|
|
|
const _data = await saveSubject({
|
|
|
|
|
const url = value?.upload[0]?.url?.replace('/dsideal_yy/html/','') || value?.upload[0]?.response?.url;
|
|
|
|
|
const { data } = await saveSubject({
|
|
|
|
|
...value,
|
|
|
|
|
attachment_json: `{ "url": "${value.upload[0].response.url}"}`
|
|
|
|
|
subject_id: params?.id,
|
|
|
|
|
attachment_json: `{ "url": "${url}"}`
|
|
|
|
|
});
|
|
|
|
|
return {
|
|
|
|
|
current: _data?.page_number,
|
|
|
|
|
data: _data?.data?.list,
|
|
|
|
|
pageSize: _data?.page_size,
|
|
|
|
|
total: _data?.total_row || 0,
|
|
|
|
|
};
|
|
|
|
|
setSubjectIntro({subject_id:data?.subject_id, subject_name: value?.subject_name, subject_describe:value?.subject_describe});
|
|
|
|
|
|
|
|
|
|
return true;
|
|
|
|
|
}}
|
|
|
|
|
>
|
|
|
|
|
<Row gutter={24}>
|
|
|
|
|
<Col lg={24} md={24} sm={24}>
|
|
|
|
|
<ProFormText
|
|
|
|
|
|
|
|
|
|
name="subject_name"
|
|
|
|
|
label="主题名称"
|
|
|
|
|
width="md"
|
|
|
|
|
width="xl"
|
|
|
|
|
// tooltip="最长为 6 位汉字,需要与考生身份证一致"
|
|
|
|
|
placeholder="请输入名称"
|
|
|
|
|
// rules={[{ required: true }]}
|
|
|
|
|
rules={[{ required: true }]}
|
|
|
|
|
// value="锦书"
|
|
|
|
|
// disabled
|
|
|
|
|
/>
|
|
|
|
|
<ProFormRichEdit
|
|
|
|
|
name="subject_describe"
|
|
|
|
|
label="主题介绍"
|
|
|
|
|
width="md"
|
|
|
|
|
width="xl"
|
|
|
|
|
// tooltip="最长为 6 位汉字,需要与考生身份证一致"
|
|
|
|
|
placeholder="请输入介绍"
|
|
|
|
|
// rules={[{ required: true }]}
|
|
|
|
|
rules={[{ required: true }]}
|
|
|
|
|
// value="锦书"
|
|
|
|
|
// disabled
|
|
|
|
|
|
|
|
|
@ -220,13 +348,24 @@ export default () => {
|
|
|
|
|
fieldProps={{
|
|
|
|
|
name: 'file',
|
|
|
|
|
listType: 'picture-card',
|
|
|
|
|
maxCount: 1,
|
|
|
|
|
beforeUpload: (file) => {
|
|
|
|
|
console.log('file', file)
|
|
|
|
|
// 获取文件名
|
|
|
|
|
SetUploadFileName(file?.name);
|
|
|
|
|
// 获取最后一个.的位置
|
|
|
|
|
const index = file?.name.lastIndexOf(".");
|
|
|
|
|
// 获取后缀
|
|
|
|
|
SetUploadFileExt(file?.name.substr(index + 1));
|
|
|
|
|
},
|
|
|
|
|
data: {
|
|
|
|
|
name: '5.jpg',
|
|
|
|
|
name: uploadFileName,
|
|
|
|
|
chunk: 0,
|
|
|
|
|
chunks: 1,
|
|
|
|
|
key: 'down/Material/BC/BCFFEA09-9660-9D40-8D11-EF7D7110F7A5.jpg'
|
|
|
|
|
key: `down/Syzx/${uuid?.substr(0, 2)}/${uuid}.${uploadFileExt}`
|
|
|
|
|
}
|
|
|
|
|
}}
|
|
|
|
|
rules={[{ required: true }]}
|
|
|
|
|
action="/dsideal_yy/res/plupload/"
|
|
|
|
|
extra=""
|
|
|
|
|
/>
|
|
|
|
@ -244,6 +383,7 @@ export default () => {
|
|
|
|
|
description: false,
|
|
|
|
|
}}
|
|
|
|
|
onFinish={async (fileds) => {
|
|
|
|
|
/*
|
|
|
|
|
if (params.id) {
|
|
|
|
|
fileds = { ...fileds, id: params.id }
|
|
|
|
|
}
|
|
|
|
@ -258,6 +398,7 @@ export default () => {
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
// await waitTime(2000);
|
|
|
|
|
*/
|
|
|
|
|
return true;
|
|
|
|
|
|
|
|
|
|
}}
|
|
|
|
@ -268,23 +409,27 @@ export default () => {
|
|
|
|
|
column={1}
|
|
|
|
|
//actionRef={actionRef}
|
|
|
|
|
title="主题信息"
|
|
|
|
|
/*
|
|
|
|
|
request={async () => {
|
|
|
|
|
console.log('step2 主题信息')
|
|
|
|
|
return Promise.resolve({
|
|
|
|
|
success: true,
|
|
|
|
|
data: { id: '这是一段文本', object: '', date: '2020-07-30 08:00', duration: '', grade: 100, through: '>60', learn: '>20 min', times: 2 },
|
|
|
|
|
});
|
|
|
|
|
}}
|
|
|
|
|
}}*/
|
|
|
|
|
extra={false}
|
|
|
|
|
>
|
|
|
|
|
<ProDescriptions.Item dataIndex="id" hideInDescriptions />
|
|
|
|
|
<ProDescriptions.Item dataIndex="object" label="主题名称" valueType="text" />
|
|
|
|
|
<ProDescriptions.Item dataIndex="date" label="主题介绍" valueType="text" />
|
|
|
|
|
<ProDescriptions.Item dataIndex="subject_id" hideInDescriptions />
|
|
|
|
|
<ProDescriptions.Item dataIndex="subject_name" label="主题名称" valueType="text">{subjectIntro?.subject_name}</ProDescriptions.Item>
|
|
|
|
|
<ProDescriptions.Item dataIndex="subject_describe" label="主题介绍" valueType="text">
|
|
|
|
|
<div dangerouslySetInnerHTML={{__html: subjectIntro?.subject_describe}} />
|
|
|
|
|
</ProDescriptions.Item>
|
|
|
|
|
</ProDescriptions>
|
|
|
|
|
|
|
|
|
|
<ProTable<TableListItem, TableListPagination>
|
|
|
|
|
headerTitle={false}
|
|
|
|
|
actionRef={actionRef}
|
|
|
|
|
rowKey="course_id"
|
|
|
|
|
rowKey="chapter_id"
|
|
|
|
|
options={false}
|
|
|
|
|
search={false}
|
|
|
|
|
toolBarRender={() => [
|
|
|
|
@ -299,17 +444,18 @@ export default () => {
|
|
|
|
|
</Button>,
|
|
|
|
|
]}
|
|
|
|
|
request={async (value) => {
|
|
|
|
|
|
|
|
|
|
// const _data = await saveSubject({
|
|
|
|
|
// ...value,
|
|
|
|
|
// attachment_json: `{ "url": "${value.upload[0].response.url}"}`
|
|
|
|
|
// });
|
|
|
|
|
// return {
|
|
|
|
|
// current: _data?.page_number,
|
|
|
|
|
// data: _data?.data?.list,
|
|
|
|
|
// pageSize: _data?.page_size,
|
|
|
|
|
// total: _data?.total_row || 0,
|
|
|
|
|
// };
|
|
|
|
|
const { data } = await queryListChapterBySubject({
|
|
|
|
|
subject_id: params?.id || 0,
|
|
|
|
|
page_number: value?.current || 1,
|
|
|
|
|
page_size: value?.pageSize,
|
|
|
|
|
});
|
|
|
|
|
return {
|
|
|
|
|
current: data?.page_number,
|
|
|
|
|
data: data?.list,
|
|
|
|
|
pageSize: data?.page_size,
|
|
|
|
|
success: true,
|
|
|
|
|
total: data?.total_row || 0,
|
|
|
|
|
};
|
|
|
|
|
}}
|
|
|
|
|
// dataSource={list}
|
|
|
|
|
columns={columns}
|
|
|
|
@ -335,7 +481,14 @@ export default () => {
|
|
|
|
|
// 表单处理
|
|
|
|
|
console.log('columns:', columns);
|
|
|
|
|
console.log('values:', values);
|
|
|
|
|
|
|
|
|
|
const success = await handleAddChapter({
|
|
|
|
|
...values,
|
|
|
|
|
subject_id: params?.id || 0,
|
|
|
|
|
});
|
|
|
|
|
if(success){
|
|
|
|
|
handleCreateModalVisible(false);
|
|
|
|
|
actionRef.current?.reloadAndRest?.();
|
|
|
|
|
}
|
|
|
|
|
}}
|
|
|
|
|
submitter={{
|
|
|
|
|
render: (props, doms) => (
|
|
|
|
@ -360,7 +513,9 @@ export default () => {
|
|
|
|
|
stepProps={{
|
|
|
|
|
description: false,
|
|
|
|
|
}}
|
|
|
|
|
onFinish={async () => {
|
|
|
|
|
onFinish={async (values) => {
|
|
|
|
|
console.log('subject_id:', subjectIntro?.subject_id);
|
|
|
|
|
await commitSubject({subject_id: subjectIntro?.subject_id});
|
|
|
|
|
console.log(formRef.current?.getFieldsValue());
|
|
|
|
|
// 跳转到指定路由
|
|
|
|
|
history.push('/course/subject');
|
|
|
|
@ -369,30 +524,18 @@ export default () => {
|
|
|
|
|
>
|
|
|
|
|
|
|
|
|
|
<Row gutter={24}>
|
|
|
|
|
<Col lg={12} md={12} sm={12} offset={8}>
|
|
|
|
|
<ProDescriptions
|
|
|
|
|
layout='horizontal'
|
|
|
|
|
column={1}
|
|
|
|
|
//actionRef={actionRef}
|
|
|
|
|
title="模拟考试"
|
|
|
|
|
request={async () => {
|
|
|
|
|
return Promise.resolve({
|
|
|
|
|
success: true,
|
|
|
|
|
data: { id: '这是一段文本', object: '', date: '2020-07-30 08:00', duration: '', grade: 100, through: '>60', learn: '>20 min', times: 2 },
|
|
|
|
|
});
|
|
|
|
|
}}
|
|
|
|
|
extra={false}
|
|
|
|
|
>
|
|
|
|
|
<ProDescriptions.Item dataIndex="id" hideInDescriptions />
|
|
|
|
|
<ProDescriptions.Item dataIndex="object" label="考试名称" valueType="text" />
|
|
|
|
|
<ProDescriptions.Item dataIndex="date" label="关联培训主题" valueType="text" />
|
|
|
|
|
<ProDescriptions.Item dataIndex="duration" label="考试时长" valueType="text" />
|
|
|
|
|
|
|
|
|
|
<ProDescriptions.Item dataIndex="grade" label="考试信息" valueType="text" />
|
|
|
|
|
|
|
|
|
|
<ProDescriptions.Item dataIndex="through" label="通过标准" valueType="text" />
|
|
|
|
|
<ProDescriptions.Item dataIndex="times" label="考试次数" valueType="text" />
|
|
|
|
|
</ProDescriptions>
|
|
|
|
|
<Col lg={12} md={12} sm={12} offset={6}>
|
|
|
|
|
<Result
|
|
|
|
|
className={styles.registerResult}
|
|
|
|
|
status="success"
|
|
|
|
|
title={
|
|
|
|
|
<div className={styles.title}>
|
|
|
|
|
主题 <span style={{color: '#1890ff'}}>{subjectIntro?.subject_name} </span>创建/修改成功
|
|
|
|
|
</div>
|
|
|
|
|
}
|
|
|
|
|
subTitle="点击提交将设置为发布状态。"
|
|
|
|
|
//extra={actions}
|
|
|
|
|
/>
|
|
|
|
|
</Col>
|
|
|
|
|
</Row>
|
|
|
|
|
</StepsForm.StepForm>
|
|
|
|
|