|
|
@ -9,6 +9,7 @@ import SiderBar from "../tpm/SiderBar";
|
|
|
|
import Headplugselections from "../question/component/Headplugselections";
|
|
|
|
import Headplugselections from "../question/component/Headplugselections";
|
|
|
|
import QuestionModal from "./component/QuestionModal";
|
|
|
|
import QuestionModal from "./component/QuestionModal";
|
|
|
|
import QuestionModals from "./component/QuestionModals";
|
|
|
|
import QuestionModals from "./component/QuestionModals";
|
|
|
|
|
|
|
|
import QuestionModalys from "./component/QuestionModalys";
|
|
|
|
class Testpaperlibrary extends Component {
|
|
|
|
class Testpaperlibrary extends Component {
|
|
|
|
constructor(props) {
|
|
|
|
constructor(props) {
|
|
|
|
super(props);
|
|
|
|
super(props);
|
|
|
@ -31,6 +32,7 @@ class Testpaperlibrary extends Component {
|
|
|
|
modalsTypes:false,
|
|
|
|
modalsTypes:false,
|
|
|
|
modalsType:false,
|
|
|
|
modalsType:false,
|
|
|
|
timuid:0,
|
|
|
|
timuid:0,
|
|
|
|
|
|
|
|
modalsTypeInaudit:false,
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
getContainer = () => {
|
|
|
|
getContainer = () => {
|
|
|
@ -131,11 +133,16 @@ class Testpaperlibrary extends Component {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
//获取数据
|
|
|
|
//获取数据
|
|
|
|
getdata = (data) => {
|
|
|
|
getdata=(data,bool)=>{
|
|
|
|
const url = `/examination_banks.json`;
|
|
|
|
const url = `/examination_banks.json`;
|
|
|
|
|
|
|
|
if(bool){
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}else {
|
|
|
|
this.setState({
|
|
|
|
this.setState({
|
|
|
|
booljupyterurls:true,
|
|
|
|
booljupyterurls:true,
|
|
|
|
})
|
|
|
|
})
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
axios.get((url), {params: data}).then((response) => {
|
|
|
|
axios.get((url), {params: data}).then((response) => {
|
|
|
|
setTimeout(()=>{
|
|
|
|
setTimeout(()=>{
|
|
|
|
this.setState({
|
|
|
|
this.setState({
|
|
|
@ -281,7 +288,7 @@ class Testpaperlibrary extends Component {
|
|
|
|
page: this.state.page,
|
|
|
|
page: this.state.page,
|
|
|
|
per_page: 10,
|
|
|
|
per_page: 10,
|
|
|
|
};
|
|
|
|
};
|
|
|
|
this.getdata(data);
|
|
|
|
this.getdata(data,true);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}).catch((error) => {
|
|
|
|
}).catch((error) => {
|
|
|
|
////console.log(error);
|
|
|
|
////console.log(error);
|
|
|
@ -307,7 +314,7 @@ class Testpaperlibrary extends Component {
|
|
|
|
page: this.state.page,
|
|
|
|
page: this.state.page,
|
|
|
|
per_page: 10,
|
|
|
|
per_page: 10,
|
|
|
|
};
|
|
|
|
};
|
|
|
|
this.getdata(data);
|
|
|
|
this.getdata(data,true);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
})
|
|
|
|
})
|
|
|
|
.catch(function (error) {
|
|
|
|
.catch(function (error) {
|
|
|
@ -318,8 +325,8 @@ class Testpaperlibrary extends Component {
|
|
|
|
showmodels = (id) => {
|
|
|
|
showmodels = (id) => {
|
|
|
|
this.setState({
|
|
|
|
this.setState({
|
|
|
|
modalsType: true,
|
|
|
|
modalsType: true,
|
|
|
|
titilesm: "在平台审核后,所有成员均可使用试题",
|
|
|
|
titilesm: "在平台审核后,所有成员均可使用试卷",
|
|
|
|
titiless: "是否设置为公开?",
|
|
|
|
titiless: "是否设置为公开",
|
|
|
|
titbool: true,
|
|
|
|
titbool: true,
|
|
|
|
timuid: id
|
|
|
|
timuid: id
|
|
|
|
})
|
|
|
|
})
|
|
|
@ -330,7 +337,19 @@ class Testpaperlibrary extends Component {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
showmodelsInaudit = (e) => {
|
|
|
|
|
|
|
|
this.setState({
|
|
|
|
|
|
|
|
modalsTypeInaudit: true,
|
|
|
|
|
|
|
|
titilesm: "公开申请已提交,请等待管理员的审核",
|
|
|
|
|
|
|
|
titiless: "我们将在1-2个工作日内完成审核",
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
modalsTypeInauditbool=()=>{
|
|
|
|
|
|
|
|
this.setState({
|
|
|
|
|
|
|
|
modalsTypeInaudit:false,
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
showmodelysl = (id) => {
|
|
|
|
showmodelysl = (id) => {
|
|
|
|
this.setState({
|
|
|
|
this.setState({
|
|
|
@ -396,7 +415,7 @@ class Testpaperlibrary extends Component {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
render() {
|
|
|
|
render() {
|
|
|
|
let { Headertop, items_count, page, per_page, modalsTypes, modalsType } = this.state;
|
|
|
|
let{Headertop,items_count,page,per_page,modalsTypes,modalsType,modalsTypeInaudit}=this.state;
|
|
|
|
|
|
|
|
|
|
|
|
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;
|
|
|
@ -417,6 +436,12 @@ class Testpaperlibrary extends Component {
|
|
|
|
setDownload={() => this.setDownload()}></QuestionModal>
|
|
|
|
setDownload={() => this.setDownload()}></QuestionModal>
|
|
|
|
: ""
|
|
|
|
: ""
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
modalsTypeInaudit===true?
|
|
|
|
|
|
|
|
<QuestionModalys {...this.props}{...this.state} modalsType={modalsTypeInaudit} modalCancel={() => this.modalsTypeInauditbool()}
|
|
|
|
|
|
|
|
setDownload={() => this.modalsTypeInauditbool()}></QuestionModalys>
|
|
|
|
|
|
|
|
:""
|
|
|
|
|
|
|
|
}
|
|
|
|
{/*试卷库*/}
|
|
|
|
{/*试卷库*/}
|
|
|
|
<SiderBar
|
|
|
|
<SiderBar
|
|
|
|
{...this.props}
|
|
|
|
{...this.props}
|
|
|
@ -445,6 +470,8 @@ class Testpaperlibrary extends Component {
|
|
|
|
callback={(key)=>this.callback(key)}
|
|
|
|
callback={(key)=>this.callback(key)}
|
|
|
|
setdatafunsval={(key)=>this.setdatafunsval(key)}
|
|
|
|
setdatafunsval={(key)=>this.setdatafunsval(key)}
|
|
|
|
setdifficulty={(bool)=>this.setdifficulty(bool)}
|
|
|
|
setdifficulty={(bool)=>this.setdifficulty(bool)}
|
|
|
|
|
|
|
|
showmodelsInaudit={(e)=>this.showmodelsInaudit(e)}
|
|
|
|
|
|
|
|
|
|
|
|
>
|
|
|
|
>
|
|
|
|
|
|
|
|
|
|
|
|
</Contentpart>
|
|
|
|
</Contentpart>
|
|
|
|