修正画面题型切换修改

main
hujunpeng 3 months ago
parent 8cb58645cd
commit 88c50b0df1
  1. 2
      packages/examination/src/views/examPaper/examPaperAdd.tsx
  2. 3
      packages/examination/src/views/question/questionEdit.tsx

@ -70,12 +70,14 @@ class ExamPaperAdd extends Component<any, States> {
componentDidMount() { componentDidMount() {
this.handleFindDict(); this.handleFindDict();
const { state } = this.props.location; const { state } = this.props.location;
if (state){
const { id, isEdit } = state; const { id, isEdit } = state;
this.setState({ id: id ,isEdit: isEdit}); this.setState({ id: id ,isEdit: isEdit});
if(isEdit === 'true'){ if(isEdit === 'true'){
this.handleGetDetail(id); this.handleGetDetail(id);
} }
} }
}
// 字典 // 字典
handleFindDict() { handleFindDict() {

@ -79,6 +79,9 @@ class QuestionEdit extends Component<any, States> {
questionTypes: value questionTypes: value
}; };
}); });
const formValues = {};
formValues[`answer`] = '';
this.formRef.current.setFieldsValue(formValues);
}; };
// 保存修改 // 保存修改

Loading…
Cancel
Save