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
ed4331b3
Commit
ed4331b3
authored
Oct 23, 2020
by
Sixiang_Zzb
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
LIFE用户管理处理完成
parent
f6dae9f3
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
114 additions
and
92 deletions
+114
-92
proxy.ts
config/proxy.ts
+28
-28
TitleSearch.tsx
src/components/TitleSearch/TitleSearch.tsx
+1
-1
ResultPageFailed.tsx
...es/UserManagement/LIFEUserManagement/ResultPageFailed.tsx
+17
-18
Users.tsx
src/pages/UserManagement/LIFEUserManagement/Users.tsx
+62
-37
ServiceProviderManagement.tsx
...t/ServiceProviderManagement/ServiceProviderManagement.tsx
+6
-8
No files found.
config/proxy.ts
View file @
ed4331b3
...
...
@@ -12,11 +12,11 @@ export default {
changeOrigin
:
true
,
pathRewrite
:
{
'^'
:
''
},
},
/
*
'/api/': {
target: 'http://localhost:8080',
changeOrigin: true,
pathRewrite: { '^': '' },
},*/
/
/
'/api/': {
//
target: 'http://localhost:8080',
//
changeOrigin: true,
//
pathRewrite: { '^': '' },
// },
'/res/'
:
{
target
:
'http://mapleonlyone.top'
,
changeOrigin
:
true
,
...
...
@@ -27,28 +27,28 @@ export default {
changeOrigin
:
true
,
pathRewrite
:
{
'^'
:
''
},
},
/* '/tos/': {
target: 'http://47.74.233.180:8651',
changeOrigin: true,
pathRewrite: { '^': '' },
},*/
'/tos/'
:
{
target
:
'http://
localhost
:8651'
,
target
:
'http://
47.74.233.180
:8651'
,
changeOrigin
:
true
,
pathRewrite
:
{
'^'
:
''
},
},
// '/tos/': {
// target: 'http://localhost:8651',
// changeOrigin: true,
// pathRewrite: { '^': '' },
// },
},
test
:
{
/* '/api/': {
target: 'https://preview.pro.ant.design',
changeOrigin: true,
pathRewrite: { '^': '' },
},*/
'/api/'
:
{
target
:
'http
://localhost:8080
'
,
target
:
'http
s://preview.pro.ant.design
'
,
changeOrigin
:
true
,
pathRewrite
:
{
'^'
:
''
},
},
// '/api/': {
// target: 'http://localhost:8080',
// changeOrigin: true,
// pathRewrite: { '^': '' },
// },
'/res/'
:
{
target
:
'http://mapleonlyone.top'
,
changeOrigin
:
true
,
...
...
@@ -59,16 +59,16 @@ export default {
changeOrigin
:
true
,
pathRewrite
:
{
'^'
:
''
},
},
/* '/tos/': {
target: 'http://47.74.233.180:8651',
changeOrigin: true,
pathRewrite: { '^': '' },
},*/
'/tos/'
:
{
target
:
'http://
localhost
:8651'
,
target
:
'http://
47.74.233.180
:8651'
,
changeOrigin
:
true
,
pathRewrite
:
{
'^'
:
''
},
},
// '/tos/': {
// target: 'http://localhost:8651',
// changeOrigin: true,
// pathRewrite: { '^': '' },
// },
},
pre
:
{
// '/api/': {
...
...
@@ -91,10 +91,10 @@ export default {
changeOrigin
:
true
,
pathRewrite
:
{
'^'
:
''
},
},
/
*
'/tos/': {
target: 'http://localhost:8651',
changeOrigin: true,
pathRewrite: { '^': '' },
},*/
/
/
'/tos/': {
//
target: 'http://localhost:8651',
//
changeOrigin: true,
//
pathRewrite: { '^': '' },
// },
},
};
src/components/TitleSearch/TitleSearch.tsx
View file @
ed4331b3
...
...
@@ -14,7 +14,7 @@ import { gray } from 'chalk';
import
SearchOptionsCommnity
from
'../SearchOptions/SearchOptionsCommnity'
;
const
TitleSearch
=
(
props
:
any
)
=>
{
// console.log("===================================",
props)
console
.
log
(
"==================================="
,
props
)
const
{
dispatch
,
CommunityList
}
=
props
;
...
...
src/pages/UserManagement/LIFEUserManagement/ResultPageFailed.tsx
View file @
ed4331b3
import
React
,
{
useState
,
useEffect
,
useRef
}
from
'react'
;
import
{
Input
,
Tabs
,
Table
,
Result
,
Button
}
from
'antd'
;
import
React
,
{
useState
,
useEffect
,
useRef
}
from
'react'
;
import
{
Input
,
Tabs
,
Table
,
Result
,
Button
}
from
'antd'
;
const
{
TabPane
}
=
Tabs
;
import
{
connect
,
history
}
from
'umi'
;
import
{
connect
,
history
}
from
'umi'
;
import
{
getCookie
}
from
'@/utils/method'
;
import
{
RA
}
from
'@/utils/method'
;
const
module
=
"User"
const
ResultPageFailed
=
(
props
:
any
)
=>
{
const
module
=
"User"
const
ResultPageFailed
=
(
props
:
any
)
=>
{
const
{
dispatch
,
Data
}
=
props
;
const
formRef
=
useRef
(
null
)
const
[
resultTime
,
setResultTime
]
=
useState
(
3
);
const
backPage
=
()
=>
{
history
.
go
(
-
1
)
}
return
(
<
div
style=
{
{
width
:
"100%"
,
minWidth
:
1020
,
padding
:
34
,
backgroundColor
:
"#ffffff"
}
}
>
<
Result
status=
"error"
title=
"Error submit the file!"
subTitle=
{
<
p
>
server has been handled it ,please try again or back.
</
p
>
}
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
>
]
}
/>
<
Result
status=
"error"
title=
"Error submit the file!"
subTitle=
{
<
p
>
server has been handled it ,please try again or back.
</
p
>
}
extra=
{
[
<
Button
type=
"primary"
key=
"ok"
><
a
href=
{
"http://47.74.233.180:8651/tos/excel/down?operator_id="
+
getCookie
(
"id"
)
}
>
Download
</
a
></
Button
>,
<
Button
key=
"back"
onClick=
{
backPage
}
>
Back
</
Button
>
]
}
/>
</
div
>
);
};
function
map
(
state
:
any
)
{
const
{
Data
}
=
state
[
module
]
return
{
Data
}
function
map
(
state
:
any
)
{
const
{
Data
}
=
state
[
module
]
return
{
Data
}
}
export
default
connect
(
map
)(
ResultPageFailed
);
src/pages/UserManagement/LIFEUserManagement/Users.tsx
View file @
ed4331b3
...
...
@@ -43,14 +43,16 @@ const Users = (props: any) => {
const
[
loading
,
setLoading
]
=
useState
(
false
)
const
[
fileUploading
,
setFileUploading
]
=
useState
(
false
)
const
[
pageNum
,
setPageNum
]
=
useState
(
1
)
const
[
readyData
,
setReadyData
]
=
useState
(
null
)
const
[
compent
,
setCompent
]
=
useState
({
loading
:
false
,
fileUploading
:
false
})
const
[
TestData
,
setTestData
]
=
useState
(
null
)
//{ rows: [], total:0,defaultCurrent:1 }
const
[
pageStart
,
setPageStart
]
=
useState
(
false
)
const
[
TestData
,
setTestData
]
=
useState
({})
// 存储当前页码
const
[
pageNum
,
setPageNum
]
=
useState
(
1
)
// 存储小区筛选条件
const
[
readyData
,
setReadyData
]
=
useState
(
null
as
any
)
// 表格模块
const
columns
=
[
{
title
:
username
,
dataIndex
:
'owerName'
,
},
{
title
:
project
,
dataIndex
:
'communityName'
,
},
...
...
@@ -70,12 +72,18 @@ const Users = (props: any) => {
},
];
// 上传的模块
const
propsUpload
=
{
name
:
'file'
,
action
:
()
=>
{
return
"http://47.74.233.180:8651/tos/excel/upload?userId="
+
getCookie
(
"id"
)
},
onChange
(
info
)
{
beforeUpload
:
(
file
:
any
)
=>
{
if
(
file
.
type
!==
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
)
{
message
.
error
(
`
${
file
.
name
}
file format is incorrect!`
);
}
return
file
.
type
===
'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'
;
},
onChange
(
info
:
any
)
{
console
.
log
(
info
)
if
(
info
.
file
.
status
==
'uploading'
)
{
setFileUploading
(
true
)
}
...
...
@@ -95,46 +103,42 @@ const Users = (props: any) => {
showUploadList
:
false
,
}
// 判断数据是否回来
useEffect
(()
=>
{
if
(
Data
!=
null
)
{
setLoading
(
false
)
console
.
log
(
"核查的地方"
)
console
.
log
(
Data
)
//
console.log("核查的地方")
//
console.log(Data)
}
},
[
Data
])
useEffect
(()
=>
{
//分页设置
if
(
location
.
query
.
pageNum
!=
null
)
{
setPageNum
(
parseInt
(
location
.
query
.
pageNum
))
}
else
{
setPageNum
(
1
)
if
(
location
.
query
.
owerName
)
{
setTestData
({
OwnerName
:
location
.
query
.
owerName
})
}
setPageNum
(
parseInt
(
location
.
query
.
pageNum
)
||
1
)
// 前置数据
var
tmp
=
filterObjbyTg
(
location
.
query
,
[
"owerName"
,
"pageNum"
])
setReadyData
(
tmp
)
//获取数据
setLoading
(
true
)
//获取数据
RA
(
12
,
{
owerName
:
location
.
query
.
owerName
!=
undefined
?
(
location
.
query
.
owerName
)
:
null
,
communityArray
:
TestData
!=
null
?
Test
Data
:
CommunityList
,
pageNum
,
owerName
:
location
.
query
.
owerName
!=
=
undefined
?
(
location
.
query
.
owerName
)
:
null
,
communityArray
:
readyData
!==
null
?
ready
Data
:
CommunityList
,
pageNum
:
location
.
query
.
pageNum
||
1
},
module
,
dispatch
);
console
.
log
(
"发送请求了123123123123123"
)
},
[
location
])
const
goToDetail
=
(
values
:
any
,
e
:
any
)
=>
{
console
.
log
(
values
,
readyData
,
"137========="
)
SA
(
values
)
PAGE
(
curString
,
module3
,
dispatch
)
//保存页面参数
PAGE
(
readyData
,
module3
,
dispatch
)
//保存页面参数
history
.
push
(
location
.
pathname
+
'/Detail'
)
}
const
goToEdit
=
(
values
:
any
,
e
:
any
)
=>
{
SA
(
values
)
PAGE
(
curString
,
module3
,
dispatch
)
PAGE
(
readyData
,
module3
,
dispatch
)
URL
({
pathname
:
location
.
pathname
+
'/Edit'
,
status
:
1
},
module2
,
dispatch
)
history
.
push
(
location
.
pathname
+
'/Edit'
)
}
...
...
@@ -144,42 +148,63 @@ const Users = (props: any) => {
history
.
push
(
location
.
pathname
+
'/Add'
)
}
// LIFE用户管理页面的搜索按钮
const
CallBackTitleSearch
=
(
comment
:
any
)
=>
{
console
.
log
(
"触发了按钮"
,
comment
)
setTestData
(
comment
.
serviceCommunityList
)
// 将筛选条件存储起来
setReadyData
(
comment
.
serviceCommunityList
)
setPageNum
(
1
)
history
.
push
(
location
.
pathname
+
urlEncode
(
filterObj
({
owerName
:
comment
.
OwnerName
,
pageNum
:
1
,
})))
/*页面跳转*/
if
(
comment
.
OwnerName
)
{
history
.
push
(
location
.
pathname
+
urlEncode
(
filterObj
({
owerName
:
comment
.
OwnerName
,
pageNum
:
1
,
})))
}
else
{
history
.
push
(
location
.
pathname
+
urlEncode
(
filterObj
({
pageNum
:
1
,
})))
}
}
const
pageChange
=
(
values
:
any
)
=>
{
// 将当前页码存储起来
setPageNum
(
values
.
current
)
/*页面跳转*/
var
tmp
=
filterObjbyTg
(
location
.
query
,
[])
tmp
[
"pageNum"
]
=
values
.
current
location
.
query
.
owerName
?
tmp
[
"owerName"
]
=
location
.
query
.
owerName
:
null
history
.
push
(
location
.
pathname
+
urlEncode
(
tmp
))
}
return
(
<
div
className=
{
styles
.
base
}
>
{
/* 头部组件 */
}
<
TitleSearch
listkey=
{
[
"OwnerName"
]
}
list=
{
[
"Owner Name"
]
}
community=
{
"serviceCommunityList"
}
onSubmit=
{
CallBackTitleSearch
}
/>
<
TitleSearch
listkey=
{
[
"OwnerName"
]
}
list=
{
[
"Owner Name"
]
}
community=
{
"serviceCommunityList"
}
onSubmit=
{
CallBackTitleSearch
}
defaultValue=
{
TestData
}
checklist=
{
pageData
}
/>
{
/* 内容组件 */
}
<
div
className=
{
styles
.
box2
}
>
<
button
className=
{
styles
.
buttonAdd2
}
onClick=
{
goToAdd
}
>
Create New Owner
</
button
>
<
div
className=
{
styles
.
buttonAdd
}
>
<
Upload
{
...
propsUpload
}
>
<
Button
icon=
{
compent
.
fileUploading
?
null
:
<
UploadOutlined
/>
}
>
{
compent
.
fileUploading
?
<><
Spin
indicator=
{
<
LoadingOutlined
style=
{
{
fontSize
:
16
}
}
spin
/>
}
/>
Uploading
</>
:
"Batch Upload"
}
</
Button
>
<
Button
icon=
{
compent
.
fileUploading
?
null
:
<
UploadOutlined
/>
}
>
{
compent
.
fileUploading
?
<>
<
Spin
indicator=
{
<
LoadingOutlined
style=
{
{
fontSize
:
16
}
}
spin
/>
}
/>
Uploading
</>
:
"Batch Upload"
}
</
Button
>
</
Upload
>
</
div
>
</
div
>
...
...
src/pages/UserManagement/ServiceProviderManagement/ServiceProviderManagement.tsx
View file @
ed4331b3
...
...
@@ -111,20 +111,18 @@ const ServiceProviderManagement = (props: any) => {
//分页设置
if
(
location
.
query
.
pageNum
!=
null
)
{
setPageNum
(
parseInt
(
location
.
query
.
pageNum
))
TosTosServiceProviderGet
({
...
location
.
query
,
serviceCommunityList
:
testData
!=
null
?
testData
:
CommunityList
,
})
}
else
{
setPageNum
(
1
)
//获取数据
setLoading
(
true
)
TosTosServiceProviderGet
({
...
location
.
query
,
serviceCommunityList
:
testData
!=
null
?
testData
:
CommunityList
,
})
}
TosTosServiceProviderGet
({
...
location
.
query
,
serviceCommunityList
:
testData
!=
null
?
testData
:
CommunityList
,
})
},
[
location
])
const
CallBackTitleSearch
=
(
comment
:
any
)
=>
{
...
...
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