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
64e50d1e
Commit
64e50d1e
authored
Feb 03, 2021
by
cellee
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Signed-off-by: cellee <893264950@qq.com>
parent
059303cf
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
87 additions
and
92 deletions
+87
-92
proxy.ts
config/proxy.ts
+6
-6
VisitorRecord.ts
src/models/CommunityManagement/VisitorRecord.ts
+2
-3
AccountEdit.tsx
src/pages/AccountManagement/account/AccountEdit.tsx
+1
-1
VisitorRecord.tsx
...pages/CommunityManagement/VisitorRecord/VisitorRecord.tsx
+39
-41
VisitorRecord.tsx
...pages/CommunityManagement/visitorRecord/VisitorRecord.tsx
+39
-41
No files found.
config/proxy.ts
View file @
64e50d1e
...
@@ -86,15 +86,15 @@ export default {
...
@@ -86,15 +86,15 @@ export default {
changeOrigin
:
true
,
changeOrigin
:
true
,
pathRewrite
:
{
'^'
:
''
},
pathRewrite
:
{
'^'
:
''
},
},
},
// '/tos/': {
// target: 'http://47.74.233.180:8651',
// changeOrigin: true,
// pathRewrite: { '^': '' },
// },
'/tos/'
:
{
'/tos/'
:
{
target
:
'http://
192.168.1.28
:8651'
,
target
:
'http://
47.74.233.180
:8651'
,
changeOrigin
:
true
,
changeOrigin
:
true
,
pathRewrite
:
{
'^'
:
''
},
pathRewrite
:
{
'^'
:
''
},
},
},
// '/tos/': {
// target: 'http://192.168.1.28:8651',
// changeOrigin: true,
// pathRewrite: { '^': '' },
// },
},
},
};
};
src/models/CommunityManagement/VisitorRecord.ts
View file @
64e50d1e
/*
/*
* @Author: your name
* @Author: your name
* @Date: 2020-11-19 16:54:53
* @Date: 2020-11-19 16:54:53
* @LastEditTime: 2021-02-03 1
7:43:00
* @LastEditTime: 2021-02-03 1
9:55:13
* @LastEditors: Please set LastEditors
* @LastEditors: Please set LastEditors
* @Description: In User Settings Edit
* @Description: In User Settings Edit
* @FilePath: \tostumi\src\models\CommunityManagement\VisitorRecord.ts
* @FilePath: \tostumi\src\models\CommunityManagement\VisitorRecord.ts
...
@@ -53,8 +53,7 @@ export default {
...
@@ -53,8 +53,7 @@ export default {
case
26
:
case
26
:
{
{
// 总数据
// 总数据
let
Data
=
resp
.
data
.
rows
;
let
Data
=
resp
.
data
;
console
.
log
(
'??'
);
yield
put
({
type
:
'returnPage'
,
Data
});
yield
put
({
type
:
'returnPage'
,
Data
});
}
}
break
;
break
;
...
...
src/pages/AccountManagement/account/AccountEdit.tsx
View file @
64e50d1e
...
@@ -673,7 +673,7 @@ const Account = (props: any) => {
...
@@ -673,7 +673,7 @@ const Account = (props: any) => {
};
};
const
AccountProps
=
(
state
:
any
)
=>
{
const
AccountProps
=
(
state
:
any
)
=>
{
console
.
log
(
state
.
loading
);
//
console.log(state.loading);
const
{
Data
,
DataSave
,
DataSaveDetail
,
Result
,
SubResult
,
Permission
,
Info
}
=
state
.
Account
;
const
{
Data
,
DataSave
,
DataSaveDetail
,
Result
,
SubResult
,
Permission
,
Info
}
=
state
.
Account
;
const
loading
=
state
.
loading
.
global
;
const
loading
=
state
.
loading
.
global
;
const
{
user
}
=
state
;
const
{
user
}
=
state
;
...
...
src/pages/CommunityManagement/VisitorRecord/VisitorRecord.tsx
View file @
64e50d1e
import
React
,
{
useEffect
}
from
'react'
;
import
React
,
{
useEffect
,
useState
}
from
'react'
;
import
{
Input
,
Form
,
Button
,
DatePicker
}
from
'antd'
;
import
{
Input
,
Form
,
Button
,
DatePicker
,
Pagination
}
from
'antd'
;
import
{
connect
}
from
'umi'
;
import
{
connect
}
from
'umi'
;
import
ProTable
from
'@ant-design/pro-table'
;
import
ProTable
from
'@ant-design/pro-table'
;
import
{
RA
,
SA
}
from
'@/utils/method'
;
import
{
RA
,
SA
}
from
'@/utils/method'
;
...
@@ -14,16 +14,12 @@ const module = 'VisitorRecord';
...
@@ -14,16 +14,12 @@ const module = 'VisitorRecord';
const
VisitorRecord
=
(
props
:
any
)
=>
{
const
VisitorRecord
=
(
props
:
any
)
=>
{
const
{
dispatch
,
Data
,
DataSave
,
loading
,
CommunityList
}
=
props
;
const
{
dispatch
,
Data
,
DataSave
,
loading
,
CommunityList
}
=
props
;
const
[
term
,
setTerm
]
=
useState
({
communityNames
:
CommunityList
,
pageNum
:
1
});
// 搜索条件
// 新增搜索的时间 原来时间是时间戳格式
// 新增搜索的时间 原来时间是时间戳格式
useEffect
(()
=>
{
useEffect
(()
=>
{
if
(
Data
!=
null
&&
CommunityList
!=
null
)
{
RA
(
26
,
term
,
module
,
dispatch
);
// Data.forEach((item: any) => {
},
[
1
]);
// item.showTime = moment(item.updateTime).format('YYYY-MM-DD');
// });
}
else
{
RA
(
26
,
{
communityNames
:
CommunityList
},
module
,
dispatch
);
}
},
[
Data
,
CommunityList
]);
// 表头
// 表头
const
columns
:
any
=
[
const
columns
:
any
=
[
...
@@ -32,7 +28,6 @@ const VisitorRecord = (props: any) => {
...
@@ -32,7 +28,6 @@ const VisitorRecord = (props: any) => {
{
title
:
'Security Guard'
,
dataIndex
:
'securityGuardName'
},
{
title
:
'Security Guard'
,
dataIndex
:
'securityGuardName'
},
{
title
:
'Car Number'
,
dataIndex
:
'numberPlate'
},
{
title
:
'Car Number'
,
dataIndex
:
'numberPlate'
},
{
title
:
'Telephone'
,
dataIndex
:
'inviterPhone'
},
{
title
:
'Telephone'
,
dataIndex
:
'inviterPhone'
},
// 隐藏的搜索框
{
{
title
:
'Visiting Time'
,
title
:
'Visiting Time'
,
dataIndex
:
'updateTime'
,
dataIndex
:
'updateTime'
,
...
@@ -47,39 +42,32 @@ const VisitorRecord = (props: any) => {
...
@@ -47,39 +42,32 @@ const VisitorRecord = (props: any) => {
];
];
const
[
form
]
=
Form
.
useForm
();
const
[
form
]
=
Form
.
useForm
();
// 分页
const
pagination
:
any
=
{
defaultCurrent
:
1
,
// total: Data != null ? Data.length : 0,
defaultPageSize
:
15
,
showSizeChanger
:
false
,
showTitle
:
false
,
showTotal
:
false
,
size
:
'default'
,
};
// 多条件筛选
//@param condition 过滤条件
//@param data 需要过滤的数据
let
filter
=
(
condition
:
any
,
data
:
any
)
=>
{
return
data
.
filter
((
item
:
any
)
=>
{
return
Object
.
keys
(
condition
).
every
((
key
)
=>
{
return
String
(
item
[
key
])
.
toLowerCase
()
.
includes
(
String
(
condition
[
key
]).
trim
().
toLowerCase
());
});
});
};
// 点击搜索
// 点击搜索
const
onSubmitForm
=
(
value
:
any
)
=>
{
const
onSubmitForm
=
(
value
:
any
)
=>
{
console
.
log
(
value
);
let
obj
=
{
let
obj
=
{
communityNames
:
value
.
community
.
value
,
communityNames
:
value
.
community
.
value
,
inviterName
:
value
.
inviterName
?
value
.
inviterName
:
''
,
inviterName
:
value
.
inviterName
?
value
.
inviterName
:
null
,
showTime
:
value
.
showTime
?
moment
(
value
.
showTime
).
format
(
'YYYY-MM-DD'
)
:
''
,
showTime
:
value
.
showTime
?
moment
(
value
.
showTime
).
format
(
'YYYY-MM-DD'
)
:
null
,
pageNum
:
1
,
};
setTerm
({
...
term
,
...
obj
});
// SA(obj, module, dispatch);
RA
(
26
,
obj
,
module
,
dispatch
);
};
// 页面切换
const
paginationHandler
=
(
page
:
number
,
pageSize
?:
number
)
=>
{
// // 要看是哪里分页
// let mlist = { ...DataSaveDetail };
// mlist.pageNum = page;
// // 把内容存进去
// SA(DetailPage(mlist), module, dispatch);
let
obj
=
{
...
term
,
pageNum
:
page
,
};
};
SA
(
obj
,
module
,
dispatch
);
setTerm
({
...
obj
}
);
RA
(
26
,
obj
,
module
,
dispatch
);
RA
(
26
,
obj
,
module
,
dispatch
);
};
};
...
@@ -122,10 +110,9 @@ const VisitorRecord = (props: any) => {
...
@@ -122,10 +110,9 @@ const VisitorRecord = (props: any) => {
<
ProTable
<
ProTable
loading=
{
loading
}
loading=
{
loading
}
rowKey=
"id"
rowKey=
"id"
dataSource=
{
Data
!=
null
?
Data
.
rows
:
''
}
dataSource=
{
Data
!=
null
?
Data
.
list
:
null
}
columns=
{
columns
}
columns=
{
columns
}
pagination=
{
pagination
}
pagination=
{
false
}
// 隐藏默认分页
// pagination={{ current: 1, total: Data.total}}
search=
{
false
}
search=
{
false
}
toolBarRender=
{
false
}
toolBarRender=
{
false
}
headerTitle=
"Visitor List"
headerTitle=
"Visitor List"
...
@@ -133,6 +120,17 @@ const VisitorRecord = (props: any) => {
...
@@ -133,6 +120,17 @@ const VisitorRecord = (props: any) => {
onSubmit=
{
onSubmitForm
}
onSubmit=
{
onSubmitForm
}
/>
/>
</
div
>
</
div
>
<
div
style=
{
{
textAlign
:
'right'
,
padding
:
15
}
}
>
<
Pagination
current=
{
Data
?
Data
.
page
.
currentPage
:
0
}
total=
{
Data
?
Data
.
page
.
totalRow
:
0
}
onChange=
{
paginationHandler
}
showSizeChanger=
{
false
}
// showSizeChanger={false}
pageSize=
{
Data
?
Data
.
page
.
curPageSize
:
10
}
/>
</
div
>
</>
</>
);
);
};
};
...
...
src/pages/CommunityManagement/visitorRecord/VisitorRecord.tsx
View file @
64e50d1e
import
React
,
{
useEffect
}
from
'react'
;
import
React
,
{
useEffect
,
useState
}
from
'react'
;
import
{
Input
,
Form
,
Button
,
DatePicker
}
from
'antd'
;
import
{
Input
,
Form
,
Button
,
DatePicker
,
Pagination
}
from
'antd'
;
import
{
connect
}
from
'umi'
;
import
{
connect
}
from
'umi'
;
import
ProTable
from
'@ant-design/pro-table'
;
import
ProTable
from
'@ant-design/pro-table'
;
import
{
RA
,
SA
}
from
'@/utils/method'
;
import
{
RA
,
SA
}
from
'@/utils/method'
;
...
@@ -14,16 +14,12 @@ const module = 'VisitorRecord';
...
@@ -14,16 +14,12 @@ const module = 'VisitorRecord';
const
VisitorRecord
=
(
props
:
any
)
=>
{
const
VisitorRecord
=
(
props
:
any
)
=>
{
const
{
dispatch
,
Data
,
DataSave
,
loading
,
CommunityList
}
=
props
;
const
{
dispatch
,
Data
,
DataSave
,
loading
,
CommunityList
}
=
props
;
const
[
term
,
setTerm
]
=
useState
({
communityNames
:
CommunityList
,
pageNum
:
1
});
// 搜索条件
// 新增搜索的时间 原来时间是时间戳格式
// 新增搜索的时间 原来时间是时间戳格式
useEffect
(()
=>
{
useEffect
(()
=>
{
if
(
Data
!=
null
&&
CommunityList
!=
null
)
{
RA
(
26
,
term
,
module
,
dispatch
);
// Data.forEach((item: any) => {
},
[
1
]);
// item.showTime = moment(item.updateTime).format('YYYY-MM-DD');
// });
}
else
{
RA
(
26
,
{
communityNames
:
CommunityList
},
module
,
dispatch
);
}
},
[
Data
,
CommunityList
]);
// 表头
// 表头
const
columns
:
any
=
[
const
columns
:
any
=
[
...
@@ -32,7 +28,6 @@ const VisitorRecord = (props: any) => {
...
@@ -32,7 +28,6 @@ const VisitorRecord = (props: any) => {
{
title
:
'Security Guard'
,
dataIndex
:
'securityGuardName'
},
{
title
:
'Security Guard'
,
dataIndex
:
'securityGuardName'
},
{
title
:
'Car Number'
,
dataIndex
:
'numberPlate'
},
{
title
:
'Car Number'
,
dataIndex
:
'numberPlate'
},
{
title
:
'Telephone'
,
dataIndex
:
'inviterPhone'
},
{
title
:
'Telephone'
,
dataIndex
:
'inviterPhone'
},
// 隐藏的搜索框
{
{
title
:
'Visiting Time'
,
title
:
'Visiting Time'
,
dataIndex
:
'updateTime'
,
dataIndex
:
'updateTime'
,
...
@@ -47,39 +42,32 @@ const VisitorRecord = (props: any) => {
...
@@ -47,39 +42,32 @@ const VisitorRecord = (props: any) => {
];
];
const
[
form
]
=
Form
.
useForm
();
const
[
form
]
=
Form
.
useForm
();
// 分页
const
pagination
:
any
=
{
defaultCurrent
:
1
,
// total: Data != null ? Data.length : 0,
defaultPageSize
:
15
,
showSizeChanger
:
false
,
showTitle
:
false
,
showTotal
:
false
,
size
:
'default'
,
};
// 多条件筛选
//@param condition 过滤条件
//@param data 需要过滤的数据
let
filter
=
(
condition
:
any
,
data
:
any
)
=>
{
return
data
.
filter
((
item
:
any
)
=>
{
return
Object
.
keys
(
condition
).
every
((
key
)
=>
{
return
String
(
item
[
key
])
.
toLowerCase
()
.
includes
(
String
(
condition
[
key
]).
trim
().
toLowerCase
());
});
});
};
// 点击搜索
// 点击搜索
const
onSubmitForm
=
(
value
:
any
)
=>
{
const
onSubmitForm
=
(
value
:
any
)
=>
{
console
.
log
(
value
);
let
obj
=
{
let
obj
=
{
communityNames
:
value
.
community
.
value
,
communityNames
:
value
.
community
.
value
,
inviterName
:
value
.
inviterName
?
value
.
inviterName
:
''
,
inviterName
:
value
.
inviterName
?
value
.
inviterName
:
null
,
showTime
:
value
.
showTime
?
moment
(
value
.
showTime
).
format
(
'YYYY-MM-DD'
)
:
''
,
showTime
:
value
.
showTime
?
moment
(
value
.
showTime
).
format
(
'YYYY-MM-DD'
)
:
null
,
pageNum
:
1
,
};
setTerm
({
...
term
,
...
obj
});
// SA(obj, module, dispatch);
RA
(
26
,
obj
,
module
,
dispatch
);
};
// 页面切换
const
paginationHandler
=
(
page
:
number
,
pageSize
?:
number
)
=>
{
// // 要看是哪里分页
// let mlist = { ...DataSaveDetail };
// mlist.pageNum = page;
// // 把内容存进去
// SA(DetailPage(mlist), module, dispatch);
let
obj
=
{
...
term
,
pageNum
:
page
,
};
};
SA
(
obj
,
module
,
dispatch
);
setTerm
({
...
obj
}
);
RA
(
26
,
obj
,
module
,
dispatch
);
RA
(
26
,
obj
,
module
,
dispatch
);
};
};
...
@@ -122,10 +110,9 @@ const VisitorRecord = (props: any) => {
...
@@ -122,10 +110,9 @@ const VisitorRecord = (props: any) => {
<
ProTable
<
ProTable
loading=
{
loading
}
loading=
{
loading
}
rowKey=
"id"
rowKey=
"id"
dataSource=
{
Data
!=
null
?
Data
.
rows
:
''
}
dataSource=
{
Data
!=
null
?
Data
.
list
:
null
}
columns=
{
columns
}
columns=
{
columns
}
pagination=
{
pagination
}
pagination=
{
false
}
// 隐藏默认分页
// pagination={{ current: 1, total: Data.total}}
search=
{
false
}
search=
{
false
}
toolBarRender=
{
false
}
toolBarRender=
{
false
}
headerTitle=
"Visitor List"
headerTitle=
"Visitor List"
...
@@ -133,6 +120,17 @@ const VisitorRecord = (props: any) => {
...
@@ -133,6 +120,17 @@ const VisitorRecord = (props: any) => {
onSubmit=
{
onSubmitForm
}
onSubmit=
{
onSubmitForm
}
/>
/>
</
div
>
</
div
>
<
div
style=
{
{
textAlign
:
'right'
,
padding
:
15
}
}
>
<
Pagination
current=
{
Data
?
Data
.
page
.
currentPage
:
0
}
total=
{
Data
?
Data
.
page
.
totalRow
:
0
}
onChange=
{
paginationHandler
}
showSizeChanger=
{
false
}
// showSizeChanger={false}
pageSize=
{
Data
?
Data
.
page
.
curPageSize
:
10
}
/>
</
div
>
</>
</>
);
);
};
};
...
...
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