Merge remote-tracking branch 'origin/main'

# Conflicts:
#	packages/examination/src/components/contentMain/index.js
main
sunhonglei 5 months ago
commit 389ea4ca82
  1. 15
      packages/examination/src/api/examPaper/index.tsx
  2. 2
      packages/examination/src/components/contentMain/index.js
  3. 2
      packages/examination/src/views/examPaper/examPaperList.tsx
  4. 2
      packages/examination/src/views/question/questionAdd.tsx
  5. 2
      packages/examination/src/views/question/questionUp.tsx
  6. 4
      packages/examination/src/views/slider/menu.tsx

@ -105,3 +105,18 @@ export function getDetail(id: string) {
method: 'get'
});
}
/*
*
*/
export function getRandomQuestions(industryId: string, questionCount: number){
const data = {
industryId:industryId,
questionCount:questionCount
};
return axios({
url: "/ex/examPaper/getRandomQuestions",
method: 'post',
data: data
})
}

@ -34,6 +34,7 @@ import QuestionUp from 'views/question/questionUp';
import ExamPaperList from 'views/examPaper/examPaperList';
import ExamDetailAnalysis from "../../views/exam-online/exam-detail-analysis";
import ExamPaperAnalysis from "../../views/exam-online/exam-paper-analysis";
import ExamPaperAdd from 'views/examPaper/examPaperAdd';
class ContentMain extends Component {
@ -63,6 +64,7 @@ class ContentMain extends Component {
<Route exact path='/questionAdd' component={ QuestionAdd }/>
<Route exact path='/questionUp' component={ QuestionUp }/>
<Route exact path='/examPaperList' component={ ExamPaperList }/>
<Route exact path='/examPaperAdd' component={ ExamPaperAdd }/>
<Redirect exact from='/' to='/home'/>
</Switch>
</div>

@ -277,7 +277,7 @@ class ExamPaperList extends Component<any, States> {
// 页面跳转
const handleAddQuestion = () => {
this.props.history.push('/questionAdd');
this.props.history.push('/examPaperAdd');
};
const columns: any = [

@ -265,7 +265,7 @@ class QuestionAdd extends Component<any, States> {
this.props.history.push('/questionList');
};
return (
<div className="container">
<div className="container" >
<div style={{ textAlign: 'right'}}>
<Button type="default" style={{ marginRight: 10 }} onClick={this.downloadTemplate}></Button>
<Button type="default" onClick={this.handleImportClick}></Button>

@ -76,7 +76,7 @@ class QuestionUp extends Component<any, States> {
getDetail(id).then((res: any) => {
if (res.data) {
let answerOptions = {};
const options = res.data.options.split(';');
const options = res.data.options.split('');
options.forEach((option: any) => {
const [key, value] = option.split(':');
answerOptions[key] = value;

@ -44,7 +44,7 @@ const menuList = [
icon: 'icon-peizhi',
subs: [
{
title: '题库管理',
title: '题库列表',
key: 'questionList',
}
]
@ -55,7 +55,7 @@ const menuList = [
icon: 'icon-peizhi',
subs: [
{
title: '试卷管理',
title: '试卷列表',
key: 'examPaperList',
}
]

Loading…
Cancel
Save