From e0506a6b8bf45b36f83432897b1c122560289427 Mon Sep 17 00:00:00 2001 From: txb Date: Fri, 8 Jul 2022 14:41:09 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9E=20fix(=E4=BF=AE=E6=94=B9bug):=20?= =?UTF-8?q?=E4=BF=AE=E6=94=B9bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 修改bug 修改bug --- src/pages/sys/roles/index.jsx | 17 +++++++++------- src/pages/sys/roles/service.js | 2 +- .../sysSettings/components/EnterpriseLog.jsx | 20 +------------------ src/pages/sys/user/components/CreateForm.jsx | 2 +- 4 files changed, 13 insertions(+), 28 deletions(-) diff --git a/src/pages/sys/roles/index.jsx b/src/pages/sys/roles/index.jsx index 5c64735..fc45686 100644 --- a/src/pages/sys/roles/index.jsx +++ b/src/pages/sys/roles/index.jsx @@ -55,13 +55,14 @@ const handleUpdate = async (fields) => { * 删除节点 * @param selectedRows */ -const handleRemove = async (selectedRows) => { +const handleRemove = async (record) => { const hide = message.loading('正在删除'); - if (!selectedRows) return true; + if (!record) return true; try { - await removeRole(selectedRows.map((row) => row.id)); + await removeRole([record.id]).then(r => { + message.success(r.data); + }) hide(); - message.success('删除成功,即将刷新'); return true; } catch (error) { hide(); @@ -160,9 +161,11 @@ const roleManager = () => { disabled={record.code == 'sys_manager_role'} style={{ pointerEvents: record.code == 'sys_manager_role' ? 'none' : 'auto' }} onClick={() => { - removeRole([record.id]).then(r => { - actionRef.current.reload(); - }) + handleRemove(record); + // removeRole([record.id]).then(r => { + // message.success(r); + // actionRef.current.reload(); + // }) }} > 删除 diff --git a/src/pages/sys/roles/service.js b/src/pages/sys/roles/service.js index 92fa5c9..06a7d03 100644 --- a/src/pages/sys/roles/service.js +++ b/src/pages/sys/roles/service.js @@ -28,7 +28,7 @@ export async function add(params) { } //修改 export async function edit(params) { - return request('/kitchen/api/role/update', { + return request('/kitchen/api​/role/update', { method: 'POST', data: { ...params, diff --git a/src/pages/sys/sysSettings/components/EnterpriseLog.jsx b/src/pages/sys/sysSettings/components/EnterpriseLog.jsx index dbd9a00..9747674 100644 --- a/src/pages/sys/sysSettings/components/EnterpriseLog.jsx +++ b/src/pages/sys/sysSettings/components/EnterpriseLog.jsx @@ -88,31 +88,13 @@ const EnterpriseLog = () => { }; }, }; - - const getAvatarURL = () => { - if (CompanyInfo) { - if (CompanyInfo.logo) { - console.log(url); - setUrl(CompanyInfo.logo); - return CompanyInfo.logo; - } - setUrl('https://gw.alipayobjects.com/zos/rmsportal/BiazfanxmamNRoxxVxka.png'); - const url1 = 'https://gw.alipayobjects.com/zos/rmsportal/BiazfanxmamNRoxxVxka.png'; - - return url1; - } - setUrl(''); - return ''; - }; - return (
{loading ? null : ( <>
diff --git a/src/pages/sys/user/components/CreateForm.jsx b/src/pages/sys/user/components/CreateForm.jsx index 7aef5ee..d865e80 100644 --- a/src/pages/sys/user/components/CreateForm.jsx +++ b/src/pages/sys/user/components/CreateForm.jsx @@ -40,7 +40,7 @@ const CreateForm = (props) => { - +