题库管理和试卷管理代码提交

main
hujunpeng 4 months ago
parent 7857eb3e38
commit e32823d8a0
  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/questionUp.tsx
  5. 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
})
}

@ -32,6 +32,7 @@ import QuestionList from 'views/question/questionList';
import QuestionAdd from 'views/question/questionAdd';
import QuestionUp from 'views/question/questionUp';
import ExamPaperList from 'views/examPaper/examPaperList';
import ExamPaperAdd from 'views/examPaper/examPaperAdd';
class ContentMain extends Component {
@ -58,6 +59,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 = [

@ -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;

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

Loading…
Cancel
Save