|
|
|
@ -12,6 +12,7 @@ import {
|
|
|
|
|
} from "antd";
|
|
|
|
|
import Headplugselection from "./component/Headplugselection";
|
|
|
|
|
import QuestionModal from "./component/QuestionModal";
|
|
|
|
|
import QuestionModals from "./component/QuestionModals";
|
|
|
|
|
import Contentpart from "./component/Contentpart";
|
|
|
|
|
import {TPMIndexHOC} from "../tpm/TPMIndexHOC";
|
|
|
|
|
import NoneData from './component/NoneData';
|
|
|
|
@ -31,8 +32,10 @@ class Question extends Component {
|
|
|
|
|
visible: false,
|
|
|
|
|
placement: 'right',
|
|
|
|
|
modalsType: false,
|
|
|
|
|
modalsTypes:false,
|
|
|
|
|
titilesm: "设为公开后,所有成员均可使用试题",
|
|
|
|
|
titiless: "是否设置为公开?",
|
|
|
|
|
titilesms:"单选题",
|
|
|
|
|
titbool: false,
|
|
|
|
|
Contentdata: [],
|
|
|
|
|
difficulty: null,
|
|
|
|
@ -173,6 +176,21 @@ class Question extends Component {
|
|
|
|
|
modalsType: false
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
modalCancels=()=>{
|
|
|
|
|
this.setState({
|
|
|
|
|
modalsTypes: false
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
showQuestionModals =(item_type)=>{
|
|
|
|
|
this.setState({
|
|
|
|
|
modalsTypes: true,
|
|
|
|
|
titilesms:item_type,
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
setDownloads=(item_type)=>{
|
|
|
|
|
this.Deletebigquestiontype(item_type);
|
|
|
|
|
}
|
|
|
|
|
setDownload = () => {
|
|
|
|
|
//确认
|
|
|
|
|
if (this.state.titbool === true) {
|
|
|
|
@ -363,6 +381,7 @@ class Question extends Component {
|
|
|
|
|
keywords: this.state.keywords,
|
|
|
|
|
};
|
|
|
|
|
this.getdata(data);
|
|
|
|
|
this.getbasket_listdata();
|
|
|
|
|
}
|
|
|
|
|
}).catch((error) => {
|
|
|
|
|
console.log(error);
|
|
|
|
@ -384,6 +403,7 @@ class Question extends Component {
|
|
|
|
|
keywords: this.state.keywords,
|
|
|
|
|
};
|
|
|
|
|
this.getdata(data);
|
|
|
|
|
this.getbasket_listdata();
|
|
|
|
|
}
|
|
|
|
|
}).catch((error) => {
|
|
|
|
|
console.log(error);
|
|
|
|
@ -403,12 +423,37 @@ class Question extends Component {
|
|
|
|
|
this.getitem_baskets(data);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//删除大题型
|
|
|
|
|
Deletebigquestiontype =(item_type)=>{
|
|
|
|
|
const url=`/item_baskets/delete_item_type.json`;
|
|
|
|
|
axios.delete((url), { data: {
|
|
|
|
|
item_type:item_type
|
|
|
|
|
}})
|
|
|
|
|
.then((response) => {
|
|
|
|
|
if (response.data.status == 0) {
|
|
|
|
|
this.props.showNotification('删除成功');
|
|
|
|
|
var data = {
|
|
|
|
|
public: this.state.defaultActiveKey,
|
|
|
|
|
difficulty: this.state.difficulty,
|
|
|
|
|
item_type: this.state.item_type,
|
|
|
|
|
keywords: this.state.keywords,
|
|
|
|
|
};
|
|
|
|
|
this.getdata(data);
|
|
|
|
|
this.getbasket_listdata();
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
.catch(function (error) {
|
|
|
|
|
console.log(error);
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
render() {
|
|
|
|
|
let {
|
|
|
|
|
page, limit, count, Headertop, visible, placement, modalsType, basket_list,
|
|
|
|
|
page, limit, count, Headertop, visible, placement, modalsType, modalsTypes,basket_list,
|
|
|
|
|
completion_questions_count, judgement_questions_count, multiple_questions_count, practical_questions_count,
|
|
|
|
|
program_questions_count, single_questions_count, subjective_questions_count
|
|
|
|
|
} = this.state;
|
|
|
|
@ -428,7 +473,14 @@ class Question extends Component {
|
|
|
|
|
.newHeaders{
|
|
|
|
|
position: fixed;
|
|
|
|
|
top: 0px;
|
|
|
|
|
z-index: 9999999 ;
|
|
|
|
|
z-index: 999 !important;
|
|
|
|
|
}
|
|
|
|
|
.ant-drawer {
|
|
|
|
|
z-index: 800 !important;
|
|
|
|
|
}
|
|
|
|
|
.ant-notification{
|
|
|
|
|
position: fixed;
|
|
|
|
|
z-index: 1500 !important;
|
|
|
|
|
}
|
|
|
|
|
.newFooter{
|
|
|
|
|
position: relative;
|
|
|
|
@ -447,6 +499,8 @@ class Question extends Component {
|
|
|
|
|
}}></div>
|
|
|
|
|
:""}
|
|
|
|
|
|
|
|
|
|
<QuestionModals {...this.props}{...this.state} modalsTypes={modalsTypes} modalCancels={() => this.modalCancels()}
|
|
|
|
|
setDownloads={(e) => this.setDownloads(e)}></QuestionModals>
|
|
|
|
|
<QuestionModal {...this.props}{...this.state} modalsType={modalsType} modalCancel={() => this.modalCancel()}
|
|
|
|
|
setDownload={() => this.setDownload()}></QuestionModal>
|
|
|
|
|
<SiderBar
|
|
|
|
@ -485,7 +539,7 @@ class Question extends Component {
|
|
|
|
|
{
|
|
|
|
|
`
|
|
|
|
|
.ant-drawer-content-wrapper{
|
|
|
|
|
width: 235px;
|
|
|
|
|
width: 200px !important;
|
|
|
|
|
overflow:hidden;
|
|
|
|
|
margin-top: 62px;
|
|
|
|
|
}
|
|
|
|
@ -515,7 +569,7 @@ class Question extends Component {
|
|
|
|
|
{
|
|
|
|
|
single_questions_count === 0 ?
|
|
|
|
|
""
|
|
|
|
|
: <div className="sortinxdirection">
|
|
|
|
|
: <div className="sortinxdirection" onClick={()=>this.showQuestionModals("SINGLE")} >
|
|
|
|
|
<p
|
|
|
|
|
className="w50s intermediatecenterysls sortinxdirection font-14">单选题{'('}{single_questions_count}{')'}</p>
|
|
|
|
|
<p className="w50s intermediatecenterysls xaxisreverseorder"><i
|
|
|
|
@ -526,7 +580,7 @@ class Question extends Component {
|
|
|
|
|
multiple_questions_count === 0 ?
|
|
|
|
|
""
|
|
|
|
|
:
|
|
|
|
|
<div className="sortinxdirection">
|
|
|
|
|
<div className="sortinxdirection" onClick={()=>this.showQuestionModals("MULTIPLE")}>
|
|
|
|
|
<p
|
|
|
|
|
className="w50s intermediatecenterysls sortinxdirection font-14">多选题{'('}{multiple_questions_count}{')'}</p>
|
|
|
|
|
<p className="w50s intermediatecenterysls xaxisreverseorder"><i
|
|
|
|
@ -537,7 +591,7 @@ class Question extends Component {
|
|
|
|
|
judgement_questions_count === 0 ?
|
|
|
|
|
""
|
|
|
|
|
:
|
|
|
|
|
<div className="sortinxdirection">
|
|
|
|
|
<div className="sortinxdirection" onClick={()=>this.showQuestionModals("JUDGMENT")}>
|
|
|
|
|
<p
|
|
|
|
|
className="w50s intermediatecenterysls sortinxdirection font-14">判断题{'('}{judgement_questions_count}{')'}</p>
|
|
|
|
|
<p className="w50s intermediatecenterysls xaxisreverseorder"><i
|
|
|
|
@ -548,7 +602,7 @@ class Question extends Component {
|
|
|
|
|
completion_questions_count === 0 ?
|
|
|
|
|
""
|
|
|
|
|
:
|
|
|
|
|
<div className="sortinxdirection">
|
|
|
|
|
<div className="sortinxdirection" onClick={()=>this.showQuestionModals("COMPLETION")}>
|
|
|
|
|
<p
|
|
|
|
|
className="w50s intermediatecenterysls sortinxdirection font-14">填空题{'('}{completion_questions_count}{')'}</p>
|
|
|
|
|
<p className="w50s intermediatecenterysls xaxisreverseorder"><i
|
|
|
|
@ -559,7 +613,7 @@ class Question extends Component {
|
|
|
|
|
subjective_questions_count === 0 ?
|
|
|
|
|
""
|
|
|
|
|
:
|
|
|
|
|
<div className="sortinxdirection">
|
|
|
|
|
<div className="sortinxdirection" onClick={()=>this.showQuestionModals("SUBJECTIVE")}>
|
|
|
|
|
<p
|
|
|
|
|
className="w50s intermediatecenterysls sortinxdirection font-14">简答题{'('}{subjective_questions_count}{')'}</p>
|
|
|
|
|
<p className="w50s intermediatecenterysls xaxisreverseorder"><i
|
|
|
|
@ -581,7 +635,7 @@ class Question extends Component {
|
|
|
|
|
program_questions_count === 0 ?
|
|
|
|
|
""
|
|
|
|
|
:
|
|
|
|
|
<div className="sortinxdirection">
|
|
|
|
|
<div className="sortinxdirection" onClick={()=>this.showQuestionModals("PROGRAM")}>
|
|
|
|
|
<p
|
|
|
|
|
className="w50s intermediatecenterysls sortinxdirection font-14">编程题{'('}{program_questions_count}{')'}</p>
|
|
|
|
|
<p className="w50s intermediatecenterysls xaxisreverseorder"><i
|
|
|
|
|