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
a2888ae6
Commit
a2888ae6
authored
Nov 25, 2020
by
Sixiang_Zzb
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
测试bug修复
parent
254019ff
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
71 additions
and
68 deletions
+71
-68
PictureOptionsRow.tsx
src/components/PictureOptions/PictureOptionsRow.tsx
+2
-2
TableShow.tsx
src/components/TableShow/TableShow.tsx
+10
-10
menu.ts
src/locales/en-US/menu.ts
+2
-2
Detail.tsx
...pages/UserManagement/ServiceProviderManagement/Detail.tsx
+2
-5
Edit.tsx
src/pages/UserManagement/ServiceProviderManagement/Edit.tsx
+1
-1
Guard.tsx
src/pages/UserManagement/ServiceProviderManagement/Guard.tsx
+36
-28
ServiceProviderManagement.tsx
...t/ServiceProviderManagement/ServiceProviderManagement.tsx
+18
-20
No files found.
src/components/PictureOptions/PictureOptionsRow.tsx
View file @
a2888ae6
...
...
@@ -124,9 +124,9 @@ const PictureOptionsRow = (props: any) => {
message
.
error
(
'You can only upload JPG/PNG file!'
);
}
// 文件大小判断
const
isLt2M
=
file
.
size
/
1024
/
1024
<
2
;
const
isLt2M
=
file
.
size
/
1024
/
1024
<
=
2
;
if
(
!
isLt2M
)
{
message
.
error
(
'Image must
smaller than
2MB!'
);
message
.
error
(
'Image must
be less than or equal to
2MB!'
);
}
return
isJpgOrPng
&&
isLt2M
;
}
...
...
src/components/TableShow/TableShow.tsx
View file @
a2888ae6
...
...
@@ -34,13 +34,13 @@ const TableShow = (props: any) => {
// const user_type_status = ["Registered", "Unregistered", "Cancellation"]
const
user_type_status
=
[
'Normal'
,
'Normal'
,
'Cancellation'
];
const
user_code
=
[
'
Not Used'
,
'
Used'
];
const
user_code
=
[
'
Activation Code Is Inactive'
,
'Activation Code Has Been
Used'
];
const
key
=
objectColumns
([
[
'User Name'
,
'owner_family_name'
],
[
'Contact Details'
,
'owner_family_phone'
],
[
'Email'
,
'owner_family_email'
],
[
'
RelationShip
'
,
'
User Type
'
,
null
,
(
text
:
any
,
record
:
any
)
=>
(
<
Space
size=
"middle"
>
...
...
@@ -71,7 +71,7 @@ const TableShow = (props: any) => {
{
dataRow
.
map
((
item
:
any
,
index
:
number
)
=>
{
return
(
<
TabPane
tab=
{
item
.
name
}
key=
{
index
}
>
<
Row
gutter=
{
16
}
>
<
Row
gutter=
{
16
}
style=
{
{
marginLeft
:
9
}
}
>
<
Col
>
Address:
</
Col
>
<
Col
>
{
item
.
owner
.
buildingNumber
+
...
...
@@ -93,7 +93,7 @@ const TableShow = (props: any) => {
return
(
<
div
style=
{
{
height
:
80
,
position
:
'relative'
}
}
>
<
div
style=
{
{
position
:
'absolute'
,
left
:
0
,
bottom
:
16
}
}
>
<
Row
gutter=
{
32
}
>
<
Row
gutter=
{
18
}
>
<
Col
>
Unit No:
</
Col
>
<
Col
>
{
unit
.
living
}
</
Col
>
</
Row
>
...
...
@@ -119,13 +119,13 @@ const TableShow = (props: any) => {
pagination=
{
false
}
></
Table
>
</
Col
>
<
Col
>
<
Row
>
<
img
width=
{
80
}
height=
{
80
}
src=
{
unit
.
imgUrl
}
/>
</
Row
>
<
Col
style=
{
{
textAlign
:
'center'
}
}
>
<
Row
style=
{
{
marginTop
:
8
}
}
>
<
div
style=
{
{
width
:
80
,
textAlign
:
'center'
}
}
>
{
item
.
owner
.
cdkCode
}
(
{
user_code
[
item
.
owner
.
cdkStatus
]
}
)
<
div
style=
{
{
textAlign
:
'center'
}
}
>
<
img
width=
{
80
}
height=
{
80
}
src=
{
unit
.
imgUrl
}
/>
<
br
/>
{
item
.
owner
.
cdkCode
}
<
br
/>
(
{
user_code
[
item
.
owner
.
cdkStatus
]
}
)
</
div
>
</
Row
>
</
Col
>
...
...
src/locales/en-US/menu.ts
View file @
a2888ae6
...
...
@@ -52,8 +52,8 @@ export default {
'menu.usemanagement'
:
'User Management'
,
'menu.monitoringcenter'
:
'Monitoring Center'
,
'menu.usemanagement.lifeusers'
:
'LIFE User
s
'
,
'menu.usemanagement.serviceproviders'
:
'Service Provider
s
'
,
'menu.usemanagement.lifeusers'
:
'LIFE User
Management
'
,
'menu.usemanagement.serviceproviders'
:
'Service Provider
Management
'
,
'menu.propertymanagement'
:
'Property Management'
,
'menu.commercialservice'
:
'Commercial Service'
,
'menu.commercialservice.communitymaintenance'
:
'Community maintenance'
,
...
...
src/pages/UserManagement/ServiceProviderManagement/Detail.tsx
View file @
a2888ae6
...
...
@@ -47,7 +47,7 @@ const Detail = (props: any) => {
{
title
:
'Job Title'
,
dataIndex
:
'cdkCode'
},
{
title
:
'User Status'
,
dataIndex
:
'cdkStatus'
},
{
title
:
'
a
ctions'
,
title
:
'
A
ctions'
,
render
:
(
text
:
any
,
record
:
any
)
=>
(
<
Space
size=
"middle"
>
{
' '
}
...
...
@@ -150,10 +150,7 @@ const Detail = (props: any) => {
<
div
className=
{
styles
.
box1item1
}
>
Service Community
</
div
>
</
div
>
{
SaveChooseData
.
serviceCommunityList
!=
null
?
(
<
ShowOptions
list=
{
SaveChooseData
.
serviceCommunityList
}
defaultValue=
{
'Put It Away'
}
/>
<
ShowOptions
list=
{
SaveChooseData
.
serviceCommunityList
}
defaultValue=
{
'Close'
}
/>
)
:
(
<></>
)
}
...
...
src/pages/UserManagement/ServiceProviderManagement/Edit.tsx
View file @
a2888ae6
...
...
@@ -101,7 +101,7 @@ const Edit = (props: any) => {
<
div
className=
{
styles
.
base
}
>
{
/* 头部组件v1.2 */
}
<
TitleBack
title=
{
SaveChooseData
!==
null
?
'Edit Service Provider'
:
'
Add service p
rovider'
}
title=
{
SaveChooseData
!==
null
?
'Edit Service Provider'
:
'
Create New Service P
rovider'
}
/>
<
Form
ref=
{
formRef
}
name=
"basic"
onFinish=
{
onFinish
}
>
...
...
src/pages/UserManagement/ServiceProviderManagement/Guard.tsx
View file @
a2888ae6
import
React
,
{
useState
,
useEffect
}
from
'react'
;
import
styles
from
'./Guard.less'
;
import
{
Input
,
Menu
,
Table
,
Space
,
Pagination
,
Tooltip
,
Button
}
from
'antd'
;
import
{
Input
,
Menu
,
Table
,
Space
,
Pagination
,
Tooltip
,
Button
}
from
'antd'
;
import
{
Link
,
useIntl
,
connect
,
Dispatch
}
from
'umi'
;
...
...
@@ -10,45 +10,53 @@ import TitleGet from '../../../components/TitleGet/TitleGet';
import
{
timestampToTime
}
from
'../../../utils/time'
;
const
Guard
=
(
props
:
any
)
=>
{
const
Guard
=
(
props
:
any
)
=>
{
const
{
CurDataFollowDetail
}
=
props
;
const
{
CurDataFollowDetail
}
=
props
;
return
(
<
div
className=
{
styles
.
base
}
>
console
.
log
(
CurDataFollowDetail
);
const
handleClickBtn
=
()
=>
{};
<
div
className=
{
styles
.
item0
}
><
TitleGet
title=
{
"Edit Security Guard Account"
}
/></
div
>
return
(
<
div
className=
{
styles
.
base
}
>
<
div
className=
{
styles
.
item0
}
>
<
TitleGet
title=
{
'Edit Security Guard Account'
}
/>
</
div
>
<
div
className=
{
styles
.
item0_1
}
>
Status:Normal
</
div
>
<
div
className=
{
styles
.
item0_1
}
>
Registration Date:
{
timestampToTime
(
CurDataFollowDetail
.
createTime
.
time
)
}
</
div
>
<
div
className=
{
styles
.
item2
}
><
BackButton
/></
div
>
<
div
className=
{
styles
.
item0_1
}
>
Registration Date:
{
/* {timestampToTime(CurDataFollowDetail.createTime.time)} */
}
</
div
>
<
div
className=
{
styles
.
item2
}
>
<
BackButton
/>
</
div
>
<
div
className=
{
styles
.
clear0
}
></
div
>
<
div
className=
{
styles
.
item1
}
>
Company Name
</
div
>
<
div
className=
{
styles
.
item1_1
}
>
{
CurDataFollowDetail
.
companyName
}
</
div
>
<
div
className=
{
styles
.
clear1
}
></
div
>
<
div
className=
{
styles
.
item1
}
>
Full Name
</
div
>
<
div
className=
{
styles
.
item1_1
}
>
{
CurDataFollowDetail
.
saferName
}
</
div
>
<
div
className=
{
styles
.
clear1
}
></
div
>
<
div
className=
{
styles
.
item1
}
>
Contact Details
</
div
>
<
div
className=
{
styles
.
item1_1
}
>
{
CurDataFollowDetail
.
saferPhone
}
</
div
>
<
div
className=
{
styles
.
item1
}
style=
{
{
marginLeft
:
32
,
width
:
40
}
}
>
Email
</
div
>
<
div
className=
{
styles
.
item1_1
}
>
{
CurDataFollowDetail
.
saferEmail
}
</
div
>
<
div
className=
{
styles
.
clear1
}
></
div
>
<
div
className=
{
styles
.
item1
}
>
Company Name
</
div
>
<
div
className=
{
styles
.
item1_1
}
>
{
CurDataFollowDetail
.
companyName
}
</
div
>
<
div
className=
{
styles
.
clear1
}
></
div
>
<
div
className=
{
styles
.
item1
}
>
Full Name
</
div
>
<
div
className=
{
styles
.
item1_1
}
>
{
CurDataFollowDetail
.
saferName
}
</
div
>
<
div
className=
{
styles
.
clear1
}
></
div
>
<
div
className=
{
styles
.
item1
}
>
Contact Details
</
div
>
<
div
className=
{
styles
.
item1_1
}
>
{
CurDataFollowDetail
.
saferPhone
}
</
div
>
<
div
className=
{
styles
.
item1
}
style=
{
{
marginLeft
:
32
,
width
:
40
}
}
>
Email
</
div
>
<
div
className=
{
styles
.
item1_1
}
>
{
CurDataFollowDetail
.
saferEmail
}
</
div
>
<
div
className=
{
styles
.
clear1
}
></
div
>
<
Line
/>
<
Button
>
Cancellation
</
Button
>
<
Button
onClick=
{
handleClickBtn
}
>
Cancellation
</
Button
>
</
div
>
);
};
function
mapStateToProps
(
state
:
any
)
{
const
{
CurDataFollowDetail
}
=
state
.
ServiceProvider
;
function
mapStateToProps
(
state
:
any
)
{
const
{
CurDataFollowDetail
}
=
state
.
ServiceProvider
;
return
{
CurDataFollowDetail
,
};
...
...
src/pages/UserManagement/ServiceProviderManagement/ServiceProviderManagement.tsx
View file @
a2888ae6
...
...
@@ -77,6 +77,7 @@ const ServiceProviderManagement = (props: propsType) => {
SaveChooseData
(
values
);
history
.
push
(
location
.
pathname
+
'/Edit'
);
};
const
goToCreate
=
()
=>
{
if
(
permissionArr
.
indexOf
(
'8'
)
<
0
)
{
message
.
error
(
'No Permissions!!!'
,
3
);
...
...
@@ -85,13 +86,25 @@ const ServiceProviderManagement = (props: propsType) => {
SaveChooseData
(
null
);
history
.
push
(
location
.
pathname
+
'/Edit'
);
};
const
goToServices
=
()
=>
{
history
.
push
(
location
.
pathname
+
'/Services'
);
};
// 请求
const
TosTosServiceProviderGet
=
()
=>
{
if
(
readyData
.
serviceCommunityList
.
length
===
0
)
{
readyData
.
serviceCommunityList
=
CommunityList
;
}
dispatch
({
type
:
'ServiceProvider/TosTosServiceProviderGet'
,
playload
:
{
...
readyData
},
});
};
const
columns
=
[
{
title
:
'Service Provider'
,
dataIndex
:
'providerName'
},
{
title
:
'
c
ontact Name'
,
dataIndex
:
'contactName'
},
{
title
:
'
C
ontact Name'
,
dataIndex
:
'contactName'
},
{
title
:
'Contacts'
,
...
...
@@ -142,17 +155,6 @@ const ServiceProviderManagement = (props: propsType) => {
}
},
[
DataServices
]);
// 请求
const
TosTosServiceProviderGet
=
()
=>
{
if
(
readyData
.
serviceCommunityList
.
length
===
0
)
{
readyData
.
serviceCommunityList
=
CommunityList
;
}
dispatch
({
type
:
'ServiceProvider/TosTosServiceProviderGet'
,
playload
:
{
...
readyData
},
});
};
// 监听路由url
useEffect
(()
=>
{
if
(
location
.
query
)
{
...
...
@@ -161,7 +163,7 @@ const ServiceProviderManagement = (props: propsType) => {
...
location
.
query
,
};
}
console
.
log
(
CommunityList
,
flag
);
//
console.log(CommunityList, flag);
if
(
CommunityList
&&
flag
===
false
)
{
flag
=
true
;
setLoading
(
true
);
...
...
@@ -241,7 +243,7 @@ const ServiceProviderManagement = (props: propsType) => {
list=
{
[
'Service Provider'
]
}
status=
{
[
{
name
:
[
'status'
,
'Services'
],
name
:
[
'status'
,
'Services
Available
'
],
data
:
[...
options
],
},
]
}
...
...
@@ -249,11 +251,7 @@ const ServiceProviderManagement = (props: propsType) => {
onSubmit=
{
CallBackTitleSearch
}
defaultValue=
{
{
providerName
:
readyData
.
providerName
,
status
:
readyData
.
serviceScope
?
parseInt
(
readyData
.
serviceScope
)
===
0
?
'SecurutyGuard'
:
'Accountant'
:
null
,
// status:,
}
}
checklist=
{
readyData
.
serviceCommunityList
.
length
!==
0
?
readyData
.
serviceCommunityList
:
null
...
...
@@ -263,7 +261,7 @@ const ServiceProviderManagement = (props: propsType) => {
{
/* 内容组件 */
}
<
div
className=
{
styles
.
box2
}
>
<
button
className=
{
styles
.
buttonAdd2
}
onClick=
{
goToServices
}
>
Avail Services
Services Available
</
button
>
<
button
className=
{
styles
.
buttonAdd
}
onClick=
{
goToCreate
}
>
Create New
...
...
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