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),
@ -683,6 +710,62 @@ class NewMyShixunModel extends Component {
}) })
} }
// 撤销 // 撤销
getitem_basketss = (id) => {
let url = "";
if (this.props.exam_id === undefined) {
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 {
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) => { getitem_basketss = (id) => {
let url = ""; let url = "";
if (this.props.exam_id === undefined) { if (this.props.exam_id === undefined) {
@ -706,7 +789,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),
@ -809,15 +892,30 @@ Deletebigquestiontype = (item_type) => {
this.getbasket_listdata(); 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,
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() {
gotopaperreview = () => { let {
page, per_page, items_count, Headertop, visible, placement, modalsType, modalsTypes, basket_list,
completion_questions_count, judgement_questions_count, multiple_questions_count, practical_questions_count,
program_questions_count, single_questions_count, subjective_questions_count, selectionbools,
modalsTypeInaudit
} = this.state;
this.props.history.replace("/paperreview"); this.props.history.replace("/paperreview");
@ -909,7 +1007,12 @@ render() {
setDownload={() => this.setDownload()}></QuestionModal> setDownload={() => this.setDownload()}></QuestionModal>
: "" : ""
} }
{
modalsTypeInaudit === true ?
<QuestionModalys {...this.props}{...this.state} modalsType={modalsTypeInaudit} modalCancel={() => this.modalsTypeInauditbool()}
setDownload={() => this.modalsTypeInauditbool()}></QuestionModalys>
: ""
}
{/*顶部*/} {/*顶部*/}
<Headplugselections <Headplugselections
@ -926,6 +1029,8 @@ render() {
<Contentpart {...this.state} {...this.props} <Contentpart {...this.state} {...this.props}
exam_id={this.props.exam_id} exam_id={this.props.exam_id}
Isitapopup={"true"} Isitapopup={"true"}
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)}
@ -936,7 +1041,10 @@ render() {
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 ?

@ -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" }}
> >
{
itemssname === null || itemssname === undefined ?
""
:
<QuillForEditor <QuillForEditor
readOnly={true} readOnly={true}
value={itemssname} 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" }}
> >
{
itemsnamesy === null || itemsnamesy === undefined ?
""
:
<QuillForEditor <QuillForEditor
readOnly={true} readOnly={true}
value={itemsnamesy} 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`;
if (bool) {
this.setState({
selectionbools: false,
})
} else {
this.setState({ this.setState({
booljupyterurls: true, booljupyterurls: true,
selectionbools: false, selectionbools: false,
}) })
}
axios.get((url), { params: data }).then((response) => { axios.get((url), { params: data }).then((response) => {
setTimeout(() => { setTimeout(() => {
this.setState({ this.setState({
@ -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(
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"}> <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)}> <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> </Dropdown>
:
<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>
) )
}) })
} }

@ -58,7 +58,7 @@ class Itembankstop extends Component {
NewknTypedel: false, NewknTypedel: false,
boolred: false, boolred: false,
boolnews: false, boolnews: false,
sub_disciplineslength: 1,
} }
} }
@ -463,15 +463,22 @@ class Itembankstop 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) {
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]);
@ -491,6 +498,7 @@ class Itembankstop extends Component {
Knowpoints: [], Knowpoints: [],
knowledgepoints: knowledgepointsdata, knowledgepoints: knowledgepointsdata,
knowledgepoints2: knowledgepointsdata, knowledgepoints2: knowledgepointsdata,
sub_disciplineslength: sub_disciplineslength,
}) })
this.props.form.setFieldsValue({ this.props.form.setFieldsValue({
@ -559,10 +567,15 @@ 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
}) })
@ -712,7 +725,8 @@ class Itembankstop extends Component {
label="课程" label="课程"
> >
{getFieldDecorator("rbkc", {getFieldDecorator("rbkc",
{initialValue: this.state.rbkc, {
initialValue: this.state.rbkc,
rules: [{ required: true, message: '请选择课程' }], rules: [{ required: true, message: '请选择课程' }],
} }
)( )(
@ -734,6 +748,8 @@ class Itembankstop extends Component {
)} )}
</Form.Item> </Form.Item>
</div> </div>
{
this.state.sub_disciplineslength === null || this.state.sub_disciplineslength === undefined || this.state.sub_disciplineslength === 0 ? "" :
<Form.Item <Form.Item
label="知识点" label="知识点"
> >
@ -742,6 +758,7 @@ class Itembankstop extends Component {
<div className="sortinxdirection"> <div className="sortinxdirection">
<<<<<<< HEAD <<<<<<< HEAD
<<<<<<< HEAD <<<<<<< HEAD
<<<<<<< HEAD
======= =======
<InputGroup > <InputGroup >
>>>>>>> df308ab... 合并 >>>>>>> df308ab... 合并
@ -755,6 +772,16 @@ class Itembankstop extends Component {
) )
})} })}
</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... 调整
@ -763,8 +790,12 @@ class Itembankstop extends Component {
</div > </div >
)} )
}
</Form.Item> </Form.Item>
}
{ {
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 ?
@ -796,7 +827,8 @@ class Itembankstop extends Component {
label="题型" label="题型"
> >
{getFieldDecorator("rbtx", {getFieldDecorator("rbtx",
{initialValue: this.state.rbtx, {
initialValue: this.state.rbtx,
rules: [{ required: true, message: '请选择题型' }], rules: [{ required: true, message: '请选择题型' }],
} }
)( )(
@ -879,7 +911,8 @@ class Itembankstop extends Component {
<div className="rbndclass"> <div className="rbndclass">
<Form.Item label="难度"> <Form.Item label="难度">
{getFieldDecorator('rbnd', {getFieldDecorator('rbnd',
{initialValue: this.state.rbnd, {
initialValue: this.state.rbnd,
rules: [{ required: true, message: '请选择难度' }], rules: [{ required: true, message: '请选择难度' }],
} }
)( )(

@ -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"}>
@ -188,6 +192,140 @@ class Listjihe extends Component {
{ {
this.props.listjihe this.props.listjihe
}. }.
</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>
<div className="w50s xaxisreverseorder"> <div className="w50s xaxisreverseorder">
{ {
@ -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 ?
<Tooltip placement="top" title={"编程题未发布,不能选用!"}>
<p className="selectionys jinzhixiaoshou"> <p className="selectionys jinzhixiaoshou">
<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>
<span className="mr15 lh30">选用</span> <span className="mr15 lh30">选用</span>
</p> </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,13 +363,19 @@ 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" ?
""
:
<a target="_blank" href={`/problems/${items.program_attr.identifier}/edit`}>
<p className="viewparsings xiaoshou mr25"> <p className="viewparsings xiaoshou mr25">
<i className="iconfont icon-bianji2 font-17 lg ml7 lh30 icontianjiadaohangcolors mr5"></i> <i className="iconfont icon-bianji2 font-17 lg ml7 lh30 icontianjiadaohangcolors mr5"></i>
<span>编辑</span> <span>编辑</span>
</p> </p>
</a> </a>
: :
this.props.Isitapopup && this.props.Isitapopup === "true" ?
""
:
<a href={`/question/edit/${items.id}`}> <a href={`/question/edit/${items.id}`}>
<p className="viewparsings xiaoshou mr25"> <p className="viewparsings xiaoshou mr25">
<i className="iconfont icon-bianji2 font-17 lg ml7 lh30 icontianjiadaohangcolors mr5"></i> <i className="iconfont icon-bianji2 font-17 lg ml7 lh30 icontianjiadaohangcolors mr5"></i>
@ -239,20 +386,35 @@ class Listjihe extends Component {
{ {
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)}> <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>
: :
(
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>
: :
"" ""
:
""
} }
</div> </div>
@ -278,21 +440,30 @@ class Listjihe extends Component {
<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>
: items.item_type === "MULTIPLE" ?
<p className=" testfondex yldxtit"
style={{ wordBreak: "break-word" }}
dangerouslySetInnerHTML={{ __html: markdownToHTML("答案:" + MULTIPLEkey).replace(/▁/g, "▁▁▁") }}
>
</p> </p>
: :
<p className=" testfondex yldxtit" <p className=" testfondex yldxtit"
style={{ wordBreak: "break-word" }} dangerouslySetInnerHTML={{ __html: markdownToHTML("答案:" + rightkey).replace(/▁/g, "▁▁▁") }} style={{ wordBreak: "break-word" }}
dangerouslySetInnerHTML={{ __html: markdownToHTML("答案:" + rightkey).replace(/▁/g, "▁▁▁") }}
> >
</p> </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,6 +472,7 @@ class Listjihe extends Component {
"" ""
: :
items.analysis.length > 0 ? items.analysis.length > 0 ?
analysisnames === null || analysisnames === undefined ? "" :
<QuillForEditor <QuillForEditor
imgAttrs={{ width: '60px', height: '30px' }} imgAttrs={{ width: '60px', height: '30px' }}
readOnly={true} readOnly={true}

@ -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,6 +694,9 @@ class Comthetestpaperst extends Component {
</Form.Item> </Form.Item>
</div> </div>
</div> </div>
{
this.state.sub_disciplineslength === null || this.state.sub_disciplineslength === undefined || this.state.sub_disciplineslength === 0 ? "" :
<div className="zsdd"> <div className="zsdd">
<Form.Item <Form.Item
label="知识点" label="知识点"
@ -715,6 +725,8 @@ class Comthetestpaperst extends Component {
)} )}
</Form.Item> </Form.Item>
</div> </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,6 +605,8 @@ class Intelligentcomponents extends Component {
</Form.Item> </Form.Item>
</div> </div>
</div> </div>
{
this.state.sub_disciplineslength === null || this.state.sub_disciplineslength === undefined || this.state.sub_disciplineslength === 0 ? "" :
<div className="zsdd"> <div className="zsdd">
<Form.Item <Form.Item
label="知识点" label="知识点"
@ -625,6 +635,8 @@ class Intelligentcomponents extends Component {
)} )}
</Form.Item> </Form.Item>
</div> </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>
{
quotess===null||quotess===undefined||quotess===0?
""
:
<p className='sjtitlesysl ml30'> <p className='sjtitlesysl ml30'>
使用次数<span>{quotess}</span> 使用次数<span>{quotess}</span>
</p> </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" }}
> >
{
itemssname===null || itemssname===undefined?
""
:
<QuillForEditor <QuillForEditor
readOnly={true} readOnly={true}
value={itemssname} 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" }}
> >
{
itemsnamesy===null|| itemsnamesy===undefined?
""
:
<QuillForEditor <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' }}

Loading…
Cancel
Save