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
e892b86e
Commit
e892b86e
authored
Oct 13, 2020
by
MrShi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[fix] 批量上传业主,条件查询服务商
parent
64895f51
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
32 additions
and
26 deletions
+32
-26
ResultPageFailed.tsx
...es/UserManagement/LIFEUserManagement/ResultPageFailed.tsx
+3
-3
Users.tsx
src/pages/UserManagement/LIFEUserManagement/Users.tsx
+2
-2
ServiceProviderManagement.tsx
...t/ServiceProviderManagement/ServiceProviderManagement.tsx
+27
-21
TOS WEB端 接口文档(word) .docx
项目文档/TOS WEB端 接口文档(word) .docx
+0
-0
No files found.
src/pages/UserManagement/LIFEUserManagement/ResultPageFailed.tsx
View file @
e892b86e
...
@@ -19,7 +19,7 @@ const ResultPageFailed = (props:any) => {
...
@@ -19,7 +19,7 @@ const ResultPageFailed = (props:any) => {
history
.
go
(
-
1
)
history
.
go
(
-
1
)
}
}
return
(
return
(
<
div
style=
{
{
width
:
"100%"
,
minWidth
:
1020
,
padding
:
34
,
backgroundColor
:
"#ffffff"
}
}
>
<
div
style=
{
{
width
:
"100%"
,
minWidth
:
1020
,
padding
:
34
,
backgroundColor
:
"#ffffff"
}
}
>
<
Result
<
Result
status=
"error"
status=
"error"
title=
"Error submit the file!"
title=
"Error submit the file!"
...
@@ -27,7 +27,7 @@ const ResultPageFailed = (props:any) => {
...
@@ -27,7 +27,7 @@ const ResultPageFailed = (props:any) => {
extra=
{
[
extra=
{
[
<
Button
type=
"primary"
key=
"ok"
><
a
href=
"http://47.74.233.180:8651/tos/excel/down?operator_id=123456"
>
Download
</
a
></
Button
>,
<
Button
key=
"back"
onClick=
{
backPage
}
>
Back
</
Button
>
<
Button
type=
"primary"
key=
"ok"
><
a
href=
"http://47.74.233.180:8651/tos/excel/down?operator_id=123456"
>
Download
</
a
></
Button
>,
<
Button
key=
"back"
onClick=
{
backPage
}
>
Back
</
Button
>
]
}
]
}
/>
/>
</
div
>
</
div
>
);
);
};
};
...
@@ -36,4 +36,4 @@ function map(state:any) {
...
@@ -36,4 +36,4 @@ function map(state:any) {
const
{
Data
}
=
state
[
module
]
const
{
Data
}
=
state
[
module
]
return
{
Data
}
return
{
Data
}
}
}
export
default
connect
(
map
)(
ResultPageFailed
);
export
default
connect
(
map
)(
ResultPageFailed
);
\ No newline at end of file
src/pages/UserManagement/LIFEUserManagement/Users.tsx
View file @
e892b86e
...
@@ -77,11 +77,11 @@ const Users = (props:any) => {
...
@@ -77,11 +77,11 @@ const Users = (props:any) => {
setFileUploading
(
true
)
setFileUploading
(
true
)
}
}
if
(
info
.
file
.
status
===
'done'
)
{
if
(
info
.
file
.
status
===
'done'
)
{
if
(
info
.
file
.
response
.
data
.
error_code
==
"0000"
)
{
if
(
info
.
file
.
response
.
error_code
==
"0000"
)
{
history
.
push
(
location
.
pathname
+
"/Result"
)
history
.
push
(
location
.
pathname
+
"/Result"
)
}
else
{
}
else
{
history
.
push
(
location
.
pathname
+
"/ResultFailed"
)
history
.
push
(
location
.
pathname
+
"/ResultFailed"
)
message
.
error
(
`
${
info
.
file
.
name
}
file upload failed.`
);
message
.
error
(
`
${
info
.
file
.
name
}
file upload failed.`
+
'failed count is '
+
info
.
file
.
response
.
data
.
count
);
setFileUploading
(
false
)
setFileUploading
(
false
)
}
}
}
else
if
(
info
.
file
.
status
===
'error'
)
{
}
else
if
(
info
.
file
.
status
===
'error'
)
{
...
...
src/pages/UserManagement/ServiceProviderManagement/ServiceProviderManagement.tsx
View file @
e892b86e
...
@@ -10,13 +10,13 @@ import TitleSearch from '../../../components/TitleSearch/TitleSearch';
...
@@ -10,13 +10,13 @@ import TitleSearch from '../../../components/TitleSearch/TitleSearch';
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
({
...
@@ -27,26 +27,26 @@ const ServiceProviderManagement = (props: any) => {
...
@@ -27,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
=
[
...
@@ -57,7 +57,7 @@ const ServiceProviderManagement = (props: any) => {
...
@@ -57,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
>
),
),
},
},
];
];
...
@@ -67,20 +67,26 @@ const ServiceProviderManagement = (props: any) => {
...
@@ -67,20 +67,26 @@ 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
)
RA
()
console
.
log
(
location
.
pathname
)
//页面搜索
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
...
@@ -88,25 +94,25 @@ const ServiceProviderManagement = (props: any) => {
...
@@ -88,25 +94,25 @@ const ServiceProviderManagement = (props: any) => {
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
{
DataProvider
}
=
state
.
User
;
const
{
CommunityList
}
=
state
.
Init
;
const
{
CommunityList
}
=
state
.
Init
;
return
{
return
{
...
...
项目文档/TOS WEB端 接口文档(word) .docx
0 → 100644
View file @
e892b86e
File added
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