dev_aliyun2
杨树林 5 years ago committed by harry
parent ccd152dc82
commit d3ccf32bba

@ -9,6 +9,7 @@ import QuestionModals from "./component/QuestionModals";
import Contentpart from "./component/Contentpart"; import Contentpart from "./component/Contentpart";
import './questioncss/questioncom.css'; import './questioncss/questioncom.css';
import Bottomsubmit from "../modals/Bottomsubmit"; import Bottomsubmit from "../modals/Bottomsubmit";
import QuestionModalys from "./component/QuestionModalys";
//exam_id 试卷的id //exam_id 试卷的id
class NewMyShixunModel extends Component { class NewMyShixunModel extends Component {
@ -56,15 +57,28 @@ class NewMyShixunModel extends Component {
oj_status: null, oj_status: null,
isVisible: false, isVisible: false,
selectionbools: false, selectionbools: false,
chakanjiexiboolindex: "无",
} }
} }
chakanjiexibool = (index) => {
if (this.state.chakanjiexiboolindex === index) {
this.setState({
chakanjiexiboolindex: "无",
})
return
}
this.setState({
chakanjiexiboolindex: index,
})
}
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: "", keyword: "",
page: 1, page: 1,
per_page: 10, per_page: 10,
oj_status: null oj_status: null
@ -76,7 +90,7 @@ class NewMyShixunModel extends Component {
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, keyword: null,
page: this.state.page, page: this.state.page,
per_page: 10, per_page: 10,
oj_status: null, oj_status: null,
@ -90,7 +104,7 @@ class NewMyShixunModel extends Component {
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: "", keyword: "",
page: 1, page: 1,
per_page: 10, per_page: 10,
oj_status: null oj_status: null
@ -102,7 +116,7 @@ class NewMyShixunModel extends Component {
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, keyword: null,
page: 1, page: 1,
per_page: 10, per_page: 10,
oj_status: null, oj_status: null,
@ -114,7 +128,7 @@ class NewMyShixunModel extends Component {
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: "", keyword: "",
page: 1, page: 1,
per_page: 10, per_page: 10,
oj_status: null oj_status: null
@ -126,7 +140,7 @@ class NewMyShixunModel extends Component {
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, keyword: null,
page: 1, page: 1,
per_page: 10, per_page: 10,
oj_status: null, oj_status: null,
@ -347,7 +361,7 @@ class NewMyShixunModel extends Component {
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, keyword: 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,
@ -455,7 +469,7 @@ class NewMyShixunModel extends Component {
visiblemys: false, visiblemys: false,
page: 1, page: 1,
per_page: 10, per_page: 10,
keywords: "", keyword: "",
oj_status: null oj_status: null
}) })
@ -466,11 +480,11 @@ class NewMyShixunModel extends Component {
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, keyword: null,
page: 1, page: 1,
per_page: 10, per_page: 10,
oj_status: null, oj_status: null,
item_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);
@ -482,7 +496,7 @@ class NewMyShixunModel extends Component {
visiblemyss: false, visiblemyss: false,
page: 1, page: 1,
per_page: 10, per_page: 10,
keywords: "", keyword: "",
oj_status: null oj_status: null
}) })
@ -495,9 +509,9 @@ class NewMyShixunModel extends Component {
item_type: item_type, item_type: item_type,
page: 1, page: 1,
per_page: 10, per_page: 10,
keywords: null, keyword: null,
oj_status: null, oj_status: null,
item_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);
@ -516,6 +530,19 @@ class NewMyShixunModel extends Component {
} }
} }
showmodelsInaudit = (e) => {
this.setState({
modalsTypeInaudit: true,
titilesm: "公开申请已提交,请等待管理员的审核",
titiless: "我们将在1-2个工作日内完成审核",
})
};
modalsTypeInauditbool = () => {
this.setState({
modalsTypeInaudit: false,
})
}
handleVisibleChanges = (boll) => { handleVisibleChanges = (boll) => {
if (this.state.visiblemys === true) { if (this.state.visiblemys === true) {
@ -533,13 +560,13 @@ class NewMyShixunModel extends Component {
setdatafunsval = (e) => { setdatafunsval = (e) => {
this.setState({ this.setState({
keywords: e.target.value keyword: e.target.value
}) })
} }
setdatafuns = (value) => { setdatafuns = (value) => {
this.setState({ this.setState({
keywords: value, keyword: value,
}) })
var data = { var data = {
discipline_id: this.state.discipline_id, discipline_id: this.state.discipline_id,
@ -548,7 +575,7 @@ class NewMyShixunModel extends Component {
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, keyword: 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,
@ -573,7 +600,7 @@ class NewMyShixunModel extends Component {
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, keyword: this.state.keywords,
page: this.state.page, page: this.state.page,
per_page: 10, per_page: 10,
item_id: this.props.exam_id === undefined ? "" : parseInt(this.props.exam_id), item_id: this.props.exam_id === undefined ? "" : parseInt(this.props.exam_id),
@ -599,7 +626,7 @@ class NewMyShixunModel extends Component {
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, keyword: this.state.keywords,
page: this.state.page, page: this.state.page,
per_page: 10, per_page: 10,
item_id: this.props.exam_id === undefined ? "" : parseInt(this.props.exam_id), item_id: this.props.exam_id === undefined ? "" : parseInt(this.props.exam_id),
@ -667,7 +694,7 @@ class NewMyShixunModel extends Component {
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, keyword: this.state.keywords,
page: this.state.page, page: this.state.page,
per_page: 10, per_page: 10,
item_id: this.props.exam_id === undefined ? "" : parseInt(this.props.exam_id), item_id: this.props.exam_id === undefined ? "" : parseInt(this.props.exam_id),
@ -687,18 +714,168 @@ class NewMyShixunModel extends Component {
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)
.then((result) => {
if (result.data.status == 0) {
// this.props.showNotification(`撤销成功`);
var data = {
discipline_id: this.state.discipline_id,
sub_discipline_id: this.state.sub_discipline_id,
tag_discipline_id: this.state.tag_discipline_id,
public: this.state.defaultActiveKey,
difficulty: this.state.difficulty,
item_type: this.state.item_type,
keyword: this.state.keywords,
page: this.state.page,
per_page: 10,
exam_id: this.props.exam_id === undefined ? "" : parseInt(this.props.exam_id),
};
this.getdatasy(data);
this.getbasket_listdata();
}
}).catch((error) => {
////console.log(error);
})
} else { } else {
url = `/examination_banks/${id}/revoke_item.json`; url = `/examination_banks/${this.props.exam_id}/revoke_item.json`;
axios.delete(url, {
data: {
item_id: id === undefined ? "" : parseInt(id),
}
})
.then((result) => {
if (result.data.status == 0) {
// this.props.showNotification(`撤销成功`);
var data = {
discipline_id: this.state.discipline_id,
sub_discipline_id: this.state.sub_discipline_id,
tag_discipline_id: this.state.tag_discipline_id,
public: this.state.defaultActiveKey,
difficulty: this.state.difficulty,
item_type: this.state.item_type,
keyword: this.state.keywords,
page: this.state.page,
per_page: 10,
exam_id: this.props.exam_id === undefined ? "" : parseInt(this.props.exam_id),
};
this.getdatasy(data);
this.getbasket_listdata();
}
}).catch((error) => {
////console.log(error);
})
}
// 撤销
getitem_basketss = (id) => {
let url = "";
if (this.props.exam_id === undefined) {
url = `/item_baskets/${id}.json`;
} else {
url = `/examination_banks/${id}/revoke_item.json`;
}
axios.delete(url, {
data: {
item_id: this.props.exam_id === undefined ? "" : parseInt(this.props.exam_id),
}
})
.then((result) => {
if (result.data.status == 0) {
// this.props.showNotification(`撤销成功`);
var data = {
discipline_id: this.state.discipline_id,
sub_discipline_id: this.state.sub_discipline_id,
tag_discipline_id: this.state.tag_discipline_id,
public: this.state.defaultActiveKey,
difficulty: this.state.difficulty,
item_type: this.state.item_type,
keyword: this.state.keywords,
page: this.state.page,
per_page: 10,
item_id: this.props.exam_id === undefined ? "" : parseInt(this.props.exam_id),
};
this.getdatasy(data);
this.getbasket_listdata();
}
})
.then((result) => {
if (result.data.status == 0) {
// this.props.showNotification(`撤销成功`);
var data = {
discipline_id: this.state.discipline_id,
sub_discipline_id: this.state.sub_discipline_id,
tag_discipline_id: this.state.tag_discipline_id,
public: this.state.defaultActiveKey,
difficulty: this.state.difficulty,
item_type: this.state.item_type,
keywords: this.state.keywords,
page: this.state.page,
per_page: 10,
exam_id: this.props.exam_id === undefined ? "" : parseInt(this.props.exam_id),
};
this.getdatasy(data);
this.getbasket_listdata();
}
}).catch((error) => {
////console.log(error);
})
}
}
//全选试题库
selectallquestionsonthispage = () => {
var item_idsdata = [];
var arr = this.state.Contentdata.items;
for (let data of arr) {
if (data.item_type === "PROGRAM") {
//编程题
if (data.choosed === true) {
} else {
//未选用
if (data.program_attr.status === 1) {
//已发布
item_idsdata.push(data.id);
}
}
} else {
//不是编程题
if (data.choosed === true) {
} else {
//未选用
item_idsdata.push(data.id);
}
}
} }
const data = {
item_ids: item_idsdata,
item_id: this.props.exam_id === undefined ? "" : parseInt(this.props.exam_id),
}
this.getitem_baskets(data);
this.setState({
selectallquestionsonthispages: true,
})
}
//全选的状态
axios.delete(url, { //删除大题型
Deletebigquestiontype = (item_type) => {
const url = `/item_baskets/delete_item_type.json`;
axios.delete((url), {
data: { data: {
item_id: this.props.exam_id === undefined ? "" : parseInt(this.props.exam_id), item_type: item_type
} }
}) })
.then((result) => { .then((response) => {
if (result.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,
@ -711,164 +888,85 @@ class NewMyShixunModel extends Component {
per_page: 10, per_page: 10,
item_id: this.props.exam_id === undefined ? "" : parseInt(this.props.exam_id), item_id: this.props.exam_id === undefined ? "" : parseInt(this.props.exam_id),
}; };
this.getdatasy(data); this.getdata(data);
this.getbasket_listdata();
}
})
.then((result) => {
if (result.data.status == 0) {
// this.props.showNotification(`撤销成功`);
var data = {
discipline_id: this.state.discipline_id,
sub_discipline_id: this.state.sub_discipline_id,
tag_discipline_id: this.state.tag_discipline_id,
public: this.state.defaultActiveKey,
difficulty: this.state.difficulty,
item_type: this.state.item_type,
keywords: this.state.keywords,
page: this.state.page,
per_page: 10,
exam_id: this.props.exam_id === undefined ? "" : parseInt(this.props.exam_id),
};
this.getdatasy(data);
this.getbasket_listdata(); this.getbasket_listdata();
} }
}).catch((error) => {
////console.log(error);
}) })
var data = {
discipline_id: this.state.discipline_id,
sub_discipline_id: this.state.sub_discipline_id,
tag_discipline_id: this.state.tag_discipline_id,
public: this.state.defaultActiveKey,
difficulty: this.state.difficulty,
item_type: this.state.item_type,
keyword: this.state.keywords,
page: this.state.page,
per_page: 10,
oj_status: oj_status,
exam_id: this.props.exam_id === undefined ? "" : parseInt(this.props.exam_id),
};
this.getdata(data);
} }
} render() {
//全选试题库 let {
selectallquestionsonthispage = () => { page, per_page, items_count, Headertop, visible, placement, modalsType, modalsTypes, basket_list,
var item_idsdata = []; completion_questions_count, judgement_questions_count, multiple_questions_count, practical_questions_count,
program_questions_count, single_questions_count, subjective_questions_count, selectionbools,
var arr = this.state.Contentdata.items; modalsTypeInaudit
for (let data of arr) { } = this.state;
if (data.item_type === "PROGRAM") {
//编程题
if (data.choosed === true) {
} else { this.props.history.replace("/paperreview");
//未选用
if (data.program_attr.status === 1) {
//已发布
item_idsdata.push(data.id);
}
}
} else {
//不是编程题
if (data.choosed === true) {
} else {
//未选用
item_idsdata.push(data.id);
}
}
}
const data = {
item_ids: item_idsdata,
item_id: this.props.exam_id === undefined ? "" : parseInt(this.props.exam_id),
} }
this.getitem_baskets(data);
this.setState({
selectallquestionsonthispages: true,
})
}
//全选的状态 setoj_status = (oj_status) => {
//编程题发布未发布
//删除大题型 this.setState({
Deletebigquestiontype = (item_type) => { selectallquestionsonthispages: false,
const url = `/item_baskets/delete_item_type.json`; difficulty: null,
axios.delete((url), { oj_status: oj_status
data: {
item_type: item_type
}
})
.then((response) => {
if (response.data.status == 0) {
// this.props.showNotification('删除成功');
var data = {
discipline_id: this.state.discipline_id,
sub_discipline_id: this.state.sub_discipline_id,
tag_discipline_id: this.state.tag_discipline_id,
public: this.state.defaultActiveKey,
difficulty: this.state.difficulty,
item_type: this.state.item_type,
keywords: this.state.keywords,
page: this.state.page,
per_page: 10,
item_id: this.props.exam_id === undefined ? "" : parseInt(this.props.exam_id),
};
this.getdata(data);
this.getbasket_listdata();
}
}) })
.catch(function (error) { var data = {
////console.log(error); discipline_id: this.state.discipline_id,
}); sub_discipline_id: this.state.sub_discipline_id,
tag_discipline_id: this.state.tag_discipline_id,
} public: this.state.defaultActiveKey,
difficulty: this.state.difficulty,
item_type: this.state.item_type,
//跳转 keywords: this.state.keywords,
gotopaperreview = () => { page: this.state.page,
per_page: 10,
this.props.history.replace("/paperreview"); oj_status: oj_status,
item_id: this.props.exam_id === undefined ? "" : parseInt(this.props.exam_id),
} };
this.getdata(data);
setoj_status = (oj_status) => { }
//编程题发布未发布
this.setState({
selectallquestionsonthispages: false,
difficulty: null,
oj_status: oj_status
})
var data = {
discipline_id: this.state.discipline_id,
sub_discipline_id: this.state.sub_discipline_id,
tag_discipline_id: this.state.tag_discipline_id,
public: this.state.defaultActiveKey,
difficulty: this.state.difficulty,
item_type: this.state.item_type,
keywords: this.state.keywords,
page: this.state.page,
per_page: 10,
oj_status: oj_status,
item_id: this.props.exam_id === undefined ? "" : parseInt(this.props.exam_id),
};
this.getdata(data);
}
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
+ multiple_questions_count + practical_questions_count + multiple_questions_count + practical_questions_count
+ program_questions_count + program_questions_count
+ single_questions_count + single_questions_count
+ subjective_questions_count; + subjective_questions_count;
return ( return (
<div className="newMain clearfix " ref={this.saveContainer}> <div className="newMain clearfix " ref={this.saveContainer}>
{ {
visible === true ? visible === true ?
<style> <style>
{ {
` `
.newHeaders{ .newHeaders{
position: fixed; position: fixed;
top: 0px; top: 0px;
@ -886,79 +984,89 @@ render() {
z-index: 9999999 ; z-index: 9999999 ;
} }
` `
} }
</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>
: "" : ""
} }
{
{/*顶部*/} modalsTypeInaudit === true ?
<QuestionModalys {...this.props}{...this.state} modalsType={modalsTypeInaudit} modalCancel={() => this.modalsTypeInauditbool()}
<Headplugselections setDownload={() => this.modalsTypeInauditbool()}></QuestionModalys>
disciplinesdata={this.state.disciplinesdata} : ""
{...this.props} }
{...this.state} {/*顶部*/}
setdifficulty={(e) => this.setdifficulty(e)}
setitem_types={(e) => this.setitem_types(e)} <Headplugselections
setdiscipline_id={(e) => this.setdiscipline_id(e)} disciplinesdata={this.state.disciplinesdata}
setsub_discipline_id={(e) => this.setsub_discipline_id(e)} {...this.props}
settag_discipline_id={(e) => this.settag_discipline_id(e)} {...this.state}
/> setdifficulty={(e) => this.setdifficulty(e)}
{/*头部*/} setitem_types={(e) => this.setitem_types(e)}
<Contentpart {...this.state} {...this.props} setdiscipline_id={(e) => this.setdiscipline_id(e)}
exam_id={this.props.exam_id} setsub_discipline_id={(e) => this.setsub_discipline_id(e)}
Isitapopup={"true"} settag_discipline_id={(e) => this.settag_discipline_id(e)}
getitem_basketss={(id) => this.getitem_basketss(id)} />
selectallquestionsonthispage={() => this.selectallquestionsonthispage()} {/*头部*/}
getitem_baskets={(e) => this.getitem_baskets(e)} <Contentpart {...this.state} {...this.props}
setdatafuns={(e) => this.setdatafuns(e)} exam_id={this.props.exam_id}
setdatafunsval={(e) => this.setdatafunsval(e)} Isitapopup={"true"}
handleVisibleChanges={(e) => this.handleVisibleChanges(e)} chakanjiexiboolindex={this.state.chakanjiexiboolindex}
handleVisibleChange={(e) => this.handleVisibleChange(e)} chakanjiexibool={(e) => this.chakanjiexibool(e)}
showmodels={(e) => this.showmodels(e)} getitem_basketss={(id) => this.getitem_basketss(id)}
showmodelysl={(e) => this.showmodelysl(e)} selectallquestionsonthispage={() => this.selectallquestionsonthispage()}
callback={(e) => this.callback(e)} getitem_baskets={(e) => this.getitem_baskets(e)}
setoj_status={(e) => this.setoj_status(e)}></Contentpart> setdatafuns={(e) => this.setdatafuns(e)}
setdatafunsval={(e) => this.setdatafunsval(e)}
{ handleVisibleChanges={(e) => this.handleVisibleChanges(e)}
items_count && items_count > 10 ? handleVisibleChange={(e) => this.handleVisibleChange(e)}
<div className="mb30 clearfix educontent mt40 intermediatecenter"> showmodels={(e) => this.showmodels(e)}
<Pagination showQuickJumper current={page} onChange={this.paginationonChange} showmodelysl={(e) => this.showmodelysl(e)}
pageSize={per_page} callback={(e) => this.callback(e)}
total={items_count}></Pagination> setoj_status={(e) => this.setoj_status(e)}
</div> showmodelsInaudit={(e) => this.showmodelsInaudit(e)}
: <div className="h30 clearfix educontent mt40 intermediatecenter">
></Contentpart>
</div>
} {
items_count && items_count > 10 ?
<div className="mb30 clearfix educontent mt40 intermediatecenter">
<Pagination showQuickJumper current={page} onChange={this.paginationonChange}
pageSize={per_page}
total={items_count}></Pagination>
</div>
: <div className="h30 clearfix educontent mt40 intermediatecenter">
</div>
}
<Bottomsubmit {...this.props} {...this.state} bottomvalue={"确定"} <Bottomsubmit {...this.props} {...this.state} bottomvalue={"确定"}
Cohetepaperbool={true} Cohetepaperbool={true}
setCohetepaperbool={() => this.props.setnewmyshixunmodelbool(false)} setCohetepaperbool={() => this.props.setnewmyshixunmodelbool(false)}
onSubmits={() => this.props.setnewmyshixunmodelbool(false)} url={'/paperlibrary'}></Bottomsubmit> onSubmits={() => this.props.setnewmyshixunmodelbool(false)} url={'/paperlibrary'}></Bottomsubmit>
</div> </div>
) )
} }
} }

