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
988b4f10
Commit
988b4f10
authored
Nov 10, 2020
by
cellee
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
设施管理解决
Signed-off-by:
cellee
<
893264950@qq.com
>
parent
47d17e5f
Changes
9
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
388 additions
and
418 deletions
+388
-418
Facilitys.tsx
src/components/Facilitys/Facilitys.tsx
+0
-1
OnTime.tsx
src/components/OnTime/OnTime.tsx
+36
-14
FacilityBookings.ts
src/models/CommunityManagement/FacilityBookings.ts
+5
-1
BookingDetail.tsx
...es/CommunityManagement/FacilityBookings/BookingDetail.tsx
+5
-1
Bookings.tsx
src/pages/CommunityManagement/FacilityBookings/Bookings.tsx
+3
-2
Facility.tsx
src/pages/CommunityManagement/FacilityBookings/Facility.tsx
+302
-289
FacilityBookings.tsx
...CommunityManagement/FacilityBookings/FacilityBookings.tsx
+35
-16
VisitorRecord copy.tsx
.../CommunityManagement/VisitorRecord/VisitorRecord copy.tsx
+0
-92
tip.ts
src/utils/tip.ts
+2
-2
No files found.
src/components/Facilitys/Facilitys.tsx
View file @
988b4f10
...
...
@@ -222,7 +222,6 @@ const Facilitys = (props: any) => {
function
mapStateToProps
(
state
:
any
)
{
const
{
FacilitysList
}
=
state
.
FacilityBookings
;
console
.
log
(
FacilitysList
);
return
{
FacilitysList
,
};
...
...
src/components/OnTime/OnTime.tsx
View file @
988b4f10
import
React
from
'react'
;
import
{
Select
}
from
'antd'
;
const
Option
=
Select
.
Option
;
import
React
,
{
useState
,
useEffect
}
from
'react'
;
import
{
Select
,
TimePicker
}
from
'antd'
;
const
{
Option
}
=
Select
;
import
moment
from
'moment'
;
const
OnTime
=
(
porps
:
any
)
=>
{
// placeholder 默认显示 disabled 是否禁止
// openSelect 选中函数 limit 限制时间 type 类型 时开始还是结束 1 就是结束 结尾是59
let
{
placeholder
,
disabled
,
openSelect
,
limit
,
type
}
=
porps
;
// defaultValue 默认时间
let
{
placeholder
,
disabled
,
openSelect
,
limit
,
type
,
defaultValue
}
=
porps
;
console
.
log
(
limit
);
const
[
imgOpen
,
setImgOpen
]
=
useState
(
null
as
any
);
useEffect
(()
=>
{
if
(
defaultValue
!=
null
)
{
let
a
=
moment
(
defaultValue
,
'HH:mm'
);
setImgOpen
(
a
);
}
},
[
defaultValue
]);
// console.log(limit);
// 生成数组 -- 时间
const
createArray
=
(
num
:
any
)
=>
{
var
arr
=
[];
for
(
let
i
=
1
;
i
<
num
;
i
++
)
{
for
(
let
i
=
0
;
i
<
num
;
i
++
)
{
if
(
i
<
10
)
{
arr
[
i
]
=
`0
${
i
}
`
;
}
else
{
...
...
@@ -49,14 +60,25 @@ const OnTime = (porps: any) => {
return
(
<>
<
Select
style=
{
{
width
:
140
}
}
placeholder=
{
placeholder
}
disabled=
{
disabled
}
onSelect=
{
openSelect
}
>
{
hourS
}
</
Select
>
{
defaultValue
?
(
<
TimePicker
defaultValue=
{
moment
(
defaultValue
,
'HH:mm'
)
}
format=
"HH:mm"
onChange=
{
openSelect
}
placeholder=
{
placeholder
}
defaultOpenValue=
{
moment
(
'00:00'
,
'HH:mm'
)
}
disabled=
{
disabled
}
/>
)
:
(
<
Select
style=
{
{
width
:
140
}
}
placeholder=
{
placeholder
}
disabled=
{
disabled
}
onSelect=
{
openSelect
}
>
{
hourS
}
</
Select
>
)
}
</>
);
};
...
...
src/models/CommunityManagement/FacilityBookings.ts
View file @
988b4f10
...
...
@@ -161,7 +161,11 @@ export default {
}
break
;
case
7
:
{
let
tmp
=
resp
.
data
;
const
reg
=
[[
"url"
,
"categoriesImageUrl"
],
[
"name"
,
"categoriesName"
]]
const
reg
=
[
[
"url"
,
"categoriesImageUrl"
],
[
"name"
,
"categoriesName"
],
[
'imgName'
,
'categoriesImageName'
]
]
const
reg2
=
[[
"url"
,
null
]]
//let sourceData = tmp;
// sourceData.categoriesOpenTime= timeToMoment(tmp.categoriesOpenTime);
...
...
src/pages/CommunityManagement/FacilityBookings/BookingDetail.tsx
View file @
988b4f10
...
...
@@ -15,6 +15,8 @@ import {
message
,
}
from
'antd'
;
import
moment
from
'moment'
;
import
{
Link
,
useIntl
,
connect
,
Dispatch
}
from
'umi'
;
import
TitleBack
from
'../../../components/TitleBack/TitleBack'
;
...
...
@@ -23,6 +25,7 @@ import { timestampToTime3 } from '../../../utils/time';
import
TextArea
from
'antd/lib/input/TextArea'
;
import
{
getUrlLast
}
from
'../../../utils/string'
;
import
{
merge
}
from
'lodash'
;
const
BookingDetail
=
(
props
:
any
)
=>
{
const
{
dispatch
,
location
,
DataSave
,
DataSaveDetail
,
token
,
load
}
=
props
;
...
...
@@ -135,7 +138,8 @@ const BookingDetail = (props: any) => {
{
statusDes
[
DataSave
.
status
]
}
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
"Order Time"
>
{
timestampToTime3
(
DataSave
.
createTime
.
time
)
}
{
/* {timestampToTime3(DataSave.createTime.time)} */
}
{
moment
(
DataSave
.
createTime
.
time
).
format
(
'MM-DD HH:mm'
)
}
</
Descriptions
.
Item
>
</
Descriptions
>
...
...
src/pages/CommunityManagement/FacilityBookings/Bookings.tsx
View file @
988b4f10
...
...
@@ -88,6 +88,7 @@ const Bookings = (props: any) => {
}
},
[
Result
]);
console
.
log
(
Data3
);
// 选择小区监听是不是有值
useEffect
(()
=>
{
setLoading
(
false
);
...
...
@@ -257,7 +258,7 @@ const Bookings = (props: any) => {
alone=
{
true
}
placeholder=
{
'Community Name'
}
opname=
{
getFacility
}
default
Valu
e=
{
DataSave
!=
null
?
DataSave
.
communityName
:
null
}
default
Nam
e=
{
DataSave
!=
null
?
DataSave
.
communityName
:
null
}
// onSubmit={getFacility}
/>
</
Spin
>
...
...
@@ -316,7 +317,7 @@ const Bookings = (props: any) => {
<
div
className=
{
styles
.
box4item1
}
>
Unit :
</
div
>
<
div
className=
"divbox4"
>
<
Form
.
Item
name=
"buildNumber"
rules=
{
BookingsTip
[
2
]
}
>
<
Input
placeholder=
"B
uilding
"
style=
{
{
width
:
80
}
}
disabled=
{
prohibit
}
/>
<
Input
placeholder=
"B
lk
"
style=
{
{
width
:
80
}
}
disabled=
{
prohibit
}
/>
</
Form
.
Item
>
<
span
className=
"jio"
>
#
</
span
>
<
Form
.
Item
name=
"floorNumber"
rules=
{
BookingsTip
[
3
]
}
>
...
...
src/pages/CommunityManagement/FacilityBookings/Facility.tsx
View file @
988b4f10
This diff is collapsed.
Click to expand it.
src/pages/CommunityManagement/FacilityBookings/FacilityBookings.tsx
View file @
988b4f10
...
...
@@ -43,7 +43,9 @@ const FacilityBookings = (props: any) => {
const
QA
=
(
values
:
any
)
=>
{
dispatch
({
type
:
'FacilityBookings/QA'
,
playload
:
values
});
};
const
IA
=
()
=>
{
dispatch
({
type
:
'FacilityBookings/IA'
});
};
const
CA
=
()
=>
{
dispatch
({
type
:
'FacilityBookings/CA'
,
playload
:
null
});
};
...
...
@@ -52,14 +54,14 @@ const FacilityBookings = (props: any) => {
const
[
columns2
,
setColumns2
]
=
useState
([]);
const
goToFunction
=
()
=>
{
console
.
log
(
curString
.
tab
);
if
(
curString
.
tab
==
2
)
{
CA
();
// 先清空上传图片列表
dispatch
({
type
:
'FacilityBookings/overAllImgList'
});
}
else
{
// 清空之前的数据
let
Data3
=
null
;
dispatch
({
type
:
'FacilityBookings/returnPage3'
,
Data3
});
SA
(
null
);
}
history
.
push
(
location
.
pathname
+
(
curString
.
tab
==
1
?
'/Booking'
:
'/Adding'
));
};
...
...
@@ -74,8 +76,10 @@ const FacilityBookings = (props: any) => {
const
makeOperator
=
(
values
:
any
,
index
:
any
)
=>
{
const
path
=
[
'/FacilityDetail'
,
'/FacilityEdit'
,
'/FacilityApply'
];
SA
(
values
);
console
.
log
(
'准备页面跳转'
);
console
.
log
(
curString
);
// 清空设施列表图
let
list
:
any
=
[];
dispatch
({
type
:
'FacilityBookings/genxin'
,
list
});
history
.
push
(
location
.
pathname
+
path
[
index
]);
};
...
...
@@ -307,7 +311,7 @@ const FacilityBookings = (props: any) => {
toolBarRender=
{
()
=>
[
<
Button
key=
"3"
type=
"primary"
onClick=
{
goToFunction
}
>
<
PlusOutlined
/>
添加预约
Add Appointment
</
Button
>,
]
}
options=
{
{
...
...
@@ -318,7 +322,7 @@ const FacilityBookings = (props: any) => {
},
setting
:
false
,
}
}
headerTitle=
"预约列表"
//
headerTitle="预约列表"
/>
{
curString
?
(
...
...
@@ -343,18 +347,18 @@ const FacilityBookings = (props: any) => {
rowKey=
"id"
dataSource=
{
Data2
.
data
}
columns=
{
columns2
}
pagination=
{
{
current
:
curString
.
curPage2
,
total
:
Data2
.
total
.
totalRow
,
showSizeChanger
:
false
,
onChange
:
Pagechange
,
}
}
//
pagination={false} // 隐藏默认分页
//
pagination={{
//
current: curString.curPage2,
//
total: Data2.total.totalRow,
//
showSizeChanger: false,
//
onChange: Pagechange,
//
}}
pagination=
{
false
}
// 隐藏默认分页
search=
{
false
}
toolBarRender=
{
()
=>
[
<
Button
key=
"3"
type=
"primary"
onClick=
{
goToFunction
}
>
<
PlusOutlined
/>
添加设施
Add Facilities
</
Button
>,
]
}
options=
{
{
...
...
@@ -365,8 +369,23 @@ const FacilityBookings = (props: any) => {
},
setting
:
false
,
}
}
headerTitle=
"设施列表
"
// headerTitle="Facilities List
"
/>
{
curString
?
(
<
div
className=
"pages"
>
<
Pagination
current=
{
curString
.
curPage2
}
total=
{
Data2
.
total
.
totalRow
}
// pageSizeOptions=
{[]}
showSizeChanger=
{
false
}
// pageSize=
{
village
.
page
.
curPageSize
}
onChange=
{
Pagechange
}
/>
</
div
>
)
:
(
''
)
}
</
TabPane
>
</
Tabs
>
</
div
>
...
...
src/pages/CommunityManagement/VisitorRecord/VisitorRecord copy.tsx
deleted
100644 → 0
View file @
47d17e5f
import
React
,
{
useState
,
useEffect
}
from
'react'
;
import
{
Input
,
Tabs
,
Table
,
Space
,
Button
}
from
'antd'
;
const
{
TabPane
}
=
Tabs
;
import
{
connect
}
from
'umi'
;
import
{
objectColumns
}
from
'@/utils/string'
;
// cdkCode: 998974
// cdkStatus: "0"
// count: 0
// createTime: "Sep 7, 2020 6:12:35 PM"
// deleted: 0
// enable: 0
// extend: ""
// id: "8f8b49308c0b4fb4a0e6b9d6af0aaa1e"
// inviterAddress: "TANGDE2#01#01#01"
// inviterId: "2597108b72f64a5da34892c14f0e6a57"
// inviterName: "啊啊啊"
// inviterPhone: "2536727886@qq.com"
// linkStatus: 1
// numberPlate: "粤A465123"
// securityGuardCommunity: "unkown"
// securityGuardName: "unkown"
// securityGuardPhone: "unkown"
// status: 1
// updateTime: "Sep 7, 2020 6:13:06 PM"
// visitorsName: "销赃"
// visitorsPhone: "18535669865"
const
columns
=
objectColumns
(
[
[
"User Name"
,
"inviterName"
],
[
"Visitor"
,
"visitorsName"
],
[
"Security Guard"
,
"securityGuardName"
],
[
"Number Plate"
,
"numberPlate"
],
[
"time"
,
"updateTime"
],
[
"community"
,
"visitorCommunity"
],
[
"unit"
,
"inviterAddress"
]
// ["Actions",null, (text: any, record: any) => (<Space size="middle"> <a>Detail</a></Space>)],
])
import
TitleSearch
from
'@/components/TitleSearch/TitleSearch'
import
{
RA
}
from
'@/utils/method'
;
const
module
=
"VisitorRecord"
const
VisitorRecord
=
(
props
:
any
)
=>
{
const
{
dispatch
,
Data
}
=
props
;
const
TosVisitorRecordGet
=
(
values
:
any
)
=>
{
dispatch
({
type
:
'tosVisitorRecord/get'
,
playload
:
values
})
};
useEffect
(()
=>
{
RA
(
26
,{
inviterAddress
:
""
,
visitorCommunity
:
""
},
module
,
dispatch
)
},
[])
const
CallBackTitleSearch
=
(
values
:
any
)
=>
{
console
.
log
(
values
)
// visitorCommunity
TosVisitorRecordGet
({
visitorCommunity
:
values
.
inviterAddress
,
})
}
const
pagination
=
{
defaultCurrent
:
1
,
total
:
Data
!=
null
?
Data
.
length
:
0
}
return
(
<
div
style=
{
{
width
:
"100%"
,
minWidth
:
1020
,
padding
:
34
,
backgroundColor
:
"#ffffff"
}
}
>
<
TitleSearch
listkey=
{
[
'inviterAddress'
]
}
list=
{
[
'Community Name'
]
}
community=
{
"serviceCommunityList"
}
onSubmit=
{
CallBackTitleSearch
}
/>
{
Data
!=
null
?
<
Table
loading=
{
false
}
rowKey=
"id"
style=
{
{
marginTop
:
16
}
}
dataSource=
{
Data
.
rows
}
columns=
{
columns
}
pagination=
{
pagination
}
// pagination=
{{
current
:
1,
total
:
Data
.
total
}}
/>:
null
}
</
div
>
);
};
function
map
(
state
:
any
)
{
const
{
Data
}
=
state
[
module
]
return
{
Data
}
}
export
default
connect
(
map
)(
VisitorRecord
);
// 备注
// 列表缺少访客时间
// 搜索缺少到达时间、访客姓名
src/utils/tip.ts
View file @
988b4f10
...
...
@@ -31,8 +31,8 @@ export const Notice = [
export
const
NewFaci
=
[
[{
required
:
true
,
message
:
'Please select community'
}],
[{
required
:
true
,
message
:
'Please input Facility Name'
}],
[{
required
:
tru
e
,
message
:
'Please Set management fee'
}],
[{
required
:
tru
e
,
message
:
'Please Set Setting deposit'
}],
[{
required
:
fals
e
,
message
:
'Please Set management fee'
}],
[{
required
:
fals
e
,
message
:
'Please Set Setting deposit'
}],
[{
required
:
true
,
message
:
'Please Upload facility photos'
}],
[{
required
:
true
,
message
:
'Required'
}],
[{
required
:
true
,
message
:
'Required'
}],
...
...
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