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
64895f51
Commit
64895f51
authored
Oct 12, 2020
by
maple
Committed by
MrShi
Oct 12, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[last]最新提交v1.2.4
(cherry picked from commit
2c745ab4
)
parent
9e0fbec0
Changes
11
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
162 additions
and
96 deletions
+162
-96
index.jsx
src/components/TagSelect/index.jsx
+31
-19
CommunityService.ts
src/models/CommunityManagement/CommunityService.ts
+3
-3
User.ts
src/models/CommunityManagement/User.ts
+15
-1
BookingDetail.tsx
...es/CommunityManagement/FacilityBookings/BookingDetail.tsx
+14
-16
Bookings.tsx
src/pages/CommunityManagement/FacilityBookings/Bookings.tsx
+3
-3
Edit.tsx
src/pages/UserManagement/ServiceProviderManagement/Edit.tsx
+19
-9
ServiceProviderManagement.tsx
...t/ServiceProviderManagement/ServiceProviderManagement.tsx
+24
-30
Services.tsx
...ges/UserManagement/ServiceProviderManagement/Services.tsx
+49
-12
Template.tsx
src/pages/runTest/Template.tsx
+1
-1
method.ts
src/utils/method.ts
+1
-1
params.ts
src/utils/params.ts
+2
-1
No files found.
src/components/TagSelect/index.jsx
View file @
64895f51
...
@@ -5,17 +5,25 @@ import styles from './index.less';
...
@@ -5,17 +5,25 @@ import styles from './index.less';
class
TagSelect
extends
React
.
Component
{
class
TagSelect
extends
React
.
Component
{
state
=
{
state
=
{
tags
:
[
'Unremovable'
,
'Tag 2'
,
'Tag 3'
],
value
:
this
.
props
.
value
!=
null
?
this
.
props
.
value
:[
],
inputVisible
:
false
,
inputVisible
:
false
,
inputValue
:
''
,
inputValue
:
''
,
editInputIndex
:
-
1
,
editInputIndex
:
-
1
,
editInputValue
:
''
,
editInputValue
:
''
,
};
};
// componentDidUpdate(){
// console.log("--组件更新--")
// console.log(this.props.value)
// }
// componentDidMount(){
// console.log("--组件加载完成--")
// console.log(this.state.value)
// }
handleClose
=
removedTag
=>
{
handleClose
=
removedTag
=>
{
const
tags
=
this
.
state
.
tags
.
filter
(
tag
=>
tag
!==
removedTag
);
const
value
=
this
.
state
.
value
.
filter
(
tag
=>
tag
!==
removedTag
);
console
.
log
(
tags
);
console
.
log
(
value
);
this
.
setState
({
tags
});
this
.
setState
({
value
});
this
.
props
.
onChange
(
value
)
};
};
showInput
=
()
=>
{
showInput
=
()
=>
{
...
@@ -23,18 +31,22 @@ class TagSelect extends React.Component {
...
@@ -23,18 +31,22 @@ class TagSelect extends React.Component {
};
};
handleInputChange
=
e
=>
{
handleInputChange
=
e
=>
{
this
.
setState
({
inputValue
:
e
.
target
.
value
});
this
.
setState
({
inputValue
:
e
.
target
.
value
});
};
};
handleInputConfirm
=
()
=>
{
handleInputConfirm
=
()
=>
{
const
{
inputValue
}
=
this
.
state
;
const
{
inputValue
}
=
this
.
state
;
let
{
tags
}
=
this
.
state
;
let
{
value
}
=
this
.
state
;
if
(
inputValue
&&
tags
.
indexOf
(
inputValue
)
===
-
1
)
{
tags
=
[...
tags
,
inputValue
];
if
(
inputValue
&&
value
.
indexOf
(
inputValue
)
===
-
1
)
{
this
.
props
.
onAdd
(
inputValue
);
value
=
[...
value
,
inputValue
];
}
}
console
.
log
(
tags
);
console
.
log
(
value
);
this
.
props
.
onChange
(
value
)
this
.
setState
({
this
.
setState
({
tags
,
value
,
inputVisible
:
false
,
inputVisible
:
false
,
inputValue
:
''
,
inputValue
:
''
,
});
});
...
@@ -45,12 +57,12 @@ class TagSelect extends React.Component {
...
@@ -45,12 +57,12 @@ class TagSelect extends React.Component {
};
};
handleEditInputConfirm
=
()
=>
{
handleEditInputConfirm
=
()
=>
{
this
.
setState
(({
tags
,
editInputIndex
,
editInputValue
})
=>
{
this
.
setState
(({
value
,
editInputIndex
,
editInputValue
})
=>
{
const
newTags
=
[...
tags
];
const
newTags
=
[...
value
];
newTags
[
editInputIndex
]
=
editInputValue
;
newTags
[
editInputIndex
]
=
editInputValue
;
this
.
props
.
onChange
(
newTags
)
return
{
return
{
tags
:
newTags
,
value
:
newTags
,
editInputIndex
:
-
1
,
editInputIndex
:
-
1
,
editInputValue
:
''
,
editInputValue
:
''
,
};
};
...
@@ -66,10 +78,10 @@ class TagSelect extends React.Component {
...
@@ -66,10 +78,10 @@ class TagSelect extends React.Component {
};
};
render
()
{
render
()
{
const
{
tags
,
inputVisible
,
inputValue
,
editInputIndex
,
editInputValue
}
=
this
.
state
;
const
{
value
,
inputVisible
,
inputValue
,
editInputIndex
,
editInputValue
}
=
this
.
state
;
return
(
return
(
<>
<>
{
tags
.
map
((
tag
,
index
)
=>
{
{
value
.
map
((
tag
,
index
)
=>
{
if
(
editInputIndex
===
index
)
{
if
(
editInputIndex
===
index
)
{
return
(
return
(
<
Input
<
Input
...
@@ -91,17 +103,17 @@ class TagSelect extends React.Component {
...
@@ -91,17 +103,17 @@ class TagSelect extends React.Component {
<
Tag
<
Tag
className=
"editTag"
className=
"editTag"
key=
{
tag
}
key=
{
tag
}
closable=
{
index
!==
0
}
closable=
{
index
!==
-
1
}
onClose=
{
()
=>
this
.
handleClose
(
tag
)
}
onClose=
{
()
=>
this
.
handleClose
(
tag
)
}
>
>
<
span
<
span
onDoubleClick=
{
e
=>
{
onDoubleClick=
{
e
=>
{
if
(
index
!==
0
)
{
this
.
setState
({
editInputIndex
:
index
,
editInputValue
:
tag
},
()
=>
{
this
.
setState
({
editInputIndex
:
index
,
editInputValue
:
tag
},
()
=>
{
this
.
editInput
.
focus
();
this
.
editInput
.
focus
();
});
});
e
.
preventDefault
();
e
.
preventDefault
();
}
}
}
}
}
>
>
{
isLongTag
?
`${tag.slice(0, 20)}
...
`
:
tag
}
{
isLongTag
?
`${tag.slice(0, 20)}
...
`
:
tag
}
...
...
src/models/CommunityManagement/CommunityService.ts
View file @
64895f51
...
@@ -76,14 +76,14 @@ export default {
...
@@ -76,14 +76,14 @@ export default {
var
tmp
=
resp
.
data
.
rows
[
0
].
tosOwerModel
;
var
tmp
=
resp
.
data
.
rows
[
0
].
tosOwerModel
;
var
tmp2
=
resp
.
data
.
rows
[
0
];
var
tmp2
=
resp
.
data
.
rows
[
0
];
console
.
error
(
resp
.
data
.
rows
[
0
].
replyImgUrl
)
console
.
log
(
resp
.
data
.
rows
[
0
].
replyImgUrl
)
console
.
error
(
Fromate
(
resp
.
data
.
rows
[
0
].
replyImgUrl
,[[
"url"
,
null
]]))
console
.
log
(
Fromate
(
resp
.
data
.
rows
[
0
].
replyImgUrl
,[[
"url"
,
null
]]))
var
CurDataDetail
=
{
var
CurDataDetail
=
{
community
:
tmp
.
communityName
,
community
:
tmp
.
communityName
,
address
:
tmp
.
addressAndpostalCode
,
address
:
tmp
.
addressAndpostalCode
,
home
:
tmp
.
buildingNumber
+
"#"
+
tmp
.
floorNumber
+
"-"
+
tmp
.
roomNumber
,
home
:
tmp
.
buildingNumber
+
"#"
+
tmp
.
floorNumber
+
"-"
+
tmp
.
roomNumber
,
name
:
tmp
.
owerName
,
name
:
tmp
.
owerName
,
phone
:
tmp
.
owerPhone
,
phone
:
tmp
.
accountLogin
!=
null
?
tmp
.
accountLogin
:
tmp
.
owerPhone
,
email
:
tmp
.
owerEmail
,
email
:
tmp
.
owerEmail
,
content
:
resp
.
data
.
rows
[
0
].
serviceContent
,
content
:
resp
.
data
.
rows
[
0
].
serviceContent
,
replyContent
:
resp
.
data
.
rows
[
0
].
replyContent
,
replyContent
:
resp
.
data
.
rows
[
0
].
replyContent
,
...
...
src/models/CommunityManagement/User.ts
View file @
64895f51
...
@@ -20,7 +20,9 @@ export default {
...
@@ -20,7 +20,9 @@ export default {
pageDate
:
null
,
pageDate
:
null
,
returnValue
:
null
,
returnValue
:
null
,
memberResult
:
null
,
memberResult
:
null
,
DataServices
:
null
,
},
},
reducers
:
{
reducers
:
{
...
@@ -56,6 +58,9 @@ export default {
...
@@ -56,6 +58,9 @@ export default {
},
},
returnMemberResult
(
state
,
{
memberResult
})
{
returnMemberResult
(
state
,
{
memberResult
})
{
return
{...
state
,
memberResult
}
return
{...
state
,
memberResult
}
},
returnDataServices
(
state
,
{
DataServices
})
{
return
{...
state
,
DataServices
}
}
}
},
},
...
@@ -74,6 +79,10 @@ export default {
...
@@ -74,6 +79,10 @@ export default {
let
returnValue
=
null
;
let
returnValue
=
null
;
yield
put
({
type
:
'DataSaveDetail'
,
DataSaveDetail
,
returnValue
});
yield
put
({
type
:
'DataSaveDetail'
,
DataSaveDetail
,
returnValue
});
}
break
;
}
break
;
case
43
:
{
let
DataServices
=
null
;
yield
put
({
type
:
'returnDataServices'
,
DataServices
});
}
break
;
}
}
const
resp
=
yield
call
(
service
.
RA
,
playload
);
const
resp
=
yield
call
(
service
.
RA
,
playload
);
...
@@ -134,6 +143,11 @@ export default {
...
@@ -134,6 +143,11 @@ export default {
let
memberResult
=
resp
;
let
memberResult
=
resp
;
yield
put
({
type
:
'returnMemberResult'
,
memberResult
});
yield
put
({
type
:
'returnMemberResult'
,
memberResult
});
}
break
;
}
break
;
case
43
:
{
let
DataServices
=
resp
;
yield
put
({
type
:
'returnDataServices'
,
DataServices
});
}
break
;
}
}
}
}
...
...
src/pages/CommunityManagement/FacilityBookings/BookingDetail.tsx
View file @
64895f51
...
@@ -106,42 +106,42 @@ const BookingDetail = (props:any) => {
...
@@ -106,42 +106,42 @@ const BookingDetail = (props:any) => {
<
TitleBack
title=
{
"View Facility Bookings"
}
url=
{
getUrlLast
(
location
.
pathname
)
+
'?Facility=false'
}
/>
<
TitleBack
title=
{
"View Facility Bookings"
}
url=
{
getUrlLast
(
location
.
pathname
)
+
'?Facility=false'
}
/>
<
Row
gutter=
{
8
}
>
<
Row
gutter=
{
8
}
>
<
Col
>
预订状态
</
Col
><
Col
span=
{
2
}
>
{
statusDes
[
DataSave
.
status
]
}
</
Col
>
<
Col
>
Booking Status
</
Col
><
Col
span=
{
2
}
>
{
statusDes
[
DataSave
.
status
]
}
</
Col
>
<
Col
>
下单时间
</
Col
><
Col
span=
{
2
}
>
{
timestampToTime3
(
DataSave
.
createTime
.
time
)
}
</
Col
>
<
Col
>
Order Time
</
Col
><
Col
span=
{
2
}
>
{
timestampToTime3
(
DataSave
.
createTime
.
time
)
}
</
Col
>
</
Row
>
</
Row
>
<
Line
/>
<
Line
/>
<
Row
gutter=
{
8
}
>
<
Row
gutter=
{
8
}
>
<
Col
>
服务小区
</
Col
><
Col
span=
{
3
}
>
{
DataSave
.
communityName
}
</
Col
>
<
Col
>
Service Community
</
Col
><
Col
span=
{
3
}
>
{
DataSave
.
communityName
}
</
Col
>
<
Col
>
预订设施
</
Col
><
Col
span=
{
3
}
>
{
DataSave
.
facilityTitle
}
</
Col
>
<
Col
>
Booking Facilities
</
Col
><
Col
span=
{
3
}
>
{
DataSave
.
facilityTitle
}
</
Col
>
<
Col
>
预订时间
</
Col
><
Col
span=
{
3
}
>
{
DataSave
.
subscribeDate
}
</
Col
>
<
Col
>
Booking Time
</
Col
><
Col
span=
{
3
}
>
{
DataSave
.
subscribeDate
}
</
Col
>
<
Col
span=
{
3
}
>
{
DataSave
.
subscribeTime
}
</
Col
>
<
Col
span=
{
3
}
>
{
DataSave
.
subscribeTime
}
</
Col
>
</
Row
>
</
Row
>
<
Row
gutter=
{
8
}
style=
{
{
marginTop
:
16
}
}
>
<
Row
gutter=
{
8
}
style=
{
{
marginTop
:
16
}
}
>
<
Col
>
用户姓名
</
Col
><
Col
span=
{
3
}
>
{
DataSave
.
accountName
}
</
Col
>
<
Col
>
User Name
</
Col
><
Col
span=
{
3
}
>
{
DataSave
.
accountName
}
</
Col
>
<
Col
>
联系电话
</
Col
><
Col
span=
{
3
}
>
{
DataSave
.
accountPhone
}
</
Col
>
<
Col
>
Contact Number
</
Col
><
Col
span=
{
3
}
>
{
DataSave
.
accountPhone
}
</
Col
>
<
Col
>
单元
</
Col
>
<
Col
>
Unit
</
Col
>
<
Col
span=
{
3
}
>
{
DataSave
.
buildNumber
}
#
{
DataSave
.
floorNumber
}
-
{
DataSave
.
roomNumber
}
</
Col
>
<
Col
span=
{
3
}
>
{
DataSave
.
buildNumber
}
#
{
DataSave
.
floorNumber
}
-
{
DataSave
.
roomNumber
}
</
Col
>
</
Row
>
</
Row
>
<
Line
/>
<
Line
/>
{
{
(
DataSaveDetail
!=
null
&&
DataSave
.
status
==
1
)?
(
DataSaveDetail
!=
null
&&
DataSave
.
status
==
1
&&
DataSaveDetail
.
managerFee
>
0
)?
<>
<>
<
Row
gutter=
{
8
}
style=
{
{
marginTop
:
16
}
}
>
<
Row
gutter=
{
8
}
style=
{
{
marginTop
:
16
}
}
>
<
Col
>
需要管理费
</
Col
><
Col
span=
{
2
}
>
{
DataSaveDetail
.
managerFee
}
</
Col
>
<
Col
>
Management Fee Required
</
Col
><
Col
span=
{
2
}
>
{
DataSaveDetail
.
managerFee
}
</
Col
>
</
Row
>
</
Row
>
<
Row
gutter=
{
8
}
style=
{
{
marginTop
:
16
}
}
>
<
Row
gutter=
{
8
}
style=
{
{
marginTop
:
16
}
}
>
<
Col
>
需要押金
</
Col
><
Col
span=
{
2
}
>
{
DataSaveDetail
.
marginFee
}
</
Col
>
<
Col
>
Deposit Required
</
Col
><
Col
span=
{
2
}
>
{
DataSaveDetail
.
marginFee
}
</
Col
>
</
Row
>
</
Row
>
<
div
style=
{
{
marginTop
:
16
}
}
>
<
div
style=
{
{
marginTop
:
16
}
}
>
<
Button
type=
"primary"
onClick=
{
makeFee
}
>
缴费
</
Button
>
<
Button
type=
"primary"
onClick=
{
makeFee
}
>
Pay
</
Button
>
</
div
>
</
div
>
<
Line
/>
<
Line
/>
</>:
null
</>:
null
}
}
{
{
(
DataSaveDetail
!=
null
&&
DataSave
.
marginFeeStatus
==
1
)
?
(
DataSaveDetail
!=
null
&&
DataSave
.
marginFeeStatus
==
1
&&
DataSaveDetail
.
managerFee
>
0
)
?
<>
<>
<
Form
ref=
{
formRef
}
name=
"basic2"
onFinish=
{
onFinish
}
onFinishFailed=
{
onFinishFailed
}
>
<
Form
ref=
{
formRef
}
name=
"basic2"
onFinish=
{
onFinish
}
onFinishFailed=
{
onFinishFailed
}
>
<
Row
gutter=
{
8
}
style=
{
{
marginTop
:
16
}
}
>
<
Row
gutter=
{
8
}
style=
{
{
marginTop
:
16
}
}
>
...
@@ -153,9 +153,7 @@ const BookingDetail = (props:any) => {
...
@@ -153,9 +153,7 @@ const BookingDetail = (props:any) => {
<
Radio
.
Group
onChange=
{
backFee
}
defaultValue=
{
1
}
>
<
Radio
.
Group
onChange=
{
backFee
}
defaultValue=
{
1
}
>
<
Radio
value=
{
1
}
style=
{
radioStyle
}
>
全额退还
</
Radio
>
<
Radio
value=
{
1
}
style=
{
radioStyle
}
>
全额退还
</
Radio
>
<
Radio
value=
{
2
}
style=
{
radioStyle
}
>
部分退还
{
backFeeFlag
?<><
Input
onChange=
{
getBackMarginFee
}
style=
{
{
width
:
80
}
}
/>
$
</>:
null
}
</
Radio
>
<
Radio
value=
{
2
}
style=
{
radioStyle
}
>
部分退还
{
backFeeFlag
?<><
Input
onChange=
{
getBackMarginFee
}
style=
{
{
width
:
80
}
}
/>
$
</>:
null
}
</
Radio
>
</
Radio
.
Group
>
</
Radio
.
Group
>
</
div
>
</
div
>
{
{
...
...
src/pages/CommunityManagement/FacilityBookings/Bookings.tsx
View file @
64895f51
...
@@ -188,11 +188,11 @@ const Bookings = (props:any) => {
...
@@ -188,11 +188,11 @@ const Bookings = (props:any) => {
<
div
className=
{
styles
.
box4
}
>
<
div
className=
{
styles
.
box4
}
>
<
div
className=
{
styles
.
box4item1
}
>
Unit
</
div
>
<
div
className=
{
styles
.
box4item1
}
>
Unit
</
div
>
<
div
className=
{
styles
.
box4item2
}
><
Form
.
Item
name=
"buildNumber"
rules=
{
[{
required
:
true
}]
}
><
Input
placeholder=
"building"
style=
{
{
width
:
80
}
}
/></
Form
.
Item
></
div
>
<
div
className=
{
styles
.
box4item2
}
><
Form
.
Item
name=
"buildNumber"
rules=
{
[{
required
:
true
}
,{
validator
:
checkData
,
trigger
:
'blur'
}
]
}
><
Input
placeholder=
"building"
style=
{
{
width
:
80
}
}
/></
Form
.
Item
></
div
>
<
div
className=
{
styles
.
box4item3
}
>
#
</
div
>
<
div
className=
{
styles
.
box4item3
}
>
#
</
div
>
<
div
className=
{
styles
.
box4item4
}
><
Form
.
Item
name=
"floorNumber"
rules=
{
[{
required
:
true
}]
}
><
Input
placeholder=
"floor"
style=
{
{
width
:
80
}
}
/></
Form
.
Item
></
div
>
<
div
className=
{
styles
.
box4item4
}
><
Form
.
Item
name=
"floorNumber"
rules=
{
[{
required
:
true
}
,{
validator
:
checkData
,
trigger
:
'blur'
}
]
}
><
Input
placeholder=
"floor"
style=
{
{
width
:
80
}
}
/></
Form
.
Item
></
div
>
<
div
className=
{
styles
.
box4item5
}
>
——
</
div
>
<
div
className=
{
styles
.
box4item5
}
>
——
</
div
>
<
div
className=
{
styles
.
box4item6
}
><
Form
.
Item
name=
"roomNumber"
rules=
{
[{
required
:
true
}]
}
><
Input
placeholder=
"room"
style=
{
{
width
:
80
}
}
/></
Form
.
Item
></
div
>
<
div
className=
{
styles
.
box4item6
}
><
Form
.
Item
name=
"roomNumber"
rules=
{
[{
required
:
true
}
,{
validator
:
checkData
,
trigger
:
'blur'
}
]
}
><
Input
placeholder=
"room"
style=
{
{
width
:
80
}
}
/></
Form
.
Item
></
div
>
</
div
>
</
div
>
<
div
className=
{
styles
.
line
}
></
div
>
<
div
className=
{
styles
.
line
}
></
div
>
...
...
src/pages/UserManagement/ServiceProviderManagement/Edit.tsx
View file @
64895f51
...
@@ -6,10 +6,12 @@ import { Link, useIntl, connect } from 'umi';
...
@@ -6,10 +6,12 @@ import { Link, useIntl, connect } from 'umi';
import
SelectOptions
from
'../../../components/SelectOptions/index'
;
import
SelectOptions
from
'../../../components/SelectOptions/index'
;
import
TitleBack
from
'../../../components/TitleBack/TitleBack'
;
import
TitleBack
from
'../../../components/TitleBack/TitleBack'
;
import
{
RA
}
from
'@/utils/method'
;
const
module
=
"User"
const
Edit
=
(
props
:
any
)
=>
{
const
Edit
=
(
props
:
any
)
=>
{
const
{
dispatch
,
CurData
,
SaveChooseData
,
location
,
CommunityList
}
=
props
;
const
{
dispatch
,
CurData
,
SaveChooseData
,
location
,
CommunityList
,
DataServices
}
=
props
;
const
TosTosServiceProviderSave
=
(
values
:
any
)
=>
{
dispatch
({
type
:
'ServiceProvider/TosTosServiceProviderSave'
,
playload
:
values
})
};
const
TosTosServiceProviderSave
=
(
values
:
any
)
=>
{
dispatch
({
type
:
'ServiceProvider/TosTosServiceProviderSave'
,
playload
:
values
})
};
const
[
CList
,
setCList
]
=
useState
(
CommunityList
);
const
[
CList
,
setCList
]
=
useState
(
CommunityList
);
...
@@ -20,15 +22,21 @@ const Edit= (props:any) => {
...
@@ -20,15 +22,21 @@ const Edit= (props:any) => {
useEffect
(()
=>
{
useEffect
(()
=>
{
console
.
log
(
SaveChooseData
)
console
.
log
(
SaveChooseData
)
if
(
SaveChooseData
!=
null
)
{
RA
(
43
,{
serviceName
:
""
},
module
,
dispatch
)
formRef
.
current
.
setFieldsValue
(
SaveChooseData
)
}
},
[]);
},
[]);
useEffect
(()
=>
{
if
(
DataServices
!=
null
)
{
var
tmp
=
DataServices
.
data
.
serviceScopeList
if
(
SaveChooseData
!=
null
)
{
formRef
.
current
.
setFieldsValue
(
SaveChooseData
)
}
}
},[
DataServices
])
const
onFinish
=
(
values
:
any
)
=>
{
const
onFinish
=
(
values
:
any
)
=>
{
var
val
=
values
var
val
=
values
val
.
serviceCommunityList
=
CList
val
.
serviceCommunityList
=
CList
val
.
serviceScopeList
=
SList
//
val.serviceScopeList = SList
val
.
creator
=
"admin"
;
val
.
creator
=
"admin"
;
val
.
updater
=
"admin"
;
val
.
updater
=
"admin"
;
...
@@ -56,7 +64,7 @@ const Edit= (props:any) => {
...
@@ -56,7 +64,7 @@ const Edit= (props:any) => {
<
div
className=
{
styles
.
box2
}
>
<
div
className=
{
styles
.
box2
}
>
<
div
className=
{
styles
.
box2item1
}
>
Services Available
</
div
>
<
div
className=
{
styles
.
box2item1
}
>
Services Available
</
div
>
<
div
className=
{
styles
.
box2item2
}
><
Checkbox
.
Group
options=
{
[
"Cleaning"
,
"Security Guard"
,
"Maintenance"
,]
}
/
></
div
>
<
div
className=
{
styles
.
box2item2
}
><
Form
.
Item
name=
"serviceScopeList"
><
Checkbox
.
Group
options=
{
DataServices
!=
null
?
DataServices
.
data
.
serviceScopeList
:
null
}
/></
Form
.
Item
></
div
>
</
div
>
</
div
>
<
div
className=
{
styles
.
box3
}
>
<
div
className=
{
styles
.
box3
}
>
...
@@ -82,12 +90,14 @@ const Edit= (props:any) => {
...
@@ -82,12 +90,14 @@ const Edit= (props:any) => {
};
};
function
mapStateToProps
(
state
:
any
)
{
function
mapStateToProps
(
state
:
any
)
{
const
{
CurData
,
SaveChooseData
}
=
state
.
ServiceProvider
;
const
{
CurData
,
SaveChooseData
}
=
state
.
ServiceProvider
;
const
{
DataServices
,
}
=
state
.
User
;
const
{
CommunityList
}
=
state
.
Init
;
const
{
CommunityList
}
=
state
.
Init
;
return
{
return
{
CurData
,
CurData
,
SaveChooseData
,
SaveChooseData
,
CommunityList
CommunityList
,
DataServices
};
};
}
}
...
...
src/pages/UserManagement/ServiceProviderManagement/ServiceProviderManagement.tsx
View file @
64895f51
...
@@ -7,17 +7,16 @@ import { LoadingOutlined } from '@ant-design/icons';
...
@@ -7,17 +7,16 @@ import { LoadingOutlined } from '@ant-design/icons';
import
{
Link
,
useIntl
,
connect
,
Dispatch
,
history
}
from
'umi'
;
import
{
Link
,
useIntl
,
connect
,
Dispatch
,
history
}
from
'umi'
;
import
TitleSearch
from
'../../../components/TitleSearch/TitleSearch'
;
import
TitleSearch
from
'../../../components/TitleSearch/TitleSearch'
;
import
{
filterObj
,
urlEncode
}
from
"@/utils/method"
;
const
ServiceProviderManagement
=
(
props
:
any
)
=>
{
const
ServiceProviderManagement
=
(
props
:
any
)
=>
{
const
{
formatMessage
}
=
useIntl
();
const
{
formatMessage
}
=
useIntl
();
const
{
dispatch
,
location
,
Data
,
CommunityList
}
=
props
;
const
{
dispatch
,
location
,
Data
,
CommunityList
}
=
props
;
const
RA
=
(
index
:
any
,
values
:
any
)
=>
{
dispatch
({
type
:
'ServiceProvider/RA'
,
playload
:
{
index
:
index
,
body
:
values
}
})
};
const
RA
=
(
index
:
any
,
values
:
any
)
=>
{
dispatch
({
type
:
'ServiceProvider/RA'
,
playload
:
{
index
:
index
,
body
:
values
}
})
};
const
TosTosServiceProviderGet
=
(
values
:
any
)
=>
{
dispatch
({
type
:
'ServiceProvider/TosTosServiceProviderGet'
,
playload
:
values
})
};
const
TosTosServiceProviderGet
=
(
values
:
any
)
=>
{
dispatch
({
type
:
'ServiceProvider/TosTosServiceProviderGet'
,
playload
:
values
})
};
const
SaveChooseData
=
(
values
:
any
)
=>
{
dispatch
({
type
:
'ServiceProvider/SaveChooseData'
,
playload
:
values
})
};
const
SaveChooseData
=
(
values
:
any
)
=>
{
dispatch
({
type
:
'ServiceProvider/SaveChooseData'
,
playload
:
values
})
};
const
GetList
=
()
=>
{
const
GetList
=
()
=>
{
if
(
CommunityList
!=
null
)
{
if
(
CommunityList
!=
null
)
{
TosTosServiceProviderGet
({
TosTosServiceProviderGet
({
...
@@ -28,26 +27,26 @@ const ServiceProviderManagement = (props: any) => {
...
@@ -28,26 +27,26 @@ const ServiceProviderManagement = (props: any) => {
}
}
useEffect
(()
=>
{
useEffect
(()
=>
{
GetList
()
GetList
()
},
[]);
},
[]);
useEffect
(()
=>
{
useEffect
(()
=>
{
GetList
()
GetList
()
},
[
CommunityList
]);
},
[
CommunityList
]);
const
goToDetail
=
(
values
:
any
,
e
:
any
)
=>
{
const
goToDetail
=
(
values
:
any
,
e
:
any
)
=>
{
SaveChooseData
(
values
)
SaveChooseData
(
values
)
history
.
push
(
location
.
pathname
+
'/Detail'
)
history
.
push
(
location
.
pathname
+
'/Detail'
)
}
}
const
goToCreate
=
()
=>
{
const
goToCreate
=
()
=>
{
SaveChooseData
(
null
)
SaveChooseData
(
null
)
history
.
push
(
location
.
pathname
+
'/Edit'
)
history
.
push
(
location
.
pathname
+
'/Edit'
)
}
}
const
goToEdit
=
(
values
:
any
,
e
:
any
)
=>
{
const
goToEdit
=
(
values
:
any
,
e
:
any
)
=>
{
SaveChooseData
(
values
)
SaveChooseData
(
values
)
history
.
push
(
location
.
pathname
+
'/Edit'
)
history
.
push
(
location
.
pathname
+
'/Edit'
)
}
}
const
goToServices
=
()
=>
{
history
.
push
(
location
.
pathname
+
'/Services'
)}
const
goToServices
=
()
=>
{
history
.
push
(
location
.
pathname
+
'/Services'
)}
const
pagination
=
{
defaultCurrent
:
1
,
total
:
Data
!=
null
?
Data
.
length
:
0
}
const
pagination
=
{
defaultCurrent
:
1
,
total
:
Data
!=
null
?
Data
.
length
:
0
}
const
columns
=
[
const
columns
=
[
...
@@ -58,7 +57,7 @@ const ServiceProviderManagement = (props: any) => {
...
@@ -58,7 +57,7 @@ const ServiceProviderManagement = (props: any) => {
{
title
:
"Account Status"
,
dataIndex
:
'enable'
,},
{
title
:
"Account Status"
,
dataIndex
:
'enable'
,},
{
title
:
"Actions"
,
{
title
:
"Actions"
,
render
:
(
text
:
any
,
record
:
any
)
=>
(
render
:
(
text
:
any
,
record
:
any
)
=>
(
<
Space
size=
"middle"
><
a
onClick=
{
goToDetail
.
bind
(
this
,
record
)
}
>
Detail
</
a
><
a
onClick=
{
goToEdit
.
bind
(
this
,
record
)
}
>
edit
</
a
></
Space
>
<
Space
size=
"middle"
><
a
onClick=
{
goToDetail
.
bind
(
this
,
record
)
}
>
Detail
</
a
><
a
onClick=
{
goToEdit
.
bind
(
this
,
record
)
}
>
edit
</
a
></
Space
>
),
),
},
},
];
];
...
@@ -68,56 +67,51 @@ const ServiceProviderManagement = (props: any) => {
...
@@ -68,56 +67,51 @@ const ServiceProviderManagement = (props: any) => {
switch
(
tmp
[
items
].
enable
)
{
switch
(
tmp
[
items
].
enable
)
{
case
0
:
tmp
[
items
].
enable
=
"unregistered"
;
break
;
case
0
:
tmp
[
items
].
enable
=
"unregistered"
;
break
;
case
1
:
tmp
[
items
].
enable
=
"registered"
;
break
;
case
1
:
tmp
[
items
].
enable
=
"registered"
;
break
;
case
2
:
break
;
case
2
:
break
;
}
}
}
}
return
tmp
;
return
tmp
;
}
}
const
CallBackTitleSearch
=
(
comment
:
any
)
=>
{
const
CallBackTitleSearch
=
(
comment
:
any
)
=>
{
console
.
log
(
comment
)
console
.
log
(
comment
)
console
.
log
(
location
.
pathname
)
RA
()
//页面搜索
TosTosServiceProviderGet
({
providerName
:
comment
.
providerName
,
serviceCommunityList
:
CommunityList
})
// history.push(location.pathname+urlEncode(filterObj({ providerName: comment.providerName})))
}
}
return
(
return
(
<
div
className=
{
styles
.
base
}
>
<
div
className=
{
styles
.
base
}
>
{
/* 头部组件 */
}
<
TitleSearch
<
TitleSearch
listkey=
{
[
"providerName"
]
}
listkey=
{
[
"providerName"
]
}
list=
{
[
"Service Provider"
]
}
list=
{
[
"Service Provider"
]
}
community=
{
"serviceCommunityList"
}
community=
{
"serviceCommunityList"
}
onSubmit=
{
CallBackTitleSearch
}
/>
onSubmit=
{
CallBackTitleSearch
}
/>
{
/* 内容组件 */
}
{
/* 内容组件 */
}
<
div
className=
{
styles
.
box2
}
>
<
div
className=
{
styles
.
box2
}
>
<
button
className=
{
styles
.
buttonAdd2
}
onClick=
{
goToServices
}
>
Avail Services
</
button
>
<
button
className=
{
styles
.
buttonAdd2
}
onClick=
{
goToServices
}
>
Avail Services
</
button
>
<
button
className=
{
styles
.
buttonAdd
}
onClick=
{
goToCreate
}
>
Create New
</
button
>
<
button
className=
{
styles
.
buttonAdd
}
onClick=
{
goToCreate
}
>
Create New
</
button
>
</
div
>
</
div
>
{
/* 列表组件 */
}
{
/* 列表组件 */
}
<
Spin
spinning=
{
Data
!=
null
?
false
:
true
}
>
<
Spin
spinning=
{
Data
!=
null
?
false
:
true
}
>
<
Table
size=
"small"
rowKey=
{
"id"
}
style=
{
{
marginTop
:
16
}
}
columns=
{
columns
}
dataSource=
{
Data
!=
null
?
dataSource
(
Data
):
null
}
pagination=
{
pagination
}
/>
<
Table
size=
"small"
rowKey=
{
"id"
}
style=
{
{
marginTop
:
16
}
}
columns=
{
columns
}
dataSource=
{
Data
!=
null
?
dataSource
(
Data
):
null
}
pagination=
{
pagination
}
/>
</
Spin
>
</
Spin
>
</
div
>
</
div
>
);
);
};
};
function
mapStateToProps
(
state
:
any
)
{
function
mapStateToProps
(
state
:
any
)
{
const
{
Data
}
=
state
.
ServiceProvider
;
const
{
Data
}
=
state
.
ServiceProvider
;
const
{
DataProvider
}
=
state
.
User
;
const
{
CommunityList
}
=
state
.
Init
;
const
{
CommunityList
}
=
state
.
Init
;
return
{
return
{
Data
,
Data
,
DataProvider
,
CommunityList
CommunityList
};
};
}
}
...
...
src/pages/UserManagement/ServiceProviderManagement/Services.tsx
View file @
64895f51
import
React
,
{
useState
,
useEffect
}
from
'react'
;
import
React
,
{
useState
,
useEffect
,
useRef
}
from
'react'
;
import
styles
from
'./Services.less'
;
import
styles
from
'./Services.less'
;
import
{
Input
,
Button
,
Modal
,
Space
,
Pagination
,
Tooltip
,
Checkbox
}
from
'antd'
;
import
{
Form
,
Button
,
Modal
,
Space
,
Pagination
,
Tooltip
,
Checkbox
}
from
'antd'
;
import
{
Link
,
useIntl
,
connect
,
Dispatch
}
from
'umi'
;
import
{
Link
,
useIntl
,
connect
,
Dispatch
}
from
'umi'
;
...
@@ -11,30 +11,67 @@ import Line from '../../../components/Line/Line';
...
@@ -11,30 +11,67 @@ import Line from '../../../components/Line/Line';
import
BackButton
from
'../../../components/BackButton/BackButton'
;
import
BackButton
from
'../../../components/BackButton/BackButton'
;
import
TitleGet
from
'../../../components/TitleGet/TitleGet'
;
import
TitleGet
from
'../../../components/TitleGet/TitleGet'
;
import
TagSelect
from
'../../../components/TagSelect/index'
;
import
TagSelect
from
'../../../components/TagSelect/index'
;
import
{
RA
}
from
'@/utils/method'
;
import
TitleBack
from
'@/components/TitleBack/TitleBack'
;
const
Services
=
()
=>
{
const
module
=
"User"
const
Services
=
(
props
:
any
)
=>
{
const
{
dispatch
,
DataServices
}
=
props
const
formRef
=
useRef
(
null
)
useEffect
(()
=>
{
RA
(
43
,{
serviceName
:
""
},
module
,
dispatch
)
},
[
location
])
useEffect
(()
=>
{
if
(
DataServices
!=
null
)
{
var
tmp
=
DataServices
.
data
.
serviceScopeList
console
.
log
(
tmp
)
formRef
.
current
.
setFieldsValue
({
services
:
tmp
})
}
},
[
DataServices
])
const
onFinish
=
(
values
:
any
)
=>
{
console
.
log
(
values
)
RA
(
44
,
{
id
:
"5"
,
serviceName
:
"律政"
},
module
,
dispatch
)
}
const
Add
=
(
values
:
any
)
=>
{
console
.
log
(
values
)
}
const
Remove
=
(
values
:
any
)
=>
{
}
return
(
return
(
<
div
className=
{
styles
.
base
}
>
<
div
className=
{
styles
.
base
}
>
<
div
className=
{
styles
.
item0
}
><
TitleGet
title=
{
"Services Available Management"
}
/></
div
>
<
TitleBack
title=
{
"Services Available Management"
}
></
TitleBack
>
<
div
className=
{
styles
.
item2
}
><
BackButton
/></
div
>
<
div
className=
{
styles
.
clear0
}
></
div
>
<
div
className=
{
styles
.
item1
}
>
Available Services
</
div
>
<
Form
ref=
{
formRef
}
name=
"basic"
onFinish=
{
onFinish
}
>
<
div
className=
{
styles
.
item1_1
}
><
TagSelect
/></
div
>
{
DataServices
!=
null
?
<
div
className=
{
styles
.
clear1
}
></
div
>
<
Form
.
Item
label=
"Available Services"
name=
"services"
><
TagSelect
onAdd=
{
Add
}
onRemove=
{
Remove
}
/></
Form
.
Item
>
:
null
}
<
Line
/>
{
/* <Form.Item ><Button type="primary" htmlType="submit">Submit</Button></Form.Item> */
}
</
Form
>
<
Line
/>
<
Button
type=
"primary"
>
Submit
</
Button
>
</
div
>
</
div
>
);
);
};
};
function
mapStateToProps
(
state
:
any
)
{
const
{
DataServices
}
=
state
.
User
return
{
DataServices
}
}
export
default
connect
(
mapStateToProps
)(
Services
)
export
default
Services
;
...
...
src/pages/runTest/Template.tsx
View file @
64895f51
...
@@ -34,7 +34,7 @@ const Guard = (props:any) => {
...
@@ -34,7 +34,7 @@ const Guard = (props:any) => {
return
(
return
(
<
div
className=
{
styles
.
base
}
>
<
div
className=
{
styles
.
base
}
>
<
TitleGet
title=
{
"Version 1.2.
2
"
}
/>
<
TitleGet
title=
{
"Version 1.2.
4
"
}
/>
<
p
>
<
p
>
token:
{
page
.
token
}
token:
{
page
.
token
}
name:
{
getCookie
(
"name"
)
}
name:
{
getCookie
(
"name"
)
}
...
...
src/utils/method.ts
View file @
64895f51
...
@@ -172,7 +172,7 @@ export const checkData = (rule:any, value:any, callback:any) => {
...
@@ -172,7 +172,7 @@ export const checkData = (rule:any, value:any, callback:any) => {
if
(
/^
[
a-zA-Z0-9
]
+$/g
.
test
(
value
))
{
if
(
/^
[
a-zA-Z0-9
]
+$/g
.
test
(
value
))
{
callback
();
callback
();
}
else
{
}
else
{
callback
(
new
Error
(
'
Only numbers and letters can be entered!
'
));
callback
(
new
Error
(
'
*Numbers and letters
'
));
}
}
}
}
callback
();
callback
();
...
...
src/utils/params.ts
View file @
64895f51
...
@@ -99,7 +99,8 @@ export const requestList = [
...
@@ -99,7 +99,8 @@ export const requestList = [
"name"
:
""
,
"name"
:
""
,
"leaderID"
:
"1"
,
"leaderID"
:
"1"
,
"userPhone"
:
""
"userPhone"
:
""
}]
}],
[
"/tos/tosServiceProvider/get"
,
"46 获取服务商"
,{}],
]
]
const
params
=
[
const
params
=
[
...
...
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