chromesetting
杨树明 5 years ago
parent c4e9d903d0
commit 4446c1e943

@ -31,6 +31,9 @@ render() {
} }
.ant-modal-body { .ant-modal-body {
padding: 20px 40px; padding: 20px 40px;
}
.color848282{
color:#848282;
} }
` `
} }
@ -38,8 +41,9 @@ render() {
<Spin indicator={antIcons} spinning={this.props.antIcon===undefined?false:this.props.antIcon} > <Spin indicator={antIcons} spinning={this.props.antIcon===undefined?false:this.props.antIcon} >
<div className="task-popup-content"> <div className="task-popup-content">
<p className="task-popup-text-center font-16">{this.props.modalsTopval}</p> <p className="task-popup-text-center font-16">{this.props.modalsTopval}</p>
{this.props.modalsMidval===undefined?"":<p className="task-popup-text-center font-16 mt5">{this.props.modalsMidval}</p>} {this.props.modalsMidval===undefined?"":<p className={this.props.modalstyles?"task-popup-text-center font-16 mt5 color848282":"task-popup-text-center font-16 mt5"}>{this.props.modalsMidval}</p>}
<p className="task-popup-text-center font-16 mt5">{this.props.modalsBottomval}</p> <p className={this.props.modalstyles?"task-popup-text-center font-16 mt5 color848282":"task-popup-text-center font-16 mt5"}
>{this.props.modalsBottomval}</p>
{this.props.loadtype===true? {this.props.loadtype===true?
<div className="clearfix edu-txt-center mt20"> <div className="clearfix edu-txt-center mt20">
<a className="task-btn task-btn-orange pop_close" onClick={this.props.modalSave}>知道啦</a> <a className="task-btn task-btn-orange pop_close" onClick={this.props.modalSave}>知道啦</a>

@ -347,6 +347,7 @@ class TPMBanner extends Component {
Modalstopval: "", Modalstopval: "",
modalsMidval:undefined, modalsMidval:undefined,
ModalsBottomval:"", ModalsBottomval:"",
modalstyles:"",
}) })
} }
ModalSave = () => { ModalSave = () => {
@ -368,15 +369,29 @@ class TPMBanner extends Component {
ModalsBottomval:"卡,学员需要重新体验课程", ModalsBottomval:"卡,学员需要重新体验课程",
ModalCancel: this.ModalCancel, ModalCancel: this.ModalCancel,
ModalSave: this.ModalSave, ModalSave: this.ModalSave,
modalstyles:"848282"
}) })
} }
ModalSaveopenpublic= () => {
this.setState({
Modalstype: true,
Modalstopval: "公开申请已提交,请等待管理员的审核",
modalsMidval:"• 我们将在1-2个工作日内完成审核",
ModalCancel: this.eopenpublicupdatadata,
ModalSave: this.eopenpublicupdatadata,
modalstyles:"848282"
})
}
eopenpublicupdatadata=()=>{
window.location.reload()
}
openpublic=()=>{ openpublic=()=>{
let id = this.props.match.params.shixunId; let id = this.props.match.params.shixunId;
let url = `/shixuns/${id}/apply_public.json`; let url = `/shixuns/${id}/apply_public.json`;
axios.get(url).then((response) => { axios.get(url).then((response) => {
if(response.data.status===0){ if(response.data.status===0){
window.location.reload() this.ModalSaveopenpublic()
} }
}).catch((error) => { }).catch((error) => {
console.log(error) console.log(error)
@ -791,6 +806,7 @@ class TPMBanner extends Component {
modalsBottomval={this.state.ModalsBottomval} modalsBottomval={this.state.ModalsBottomval}
modalsMidval={this.state.modalsMidval} modalsMidval={this.state.modalsMidval}
loadtype={this.state.Loadtype} loadtype={this.state.Loadtype}
modalstyles={this.state.modalstyles}
/> : ""} /> : ""}
<div className="educontent clearfix"> <div className="educontent clearfix">

@ -115,7 +115,8 @@ export default class Shixuninformation extends Component {
onChangeTimePicker = (value, dateString) => { onChangeTimePicker = (value, dateString) => {
this.setState({ this.setState({
opening_time: dateString === "" ? "" : handleDateStrings(dateString), opening_time: dateString === "" ? "" : handleDateStrings(dateString),
opening_timetype:false opening_timetype:false,
loading: false
}) })
} }
@ -133,12 +134,20 @@ export default class Shixuninformation extends Component {
return return
} }
} }
let list=[]
scope_partment.map((item,key)=>{
list.push(item)
})
oldscope_partment.map((item,key)=>{
list.push(item)
})
let id = this.props.match.params.shixunId; let id = this.props.match.params.shixunId;
let url = `/shixuns/${id}/update_permission_setting.json`; let url = `/shixuns/${id}/update_permission_setting.json`;
axios.post(url, axios.post(url,
{ {
scope_partment: scope_partment, scope_partment: list,
shixun: { shixun: {
can_copy: can_copy, can_copy: can_copy,
use_scope: use_scope, use_scope: use_scope,
@ -149,16 +158,6 @@ export default class Shixuninformation extends Component {
if (response.data.status === -1) { if (response.data.status === -1) {
} else { } else {
let list=[]
scope_partment.map((item,key)=>{
list.push(item)
})
oldscope_partment.map((item,key)=>{
list.push(item)
})
this.props.showNotification("权限配置保存成功!") this.props.showNotification("权限配置保存成功!")
this.setState({ this.setState({
loading: false, loading: false,
@ -292,7 +291,6 @@ export default class Shixuninformation extends Component {
</div> </div>
<div className="edu-back-white mb10 ml30 mt20"> <div className="edu-back-white mb10 ml30 mt20">
{this.props.data && this.props.data.shixun.use_scope === 0 && this.props.data && this.props.data.shixun.status === 2 ? "" :
<div> <div>
<span className="color-grey-6 mt5 fl font-16" style={{minWidth: '45px'}}>公开程度:</span> <span className="color-grey-6 mt5 fl font-16" style={{minWidth: '45px'}}>公开程度:</span>
<span className="fl mt8 ml20"> <span className="fl mt8 ml20">
@ -371,7 +369,7 @@ export default class Shixuninformation extends Component {
</span> </span>
</div>} </div>
<div className="clearfix mt20"> <div className="clearfix mt20">
<span className="color-grey-6 mt5 fl font-16" style={{minWidth: '45px'}}>开启时间:</span> <span className="color-grey-6 mt5 fl font-16" style={{minWidth: '45px'}}>开启时间:</span>

Loading…
Cancel
Save