From 4446c1e943871a71dd851640f523e6790cb823ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com> Date: Fri, 13 Dec 2019 20:01:56 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/react/src/modules/modals/Modals.js | 8 ++++-- public/react/src/modules/tpm/TPMBanner.js | 20 ++++++++++++-- .../modules/tpm/TPMsettings/Configuration.js | 26 +++++++++---------- 3 files changed, 36 insertions(+), 18 deletions(-) diff --git a/public/react/src/modules/modals/Modals.js b/public/react/src/modules/modals/Modals.js index e241f379a..686dae46a 100644 --- a/public/react/src/modules/modals/Modals.js +++ b/public/react/src/modules/modals/Modals.js @@ -31,6 +31,9 @@ render() { } .ant-modal-body { padding: 20px 40px; + } + .color848282{ + color:#848282; } ` } @@ -38,8 +41,9 @@ render() {

{this.props.modalsTopval}

- {this.props.modalsMidval===undefined?"":

{this.props.modalsMidval}

} -

{this.props.modalsBottomval}

+ {this.props.modalsMidval===undefined?"":

{this.props.modalsMidval}

} +

{this.props.modalsBottomval}

{this.props.loadtype===true?
知道啦 diff --git a/public/react/src/modules/tpm/TPMBanner.js b/public/react/src/modules/tpm/TPMBanner.js index a43bacd5e..57dadd858 100644 --- a/public/react/src/modules/tpm/TPMBanner.js +++ b/public/react/src/modules/tpm/TPMBanner.js @@ -347,6 +347,7 @@ class TPMBanner extends Component { Modalstopval: "", modalsMidval:undefined, ModalsBottomval:"", + modalstyles:"", }) } ModalSave = () => { @@ -368,15 +369,29 @@ class TPMBanner extends Component { ModalsBottomval:"卡,学员需要重新体验课程", ModalCancel: this.ModalCancel, 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=()=>{ let id = this.props.match.params.shixunId; let url = `/shixuns/${id}/apply_public.json`; axios.get(url).then((response) => { if(response.data.status===0){ - window.location.reload() + this.ModalSaveopenpublic() + } }).catch((error) => { console.log(error) @@ -791,6 +806,7 @@ class TPMBanner extends Component { modalsBottomval={this.state.ModalsBottomval} modalsMidval={this.state.modalsMidval} loadtype={this.state.Loadtype} + modalstyles={this.state.modalstyles} /> : ""}
diff --git a/public/react/src/modules/tpm/TPMsettings/Configuration.js b/public/react/src/modules/tpm/TPMsettings/Configuration.js index 129ca457c..03720798a 100644 --- a/public/react/src/modules/tpm/TPMsettings/Configuration.js +++ b/public/react/src/modules/tpm/TPMsettings/Configuration.js @@ -115,7 +115,8 @@ export default class Shixuninformation extends Component { onChangeTimePicker = (value, dateString) => { this.setState({ opening_time: dateString === "" ? "" : handleDateStrings(dateString), - opening_timetype:false + opening_timetype:false, + loading: false }) } @@ -133,12 +134,20 @@ export default class Shixuninformation extends Component { 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 url = `/shixuns/${id}/update_permission_setting.json`; axios.post(url, { - scope_partment: scope_partment, + scope_partment: list, shixun: { can_copy: can_copy, use_scope: use_scope, @@ -149,16 +158,6 @@ export default class Shixuninformation extends Component { if (response.data.status === -1) { } else { - - let list=[] - scope_partment.map((item,key)=>{ - list.push(item) - }) - - oldscope_partment.map((item,key)=>{ - list.push(item) - }) - this.props.showNotification("权限配置保存成功!") this.setState({ loading: false, @@ -292,7 +291,6 @@ export default class Shixuninformation extends Component {
- {this.props.data && this.props.data.shixun.use_scope === 0 && this.props.data && this.props.data.shixun.status === 2 ? "" :
公开程度: @@ -371,7 +369,7 @@ export default class Shixuninformation extends Component { -
} +
开启时间: