Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
T
TOSTUMI
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Maple
TOSTUMI
Commits
8a96ea46
Commit
8a96ea46
authored
Dec 03, 2020
by
cellee
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'final' of
http://120.77.240.215:9701/Maple/tostumi.git
into final
parents
530e8b4a
accc62a9
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
58 additions
and
41 deletions
+58
-41
TableShow.tsx
src/components/TableShow/TableShow.tsx
+4
-3
UsersDetail.tsx
src/pages/UserManagement/LIFEUserManagement/UsersDetail.tsx
+54
-38
No files found.
src/components/TableShow/TableShow.tsx
View file @
8a96ea46
...
@@ -52,6 +52,7 @@ const TableShow = (props: any) => {
...
@@ -52,6 +52,7 @@ const TableShow = (props: any) => {
[
[
'status'
,
'status'
,
'status'
,
'status'
,
(
text
:
number
,
record
:
any
)
=>
<
Space
size=
"middle"
>
{
user_type_status
[
text
]
}
</
Space
>,
(
text
:
number
,
record
:
any
)
=>
<
Space
size=
"middle"
>
{
user_type_status
[
text
]
}
</
Space
>,
],
],
[
[
...
@@ -71,7 +72,7 @@ const TableShow = (props: any) => {
...
@@ -71,7 +72,7 @@ const TableShow = (props: any) => {
<
Tabs
defaultActiveKey=
"0"
>
<
Tabs
defaultActiveKey=
"0"
>
{
dataRow
.
map
((
item
:
any
,
index
:
number
)
=>
{
{
dataRow
.
map
((
item
:
any
,
index
:
number
)
=>
{
return
(
return
(
<
TabPane
tab=
{
item
.
name
}
key=
{
i
tem
.
id
}
>
<
TabPane
tab=
{
item
.
name
}
key=
{
i
ndex
}
>
<
Row
gutter=
{
16
}
style=
{
{
marginLeft
:
9
}
}
>
<
Row
gutter=
{
16
}
style=
{
{
marginLeft
:
9
}
}
>
<
Col
>
Address:
</
Col
>
<
Col
>
Address:
</
Col
>
<
Col
>
<
Col
>
...
@@ -86,7 +87,7 @@ const TableShow = (props: any) => {
...
@@ -86,7 +87,7 @@ const TableShow = (props: any) => {
</
Row
>
</
Row
>
{
item
.
unit
.
map
((
unit
:
any
,
uindex
:
any
)
=>
{
{
item
.
unit
.
map
((
unit
:
any
,
uindex
:
any
)
=>
{
return
(
return
(
<
div
key=
{
u
nit
.
living
}
>
<
div
key=
{
u
index
}
>
<
Row
gutter=
{
32
}
>
<
Row
gutter=
{
32
}
>
<
Col
span=
{
20
}
>
<
Col
span=
{
20
}
>
<
Table
<
Table
...
@@ -114,7 +115,7 @@ const TableShow = (props: any) => {
...
@@ -114,7 +115,7 @@ const TableShow = (props: any) => {
);
);
}
}
}
}
footer=
{
()
=>
''
}
footer=
{
()
=>
''
}
rowKey=
{
'
ower_name
'
}
rowKey=
{
'
id
'
}
dataSource=
{
unit
.
member
}
dataSource=
{
unit
.
member
}
columns=
{
key
}
columns=
{
key
}
pagination=
{
false
}
pagination=
{
false
}
...
...
src/pages/UserManagement/LIFEUserManagement/UsersDetail.tsx
View file @
8a96ea46
...
@@ -50,6 +50,8 @@ const UsersDetail = (props: any) => {
...
@@ -50,6 +50,8 @@ const UsersDetail = (props: any) => {
const
formRef
=
useRef
(
null
as
any
);
const
formRef
=
useRef
(
null
as
any
);
const
[
loadding
,
setLoadding
]
=
useState
(
false
);
// 提交
// 提交
const
onFinish
=
(
values
:
any
)
=>
{
const
onFinish
=
(
values
:
any
)
=>
{
if
(
DataSave
!=
null
)
{
if
(
DataSave
!=
null
)
{
...
@@ -71,6 +73,7 @@ const UsersDetail = (props: any) => {
...
@@ -71,6 +73,7 @@ const UsersDetail = (props: any) => {
}
}
};
};
// 监听删除结果
useEffect
(()
=>
{
useEffect
(()
=>
{
if
(
Result
!=
null
)
{
if
(
Result
!=
null
)
{
console
.
log
(
Result
);
console
.
log
(
Result
);
...
@@ -82,6 +85,7 @@ const UsersDetail = (props: any) => {
...
@@ -82,6 +85,7 @@ const UsersDetail = (props: any) => {
}
}
},
[
Result
]);
},
[
Result
]);
// 监听返回内容
useEffect
(()
=>
{
useEffect
(()
=>
{
console
.
log
(
returnValue
);
console
.
log
(
returnValue
);
if
(
returnValue
!=
null
)
{
if
(
returnValue
!=
null
)
{
...
@@ -101,6 +105,7 @@ const UsersDetail = (props: any) => {
...
@@ -101,6 +105,7 @@ const UsersDetail = (props: any) => {
}
}
},
[
returnValue
]);
},
[
returnValue
]);
// 监听数据返回
useEffect
(()
=>
{
useEffect
(()
=>
{
if
(
DataSave
!=
null
)
{
if
(
DataSave
!=
null
)
{
console
.
log
(
'给予页面数据'
);
console
.
log
(
'给予页面数据'
);
...
@@ -124,6 +129,7 @@ const UsersDetail = (props: any) => {
...
@@ -124,6 +129,7 @@ const UsersDetail = (props: any) => {
}
}
},
[
DataSave
]);
},
[
DataSave
]);
// 监听数据返回
useEffect
(()
=>
{
useEffect
(()
=>
{
if
(
DataSaveDetail
!=
null
)
{
if
(
DataSaveDetail
!=
null
)
{
console
.
log
(
'页面数据副歌'
);
console
.
log
(
'页面数据副歌'
);
...
@@ -132,8 +138,10 @@ const UsersDetail = (props: any) => {
...
@@ -132,8 +138,10 @@ const UsersDetail = (props: any) => {
}
}
},
[
DataSaveDetail
]);
},
[
DataSaveDetail
]);
// 存储住户详情页的数据
useEffect
(()
=>
{
useEffect
(()
=>
{
console
.
log
(
memberDetail
);
console
.
log
(
memberDetail
);
if
(
DataSave
)
{
if
(
!
memberDetail
)
{
if
(
!
memberDetail
)
{
var
tmp
=
{
var
tmp
=
{
owerName
:
DataSave
.
owerName
,
owerName
:
DataSave
.
owerName
,
...
@@ -142,6 +150,7 @@ const UsersDetail = (props: any) => {
...
@@ -142,6 +150,7 @@ const UsersDetail = (props: any) => {
};
};
formRef
.
current
.
setFieldsValue
(
tmp
);
formRef
.
current
.
setFieldsValue
(
tmp
);
}
}
}
},
[
memberDetail
]);
},
[
memberDetail
]);
useEffect
(()
=>
{
useEffect
(()
=>
{
...
@@ -151,6 +160,7 @@ const UsersDetail = (props: any) => {
...
@@ -151,6 +160,7 @@ const UsersDetail = (props: any) => {
setDataSaveLoading
(
true
);
setDataSaveLoading
(
true
);
},
[]);
},
[]);
// 住户详情页
const
tableShowCallback
=
(
values
:
any
)
=>
{
const
tableShowCallback
=
(
values
:
any
)
=>
{
console
.
log
(
'成员信息'
);
console
.
log
(
'成员信息'
);
console
.
log
(
values
);
console
.
log
(
values
);
...
@@ -159,6 +169,7 @@ const UsersDetail = (props: any) => {
...
@@ -159,6 +169,7 @@ const UsersDetail = (props: any) => {
setMemberDetail
(
true
);
setMemberDetail
(
true
);
};
};
// 删除单元
const
deleteUnit
=
(
values
:
any
)
=>
{
const
deleteUnit
=
(
values
:
any
)
=>
{
if
(
permissionArr
.
indexOf
(
'5'
)
<
0
)
{
if
(
permissionArr
.
indexOf
(
'5'
)
<
0
)
{
message
.
error
(
'No Permissions!!!'
,
3
);
message
.
error
(
'No Permissions!!!'
,
3
);
...
@@ -186,6 +197,7 @@ const UsersDetail = (props: any) => {
...
@@ -186,6 +197,7 @@ const UsersDetail = (props: any) => {
});
});
};
};
// 删除住户
const
DeleteMember
=
(
values
:
any
,
e
:
any
)
=>
{
const
DeleteMember
=
(
values
:
any
,
e
:
any
)
=>
{
console
.
log
(
values
);
console
.
log
(
values
);
if
(
permissionArr
.
indexOf
(
'7'
)
<
0
)
{
if
(
permissionArr
.
indexOf
(
'7'
)
<
0
)
{
...
@@ -201,18 +213,22 @@ const UsersDetail = (props: any) => {
...
@@ -201,18 +213,22 @@ const UsersDetail = (props: any) => {
cancelText
:
'Cancel'
,
cancelText
:
'Cancel'
,
onCancel
()
{},
onCancel
()
{},
onOk
()
{
onOk
()
{
setLoadding
(
true
);
RA
(
39
,
{
id
:
values
.
id
,
ownerId
:
values
.
owner_id
});
RA
(
39
,
{
id
:
values
.
id
,
ownerId
:
values
.
owner_id
});
},
},
});
});
};
};
// 返回
const
titleBackCallBack
=
()
=>
{
const
titleBackCallBack
=
()
=>
{
setMemberDetail
(
false
);
setMemberDetail
(
false
);
};
};
// 监听删除住户返回的结果
useEffect
(()
=>
{
useEffect
(()
=>
{
if
(
memberResult
!=
null
)
{
if
(
memberResult
!=
null
)
{
setMemberDetail
(
false
);
setMemberDetail
(
false
);
setLoadding
(
false
);
message
.
success
(
'Successfully delete!!!'
);
message
.
success
(
'Successfully delete!!!'
);
RA
(
13
,
{
RA
(
13
,
{
id
:
DataSave
.
id
,
id
:
DataSave
.
id
,
...
@@ -226,6 +242,7 @@ const UsersDetail = (props: any) => {
...
@@ -226,6 +242,7 @@ const UsersDetail = (props: any) => {
}
}
},
[
memberResult
]);
},
[
memberResult
]);
// 编辑手机号码验证
const
checkData
=
(
rule
:
any
,
value
:
any
,
callback
:
any
)
=>
{
const
checkData
=
(
rule
:
any
,
value
:
any
,
callback
:
any
)
=>
{
if
(
value
)
{
if
(
value
)
{
if
(
/^
\d{8}
$|^1
[
3|5|7|8
]\d{9}
$/
.
test
(
value
))
{
if
(
/^
\d{8}
$|^1
[
3|5|7|8
]\d{9}
$/
.
test
(
value
))
{
...
@@ -237,9 +254,6 @@ const UsersDetail = (props: any) => {
...
@@ -237,9 +254,6 @@ const UsersDetail = (props: any) => {
callback
(
'*it is required!'
);
callback
(
'*it is required!'
);
};
};
console
.
log
(
memberDetail
);
console
.
log
(
DataSave
);
return
(
return
(
<
div
className=
{
styles
.
base
}
>
<
div
className=
{
styles
.
base
}
>
<
Spin
spinning=
{
visible
}
tip=
"Loading Submit"
>
<
Spin
spinning=
{
visible
}
tip=
"Loading Submit"
>
...
@@ -329,6 +343,7 @@ const UsersDetail = (props: any) => {
...
@@ -329,6 +343,7 @@ const UsersDetail = (props: any) => {
</>
</>
)
:
(
)
:
(
<>
<>
<
Spin
spinning=
{
loadding
}
>
<
div
>
<
div
>
<
TitleBack
<
TitleBack
title=
{
'Family/Tenant Details'
}
title=
{
'Family/Tenant Details'
}
...
@@ -358,6 +373,7 @@ const UsersDetail = (props: any) => {
...
@@ -358,6 +373,7 @@ const UsersDetail = (props: any) => {
Delete
Delete
</
Button
>
</
Button
>
</
div
>
</
div
>
</
Spin
>
</>
</>
)
}
)
}
</
Spin
>
</
Spin
>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment