|
|
|
@ -34,11 +34,6 @@ class ExamPaperList extends Component<any, States> { |
|
|
|
|
|
|
|
|
|
componentDidMount() { |
|
|
|
|
this.handleFindIndustry(); |
|
|
|
|
const savedFormValues = sessionStorage.getItem('examPaperListFormValues'); |
|
|
|
|
if (savedFormValues) { |
|
|
|
|
const values = JSON.parse(savedFormValues); |
|
|
|
|
this.formRef.current.setFieldsValue(values); |
|
|
|
|
} |
|
|
|
|
this.handlegetList('def'); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -62,7 +57,6 @@ class ExamPaperList extends Component<any, States> { |
|
|
|
|
page : stat && stat === 'init' ? 1 : page |
|
|
|
|
}; |
|
|
|
|
this.setState({ page: data.page, num: data.num }); |
|
|
|
|
sessionStorage.setItem('examPaperListFormValues', JSON.stringify(values)); |
|
|
|
|
getList(data).then((res) => { |
|
|
|
|
this.setState({ |
|
|
|
|
list: res.data.data, |
|
|
|
@ -80,7 +74,6 @@ class ExamPaperList extends Component<any, States> { |
|
|
|
|
|
|
|
|
|
// 重置
|
|
|
|
|
handleReset = () => { |
|
|
|
|
sessionStorage.removeItem('examPaperListFormValues'); |
|
|
|
|
this.formRef.current.resetFields(); |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
@ -330,13 +323,21 @@ class ExamPaperList extends Component<any, States> { |
|
|
|
|
width: 200, |
|
|
|
|
render: (record: any) => [ |
|
|
|
|
<span className='mr10 link' onClick={() => { |
|
|
|
|
sessionStorage.setItem('id', String(record.id)); |
|
|
|
|
sessionStorage.setItem('isEdit', "true"); |
|
|
|
|
this.props.history.push(`/examPaperAdd`); |
|
|
|
|
this.props.history.push({ |
|
|
|
|
pathname: '/examPaperAdd', |
|
|
|
|
state: { |
|
|
|
|
id: String(record.id), |
|
|
|
|
isEdit: "true" |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
}}>编辑</span>, |
|
|
|
|
<span className='mr10 link' onClick={() => { |
|
|
|
|
sessionStorage.setItem('id', String(record.id)); |
|
|
|
|
this.props.history.push(`/examPaperView`); |
|
|
|
|
this.props.history.push({ |
|
|
|
|
pathname: '/examPaperView', |
|
|
|
|
state: { |
|
|
|
|
id: String(record.id) |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
}}>预览</span>, |
|
|
|
|
<span className='mr10 link' onClick={() => { |
|
|
|
|
this.handleUpdatePaperStatus(record.id, record.paperStatus); |
|
|
|
|