|
|
|
@ -10,7 +10,9 @@ import {Modal,Input,Radio,Pagination,message,Spin,Icon,Tooltip} from 'antd';
|
|
|
|
|
|
|
|
|
|
import 'antd/lib/pagination/style/index.css';
|
|
|
|
|
|
|
|
|
|
import axios from 'axios';
|
|
|
|
|
import axios from 'axios'
|
|
|
|
|
|
|
|
|
|
import Modals from '../modals/Modals';
|
|
|
|
|
|
|
|
|
|
// import { Rating,Progress } from '@icedesign/base';
|
|
|
|
|
|
|
|
|
@ -264,16 +266,29 @@ class TPMBanner extends Component {
|
|
|
|
|
/*
|
|
|
|
|
* 撤销发布按钮
|
|
|
|
|
* */
|
|
|
|
|
cancel_publish=()=>{
|
|
|
|
|
|
|
|
|
|
let id = this.props.match.params.shixunId;
|
|
|
|
|
let url="/shixuns/" + id +"/cancel_publish.json";
|
|
|
|
|
axios.get(url).then((response) => {
|
|
|
|
|
this.props.showSnackbar(response.data.message);
|
|
|
|
|
window.location.reload()
|
|
|
|
|
}).catch((error) => {
|
|
|
|
|
console.log(error)
|
|
|
|
|
});
|
|
|
|
|
ModalCancel=()=>{
|
|
|
|
|
this.setState({
|
|
|
|
|
Modalstype:false
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
ModalSave=()=>{
|
|
|
|
|
let id = this.props.match.params.shixunId;
|
|
|
|
|
let url="/shixuns/" + id +"/cancel_publish.json";
|
|
|
|
|
axios.get(url).then((response) => {
|
|
|
|
|
this.props.showSnackbar(response.data.message);
|
|
|
|
|
window.location.reload()
|
|
|
|
|
}).catch((error) => {
|
|
|
|
|
console.log(error)
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
cancel_publish=()=>{
|
|
|
|
|
this.setState({
|
|
|
|
|
Modalstype:true,
|
|
|
|
|
Modalstopval:"是否确认撤销发布?",
|
|
|
|
|
ModalCancel:this.ModalCancel,
|
|
|
|
|
ModalSave:this.ModalSave,
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -523,6 +538,15 @@ class TPMBanner extends Component {
|
|
|
|
|
<div>
|
|
|
|
|
<div className="shixunDetail_top">
|
|
|
|
|
|
|
|
|
|
{this.state.Modalstype===true?<Modals
|
|
|
|
|
modalsType={this.state.Modalstype}
|
|
|
|
|
modalsTopval={this.state.Modalstopval}
|
|
|
|
|
modalCancel={this.state.ModalCancel}
|
|
|
|
|
modalSave={this.state.ModalSave}
|
|
|
|
|
modalsBottomval={this.state.ModalsBottomval}
|
|
|
|
|
loadtype={this.state.Loadtype}
|
|
|
|
|
/>:""}
|
|
|
|
|
|
|
|
|
|
<div className="educontent clearfix">
|
|
|
|
|
<p className="clearfix">
|
|
|
|
|
<a href={"/shixuns/" + shixunsDetails.identifier + "/challenges"}
|
|
|
|
|