dev_aliyun2
杨树林 5 years ago committed by harry
parent 4f1a94826f
commit cf5847d8aa

@ -931,21 +931,22 @@ 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)}
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)}
pages={this.state.page}
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)}
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>
{

@ -1,5 +1,6 @@
import React, { Component } from "react";
import { SnackbarHOC } from 'educoder';
import React, {Component} from "react";
import {Link, NavLink} from 'react-router-dom';
import {WordsBtn, ActionBtn, SnackbarHOC, getImageUrl,queryString} from 'educoder';
import axios from 'axios';
import { Breadcrumb } from "antd";
import TPMIndexHOC from "../tpm/TPMIndexHOC";
@ -25,13 +26,25 @@ class Questionitem_banks extends Component {
myquestion_choicesco: [],
disciplinesdata: [],
knowledgepoints: [],
disciplmy: []
disciplmy:[],
pages:1,
}
}
//初始化
componentDidMount() {
const query = this.props.location.search;
const parsed = queryString.parse(query);
console.log(parsed);
try {
this.setState({
pages:parsed.pages
})
}catch (e) {
}
// let {defaultActiveKey}= this.state;
// var data={
// public:defaultActiveKey
@ -444,9 +457,10 @@ class Questionitem_banks extends Component {
}
if (this.state.item_type === "PROGRAM") {
//编程题 跳转到 oj 中创建
var myrbkc = [];
var Getdatasdatas = Getdatasdata[2].rbzsd;
for (let myda of Getdatasdatas) {
debugger
var myrbkc=[];
var Getdatasdatas=Getdatasdata[2].rbzsd;
for(let myda of Getdatasdatas) {
myrbkc.push(myda.id);
}
@ -455,9 +469,12 @@ class Questionitem_banks extends Component {
sub_discipline_id: Getdatasdata[3].rbkc[1],
tag_discipline_id: myrbkc,
});
console.log(Getdatasdata[3].rbkc[1].join(','));
// window.open( `/problems/new?difficult=${Getdatasdata[0].rbnd}&sub_discipline_id=\"\"&tag_discipline_id=\"\"&newoj=1&=pages=\"\"`);
let arrays=myrbkc.join(',');
// console.log("开始打印了");
// console.log(arrays);
window.open( `/problems/new?difficult=${Getdatasdata[0].rbnd}&sub_discipline_id=${Getdatasdata[3].rbkc[1]}&tag_discipline_id=${arrays}&newoj=1&pages=${this.state.pages}`);
}

@ -52,47 +52,47 @@ class Contentpart extends Component {
this.props.callback(defaultActiveKeys);
}
}
xinzenw = (e) => {
var urls = "?";
if (this.props.discipline_id) {
if (urls === "?") {
urls = urls + `discipline_id=${this.props.discipline_id}`
} else {
urls = urls + `&discipline_id=${this.props.discipline_id}`
}
xinzenw=(e)=>{
var urls="";
if(this.props.discipline_id){
// if(urls==="?"){
// urls=urls+`discipline_id=${this.props.discipline_id}`
// }else {
urls=urls+`&discipline_id=${this.props.discipline_id}`
// }
}
if(this.props.sub_discipline_id){
// if(urls==="?"){
// urls=urls+`sub_discipline_id=${this.props.sub_discipline_id}`
// }else {
urls=urls+`&sub_discipline_id=${this.props.sub_discipline_id}`
// }
}
if (this.props.sub_discipline_id) {
if (urls === "?") {
urls = urls + `sub_discipline_id=${this.props.sub_discipline_id}`
} else {
urls = urls + `&sub_discipline_id=${this.props.sub_discipline_id}`
}
if(this.props.tag_discipline_id){
// if(urls==="?"){
// urls=urls+`sub_discipline_id=${this.props.tag_discipline_id}`
// }else {
urls=urls+`&sub_discipline_id=${this.props.tag_discipline_id}`
// }
}
if (this.props.tag_discipline_id) {
if (urls === "?") {
urls = urls + `sub_discipline_id=${this.props.tag_discipline_id}`
} else {
urls = urls + `&sub_discipline_id=${this.props.tag_discipline_id}`
}
if(this.props.difficulty){
// if(urls==="?"){
// urls=urls+`difficulty=${this.props.difficulty}&`
// }else {
urls=urls+`&difficulty=${this.props.difficulty}`
// }
}
if (this.props.difficulty) {
if (urls === "?") {
urls = urls + `difficulty=${this.props.difficulty}&`
} else {
urls = urls + `&difficulty=${this.props.difficulty}`
}
}
if (this.props.item_type) {
if (urls === "?") {
urls = urls + `item_type=${this.props.item_type}`
} else {
urls = urls + `&item_type=${this.props.item_type}`
}
if(this.props.item_type){
// if(urls==="?"){
// urls=urls+`item_type=${this.props.item_type}`
// }else {
urls=urls+`&item_type=${this.props.item_type}`
// }
}
this.props.history.push("/question/newitem?pages="+this.props.pages+urls);
this.props.history.push("/question/newitem" + urls);
}
render() {
let { page } = this.state;
@ -316,12 +316,13 @@ class Contentpart extends Component {
keindex={index}
items={object}
key={index}
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)}
showmodelsInaudit={(e) => this.props.showmodelsInaudit(e)}
>
pages={this.props.pages}
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)}
showmodelsInaudit={(e)=>this.props.showmodelsInaudit(e)}
>
</Listjihe>
)

@ -366,7 +366,7 @@ class Listjihe extends Component {
this.props.Isitapopup&&this.props.Isitapopup==="true"?
""
:
<a href={`/problems/${items.program_attr.identifier}/edit`}>
<a target="_blank" href={`/problems/${items.program_attr.identifier}/edit?editoj=1&pages=`+this.props.pages}>
<p className="viewparsings xiaoshou mr25">
<i className="iconfont icon-bianji2 font-17 lg ml7 lh30 icontianjiadaohangcolors mr5"></i>
<span>编辑</span>
@ -376,7 +376,7 @@ class Listjihe extends Component {
this.props.Isitapopup&&this.props.Isitapopup==="true"?
""
:
<a href={`/question/edit/${items.id}`}>
<a target="_blank" 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>

Loading…
Cancel
Save