Переглянути джерело

Merge remote-tracking branch 'origin/dev' into dev

zhouna 3 роки тому
батько
коміт
4592d42d70

+ 1 - 1
src/components/DataManager/AddData.js

@@ -360,7 +360,7 @@ function AddData(props) {
       <div className='form-center'>
         <Form labelCol={{ span: 4 }} wrapperCol={{ span: 18 }} form={form} name="nest-messages" onFinish={onFinish} initialValues={initialValues} validateMessages={validateMessages}>
           <Form.Item name="name" label="数据权限名称" rules={[{ required: true }]}>
-            <Input placeholder="请填写数据权限名称" style={{ width: 300 }} />
+            <Input placeholder="请填写数据权限名称" style={{ width: 300 }} autoComplete='off'/>
           </Form.Item>
           <Form.Item label="权限范围" rules={[{ required: true }]} >
             <Tabs type="card" onChange={callback}>

+ 24 - 10
src/components/DataManager/index.js

@@ -24,12 +24,18 @@ function DataManager() {
   const [tag, setTag] = useState([[]]);
   const [val, setVal] = useState([]);
   const [size, setSize] = useState(15);
+  const [current, setCurrent] = useState(1);
+  const [params, setParams] = useState({
+    pages: 1,
+    current: 1,
+    size: 15
+  });
   const [form] = Form.useForm();
   const tipText = {
     1: '确定要删除该数据权限?',
     2: '确定要禁用该数据权限?',
   };
-  let params = {
+  let data = {
     pages: 1,
     current: 1,
     size: 15
@@ -49,9 +55,9 @@ function DataManager() {
     }
   }
   //表格数据
-  function getDataAuthPage() {
+  function getDataAuthPage(param) {
     //const param = filterData;
-    post(api.getDataAuthPage, params).then((res) => {
+    post(api.getDataAuthPage, param || params).then((res) => {
       if (res.data.code === 200) {
         const data = res.data.data;
         setUserList(data.records);
@@ -204,15 +210,19 @@ function DataManager() {
     });
   }
   const onFinish = (value) => {
-    params = {
+    const param = {
       ...value,
       ...params
     }
-    getDataAuthPage();
+    setCurrent(1)
+    setParams(param)
+    getDataAuthPage(param);
   };
   const onReset = () => {
+    setCurrent(1)
+    setParams(data)
     form.resetFields();
-    getDataAuthPage();
+    getDataAuthPage(data);
   };
   const messageBox = (type, id) => {
     setMsvisible(true)
@@ -268,11 +278,15 @@ function DataManager() {
     params.current = current
     params.size = pageSize
     setSize(pageSize)
+    setCurrent(current)
+    setParams(params)
     getDataAuthPage()
   }
   function changePage(page, pageSize) {
     params.current = page
     params.size = pageSize
+    setCurrent(page)
+    setParams(params)
     getDataAuthPage()
   }
   if (addVisible && formData) {
@@ -295,12 +309,12 @@ function DataManager() {
           <Row gutter={24}>
             <Col span={5} key={0}>
               <Form.Item label="数据权限名称" name="username">
-                <Input placeholder="用户名" />
+                <Input placeholder="用户名" autoComplete='off'/>
               </Form.Item>
             </Col>
             <Col span={5} key={1}>
               <Form.Item label="所属角色" name="name">
-                <Input placeholder="姓名" />
+                <Input placeholder="姓名" autoComplete='off'/>
               </Form.Item>
             </Col>
             <Col span={5} key={2}>
@@ -339,8 +353,8 @@ function DataManager() {
           scroll={{ y: 'calc(100vh - 320px)' }}
           rowKey={record => record.id + record.roleName}
           pagination={{
-            pageNo: 1,
-            size,
+            current: current,
+            pageSize: size,
             size: 'small',
             showSizeChanger: true,
             pageSizeOptions: ['15', '30', '60', '120'],

+ 24 - 11
src/components/ExceptionLog/index.js

@@ -16,18 +16,23 @@ function ExceptionLog() {
   const [size, setSize] = useState(15);
   const [msvisible, setMsvisible] = useState(false);
   const [tipText, setTipText] = useState('');
-  
+  const [current, setCurrent] = useState(1);
+  const [params, setParams] = useState({
+    pages: 1,
+    current: 1,
+    size: 15
+  });
   const [form] = Form.useForm();
 
   let list = []
-  let params = {
+  let data = {
     pages: 1,
     current: 1,
     size: 15
   }
   //表格数据
-  function getAbnormalLog() {
-    post(api.getAbnormalLog, params).then((res) => {
+  function getAbnormalLog(param) {
+    post(api.getAbnormalLog, param || params).then((res) => {
       if (res.data.code === 200) {
         const data = res.data.data;
         console.log(data);
@@ -42,11 +47,15 @@ function ExceptionLog() {
     params.current = current
     params.size = pageSize
     setSize(pageSize)
+    setCurrent(current)
+    setParams(params)
     getAbnormalLog()
   }
   function changePage(page, pageSize) {
     params.current = page
     params.size = pageSize
+    setCurrent(page)
+    setParams(params)
     getAbnormalLog()
   }
   function showModal(operationWay) {
@@ -72,15 +81,19 @@ function ExceptionLog() {
     })
   }
   const onFinish = (value) => {
-    params = {
-      ...params,
+    const param = {
+      ...data,
       ...value
     }
-    getAbnormalLog();
+    setCurrent(1)
+    setParams(param)
+    getAbnormalLog(param);
   };
   const onReset = () => {
+    setCurrent(1)
+    setParams(data)
     form.resetFields();
-    getAbnormalLog();
+    getAbnormalLog(data);
   };
 
   const columns = [
@@ -118,12 +131,12 @@ function ExceptionLog() {
           <Row gutter={24}>
             <Col span={5} key={0}>
               <Form.Item label="请求方式" name="operationWay">
-                <Input placeholder="请求方式" />
+                <Input placeholder="请求方式" autoComplete='off'/>
               </Form.Item>
             </Col>
             <Col span={5} key={1}>
               <Form.Item label="IP地址" name="operationIp">
-                <Input placeholder="IP地址" />
+                <Input placeholder="IP地址" autoComplete='off'/>
               </Form.Item>
             </Col>
             <Col span={6} key={3}>
@@ -151,7 +164,7 @@ function ExceptionLog() {
           dataSource={logList}
           rowKey={record => record.id}
           pagination={{
-            pageNo: 1,
+            current: current,
             pageSize: size,
             size: 'small',
             showSizeChanger: true,

+ 5 - 5
src/components/InpaManager/addInpa.js

@@ -85,25 +85,25 @@ function AddUser(props) {
             },
           ]}
         >
-          <Input placeholder="请输入病区名称"/>
+          <Input placeholder="请输入病区名称" autoComplete="off"/>
         </Form.Item>
         <Form.Item
           name="code"
           label="病区编码"
         >
-          <Input placeholder="请输入病区编码" />
+          <Input placeholder="请输入病区编码" autoComplete="off"/>
         </Form.Item>
         <Form.Item
           name="liaison"
           label="联系人"
         >
-          <Input placeholder="请输入姓名" />
+          <Input placeholder="请输入姓名" autoComplete="off"/>
         </Form.Item>
         <Form.Item
           name="phoneNumber"
           label="手机号码"
         >
-          <Input placeholder="请输入手机号码" />
+          <Input placeholder="请输入手机号码" autoComplete="off"/>
         </Form.Item>
         <Form.Item
           name="station"
@@ -116,7 +116,7 @@ function AddUser(props) {
           name="orderNo"
           label="排序"
         >
-          <Input placeholder="大于0的整数" />
+          <Input placeholder="大于0的整数" autoComplete="off"/>
         </Form.Item>
         <Form.Item
           name="status"

+ 26 - 12
src/components/InpaManager/index.js

@@ -8,7 +8,7 @@ import { useSelector } from 'react-redux'
 import InpaContext from './inpa-context';
 import utils from '@utils/index'
 const { post, api, xPost } = apiObj;
-const { organizationData } = utils;
+const { organizationData, getValueFromEvent } = utils;
 const { Option } = Select;
 function InpaManager() {
   useEffect(() => {
@@ -28,10 +28,16 @@ function InpaManager() {
   const [username, setUsername] = useState(null);
   const [total, setTotal] = useState(0);
   const [size, setSize] = useState(15);
+  const [current, setCurrent] = useState(1);
+  const [params, setParams] = useState({
+    pages: 1,
+    current: 1,
+    size: 15
+  });
   const { user, sysName } = useSelector((state) => {
     return state.userInfo;
   });
-  let params = {
+  let data = {
     pages: 1,
     current: 1,
     size: 15
@@ -62,8 +68,8 @@ function InpaManager() {
     }
   }
   //表格数据
-  function getRegion() {
-    post(api.getRegion, params).then((res) => {
+  function getRegion(param) {
+    post(api.getRegion, param || params).then((res) => {
       if (res.data.code === 200) {
         const data = res.data.data;
         setUserList(data.records);
@@ -132,15 +138,19 @@ function InpaManager() {
     });
   }
   const onFinish = (value) => {
-    params = {
-      ...params,
+    const param = {
+      ...data,
       ...value
     }
-    getRegion();
+    setCurrent(1)
+    setParams(param)
+    getRegion(param);
   };
   const onReset = () => {
+    setCurrent(1)
+    setParams(data)
     form.resetFields();
-    getRegion();
+    getRegion(data);
   };
   const messageBox = (type, id) => {
     setMsvisible(true)
@@ -175,11 +185,15 @@ function InpaManager() {
     params.current = current
     params.size = pageSize
     setSize(pageSize)
+    setCurrent(current)
+    setParams(params)
     getRegion()
   }
   function changePage(page, pageSize) {
     params.current = page
     params.size = pageSize
+    setCurrent(page)
+    setParams(params)
     getRegion()
   }
   const columns = [
@@ -234,8 +248,8 @@ function InpaManager() {
         >
           <Row gutter={24}>
             <Col span={5} key={0}>
-              <Form.Item label="病区名称" name="name">
-                <Input placeholder="病区名称" />
+              <Form.Item label="病区名称" name="name" getValueFromEvent={getValueFromEvent}>
+                <Input placeholder="病区名称" autoComplete="off"/>
               </Form.Item>
             </Col>
             {/* <Col span={5} key={1}>
@@ -296,8 +310,8 @@ function InpaManager() {
           dataSource={userList}
           rowKey={record => record.id}
           pagination={{
-            pageNo: 1, 
-            size,
+            current: current,
+            pageSize: size,
             size: 'small',
             showSizeChanger: true,
             pageSizeOptions: ['15', '30', '60', '120'],

+ 24 - 10
src/components/LoginLog/index.js

@@ -13,17 +13,23 @@ function LoginLog() {
   const [logList, setLogList] = useState([]);
   const [total, setTotal] = useState(0);
   const [size, setSize] = useState(15);
+  const [current, setCurrent] = useState(1);
+  const [params, setParams] = useState({
+    pages: 1,
+    current: 1,
+    size: 15
+  });
   const [form] = Form.useForm();
 
   let list = []
-  let params = {
+  let data = {
     pages: 1,
     current: 1,
     size: 15
   }
   //表格数据
-  function getLoginLog() {
-    post(api.getLoginLog, params).then((res) => {
+  function getLoginLog(param) {
+    post(api.getLoginLog, param || params).then((res) => {
       if (res.data.code === 200) {
         const data = res.data.data;
         setLogList(data.records);
@@ -36,23 +42,31 @@ function LoginLog() {
     params.current = current
     params.size = pageSize
     setSize(pageSize)
+    setCurrent(current)
+    setParams(params)
     getLoginLog()
   }
   function changePage(page, pageSize) {
     params.current = page
     params.size = pageSize
+    setCurrent(page)
+    setParams(params)
     getLoginLog()
   }
   const onFinish = (value) => {
-    params = {
-      ...params,
+    const param = {
+      ...data,
       ...value
     }
-    getLoginLog();
+    setCurrent(1)
+    setParams(param)
+    getLoginLog(param);
   };
   const onReset = () => {
+    setCurrent(1)
+    setParams(data)
     form.resetFields();
-    getLoginLog();
+    getLoginLog(data);
   };
 
   const columns = [
@@ -75,12 +89,12 @@ function LoginLog() {
           <Row gutter={24}>
             <Col span={5} key={0}>
               <Form.Item label="登录名" name="loginName">
-                <Input placeholder="登录名" />
+                <Input placeholder="登录名" autoComplete='off'/>
               </Form.Item>
             </Col>
             <Col span={5} key={1}>
               <Form.Item label="IP地址" name="loginIp">
-                <Input placeholder="IP地址" />
+                <Input placeholder="IP地址" autoComplete='off' />
               </Form.Item>
             </Col>
             <Col span={6} key={3}>
@@ -108,7 +122,7 @@ function LoginLog() {
           dataSource={logList}
           rowKey={record => record.id}
           pagination={{
-            pageNo: 1,
+            current: current,
             pageSize: size,
             size: 'small',
             showSizeChanger: true,

+ 23 - 10
src/components/OperationLog/index.js

@@ -13,17 +13,23 @@ function OperationLog() {
   const [logList, setLogList] = useState([]);
   const [total, setTotal] = useState(0);
   const [size, setSize] = useState(15);
+  const [current, setCurrent] = useState(1);
+  const [params, setParams] = useState({
+    pages: 1,
+    current: 1,
+    size: 15
+  });
   const [form] = Form.useForm();
 
   let list = []
-  let params = {
+  let data = {
     pages: 1,
     current: 1,
     size: 15
   }
   //表格数据
-  function getOperationLog() {
-    post(api.getOperationLog, params).then((res) => {
+  function getOperationLog(param) {
+    post(api.getOperationLog, param || params).then((res) => {
       if (res.data.code === 200) {
         const data = res.data.data;
         setLogList(data.records);
@@ -31,16 +37,19 @@ function OperationLog() {
       }
     })
   }
-
   function onSizeChange(current, pageSize) {
     params.current = current
     params.size = pageSize
     setSize(pageSize)
+    setCurrent(current)
+    setParams(params)
     getOperationLog()
   }
   function changePage(page, pageSize) {
     params.current = page
     params.size = pageSize
+    setParams(params)
+    setCurrent(page)
     getOperationLog()
   }
 
@@ -49,15 +58,19 @@ function OperationLog() {
       value.startDate = moment(value.time[0]).format('YYYY-MM-DD HH:mm:ss')
       value.endDate = moment(value.time[1]).format('YYYY-MM-DD HH:mm:ss') 
     }
-    params = {
-      ...params,
+    const param = {
+      ...data,
       ...value,
     }
-    getOperationLog();
+    setCurrent(1)
+    setParams(param)
+    getOperationLog(param);
   };
   const onReset = () => {
+    setCurrent(1)
+    setParams(data)
     form.resetFields();
-    getOperationLog();
+    getOperationLog(data);
   };
   const columns = [
     { title: '编号', dataIndex: 'operationId', key: 'index' },
@@ -85,7 +98,7 @@ function OperationLog() {
           <Row gutter={24}>
             <Col span={5} key={0}>
               <Form.Item label="操作人" name="operationName">
-                <Input placeholder="用户名" />
+                <Input placeholder="用户名" autoComplete='off'/>
               </Form.Item>
             </Col>
             <Col span={5} key={1}>
@@ -122,9 +135,9 @@ function OperationLog() {
           dataSource={logList}
           rowKey={record => record.id}
           pagination={{
-            pageNo: 1,
             pageSize: size,
             size: 'small',
+            current: current,
             showSizeChanger: true,
             pageSizeOptions: ['15', '30', '60', '120'],
             showTotal: (total, range) => `第${range[0]}-${range[1]} 条/共 ${total} 条数据`,

+ 3 - 3
src/components/OrgManager/index.js

@@ -7,7 +7,7 @@ import './index.less';
 import apiObj from '@api/index';
 import OrgContext from './org-context';
 import utils from '@utils/index'
-const { pickCheckedTreeIds } = utils;
+const { pickCheckedTreeIds, getValueFromEvent } = utils;
 const { post, api, xPost } = apiObj;
 const { Option } = Select;
 function OrgManager() {
@@ -387,8 +387,8 @@ function OrgManager() {
                 <Form form={form} name="control-hooks" onFinish={onFinish}>
                     <Row gutter={24}>
                         <Col span={5} key={0}>
-                            <Form.Item name="hospitalName" label="组织名称">
-                                <Input placeholder='组织名称' />
+                            <Form.Item name="hospitalName" label="组织名称" getValueFromEvent={getValueFromEvent}>
+                                <Input placeholder='组织名称' autoComplete="off"/>
                             </Form.Item>
                         </Col>
                         <Col span={5} key={1}>

+ 4 - 1
src/components/RoleManager/AddRole.js

@@ -22,6 +22,9 @@ function AddRole(props){
     function getChange(){
         setIsChange(true)
     }
+    function handleCancel() {
+        setVisible(false)
+    }
     const goback = () => {
         if ((form.getFieldsValue().name != undefined || isChange) && !detail) {
             setVisible(true)
@@ -47,7 +50,7 @@ function AddRole(props){
                 width={400}
                 visible={visible}
                 onOk={handleOk}
-                onCancel={goback}
+                onCancel={handleCancel}
             >
                 <p>您还有内容未保存,确定要退出?</p>
             </Modal>

+ 25 - 12
src/components/RoleManager/index.js

@@ -8,9 +8,8 @@ import './index.less';
 import apiObj from '@api/index';
 import RoleContext from './role-context';
 import utils from '@utils/index'
-
 const {post,api,xPost} = apiObj;
-const { pickCheckedTreeIds } = utils;
+const { pickCheckedTreeIds, getValueFromEvent } = utils;
 const { Option } = Select;
 function RoleManager(){
     useEffect(() => {
@@ -27,6 +26,12 @@ function RoleManager(){
     const [operId,setOperId] = useState('');    //当前操作的角色id
     const [total, setTotal] = useState(0);
     const [size, setSize] = useState(15);
+    const [current, setCurrent] = useState(1);
+    const [params, setParams] = useState({
+        pages: 1,
+        current: 1,
+        size: 15
+    });
     //从state中取出状态、类型列表
     const staticInfo =useSelector(state => {
         return state.staticInfo;
@@ -38,14 +43,14 @@ function RoleManager(){
         3:'确定要禁用该角色?',
         4:'当前角色存在用户,禁用后用户将一并被禁用',
     };
-    let params = {
+    let data = {
         pages: 1,
         current: 1,
         size: 15
     }
     //获取表格数据
-    function getTableData(){
-        post(api.getRolePage, params).then((res)=>{
+    function getTableData(param){
+        post(api.getRolePage, param || params).then((res)=>{
             if(res.data.code===200){
                 const data = res.data.data;
                 setDataSource(data.records);
@@ -169,11 +174,15 @@ function RoleManager(){
         params.current = current
         params.size = pageSize
         setSize(pageSize)
+        setCurrent(current)
+        setParams(params)
         getTableData()
     }
     function changePage(page, pageSize) {
         params.current = page
         params.size = pageSize
+        setCurrent(page)
+        setParams(params)
         getTableData()
     }
     //表格渲染
@@ -204,8 +213,8 @@ function RoleManager(){
                 columns={columns}
                 dataSource={dataSource}
                 pagination={{
-                    pageNo: 1,
-                    size,
+                    current: current,
+                    pageSize: size,
                     size: 'small',
                     showSizeChanger: true,
                     pageSizeOptions: ['15', '30', '60', '120'],
@@ -220,15 +229,19 @@ function RoleManager(){
     //筛选项渲染
     const [form] = Form.useForm();
     const onFinish = (values) => {
-        params = {
-            ...values,
+        const param = {
+            ...data,
             ...params
         }
-        getTableData();
+        setCurrent(1)
+        setParams(param)
+        getTableData(param);
     };
     const onReset = () => {
+        setCurrent(1)
+        setParams(data)
         form.resetFields();
-        getTableData();
+        getTableData(data);
     };
     if(addVisible){
         return (
@@ -243,7 +256,7 @@ function RoleManager(){
                 <Form form={form} name="control-hooks" onFinish={onFinish}>
                     <Row gutter={24}>
                         <Col span={5} key={0}>
-                            <Form.Item name="name" label="角色名称">
+                            <Form.Item name="name" label="角色名称" getValueFromEvent={getValueFromEvent}>
                                 <Input placeholder='角色名称' autoComplete='off'/>
                             </Form.Item>
                         </Col>

+ 8 - 8
src/components/UserManager/addUser.js

@@ -198,7 +198,7 @@ function AddUser(props) {
           {type == 3 ?
             <span>{initialValues.username}</span>
             :
-            <Input placeholder="用户名是组织中唯一标识,请勿重复" />
+            <Input placeholder="用户名是组织中唯一标识,请勿重复" autoComplete='off'/>
           }
 
         </Form.Item>
@@ -215,7 +215,7 @@ function AddUser(props) {
           {type == 3 ?
             <span>{initialValues.mobilePhone}</span>
             :
-            <Input placeholder="请输入手机号码" />
+            <Input placeholder="请输入手机号码" autoComplete='off'/>
           }
 
         </Form.Item>
@@ -239,7 +239,7 @@ function AddUser(props) {
           {type == 3 ?
             <span>{initialValues.password}</span>
             :
-            <Input.Password placeholder="8-12位大小写字母、数字、特殊字符" />
+            <Input.Password placeholder="8-12位大小写字母、数字、特殊字符" autoComplete='off'/>
           }
         </Form.Item>
         <Form.Item
@@ -264,7 +264,7 @@ function AddUser(props) {
           {type == 3 ?
             <span>{initialValues.password}</span>
             :
-            <Input.Password placeholder="8-12位大小写字母、数字、特殊字符" />
+            <Input.Password placeholder="8-12位大小写字母、数字、特殊字符" autoComplete='off'/>
           }
         </Form.Item>
         <Form.Item
@@ -275,7 +275,7 @@ function AddUser(props) {
           {type == 3 ?
             <span>{initialValues.name}</span>
             :
-            <Input placeholder="请输入姓名" />
+            <Input placeholder="请输入姓名" autoComplete='off'/>
           }
 
         </Form.Item>
@@ -286,7 +286,7 @@ function AddUser(props) {
           {type == 3 ?
             <span>{initialValues.idcard}</span>
             :
-            <Input placeholder="请输入身份证号码" />
+            <Input placeholder="请输入身份证号码" autoComplete='off'/>
           }
 
         </Form.Item>
@@ -330,7 +330,7 @@ function AddUser(props) {
           {type == 3 ?
             <span>{initialValues.jobNo}</span>
             :
-            <Input placeholder="请输入工号" />
+            <Input placeholder="请输入工号" autoComplete='off'/>
           }
 
         </Form.Item>
@@ -367,7 +367,7 @@ function AddUser(props) {
           {type == 3 ?
             <span>{initialValues.orderNo}</span>
             :
-            <Input placeholder="大于0的整数" />
+            <Input placeholder="大于0的整数" autoComplete='off'/>
           }
 
         </Form.Item>

+ 29 - 13
src/components/UserManager/index.js

@@ -6,6 +6,8 @@ import '@common/common.less';
 import { useSelector } from 'react-redux'
 import apiObj from '@api/index';
 import UserContext from './user-context';
+import utils from '@utils/index'
+const { getValueFromEvent } = utils;
 const { post, api, xPost } = apiObj;
 const { Option } = Select;
 function UserManager() {
@@ -24,6 +26,12 @@ function UserManager() {
   const [roleList, setRoleList] = useState([]);
   const [size, setSize] = useState(15);
   const [total, setTotal] = useState(0);
+  const [current, setCurrent] = useState(1);
+  const [params, setParams] = useState({
+    pages: 1,
+    current: 1,
+    size: 15
+  });
   const [form] = Form.useForm();
   const tipText = {
     1: '确定要删除该用户?',
@@ -34,7 +42,7 @@ function UserManager() {
     return state.staticInfo;
   });
   let list = []
-  let params = {
+  let data = {
     pages: 1,
     current: 1,
     size: 15
@@ -56,8 +64,8 @@ function UserManager() {
     }
   }
   //表格数据
-  function getUserPage() {
-    post(api.getUserPage, params).then((res) => {
+  function getUserPage(param) {
+    post(api.getUserPage, param || params).then((res) => {
       if (res.data.code === 200) {
         const data = res.data.data;
         setUserList(data.records);
@@ -164,23 +172,31 @@ function UserManager() {
     params.current = current
     params.size = pageSize
     setSize(pageSize)
+    setCurrent(current)
+    setParams(params)
     getUserPage()
   }
   function changePage(page, pageSize) {
     params.current = page
     params.size = pageSize
+    setCurrent(page)
+    setParams(params)
     getUserPage()
   }
   const onFinish = (value) => {
-    params = {
-      ...params,
+    const param = {
+      ...data,
       ...value
     }
-    getUserPage();
+    setCurrent(1)
+    setParams(param)
+    getUserPage(param);
   };
   const onReset = () => {
+    setCurrent(1)
+    setParams(data)
     form.resetFields();
-    getUserPage();
+    getUserPage(data);
   };
   const messageBox = (type, id) => {
     setMsvisible(true)
@@ -269,13 +285,13 @@ function UserManager() {
         >
           <Row gutter={24}>
             <Col span={5} key={0}>
-              <Form.Item label="用户名" name="username">
-                <Input placeholder="用户名" />
+              <Form.Item label="用户名" name="username" getValueFromEvent={getValueFromEvent}>
+                <Input placeholder="用户名" autoComplete='off'/>
               </Form.Item>
             </Col>
             <Col span={5} key={1}>
-              <Form.Item label="姓名" name="name">
-                <Input placeholder="姓名" />
+              <Form.Item label="姓名" name="name" getValueFromEvent={getValueFromEvent}>
+                <Input placeholder="姓名" autoComplete='off'/>
               </Form.Item>
             </Col>
             <Col span={5} key={2}>
@@ -317,8 +333,8 @@ function UserManager() {
           dataSource={userList}
           rowKey={record => record.userId + record.hospitalName}
           pagination={{
-            pageNo: 1,
-            size,
+            current: current,
+            pageSize: size,
             size: 'small',
             showSizeChanger: true,
             pageSizeOptions: ['15', '30', '60', '120'],

+ 5 - 2
src/utils/index.js

@@ -63,12 +63,15 @@ function getTimeDetail() {
     let str = `${d.getFullYear()}年${d.getMonth() + 1}月${d.getDate()}日 / ${days[d.getDay()]} / ${hour > 9 ? hour : '0' + hour}:${min > 9 ? min : '0' + min}:${sec > 9 ? sec : '0' + sec}`
     return str;
 }
-
+function getValueFromEvent(e) {
+    return e.target.value.replace(/(^\s*)|(\s*$)/g, '');
+}
 const obj = {
     handleResponse,
     pickCheckedTreeIds,
     organizationData,
     getTimeDetail,
-    unique
+    unique,
+    getValueFromEvent
 };
 export default obj;