From 362681c7d3fed99e5772cb1defd3d754ab5f973a Mon Sep 17 00:00:00 2001
From: luxiaotao1123 <t1341870251@163.com>
Date: 星期三, 21 二月 2024 13:51:34 +0800
Subject: [PATCH] #

---
 zy-asrs-flow/src/pages/system/user/components/edit.jsx |   42 ++++++++++++++++++++++++++++++++----------
 zy-asrs-flow/src/pages/system/user/index.jsx           |    6 +++---
 2 files changed, 35 insertions(+), 13 deletions(-)

diff --git a/zy-asrs-flow/src/pages/system/user/components/edit.jsx b/zy-asrs-flow/src/pages/system/user/components/edit.jsx
index cf44e7d..7f2edd7 100644
--- a/zy-asrs-flow/src/pages/system/user/components/edit.jsx
+++ b/zy-asrs-flow/src/pages/system/user/components/edit.jsx
@@ -4,7 +4,7 @@
     ProFormDigit,
     ProFormText,
     ProFormSelect,
-    ProFormDateTimePicker
+    ProFormTreeSelect
 } from '@ant-design/pro-components';
 import { Form, Modal } from 'antd';
 import moment from 'moment';
@@ -57,18 +57,19 @@
                         hidden={true}
                     />
                     <ProForm.Group>
-                        <ProFormSelect
+                        <ProFormTreeSelect
                             name="deptId"
                             label="鎵�灞為儴闂�"
-                            colProps={{ md: 12, xl: 12 }}
-                            fieldProps={{ precision: 0 }}
-                            placeholder="璇烽�夋嫨"
-                            showSearch
-                            debounceTime={300}
-                            request={async ({ keyWords }) => {
-                                const resp = await Http.doPostForm('api/dept/query', { condition: keyWords });
-                                return resp.data;
+                            params={props.treeData}
+                            request={async () => {
+                                return props.treeData;
                             }}
+                            colProps={{ md: 12, xl: 12 }}
+                            placeholder="璇烽�夋嫨"
+                            fieldProps={{
+                                treeDefaultExpandedKeys: [0]
+                            }}
+                            rules={[{ required: true, message: "鎵�灞為儴闂ㄤ笉鑳戒负绌�" }]}
                         />
                         <ProFormText
                             name="nickname"
@@ -100,12 +101,33 @@
                             label="鎵嬫満鍙�"
                             colProps={{ md: 12, xl: 12 }}
                             placeholder="璇疯緭鍏�"
+                            ules={[
+                                {
+                                  pattern: /^1[3456789]\d{9}$/,
+                                  message: '璇疯緭鍏ユ纭殑鎵嬫満鍙风爜!',
+                                },
+                                {
+                                  required: false,
+                                  message: '鎵嬫満鍙风爜涓嶈兘涓虹┖!',
+                                },
+                              ]}
+                            
                         />
                         <ProFormText
                             name="email"
                             label="閭"
                             colProps={{ md: 12, xl: 12 }}
                             placeholder="璇疯緭鍏�"
+                            rules={[
+                                {
+                                  type: 'email',
+                                  message: '璇疯緭鍏ユ纭殑閭鍦板潃!',
+                                },
+                                {
+                                  required: false,
+                                  message: '閭涓嶈兘涓虹┖!',
+                                },
+                              ]}
                         />
                     </ProForm.Group>
                     <ProForm.Group>
diff --git a/zy-asrs-flow/src/pages/system/user/index.jsx b/zy-asrs-flow/src/pages/system/user/index.jsx
index a5c0d6a..18fafb5 100644
--- a/zy-asrs-flow/src/pages/system/user/index.jsx
+++ b/zy-asrs-flow/src/pages/system/user/index.jsx
@@ -125,12 +125,11 @@
             width: 30,
         },
         {
-            title: '鏄电О',
+            title: '鍚嶇О',
             dataIndex: 'nickname',
             valueType: 'text',
             hidden: false,
             width: 100,
-            copyable: true,
             filterDropdown: (props) => <TextFilter
                 name='nickname'
                 {...props}
@@ -139,7 +138,7 @@
             />,
         },
         {
-            title: '璐﹀彿',
+            title: '鐧诲綍璐﹀彿',
             dataIndex: 'username',
             valueType: 'text',
             hidden: false,
@@ -587,6 +586,7 @@
                 <Edit
                     open={modalVisible}
                     values={currentRow || {}}
+                    treeData={deptTreeData}
                     onCancel={
                         () => {
                             setModalVisible(false);

--
Gitblit v1.9.1