From 44715650dbe5a06c1ff3992e1b2bb9efdfd8297e Mon Sep 17 00:00:00 2001 From: Chengliang <1546584672@qq.com> Date: Wed, 18 May 2022 15:24:46 +0800 Subject: [PATCH] =?UTF-8?q?=E9=9B=86=E5=9B=A2=E7=BC=96=E8=BE=91=E5=8A=9F?= =?UTF-8?q?=E8=83=BD=E5=AE=8C=E5=96=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pc4mobx/organization/apis/group.js | 2 +- pc4mobx/organization/stores/group.js | 43 ++++++++++++++-------------- 2 files changed, 22 insertions(+), 23 deletions(-) diff --git a/pc4mobx/organization/apis/group.js b/pc4mobx/organization/apis/group.js index bb8651c..f5fe312 100644 --- a/pc4mobx/organization/apis/group.js +++ b/pc4mobx/organization/apis/group.js @@ -5,7 +5,7 @@ import { export const edit = (params) => { - return fetch('/api/bs/hrmorganization/scheme/updateScheme', { + return fetch('/api/bs/hrmorganization/group/updateGroup', { method: 'POST', mode: 'cors', headers: { diff --git a/pc4mobx/organization/stores/group.js b/pc4mobx/organization/stores/group.js index 57a5ac6..6901ac8 100644 --- a/pc4mobx/organization/stores/group.js +++ b/pc4mobx/organization/stores/group.js @@ -81,28 +81,27 @@ export class GroupStore { edit() { - - // let params = { ...this.form.getFormParams(), id: this.schemeId }; - // this.form.validateForm().then(f => { - // if (f.isValid) { - // Api.edit(params).then(response => { - // return response.json() - // }).then(data => { - // if (data.code === 200) { - // message.success(data.msg); - // this.getTableInfo(); - // this.setVisible(false); - // } else { - // message.warning(data.msg); - // } - // }).catch(error => { - // message.warning(error.msg); - // }) - // } else { - // f.showErrors(); - // this.setDate(new Date()); - // } - // }); + let params = { ...this.form.getFormParams(), id: 1 }; + this.form.validateForm().then(f => { + if (f.isValid) { + Api.edit(params).then(response => { + return response.json() + }).then(data => { + if (data.code === 200) { + message.success(data.msg); + this.getGroupForm(); + this.setVisible(false); + } else { + message.warning(data.msg); + } + }).catch(error => { + message.warning(error.msg); + }) + } else { + f.showErrors(); + this.setDate(new Date()); + } + }); } getForm() {