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

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

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

@ -455,7 +455,7 @@ class Questionitem_banks extends Component {
sub_discipline_id: Getdatasdata[3].rbkc[1],
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_baskets={(e) => this.props.getitem_baskets(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>
)

@ -231,11 +231,16 @@ class Headplugselections extends Component {
{
disciplinesdata&&disciplinesdata.map((item,key)=>{
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)}>
{item.name}
</li>
</Dropdown>
)
})
}

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

@ -17,6 +17,7 @@ const tagArrays = [
'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R',
'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z'
]
//Paperreview_single.js Paperlibraryseeid_items.js
class Listjihe extends Component {
constructor(props) {
super(props);
@ -162,7 +163,10 @@ class Listjihe extends Component {
} catch (e) {
analysisnames = items && items.analysis;
}
console.log(items.name);
console.log(itemsnamesy);
console.log(analysisnames);
return (
<div key={keindex}
className={chakanjiexiboolindex === keindex ? "w100s borderwds283 pd20 mb20 listjihecolors" : "w100s borderwds pd20 mb20 listjihecolors"}>
@ -189,6 +193,140 @@ class Listjihe extends Component {
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 className="w50s xaxisreverseorder">
{
items.choosed === true ?
@ -198,10 +336,13 @@ class Listjihe extends Component {
:
items.item_type === "PROGRAM" ?
items.program_attr.status === 0 ?
<p className="selectionys jinzhixiaoshou" >
<i className="iconfont icon-tianjiadaohang font-12 lg ml7 lh30 icontianjiadaohangcolor mr5"></i>
<span className="mr15 lh30">选用</span>
</p>
<Tooltip placement="top" title={"编程题未发布,不能选用!"}>
<p className="selectionys jinzhixiaoshou">
<i className="iconfont icon-tianjiadaohang font-12 lg ml7 lh30 icontianjiadaohangcolor mr5"></i>
<span className="mr15 lh30">选用</span>
</p>
</Tooltip>
:
<p className="selection xiaoshou" onClick={() => this.Selectingpracticaltraining(items.id)}>
<i className="iconfont icon-tianjiadaohang font-12 lg ml7 lh30 icontianjiadaohangcolor mr5"></i>
@ -222,35 +363,56 @@ class Listjihe extends Component {
</p>
{
items.item_type === "PROGRAM" ?
<a href={`/problems/${items.program_attr.identifier}/edit`}>
<p className="viewparsings xiaoshou mr25" >
<i className="iconfont icon-bianji2 font-17 lg ml7 lh30 icontianjiadaohangcolors mr5"></i>
<span>编辑</span>
</p>
</a>
this.props.Isitapopup && this.props.Isitapopup === "true" ?
""
:
<a target="_blank" href={`/problems/${items.program_attr.identifier}/edit`}>
<p className="viewparsings xiaoshou mr25">
<i className="iconfont icon-bianji2 font-17 lg ml7 lh30 icontianjiadaohangcolors mr5"></i>
<span>编辑</span>
</p>
</a>
:
<a href={`/question/edit/${items.id}`}>
<p className="viewparsings xiaoshou mr25" >
<i className="iconfont icon-bianji2 font-17 lg ml7 lh30 icontianjiadaohangcolors mr5"></i>
<span>编辑</span>
</p>
</a>
this.props.Isitapopup && this.props.Isitapopup === "true" ?
""
:
<a href={`/question/edit/${items.id}`}>
<p className="viewparsings xiaoshou mr25">
<i className="iconfont icon-bianji2 font-17 lg ml7 lh30 icontianjiadaohangcolors mr5"></i>
<span>编辑</span>
</p>
</a>
}
{
items.public === false ?
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)}>
<i className="iconfont icon-gongkai font-17 lg ml7 lh30 icontianjiadaohangcolors mr5"></i>
<span>公开</span>
</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>
<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"
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, "▁▁▁") }}
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 className=" testfondex yldxtit"
style={{ wordBreak: "break-word" }}
dangerouslySetInnerHTML={{ __html: markdownToHTML("答案:" + rightkey).replace(/▁/g, "▁▁▁") }}
>
</p>
}
</div>
<div className=" sortinxdirection mt15 yldxtit">
<p className=" testfondex yldxtit programquill"
<p id={"analysisnamesid"} className=" testfondex yldxtit programquill"
style={{ wordBreak: "break-word" }}
>
{items ?
@ -301,11 +472,12 @@ class Listjihe extends Component {
""
:
items.analysis.length > 0 ?
<QuillForEditor
imgAttrs={{ width: '60px', height: '30px' }}
readOnly={true}
value={analysisnames}
/>
analysisnames === null || analysisnames === undefined ? "" :
<QuillForEditor
imgAttrs={{ width: '60px', height: '30px' }}
readOnly={true}
value={analysisnames}
/>
:
""
:

@ -12,7 +12,15 @@ class PaperDeletModel extends Component {
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)=>{
// this.setState({
@ -20,6 +28,10 @@ class PaperDeletModel extends Component {
// })
// //console.log(e.target.value);
// //console.log(e.target.value.length);
if(this.isNull(e.target.value)===true){
this.props.showNotification('不能输入空格');
return
}
this.setState({
newkntypeinput: e.target.value
})
@ -60,7 +72,7 @@ class PaperDeletModel extends Component {
>
<div className="educouddiv">
<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 className="clearfix mt30 edu-txt-center">
<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 {
constructor(props) {
super(props);
@ -56,6 +56,7 @@ class Comthetestpaperst extends Component {
options: [],
NewknTypedel: false,
boolred: false,
sub_disciplineslength: 1,
}
}
setboolred = (bool) => {
@ -413,11 +414,16 @@ class Comthetestpaperst extends Component {
const didata = this.props.disciplinesdata;
const knowledgepointsdata = [];
var sub_disciplineslength = 0;
for (var i = 0; i < didata.length; i++) {
//方向
if (value[0] === didata[i].id) {
const fxdidata = didata[i].sub_disciplines;
try {
sub_disciplineslength = fxdidata.length;
} catch (e) {
}
for (var j = 0; j < fxdidata.length; j++) {
//课程
if (value[1] === fxdidata[j].id) {
@ -441,6 +447,7 @@ class Comthetestpaperst extends Component {
Knowpoints: [],
knowledgepoints: knowledgepointsdata,
knowledgepoints2: knowledgepointsdata,
sub_disciplineslength: sub_disciplineslength,
})
this.props.form.setFieldsValue({
@ -687,34 +694,39 @@ class Comthetestpaperst extends Component {
</Form.Item>
</div>
</div>
<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>
{
this.state.sub_disciplineslength === null || this.state.sub_disciplineslength === undefined || this.state.sub_disciplineslength === 0 ? "" :
<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>
)}
</Form.Item>
</div>
</div>
)}
</Form.Item>
</div>
}
{
this.state.Knowpoints === undefined || this.state.Knowpoints === null ? "" :
this.state.Knowpoints.length > 0 ?

@ -20,7 +20,9 @@ import Newknledpots from '../component/Newknledpots';
import Ldanxuan from './lntlligentpone';
const InputGroup = Input.Group;
const {Option} = Select;
//Itembankstop Comthetestpaperst 题库的
// Comthetestpaperst 题库的
// Itembankstop 题库的
class Intelligentcomponents extends Component {
constructor(props) {
super(props);
@ -35,7 +37,8 @@ class Intelligentcomponents extends Component {
options: [],
NewknTypedel:false,
boolred:false,
rbly:"1"
rbly:"1",
sub_disciplineslength:1,
}
}
setboolred=(bool)=>{
@ -310,11 +313,16 @@ class Intelligentcomponents extends Component {
const didata = this.props.disciplinesdata;
const knowledgepointsdata = [];
var sub_disciplineslength=0;
for (var i = 0; i < didata.length; i++) {
//方向
if (value[0] === didata[i].id) {
const fxdidata = didata[i].sub_disciplines;
try {
sub_disciplineslength=fxdidata.length;
}catch (e) {
}
for (var j = 0; j < fxdidata.length; j++) {
//课程
if (value[1] === fxdidata[j].id) {
@ -597,34 +605,38 @@ class Intelligentcomponents extends Component {
</Form.Item>
</div>
</div>
<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)}/>
{
this.state.sub_disciplineslength === null || this.state.sub_disciplineslength === undefined || this.state.sub_disciplineslength === 0 ? "" :
<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)}/>
</div>
)}
</Form.Item>
</div>
}
</div>
)}
</Form.Item>
</div>
{
this.state.Knowpoints===undefined||this.state.Knowpoints===null?"":
this.state.Knowpoints.length>0?

@ -992,17 +992,30 @@
cursor: no-drop
}
.shitilang {
height: 40px;
background: #606060;
color: #FFFFFF;
position: absolute;
top: -2px;
.mr15 {
margin-right: 15px;
}
.ant-modal-mask {
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%;
position: fixed;
top: 0px;
bottom: 0px;
left: 0px;
font-size: 14px;
text-align: center;
line-height: 40px;
z-index: 5000;
right: 0px;
}
.xiaoshoums:hover {

@ -21,7 +21,7 @@ class Testpaperlibrary extends Component {
public: null,
difficulty: null,
item_type: null,
keywords: null,
keyword: null,
page: 1,
per_page: 10,
booljupyterurls: false,
@ -81,7 +81,7 @@ class Testpaperlibrary extends Component {
tag_discipline_id: this.state.tag_discipline_id,
public: this.state.defaultActiveKey,
difficulty: this.state.difficulty,
keywords: null,
keyword: null,
per_page: 10,
}
this.getdata(data);
@ -89,14 +89,14 @@ class Testpaperlibrary extends Component {
setdatafunsval = (e) => {
this.setState({
keywords: e.target.value
keyword: e.target.value
})
}
setdatafuns = (value) => {
this.setState({
keywords: value,
keyword: value,
})
var data = {
page: this.state.page,
@ -105,7 +105,7 @@ class Testpaperlibrary extends Component {
tag_discipline_id: this.state.tag_discipline_id,
public: this.state.defaultActiveKey,
difficulty: this.state.difficulty,
keywords: value,
keyword: value,
per_page: 10,
}
this.getdata(data);
@ -114,7 +114,7 @@ class Testpaperlibrary extends Component {
this.setState({
defaultActiveKey: key,
difficulty: null,
keywords: null,
keyword: null,
page: 1,
})
var data = {
@ -124,7 +124,7 @@ class Testpaperlibrary extends Component {
tag_discipline_id: this.state.tag_discipline_id,
public: key,
difficulty: null,
keywords: null,
keyword: null,
per_page: 10,
}
this.getdata(data);
@ -170,7 +170,7 @@ class Testpaperlibrary extends Component {
discipline_id: discipline_id,
sub_discipline_id: null,
tag_discipline_id: null,
keywords: null,
keyword: null,
page: 1,
per_page: 10,
})
@ -180,7 +180,7 @@ class Testpaperlibrary extends Component {
tag_discipline_id: null,
public: this.state.defaultActiveKey,
difficulty: this.props.difficulty,
keywords: null,
keyword: null,
page: 1,
per_page: 10,
};
@ -191,7 +191,7 @@ class Testpaperlibrary extends Component {
this.setState({
sub_discipline_id: sub_discipline_id,
tag_discipline_id: null,
keywords: null,
keyword: null,
page: 1,
per_page: 10,
})
@ -201,7 +201,7 @@ class Testpaperlibrary extends Component {
tag_discipline_id: null,
public: this.state.defaultActiveKey,
difficulty: this.state.difficulty,
keywords: null,
keyword: null,
page: 1,
per_page: 10,
};
@ -211,7 +211,7 @@ class Testpaperlibrary extends Component {
settag_discipline_id = (tag_discipline_id) => {
this.setState({
tag_discipline_id: tag_discipline_id,
keywords: null,
keyword: null,
page: 1,
per_page: 10,
})
@ -221,7 +221,7 @@ class Testpaperlibrary extends Component {
tag_discipline_id: tag_discipline_id,
public: this.state.defaultActiveKey,
difficulty: this.state.difficulty,
keywords: null,
keyword: null,
page: 1,
per_page: 10,
};
@ -277,7 +277,7 @@ class Testpaperlibrary extends Component {
tag_discipline_id: this.state.tag_discipline_id,
public: this.state.defaultActiveKey,
difficulty: this.state.difficulty,
keywords: this.state.keywords,
keyword: this.state.keywords,
page: this.state.page,
per_page: 10,
};
@ -303,7 +303,7 @@ class Testpaperlibrary extends Component {
tag_discipline_id: this.state.tag_discipline_id,
public: this.state.defaultActiveKey,
difficulty: this.state.difficulty,
keywords: this.state.keywords,
keyword: this.state.keywords,
page: this.state.page,
per_page: 10,
};
@ -318,7 +318,7 @@ class Testpaperlibrary extends Component {
showmodels = (id) => {
this.setState({
modalsType: true,
titilesm: "设为公开后,所有成员均可使用试卷",
titilesm: "在平台审核后,所有成员均可使用试题",
titiless: "是否设置为公开?",
titbool: true,
timuid: id
@ -346,7 +346,7 @@ class Testpaperlibrary extends Component {
this.setState({
difficulty: difficulty,
visiblemys: false,
keywords: "",
keyword: "",
page: 1,
per_page: 10,
})
@ -357,7 +357,7 @@ class Testpaperlibrary extends Component {
tag_discipline_id: this.state.tag_discipline_id,
public: this.state.defaultActiveKey,
difficulty: difficulty,
keywords: null,
keyword: null,
page: 1,
per_page: 10,
};
@ -372,7 +372,7 @@ class Testpaperlibrary extends Component {
this.setState({
item_type: item_type,
visiblemyss: false,
keywords: null,
keyword: null,
page: 1,
per_page: 10,
})
@ -384,7 +384,7 @@ class Testpaperlibrary extends Component {
public: this.state.defaultActiveKey,
difficulty: this.state.difficulty,
item_type: item_type,
keywords: "",
keyword: "",
page: 1,
per_page: 10,
};

@ -80,7 +80,7 @@ class Listjihe extends Component {
<img src={getImageUrl("images/educoder/shijuans.png")} className="imgtp"/>
</div>
<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">
<p className="sjtitles">试题数<span >{question_counts}</span></p>
<p className="sjtitles ml48">总分<span >{total_scores}</span></p>
@ -92,9 +92,15 @@ class Listjihe extends Component {
更新时间<span>{update_times}</span>
</p>
<p className='sjtitlesysl ml30'>
使用次数<span>{quotess}</span>
</p>
{
quotess===null||quotess===undefined||quotess===0?
""
:
<p className='sjtitlesysl ml30'>
使用次数<span>{quotess}</span>
</p>
}
{
defaultActiveKey===1||defaultActiveKey==="1"?
<p className='sjtitlesysl ml30'>

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

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

Loading…
Cancel
Save