|
|
|
@ -1,23 +1,12 @@
|
|
|
|
import React, {Component} from "react";
|
|
|
|
import React, { Component } from "react";
|
|
|
|
import {Link, NavLink} from 'react-router-dom';
|
|
|
|
|
|
|
|
import {WordsBtn, ActionBtn, SnackbarHOC, getImageUrl} from 'educoder';
|
|
|
|
|
|
|
|
import axios from 'axios';
|
|
|
|
import axios from 'axios';
|
|
|
|
import {
|
|
|
|
import {
|
|
|
|
notification,
|
|
|
|
|
|
|
|
Spin,
|
|
|
|
|
|
|
|
Table,
|
|
|
|
|
|
|
|
Pagination,
|
|
|
|
Pagination,
|
|
|
|
Drawer,
|
|
|
|
|
|
|
|
Input,
|
|
|
|
|
|
|
|
Tooltip
|
|
|
|
|
|
|
|
} from "antd";
|
|
|
|
} from "antd";
|
|
|
|
import {parabola} from './animation/parabola'
|
|
|
|
|
|
|
|
import Headplugselections from "./component/Headplugselections";
|
|
|
|
import Headplugselections from "./component/Headplugselections";
|
|
|
|
import QuestionModal from "./component/QuestionModal";
|
|
|
|
import QuestionModal from "./component/QuestionModal";
|
|
|
|
import QuestionModals from "./component/QuestionModals";
|
|
|
|
import QuestionModals from "./component/QuestionModals";
|
|
|
|
import Contentpart from "./component/Contentpart";
|
|
|
|
import Contentpart from "./component/Contentpart";
|
|
|
|
import {TPMIndexHOC} from "../tpm/TPMIndexHOC";
|
|
|
|
|
|
|
|
import NoneData from './component/NoneData';
|
|
|
|
|
|
|
|
import './questioncss/questioncom.css';
|
|
|
|
import './questioncss/questioncom.css';
|
|
|
|
import Bottomsubmit from "../modals/Bottomsubmit";
|
|
|
|
import Bottomsubmit from "../modals/Bottomsubmit";
|
|
|
|
|
|
|
|
|
|
|
|
@ -27,16 +16,16 @@ class NewMyShixunModel extends Component {
|
|
|
|
super(props);
|
|
|
|
super(props);
|
|
|
|
this.state = {
|
|
|
|
this.state = {
|
|
|
|
count: 50,
|
|
|
|
count: 50,
|
|
|
|
defaultActiveKey:"1",
|
|
|
|
defaultActiveKey: "1",
|
|
|
|
Headertop: "",
|
|
|
|
Headertop: "",
|
|
|
|
Footerdown: "",
|
|
|
|
Footerdown: "",
|
|
|
|
visible: false,
|
|
|
|
visible: false,
|
|
|
|
placement: 'right',
|
|
|
|
placement: 'right',
|
|
|
|
modalsType: false,
|
|
|
|
modalsType: false,
|
|
|
|
modalsTypes:false,
|
|
|
|
modalsTypes: false,
|
|
|
|
titilesm: "在平台审核后,所有成员均可使用试题",
|
|
|
|
titilesm: "在平台审核后,所有成员均可使用试题",
|
|
|
|
titiless: "是否设置为公开?",
|
|
|
|
titiless: "是否设置为公开?",
|
|
|
|
titilesms:"单选题",
|
|
|
|
titilesms: "单选题",
|
|
|
|
titbool: false,
|
|
|
|
titbool: false,
|
|
|
|
Contentdata: [],
|
|
|
|
Contentdata: [],
|
|
|
|
difficulty: null,
|
|
|
|
difficulty: null,
|
|
|
|
@ -54,109 +43,109 @@ class NewMyShixunModel extends Component {
|
|
|
|
program_questions_count: 0,
|
|
|
|
program_questions_count: 0,
|
|
|
|
single_questions_count: 0,
|
|
|
|
single_questions_count: 0,
|
|
|
|
subjective_questions_count: 0,
|
|
|
|
subjective_questions_count: 0,
|
|
|
|
page:1,
|
|
|
|
page: 1,
|
|
|
|
per_page:10,
|
|
|
|
per_page: 10,
|
|
|
|
disciplinesdata:[],
|
|
|
|
disciplinesdata: [],
|
|
|
|
discipline_id:null,
|
|
|
|
discipline_id: null,
|
|
|
|
sub_discipline_id:null,
|
|
|
|
sub_discipline_id: null,
|
|
|
|
tag_discipline_id:null,
|
|
|
|
tag_discipline_id: null,
|
|
|
|
booljupyterurls:false,
|
|
|
|
booljupyterurls: false,
|
|
|
|
disciplinesdatakc:0,
|
|
|
|
disciplinesdatakc: 0,
|
|
|
|
disciplinesdatazsd:0,
|
|
|
|
disciplinesdatazsd: 0,
|
|
|
|
selectallquestionsonthispages:false,
|
|
|
|
selectallquestionsonthispages: false,
|
|
|
|
oj_status:null,
|
|
|
|
oj_status: null,
|
|
|
|
isVisible: false,
|
|
|
|
isVisible: false,
|
|
|
|
selectionbools:false,
|
|
|
|
selectionbools: false,
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
setdiscipline_id=(discipline_id)=>{
|
|
|
|
setdiscipline_id = (discipline_id) => {
|
|
|
|
this.setState({
|
|
|
|
this.setState({
|
|
|
|
discipline_id:discipline_id,
|
|
|
|
discipline_id: discipline_id,
|
|
|
|
sub_discipline_id:null,
|
|
|
|
sub_discipline_id: null,
|
|
|
|
tag_discipline_id:null,
|
|
|
|
tag_discipline_id: null,
|
|
|
|
keywords:"",
|
|
|
|
keywords: "",
|
|
|
|
page:1,
|
|
|
|
page: 1,
|
|
|
|
per_page:10,
|
|
|
|
per_page: 10,
|
|
|
|
oj_status:null
|
|
|
|
oj_status: null
|
|
|
|
})
|
|
|
|
})
|
|
|
|
var data = {
|
|
|
|
var data = {
|
|
|
|
discipline_id:discipline_id,
|
|
|
|
discipline_id: discipline_id,
|
|
|
|
sub_discipline_id:null,
|
|
|
|
sub_discipline_id: null,
|
|
|
|
tag_discipline_id:null,
|
|
|
|
tag_discipline_id: null,
|
|
|
|
public: this.state.defaultActiveKey,
|
|
|
|
public: this.state.defaultActiveKey,
|
|
|
|
difficulty: this.state.difficulty,
|
|
|
|
difficulty: this.state.difficulty,
|
|
|
|
item_type: this.state.item_type,
|
|
|
|
item_type: this.state.item_type,
|
|
|
|
keywords: null,
|
|
|
|
keywords: null,
|
|
|
|
page: this.state.page,
|
|
|
|
page: this.state.page,
|
|
|
|
per_page:10,
|
|
|
|
per_page: 10,
|
|
|
|
oj_status:null,
|
|
|
|
oj_status: null,
|
|
|
|
exam_id:this.props.exam_id===undefined?"":parseInt(this.props.exam_id),
|
|
|
|
exam_id: this.props.exam_id === undefined ? "" : parseInt(this.props.exam_id),
|
|
|
|
};
|
|
|
|
};
|
|
|
|
this.getdata(data);
|
|
|
|
this.getdata(data);
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
setsub_discipline_id=(discipline_id,sub_discipline_id)=>{
|
|
|
|
setsub_discipline_id = (discipline_id, sub_discipline_id) => {
|
|
|
|
this.setState({
|
|
|
|
this.setState({
|
|
|
|
sub_discipline_id:sub_discipline_id,
|
|
|
|
sub_discipline_id: sub_discipline_id,
|
|
|
|
tag_discipline_id:null,
|
|
|
|
tag_discipline_id: null,
|
|
|
|
keywords:"",
|
|
|
|
keywords: "",
|
|
|
|
page:1,
|
|
|
|
page: 1,
|
|
|
|
per_page:10,
|
|
|
|
per_page: 10,
|
|
|
|
oj_status:null
|
|
|
|
oj_status: null
|
|
|
|
})
|
|
|
|
})
|
|
|
|
var data = {
|
|
|
|
var data = {
|
|
|
|
discipline_id:discipline_id,
|
|
|
|
discipline_id: discipline_id,
|
|
|
|
sub_discipline_id:sub_discipline_id,
|
|
|
|
sub_discipline_id: sub_discipline_id,
|
|
|
|
tag_discipline_id:null,
|
|
|
|
tag_discipline_id: null,
|
|
|
|
public: this.state.defaultActiveKey,
|
|
|
|
public: this.state.defaultActiveKey,
|
|
|
|
difficulty: this.state.difficulty,
|
|
|
|
difficulty: this.state.difficulty,
|
|
|
|
item_type: this.state.item_type,
|
|
|
|
item_type: this.state.item_type,
|
|
|
|
keywords:null,
|
|
|
|
keywords: null,
|
|
|
|
page: 1,
|
|
|
|
page: 1,
|
|
|
|
per_page:10,
|
|
|
|
per_page: 10,
|
|
|
|
oj_status:null,
|
|
|
|
oj_status: null,
|
|
|
|
exam_id:this.props.exam_id===undefined?"":parseInt(this.props.exam_id),
|
|
|
|
exam_id: this.props.exam_id === undefined ? "" : parseInt(this.props.exam_id),
|
|
|
|
};
|
|
|
|
};
|
|
|
|
this.getdata(data);
|
|
|
|
this.getdata(data);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
settag_discipline_id=(tag_discipline_id)=>{
|
|
|
|
settag_discipline_id = (tag_discipline_id) => {
|
|
|
|
this.setState({
|
|
|
|
this.setState({
|
|
|
|
tag_discipline_id:tag_discipline_id,
|
|
|
|
tag_discipline_id: tag_discipline_id,
|
|
|
|
keywords:"",
|
|
|
|
keywords: "",
|
|
|
|
page:1,
|
|
|
|
page: 1,
|
|
|
|
per_page:10,
|
|
|
|
per_page: 10,
|
|
|
|
oj_status:null
|
|
|
|
oj_status: null
|
|
|
|
})
|
|
|
|
})
|
|
|
|
var data = {
|
|
|
|
var data = {
|
|
|
|
discipline_id:this.state.discipline_id,
|
|
|
|
discipline_id: this.state.discipline_id,
|
|
|
|
sub_discipline_id:this.state.sub_discipline_id,
|
|
|
|
sub_discipline_id: this.state.sub_discipline_id,
|
|
|
|
tag_discipline_id:tag_discipline_id,
|
|
|
|
tag_discipline_id: tag_discipline_id,
|
|
|
|
public: this.state.defaultActiveKey,
|
|
|
|
public: this.state.defaultActiveKey,
|
|
|
|
difficulty: this.state.difficulty,
|
|
|
|
difficulty: this.state.difficulty,
|
|
|
|
item_type: this.state.item_type,
|
|
|
|
item_type: this.state.item_type,
|
|
|
|
keywords: null,
|
|
|
|
keywords: null,
|
|
|
|
page: 1,
|
|
|
|
page: 1,
|
|
|
|
per_page:10,
|
|
|
|
per_page: 10,
|
|
|
|
oj_status:null,
|
|
|
|
oj_status: null,
|
|
|
|
exam_id:this.props.exam_id===undefined?"":parseInt(this.props.exam_id),
|
|
|
|
exam_id: this.props.exam_id === undefined ? "" : parseInt(this.props.exam_id),
|
|
|
|
};
|
|
|
|
};
|
|
|
|
this.getdata(data);
|
|
|
|
this.getdata(data);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
//初始化
|
|
|
|
//初始化
|
|
|
|
componentDidMount() {
|
|
|
|
componentDidMount() {
|
|
|
|
const isysladmins=this.props&&this.props.current_user&&this.props.current_user.admin?this.props.current_user.admin:false;
|
|
|
|
const isysladmins = this.props && this.props.current_user && this.props.current_user.admin ? this.props.current_user.admin : false;
|
|
|
|
const is_teacher=this.props&&this.props.current_user&&this.props.current_user.is_teacher?this.props.current_user.is_teacher:false;
|
|
|
|
const is_teacher = this.props && this.props.current_user && this.props.current_user.is_teacher ? this.props.current_user.is_teacher : false;
|
|
|
|
const professional_certification=this.props&&this.props.current_user&&this.props.current_user.professional_certification?this.props.current_user.professional_certification:false;
|
|
|
|
const professional_certification = this.props && this.props.current_user && this.props.current_user.professional_certification ? this.props.current_user.professional_certification : false;
|
|
|
|
let {defaultActiveKey} = this.props;
|
|
|
|
let { defaultActiveKey } = this.props;
|
|
|
|
var defaultActiveKeys=defaultActiveKey;
|
|
|
|
var defaultActiveKeys = defaultActiveKey;
|
|
|
|
if(isysladmins===true||(is_teacher===true&&professional_certification===true)){
|
|
|
|
if (isysladmins === true || (is_teacher === true && professional_certification === true)) {
|
|
|
|
defaultActiveKeys="0"
|
|
|
|
defaultActiveKeys = "0"
|
|
|
|
}else{
|
|
|
|
} else {
|
|
|
|
defaultActiveKeys="1"
|
|
|
|
defaultActiveKeys = "1"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
this.callback(defaultActiveKeys);
|
|
|
|
this.callback(defaultActiveKeys);
|
|
|
|
let url = `/users/get_navigation_info.json`;
|
|
|
|
let url = `/users/get_navigation_info.json`;
|
|
|
|
@ -177,9 +166,11 @@ class NewMyShixunModel extends Component {
|
|
|
|
|
|
|
|
|
|
|
|
//获取题库筛选资料
|
|
|
|
//获取题库筛选资料
|
|
|
|
let urls = `/disciplines.json`;
|
|
|
|
let urls = `/disciplines.json`;
|
|
|
|
axios.get(urls, {params: {
|
|
|
|
axios.get(urls, {
|
|
|
|
source:"question"
|
|
|
|
params: {
|
|
|
|
}}).then((response) => {
|
|
|
|
source: "question"
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}).then((response) => {
|
|
|
|
//console.log("Questiondisciplines");
|
|
|
|
//console.log("Questiondisciplines");
|
|
|
|
//console.log(response.data);
|
|
|
|
//console.log(response.data);
|
|
|
|
if (response) {
|
|
|
|
if (response) {
|
|
|
|
@ -191,17 +182,17 @@ class NewMyShixunModel extends Component {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
componentDidUpdate(prevProps) {
|
|
|
|
componentDidUpdate(prevProps) {
|
|
|
|
if(prevProps.current_user !== this.props.current_user) {
|
|
|
|
if (prevProps.current_user !== this.props.current_user) {
|
|
|
|
debugger
|
|
|
|
debugger
|
|
|
|
const isysladmins=this.props&&this.props.current_user&&this.props.current_user.admin?this.props.current_user.admin:false;
|
|
|
|
const isysladmins = this.props && this.props.current_user && this.props.current_user.admin ? this.props.current_user.admin : false;
|
|
|
|
const is_teacher=this.props&&this.props.current_user&&this.props.current_user.is_teacher?this.props.current_user.is_teacher:false;
|
|
|
|
const is_teacher = this.props && this.props.current_user && this.props.current_user.is_teacher ? this.props.current_user.is_teacher : false;
|
|
|
|
const professional_certification=this.props&&this.props.current_user&&this.props.current_user.professional_certification?this.props.current_user.professional_certification:false;
|
|
|
|
const professional_certification = this.props && this.props.current_user && this.props.current_user.professional_certification ? this.props.current_user.professional_certification : false;
|
|
|
|
let {defaultActiveKey} = this.props;
|
|
|
|
let { defaultActiveKey } = this.props;
|
|
|
|
var defaultActiveKeys=defaultActiveKey;
|
|
|
|
var defaultActiveKeys = defaultActiveKey;
|
|
|
|
if(isysladmins===true||(is_teacher===true&&professional_certification===true)){
|
|
|
|
if (isysladmins === true || (is_teacher === true && professional_certification === true)) {
|
|
|
|
defaultActiveKeys="0"
|
|
|
|
defaultActiveKeys = "0"
|
|
|
|
}else{
|
|
|
|
} else {
|
|
|
|
defaultActiveKeys="1"
|
|
|
|
defaultActiveKeys = "1"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
this.callback(defaultActiveKeys);
|
|
|
|
this.callback(defaultActiveKeys);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@ -211,22 +202,22 @@ class NewMyShixunModel extends Component {
|
|
|
|
callback = (key) => {
|
|
|
|
callback = (key) => {
|
|
|
|
this.setState({
|
|
|
|
this.setState({
|
|
|
|
defaultActiveKey: key,
|
|
|
|
defaultActiveKey: key,
|
|
|
|
selectallquestionsonthispages:false,
|
|
|
|
selectallquestionsonthispages: false,
|
|
|
|
difficulty:null,
|
|
|
|
difficulty: null,
|
|
|
|
page:1,
|
|
|
|
page: 1,
|
|
|
|
oj_status:null
|
|
|
|
oj_status: null
|
|
|
|
})
|
|
|
|
})
|
|
|
|
var data = {
|
|
|
|
var data = {
|
|
|
|
discipline_id:this.state.discipline_id,
|
|
|
|
discipline_id: this.state.discipline_id,
|
|
|
|
sub_discipline_id:this.state.sub_discipline_id,
|
|
|
|
sub_discipline_id: this.state.sub_discipline_id,
|
|
|
|
tag_discipline_id:this.state.tag_discipline_id,
|
|
|
|
tag_discipline_id: this.state.tag_discipline_id,
|
|
|
|
public: key,
|
|
|
|
public: key,
|
|
|
|
item_type: this.state.item_type,
|
|
|
|
item_type: this.state.item_type,
|
|
|
|
difficulty: null,
|
|
|
|
difficulty: null,
|
|
|
|
page: 1,
|
|
|
|
page: 1,
|
|
|
|
per_page:10,
|
|
|
|
per_page: 10,
|
|
|
|
oj_status:null,
|
|
|
|
oj_status: null,
|
|
|
|
exam_id:this.props.exam_id===undefined?"":parseInt(this.props.exam_id),
|
|
|
|
exam_id: this.props.exam_id === undefined ? "" : parseInt(this.props.exam_id),
|
|
|
|
};
|
|
|
|
};
|
|
|
|
this.getdata(data);
|
|
|
|
this.getdata(data);
|
|
|
|
|
|
|
|
|
|
|
|
@ -236,15 +227,15 @@ class NewMyShixunModel extends Component {
|
|
|
|
getdata = (data) => {
|
|
|
|
getdata = (data) => {
|
|
|
|
const url = `/item_banks.json`;
|
|
|
|
const url = `/item_banks.json`;
|
|
|
|
this.setState({
|
|
|
|
this.setState({
|
|
|
|
booljupyterurls:true,
|
|
|
|
booljupyterurls: true,
|
|
|
|
selectionbools:false,
|
|
|
|
selectionbools: false,
|
|
|
|
})
|
|
|
|
})
|
|
|
|
axios.get((url), {params: data}).then((response) => {
|
|
|
|
axios.get((url), { params: data }).then((response) => {
|
|
|
|
setTimeout(()=>{
|
|
|
|
setTimeout(() => {
|
|
|
|
this.setState({
|
|
|
|
this.setState({
|
|
|
|
booljupyterurls:false,
|
|
|
|
booljupyterurls: false,
|
|
|
|
})
|
|
|
|
})
|
|
|
|
},1000);
|
|
|
|
}, 1000);
|
|
|
|
if (response === null || response === undefined) {
|
|
|
|
if (response === null || response === undefined) {
|
|
|
|
|
|
|
|
|
|
|
|
return
|
|
|
|
return
|
|
|
|
@ -264,7 +255,7 @@ class NewMyShixunModel extends Component {
|
|
|
|
}).catch((error) => {
|
|
|
|
}).catch((error) => {
|
|
|
|
//////console.log(error)
|
|
|
|
//////console.log(error)
|
|
|
|
this.setState({
|
|
|
|
this.setState({
|
|
|
|
booljupyterurls:false,
|
|
|
|
booljupyterurls: false,
|
|
|
|
})
|
|
|
|
})
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@ -273,12 +264,12 @@ class NewMyShixunModel extends Component {
|
|
|
|
getdatasy = (data) => {
|
|
|
|
getdatasy = (data) => {
|
|
|
|
const url = `/item_banks.json`;
|
|
|
|
const url = `/item_banks.json`;
|
|
|
|
this.setState({
|
|
|
|
this.setState({
|
|
|
|
selectionbools:false,
|
|
|
|
selectionbools: false,
|
|
|
|
})
|
|
|
|
})
|
|
|
|
axios.get((url), {params: data}).then((response) => {
|
|
|
|
axios.get((url), { params: data }).then((response) => {
|
|
|
|
setTimeout(()=>{
|
|
|
|
setTimeout(() => {
|
|
|
|
|
|
|
|
|
|
|
|
},1000);
|
|
|
|
}, 1000);
|
|
|
|
if (response === null || response === undefined) {
|
|
|
|
if (response === null || response === undefined) {
|
|
|
|
|
|
|
|
|
|
|
|
return
|
|
|
|
return
|
|
|
|
@ -303,43 +294,43 @@ class NewMyShixunModel extends Component {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
//计算
|
|
|
|
//计算
|
|
|
|
getdataslen=(arr)=>{
|
|
|
|
getdataslen = (arr) => {
|
|
|
|
var contes=0;
|
|
|
|
var contes = 0;
|
|
|
|
for(let data of arr) {
|
|
|
|
for (let data of arr) {
|
|
|
|
if(data.item_type==="PROGRAM"){
|
|
|
|
if (data.item_type === "PROGRAM") {
|
|
|
|
//编程题
|
|
|
|
//编程题
|
|
|
|
if(data.choosed===true){
|
|
|
|
if (data.choosed === true) {
|
|
|
|
|
|
|
|
|
|
|
|
}else{
|
|
|
|
} else {
|
|
|
|
//未选用
|
|
|
|
//未选用
|
|
|
|
if(data.program_attr.status===1){
|
|
|
|
if (data.program_attr.status === 1) {
|
|
|
|
//已发布
|
|
|
|
//已发布
|
|
|
|
contes=contes+1;
|
|
|
|
contes = contes + 1;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}else{
|
|
|
|
} else {
|
|
|
|
//不是编程题
|
|
|
|
//不是编程题
|
|
|
|
if(data.choosed===true){
|
|
|
|
if (data.choosed === true) {
|
|
|
|
|
|
|
|
|
|
|
|
}else{
|
|
|
|
} else {
|
|
|
|
//未选用
|
|
|
|
//未选用
|
|
|
|
contes=contes+1;
|
|
|
|
contes = contes + 1;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if(contes>0){
|
|
|
|
if (contes > 0) {
|
|
|
|
this.setState({
|
|
|
|
this.setState({
|
|
|
|
selectionbools:false,
|
|
|
|
selectionbools: false,
|
|
|
|
selectallquestionsonthispages:false,
|
|
|
|
selectallquestionsonthispages: false,
|
|
|
|
})
|
|
|
|
})
|
|
|
|
}else {
|
|
|
|
} else {
|
|
|
|
this.setState({
|
|
|
|
this.setState({
|
|
|
|
selectionbools:true,
|
|
|
|
selectionbools: true,
|
|
|
|
selectallquestionsonthispages:true,
|
|
|
|
selectallquestionsonthispages: true,
|
|
|
|
})
|
|
|
|
})
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@ -349,27 +340,27 @@ class NewMyShixunModel extends Component {
|
|
|
|
page: pageNumber,
|
|
|
|
page: pageNumber,
|
|
|
|
})
|
|
|
|
})
|
|
|
|
var data = {
|
|
|
|
var data = {
|
|
|
|
discipline_id:this.state.discipline_id,
|
|
|
|
discipline_id: this.state.discipline_id,
|
|
|
|
sub_discipline_id:this.state.sub_discipline_id,
|
|
|
|
sub_discipline_id: this.state.sub_discipline_id,
|
|
|
|
tag_discipline_id:this.state.tag_discipline_id,
|
|
|
|
tag_discipline_id: this.state.tag_discipline_id,
|
|
|
|
public: this.state.defaultActiveKey,
|
|
|
|
public: this.state.defaultActiveKey,
|
|
|
|
difficulty: this.state.difficulty,
|
|
|
|
difficulty: this.state.difficulty,
|
|
|
|
item_type: this.state.item_type,
|
|
|
|
item_type: this.state.item_type,
|
|
|
|
keywords: this.state.keywords,
|
|
|
|
keywords: this.state.keywords,
|
|
|
|
page: pageNumber,
|
|
|
|
page: pageNumber,
|
|
|
|
per_page:10,
|
|
|
|
per_page: 10,
|
|
|
|
oj_status:this.state.oj_status,
|
|
|
|
oj_status: this.state.oj_status,
|
|
|
|
exam_id:this.props.exam_id===undefined?"":parseInt(this.props.exam_id),
|
|
|
|
exam_id: this.props.exam_id === undefined ? "" : parseInt(this.props.exam_id),
|
|
|
|
|
|
|
|
|
|
|
|
};
|
|
|
|
};
|
|
|
|
this.getdata(data);
|
|
|
|
this.getdata(data);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
showDrawer = () => {
|
|
|
|
showDrawer = () => {
|
|
|
|
if(this.state.visible===true){
|
|
|
|
if (this.state.visible === true) {
|
|
|
|
this.setState({
|
|
|
|
this.setState({
|
|
|
|
visible: false,
|
|
|
|
visible: false,
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}else{
|
|
|
|
} else {
|
|
|
|
this.setState({
|
|
|
|
this.setState({
|
|
|
|
visible: true,
|
|
|
|
visible: true,
|
|
|
|
});
|
|
|
|
});
|
|
|
|
@ -425,19 +416,19 @@ class NewMyShixunModel extends Component {
|
|
|
|
modalsType: false
|
|
|
|
modalsType: false
|
|
|
|
})
|
|
|
|
})
|
|
|
|
}
|
|
|
|
}
|
|
|
|
modalCancels=()=>{
|
|
|
|
modalCancels = () => {
|
|
|
|
this.setState({
|
|
|
|
this.setState({
|
|
|
|
modalsTypes: false
|
|
|
|
modalsTypes: false
|
|
|
|
})
|
|
|
|
})
|
|
|
|
}
|
|
|
|
}
|
|
|
|
showQuestionModals =(item_type)=>{
|
|
|
|
showQuestionModals = (item_type) => {
|
|
|
|
this.setState({
|
|
|
|
this.setState({
|
|
|
|
modalsTypes: true,
|
|
|
|
modalsTypes: true,
|
|
|
|
titilesms:item_type,
|
|
|
|
titilesms: item_type,
|
|
|
|
})
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
setDownloads=(item_type)=>{
|
|
|
|
setDownloads = (item_type) => {
|
|
|
|
this.Deletebigquestiontype(item_type);
|
|
|
|
this.Deletebigquestiontype(item_type);
|
|
|
|
this.setState({
|
|
|
|
this.setState({
|
|
|
|
modalsTypes: false
|
|
|
|
modalsTypes: false
|
|
|
|
@ -462,23 +453,23 @@ class NewMyShixunModel extends Component {
|
|
|
|
difficulty: difficulty,
|
|
|
|
difficulty: difficulty,
|
|
|
|
visiblemys: false,
|
|
|
|
visiblemys: false,
|
|
|
|
page: 1,
|
|
|
|
page: 1,
|
|
|
|
per_page:10,
|
|
|
|
per_page: 10,
|
|
|
|
keywords:"",
|
|
|
|
keywords: "",
|
|
|
|
oj_status:null
|
|
|
|
oj_status: null
|
|
|
|
})
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
var data = {
|
|
|
|
var data = {
|
|
|
|
discipline_id:this.state.discipline_id,
|
|
|
|
discipline_id: this.state.discipline_id,
|
|
|
|
sub_discipline_id:this.state.sub_discipline_id,
|
|
|
|
sub_discipline_id: this.state.sub_discipline_id,
|
|
|
|
tag_discipline_id:this.state.tag_discipline_id,
|
|
|
|
tag_discipline_id: this.state.tag_discipline_id,
|
|
|
|
public: this.state.defaultActiveKey,
|
|
|
|
public: this.state.defaultActiveKey,
|
|
|
|
difficulty: difficulty,
|
|
|
|
difficulty: difficulty,
|
|
|
|
item_type: this.state.item_type,
|
|
|
|
item_type: this.state.item_type,
|
|
|
|
keywords:null,
|
|
|
|
keywords: null,
|
|
|
|
page:1,
|
|
|
|
page: 1,
|
|
|
|
per_page:10,
|
|
|
|
per_page: 10,
|
|
|
|
oj_status:null,
|
|
|
|
oj_status: null,
|
|
|
|
exam_id:this.props.exam_id===undefined?"":parseInt(this.props.exam_id),
|
|
|
|
exam_id: this.props.exam_id === undefined ? "" : parseInt(this.props.exam_id),
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
this.getdata(data);
|
|
|
|
this.getdata(data);
|
|
|
|
@ -489,23 +480,23 @@ class NewMyShixunModel extends Component {
|
|
|
|
item_type: item_type,
|
|
|
|
item_type: item_type,
|
|
|
|
visiblemyss: false,
|
|
|
|
visiblemyss: false,
|
|
|
|
page: 1,
|
|
|
|
page: 1,
|
|
|
|
per_page:10,
|
|
|
|
per_page: 10,
|
|
|
|
keywords:"",
|
|
|
|
keywords: "",
|
|
|
|
oj_status:null
|
|
|
|
oj_status: null
|
|
|
|
})
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
var data = {
|
|
|
|
var data = {
|
|
|
|
discipline_id:this.state.discipline_id,
|
|
|
|
discipline_id: this.state.discipline_id,
|
|
|
|
sub_discipline_id:this.state.sub_discipline_id,
|
|
|
|
sub_discipline_id: this.state.sub_discipline_id,
|
|
|
|
tag_discipline_id:this.state.tag_discipline_id,
|
|
|
|
tag_discipline_id: this.state.tag_discipline_id,
|
|
|
|
public: this.state.defaultActiveKey,
|
|
|
|
public: this.state.defaultActiveKey,
|
|
|
|
difficulty: this.state.difficulty,
|
|
|
|
difficulty: this.state.difficulty,
|
|
|
|
item_type: item_type,
|
|
|
|
item_type: item_type,
|
|
|
|
page: 1,
|
|
|
|
page: 1,
|
|
|
|
per_page:10,
|
|
|
|
per_page: 10,
|
|
|
|
keywords:null,
|
|
|
|
keywords: null,
|
|
|
|
oj_status:null,
|
|
|
|
oj_status: null,
|
|
|
|
exam_id:this.props.exam_id===undefined?"":parseInt(this.props.exam_id),
|
|
|
|
exam_id: this.props.exam_id === undefined ? "" : parseInt(this.props.exam_id),
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
this.getdata(data);
|
|
|
|
this.getdata(data);
|
|
|
|
@ -550,17 +541,17 @@ class NewMyShixunModel extends Component {
|
|
|
|
keywords: value,
|
|
|
|
keywords: value,
|
|
|
|
})
|
|
|
|
})
|
|
|
|
var data = {
|
|
|
|
var data = {
|
|
|
|
discipline_id:this.state.discipline_id,
|
|
|
|
discipline_id: this.state.discipline_id,
|
|
|
|
sub_discipline_id:this.state.sub_discipline_id,
|
|
|
|
sub_discipline_id: this.state.sub_discipline_id,
|
|
|
|
tag_discipline_id:this.state.tag_discipline_id,
|
|
|
|
tag_discipline_id: this.state.tag_discipline_id,
|
|
|
|
public: this.state.defaultActiveKey,
|
|
|
|
public: this.state.defaultActiveKey,
|
|
|
|
difficulty: this.state.difficulty,
|
|
|
|
difficulty: this.state.difficulty,
|
|
|
|
item_type: this.state.item_type,
|
|
|
|
item_type: this.state.item_type,
|
|
|
|
keywords: value,
|
|
|
|
keywords: value,
|
|
|
|
page: this.state.page,
|
|
|
|
page: this.state.page,
|
|
|
|
per_page:10,
|
|
|
|
per_page: 10,
|
|
|
|
oj_status:this.state.oj_status,
|
|
|
|
oj_status: this.state.oj_status,
|
|
|
|
exam_id:this.props.exam_id===undefined?"":parseInt(this.props.exam_id),
|
|
|
|
exam_id: this.props.exam_id === undefined ? "" : parseInt(this.props.exam_id),
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
this.getdata(data);
|
|
|
|
this.getdata(data);
|
|
|
|
@ -575,16 +566,16 @@ class NewMyShixunModel extends Component {
|
|
|
|
// this.props.showNotification('删除试题成功')
|
|
|
|
// this.props.showNotification('删除试题成功')
|
|
|
|
// props.history.push(response.data.right_url)
|
|
|
|
// props.history.push(response.data.right_url)
|
|
|
|
var data = {
|
|
|
|
var data = {
|
|
|
|
discipline_id:this.state.discipline_id,
|
|
|
|
discipline_id: this.state.discipline_id,
|
|
|
|
sub_discipline_id:this.state.sub_discipline_id,
|
|
|
|
sub_discipline_id: this.state.sub_discipline_id,
|
|
|
|
tag_discipline_id:this.state.tag_discipline_id,
|
|
|
|
tag_discipline_id: this.state.tag_discipline_id,
|
|
|
|
public: this.state.defaultActiveKey,
|
|
|
|
public: this.state.defaultActiveKey,
|
|
|
|
difficulty: this.state.difficulty,
|
|
|
|
difficulty: this.state.difficulty,
|
|
|
|
item_type: this.state.item_type,
|
|
|
|
item_type: this.state.item_type,
|
|
|
|
keywords: this.state.keywords,
|
|
|
|
keywords: this.state.keywords,
|
|
|
|
page: this.state.page,
|
|
|
|
page: this.state.page,
|
|
|
|
per_page:10,
|
|
|
|
per_page: 10,
|
|
|
|
exam_id:this.props.exam_id===undefined?"":parseInt(this.props.exam_id),
|
|
|
|
exam_id: this.props.exam_id === undefined ? "" : parseInt(this.props.exam_id),
|
|
|
|
};
|
|
|
|
};
|
|
|
|
this.getdata(data);
|
|
|
|
this.getdata(data);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@ -601,16 +592,16 @@ class NewMyShixunModel extends Component {
|
|
|
|
if (result.data.status == 0) {
|
|
|
|
if (result.data.status == 0) {
|
|
|
|
// this.props.showNotification(`公开题目成功`);
|
|
|
|
// this.props.showNotification(`公开题目成功`);
|
|
|
|
var data = {
|
|
|
|
var data = {
|
|
|
|
discipline_id:this.state.discipline_id,
|
|
|
|
discipline_id: this.state.discipline_id,
|
|
|
|
sub_discipline_id:this.state.sub_discipline_id,
|
|
|
|
sub_discipline_id: this.state.sub_discipline_id,
|
|
|
|
tag_discipline_id:this.state.tag_discipline_id,
|
|
|
|
tag_discipline_id: this.state.tag_discipline_id,
|
|
|
|
public: this.state.defaultActiveKey,
|
|
|
|
public: this.state.defaultActiveKey,
|
|
|
|
difficulty: this.state.difficulty,
|
|
|
|
difficulty: this.state.difficulty,
|
|
|
|
item_type: this.state.item_type,
|
|
|
|
item_type: this.state.item_type,
|
|
|
|
keywords: this.state.keywords,
|
|
|
|
keywords: this.state.keywords,
|
|
|
|
page: this.state.page,
|
|
|
|
page: this.state.page,
|
|
|
|
per_page:10,
|
|
|
|
per_page: 10,
|
|
|
|
exam_id:this.props.exam_id===undefined?"":parseInt(this.props.exam_id),
|
|
|
|
exam_id: this.props.exam_id === undefined ? "" : parseInt(this.props.exam_id),
|
|
|
|
|
|
|
|
|
|
|
|
};
|
|
|
|
};
|
|
|
|
this.getdata(data);
|
|
|
|
this.getdata(data);
|
|
|
|
@ -654,13 +645,13 @@ class NewMyShixunModel extends Component {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//选用
|
|
|
|
//选用
|
|
|
|
getitem_baskets=(data)=>{
|
|
|
|
getitem_baskets = (data) => {
|
|
|
|
//选用题型可以上传单个 或者多个题型
|
|
|
|
//选用题型可以上传单个 或者多个题型
|
|
|
|
let url="";
|
|
|
|
let url = "";
|
|
|
|
if(this.props.exam_id===undefined){
|
|
|
|
if (this.props.exam_id === undefined) {
|
|
|
|
url="/item_baskets.json";
|
|
|
|
url = "/item_baskets.json";
|
|
|
|
}else{
|
|
|
|
} else {
|
|
|
|
url="/examination_items.json";
|
|
|
|
url = "/examination_items.json";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -669,16 +660,16 @@ class NewMyShixunModel extends Component {
|
|
|
|
if (result.data.status == 0) {
|
|
|
|
if (result.data.status == 0) {
|
|
|
|
// this.props.showNotification(`选用成功`);
|
|
|
|
// this.props.showNotification(`选用成功`);
|
|
|
|
var data = {
|
|
|
|
var data = {
|
|
|
|
discipline_id:this.state.discipline_id,
|
|
|
|
discipline_id: this.state.discipline_id,
|
|
|
|
sub_discipline_id:this.state.sub_discipline_id,
|
|
|
|
sub_discipline_id: this.state.sub_discipline_id,
|
|
|
|
tag_discipline_id:this.state.tag_discipline_id,
|
|
|
|
tag_discipline_id: this.state.tag_discipline_id,
|
|
|
|
public: this.state.defaultActiveKey,
|
|
|
|
public: this.state.defaultActiveKey,
|
|
|
|
difficulty: this.state.difficulty,
|
|
|
|
difficulty: this.state.difficulty,
|
|
|
|
item_type: this.state.item_type,
|
|
|
|
item_type: this.state.item_type,
|
|
|
|
keywords: this.state.keywords,
|
|
|
|
keywords: this.state.keywords,
|
|
|
|
page: this.state.page,
|
|
|
|
page: this.state.page,
|
|
|
|
per_page:10,
|
|
|
|
per_page: 10,
|
|
|
|
exam_id:this.props.exam_id===undefined?"":parseInt(this.props.exam_id),
|
|
|
|
exam_id: this.props.exam_id === undefined ? "" : parseInt(this.props.exam_id),
|
|
|
|
};
|
|
|
|
};
|
|
|
|
this.getdatasy(data);
|
|
|
|
this.getdatasy(data);
|
|
|
|
this.getbasket_listdata();
|
|
|
|
this.getbasket_listdata();
|
|
|
|
@ -691,25 +682,25 @@ class NewMyShixunModel extends Component {
|
|
|
|
})
|
|
|
|
})
|
|
|
|
}
|
|
|
|
}
|
|
|
|
// 撤销
|
|
|
|
// 撤销
|
|
|
|
getitem_basketss=(id)=>{
|
|
|
|
getitem_basketss = (id) => {
|
|
|
|
let url="";
|
|
|
|
let url = "";
|
|
|
|
if(this.props.exam_id===undefined){
|
|
|
|
if (this.props.exam_id === undefined) {
|
|
|
|
url=`/item_baskets/${id}.json`;
|
|
|
|
url = `/item_baskets/${id}.json`;
|
|
|
|
axios.delete(url)
|
|
|
|
axios.delete(url)
|
|
|
|
.then((result) => {
|
|
|
|
.then((result) => {
|
|
|
|
if (result.data.status == 0) {
|
|
|
|
if (result.data.status == 0) {
|
|
|
|
// this.props.showNotification(`撤销成功`);
|
|
|
|
// this.props.showNotification(`撤销成功`);
|
|
|
|
var data = {
|
|
|
|
var data = {
|
|
|
|
discipline_id:this.state.discipline_id,
|
|
|
|
discipline_id: this.state.discipline_id,
|
|
|
|
sub_discipline_id:this.state.sub_discipline_id,
|
|
|
|
sub_discipline_id: this.state.sub_discipline_id,
|
|
|
|
tag_discipline_id:this.state.tag_discipline_id,
|
|
|
|
tag_discipline_id: this.state.tag_discipline_id,
|
|
|
|
public: this.state.defaultActiveKey,
|
|
|
|
public: this.state.defaultActiveKey,
|
|
|
|
difficulty: this.state.difficulty,
|
|
|
|
difficulty: this.state.difficulty,
|
|
|
|
item_type: this.state.item_type,
|
|
|
|
item_type: this.state.item_type,
|
|
|
|
keywords: this.state.keywords,
|
|
|
|
keywords: this.state.keywords,
|
|
|
|
page: this.state.page,
|
|
|
|
page: this.state.page,
|
|
|
|
per_page:10,
|
|
|
|
per_page: 10,
|
|
|
|
exam_id:this.props.exam_id===undefined?"":parseInt(this.props.exam_id),
|
|
|
|
exam_id: this.props.exam_id === undefined ? "" : parseInt(this.props.exam_id),
|
|
|
|
};
|
|
|
|
};
|
|
|
|
this.getdatasy(data);
|
|
|
|
this.getdatasy(data);
|
|
|
|
this.getbasket_listdata();
|
|
|
|
this.getbasket_listdata();
|
|
|
|
@ -717,25 +708,27 @@ class NewMyShixunModel extends Component {
|
|
|
|
}).catch((error) => {
|
|
|
|
}).catch((error) => {
|
|
|
|
////console.log(error);
|
|
|
|
////console.log(error);
|
|
|
|
})
|
|
|
|
})
|
|
|
|
}else{
|
|
|
|
} else {
|
|
|
|
url=`/examination_banks/${this.props.exam_id}/revoke_item.json`;
|
|
|
|
url = `/examination_banks/${this.props.exam_id}/revoke_item.json`;
|
|
|
|
axios.delete(url,{ data: {
|
|
|
|
axios.delete(url, {
|
|
|
|
item_id:id===undefined?"":parseInt(id),
|
|
|
|
data: {
|
|
|
|
}})
|
|
|
|
item_id: id === undefined ? "" : parseInt(id),
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
})
|
|
|
|
.then((result) => {
|
|
|
|
.then((result) => {
|
|
|
|
if (result.data.status == 0) {
|
|
|
|
if (result.data.status == 0) {
|
|
|
|
// this.props.showNotification(`撤销成功`);
|
|
|
|
// this.props.showNotification(`撤销成功`);
|
|
|
|
var data = {
|
|
|
|
var data = {
|
|
|
|
discipline_id:this.state.discipline_id,
|
|
|
|
discipline_id: this.state.discipline_id,
|
|
|
|
sub_discipline_id:this.state.sub_discipline_id,
|
|
|
|
sub_discipline_id: this.state.sub_discipline_id,
|
|
|
|
tag_discipline_id:this.state.tag_discipline_id,
|
|
|
|
tag_discipline_id: this.state.tag_discipline_id,
|
|
|
|
public: this.state.defaultActiveKey,
|
|
|
|
public: this.state.defaultActiveKey,
|
|
|
|
difficulty: this.state.difficulty,
|
|
|
|
difficulty: this.state.difficulty,
|
|
|
|
item_type: this.state.item_type,
|
|
|
|
item_type: this.state.item_type,
|
|
|
|
keywords: this.state.keywords,
|
|
|
|
keywords: this.state.keywords,
|
|
|
|
page: this.state.page,
|
|
|
|
page: this.state.page,
|
|
|
|
per_page:10,
|
|
|
|
per_page: 10,
|
|
|
|
exam_id:this.props.exam_id===undefined?"":parseInt(this.props.exam_id),
|
|
|
|
exam_id: this.props.exam_id === undefined ? "" : parseInt(this.props.exam_id),
|
|
|
|
};
|
|
|
|
};
|
|
|
|
this.getdatasy(data);
|
|
|
|
this.getdatasy(data);
|
|
|
|
this.getbasket_listdata();
|
|
|
|
this.getbasket_listdata();
|
|
|
|
@ -748,67 +741,69 @@ class NewMyShixunModel extends Component {
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
//全选试题库
|
|
|
|
//全选试题库
|
|
|
|
selectallquestionsonthispage=()=>{
|
|
|
|
selectallquestionsonthispage = () => {
|
|
|
|
var item_idsdata=[];
|
|
|
|
var item_idsdata = [];
|
|
|
|
|
|
|
|
|
|
|
|
var arr= this.state.Contentdata.items;
|
|
|
|
var arr = this.state.Contentdata.items;
|
|
|
|
for(let data of arr) {
|
|
|
|
for (let data of arr) {
|
|
|
|
if(data.item_type==="PROGRAM"){
|
|
|
|
if (data.item_type === "PROGRAM") {
|
|
|
|
//编程题
|
|
|
|
//编程题
|
|
|
|
if(data.choosed===true){
|
|
|
|
if (data.choosed === true) {
|
|
|
|
|
|
|
|
|
|
|
|
}else{
|
|
|
|
} else {
|
|
|
|
//未选用
|
|
|
|
//未选用
|
|
|
|
if(data.program_attr.status===1){
|
|
|
|
if (data.program_attr.status === 1) {
|
|
|
|
//已发布
|
|
|
|
//已发布
|
|
|
|
item_idsdata.push(data.id);
|
|
|
|
item_idsdata.push(data.id);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}else{
|
|
|
|
} else {
|
|
|
|
//不是编程题
|
|
|
|
//不是编程题
|
|
|
|
if(data.choosed===true){
|
|
|
|
if (data.choosed === true) {
|
|
|
|
|
|
|
|
|
|
|
|
}else{
|
|
|
|
} else {
|
|
|
|
//未选用
|
|
|
|
//未选用
|
|
|
|
item_idsdata.push(data.id);
|
|
|
|
item_idsdata.push(data.id);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
const data={
|
|
|
|
const data = {
|
|
|
|
item_ids:item_idsdata,
|
|
|
|
item_ids: item_idsdata,
|
|
|
|
exam_id:this.props.exam_id===undefined?"":parseInt(this.props.exam_id),
|
|
|
|
exam_id: this.props.exam_id === undefined ? "" : parseInt(this.props.exam_id),
|
|
|
|
}
|
|
|
|
}
|
|
|
|
this.getitem_baskets(data);
|
|
|
|
this.getitem_baskets(data);
|
|
|
|
this.setState({
|
|
|
|
this.setState({
|
|
|
|
selectallquestionsonthispages:true,
|
|
|
|
selectallquestionsonthispages: true,
|
|
|
|
})
|
|
|
|
})
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
//全选的状态
|
|
|
|
//全选的状态
|
|
|
|
|
|
|
|
|
|
|
|
//删除大题型
|
|
|
|
//删除大题型
|
|
|
|
Deletebigquestiontype =(item_type)=>{
|
|
|
|
Deletebigquestiontype = (item_type) => {
|
|
|
|
const url=`/item_baskets/delete_item_type.json`;
|
|
|
|
const url = `/item_baskets/delete_item_type.json`;
|
|
|
|
axios.delete((url), { data: {
|
|
|
|
axios.delete((url), {
|
|
|
|
item_type:item_type
|
|
|
|
data: {
|
|
|
|
}})
|
|
|
|
item_type: item_type
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
})
|
|
|
|
.then((response) => {
|
|
|
|
.then((response) => {
|
|
|
|
if (response.data.status == 0) {
|
|
|
|
if (response.data.status == 0) {
|
|
|
|
// this.props.showNotification('删除成功');
|
|
|
|
// this.props.showNotification('删除成功');
|
|
|
|
var data = {
|
|
|
|
var data = {
|
|
|
|
discipline_id:this.state.discipline_id,
|
|
|
|
discipline_id: this.state.discipline_id,
|
|
|
|
sub_discipline_id:this.state.sub_discipline_id,
|
|
|
|
sub_discipline_id: this.state.sub_discipline_id,
|
|
|
|
tag_discipline_id:this.state.tag_discipline_id,
|
|
|
|
tag_discipline_id: this.state.tag_discipline_id,
|
|
|
|
public: this.state.defaultActiveKey,
|
|
|
|
public: this.state.defaultActiveKey,
|
|
|
|
difficulty: this.state.difficulty,
|
|
|
|
difficulty: this.state.difficulty,
|
|
|
|
item_type: this.state.item_type,
|
|
|
|
item_type: this.state.item_type,
|
|
|
|
keywords: this.state.keywords,
|
|
|
|
keywords: this.state.keywords,
|
|
|
|
page: this.state.page,
|
|
|
|
page: this.state.page,
|
|
|
|
per_page:10,
|
|
|
|
per_page: 10,
|
|
|
|
exam_id:this.props.exam_id===undefined?"":parseInt(this.props.exam_id),
|
|
|
|
exam_id: this.props.exam_id === undefined ? "" : parseInt(this.props.exam_id),
|
|
|
|
};
|
|
|
|
};
|
|
|
|
this.getdata(data);
|
|
|
|
this.getdata(data);
|
|
|
|
this.getbasket_listdata();
|
|
|
|
this.getbasket_listdata();
|
|
|
|
@ -822,31 +817,31 @@ class NewMyShixunModel extends Component {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//跳转
|
|
|
|
//跳转
|
|
|
|
gotopaperreview=()=>{
|
|
|
|
gotopaperreview = () => {
|
|
|
|
|
|
|
|
|
|
|
|
this.props.history.replace("/paperreview");
|
|
|
|
this.props.history.replace("/paperreview");
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
setoj_status=(oj_status)=>{
|
|
|
|
setoj_status = (oj_status) => {
|
|
|
|
//编程题发布未发布
|
|
|
|
//编程题发布未发布
|
|
|
|
this.setState({
|
|
|
|
this.setState({
|
|
|
|
selectallquestionsonthispages:false,
|
|
|
|
selectallquestionsonthispages: false,
|
|
|
|
difficulty:null,
|
|
|
|
difficulty: null,
|
|
|
|
oj_status:oj_status
|
|
|
|
oj_status: oj_status
|
|
|
|
})
|
|
|
|
})
|
|
|
|
var data = {
|
|
|
|
var data = {
|
|
|
|
discipline_id:this.state.discipline_id,
|
|
|
|
discipline_id: this.state.discipline_id,
|
|
|
|
sub_discipline_id:this.state.sub_discipline_id,
|
|
|
|
sub_discipline_id: this.state.sub_discipline_id,
|
|
|
|
tag_discipline_id:this.state.tag_discipline_id,
|
|
|
|
tag_discipline_id: this.state.tag_discipline_id,
|
|
|
|
public: this.state.defaultActiveKey,
|
|
|
|
public: this.state.defaultActiveKey,
|
|
|
|
difficulty: this.state.difficulty,
|
|
|
|
difficulty: this.state.difficulty,
|
|
|
|
item_type: this.state.item_type,
|
|
|
|
item_type: this.state.item_type,
|
|
|
|
keywords: this.state.keywords,
|
|
|
|
keywords: this.state.keywords,
|
|
|
|
page: this.state.page,
|
|
|
|
page: this.state.page,
|
|
|
|
per_page:10,
|
|
|
|
per_page: 10,
|
|
|
|
oj_status:oj_status,
|
|
|
|
oj_status: oj_status,
|
|
|
|
exam_id:this.props.exam_id===undefined?"":parseInt(this.props.exam_id),
|
|
|
|
exam_id: this.props.exam_id === undefined ? "" : parseInt(this.props.exam_id),
|
|
|
|
};
|
|
|
|
};
|
|
|
|
this.getdata(data);
|
|
|
|
this.getdata(data);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@ -854,9 +849,9 @@ class NewMyShixunModel extends Component {
|
|
|
|
|
|
|
|
|
|
|
|
render() {
|
|
|
|
render() {
|
|
|
|
let {
|
|
|
|
let {
|
|
|
|
page, per_page, items_count, Headertop, visible, placement, modalsType, modalsTypes,basket_list,
|
|
|
|
page, per_page, items_count, Headertop, visible, placement, modalsType, modalsTypes, basket_list,
|
|
|
|
completion_questions_count, judgement_questions_count, multiple_questions_count, practical_questions_count,
|
|
|
|
completion_questions_count, judgement_questions_count, multiple_questions_count, practical_questions_count,
|
|
|
|
program_questions_count, single_questions_count, subjective_questions_count,selectionbools
|
|
|
|
program_questions_count, single_questions_count, subjective_questions_count, selectionbools
|
|
|
|
} = this.state;
|
|
|
|
} = this.state;
|
|
|
|
|
|
|
|
|
|
|
|
const Datacount = completion_questions_count + judgement_questions_count
|
|
|
|
const Datacount = completion_questions_count + judgement_questions_count
|
|
|
|
@ -870,7 +865,7 @@ class NewMyShixunModel extends Component {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
{
|
|
|
|
{
|
|
|
|
visible===true?
|
|
|
|
visible === true ?
|
|
|
|
<style>
|
|
|
|
<style>
|
|
|
|
{
|
|
|
|
{
|
|
|
|
`
|
|
|
|
`
|
|
|
|
@ -893,26 +888,26 @@ class NewMyShixunModel extends Component {
|
|
|
|
`
|
|
|
|
`
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</style>
|
|
|
|
</style>
|
|
|
|
:""
|
|
|
|
: ""
|
|
|
|
}
|
|
|
|
}
|
|
|
|
{
|
|
|
|
{
|
|
|
|
visible===true?
|
|
|
|
visible === true ?
|
|
|
|
<div
|
|
|
|
<div
|
|
|
|
style={{
|
|
|
|
style={{
|
|
|
|
marginTop: "60px"
|
|
|
|
marginTop: "60px"
|
|
|
|
}}></div>
|
|
|
|
}}></div>
|
|
|
|
:""}
|
|
|
|
: ""}
|
|
|
|
{
|
|
|
|
{
|
|
|
|
modalsTypes===true?
|
|
|
|
modalsTypes === true ?
|
|
|
|
<QuestionModals {...this.props}{...this.state} modalsTypes={modalsTypes} modalCancels={() => this.modalCancels()}
|
|
|
|
<QuestionModals {...this.props}{...this.state} modalsTypes={modalsTypes} modalCancels={() => this.modalCancels()}
|
|
|
|
setDownloads={(e) => this.setDownloads(e)}></QuestionModals>
|
|
|
|
setDownloads={(e) => this.setDownloads(e)}></QuestionModals>
|
|
|
|
:""
|
|
|
|
: ""
|
|
|
|
}
|
|
|
|
}
|
|
|
|
{
|
|
|
|
{
|
|
|
|
modalsType===true?
|
|
|
|
modalsType === true ?
|
|
|
|
<QuestionModal {...this.props}{...this.state} modalsType={modalsType} modalCancel={() => this.modalCancel()}
|
|
|
|
<QuestionModal {...this.props}{...this.state} modalsType={modalsType} modalCancel={() => this.modalCancel()}
|
|
|
|
setDownload={() => this.setDownload()}></QuestionModal>
|
|
|
|
setDownload={() => this.setDownload()}></QuestionModal>
|
|
|
|
:""
|
|
|
|
: ""
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
{/*顶部*/}
|
|
|
|
{/*顶部*/}
|
|
|
|
@ -923,17 +918,17 @@ class NewMyShixunModel extends Component {
|
|
|
|
{...this.state}
|
|
|
|
{...this.state}
|
|
|
|
setdifficulty={(e) => this.setdifficulty(e)}
|
|
|
|
setdifficulty={(e) => this.setdifficulty(e)}
|
|
|
|
setitem_types={(e) => this.setitem_types(e)}
|
|
|
|
setitem_types={(e) => this.setitem_types(e)}
|
|
|
|
setdiscipline_id={(e)=>this.setdiscipline_id(e)}
|
|
|
|
setdiscipline_id={(e) => this.setdiscipline_id(e)}
|
|
|
|
setsub_discipline_id={(e)=>this.setsub_discipline_id(e)}
|
|
|
|
setsub_discipline_id={(e) => this.setsub_discipline_id(e)}
|
|
|
|
settag_discipline_id={(e)=>this.settag_discipline_id(e)}
|
|
|
|
settag_discipline_id={(e) => this.settag_discipline_id(e)}
|
|
|
|
/>
|
|
|
|
/>
|
|
|
|
{/*头部*/}
|
|
|
|
{/*头部*/}
|
|
|
|
<Contentpart {...this.state} {...this.props}
|
|
|
|
<Contentpart {...this.state} {...this.props}
|
|
|
|
exam_id={this.props.exam_id}
|
|
|
|
exam_id={this.props.exam_id}
|
|
|
|
Isitapopup={"true"}
|
|
|
|
Isitapopup={"true"}
|
|
|
|
getitem_basketss={(id)=>this.getitem_basketss(id)}
|
|
|
|
getitem_basketss={(id) => this.getitem_basketss(id)}
|
|
|
|
selectallquestionsonthispage={()=>this.selectallquestionsonthispage()}
|
|
|
|
selectallquestionsonthispage={() => this.selectallquestionsonthispage()}
|
|
|
|
getitem_baskets={(e)=>this.getitem_baskets(e)}
|
|
|
|
getitem_baskets={(e) => this.getitem_baskets(e)}
|
|
|
|
setdatafuns={(e) => this.setdatafuns(e)}
|
|
|
|
setdatafuns={(e) => this.setdatafuns(e)}
|
|
|
|
setdatafunsval={(e) => this.setdatafunsval(e)}
|
|
|
|
setdatafunsval={(e) => this.setdatafunsval(e)}
|
|
|
|
handleVisibleChanges={(e) => this.handleVisibleChanges(e)}
|
|
|
|
handleVisibleChanges={(e) => this.handleVisibleChanges(e)}
|
|
|
|
@ -941,16 +936,16 @@ class NewMyShixunModel extends Component {
|
|
|
|
showmodels={(e) => this.showmodels(e)}
|
|
|
|
showmodels={(e) => this.showmodels(e)}
|
|
|
|
showmodelysl={(e) => this.showmodelysl(e)}
|
|
|
|
showmodelysl={(e) => this.showmodelysl(e)}
|
|
|
|
callback={(e) => this.callback(e)}
|
|
|
|
callback={(e) => this.callback(e)}
|
|
|
|
setoj_status={(e)=>this.setoj_status(e)}></Contentpart>
|
|
|
|
setoj_status={(e) => this.setoj_status(e)}></Contentpart>
|
|
|
|
|
|
|
|
|
|
|
|
{
|
|
|
|
{
|
|
|
|
items_count&&items_count>10?
|
|
|
|
items_count && items_count > 10 ?
|
|
|
|
<div className="mb30 clearfix educontent mt40 intermediatecenter">
|
|
|
|
<div className="mb30 clearfix educontent mt40 intermediatecenter">
|
|
|
|
<Pagination showQuickJumper current={page} onChange={this.paginationonChange}
|
|
|
|
<Pagination showQuickJumper current={page} onChange={this.paginationonChange}
|
|
|
|
pageSize={per_page}
|
|
|
|
pageSize={per_page}
|
|
|
|
total={items_count}></Pagination>
|
|
|
|
total={items_count}></Pagination>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
:<div className="h30 clearfix educontent mt40 intermediatecenter">
|
|
|
|
: <div className="h30 clearfix educontent mt40 intermediatecenter">
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|