video_transcode
杨树林 5 years ago
parent 9b6dac251d
commit 14b1c3b0a8

@ -21,6 +21,7 @@ import NoneData from './component/NoneData';
import './questioncss/questioncom.css';
import Bottomsubmit from "../modals/Bottomsubmit";
import QuestionModalys from "./component/QuestionModalys";
import Listjihe from "./component/Listjihe";
//exam_id 试卷的id
var Undoclickable=true;
@ -264,12 +265,6 @@ class NewMyShixunModel extends Component {
}
this.callback(defaultActiveKeys);
}
if(prevProps.Contentdata !== this.props.Contentdata){
this.setState({
Contentdata:this.props.Contentdata,
})
}
}
//公共和我的
@ -721,33 +716,33 @@ class NewMyShixunModel extends Component {
getbasket_listdata = () => {
// 获取试题篮展开的数据
// const url = "/item_baskets/basket_list.json";
// axios.get(url)
// .then((result) => {
// // ////console.log("getbasket_listdata");
// // ////console.log(result.data);
// this.setState({
// completion_questions_count: result.data.completion_questions_count,
// judgement_questions_count: result.data.judgement_questions_count,
// multiple_questions_count: result.data.multiple_questions_count,
// practical_questions_count: result.data.practical_questions_count,
// program_questions_count: result.data.program_questions_count,
// single_questions_count: result.data.single_questions_count,
// subjective_questions_count: result.data.subjective_questions_count,
// })
//
// }).catch((error) => {
// // ////console.log(error);
// this.setState({
// completion_questions_count: 0,
// judgement_questions_count: 0,
// multiple_questions_count: 0,
// practical_questions_count: 0,
// program_questions_count: 0,
// single_questions_count: 0,
// subjective_questions_count: 0,
// })
// })
const url = "/item_baskets/basket_list.json";
axios.get(url)
.then((result) => {
// ////console.log("getbasket_listdata");
// ////console.log(result.data);
this.setState({
completion_questions_count: result.data.completion_questions_count,
judgement_questions_count: result.data.judgement_questions_count,
multiple_questions_count: result.data.multiple_questions_count,
practical_questions_count: result.data.practical_questions_count,
program_questions_count: result.data.program_questions_count,
single_questions_count: result.data.single_questions_count,
subjective_questions_count: result.data.subjective_questions_count,
})
}).catch((error) => {
// ////console.log(error);
this.setState({
completion_questions_count: 0,
judgement_questions_count: 0,
multiple_questions_count: 0,
practical_questions_count: 0,
program_questions_count: 0,
single_questions_count: 0,
subjective_questions_count: 0,
})
})
}
@ -1029,8 +1024,10 @@ class NewMyShixunModel extends Component {
+ single_questions_count
+ subjective_questions_count;
// console.log("弹出框");
// console.log(Contentdata)
console.log("弹出框");
console.log(Datacount)
console.log(Contentdata)
return (
<div className="newMain clearfix " ref={this.saveContainer}>
@ -1103,6 +1100,8 @@ class NewMyShixunModel extends Component {
Contentdata={Contentdata}
exam_id={this.props.exam_id}
Isitapopup={"true"}
Datacount={Datacount}
Datacountbool={true}
chakanjiexiboolindex={this.state.chakanjiexiboolindex}
chakanjiexibool={(e)=>this.chakanjiexibool(e)}
getitem_basketss={(id)=>this.getitem_basketss(id)}

@ -788,12 +788,37 @@ class Question extends Component {
}
//全选试题库
selectallquestionsonthispage=(bool)=>{
if(bool===true){
//bool 是选中状态
let {
completion_questions_count, judgement_questions_count, multiple_questions_count, practical_questions_count,
program_questions_count, single_questions_count, subjective_questions_count,
} = this.state;
const Datacount = completion_questions_count + judgement_questions_count
+ multiple_questions_count + practical_questions_count
+ program_questions_count
+ single_questions_count
+ subjective_questions_count;
if(Datacount===100){
this.props.showNotification(`已选100个试题不能在选用更多试题`);
return;
}
}
if(myGrandtotal===true){
this.props.showNotification(`本页全部试题未发布,不能选择`);
return
}
var item_idsdata=[];
var arr= this.state.Contentdata.items;
@ -1083,6 +1108,8 @@ class Question extends Component {
<Contentpart {...this.state} {...this.props}
pages={this.state.page}
Isitapopup={"false"}
Datacount={Datacount}
Datacountbool={true}
chakanjiexiboolindex={this.state.chakanjiexiboolindex}
chakanjiexibool={(e)=>this.chakanjiexibool(e)}
getitem_basketss={(id)=>this.getitem_basketss(id)}

@ -466,6 +466,8 @@ class Contentpart extends Component {
: this.props.Contentdata.items.map((object, index) => {
return (
<Listjihe {...this.state} {...this.props}
Datacountbool={this.props.Datacountbool}
Datacount={this.props.Datacount}
Isitapopup={this.props.Isitapopup}
chakanjiexiboolindex={this.props.chakanjiexiboolindex}
chakanjiexibool={(keindex)=>this.chakanjiexibool(keindex)}

@ -97,6 +97,19 @@ class Listjihe extends Component {
}
//选用
Selectingpracticaltraining = (id) => {
try {
if(this.props.Datacountbool){
if(this.props.Datacount===100){
this.props.showNotification(`已选100个试题不能在选用更多试题`);
return;
}
}
}catch (e) {
}
let data = {}
if (this.props.exam_id === undefined) {
data = {

Loading…
Cancel
Save