|
|
|
@ -4,6 +4,8 @@ import {Input, Select, Radio, Checkbox, Popconfirm, message, Modal,Tooltip} from
|
|
|
|
|
|
|
|
|
|
import {BrowserRouter as Router, Route, Link, Switch} from "react-router-dom";
|
|
|
|
|
|
|
|
|
|
import axios from 'axios';
|
|
|
|
|
|
|
|
|
|
import TPMMDEditor from '../../tpm/challengesnew/TPMMDEditor';
|
|
|
|
|
|
|
|
|
|
const Option = Select.Option;
|
|
|
|
@ -21,7 +23,17 @@ export default class TpmQuestionEdit extends Component {
|
|
|
|
|
componentDidMount() {
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
delecbtns=()=>{
|
|
|
|
|
let url=`/shixuns/${this.props.match.params.shixunId}/challenges/${this.props.match.params.checkpointId}/destroy_challenge_choose.json`;
|
|
|
|
|
axios.delete((url), { data: {
|
|
|
|
|
choose_id:this.props.match.params.choose_id
|
|
|
|
|
}})
|
|
|
|
|
.then((result)=>{
|
|
|
|
|
if(result.data.status===1){
|
|
|
|
|
window.location.href=`/shixuns/${this.props.match.params.shixunId}/challenges/${this.props.match.params.checkpointId}/editquestion`;
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
render() {
|
|
|
|
|
|
|
|
|
@ -202,6 +214,9 @@ export default class TpmQuestionEdit extends Component {
|
|
|
|
|
onClick={()=>this.props.answer_subit()}>提交</a>
|
|
|
|
|
<a href={this.props.go_back_url}
|
|
|
|
|
className="defalutCancelbtn fl">取消</a>
|
|
|
|
|
|
|
|
|
|
<a onClick={()=>this.delecbtns()}
|
|
|
|
|
className="delectshixuncdbtn fr">删除</a>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|