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
9a7f6f7c
Commit
9a7f6f7c
authored
Sep 08, 2020
by
MrShi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dev分支,访客记录模块
parent
c8a8c3d5
Changes
11
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
224 additions
and
118 deletions
+224
-118
communityNotice.ts
src/models/communityNotice.ts
+11
-1
housingList.ts
src/models/housingList.ts
+10
-1
visitorRecord.ts
src/models/visitorRecord.ts
+8
-1
AccountEdit.tsx
src/pages/AccountManagement/account/AccountEdit.tsx
+12
-1
CommunityNotice.tsx
...s/CommunityManagement/communityNotice/CommunityNotice.tsx
+35
-24
CommunityNoticeEdit.tsx
...mmunityManagement/communityNotice/CommunityNoticeEdit.tsx
+12
-3
HousingList.tsx
src/pages/CommunityManagement/housingList/HousingList.tsx
+55
-47
VisitorRecord.tsx
...pages/CommunityManagement/visitorRecord/VisitorRecord.tsx
+56
-40
communityNotice.ts
src/services/communityNotice.ts
+9
-0
housingList.ts
src/services/housingList.ts
+7
-0
visitorRecord.ts
src/services/visitorRecord.ts
+9
-0
No files found.
src/models/communityNotice.ts
View file @
9a7f6f7c
import
{
getAllDevice
,
saveDevice
,
delDevice
,
getDeviceNum
,
getNewAddBug
,
importUserDeviceListExcel
,
import
{
getAll
Notice
,
getAll
Device
,
saveDevice
,
delDevice
,
getDeviceNum
,
getNewAddBug
,
importUserDeviceListExcel
,
getUserDevice
,
saveUserDevice
,
getTargetKeys
,
getNewAdd
,
importUserListExcel
,
getDeviceDetails
}
from
'@/services/communityNotice'
;
getUserDevice
,
saveUserDevice
,
getTargetKeys
,
getNewAdd
,
importUserListExcel
,
getDeviceDetails
}
from
'@/services/communityNotice'
;
import
{
getRegion
,
getRegionList
}
from
'@/services/region'
;
import
{
getRegion
,
getRegionList
}
from
'@/services/region'
;
...
@@ -8,6 +8,16 @@ export default{
...
@@ -8,6 +8,16 @@ export default{
data
:
[],
data
:
[],
},
},
effects
:
{
effects
:
{
*
getAllNotice
({
callback
,
payload
},{
call
,
put
})
{
const
response
=
yield
call
(
getAllNotice
,
payload
);
yield
put
({
type
:
"getAll"
,
});
if
(
callback
)
callback
(
response
);
},
*
getAllDevice
({
callback
,
payload
},{
call
,
put
})
{
*
getAllDevice
({
callback
,
payload
},{
call
,
put
})
{
const
response
=
yield
call
(
getAllDevice
,
payload
);
const
response
=
yield
call
(
getAllDevice
,
payload
);
yield
put
({
yield
put
({
...
...
src/models/housingList.ts
View file @
9a7f6f7c
import
{
getAllDevice
,
saveDevice
,
delDevice
,
getDeviceNum
,
getNewAddBug
,
importUserDeviceListExcel
,
import
{
getAllCommunity
,
getAllDevice
,
saveDevice
,
delDevice
,
getDeviceNum
,
getNewAddBug
,
importUserDeviceListExcel
,
getUserDevice
,
saveUserDevice
,
getTargetKeys
,
getNewAdd
,
importUserListExcel
,
getDeviceDetails
}
from
'@/services/housingList'
;
getUserDevice
,
saveUserDevice
,
getTargetKeys
,
getNewAdd
,
importUserListExcel
,
getDeviceDetails
}
from
'@/services/housingList'
;
import
{
getRegion
,
getRegionList
}
from
'@/services/region'
;
import
{
getRegion
,
getRegionList
}
from
'@/services/region'
;
...
@@ -8,6 +8,15 @@ export default{
...
@@ -8,6 +8,15 @@ export default{
data
:
[],
data
:
[],
},
},
effects
:
{
effects
:
{
*
getAllCommunity
({
callback
,
payload
},{
call
,
put
})
{
const
response
=
yield
call
(
getAllCommunity
,
payload
);
yield
put
({
type
:
"getAll"
,
});
if
(
callback
)
callback
(
response
);
},
*
getAllDevice
({
callback
,
payload
},{
call
,
put
})
{
*
getAllDevice
({
callback
,
payload
},{
call
,
put
})
{
const
response
=
yield
call
(
getAllDevice
,
payload
);
const
response
=
yield
call
(
getAllDevice
,
payload
);
yield
put
({
yield
put
({
...
...
src/models/visitorRecord.ts
View file @
9a7f6f7c
import
{
getAdvertisement
,
delAdvertisement
,
saveAdvertisement
,
quitAndUserAd
,
uploadApk
,
checkVideo
}
from
'@/services/visitorRecord'
;
import
{
get
VisitorRecord
,
get
Advertisement
,
delAdvertisement
,
saveAdvertisement
,
quitAndUserAd
,
uploadApk
,
checkVideo
}
from
'@/services/visitorRecord'
;
export
default
{
export
default
{
namespace
:
'visitorRecordModel'
,
namespace
:
'visitorRecordModel'
,
...
@@ -6,6 +6,13 @@ export default{
...
@@ -6,6 +6,13 @@ export default{
data
:
[],
data
:
[],
},
},
effects
:
{
effects
:
{
*
getVisitorRecord
({
callback
,
payload
},{
call
,
put
})
{
const
response
=
yield
call
(
getVisitorRecord
,
payload
);
yield
put
({
type
:
"getAd"
,
});
if
(
callback
)
callback
(
response
);
},
*
getAdvertisement
({
callback
,
payload
},{
call
,
put
})
{
*
getAdvertisement
({
callback
,
payload
},{
call
,
put
})
{
const
response
=
yield
call
(
getAdvertisement
,
payload
);
const
response
=
yield
call
(
getAdvertisement
,
payload
);
yield
put
({
yield
put
({
...
...
src/pages/AccountManagement/account/AccountEdit.tsx
View file @
9a7f6f7c
...
@@ -6,6 +6,7 @@ import {ConnectState} from "@/models/connect";
...
@@ -6,6 +6,7 @@ import {ConnectState} from "@/models/connect";
import
XLSX
from
'./xlsx.core.min'
;
import
XLSX
from
'./xlsx.core.min'
;
import
{
router
}
from
"umi"
;
import
{
router
}
from
"umi"
;
import
permission
from
"@/models/permission"
;
import
permission
from
"@/models/permission"
;
import
TitleSearch
from
"@/components/TitleSearch/TitleSearch"
;
let
go
=
0
;
let
go
=
0
;
...
@@ -563,7 +564,9 @@ class AccountEdit extends React.Component {
...
@@ -563,7 +564,9 @@ class AccountEdit extends React.Component {
return
false
;
return
false
;
},
},
};
};
const
CallBackTitleSearch
=
(
comment
:
any
)
=>
{
console
.
log
(
comment
)
}
return
(
return
(
<
div
className=
{
styles
.
body
}
>
<
div
className=
{
styles
.
body
}
>
<
div
style=
{
{
marginTop
:
48
}
}
>
<
div
style=
{
{
marginTop
:
48
}
}
>
...
@@ -621,6 +624,14 @@ class AccountEdit extends React.Component {
...
@@ -621,6 +624,14 @@ class AccountEdit extends React.Component {
allowClear=
{
true
}
>
{
adSelect
}
</
Select
>
allowClear=
{
true
}
>
{
adSelect
}
</
Select
>
</
div
>:
''
}
</
div
>:
''
}
<
TitleSearch
listkey=
{
[
"providerName"
]
}
list=
{
[
"Service Provider"
]
}
community=
{
"serviceCommunityList"
}
onSubmit=
{
CallBackTitleSearch
}
/>
<
div
>
<
div
>
<
div
style=
{
{
marginTop
:
20
}
}
>
<
div
style=
{
{
marginTop
:
20
}
}
>
{
/*<span className={styles.detailsContent}*/
}
{
/*<span className={styles.detailsContent}*/
}
...
...
src/pages/CommunityManagement/communityNotice/CommunityNotice.tsx
View file @
9a7f6f7c
...
@@ -218,21 +218,21 @@ class CommunityNotice extends React.Component {
...
@@ -218,21 +218,21 @@ class CommunityNotice extends React.Component {
userPhone
:
"18813787835"
userPhone
:
"18813787835"
};
};
this
.
props
.
dispatch
({
this
.
props
.
dispatch
({
type
:
'
tUModel/getTosUser
'
,
type
:
'
communityNoticeModel/getAllNotice
'
,
payload
:
params
,
payload
:
params
,
callback
:
(
res
)
=>
{
callback
:
(
res
)
=>
{
if
(
res
)
{
if
(
res
)
{
this
.
setState
({
/*
this.setState({
data: res.rows,
data: res.rows,
total: res.total,
total: res.total,
})
})
*/
//
if(res.error_code == "0000"){
if
(
res
.
error_code
==
"0000"
){
//
this.setState({
this
.
setState
({
//
data: res.data.rows,
data
:
res
.
data
.
rows
,
//
total: res.data.total,
total
:
res
.
data
.
total
,
//
})
})
//
}
}
if
(
res
.
error_code
==
"0001"
){
if
(
res
.
error_code
==
"0001"
){
alert
(
res
.
error_msg
);
alert
(
res
.
error_msg
);
...
@@ -254,6 +254,10 @@ class CommunityNotice extends React.Component {
...
@@ -254,6 +254,10 @@ class CommunityNotice extends React.Component {
edit
=
(
params
)
=>
{
edit
=
(
params
)
=>
{
let
flag
=
0
;
let
flag
=
0
;
const
nowUser
=
this
.
props
.
currentUser
;
const
nowUser
=
this
.
props
.
currentUser
;
this
.
props
.
dispatch
(
routerRedux
.
push
({
pathname
:
'/CommunityManagement/CommunityAnnouncement/Create'
,
query
:
params
,
}))
if
(
nowUser
.
permission
!=
null
){
if
(
nowUser
.
permission
!=
null
){
if
(
params
==
null
){
if
(
params
==
null
){
for
(
let
i
=
0
;
i
<
nowUser
.
permission
.
length
;
i
++
){
for
(
let
i
=
0
;
i
<
nowUser
.
permission
.
length
;
i
++
){
...
@@ -280,13 +284,13 @@ class CommunityNotice extends React.Component {
...
@@ -280,13 +284,13 @@ class CommunityNotice extends React.Component {
// alert("找不到用户权限记录!");
// alert("找不到用户权限记录!");
// return;
// return;
}
}
if
(
flag
==
0
){
/*
if(flag == 0){
if(params==null){
if(params==null){
alert("缺少设备添加权限!");
alert("缺少设备添加权限!");
}else{
}else{
alert("缺少设备修改权限!");
alert("缺少设备修改权限!");
}
}
}
}
*/
};
};
//跳转到编辑页面
//跳转到编辑页面
...
@@ -490,26 +494,33 @@ class CommunityNotice extends React.Component {
...
@@ -490,26 +494,33 @@ class CommunityNotice extends React.Component {
//表格列名
//表格列名
columns
=
[
columns
=
[
{
{
title
:
'User Name'
,
title
:
'Project Name'
,
dataIndex
:
'owerName'
,
dataIndex
:
'communityNum'
,
key
:
'owerName'
,
key
:
'communityNum'
,
},
{
title
:
'Announcement Title'
,
dataIndex
:
'noticTitlel'
,
key
:
'noticTitlel'
,
},
},
{
{
title
:
'
Projec
t'
,
title
:
'
noticTex
t'
,
dataIndex
:
'
owerPhone
'
,
dataIndex
:
'
noticText
'
,
key
:
'
owerPhone
'
,
key
:
'
noticText
'
,
},
},
{
{
title
:
'
Affiliated Unit
'
,
title
:
'
ReleaseTime
'
,
dataIndex
:
'
buildingNumber
'
,
dataIndex
:
'
noticStartTime
'
,
key
:
'
buildingNumber
'
,
key
:
'
noticStartTime
'
,
},
},
{
{
title
:
'
User
Status'
,
title
:
'Status'
,
dataIndex
:
'
enabl
e'
,
dataIndex
:
'
noticScop
e'
,
key
:
'
enabl
e'
,
key
:
'
noticScop
e'
,
render
:
(
text
,
record
)
=>
(
render
:
(
text
,
record
)
=>
(
<
span
>
{
record
.
enable
==
'1'
?
"注册"
:
"未注册
"
}
</
span
>
<
span
>
{
record
.
noticScope
==
'1'
?
"全部小区"
:
"对应小区
"
}
</
span
>
),
),
/* render: (text, record) => (
/* render: (text, record) => (
...
...
src/pages/CommunityManagement/communityNotice/CommunityNoticeEdit.tsx
View file @
9a7f6f7c
...
@@ -8,6 +8,7 @@ import TextArea from 'antd/lib/input/TextArea';
...
@@ -8,6 +8,7 @@ import TextArea from 'antd/lib/input/TextArea';
import
{
PlusOutlined
}
from
'@ant-design/icons'
;
import
{
PlusOutlined
}
from
'@ant-design/icons'
;
import
SelectOptions
from
'../../../components/SelectOptions/index'
;
import
SelectOptions
from
'../../../components/SelectOptions/index'
;
import
TitleSearch
from
"@/components/TitleSearch/TitleSearch"
;
const
printContent
=
(
comment
:
any
)
=>
{
const
printContent
=
(
comment
:
any
)
=>
{
console
.
log
(
comment
)
console
.
log
(
comment
)
}
}
...
@@ -47,7 +48,9 @@ const Template = () => {
...
@@ -47,7 +48,9 @@ const Template = () => {
};
};
const
handleChange
=
(
Obj
:
any
)
=>
{
setFileList
(
Obj
.
fileList
)
}
const
handleChange
=
(
Obj
:
any
)
=>
{
setFileList
(
Obj
.
fileList
)
}
const
CallBackTitleSearch
=
(
comment
:
any
)
=>
{
console
.
log
(
comment
)
}
return
(
return
(
<
div
className=
{
styles
.
base
}
>
<
div
className=
{
styles
.
base
}
>
...
@@ -58,10 +61,16 @@ const Template = () => {
...
@@ -58,10 +61,16 @@ const Template = () => {
</
div
>
</
div
>
{
/*<SelectOptions list={["美国", "美丽的", "美好", "加拿大", "加油", "XO"].sort()} onSubmit={printContent} />*/
}
{
/*<SelectOptions list={["美国", "美丽的", "美好", "加拿大", "加油", "XO"].sort()} onSubmit={printContent} />*/
}
<
SelectOptions
list=
{
[
"A1 Project"
,
"B1 Project"
,
"C1 Project"
,
"D1 Project"
,
"E1 Project"
,
"F1 Project"
{
/*
<SelectOptions list={["A1 Project","B1 Project","C1 Project","D1 Project","E1 Project","F1 Project"
,"G1 Project","H1 Project","I1 Project","J1 Project","K1 Project","L1 Project","M1 Project","N1 Project"
,"G1 Project","H1 Project","I1 Project","J1 Project","K1 Project","L1 Project","M1 Project","N1 Project"
,"O1 Project","P1 Project","Q1 Project","R1 Project","S1 Project","T1 Project","U1 Project","V1 Project"
,"O1 Project","P1 Project","Q1 Project","R1 Project","S1 Project","T1 Project","U1 Project","V1 Project"
,
"W1 Project"
,
"X1 Project"
,
"Y1 Project"
,
"Z1 Project"
]
}
onSubmit=
{
printContent
}
/>
,"W1 Project","X1 Project","Y1 Project","Z1 Project"]} onSubmit={printContent}/>*/
}
<
TitleSearch
listkey=
{
[
"providerName"
]
}
list=
{
[
"Service Provider"
]
}
community=
{
"serviceCommunityList"
}
onSubmit=
{
CallBackTitleSearch
}
/>
<
div
className=
{
styles
.
box1
}
>
<
div
className=
{
styles
.
box1
}
>
<
div
className=
{
styles
.
box1item1
}
>
Announcement Title
</
div
>
<
div
className=
{
styles
.
box1item1
}
>
Announcement Title
</
div
>
<
div
className=
{
styles
.
box1item2
}
><
Input
style=
{
{
width
:
500
}
}
/></
div
>
<
div
className=
{
styles
.
box1item2
}
><
Input
style=
{
{
width
:
500
}
}
/></
div
>
...
...
src/pages/CommunityManagement/housingList/HousingList.tsx
View file @
9a7f6f7c
...
@@ -6,6 +6,7 @@ import {ConnectState} from "@/models/connect";
...
@@ -6,6 +6,7 @@ import {ConnectState} from "@/models/connect";
/*import XLSX from "@/pages/account/xlsx.core.min";*/
/*import XLSX from "@/pages/account/xlsx.core.min";*/
import
{
router
}
from
"umi"
;
import
{
router
}
from
"umi"
;
import
SelectOptions
from
'../../../components/SelectOptions/index'
;
import
SelectOptions
from
'../../../components/SelectOptions/index'
;
import
TitleSearch
from
"@/components/TitleSearch/TitleSearch"
;
...
@@ -219,21 +220,21 @@ class HousingList extends React.Component {
...
@@ -219,21 +220,21 @@ class HousingList extends React.Component {
userPhone
:
"18813787835"
userPhone
:
"18813787835"
};
};
this
.
props
.
dispatch
({
this
.
props
.
dispatch
({
type
:
'
tUModel/getTosUser
'
,
type
:
'
housingListModel/getAllCommunity
'
,
payload
:
params
,
payload
:
params
,
callback
:
(
res
)
=>
{
callback
:
(
res
)
=>
{
if
(
res
)
{
if
(
res
)
{
this
.
setState
({
//
this.setState({
data
:
res
.
rows
,
//
data: res.rows,
total
:
res
.
total
,
//
total: res.total,
})
//
})
//
if(res.error_code == "0000"){
if
(
res
.
error_code
==
"0000"
){
//
this.setState({
this
.
setState
({
//
data: res.data.rows,
data
:
res
.
data
.
rows
,
//
total: res.data.total,
total
:
res
.
data
.
total
,
//
})
})
//
}
}
if
(
res
.
error_code
==
"0001"
){
if
(
res
.
error_code
==
"0001"
){
alert
(
res
.
error_msg
);
alert
(
res
.
error_msg
);
...
@@ -255,6 +256,10 @@ class HousingList extends React.Component {
...
@@ -255,6 +256,10 @@ class HousingList extends React.Component {
edit
=
(
params
)
=>
{
edit
=
(
params
)
=>
{
let
flag
=
0
;
let
flag
=
0
;
const
nowUser
=
this
.
props
.
currentUser
;
const
nowUser
=
this
.
props
.
currentUser
;
this
.
props
.
dispatch
(
routerRedux
.
push
({
pathname
:
'/CommunityManagement/housingList/Create'
,
query
:
params
,
}))
if
(
nowUser
.
permission
!=
null
){
if
(
nowUser
.
permission
!=
null
){
if
(
params
==
null
){
if
(
params
==
null
){
for
(
let
i
=
0
;
i
<
nowUser
.
permission
.
length
;
i
++
){
for
(
let
i
=
0
;
i
<
nowUser
.
permission
.
length
;
i
++
){
...
@@ -281,13 +286,13 @@ class HousingList extends React.Component {
...
@@ -281,13 +286,13 @@ class HousingList extends React.Component {
//alert("找不到用户权限记录!");
//alert("找不到用户权限记录!");
//return;;
//return;;
}
}
if
(
flag
==
0
){
/*
if(flag == 0){
if(params==null){
if(params==null){
alert("缺少设备添加权限!");
alert("缺少设备添加权限!");
}else{
}else{
alert("缺少设备修改权限!");
alert("缺少设备修改权限!");
}
}
}
}
*/
};
};
//跳转到编辑页面
//跳转到编辑页面
...
@@ -320,13 +325,13 @@ class HousingList extends React.Component {
...
@@ -320,13 +325,13 @@ class HousingList extends React.Component {
//alert("找不到用户权限记录!");
//alert("找不到用户权限记录!");
//return;;
//return;;
}
}
if
(
flag
==
0
){
/*
if(flag == 0){
if(params==null){
if(params==null){
alert("缺少设备添加权限!");
alert("缺少设备添加权限!");
}else{
}else{
alert("缺少设备修改权限!");
alert("缺少设备修改权限!");
}
}
}
}
*/
};
};
//跳转到详情页面
//跳转到详情页面
...
@@ -491,21 +496,31 @@ class HousingList extends React.Component {
...
@@ -491,21 +496,31 @@ class HousingList extends React.Component {
//表格列名
//表格列名
columns
=
[
columns
=
[
{
{
title
:
'User Name'
,
title
:
'Project Name'
,
dataIndex
:
'owerName'
,
dataIndex
:
'residentialName'
,
key
:
'owerName'
,
key
:
'residentialName'
,
},
{
title
:
'Administrator'
,
dataIndex
:
'residentialManagerUserName'
,
key
:
'residentialManagerUserName'
,
},
},
{
{
title
:
'
Project
'
,
title
:
'
Operation Hour
'
,
dataIndex
:
'
owerPhon
e'
,
dataIndex
:
'
residentialHotlineServieStartTim
e'
,
key
:
'
owerPhon
e'
,
key
:
'
residentialHotlineServieStartTim
e'
,
},
},
{
{
title
:
'
Affiliated Unit
'
,
title
:
'
Office Tel
'
,
dataIndex
:
'
buildingNumber
'
,
dataIndex
:
'
residentialPhone
'
,
key
:
'
buildingNumber
'
,
key
:
'
residentialPhone
'
,
},
},
{
{
title
:
'Address'
,
dataIndex
:
'residentialAddress'
,
key
:
'residentialAddress'
,
},
/* {
title: 'User Status',
title: 'User Status',
dataIndex: 'enable',
dataIndex: 'enable',
key: 'enable',
key: 'enable',
...
@@ -513,26 +528,9 @@ class HousingList extends React.Component {
...
@@ -513,26 +528,9 @@ class HousingList extends React.Component {
<span>{record.enable == '1' ? "注册" : "未注册"}</span>
<span>{record.enable == '1' ? "注册" : "未注册"}</span>
),
),
/* render: (text, record) => (
<>
{record.map(enable => {
let color = 'green';
if (enable === '1') {
color = 'volcano';
}
if (enable === '0') {
color = 'geekblue';
}
return (
<Tag color={color} key={enable}>
{enable.toUpperCase()}
</Tag>
);
}
</>
),*/
},
},*/
/*{
/*{
title: '用户类型',
title: '用户类型',
...
@@ -651,6 +649,10 @@ class HousingList extends React.Component {
...
@@ -651,6 +649,10 @@ class HousingList extends React.Component {
const districtSelect = districtList.map((item) => (
const districtSelect = districtList.map((item) => (
<Select.Option value={item.code} label={item.name}>{item.name}</Select.Option>
<Select.Option value={item.code} label={item.name}>{item.name}</Select.Option>
));*/
));*/
const
CallBackTitleSearch
=
(
comment
:
any
)
=>
{
console
.
log
(
comment
)
}
return
(
return
(
<
div
className=
{
styles
.
body
}
>
<
div
className=
{
styles
.
body
}
>
<
div
className=
{
styles
.
inputBox
}
>
<
div
className=
{
styles
.
inputBox
}
>
...
@@ -711,25 +713,31 @@ class HousingList extends React.Component {
...
@@ -711,25 +713,31 @@ class HousingList extends React.Component {
}
}
</div>*/
}
</div>*/
}
<
div
>
{
/*
<div>
<h1>Hello World</h1>
<h1>Hello World</h1>
<SelectOptions list={["A1 Project","B1 Project","C1 Project","D1 Project","E1 Project","F1 Project"
<SelectOptions list={["A1 Project","B1 Project","C1 Project","D1 Project","E1 Project","F1 Project"
,"G1 Project","H1 Project","I1 Project","J1 Project","K1 Project","L1 Project","M1 Project","N1 Project"
,"G1 Project","H1 Project","I1 Project","J1 Project","K1 Project","L1 Project","M1 Project","N1 Project"
,"O1 Project","P1 Project","Q1 Project","R1 Project","S1 Project","T1 Project","U1 Project","V1 Project"
,"O1 Project","P1 Project","Q1 Project","R1 Project","S1 Project","T1 Project","U1 Project","V1 Project"
,"W1 Project","X1 Project","Y1 Project","Z1 Project"]} onSubmit={printContent}/>
,"W1 Project","X1 Project","Y1 Project","Z1 Project"]} onSubmit={printContent}/>
</
div
>
</div>*/
}
<
TitleSearch
listkey=
{
[
"providerName"
]
}
list=
{
[
"Service Provider"
]
}
community=
{
"serviceCommunityList"
}
onSubmit=
{
CallBackTitleSearch
}
/>
<
div
>
<
div
>
<
Button
className=
{
styles
.
button1
}
onClick=
{
()
=>
this
.
getDevice
()
}
>
Search
</
Button
>
<
Button
className=
{
styles
.
button1
}
onClick=
{
()
=>
this
.
getDevice
()
}
>
Search
</
Button
>
{
/*<Button className={styles.button} onClick={() => this.reset()}>重置</Button>*/
}
{
/*<Button className={styles.button} onClick={() => this.reset()}>重置</Button>*/
}
<
Button
className=
{
styles
.
button2
}
onClick=
{
()
=>
this
.
edit
(
null
)
}
>
Create cell
</
Button
>
<
Button
className=
{
styles
.
button2
}
onClick=
{
()
=>
this
.
edit
(
null
)
}
>
Create cell
</
Button
>
{
/*
<Upload {...uploadprops}>
<
Upload
{
...
uploadprops
}
>
<
Tooltip
title=
""
>
<
Tooltip
title=
""
>
<
Button
className=
{
styles
.
button2
}
<
Button
className=
{
styles
.
button2
}
style=
{
{
width
:
150
}
}
>
style=
{
{
width
:
150
}
}
>
<
Icon
type=
"upload"
/>
Batch Upload
<
Icon
type=
"upload"
/>
Batch Upload
</
Button
>
</
Button
>
</
Tooltip
>
</
Tooltip
>
</Upload>
*/
}
</
Upload
>
</
div
>
</
div
>
<
div
>
<
div
>
<
Table
<
Table
...
...
src/pages/CommunityManagement/visitorRecord/VisitorRecord.tsx
View file @
9a7f6f7c
...
@@ -6,6 +6,7 @@ import {ConnectState} from "@/models/connect";
...
@@ -6,6 +6,7 @@ import {ConnectState} from "@/models/connect";
// import XLSX from "@/pages/account/xlsx.core.min";
// import XLSX from "@/pages/account/xlsx.core.min";
import
{
router
}
from
"umi"
;
import
{
router
}
from
"umi"
;
import
SelectOptions
from
'../../../components/SelectOptions/index'
;
import
SelectOptions
from
'../../../components/SelectOptions/index'
;
import
TitleSearch
from
"@/components/TitleSearch/TitleSearch"
;
...
@@ -219,21 +220,21 @@ class VisitorRecord extends React.Component {
...
@@ -219,21 +220,21 @@ class VisitorRecord extends React.Component {
userPhone
:
"18813787835"
userPhone
:
"18813787835"
};
};
this
.
props
.
dispatch
({
this
.
props
.
dispatch
({
type
:
'
tUModel/getTosUser
'
,
type
:
'
visitorRecordModel/getVisitorRecord
'
,
payload
:
params
,
payload
:
params
,
callback
:
(
res
)
=>
{
callback
:
(
res
)
=>
{
if
(
res
)
{
if
(
res
)
{
this
.
setState
({
/*
this.setState({
data: res.rows,
data: res.rows,
total: res.total,
total: res.total,
})
})
*/
//
if(res.error_code == "0000"){
if
(
res
.
error_code
==
"0000"
){
//
this.setState({
this
.
setState
({
//
data: res.data.rows,
data
:
res
.
data
.
rows
,
//
total: res.data.total,
total
:
res
.
data
.
total
,
//
})
})
//
}
}
if
(
res
.
error_code
==
"0001"
){
if
(
res
.
error_code
==
"0001"
){
alert
(
res
.
error_msg
);
alert
(
res
.
error_msg
);
...
@@ -491,21 +492,48 @@ class VisitorRecord extends React.Component {
...
@@ -491,21 +492,48 @@ class VisitorRecord extends React.Component {
//表格列名
//表格列名
columns
=
[
columns
=
[
{
{
title
:
'invit
or
'
,
title
:
'invit
ees
'
,
dataIndex
:
'
ow
erName'
,
dataIndex
:
'
invit
erName'
,
key
:
'
ow
erName'
,
key
:
'
invit
erName'
,
},
},
{
{
title
:
'Visitor'
,
title
:
'Visitor'
,
dataIndex
:
'
owerPhon
e'
,
dataIndex
:
'
visitorsNam
e'
,
key
:
'
owerPhon
e'
,
key
:
'
visitorsNam
e'
,
},
},
{
{
title
:
'Security
Guarder
'
,
title
:
'Security
Staff
'
,
dataIndex
:
'
buildingNumber
'
,
dataIndex
:
'
securityGuardName
'
,
key
:
'
buildingNumber
'
,
key
:
'
securityGuardName
'
,
},
},
{
{
title
:
'License Plate'
,
dataIndex
:
'numberPlate'
,
key
:
'numberPlate'
,
},
{
title
:
'Time of Arrival'
,
dataIndex
:
'createTime'
,
key
:
'createTime'
,
},
{
title
:
'Project'
,
dataIndex
:
'inviterAddress'
,
key
:
'inviterAddress'
,
},
{
title
:
'Address'
,
dataIndex
:
'visitorCommunity'
,
key
:
'visitorCommunity'
,
},
{
title
:
'cdkCode'
,
dataIndex
:
'cdkCode'
,
key
:
'cdkCode'
,
},
/* {
title: 'Car Templete',
title: 'Car Templete',
dataIndex: 'enable',
dataIndex: 'enable',
key: 'enable',
key: 'enable',
...
@@ -513,26 +541,7 @@ class VisitorRecord extends React.Component {
...
@@ -513,26 +541,7 @@ class VisitorRecord extends React.Component {
<span>{record.enable == '1' ? "注册" : "未注册"}</span>
<span>{record.enable == '1' ? "注册" : "未注册"}</span>
),
),
/* render: (text, record) => (
},*/
<>
{record.map(enable => {
let color = 'green';
if (enable === '1') {
color = 'volcano';
}
if (enable === '0') {
color = 'geekblue';
}
return (
<Tag color={color} key={enable}>
{enable.toUpperCase()}
</Tag>
);
}
</>
),*/
},
/*{
/*{
title: '用户类型',
title: '用户类型',
...
@@ -651,6 +660,9 @@ class VisitorRecord extends React.Component {
...
@@ -651,6 +660,9 @@ class VisitorRecord extends React.Component {
const districtSelect = districtList.map((item) => (
const districtSelect = districtList.map((item) => (
<Select.Option value={item.code} label={item.name}>{item.name}</Select.Option>
<Select.Option value={item.code} label={item.name}>{item.name}</Select.Option>
));*/
));*/
const
CallBackTitleSearch
=
(
comment
:
any
)
=>
{
console
.
log
(
comment
)
}
return
(
return
(
<
div
className=
{
styles
.
body
}
>
<
div
className=
{
styles
.
body
}
>
<
div
className=
{
styles
.
inputBox
}
>
<
div
className=
{
styles
.
inputBox
}
>
...
@@ -725,15 +737,19 @@ class VisitorRecord extends React.Component {
...
@@ -725,15 +737,19 @@ class VisitorRecord extends React.Component {
</
Upload
>
</
Upload
>
</
div
>
</
div
>
<
div
>
{
/*
<div>
<h1>Hello World</h1>
<h1>Hello World</h1>
<SelectOptions list={["A1 Project","B1 Project","C1 Project","D1 Project","E1 Project","F1 Project"
<SelectOptions list={["A1 Project","B1 Project","C1 Project","D1 Project","E1 Project","F1 Project"
,"G1 Project","H1 Project","I1 Project","J1 Project","K1 Project","L1 Project","M1 Project","N1 Project"
,"G1 Project","H1 Project","I1 Project","J1 Project","K1 Project","L1 Project","M1 Project","N1 Project"
,"O1 Project","P1 Project","Q1 Project","R1 Project","S1 Project","T1 Project","U1 Project","V1 Project"
,"O1 Project","P1 Project","Q1 Project","R1 Project","S1 Project","T1 Project","U1 Project","V1 Project"
,"W1 Project","X1 Project","Y1 Project","Z1 Project"]} onSubmit={printContent}/>
,"W1 Project","X1 Project","Y1 Project","Z1 Project"]} onSubmit={printContent}/>
</
div
>
</div>*/
}
<
TitleSearch
listkey=
{
[
"providerName"
]
}
list=
{
[
"Service Provider"
]
}
community=
{
"serviceCommunityList"
}
onSubmit=
{
CallBackTitleSearch
}
/>
<
div
>
<
div
>
<
Table
<
Table
rowKey=
{
record
=>
record
.
deviceID
}
rowKey=
{
record
=>
record
.
deviceID
}
...
...
src/services/communityNotice.ts
View file @
9a7f6f7c
...
@@ -7,6 +7,15 @@ export interface LoginParamsType {
...
@@ -7,6 +7,15 @@ export interface LoginParamsType {
captcha
:
string
;
captcha
:
string
;
}
}
export
async
function
getAllNotice
(
params
:
LoginParamsType
)
{
return
request
(
'/tos/tosCommunityNotic/get/'
,
{
method
:
'POST'
,
data
:
params
,
});
}
export
async
function
fakeAccountLogin
(
params
:
LoginParamsType
)
{
export
async
function
fakeAccountLogin
(
params
:
LoginParamsType
)
{
return
request
(
'/api/tos/user/login/'
,
{
return
request
(
'/api/tos/user/login/'
,
{
method
:
'POST'
,
method
:
'POST'
,
...
...
src/services/housingList.ts
View file @
9a7f6f7c
...
@@ -7,6 +7,13 @@ export interface LoginParamsType {
...
@@ -7,6 +7,13 @@ export interface LoginParamsType {
captcha
:
string
;
captcha
:
string
;
}
}
export
async
function
getAllCommunity
(
params
:
LoginParamsType
)
{
return
request
(
'/tos/tosCommunity/get'
,
{
method
:
'POST'
,
data
:
params
,
});
}
export
async
function
fakeAccountLogin
(
params
:
LoginParamsType
)
{
export
async
function
fakeAccountLogin
(
params
:
LoginParamsType
)
{
return
request
(
'/api/tos/user/login/'
,
{
return
request
(
'/api/tos/user/login/'
,
{
method
:
'POST'
,
method
:
'POST'
,
...
...
src/services/visitorRecord.ts
View file @
9a7f6f7c
import
request
from
'@/utils/request'
;
import
request
from
'@/utils/request'
;
export
async
function
getVisitorRecord
(
params
)
{
return
request
(
'/tos/tosVisitorRecord/get'
,
{
method
:
'POST'
,
data
:
params
,
});
}
export
async
function
getAdvertisement
(
params
)
{
export
async
function
getAdvertisement
(
params
)
{
return
request
(
'/api/ad/get'
,
{
return
request
(
'/api/ad/get'
,
{
method
:
'POST'
,
method
:
'POST'
,
...
...
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