From d8bdf1898964cb4bdb60b759a0e7b0b660510281 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E2=80=98lijianhao=E2=80=99?=
Date: Fri, 22 Jul 2022 10:08:27 +0800
Subject: [PATCH] =?UTF-8?q?'=E7=94=A8=E6=88=B7=E7=AE=A1=E7=90=86=E6=A0=B7?=
=?UTF-8?q?=E5=BC=8F=E8=B0=83=E6=95=B4'?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../organization/components/depModal.js | 2 +
.../organization/components/userModal.js | 69 +++++++++----------
.../sections/organization/containers/user.js | 16 ++---
.../containers/footer/conserve/index.js | 7 +-
.../sections/quanju/containers/heand/index.js | 12 ++--
5 files changed, 55 insertions(+), 51 deletions(-)
diff --git a/web/client/src/sections/organization/components/depModal.js b/web/client/src/sections/organization/components/depModal.js
index 3fa50520..56f341b4 100644
--- a/web/client/src/sections/organization/components/depModal.js
+++ b/web/client/src/sections/organization/components/depModal.js
@@ -68,6 +68,7 @@ const DepModal = (props) => {
function mapStateToProps(state) {
const { depMessage } = state;
+ console.log('depMessage:',depMessage);
const pakData = (dep) => {
return dep.map((d) => {
return {
@@ -79,6 +80,7 @@ function mapStateToProps(state) {
})
}
let depData = pakData(depMessage.data || [])
+ console.log('depData:',depData);
return {
loading: depMessage.isRequesting,
depData,
diff --git a/web/client/src/sections/organization/components/userModal.js b/web/client/src/sections/organization/components/userModal.js
index babe35ea..d02af61a 100644
--- a/web/client/src/sections/organization/components/userModal.js
+++ b/web/client/src/sections/organization/components/userModal.js
@@ -48,23 +48,23 @@ const UserModal = (props) => {
placeholder="请输入姓名"
rules={[{ required: true, message: '请输入姓名' }]}
/>
- {
- return event.target.value
+ return event.target.value.replace(/\D/g, '')
}}
- placeholder="请输入用户名"
+ placeholder="请输入手机号(用户名)"
rules={[
- { required: true }
+ { required: true, valueType: Number, max: 11 }, { pattern: /^1([358][0-9]|4[579]|66|7[0135678]|9[89])[0-9]{8}$/, message: "请输入正确的手机号" }
]}
/>
+
{
}}
expandedKeys={["title"]}
/>
- < ProFormText
- name={['contract', 'phone']}
+ {modalType == 'edit' ? null : {
- return event.target.value.replace(/\D/g, '')
+ autocomplete: 'new-password'
}}
- placeholder="请输入手机号"
rules={[
- { required: true, valueType: Number, max: 11 }, { pattern: /^1([358][0-9]|4[579]|66|7[0135678]|9[89])[0-9]{8}$/, message: "请输入正确的手机号" }
+ { required: true, message: '请填写密码' },
+ { min: 6, message: '请填写至少6位密码' },
]}
- />
+ />}
+ {/* {
+ return event.target.value
+ }}
+ placeholder="请输入职位"
+ // rules={[
+ // { required: true }
+ // ]}
+ /> */}
+
{
{ type: 'email', message: '请输入正确格式的邮箱' },
]}
/>
- {modalType == 'edit' ? null : }
-
-
{
function mapStateToProps(state) {
const { depMessage } = state;
- console.log('depMessage:',depMessage);
+ console.log('depMessage:', depMessage);
const pakData = (dep) => {
// console.log(dep);
return dep.map((d) => {
@@ -171,7 +169,6 @@ function mapStateToProps(state) {
})
}
let depData = pakData(depMessage.data || [])
-
return {
loading: depMessage.isRequesting,
depData,
diff --git a/web/client/src/sections/organization/containers/user.js b/web/client/src/sections/organization/containers/user.js
index b8c21ae6..79945530 100644
--- a/web/client/src/sections/organization/containers/user.js
+++ b/web/client/src/sections/organization/containers/user.js
@@ -21,6 +21,8 @@ const UserManage = (props) => {
const [depModalVisible, setDepModalVisible] = useState(false);
const [depModalType, setDepModalType] = useState();
const [depModalRecord, setDepModalRecord] = useState();
+ const [selectedTree, setSelectedTree] = useState();
+
useEffect(() => {
dispatch(getDepMessage())
@@ -37,14 +39,11 @@ const UserManage = (props) => {
{
title: '姓名',
dataIndex: 'name',
- }, {
- title: '用户名',
- dataIndex: 'username',
},
{
- title: '手机号',
+ title: '手机号(用户名)',
dataIndex: 'phone',
- },
+ },
{
title: '邮箱',
dataIndex: 'email',
@@ -192,7 +191,7 @@ const UserManage = (props) => {
{
- depSelectedKeys == id ? <>
+ selectedTree == id ? <>
{
setDepModalRecord(item)
setDepModalVisible(true)
@@ -216,7 +215,7 @@ const UserManage = (props) => {
{
@@ -226,8 +225,8 @@ const UserManage = (props) => {
defaultExpandedKeys={[depMessage[0].id]}
selectedKeys={depSelectedKeys}
onSelect={(selectedKeys, e) => {
-
if (e.selected) {
+ setSelectedTree(selectedKeys)
setDepSelectedKeys(selectedKeys)
dispatch(getDepUser(selectedKeys[0]))
}
@@ -259,6 +258,7 @@ const UserManage = (props) => {
+
{
return (
- <>养护>
+
+
+
+
)
}
export default Conserve
\ No newline at end of file
diff --git a/web/client/src/sections/quanju/containers/heand/index.js b/web/client/src/sections/quanju/containers/heand/index.js
index 8d944a85..80697508 100644
--- a/web/client/src/sections/quanju/containers/heand/index.js
+++ b/web/client/src/sections/quanju/containers/heand/index.js
@@ -21,16 +21,16 @@ const Header = (props) => {
- {
- onClick("conserve")
- }}>
养护
+ {
+ onClick("guanli")
+ }}>
管理
{
onClick("leadership")
}}>
领导驾驶舱
南昌县智慧交通监管系统
- {
- onClick("guanli")
- }}>
管理
+ {
+ onClick("conserve")
+ }}>
养护
{
onClick("operation")
}}>
运营