@ -14,6 +14,7 @@ const tagArray = [
] ]
//单选题 //单选题
//Paperlibraryseeid_items.js Listjihe.js
class Paperreview_single extends Component { class Paperreview_single extends Component {
constructor(props) { constructor(props) {
super(props); super(props);
@ -155,10 +156,16 @@ class Paperreview_single extends Component {
</div> </div>
<div className="ml10 lh28 listjihetixingstit cretitlecolrlist programquill" style={{ wordBreak: "break-word" }} <div className="ml10 lh28 listjihetixingstit cretitlecolrlist programquill" style={{ wordBreak: "break-word" }}
> >
<QuillForEditor {
readOnly={true} itemssname === null || itemssname === undefined ?
value={itemssname} ""
/> :
<QuillForEditor
readOnly={true}
value={itemssname}
/>
}
</div> </div>
</div> </div>
@ -192,10 +199,16 @@ class Paperreview_single extends Component {
objectsingle && objectsingle.program_attr && objectsingle.program_attr.description ? objectsingle && objectsingle.program_attr && objectsingle.program_attr.description ?
<p className="programquill" style={{ wordBreak: "break-word" }} <p className="programquill" style={{ wordBreak: "break-word" }}
> >
<QuillForEditor {
readOnly={true} itemsnamesy === null || itemsnamesy === undefined ?
value={itemsnamesy} ""
/> :
<QuillForEditor
readOnly={true}
value={itemsnamesy}
/>
}
</p> </p>
: :
""} ""}

@ -10,6 +10,7 @@ import TPMIndexHOC from "../tpm/TPMIndexHOC";
import NoneData from './component/NoneData'; import NoneData from './component/NoneData';
import './questioncss/questioncom.css'; import './questioncss/questioncom.css';
import SiderBars from "../question/component/SiderBars"; import SiderBars from "../question/component/SiderBars";
import QuestionModalys from "./component/QuestionModalys";
class Question extends Component { class Question extends Component {
constructor(props) { constructor(props) {
@ -22,6 +23,7 @@ class Question extends Component {
visible: false, visible: false,
placement: 'right', placement: 'right',
modalsType: false, modalsType: false,
modalsTypeInaudit: false,
modalsTypes: false, modalsTypes: false,
titilesm: "在平台审核后,所有成员均可使用试题", titilesm: "在平台审核后,所有成员均可使用试题",
titiless: "是否设置为公开?", titiless: "是否设置为公开?",
@ -82,7 +84,7 @@ class Question extends Component {
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: "", keyword: "",
page: 1, page: 1,
per_page: 10, per_page: 10,
oj_status: null oj_status: null
@ -94,7 +96,7 @@ class Question extends Component {
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, keyword: null,
page: this.state.page, page: this.state.page,
per_page: 10, per_page: 10,
oj_status: null oj_status: null
@ -107,7 +109,7 @@ class Question extends Component {
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: "", keyword: "",
page: 1, page: 1,
per_page: 10, per_page: 10,
oj_status: null oj_status: null
@ -119,7 +121,7 @@ class Question extends Component {
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, keyword: null,
page: 1, page: 1,
per_page: 10, per_page: 10,
oj_status: null oj_status: null
@ -130,7 +132,7 @@ class Question extends Component {
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: "", keyword: "",
page: 1, page: 1,
per_page: 10, per_page: 10,
oj_status: null oj_status: null
@ -142,7 +144,7 @@ class Question extends Component {
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, keyword: null,
page: 1, page: 1,
per_page: 10, per_page: 10,
oj_status: null oj_status: null
@ -205,12 +207,19 @@ class Question extends Component {
} }
//刷新加载 //刷新加载
getdata = (data) => { getdata = (data, bool) => {
const url = `/item_banks.json`; const url = `/item_banks.json`;
this.setState({ if (bool) {
booljupyterurls: true, this.setState({
selectionbools: false, selectionbools: false,
}) })
} else {
this.setState({
booljupyterurls: true,
selectionbools: false,
})
}
axios.get((url), { params: data }).then((response) => { axios.get((url), { params: data }).then((response) => {
setTimeout(() => { setTimeout(() => {
this.setState({ this.setState({
@ -327,7 +336,7 @@ class Question extends Component {
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, keyword: 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
@ -381,6 +390,16 @@ class Question extends Component {
timuid: id timuid: id
}) })
}; };
showmodelsInaudit = (e) => {
this.setState({
modalsTypeInaudit: true,
titilesm: "公开申请已提交,请等待管理员的审核",
titiless: "我们将在1-2个工作日内完成审核",
})
};
showmodelysl = (id) => { showmodelysl = (id) => {
this.setState({ this.setState({
modalsType: true, modalsType: true,
@ -390,7 +409,11 @@ class Question extends Component {
timuid: id timuid: id
}) })
}; };
modalsTypeInauditbool = () => {
this.setState({
modalsTypeInaudit: false,
})
}
modalCancel = () => { modalCancel = () => {
this.setState({ this.setState({
@ -435,7 +458,7 @@ class Question extends Component {
visiblemys: false, visiblemys: false,
page: 1, page: 1,
per_page: 10, per_page: 10,
keywords: "", keyword: "",
oj_status: null oj_status: null
}) })
@ -446,7 +469,7 @@ class Question extends Component {
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, keyword: null,
page: 1, page: 1,
per_page: 10, per_page: 10,
oj_status: null oj_status: null
@ -461,7 +484,7 @@ class Question extends Component {
visiblemyss: false, visiblemyss: false,
page: 1, page: 1,
per_page: 10, per_page: 10,
keywords: "", keyword: "",
oj_status: null oj_status: null
}) })
@ -474,7 +497,7 @@ class Question extends Component {
item_type: item_type, item_type: item_type,
page: 1, page: 1,
per_page: 10, per_page: 10,
keywords: null, keyword: null,
oj_status: null oj_status: null
}; };
@ -511,13 +534,13 @@ class Question extends Component {
setdatafunsval = (e) => { setdatafunsval = (e) => {
this.setState({ this.setState({
keywords: e.target.value keyword: e.target.value
}) })
} }
setdatafuns = (value) => { setdatafuns = (value) => {
this.setState({ this.setState({
keywords: value, keyword: value,
}) })
var data = { var data = {
discipline_id: this.state.discipline_id, discipline_id: this.state.discipline_id,
@ -526,7 +549,7 @@ class Question extends Component {
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, keyword: 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
@ -550,11 +573,11 @@ class Question extends Component {
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, keyword: this.state.keywords,
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) {
@ -575,11 +598,11 @@ class Question extends Component {
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, keyword: this.state.keywords,
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);
@ -635,7 +658,7 @@ class Question extends Component {
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, keyword: this.state.keywords,
page: this.state.page, page: this.state.page,
per_page: 10, per_page: 10,
}; };
@ -665,7 +688,7 @@ class Question extends Component {
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, keyword: this.state.keywords,
page: this.state.page, page: this.state.page,
per_page: 10, per_page: 10,
}; };
@ -735,7 +758,7 @@ class Question extends Component {
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, keyword: this.state.keywords,
page: this.state.page, page: this.state.page,
per_page: 10, per_page: 10,
}; };
@ -771,7 +794,7 @@ class Question extends Component {
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, keyword: 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
@ -786,7 +809,8 @@ class Question extends Component {
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,
modalsTypeInaudit
} = this.state; } = this.state;
const Datacount = completion_questions_count + judgement_questions_count const Datacount = completion_questions_count + judgement_questions_count
@ -846,6 +870,12 @@ class Question 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>
: ""
}
@ -901,6 +931,9 @@ class Question extends Component {
/> />
{/*头部*/} {/*头部*/}
<Contentpart {...this.state} {...this.props} <Contentpart {...this.state} {...this.props}
Isitapopup={"false"}
chakanjiexiboolindex={this.state.chakanjiexiboolindex}
chakanjiexibool={(e) => this.chakanjiexibool(e)}
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)}
@ -911,7 +944,9 @@ class Question 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)}
showmodelsInaudit={(e) => this.showmodelsInaudit(e)}
></Contentpart>
{ {
items_count && items_count > 10 ? items_count && items_count > 10 ?

@ -455,7 +455,7 @@ class Questionitem_banks extends Component {
sub_discipline_id: Getdatasdata[3].rbkc[1], sub_discipline_id: Getdatasdata[3].rbkc[1],
tag_discipline_id: myrbkc, tag_discipline_id: myrbkc,
}); });
this.props.history.replace('/problems/new'); window.open("/problems/new");
} }

@ -319,7 +319,9 @@ class Contentpart extends Component {
getitem_basketss={(id) => this.props.getitem_basketss(id)} getitem_basketss={(id) => this.props.getitem_basketss(id)}
getitem_baskets={(e) => this.props.getitem_baskets(e)} getitem_baskets={(e) => this.props.getitem_baskets(e)}
showmodels={(e) => this.props.showmodels(e)} showmodels={(e) => this.props.showmodels(e)}
showmodelysl={(e) => this.props.showmodelysl(e)}> showmodelysl={(e) => this.props.showmodelysl(e)}
showmodelsInaudit={(e) => this.props.showmodelsInaudit(e)}
>
</Listjihe> </Listjihe>
) )

@ -231,11 +231,16 @@ class Headplugselections extends Component {
{ {
disciplinesdata&&disciplinesdata.map((item,key)=>{ disciplinesdata&&disciplinesdata.map((item,key)=>{
return( return(
<Dropdown getPopupContainer={trigger => trigger.parentNode} overlay={overlaymenu(item.sub_disciplines,item.id)} key={key} placement={item.id<4?"bottomRight":item.id>=8?"bottomLeft":"bottomCenter"}> item.sub_disciplines.length>0?
<Dropdown getPopupContainer={trigger => trigger.parentNode} overlay={ overlaymenu(item.sub_disciplines,item.id)} key={key} placement={item.id<4?"bottomRight":item.id>=8?"bottomLeft":"bottomCenter"}>
<li key={key} className={parseInt(shixunsearchAllvalue)===item.id?"shaiItem shixun_repertoire active":"shaiItem shixun_repertoire"} value={item.id} onClick={()=>this.shixunsearchAll(item.id)}>
{item.name}
</li>
</Dropdown>
:
<li key={key} className={parseInt(shixunsearchAllvalue)===item.id?"shaiItem shixun_repertoire active":"shaiItem shixun_repertoire"} value={item.id} onClick={()=>this.shixunsearchAll(item.id)}> <li key={key} className={parseInt(shixunsearchAllvalue)===item.id?"shaiItem shixun_repertoire active":"shaiItem shixun_repertoire"} value={item.id} onClick={()=>this.shixunsearchAll(item.id)}>
{item.name} {item.name}
</li> </li>
</Dropdown>
) )
}) })
} }

@ -1,6 +1,6 @@
import React, {Component} from "react"; import React, { Component } from "react";
import {Link, NavLink} from 'react-router-dom'; import { Link, NavLink } from 'react-router-dom';
import {WordsBtn, ActionBtn, SnackbarHOC, getImageUrl} from 'educoder'; import { WordsBtn, ActionBtn, SnackbarHOC, getImageUrl } from 'educoder';
import axios from 'axios'; import axios from 'axios';
import { import {
notification, notification,
@ -13,12 +13,12 @@ import {
Input, Input,
Select, Select,
Cascader, Cascader,
Col, Row, InputNumber, DatePicker, AutoComplete, Button, Tag,Tooltip Col, Row, InputNumber, DatePicker, AutoComplete, Button, Tag, Tooltip
} from "antd"; } from "antd";
import './../questioncss/questioncom.css'; import './../questioncss/questioncom.css';
import Newknledpots from './Newknledpots' import Newknledpots from './Newknledpots'
const InputGroup = Input.Group; const InputGroup = Input.Group;
const {Option} = Select; const { Option } = Select;
const queryString = require('query-string'); const queryString = require('query-string');
const options = [ const options = [
@ -53,18 +53,18 @@ class Itembankstop extends Component {
rbtx: undefined, rbtx: undefined,
rbkc: undefined, rbkc: undefined,
knowledgepoints: [], knowledgepoints: [],
knowledgepoints2:[], knowledgepoints2: [],
options: [], options: [],
NewknTypedel:false, NewknTypedel: false,
boolred:false, boolred: false,
boolnews:false, boolnews: false,
sub_disciplineslength: 1,
} }
} }
setboolred=(bool)=>{ setboolred = (bool) => {
this.setState({ this.setState({
boolred:bool boolred: bool
}) })
} }
@ -75,17 +75,17 @@ class Itembankstop extends Component {
const params = this.props && this.props.match && this.props.match.params; const params = this.props && this.props.match && this.props.match.params;
if (JSON.stringify(params) === "{}") { if (JSON.stringify(params) === "{}") {
// "新增" // "新增"
this.setState({ this.setState({
boolnews:false, boolnews: false,
}) })
} else { } else {
if(params){ if (params) {
if( params.id){ if (params.id) {
this.setState({ this.setState({
boolnews:true, boolnews: true,
}) })
} }
} }
} }
@ -104,46 +104,46 @@ class Itembankstop extends Component {
const parsed = queryString.parse(this.props.location.search); const parsed = queryString.parse(this.props.location.search);
//console.log(parsed); //console.log(parsed);
try { try {
if(JSON.stringify(parsed)==={}||JSON.stringify(parsed)==="{}"){ if (JSON.stringify(parsed) === {} || JSON.stringify(parsed) === "{}") {
}else { } else {
if(parsed.discipline_id){ if (parsed.discipline_id) {
if(parsed.sub_discipline_id){ if (parsed.sub_discipline_id) {
this.setState({ this.setState({
rbkc:[parseInt(parsed.discipline_id),parseInt(parsed.sub_discipline_id)] rbkc: [parseInt(parsed.discipline_id), parseInt(parsed.sub_discipline_id)]
}) })
this.props.form.setFieldsValue({ this.props.form.setFieldsValue({
rbkc: [parseInt(parsed.discipline_id),parseInt(parsed.sub_discipline_id)], rbkc: [parseInt(parsed.discipline_id), parseInt(parsed.sub_discipline_id)],
}); });
this.getdatasmyss(parseInt(parsed.discipline_id),parseInt(parsed.sub_discipline_id)); this.getdatasmyss(parseInt(parsed.discipline_id), parseInt(parsed.sub_discipline_id));
} }
} }
if(parsed.item_type){ if (parsed.item_type) {
this.setState({ this.setState({
rbtx:parsed.item_type, rbtx: parsed.item_type,
}) })
this.props.form.setFieldsValue({ this.props.form.setFieldsValue({
rbtx:parsed.item_type, rbtx: parsed.item_type,
}); });
this.props.setitem_type(parsed.item_type); this.props.setitem_type(parsed.item_type);
} }
if(parsed.difficulty){ if (parsed.difficulty) {
this.setState({ this.setState({
rbnd:parsed.difficulty, rbnd: parsed.difficulty,
}) })
this.props.form.setFieldsValue({ this.props.form.setFieldsValue({
rbnd:parsed.difficulty, rbnd: parsed.difficulty,
}); });
} }
} }
}catch (e) { } catch (e) {
} }
} }
@ -155,10 +155,10 @@ class Itembankstop extends Component {
options: this.props.disciplmy options: this.props.disciplmy
}) })
} }
if(prevProps.disciplinesdata!== this.props.disciplinesdata){ if (prevProps.disciplinesdata !== this.props.disciplinesdata) {
//console.log("新增开始加载了") //console.log("新增开始加载了")
try { try {
if(this.props.item_banksedit.discipline &&this.props.item_banksedit.sub_discipline){ if (this.props.item_banksedit.discipline && this.props.item_banksedit.sub_discipline) {
const didata = this.props.disciplinesdata; const didata = this.props.disciplinesdata;
const knowledgepointsdata = []; const knowledgepointsdata = [];
for (var i = 0; i < didata.length; i++) { for (var i = 0; i < didata.length; i++) {
@ -177,14 +177,14 @@ class Itembankstop extends Component {
} }
} }
} }
const _result =[]; const _result = [];
knowledgepointsdata.filter(item => { knowledgepointsdata.filter(item => {
if (this.props.item_banksedit.tag_disciplines.findIndex(t => t.id === item.id) === -1) { if (this.props.item_banksedit.tag_disciplines.findIndex(t => t.id === item.id) === -1) {
_result.push(item); _result.push(item);
} }
}); });
this.setState({ this.setState({
knowledgepoints:knowledgepointsdata, knowledgepoints: knowledgepointsdata,
knowledgepoints2: _result, knowledgepoints2: _result,
}) })
} }
@ -192,24 +192,24 @@ class Itembankstop extends Component {
try { try {
const parsed = queryString.parse(this.props.location.search); const parsed = queryString.parse(this.props.location.search);
if(JSON.stringify(parsed)==={}||JSON.stringify(parsed)==="{}"){ if (JSON.stringify(parsed) === {} || JSON.stringify(parsed) === "{}") {
}else { } else {
if(parsed.discipline_id){ if (parsed.discipline_id) {
if(parsed.sub_discipline_id){ if (parsed.sub_discipline_id) {
this.setState({ this.setState({
rbkc:[parseInt(parsed.discipline_id),parseInt(parsed.sub_discipline_id)] rbkc: [parseInt(parsed.discipline_id), parseInt(parsed.sub_discipline_id)]
}) })
this.props.form.setFieldsValue({ this.props.form.setFieldsValue({
rbkc: [parseInt(parsed.discipline_id),parseInt(parsed.sub_discipline_id)], rbkc: [parseInt(parsed.discipline_id), parseInt(parsed.sub_discipline_id)],
}); });
this.getdatasmyss(parseInt(parsed.discipline_id),parseInt(parsed.sub_discipline_id)); this.getdatasmyss(parseInt(parsed.discipline_id), parseInt(parsed.sub_discipline_id));
} }
} }
} }
}catch (e) { } catch (e) {
} }
}catch (e) { } catch (e) {
} }
} }
//编辑的时候 //编辑的时候
@ -225,8 +225,8 @@ class Itembankstop extends Component {
} }
try { try {
//初始化课程 //初始化课程
this.handdisciplinesChange(this.props.item_banksedit.discipline,this.props.item_banksedit.sub_discipline); this.handdisciplinesChange(this.props.item_banksedit.discipline, this.props.item_banksedit.sub_discipline);
}catch (e) { } catch (e) {
} }
this.getdatasmys(); this.getdatasmys();
@ -234,10 +234,10 @@ class Itembankstop extends Component {
} }
getdatasmys=()=>{ getdatasmys = () => {
if(this.props.disciplinesdata){ if (this.props.disciplinesdata) {
try { try {
if(this.props.item_banksedit.discipline &&this.props.item_banksedit.sub_discipline){ if (this.props.item_banksedit.discipline && this.props.item_banksedit.sub_discipline) {
var didata = this.props.disciplinesdata; var didata = this.props.disciplinesdata;
var knowledgepointsdata = []; var knowledgepointsdata = [];
for (var i = 0; i < didata.length; i++) { for (var i = 0; i < didata.length; i++) {
@ -256,7 +256,7 @@ class Itembankstop extends Component {
} }
} }
} }
var _result =[]; var _result = [];
knowledgepointsdata.filter(item => { knowledgepointsdata.filter(item => {
if (this.props.item_banksedit.tag_disciplines.findIndex(t => t.id === item.id) === -1) { if (this.props.item_banksedit.tag_disciplines.findIndex(t => t.id === item.id) === -1) {
_result.push(item); _result.push(item);
@ -265,20 +265,20 @@ class Itembankstop extends Component {
this.setState({ this.setState({
knowledgepoints:knowledgepointsdata, knowledgepoints: knowledgepointsdata,
knowledgepoints2: _result, knowledgepoints2: _result,
}) })
}else{ } else {
} }
}catch (e) { } catch (e) {
} }
} }
} }
getdatasmyss=(id,ids)=>{ getdatasmyss = (id, ids) => {
if(this.props.disciplinesdata){ if (this.props.disciplinesdata) {
try { try {
if(id &&ids){ if (id && ids) {
var didata = this.props.disciplinesdata; var didata = this.props.disciplinesdata;
var knowledgepointsdata = []; var knowledgepointsdata = [];
for (var i = 0; i < didata.length; i++) { for (var i = 0; i < didata.length; i++) {
@ -301,22 +301,22 @@ class Itembankstop extends Component {
this.setState({ this.setState({
knowledgepoints:knowledgepointsdata, knowledgepoints: knowledgepointsdata,
knowledgepoints2: knowledgepointsdata, knowledgepoints2: knowledgepointsdata,
}) })
}else{ } else {
} }
}catch (e) { } catch (e) {
} }
} }
} }
handdisciplinesChange =(name,title)=>{ handdisciplinesChange = (name, title) => {
this.setState({ this.setState({
rbkc:[name.id,title.id] rbkc: [name.id, title.id]
}) })
this.props.form.setFieldsValue({ this.props.form.setFieldsValue({
rbkc: [name.id,title.id], rbkc: [name.id, title.id],
}); });
@ -327,14 +327,14 @@ class Itembankstop extends Component {
handletag_disciplinesChange = (data) => { handletag_disciplinesChange = (data) => {
//是否选中的知识点 //是否选中的知识点
try { try {
var sju=data[data.length-1].name; var sju = data[data.length - 1].name;
this.setState({ this.setState({
Knowpoints:data, Knowpoints: data,
}) })
this.props.form.setFieldsValue({ this.props.form.setFieldsValue({
rbzsd: sju, rbzsd: sju,
}); });
}catch (e) { } catch (e) {
} }
@ -389,7 +389,7 @@ class Itembankstop extends Component {
//////console.log("难度塞选"); //////console.log("难度塞选");
//////console.log(value); //////console.log(value);
this.props.form.setFieldsValue({ this.props.form.setFieldsValue({
rbnd: value+ "", rbnd: value + "",
}); });
this.setState({ this.setState({
rbnd: value + "", rbnd: value + "",
@ -412,7 +412,7 @@ class Itembankstop extends Component {
//课程 //课程
//////console.log("课程"); //////console.log("课程");
//////console.log(value); //////console.log(value);
if(this.state.Knowpoints.length>4){ if (this.state.Knowpoints.length > 4) {
this.props.showNotification(`知识点最多选择5个`); this.props.showNotification(`知识点最多选择5个`);
return return
} }
@ -429,8 +429,8 @@ class Itembankstop extends Component {
} }
} }
const _result =[]; const _result = [];
this.state.knowledgepoints.filter(item => { this.state.knowledgepoints.filter(item => {
if (this.state.Knowpoints.findIndex(t => t.id === item.id) === -1) { if (this.state.Knowpoints.findIndex(t => t.id === item.id) === -1) {
// //console.log("guonue"); // //console.log("guonue");
// //console.log(item); // //console.log(item);
@ -456,22 +456,29 @@ class Itembankstop extends Component {
rbkc: value, rbkc: value,
}); });
this.setState({ this.setState({
rbkc:value, rbkc: value,
}) })
// //console.log("handleFormzhishidian"); // //console.log("handleFormzhishidian");
// //console.log(this.props.disciplinesdata); // //console.log(this.props.disciplinesdata);
const didata = this.props.disciplinesdata; const didata = this.props.disciplinesdata;
const knowledgepointsdata = []; const knowledgepointsdata = [];
var sub_disciplineslength = 0;
for (var i = 0; i < didata.length; i++) { for (var i = 0; i < didata.length; i++) {
//方向 //方向
if (value[0] === didata[i].id) { if (value[0] === didata[i].id) {
const fxdidata = didata[i].sub_disciplines; const fxdidata = didata[i].sub_disciplines;
try {
sub_disciplineslength = fxdidata.length;
} catch (e) {
}
for (var j = 0; j < fxdidata.length; j++) { for (var j = 0; j < fxdidata.length; j++) {
//课程 //课程
if (value[1] === fxdidata[j].id) { if (value[1] === fxdidata[j].id) {
const zsddata = fxdidata[j].tag_disciplines; const zsddata = fxdidata[j].tag_disciplines;
for (var k = 0; k < zsddata.length; k++) { for (var k = 0; k < zsddata.length; k++) {
//知识点 //知识点
knowledgepointsdata.push(zsddata[k]); knowledgepointsdata.push(zsddata[k]);
@ -490,7 +497,8 @@ class Itembankstop extends Component {
this.setState({ this.setState({
Knowpoints: [], Knowpoints: [],
knowledgepoints: knowledgepointsdata, knowledgepoints: knowledgepointsdata,
knowledgepoints2:knowledgepointsdata, knowledgepoints2: knowledgepointsdata,
sub_disciplineslength: sub_disciplineslength,
}) })
this.props.form.setFieldsValue({ this.props.form.setFieldsValue({
@ -521,8 +529,8 @@ class Itembankstop extends Component {
var tmp = this.state.Knowpoints; var tmp = this.state.Knowpoints;
for (var i = 0; i < tmp.length; i++) { for (var i = 0; i < tmp.length; i++) {
if (i ===index) { if (i === index) {
tmp.splice(i,1); tmp.splice(i, 1);
} }
} }
@ -530,7 +538,7 @@ class Itembankstop extends Component {
rbzsd: this.state.Knowpoints, rbzsd: this.state.Knowpoints,
}); });
const _result =[]; const _result = [];
this.state.knowledgepoints.filter(item => { this.state.knowledgepoints.filter(item => {
if (this.state.Knowpoints.findIndex(t => t.id === item.id) === -1) { if (this.state.Knowpoints.findIndex(t => t.id === item.id) === -1) {
_result.push(item); _result.push(item);
@ -538,7 +546,7 @@ class Itembankstop extends Component {
}); });
this.setState({ this.setState({
Knowpoints: this.state.Knowpoints, Knowpoints: this.state.Knowpoints,
knowledgepoints2:_result, knowledgepoints2: _result,
}) })
if (this.state.Knowpoints.length === 0) { if (this.state.Knowpoints.length === 0) {
this.setState({ this.setState({
@ -558,27 +566,32 @@ class Itembankstop extends Component {
} }
NewknTypedeldel=(bool)=>{ NewknTypedeldel = (bool) => {
if(this.state.rbkc===undefined || this.state.rbkc===null || this.state.rbkc===""){
if (this.state.rbkc === undefined || this.state.rbkc === null || this.state.rbkc === "") {
this.props.showNotification(`请选择课程方向`); this.props.showNotification(`请选择课程方向`);
return; return;
} }
// if(this.state.sub_disciplineslength===undefined || this.state.sub_disciplineslength===null || this.state.sub_disciplineslength===0){
// this.props.showNotification(`无二级课程时没有新建入口`);
// return;
// }
this.setState({ this.setState({
NewknTypedel:bool NewknTypedel: bool
}) })
} }
NewknTypedeltyoedel=(value)=>{ NewknTypedeltyoedel = (value) => {
var knowledgepointmys= this.state.knowledgepoints; var knowledgepointmys = this.state.knowledgepoints;
var konwbool=null; var konwbool = null;
for(let myda of knowledgepointmys) { for (let myda of knowledgepointmys) {
if(myda.name===value){ if (myda.name === value) {
konwbool="yes" konwbool = "yes"
break; break;
} }
} }
if(konwbool!=null){ if (konwbool != null) {
this.props.showNotification(`重复的知识点`); this.props.showNotification(`重复的知识点`);
this.setboolred(true); this.setboolred(true);
return return
@ -586,35 +599,35 @@ class Itembankstop extends Component {
if(value===null||value===""){ if (value === null || value === "") {
this.props.showNotification(`请输入知识点`); this.props.showNotification(`请输入知识点`);
this.setboolred(true); this.setboolred(true);
return return
} }
if(value.length===0){ if (value.length === 0) {
this.props.showNotification(`请输入知识点`); this.props.showNotification(`请输入知识点`);
this.setboolred(true); this.setboolred(true);
return return
} }
var data={ var data = {
name:value, name: value,
sub_discipline_id:this.state.rbkc[1] sub_discipline_id: this.state.rbkc[1]
} }
const url="/tag_disciplines.json"; const url = "/tag_disciplines.json";
axios.post(url,data) axios.post(url, data)
.then((result) => { .then((result) => {
if (result.data.status === 0) { if (result.data.status === 0) {
// this.props.showNotification(`新增知识点成功!`); // this.props.showNotification(`新增知识点成功!`);
var leydata={ var leydata = {
id: result.data.tag_discipline_id, id: result.data.tag_discipline_id,
name:value, name: value,
} }
if(this.state.Knowpoints.length>=5){ if (this.state.Knowpoints.length >= 5) {
this.state.knowledgepoints.push(leydata); this.state.knowledgepoints.push(leydata);
const _result =[]; const _result = [];
this.state.knowledgepoints.filter(item => { this.state.knowledgepoints.filter(item => {
if (this.state.Knowpoints.findIndex(t => t.id === item.id) === -1) { if (this.state.Knowpoints.findIndex(t => t.id === item.id) === -1) {
_result.push(item); _result.push(item);
@ -623,13 +636,13 @@ class Itembankstop extends Component {
this.setState({ this.setState({
Knowpoints: this.state.Knowpoints, Knowpoints: this.state.Knowpoints,
knowledgepoints: this.state.knowledgepoints, knowledgepoints: this.state.knowledgepoints,
knowledgepoints2: _result, knowledgepoints2: _result,
}) })
}else{ } else {
this.state.Knowpoints.push(leydata); this.state.Knowpoints.push(leydata);
this.state.knowledgepoints.push(leydata); this.state.knowledgepoints.push(leydata);
const _result =[]; const _result = [];
this.state.knowledgepoints.filter(item => { this.state.knowledgepoints.filter(item => {
if (this.state.Knowpoints.findIndex(t => t.id === item.id) === -1) { if (this.state.Knowpoints.findIndex(t => t.id === item.id) === -1) {
_result.push(item); _result.push(item);
@ -637,25 +650,25 @@ class Itembankstop extends Component {
}); });
this.setState({ this.setState({
Knowpoints: this.state.Knowpoints, Knowpoints: this.state.Knowpoints,
knowledgepoints: this.state.knowledgepoints, knowledgepoints: this.state.knowledgepoints,
knowledgepoints2: _result, knowledgepoints2: _result,
}) })
} }
} }
}).catch((error) => { }).catch((error) => {
////console.log(error); ////console.log(error);
}) })
this.setState({ this.setState({
NewknTypedel:false NewknTypedel: false
}) })
} }
render() { render() {
let {page, options,NewknTypedel,knowledgepoints,knowledgepoints2,Knowpoints} = this.state; let { page, options, NewknTypedel, knowledgepoints, knowledgepoints2, Knowpoints } = this.state;
const {getFieldDecorator} = this.props.form; const { getFieldDecorator } = this.props.form;
// //console.log("this.state.rbkc"); // //console.log("this.state.rbkc");
// //console.log(this.state.rbkc); // //console.log(this.state.rbkc);
@ -696,30 +709,31 @@ class Itembankstop extends Component {
</style> </style>
<div className="h12"></div> <div className="h12"></div>
{ {
NewknTypedel? NewknTypedel ?
<Newknledpots {...this.state} {...this.props} <Newknledpots {...this.state} {...this.props}
boolred={this.state.boolred} boolred={this.state.boolred}
setboolred={(bool)=>this.setboolred(bool)} setboolred={(bool) => this.setboolred(bool)}
NewknTypedeldel={(bool)=>this.NewknTypedeldel(bool)} NewknTypedeldel={(bool) => this.NewknTypedeldel(bool)}
NewknTypedeltyoedel={(value)=>this.NewknTypedeltyoedel(value)} NewknTypedeltyoedel={(value) => this.NewknTypedeltyoedel(value)}
></Newknledpots> ></Newknledpots>
:"" : ""
} }
<Form onSubmit={this.handleSubmit}> <Form onSubmit={this.handleSubmit}>
<div className="sortinxdirection"> <div className="sortinxdirection">
<Form.Item <Form.Item
label="课程" label="课程"
> >
{getFieldDecorator("rbkc", {getFieldDecorator("rbkc",
{initialValue: this.state.rbkc, {
rules: [{required: true, message: '请选择课程'}], initialValue: this.state.rbkc,
} rules: [{ required: true, message: '请选择课程' }],
)( }
)(
<<<<<<< HEAD <<<<<<< HEAD
<<<<<<< HEAD <<<<<<< HEAD
<Cascader style={{width: '270px'}} options={options} onChange={this.handleFormzhishidian} <Cascader style={{ width: '270px' }} options={options} onChange={this.handleFormzhishidian}
======= =======
<div className="sortinxdirection"> <div className="sortinxdirection">
<InputGroup > <InputGroup >
@ -729,17 +743,20 @@ class Itembankstop extends Component {
<Cascader style={{width: '270px'}} options={options} onChange={this.handleFormzhishidian} <Cascader style={{width: '270px'}} options={options} onChange={this.handleFormzhishidian}
>>>>>>> 1036126... 合并 >>>>>>> 1036126... 合并
placeholder="请选择..."/> placeholder="请选择..." />
)} )}
</Form.Item> </Form.Item>
</div> </div>
<Form.Item {
label="知识点" this.state.sub_disciplineslength === null || this.state.sub_disciplineslength === undefined || this.state.sub_disciplineslength === 0 ? "" :
> <Form.Item
{getFieldDecorator("rbzsd" label="知识点"
)( >
<div className="sortinxdirection"> {getFieldDecorator("rbzsd"
)(
<div className="sortinxdirection">
<<<<<<< HEAD
<<<<<<< HEAD <<<<<<< HEAD
<<<<<<< HEAD <<<<<<< HEAD
======= =======
@ -747,62 +764,77 @@ class Itembankstop extends Component {
>>>>>>> df308ab... 合并 >>>>>>> df308ab... 合并
======= =======
>>>>>>> 1036126... 合并 >>>>>>> 1036126... 合并
<Select style={{width: '270px'}} value={undefined} onChange={this.handleFormkechen} <Select style={{ width: '270px' }} value={undefined} onChange={this.handleFormkechen}
placeholder="请选择..."> placeholder="请选择...">
{knowledgepoints2 && knowledgepoints2.map((object, index) => { {knowledgepoints2 && knowledgepoints2.map((object, index) => {
return ( return (
<Option key={object.id} value={object.id}>{object.name}</Option> <Option key={object.id} value={object.id}>{object.name}</Option>
) )
})} })}
</Select> </Select>
=======
<Select style={{width: '270px'}} value={undefined} onChange={this.handleFormkechen}
placeholder="请选择...">
{knowledgepoints2 && knowledgepoints2.map((object, index) => {
return (
<Option key={object.id} value={object.id}>{object.name}</Option>
)
})}
</Select>
>>>>>>> f439a4a... 调整
<img className=" ml22 zjzsdian xiaoshou" src={getImageUrl("images/educoder/zjzsd.png")} onClick={()=>this.NewknTypedeldel(true)}/>
<img className=" ml22 zjzsdian xiaoshou" src={getImageUrl("images/educoder/zjzsd.png")} onClick={() => this.NewknTypedeldel(true)} />
</div>
)}
</Form.Item>
{
this.state.Knowpoints===undefined||this.state.Knowpoints===null?"":
this.state.Knowpoints.length>0?
<div className="sortinxdirection huanhan w100s mt15" style={{
minHeight: "33px",
lineHeight: "28px",
}}>
{this.state.Knowpoints === undefined ? "" : this.state.Knowpoints.map((object, index) => {
return (
<div key={index} className={index===0?"mytags mb20":"mytags"} style={{
position: "relative",
}}>
<p className="w100s stestcen lh32">{object.name}</p>
<img className=" ml7 zjzsdian xiaoshou icondowncolorssy" onClick={() => this.deletesobject(object, index)} src={getImageUrl("images/educoder/bzucha.png")}/> </div >
)
}
</Form.Item>
</div>
)
})}
</div>
:
""
} }
{
this.state.Knowpoints === undefined || this.state.Knowpoints === null ? "" :
this.state.Knowpoints.length > 0 ?
<div className="sortinxdirection huanhan w100s mt15" style={{
minHeight: "33px",
lineHeight: "28px",
}}>
{this.state.Knowpoints === undefined ? "" : this.state.Knowpoints.map((object, index) => {
return (
<div key={index} className={index === 0 ? "mytags mb20" : "mytags"} style={{
position: "relative",
}}>
<p className="w100s stestcen lh32">{object.name}</p>
<img className=" ml7 zjzsdian xiaoshou icondowncolorssy" onClick={() => this.deletesobject(object, index)} src={getImageUrl("images/educoder/bzucha.png")} />
</div>
)
})}
</div>
:
""
}
<Form.Item <Form.Item
label="题型" label="题型"
> >
{getFieldDecorator("rbtx", {getFieldDecorator("rbtx",
{initialValue: this.state.rbtx, {
rules: [{required: true, message: '请选择题型'}], initialValue: this.state.rbtx,
} rules: [{ required: true, message: '请选择题型' }],
)( }
)(
<<<<<<< HEAD <<<<<<< HEAD
<<<<<<< HEAD <<<<<<< HEAD
<Select style={{width: '270px'}} disabled={this.state.boolnews} onChange={this.handleFormtixing} <Select style={{ width: '270px' }} disabled={this.state.boolnews} onChange={this.handleFormtixing}
======= =======
<InputGroup > <InputGroup >
<Select style={{width: '270px'}} value={this.state.rbtx} onChange={this.handleFormtixing} <Select style={{width: '270px'}} value={this.state.rbtx} onChange={this.handleFormtixing}
@ -810,22 +842,22 @@ class Itembankstop extends Component {
======= =======
<Select style={{width: '270px'}} onChange={this.handleFormtixing} <Select style={{width: '270px'}} onChange={this.handleFormtixing}
>>>>>>> 1036126... 合并 >>>>>>> 1036126... 合并
placeholder="请选择..."> placeholder="请选择...">
<Option value="PROGRAM">编程题</Option> <Option value="PROGRAM">编程题</Option>
<Option value="SINGLE">单选题</Option> <Option value="SINGLE">单选题</Option>
<Option value="MULTIPLE">多选题</Option> <Option value="MULTIPLE">多选题</Option>
<Option value="JUDGMENT">判断题</Option> <Option value="JUDGMENT">判断题</Option>
<<<<<<< HEAD <<<<<<< HEAD
======= =======
>>>>>>> 1036126... 合并 >>>>>>> 1036126... 合并
</Select> </Select >
)} )}
</Form.Item> </Form.Item >
<style> <style>
{ {
` `
.rbndclass .ant-radio-button-wrapper{ .rbndclass .ant-radio-button-wrapper{
width:106px !important; width:106px !important;
height:33px !important; height:33px !important;
@ -874,26 +906,27 @@ class Itembankstop extends Component {
} }
` `
} }
</style> </style>
<div className="rbndclass"> <div className="rbndclass">
<Form.Item label="难度"> <Form.Item label="难度">
{getFieldDecorator('rbnd', {getFieldDecorator('rbnd',
{initialValue: this.state.rbnd, {
rules: [{required: true, message: '请选择难度'}], initialValue: this.state.rbnd,
} rules: [{ required: true, message: '请选择难度' }],
)( }
<Radio.Group onChange={this.handleFormLayoutChange}> )(
<Radio.Button value="1">简单</Radio.Button> <Radio.Group onChange={this.handleFormLayoutChange}>
<Radio.Button value="2">适中</Radio.Button> <Radio.Button value="1">简单</Radio.Button>
<Radio.Button value="3">困难</Radio.Button> <Radio.Button value="2">适中</Radio.Button>
</Radio.Group>, <Radio.Button value="3">困难</Radio.Button>
)} </Radio.Group>,
</Form.Item> )}
</div> </Form.Item>
</Form> </div>
<div className="h20"></div> </Form >
</div> <div className="h20"></div>
</div >
) )
} }
@ -901,5 +934,5 @@ class Itembankstop extends Component {
} }
const Itembankstops = Form.create({name: 'Itembankstops'})(Itembankstop); const Itembankstops = Form.create({ name: 'Itembankstops' })(Itembankstop);
export default Itembankstops; export default Itembankstops;

@ -17,6 +17,7 @@ const tagArrays = [
'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R',
'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z' 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z'
] ]
//Paperreview_single.js Paperlibraryseeid_items.js
class Listjihe extends Component { class Listjihe extends Component {
constructor(props) { constructor(props) {
super(props); super(props);
@ -162,7 +163,10 @@ class Listjihe extends Component {
} catch (e) { } catch (e) {
analysisnames = items && items.analysis; analysisnames = items && items.analysis;
} }
console.log(items.name);
console.log(itemsnamesy);
console.log(analysisnames);
return ( return (
<div key={keindex} <div key={keindex}
className={chakanjiexiboolindex === keindex ? "w100s borderwds283 pd20 mb20 listjihecolors" : "w100s borderwds pd20 mb20 listjihecolors"}> className={chakanjiexiboolindex === keindex ? "w100s borderwds283 pd20 mb20 listjihecolors" : "w100s borderwds pd20 mb20 listjihecolors"}>
@ -189,6 +193,140 @@ class Listjihe extends Component {
this.props.listjihe this.props.listjihe
}. }.
</div> </div>
{
items.item_type === "PROGRAM" ?
<a href={`/problems/${items.program_attr.identifier}/edit`}>
<div className="ml10 w100s " style={{ wordBreak: "break-word" }} dangerouslySetInnerHTML={{ __html: markdownToHTML(items && items.name).replace(/▁/g, "▁▁▁") }}></div>
</a>
:
<div className="ml10 w100s markdown-body" style={{ wordBreak: "break-word" }}>
{items === undefined || items === null || items === "" ? "" :
items.name === undefined || items.name === null || items.name === "" ?
""
:
items.name.length > 0 ?
itemssname === null || itemssname === undefined ? "" :
<QuillForEditor
readOnly={true}
value={itemssname}
/>
: ""
}
</div>
}
</div>
{/*内容*/}
<div className="w100s sortinxdirection ">
{items.item_type === "JUDGMENT" ?
<p className="w100s listjihetixingstitsp sortinxdirection ">
{
items === undefined || items === null ? "" : items.choices.map((object, index) => {
return (
<p className={index === 1 ? "sortinxdirection ml10" : "sortinxdirection "}>
<Radio disabled={true} >
{object.choice_text}
</Radio>
</p>
)
})
}
</p> :
items.item_type === "PROGRAM" ?
<p className="w100s listjihetixingstitssy sortinxdirection ">
<p id={"itemsnamesyid"} className={"sortinxdirection mt15"}>
{
items && items.program_attr && items.program_attr.description ?
<p className="programquill" style={{ wordBreak: "break-word" }}
>
{
itemsnamesy === null || itemsnamesy === undefined ?
""
:
<QuillForEditor
readOnly={true}
value={itemsnamesy}
/>
}
</p>
: ""
}
</p>
</p>
:
<p className="w100s listjihetixingstitsp verticallayout ">
{
items === undefined || items === null ? "" : items.choices.map((object, index) => {
var string = ""
try {
string = JSON.parse(object.choice_text);
} catch (e) {
string = object.choice_text;
}
return (
<p className={index === 0 ? "sortinxdirection " : "sortinxdirection mt15 "}>
<p className="lh20s">{tagArray[index]}</p>
<p className="programquill" style={{ wordBreak: "break-word" }}>
{object ?
object.choice_text === undefined || object.choice_text === null || object.choice_text === "" ?
""
:
object.choice_text.length > 0 ?
<QuillForEditor
readOnly={true}
value={string}
/>
: ""
:
""
}
</p>
</p>
)
})
}
</p>
}
</div>
<div className="w100s sortinxdirection mt10">
<p
className="listjihetixing">难度<span>{items.difficulty === 1 ? "简单" : items.difficulty === 2 ? "适中" : items.difficulty === 3 ? "困难" : ""}</span>
</p>
<p
className="ml30 listjihetixing">题型<span>{items.item_type === "SINGLE" ? "单选题" : items.item_type === "MULTIPLE" ? "多选题" : items.item_type === "JUDGMENT" ? "判断题" : items.item_type === "PROGRAM" ? "编程题" : ""}</span>
</p>
</div>
{/*更新时间*/}
<div className="w100s sortinxdirection">
<div className="w50s listjihetixingstit sortinxdirection">
<p className="updatetimes lh30">更新时间{items.update_time}</p>
{
this.props.defaultActiveKey === "0" || this.props.defaultActiveKey === 0 ?
""
:
<p className="updatetimes lh30 ml45">创建者{items.author.name}</p>
}
{
items.item_type === "PROGRAM" ?
<p className="updatetimes lh30 ml45">编程语言{items.program_attr.language}</p>
: ""
}
{
items.item_type === "PROGRAM" ?
items.program_attr.status === 0 ?
<p className="updatetimes lh30 ml45 nofabu mt5">未发布</p>
: ""
: ""
}
</div>
<div className="w50s xaxisreverseorder"> <div className="w50s xaxisreverseorder">
{ {
items.choosed === true ? items.choosed === true ?
@ -198,10 +336,13 @@ class Listjihe extends Component {
: :
items.item_type === "PROGRAM" ? items.item_type === "PROGRAM" ?
items.program_attr.status === 0 ? items.program_attr.status === 0 ?
<p className="selectionys jinzhixiaoshou" > <Tooltip placement="top" title={"编程题未发布,不能选用!"}>
<i className="iconfont icon-tianjiadaohang font-12 lg ml7 lh30 icontianjiadaohangcolor mr5"></i> <p className="selectionys jinzhixiaoshou">
<span className="mr15 lh30">选用</span> <i className="iconfont icon-tianjiadaohang font-12 lg ml7 lh30 icontianjiadaohangcolor mr5"></i>
</p> <span className="mr15 lh30">选用</span>
</p>
</Tooltip>
: :
<p className="selection xiaoshou" onClick={() => this.Selectingpracticaltraining(items.id)}> <p className="selection xiaoshou" onClick={() => this.Selectingpracticaltraining(items.id)}>
<i className="iconfont icon-tianjiadaohang font-12 lg ml7 lh30 icontianjiadaohangcolor mr5"></i> <i className="iconfont icon-tianjiadaohang font-12 lg ml7 lh30 icontianjiadaohangcolor mr5"></i>
@ -222,35 +363,56 @@ class Listjihe extends Component {
</p> </p>
{ {
items.item_type === "PROGRAM" ? items.item_type === "PROGRAM" ?
<a href={`/problems/${items.program_attr.identifier}/edit`}> this.props.Isitapopup && this.props.Isitapopup === "true" ?
<p className="viewparsings xiaoshou mr25" > ""
<i className="iconfont icon-bianji2 font-17 lg ml7 lh30 icontianjiadaohangcolors mr5"></i> :
<span>编辑</span> <a target="_blank" href={`/problems/${items.program_attr.identifier}/edit`}>
</p> <p className="viewparsings xiaoshou mr25">
</a> <i className="iconfont icon-bianji2 font-17 lg ml7 lh30 icontianjiadaohangcolors mr5"></i>
<span>编辑</span>
</p>
</a>
: :
<a href={`/question/edit/${items.id}`}> this.props.Isitapopup && this.props.Isitapopup === "true" ?
<p className="viewparsings xiaoshou mr25" > ""
<i className="iconfont icon-bianji2 font-17 lg ml7 lh30 icontianjiadaohangcolors mr5"></i> :
<span>编辑</span> <a href={`/question/edit/${items.id}`}>
</p> <p className="viewparsings xiaoshou mr25">
</a> <i className="iconfont icon-bianji2 font-17 lg ml7 lh30 icontianjiadaohangcolors mr5"></i>
<span>编辑</span>
</p>
</a>
} }
{ {
items.public === false ? items.public === false ?
items.item_type === "PROGRAM" ? items.item_type === "PROGRAM" ?
items.program_attr.status === 0 ? (
"" items.program_attr.status === 0 ?
: ""
:
items.apply === false ?
<p className="viewparsings xiaoshou mr25" onClick={() => this.props.showmodels(items.id)}>
<i className="iconfont icon-gongkai font-17 lg ml7 lh30 icontianjiadaohangcolors mr5"></i>
<span>公开</span>
</p>
:
(
items.public == true ?
""
:
<p className="viewparsings xiaoshou mr25" onClick={(e) => this.props.showmodelsInaudit(e)}>
<i className="iconfont icon-gongkai font-17 lg ml7 lh30 icontianjiadaohangcolors mr5"></i>
<span>公开审核中</span>
</p>
)
)
: items.apply === false ?
<p className="viewparsings xiaoshou mr25" onClick={() => this.props.showmodels(items.id)}> <p className="viewparsings xiaoshou mr25" onClick={() => this.props.showmodels(items.id)}>
<i className="iconfont icon-gongkai font-17 lg ml7 lh30 icontianjiadaohangcolors mr5"></i> <i className="iconfont icon-gongkai font-17 lg ml7 lh30 icontianjiadaohangcolors mr5"></i>
<span>公开</span> <span>公开</span>
</p> </p>
: :
<p className="viewparsings xiaoshou mr25" onClick={() => this.props.showmodels(items.id)}> ""
<i className="iconfont icon-gongkai font-17 lg ml7 lh30 icontianjiadaohangcolors mr5"></i>
<span>公开</span>
</p>
: :
"" ""
} }
@ -275,24 +437,33 @@ class Listjihe extends Component {
<div className="w100s questiontypeheng mt23"> <div className="w100s questiontypeheng mt23">
</div> </div>
<div className=" sortinxdirection mt15 yldxtit" > <div className=" sortinxdirection mt15 yldxtit">
{ {
items.item_type === "SINGLE" || items.item_type === "MULTIPLE" ? items.item_type === "SINGLE" ?
<p className=" testfondex yldxtit" <p className=" testfondex yldxtit"
style={{ wordBreak: "break-word" }} dangerouslySetInnerHTML={{ __html: markdownToHTML("答案:" + tagArrays[rightkey]).replace(/▁/g, "▁▁▁") }} style={{ wordBreak: "break-word" }}
> dangerouslySetInnerHTML={{ __html: markdownToHTML("答案:" + tagArrays[rightkey]).replace(/▁/g, "▁▁▁") }}
</p>
:
<p className=" testfondex yldxtit"
style={{ wordBreak: "break-word" }} dangerouslySetInnerHTML={{ __html: markdownToHTML("答案:" + rightkey).replace(/▁/g, "▁▁▁") }}
> >
</p> </p>
: items.item_type === "MULTIPLE" ?
<p className=" testfondex yldxtit"
style={{ wordBreak: "break-word" }}
dangerouslySetInnerHTML={{ __html: markdownToHTML("答案:" + MULTIPLEkey).replace(/▁/g, "▁▁▁") }}
>
</p>
:
<p className=" testfondex yldxtit"
style={{ wordBreak: "break-word" }}
dangerouslySetInnerHTML={{ __html: markdownToHTML("答案:" + rightkey).replace(/▁/g, "▁▁▁") }}
>
</p>
} }
</div> </div>
<div className=" sortinxdirection mt15 yldxtit"> <div className=" sortinxdirection mt15 yldxtit">
<p className=" testfondex yldxtit programquill" <p id={"analysisnamesid"} className=" testfondex yldxtit programquill"
style={{ wordBreak: "break-word" }} style={{ wordBreak: "break-word" }}
> >
{items ? {items ?
@ -301,11 +472,12 @@ class Listjihe extends Component {
"" ""
: :
items.analysis.length > 0 ? items.analysis.length > 0 ?
<QuillForEditor analysisnames === null || analysisnames === undefined ? "" :
imgAttrs={{ width: '60px', height: '30px' }} <QuillForEditor
readOnly={true} imgAttrs={{ width: '60px', height: '30px' }}
value={analysisnames} readOnly={true}
/> value={analysisnames}
/>
: :
"" ""
: :

@ -12,7 +12,15 @@ class PaperDeletModel extends Component {
newkntypeinput:"" newkntypeinput:""
} }
} }
isNull=( str )=>{
if ( str == "" ) return true;
var regu = "^[ ]+$";
var re = new RegExp(regu);
//为空或纯空格为 true    有值为false
console.log(re.test(str))
return re.test(str);
}
handleChange=(e)=>{ handleChange=(e)=>{
// this.setState({ // this.setState({
@ -20,6 +28,10 @@ class PaperDeletModel extends Component {
// }) // })
// //console.log(e.target.value); // //console.log(e.target.value);
// //console.log(e.target.value.length); // //console.log(e.target.value.length);
if(this.isNull(e.target.value)===true){
this.props.showNotification('不能输入空格');
return
}
this.setState({ this.setState({
newkntypeinput: e.target.value newkntypeinput: e.target.value
}) })
@ -60,7 +72,7 @@ class PaperDeletModel extends Component {
> >
<div className="educouddiv"> <div className="educouddiv">
<div className={this.props.boolred===true?"tabeltext-alignleft mt10 inpustred":"tabeltext-alignleft mt10"}> <div className={this.props.boolred===true?"tabeltext-alignleft mt10 inpustred":"tabeltext-alignleft mt10"}>
<Input onInput={this.handleChange} maxLength={16} onBlur={this.mysinputOnBlur } onFocus={this.inputOnFocus }/> <Input onInput={this.handleChange} maxLength={15} onBlur={this.mysinputOnBlur } onFocus={this.inputOnFocus }/>
</div> </div>
<div className="clearfix mt30 edu-txt-center"> <div className="clearfix mt30 edu-txt-center">
<a className="task-btn mr30 w80" onClick={()=>this.props.NewknTypedeldel(false)}>取消</a> <a className="task-btn mr30 w80" onClick={()=>this.props.NewknTypedeldel(false)}>取消</a>

@ -0,0 +1,42 @@
import React, { Component } from 'react';
import {getImageUrl} from 'educoder';
import { Modal} from 'antd';
import axios from 'axios';
import './../questioncss/questioncom.css'
//立即申请试用
class QuestionModalys extends Component {
constructor(props) {
super(props);
this.state={
}
}
render() {
return(
<Modal
keyboard={false}
closable={false}
footer={null}
destroyOnClose={true}
title="提示"
centered={true}
visible={this.props.modalsType===undefined?false:this.props.modalsType}
width="442px"
>
<div className="educouddiv">
<div className={"tabeltext-alignleft mt10"}><p className="titiles">{this.props.titilesm}</p></div>
<div className={"tabeltext-alignleft mt10"}><p className="titiles">{this.props.titiless}</p></div>
<div className="clearfix mt30 edu-txt-center">
<a className="task-btn task-btn-orange w80" onClick={()=>this.props.setDownload()}>知道啦</a>
</div>
</div>
</Modal>
)
}
}
export default QuestionModalys;

@ -41,7 +41,7 @@ const options = [
], ],
}, },
]; ];
//Itembankstop 题库的 //Itembankstop Intelligentcomponents 题库的
class Comthetestpaperst extends Component { class Comthetestpaperst extends Component {
constructor(props) { constructor(props) {
super(props); super(props);
@ -56,6 +56,7 @@ class Comthetestpaperst extends Component {
options: [], options: [],
NewknTypedel: false, NewknTypedel: false,
boolred: false, boolred: false,
sub_disciplineslength: 1,
} }
} }
setboolred = (bool) => { setboolred = (bool) => {
@ -413,11 +414,16 @@ class Comthetestpaperst extends Component {
const didata = this.props.disciplinesdata; const didata = this.props.disciplinesdata;
const knowledgepointsdata = []; const knowledgepointsdata = [];
var sub_disciplineslength = 0;
for (var i = 0; i < didata.length; i++) { for (var i = 0; i < didata.length; i++) {
//方向 //方向
if (value[0] === didata[i].id) { if (value[0] === didata[i].id) {
const fxdidata = didata[i].sub_disciplines; const fxdidata = didata[i].sub_disciplines;
try {
sub_disciplineslength = fxdidata.length;
} catch (e) {
}
for (var j = 0; j < fxdidata.length; j++) { for (var j = 0; j < fxdidata.length; j++) {
//课程 //课程
if (value[1] === fxdidata[j].id) { if (value[1] === fxdidata[j].id) {
@ -441,6 +447,7 @@ class Comthetestpaperst extends Component {
Knowpoints: [], Knowpoints: [],
knowledgepoints: knowledgepointsdata, knowledgepoints: knowledgepointsdata,
knowledgepoints2: knowledgepointsdata, knowledgepoints2: knowledgepointsdata,
sub_disciplineslength: sub_disciplineslength,
}) })
this.props.form.setFieldsValue({ this.props.form.setFieldsValue({
@ -687,34 +694,39 @@ class Comthetestpaperst extends Component {
</Form.Item> </Form.Item>
</div> </div>
</div> </div>
<div className="zsdd"> {
<Form.Item this.state.sub_disciplineslength === null || this.state.sub_disciplineslength === undefined || this.state.sub_disciplineslength === 0 ? "" :
label="知识点"
>
{getFieldDecorator("rbzsd"
)(
<div className="sortinxdirection">
<InputGroup compact>
<Select style={{ width: '258px' }} value={undefined} onChange={this.handleFormkechen}
placeholder="请选择...">
{knowledgepoints2 && knowledgepoints2.map((object, index) => {
return (
<Option key={object.id} value={object.id}>{object.name}</Option>
)
})}
</Select>
</InputGroup>
<div className="zsdd">
<Form.Item
label="知识点"
>
{getFieldDecorator("rbzsd"
)(
<div className="sortinxdirection">
<InputGroup compact>
<Select style={{ width: '258px' }} value={undefined} onChange={this.handleFormkechen}
placeholder="请选择...">
{knowledgepoints2 && knowledgepoints2.map((object, index) => {
return (
<Option key={object.id} value={object.id}>{object.name}</Option>
)
})}
</Select>
</InputGroup>
<img className=" ml22 zjzsdian xiaoshou" src={getImageUrl("images/educoder/zjzsd.png")} onClick={() => this.NewknTypedeldel(true)} />
<img className=" ml22 zjzsdian xiaoshou" src={getImageUrl("images/educoder/zjzsd.png")} onClick={() => this.NewknTypedeldel(true)} />
</div>
)} </div>
</Form.Item> )}
</div> </Form.Item>
</div>
}
{ {
this.state.Knowpoints === undefined || this.state.Knowpoints === null ? "" : this.state.Knowpoints === undefined || this.state.Knowpoints === null ? "" :
this.state.Knowpoints.length > 0 ? this.state.Knowpoints.length > 0 ?

@ -20,7 +20,9 @@ import Newknledpots from '../component/Newknledpots';
import Ldanxuan from './lntlligentpone'; import Ldanxuan from './lntlligentpone';
const InputGroup = Input.Group; const InputGroup = Input.Group;
const {Option} = Select; const {Option} = Select;
//Itembankstop Comthetestpaperst 题库的 // Comthetestpaperst 题库的
// Itembankstop 题库的
class Intelligentcomponents extends Component { class Intelligentcomponents extends Component {
constructor(props) { constructor(props) {
super(props); super(props);
@ -35,7 +37,8 @@ class Intelligentcomponents extends Component {
options: [], options: [],
NewknTypedel:false, NewknTypedel:false,
boolred:false, boolred:false,
rbly:"1" rbly:"1",
sub_disciplineslength:1,
} }
} }
setboolred=(bool)=>{ setboolred=(bool)=>{
@ -310,11 +313,16 @@ class Intelligentcomponents extends Component {
const didata = this.props.disciplinesdata; const didata = this.props.disciplinesdata;
const knowledgepointsdata = []; const knowledgepointsdata = [];
var sub_disciplineslength=0;
for (var i = 0; i < didata.length; i++) { for (var i = 0; i < didata.length; i++) {
//方向 //方向
if (value[0] === didata[i].id) { if (value[0] === didata[i].id) {
const fxdidata = didata[i].sub_disciplines; const fxdidata = didata[i].sub_disciplines;
try {
sub_disciplineslength=fxdidata.length;
}catch (e) {
}
for (var j = 0; j < fxdidata.length; j++) { for (var j = 0; j < fxdidata.length; j++) {
//课程 //课程
if (value[1] === fxdidata[j].id) { if (value[1] === fxdidata[j].id) {
@ -597,34 +605,38 @@ class Intelligentcomponents extends Component {
</Form.Item> </Form.Item>
</div> </div>
</div> </div>
<div className="zsdd"> {
<Form.Item this.state.sub_disciplineslength === null || this.state.sub_disciplineslength === undefined || this.state.sub_disciplineslength === 0 ? "" :
label="知识点" <div className="zsdd">
> <Form.Item
{getFieldDecorator("rbzsd" label="知识点"
)( >
<div className="sortinxdirection"> {getFieldDecorator("rbzsd"
<InputGroup compact> )(
<Select style={{width: '258px'}} value={undefined} onChange={this.handleFormkechen} <div className="sortinxdirection">
placeholder="请选择..."> <InputGroup compact>
{knowledgepoints2 && knowledgepoints2.map((object, index) => { <Select style={{width: '258px'}} value={undefined} onChange={this.handleFormkechen}
return ( placeholder="请选择...">
<Option key={object.id} value={object.id}>{object.name}</Option> {knowledgepoints2 && knowledgepoints2.map((object, index) => {
) return (
})} <Option key={object.id} value={object.id}>{object.name}</Option>
</Select> )
</InputGroup> })}
</Select>
</InputGroup>
<img className=" ml22 zjzsdian xiaoshou" src={getImageUrl("images/educoder/zjzsd.png")} onClick={()=>this.NewknTypedeldel(true)}/>
<img className=" ml22 zjzsdian xiaoshou" src={getImageUrl("images/educoder/zjzsd.png")} onClick={()=>this.NewknTypedeldel(true)}/>
</div>
)}
</Form.Item>
</div>
}
</div>
)}
</Form.Item>
</div>
{ {
this.state.Knowpoints===undefined||this.state.Knowpoints===null?"": this.state.Knowpoints===undefined||this.state.Knowpoints===null?"":
this.state.Knowpoints.length>0? this.state.Knowpoints.length>0?

@ -992,17 +992,30 @@
cursor: no-drop cursor: no-drop
} }
.shitilang { .mr15 {
height: 40px; margin-right: 15px;
background: #606060; }
color: #FFFFFF;
position: absolute; .ant-modal-mask {
top: -2px; z-index: 6000 !important;
}
.ant-modal-wrap {
z-index: 6000 !important;
}
.fangdatwo {
background: #fefefe;
background-color: #fefefe;
height: 100%;
overflow-y: scroll !important;
width: 100%; width: 100%;
position: fixed;
top: 0px;
bottom: 0px;
left: 0px; left: 0px;
font-size: 14px; z-index: 5000;
text-align: center; right: 0px;
line-height: 40px;
} }
.xiaoshoums:hover { .xiaoshoums:hover {

@ -21,7 +21,7 @@ class Testpaperlibrary extends Component {
public: null, public: null,
difficulty: null, difficulty: null,
item_type: null, item_type: null,
keywords: null, keyword: null,
page: 1, page: 1,
per_page: 10, per_page: 10,
booljupyterurls: false, booljupyterurls: false,
@ -81,7 +81,7 @@ class Testpaperlibrary extends Component {
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,
keywords: null, keyword: null,
per_page: 10, per_page: 10,
} }
this.getdata(data); this.getdata(data);
@ -89,14 +89,14 @@ class Testpaperlibrary extends Component {
setdatafunsval = (e) => { setdatafunsval = (e) => {
this.setState({ this.setState({
keywords: e.target.value keyword: e.target.value
}) })
} }
setdatafuns = (value) => { setdatafuns = (value) => {
this.setState({ this.setState({
keywords: value, keyword: value,
}) })
var data = { var data = {
page: this.state.page, page: this.state.page,
@ -105,7 +105,7 @@ class Testpaperlibrary extends Component {
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,
keywords: value, keyword: value,
per_page: 10, per_page: 10,
} }
this.getdata(data); this.getdata(data);
@ -114,7 +114,7 @@ class Testpaperlibrary extends Component {
this.setState({ this.setState({
defaultActiveKey: key, defaultActiveKey: key,
difficulty: null, difficulty: null,
keywords: null, keyword: null,
page: 1, page: 1,
}) })
var data = { var data = {
@ -124,7 +124,7 @@ class Testpaperlibrary extends Component {
tag_discipline_id: this.state.tag_discipline_id, tag_discipline_id: this.state.tag_discipline_id,
public: key, public: key,
difficulty: null, difficulty: null,
keywords: null, keyword: null,
per_page: 10, per_page: 10,
} }
this.getdata(data); this.getdata(data);
@ -170,7 +170,7 @@ class Testpaperlibrary extends Component {
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: null, keyword: null,
page: 1, page: 1,
per_page: 10, per_page: 10,
}) })
@ -180,7 +180,7 @@ class Testpaperlibrary extends Component {
tag_discipline_id: null, tag_discipline_id: null,
public: this.state.defaultActiveKey, public: this.state.defaultActiveKey,
difficulty: this.props.difficulty, difficulty: this.props.difficulty,
keywords: null, keyword: null,
page: 1, page: 1,
per_page: 10, per_page: 10,
}; };
@ -191,7 +191,7 @@ class Testpaperlibrary extends Component {
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: null, keyword: null,
page: 1, page: 1,
per_page: 10, per_page: 10,
}) })
@ -201,7 +201,7 @@ class Testpaperlibrary extends Component {
tag_discipline_id: null, tag_discipline_id: null,
public: this.state.defaultActiveKey, public: this.state.defaultActiveKey,
difficulty: this.state.difficulty, difficulty: this.state.difficulty,
keywords: null, keyword: null,
page: 1, page: 1,
per_page: 10, per_page: 10,
}; };
@ -211,7 +211,7 @@ class Testpaperlibrary extends Component {
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: null, keyword: null,
page: 1, page: 1,
per_page: 10, per_page: 10,
}) })
@ -221,7 +221,7 @@ class Testpaperlibrary extends Component {
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,
keywords: null, keyword: null,
page: 1, page: 1,
per_page: 10, per_page: 10,
}; };
@ -277,7 +277,7 @@ class Testpaperlibrary extends Component {
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,
keywords: this.state.keywords, keyword: this.state.keywords,
page: this.state.page, page: this.state.page,
per_page: 10, per_page: 10,
}; };
@ -303,7 +303,7 @@ class Testpaperlibrary extends Component {
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,
keywords: this.state.keywords, keyword: this.state.keywords,
page: this.state.page, page: this.state.page,
per_page: 10, per_page: 10,
}; };
@ -318,7 +318,7 @@ 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
@ -346,7 +346,7 @@ class Testpaperlibrary extends Component {
this.setState({ this.setState({
difficulty: difficulty, difficulty: difficulty,
visiblemys: false, visiblemys: false,
keywords: "", keyword: "",
page: 1, page: 1,
per_page: 10, per_page: 10,
}) })
@ -357,7 +357,7 @@ class Testpaperlibrary extends Component {
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,
keywords: null, keyword: null,
page: 1, page: 1,
per_page: 10, per_page: 10,
}; };
@ -372,7 +372,7 @@ class Testpaperlibrary extends Component {
this.setState({ this.setState({
item_type: item_type, item_type: item_type,
visiblemyss: false, visiblemyss: false,
keywords: null, keyword: null,
page: 1, page: 1,
per_page: 10, per_page: 10,
}) })
@ -384,7 +384,7 @@ class Testpaperlibrary extends Component {
public: this.state.defaultActiveKey, public: this.state.defaultActiveKey,
difficulty: this.state.difficulty, difficulty: this.state.difficulty,
item_type: item_type, item_type: item_type,
keywords: "", keyword: "",
page: 1, page: 1,
per_page: 10, per_page: 10,
}; };

@ -80,7 +80,7 @@ class Listjihe extends Component {
<img src={getImageUrl("images/educoder/shijuans.png")} className="imgtp"/> <img src={getImageUrl("images/educoder/shijuans.png")} className="imgtp"/>
</div> </div>
<div className="w100s verticallayout ml20" > <div className="w100s verticallayout ml20" >
<div className="w100s " > <p className="sjtitle xiaoshou" onClick={()=>this.gotoseesj(items.id)}>{names}</p></div> <div className="w100s " > <a className="sjtitle xiaoshou " title={names} onClick={()=>this.gotoseesj(items.id)}><p className="maxnamewidth100s">{names}</p></a></div>
<div className="w100s sortinxdirection mt9"> <div className="w100s sortinxdirection mt9">
<p className="sjtitles">试题数<span >{question_counts}</span></p> <p className="sjtitles">试题数<span >{question_counts}</span></p>
<p className="sjtitles ml48">总分<span >{total_scores}</span></p> <p className="sjtitles ml48">总分<span >{total_scores}</span></p>
@ -92,9 +92,15 @@ class Listjihe extends Component {
更新时间<span>{update_times}</span> 更新时间<span>{update_times}</span>
</p> </p>
<p className='sjtitlesysl ml30'> {
使用次数<span>{quotess}</span> quotess===null||quotess===undefined||quotess===0?
</p> ""
:
<p className='sjtitlesysl ml30'>
使用次数<span>{quotess}</span>
</p>
}
{ {
defaultActiveKey===1||defaultActiveKey==="1"? defaultActiveKey===1||defaultActiveKey==="1"?
<p className='sjtitlesysl ml30'> <p className='sjtitlesysl ml30'>

@ -14,6 +14,7 @@ const tagArray = [
] ]
//单选题 //单选题
//Paperreview_single.js Listjihe.js
class Paperlibraryseeid_items extends Component { class Paperlibraryseeid_items extends Component {
constructor(props) { constructor(props) {
super(props); super(props);
@ -153,10 +154,16 @@ class Paperlibraryseeid_items extends Component {
</div> </div>
<div className="ml10 lh28 listjihetixingstit cretitlecolrlist programquill" style={{ wordBreak: "break-word" }} <div className="ml10 lh28 listjihetixingstit cretitlecolrlist programquill" style={{ wordBreak: "break-word" }}
> >
<QuillForEditor {
readOnly={true} itemssname===null || itemssname===undefined?
value={itemssname} ""
/> :
<QuillForEditor
readOnly={true}
value={itemssname}
/>
}
</div> </div>
</div> </div>
@ -189,10 +196,16 @@ class Paperlibraryseeid_items extends Component {
objectsingle && objectsingle.program_attr && objectsingle.program_attr.description ? objectsingle && objectsingle.program_attr && objectsingle.program_attr.description ?
<p className="programquill" style={{ wordBreak: "break-word" }} <p className="programquill" style={{ wordBreak: "break-word" }}
> >
<QuillForEditor {
itemsnamesy===null|| itemsnamesy===undefined?
""
:
<QuillForEditor
readOnly={true} readOnly={true}
value={itemsnamesy} value={itemsnamesy}
/> />
}
</p> </p>
: :
""} ""}

@ -927,3 +927,10 @@
color:rgba(51,51,51,1); color:rgba(51,51,51,1);
line-height:19px; line-height:19px;
} }
.maxnamewidth100s{
max-width: 774px;
overflow:hidden;
text-overflow:ellipsis;
white-space:nowrap;
cursor: default;
}

@ -784,10 +784,9 @@ class NewHeader extends Component {
width: '93px', width: '93px',
height: '80px', height: '80px',
}}> }}>
<a href={'/question'} ><p className="questiontype">试题库</p></a> <a href={'/question'} className={"popovertests"} ><p className="questiontype">试题库</p></a>
<p className="questiontypeheng"></p>
<a href={'/paperlibrary'} ><p className="questiontype">试卷库</p></a>
<p className="questiontypeheng"></p> <p className="questiontypeheng"></p>
<a href={'/paperlibrary'} className={"popovertests"} ><p className="questiontype">试卷库</p></a>
</div> </div>
); );
return ( return (
@ -795,7 +794,7 @@ class NewHeader extends Component {
<div className="newHeaders" id="nHeader" > <div className="newHeaders" id="nHeader" >
<style>{ <style>{
` `
body .questionbanks .ant-popover-inner-content { body #yslpopovers .ant-popover-inner-content{
padding:0px !important; padding:0px !important;
} }
` `
@ -881,6 +880,12 @@ class NewHeader extends Component {
<style> <style>
{ {
` `
.questiontype{
color:#010101 !important;
}
.popovertests{
color:#010101 !important;
}
.queyppors { .queyppors {
top: 63px !important; top: 63px !important;
} }
@ -891,17 +896,17 @@ class NewHeader extends Component {
` `
} }
</style> </style>
{/*<li className={`pr questionbanks`}>*/} <li className={`pr questionbanks`} >
{/* <Popover placement="bottom" content={contents} trigger="click" >*/} <Popover className="queyppors" id={"yslpopovers"} placement="bottom" content={contents} trigger="click" >
{/* <div className=" sortinxdirection mr10">*/} <div className=" sortinxdirection mr10">
{/* <div style={{*/} <div style={{
{/* color:"#fff"*/} color: "#fff"
{/* }}>*/} }}>
{/* 题库*/} 题库
{/* </div>*/} </div>
{/* </div>*/} </div>
{/* </Popover>*/} </Popover>
{/*</li>*/} </li>
<li <li
style={{ display: this.props.Headertop === undefined ? 'none' : this.props.Headertop.auth === null ? 'none' : 'block' }} style={{ display: this.props.Headertop === undefined ? 'none' : this.props.Headertop.auth === null ? 'none' : 'block' }}
@ -995,8 +1000,8 @@ class NewHeader extends Component {
<style> <style>
{ {
` `
.posi - searchs{ .posi-searchs{
opacity: 1; opacity: 1;
position: absolute; position: absolute;
top: -2px; top: -2px;
background: #fff; background: #fff;

Loading…
Cancel
Save