From b96465c06d4c261363719d36a44964c263de42a5 Mon Sep 17 00:00:00 2001 From: hjm <63528605@qq.com> Date: Mon, 9 Sep 2019 21:03:21 +0800 Subject: [PATCH] saving --- public/react/src/modules/tpm/TPMsettings/TPMsettings.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/public/react/src/modules/tpm/TPMsettings/TPMsettings.js b/public/react/src/modules/tpm/TPMsettings/TPMsettings.js index 0887c4d18..a46654fe6 100644 --- a/public/react/src/modules/tpm/TPMsettings/TPMsettings.js +++ b/public/react/src/modules/tpm/TPMsettings/TPMsettings.js @@ -859,7 +859,8 @@ export default class TPMsettings extends Component { // }); // } submit_edit_shixun = () => { - + if (this.saving == true) return; + this.saving = true; if(this.state.status===-1){ this.props.showSnackbar("该实训已被删除,保存失败!"); return @@ -1002,6 +1003,7 @@ export default class TPMsettings extends Component { axios.put(Url, data).then((response) => { // console.log(response) + this.saving = false; if(response.status){ if (response.data.status === -1) { this.props.showSnackbar(response.data.message); @@ -1013,6 +1015,7 @@ export default class TPMsettings extends Component { }).catch((error) => { console.log(error) + this.saving = false; })