From 36f8dca46f65eb6b5be4459999cb122c98af7967 Mon Sep 17 00:00:00 2001 From: shaot Date: Mon, 11 Aug 2025 18:11:44 +0800 Subject: [PATCH] =?UTF-8?q?feat(=E5=89=8D=E7=AB=AF):=E7=BB=88=E7=AB=AF?= =?UTF-8?q?=E7=BB=91=E5=AE=9A=E7=94=A8=E6=88=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pages/terminal/mod/bindImage/index.tsx | 40 ++++++++----- .../src/pages/terminal/mod/bindUser/index.tsx | 59 +++++++++++-------- .../pages/terminal/mod/eidtDevice/index.tsx | 44 +++++++++----- .../terminal/mod/selectedTable/table.tsx | 2 +- .../src/pages/userList/mod/eidtUser/index.tsx | 52 ++++++++++------ web-fe/src/pages/userList/mod/group/index.tsx | 42 ++++++++----- 6 files changed, 151 insertions(+), 88 deletions(-) diff --git a/web-fe/src/pages/terminal/mod/bindImage/index.tsx b/web-fe/src/pages/terminal/mod/bindImage/index.tsx index ee3f8f6..ac5569f 100644 --- a/web-fe/src/pages/terminal/mod/bindImage/index.tsx +++ b/web-fe/src/pages/terminal/mod/bindImage/index.tsx @@ -60,24 +60,26 @@ const BindUserModal: React.FC = ({ destroyOnHidden={true} cancelText="取消" okText="确定" - footer={ -
- - -
- } + footer={null} + // footer={ + //
+ // + // + //
+ // } >
= ({ > */} + + + +
diff --git a/web-fe/src/pages/terminal/mod/bindUser/index.tsx b/web-fe/src/pages/terminal/mod/bindUser/index.tsx index 58e3747..d209333 100644 --- a/web-fe/src/pages/terminal/mod/bindUser/index.tsx +++ b/web-fe/src/pages/terminal/mod/bindUser/index.tsx @@ -9,8 +9,6 @@ import SelectedTable from '../selectedTable'; import styles from './index.less'; interface UserEditModalProps { - // visible: boolean; - // orgTreeData?: User.OrganizationNode[]; onCancel: () => void; onOk: (values?: any) => void; confirmLoading?: boolean; @@ -26,7 +24,7 @@ const BindUserModal: React.FC = ({ dataDetial, }) => { const { recordData, visible } = dataDetial || {}; - const { device_id, device_group_id } = recordData || {}; + const { device_id } = recordData || {}; const [orgTreeData, setOrgTreeData] = useState([]); const [form] = Form.useForm(); @@ -98,7 +96,6 @@ const BindUserModal: React.FC = ({ user_id: record_id, id: id, device_id, - device_group_id, type: type, }); } else { @@ -107,7 +104,6 @@ const BindUserModal: React.FC = ({ user_group_id: record_id, id: id, device_id: device_id, - device_group_id, type: type, }); } @@ -116,14 +112,17 @@ const BindUserModal: React.FC = ({ data: list, }; bindUserAdd(payload) - .then(() => { - message.success('绑定成功'); - onOk(); + .then((res: any) => { + const { code } = res || {}; + if (code === ERROR_CODE) { + message.success('绑定成功'); + onOk(); + } else { + message.error('绑定失败'); + } }) .catch(() => {}); } - console.log('list=====', list); - onOk(list); } catch (error) { message.error('请检查表单字段'); } @@ -142,24 +141,26 @@ const BindUserModal: React.FC = ({ destroyOnHidden={true} cancelText="取消" okText="确定" - footer={ -
- - -
- } + footer={null} + // footer={ + //
+ // + // + //
+ // } >
= ({ > */} + + + +
diff --git a/web-fe/src/pages/terminal/mod/eidtDevice/index.tsx b/web-fe/src/pages/terminal/mod/eidtDevice/index.tsx index a808cbb..b6a8915 100644 --- a/web-fe/src/pages/terminal/mod/eidtDevice/index.tsx +++ b/web-fe/src/pages/terminal/mod/eidtDevice/index.tsx @@ -44,7 +44,7 @@ const UserEditModal: React.FC = ({ const { code } = res || {}; if (code === ERROR_CODE) { message.success('保存成功'); - onOk(); + if (onOk) onOk(); } } catch (error) { message.error('保存失败'); @@ -76,23 +76,25 @@ const UserEditModal: React.FC = ({ cancelText="取消" okText="确定" // 按钮居中对其 - footer={ -
- - -
- } + footer={null} + // footer={ + //
+ // + // + //
+ // } >
= ({ > - - + + = ({ > + + + + + ); diff --git a/web-fe/src/pages/userList/mod/group/index.tsx b/web-fe/src/pages/userList/mod/group/index.tsx index 443a006..bc24cf7 100644 --- a/web-fe/src/pages/userList/mod/group/index.tsx +++ b/web-fe/src/pages/userList/mod/group/index.tsx @@ -80,21 +80,22 @@ const CreatGroup: React.FC = (props) => { centered={true} destroyOnHidden={true} width={600} - footer={ -
- - -
- } + footer={null} + // footer={ + //
+ // + // + //
+ // } >
= (props) => { fieldNames={{ label: 'name', value: 'id', children: 'children' }} /> + + + +