zhengpengju 3 years ago
commit 8431e2b7d5

@ -107,7 +107,7 @@ const CardList = () => {
<> <>
<Row> <Row>
<Col span={16} style={{ display: 'inline-block', padding: 10 }}><span></span><span style={{ display: 'inline-block', width: '80%' }}> <Col span={16} style={{ display: 'inline-block', padding: 10 }}><span></span><span style={{ display: 'inline-block', width: '80%' }}>
<Progress percent={subject_data ? parseInt(subject_data.subject_learning_progress * 100) : 0} <Progress percent={subject_data ? parseInt(subject_data.subject_learning_progress ) : 0}
format={(percent) => percent === 100 ? '100%' : `${percent}%`} format={(percent) => percent === 100 ? '100%' : `${percent}%`}
/> />
</span></Col> </span></Col>
@ -182,7 +182,7 @@ const CardList = () => {
<div title={item?.course_name} style={{ paddingRight: '1rem', width: '30%', display: 'inline-block', verticalAlign: 'middle', overflow: 'hidden', textOverflow: 'ellipsis', whiteSpace: 'nowrap' }}>{item?.course_name}</div> <div title={item?.course_name} style={{ paddingRight: '1rem', width: '30%', display: 'inline-block', verticalAlign: 'middle', overflow: 'hidden', textOverflow: 'ellipsis', whiteSpace: 'nowrap' }}>{item?.course_name}</div>
<div style={{ paddingRight: '1rem', width: '10%', display: 'inline-block' }}>{item?.course_hours*60}</div> <div style={{ paddingRight: '1rem', width: '10%', display: 'inline-block' }}>{item?.course_hours*60}</div>
<div style={{ paddingRight: '1rem', width: '30%', display: 'inline-block' }}> <div style={{ paddingRight: '1rem', width: '30%', display: 'inline-block' }}>
<Progress percent={item?parseInt(item.learning_progress * 100):0} <Progress percent={item?parseInt(item.learning_progress):0}
format={(percent) => percent === 100 ? '100%' : `${percent}%`} format={(percent) => percent === 100 ? '100%' : `${percent}%`}
/> />
</div> </div>

@ -77,7 +77,7 @@ const SubjectList = () => {
</Card.Grid> </Card.Grid>
<Card.Grid hoverable={false} style={{width:'30%',textAlign:'center'}}> <Card.Grid hoverable={false} style={{width:'30%',textAlign:'center'}}>
<Progress type="circle" <Progress type="circle"
percent={item?parseInt(item.subject_learning_progress*100):0} percent={item?parseInt(item.subject_learning_progress):0}
format={(percent) => percent === 100 ? '100%' : `${percent}%`} format={(percent) => percent === 100 ? '100%' : `${percent}%`}
/> />
</Card.Grid> </Card.Grid>

@ -63,7 +63,7 @@ const Qualification = () => {
return ( return (
<div className="qualification" style={{height:window.innerHeight-200,background:'#fff',width:'100%',padding:20}}> <div className="qualification" style={{height:window.innerHeight-200,background:'#fff',width:'100%',padding:20}}>
<div ><span className="title" onClick={()=>{history.push('/dashboard/workplace')}} style={{color:'#8C8C8C',cursor:'pointer',}}></span> / </div> <div ><span className="title" onClick={()=>{history.push('/dashboard/workplace')}} style={{color:'#8C8C8C',cursor:'pointer',}}></span> / / {examinationInfo?.examination_name}</div>
<div style={{paddingTop:'3rem',width:'20rem',margin:'0 auto'}}> <div style={{paddingTop:'3rem',width:'20rem',margin:'0 auto'}}>
<div className='condition' > <div className='condition' >
<div className='condition-title' ></div> <div className='condition-title' ></div>

@ -1,6 +1,6 @@
import type { FC } from 'react'; import type { FC } from 'react';
import { useEffect } from 'react'; import { useEffect } from 'react';
import { Avatar, Card, Col, List, Skeleton, Row, Statistic, Descriptions, Progress, Table, Button } from 'antd'; import { Avatar, Card, Col, List, Skeleton, Row, Statistic, Descriptions, Progress, Table, Button ,Image} from 'antd';
import { Line, Radar } from '@ant-design/charts'; import { Line, Radar } from '@ant-design/charts';
import { Link, history, useRequest } from 'umi'; import { Link, history, useRequest } from 'umi';
import { PageContainer } from '@ant-design/pro-layout'; import { PageContainer } from '@ant-design/pro-layout';
@ -191,7 +191,8 @@ const Workplace: FC = () => {
const { loading: lastexaminationLoading, data: examinationList } = useRequest( const { loading: lastexaminationLoading, data: examinationList } = useRequest(
() => getExaminationList( () => getExaminationList(
{ {
person_id: cookie.load('person_id') person_id: cookie.load('person_id'),
b_use:1
}), { }), {
formatResult: (result) => { formatResult: (result) => {
return result.table_List; return result.table_List;
@ -268,7 +269,8 @@ const Workplace: FC = () => {
className={styles.studyCard} className={styles.studyCard}
title="当前学习" title="当前学习"
loading={activitiesLoading} loading={activitiesLoading}
cover={<img alt="example" src={lastLearningList?.course_attachment_json?.img} />} // cover={<img alt="example" src={lastLearningList?.course_attachment_json?.img} />}
cover={<Image preview={false} width={200} height={150} src={`/dsideal_yy/html/${lastLearningList?.subject_attachment_json?.url}`} fallback="../fallback.svg" />}
> >
<Descriptions title={lastLearningList?.course_name} layout='horizontal' column={1} > <Descriptions title={lastLearningList?.course_name} layout='horizontal' column={1} >
<Descriptions.Item label="主将人">{lastLearningList?.lecture_teacher}</Descriptions.Item> <Descriptions.Item label="主将人">{lastLearningList?.lecture_teacher}</Descriptions.Item>

@ -127,7 +127,7 @@ const CardList = () => {
</Card.Grid> </Card.Grid>
<Card.Grid hoverable={false} style={{width:'25%',textAlign:'center',boxShadow: 'none'}}> <Card.Grid hoverable={false} style={{width:'25%',textAlign:'center',boxShadow: 'none'}}>
<Button type="primary" <Button type="primary"
style={{width:'10rem',height:'5'}} style={{width:'10rem',height:'5rem'}}
onClick={() => { onClick={() => {
console.log('last_data', last_data) console.log('last_data', last_data)
const info = subject_data.subject_id + "," + cookie.load('person_id') const info = subject_data.subject_id + "," + cookie.load('person_id')

@ -123,6 +123,7 @@ export default () => {
<div className='condition-title' ></div> <div className='condition-title' ></div>
<div className='condition-text' style={{display:'inline-block',}} > <div className='condition-text' style={{display:'inline-block',}} >
<Input.Password maxLength='12' <Input.Password maxLength='12'
placeholder="输入内容"
value={oldPassWord} value={oldPassWord}
onChange={(e)=>{ onChange={(e)=>{
const strExp= /^[A-Za-z0-9]+$/; const strExp= /^[A-Za-z0-9]+$/;
@ -142,6 +143,7 @@ export default () => {
<div className='condition-text' style={{display:'inline-block',}} > <div className='condition-text' style={{display:'inline-block',}} >
<Input.Password maxLength='12' <Input.Password maxLength='12'
value={newPassWord} value={newPassWord}
placeholder="输入内容"
onChange={(e)=>{ onChange={(e)=>{
const strExp= /^[A-Za-z0-9]+$/; const strExp= /^[A-Za-z0-9]+$/;
if(strExp.test(e.target.value) || e.target.value===''){ if(strExp.test(e.target.value) || e.target.value===''){
@ -160,6 +162,7 @@ export default () => {
<div className='condition-text' style={{display:'inline-block',}} > <div className='condition-text' style={{display:'inline-block',}} >
<Input.Password maxLength='12' <Input.Password maxLength='12'
value={secondNewPassWord} value={secondNewPassWord}
placeholder="输入内容"
onChange={(e)=>{ onChange={(e)=>{
const strExp= /^[A-Za-z0-9]+$/; const strExp= /^[A-Za-z0-9]+$/;
if(strExp.test(e.target.value) || e.target.value===''){ if(strExp.test(e.target.value) || e.target.value===''){
@ -186,7 +189,7 @@ export default () => {
showConfirm(); showConfirm();
} }
}}></Button> }}></Button>
</div> </div>
</div> </div>

@ -16,7 +16,7 @@ import ProCard from '@ant-design/pro-card';
import { Button, Col, message, Row } from 'antd'; import { Button, Col, message, Row } from 'antd';
import { PageContainer } from '@ant-design/pro-layout'; import { PageContainer } from '@ant-design/pro-layout';
import ProDescriptions from '@ant-design/pro-descriptions'; import ProDescriptions from '@ant-design/pro-descriptions';
import { queryExaminationRule,queryPersonInfo,savePersonSignUpInfo } from './service'; import { queryExaminationRule,queryPersonInfo,savePersonSignUpInfo,checkExaminationPersonID } from './service';
import cookie from 'react-cookies'; import cookie from 'react-cookies';
import styles from './index.less' import styles from './index.less'
@ -85,12 +85,23 @@ export default () => {
description: false, description: false,
}} }}
onFinish={async (values) => { onFinish={async (values) => {
// console.log('values',values); try {
// console.log(formRef.current?.getFieldsValue()); const info = await checkExaminationPersonID({
// await waitTime(2000); examination_id:params.examination_id,
setBaseInfo(values); id_code:values.idCard
return true; });
}} setBaseInfo(values);
return true;
}catch (error) {
if(error.response){
message.error(error.response.info);
}else {
message.error('填写失败,请重新填写!');
}
return false;
}
}}
> >
<Row gutter={24}> <Row gutter={24}>
<Col lg={12} md={12} sm={24}> <Col lg={12} md={12} sm={24}>
@ -123,16 +134,16 @@ export default () => {
/> />
<ProFormDatePicker name="birthday" <ProFormDatePicker name="birthday"
label="出生年月" label="出生年月"
picker="month"
fieldProps={{ fieldProps={{
format: 'YYYY-MM', format: 'YYYY-MM',
}} }}
rules={[{ required: true, message: '请选择出生年月' }]} rules={[{ required: true, message: '请选择出生年月' }]}
/> />
<ProFormText name="idCard" label="身份证号" width="sm" rules={[{ required: true, message: '请输入身份证号' },{len:18,message:'请输入18位身份证号'},{pattern:/^[0-9]+$/,message:'只允许输入数字'}]}/> <ProFormText name="idCard" label="身份证号" width="sm" rules={[{ required: true, message: '请输入身份证号' },{pattern:/^[1-9]\d{5}(18|19|20|(3\d))\d{2}((0[1-9])|(1[0-2]))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/,message:'请输入正确身份证号'}]}/>
<ProFormText name="address" label="家庭地址" rules={[{ required: true, message: '请输入家庭地址' }]}/> <ProFormText name="address" label="家庭地址" rules={[{ required: true, message: '请输入家庭地址' },{ whitespace: true },]}/>
<ProFormText name="contact" label="联系方式" width="lg" placeholder="联系方式" rules={[{ required: true, message: '请输入联系方式' },{len:11,message:'请输入11位联系方式'},{pattern:/^[0-9]+$/,message:'只允许输入数字'}]} /> <ProFormText name="contact" label="联系方式" width="lg" placeholder="联系方式" rules={[{ required: true, message: '请输入联系方式' },{pattern:/^(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[0-35-9])\d{8}$/,message:'请输入正确联系方式'}]} />
</Col> </Col>
<Col lg={12} md={12} sm={24}> <Col lg={12} md={12} sm={24}>
<ProFormText name="org" label="所在学校" width="md" placeholder="请填写" value={backInfo?.bureau_name} disabled /> <ProFormText name="org" label="所在学校" width="md" placeholder="请填写" value={backInfo?.bureau_name} disabled />
@ -150,14 +161,14 @@ export default () => {
value: '全日制本科', value: '全日制本科',
}, },
{ {
label: '硕士研究生及以上...', label: '硕士研究生及以上学历',
value: '硕士研究生及以上...', value: '硕士研究生及以上学历',
}, },
]} ]}
placeholder="请选择" placeholder="请选择"
/> />
<ProFormText name="graduation" label="毕业院校" rules={[{ required: true, message: '请输入毕业院校' }]}/> <ProFormText name="graduation" label="毕业院校" rules={[{ required: true, message: '请输入毕业院校' },{ whitespace: true },]}/>
<ProFormText name="major" label="专业" rules={[{ required: true, message: '请输入专业' }]}/> <ProFormText name="major" label="专业" rules={[{ required: true, message: '请输入专业' },{ whitespace: true },]}/>
<ProFormSelect <ProFormSelect
label='任教学科' label='任教学科'
name="subject" name="subject"
@ -269,37 +280,37 @@ export default () => {
// console.log(formRef.current?.getFieldsValue()); // console.log(formRef.current?.getFieldsValue());
// 跳转到指定路由 // 跳转到指定路由
try { try {
const success = await savePersonSignUpInfo({ const success = await savePersonSignUpInfo({
address:baseInfo?.address, address:baseInfo?.address,
birthday:baseInfo?.birthday, birthday:baseInfo?.birthday,
bureau_id:backInfo?.bureau_id, bureau_id:backInfo?.bureau_id,
bureau_name:backInfo?.bureau_name, bureau_name:backInfo?.bureau_name,
city_id:backInfo?.city_id, city_id:backInfo?.city_id,
city_name:backInfo?.city_name, city_name:backInfo?.city_name,
district_id:backInfo?.district_id, district_id:backInfo?.district_id,
district_name:backInfo?.district_name, district_name:backInfo?.district_name,
education:baseInfo?.qualifications, education:baseInfo?.qualifications,
examination_id:params.examination_id, examination_id:params.examination_id,
gender:baseInfo?.sex, gender:baseInfo?.sex,
id_code:baseInfo?.idCard, id_code:baseInfo?.idCard,
identity_id:backInfo?.identity_id, identity_id:backInfo?.identity_id,
major:baseInfo?.major, major:baseInfo?.major,
person_id:backInfo?.person_id, person_id:backInfo?.person_id,
person_name:backInfo?.person_name, person_name:backInfo?.person_name,
province_id:backInfo?.province_id, province_id:backInfo?.province_id,
province_name:backInfo?.province_name, province_name:backInfo?.province_name,
subject:baseInfo?.subject, subject:baseInfo?.subject,
tel:baseInfo?.contact, tel:baseInfo?.contact,
university:baseInfo?.graduation, university:baseInfo?.graduation,
}); });
const msg=testInfo.examination_start_time+','+testInfo.examination_end_time+','+testInfo.examination_name+','+success.admission_number; const msg=testInfo.examination_start_time+','+testInfo.examination_end_time+','+testInfo.examination_name+','+success.admission_number;
history.push( '/registration/success/'+msg); history.push( '/registration/success/'+msg);
}catch (error) { }catch (error) {
if(error.response){ if(error.response){
message.error(error.response.info); message.error(error.response.info);
}else { }else {
message.error('报名失败'); message.error('报名失败');
} }
} }

@ -50,3 +50,11 @@ export async function savePersonSignUpInfo(data: { [key: string]: any }, options
...(options || {}), ...(options || {}),
}); });
} }
//身份证重复校验/dsideal_yy/zygh/training/person/checkExaminationPersonID
export async function checkExaminationPersonID(params: {
}) {
return request('/dsideal_yy/zygh/training/person/checkExaminationPersonID', {
params,
});
}

Loading…
Cancel
Save