video_transcode
杨树林 5 years ago
parent 63f4eb33b3
commit 029591a9b6

@ -22,6 +22,7 @@ import JudquestionEditor from "./component/JudquestionEditor";
import Bottomsubmit from "../../modules/modals/Bottomsubmit"; import Bottomsubmit from "../../modules/modals/Bottomsubmit";
import { connect } from 'react-redux'; import { connect } from 'react-redux';
import actions from "../../redux/actions"; import actions from "../../redux/actions";
var restricte=false;
class Questionitem_banks extends Component { class Questionitem_banks extends Component {
constructor(props) { constructor(props) {
super(props); super(props);
@ -37,6 +38,7 @@ class Questionitem_banks extends Component {
knowledgepoints: [], knowledgepoints: [],
disciplmy:[], disciplmy:[],
pages:1, pages:1,
} }
} }
@ -309,6 +311,7 @@ class Questionitem_banks extends Component {
.then((result) => { .then((result) => {
if (result.data.status == 0) { if (result.data.status == 0) {
// this.props.showNotification(`新增单选题成功`); // this.props.showNotification(`新增单选题成功`);
this.restricte=true;
this.props.history.replace('/question'); this.props.history.replace('/question');
} }
@ -320,6 +323,7 @@ class Questionitem_banks extends Component {
.then((result) => { .then((result) => {
if (result.data.status == 0) { if (result.data.status == 0) {
// this.props.showNotification(`编辑单选题成功`); // this.props.showNotification(`编辑单选题成功`);
this.restricte=true;
this.props.history.replace('/question'); this.props.history.replace('/question');
@ -387,6 +391,7 @@ class Questionitem_banks extends Component {
.then((result) => { .then((result) => {
if (result.data.status == 0) { if (result.data.status == 0) {
// this.props.showNotification(`新增多选题成功`); // this.props.showNotification(`新增多选题成功`);
this.restricte=true;
this.props.history.replace('/question'); this.props.history.replace('/question');
@ -400,6 +405,7 @@ class Questionitem_banks extends Component {
.then((result) => { .then((result) => {
if (result.data.status == 0) { if (result.data.status == 0) {
// this.props.showNotification(`编辑多选题成功`); // this.props.showNotification(`编辑多选题成功`);
this.restricte=true;
this.props.history.replace('/question'); this.props.history.replace('/question');
@ -454,6 +460,7 @@ class Questionitem_banks extends Component {
.then((result) => { .then((result) => {
if (result.data.status == 0) { if (result.data.status == 0) {
// this.props.showNotification(`新增判断题成功`); // this.props.showNotification(`新增判断题成功`);
this.restricte=true;
this.props.history.replace('/question'); this.props.history.replace('/question');
} }
@ -466,6 +473,7 @@ class Questionitem_banks extends Component {
.then((result) => { .then((result) => {
if (result.data.status == 0) { if (result.data.status == 0) {
// this.props.showNotification(`编辑判断题成功`); // this.props.showNotification(`编辑判断题成功`);
this.restricte=true;
this.props.history.replace('/question'); this.props.history.replace('/question');
} }
@ -498,10 +506,12 @@ class Questionitem_banks extends Component {
let arrays=myrbkc.join(','); let arrays=myrbkc.join(',');
// console.log("开始打印了"); // console.log("开始打印了");
// console.log(arrays); // console.log(arrays);
this.restricte=true;
// 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}`); 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}`);
setTimeout(() => {
this.props.history.replace( `/problems/new?difficult=${Getdatasdata[0].rbnd}&sub_discipline_id=${Getdatasdata[3].rbkc[1]}&tag_discipline_id=${arrays}&newoj=1&pages=${this.state.pages}`); this.restricte=true;
}, 1000);
// this.props.history.replace( `/problems/new?difficult=${Getdatasdata[0].rbnd}&sub_discipline_id=${Getdatasdata[3].rbkc[1]}&tag_discipline_id=${arrays}&newoj=1&pages=${this.state.pages}`);
} }
@ -517,17 +527,23 @@ class Questionitem_banks extends Component {
} }
render() { render() {
let {page, limit, count, Headertop, visible, placement, modalsType, item_type} = this.state; let {page, limit, count, Headertop, visible, placement, modalsType, item_type,restricte} = this.state;
const params = this.props && this.props.match && this.props.match.params; const params = this.props && this.props.match && this.props.match.params;
// ////console.log(params); // ////console.log(params);
return ( return (
<div> <div>
<div id={"Itembankstopid"} className="newMain clearfix intermediatecenter " <div id={"Itembankstopid"} className="newMain clearfix intermediatecenter "
> >
{
restricte===false?
<Prompt <Prompt
when={true} when={true}
message={() => '你确定离开此页面吗?'} message={() => '你确定离开此页面吗?'}
/> />
:
""
}
<style> <style>
{ {

Loading…
Cancel
Save