|
|
@ -1,5 +1,6 @@
|
|
|
|
import React, {Component} from "react";
|
|
|
|
import React, {Component} from "react";
|
|
|
|
import { SnackbarHOC } from 'educoder';
|
|
|
|
import {Link, NavLink} from 'react-router-dom';
|
|
|
|
|
|
|
|
import {WordsBtn, ActionBtn, SnackbarHOC, getImageUrl,queryString} from 'educoder';
|
|
|
|
import axios from 'axios';
|
|
|
|
import axios from 'axios';
|
|
|
|
import { Breadcrumb } from "antd";
|
|
|
|
import { Breadcrumb } from "antd";
|
|
|
|
import TPMIndexHOC from "../tpm/TPMIndexHOC";
|
|
|
|
import TPMIndexHOC from "../tpm/TPMIndexHOC";
|
|
|
@ -25,13 +26,25 @@ class Questionitem_banks extends Component {
|
|
|
|
myquestion_choicesco: [],
|
|
|
|
myquestion_choicesco: [],
|
|
|
|
disciplinesdata: [],
|
|
|
|
disciplinesdata: [],
|
|
|
|
knowledgepoints: [],
|
|
|
|
knowledgepoints: [],
|
|
|
|
disciplmy: []
|
|
|
|
disciplmy:[],
|
|
|
|
|
|
|
|
pages:1,
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
//初始化
|
|
|
|
//初始化
|
|
|
|
componentDidMount() {
|
|
|
|
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;
|
|
|
|
// let {defaultActiveKey}= this.state;
|
|
|
|
// var data={
|
|
|
|
// var data={
|
|
|
|
// public:defaultActiveKey
|
|
|
|
// public:defaultActiveKey
|
|
|
@ -444,6 +457,7 @@ class Questionitem_banks extends Component {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (this.state.item_type === "PROGRAM") {
|
|
|
|
if (this.state.item_type === "PROGRAM") {
|
|
|
|
//编程题 跳转到 oj 中创建
|
|
|
|
//编程题 跳转到 oj 中创建
|
|
|
|
|
|
|
|
debugger
|
|
|
|
var myrbkc=[];
|
|
|
|
var myrbkc=[];
|
|
|
|
var Getdatasdatas=Getdatasdata[2].rbzsd;
|
|
|
|
var Getdatasdatas=Getdatasdata[2].rbzsd;
|
|
|
|
for(let myda of Getdatasdatas) {
|
|
|
|
for(let myda of Getdatasdatas) {
|
|
|
@ -455,9 +469,12 @@ 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,
|
|
|
|
});
|
|
|
|
});
|
|
|
|
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}`);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|