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
489fc3c6
Commit
489fc3c6
authored
Jan 18, 2021
by
cellee
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
预约时间大改
Signed-off-by:
cellee
<
893264950@qq.com
>
parent
60587c01
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
127 additions
and
111 deletions
+127
-111
OnTimeTow.tsx
src/components/OnTime/OnTimeTow.tsx
+56
-0
FacilityBookings.ts
src/models/CommunityManagement/FacilityBookings.ts
+1
-6
BugDetail.tsx
src/pages/AccountManagement/SystemFeedback/BugDetail.tsx
+3
-3
SystemFeedback.tsx
...pages/AccountManagement/SystemFeedback/SystemFeedback.tsx
+3
-3
Bookings.tsx
src/pages/CommunityManagement/FacilityBookings/Bookings.tsx
+64
-99
No files found.
src/components/OnTime/OnTimeTow.tsx
0 → 100644
View file @
489fc3c6
import
React
from
'react'
;
import
{
TimePicker
}
from
'antd'
;
const
{
RangePicker
}
=
TimePicker
;
import
moment
from
'moment'
;
const
OnTime
=
(
porps
:
any
)
=>
{
// disabled 是否禁止
// limit 默认开放时间
// inhibitTime 禁止选择时间
// onChanges 时间选择事件
let
{
disabled
,
limit
,
inhibitTime
,
onChanges
}
=
porps
;
// 禁止时间 数组格式
const
disabledHours
=
()
=>
{
// 禁止的小时数组
let
result
=
[];
// 设施默认的开放时间
let
lim
=
limit
?
limit
.
split
(
'-'
)
:
[];
for
(
var
i
=
0
;
i
<
24
;
i
++
)
{
if
(
i
<
parseInt
(
moment
(
lim
[
0
],
'HH:ss'
).
format
(
'HH'
))
||
i
>
parseInt
(
moment
(
lim
[
1
],
'HH:ss'
).
format
(
'HH'
))
)
{
result
.
push
(
i
);
}
}
// 选择日期禁止的时间
if
(
inhibitTime
)
{
for
(
let
j
in
inhibitTime
)
{
result
.
push
(
parseInt
(
moment
(
inhibitTime
[
j
],
'HH:ss'
).
format
(
'HH'
)));
}
}
// 去重排序
return
[...
new
Set
(
result
)].
sort
((
x
,
y
)
=>
x
-
y
);
};
return
(
<>
<
RangePicker
minuteStep=
{
60
}
format=
"HH:mm"
onChange=
{
(
time
:
any
,
timeString
:
any
)
=>
{
onChanges
(
time
,
timeString
);
}
}
allowClear=
{
false
}
disabled=
{
disabled
}
disabledHours=
{
disabledHours
}
/>
</>
);
};
export
default
OnTime
;
src/models/CommunityManagement/FacilityBookings.ts
View file @
489fc3c6
...
@@ -192,12 +192,7 @@ export default {
...
@@ -192,12 +192,7 @@ export default {
}
break
;
}
break
;
// 时间查询
// 时间查询
case
50
:{
case
50
:{
let
resultTime
=
[];
let
resultTime
=
resp
.
data
;
let
data
=
resp
.
data
;
for
(
var
i
=
0
;
i
<
data
.
length
;
i
+=
2
){
let
a
=
data
[
i
]
+
'-'
+
data
[
i
+
1
];
resultTime
.
push
(
a
);
}
yield
put
({
type
:
'onResult'
,
resultTime
});
yield
put
({
type
:
'onResult'
,
resultTime
});
}
break
;
}
break
;
...
...
src/pages/AccountManagement/SystemFeedback/BugDetail.tsx
View file @
489fc3c6
...
@@ -58,9 +58,9 @@ const BugDetail = (props: any) => {
...
@@ -58,9 +58,9 @@ const BugDetail = (props: any) => {
</
Descriptions
.
Item
>
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
"Submission time"
style=
{
{
paddingBottom
:
16
}
}
>
<
Descriptions
.
Item
label=
"Submission time"
style=
{
{
paddingBottom
:
16
}
}
>
{
DataSave
{
DataSave
?
moment
(
DataSave
.
updateTime
.
time
).
format
(
'YYYY-MM-DD hh'
)
+
?
moment
(
DataSave
.
updateTime
.
time
).
format
(
'YYYY-MM-DD hh
:mm
'
)
+
':00'
+
//
':00' +
(
parseInt
(
moment
(
DataSave
.
updateTime
.
time
).
format
(
'HH'
))
>
11
?
'
PM'
:
'
AM'
)
(
parseInt
(
moment
(
DataSave
.
updateTime
.
time
).
format
(
'HH'
))
>
11
?
'
PM'
:
'
AM'
)
:
'-'
}
:
'-'
}
</
Descriptions
.
Item
>
</
Descriptions
.
Item
>
</
Descriptions
>
</
Descriptions
>
...
...
src/pages/AccountManagement/SystemFeedback/SystemFeedback.tsx
View file @
489fc3c6
...
@@ -31,9 +31,9 @@ const SystemFeedback = (props: any) => {
...
@@ -31,9 +31,9 @@ const SystemFeedback = (props: any) => {
dataIndex
:
'createTime'
,
dataIndex
:
'createTime'
,
render
:
(
text
:
any
)
=>
{
render
:
(
text
:
any
)
=>
{
let
data
=
let
data
=
moment
(
text
.
time
).
format
(
'YYYY-MM-DD hh'
)
+
moment
(
text
.
time
).
format
(
'YYYY-MM-DD hh
:mm
'
)
+
':00'
+
//
':00' +
(
parseInt
(
moment
(
text
.
time
).
format
(
'HH'
))
>
11
?
'
PM'
:
'
AM'
);
(
parseInt
(
moment
(
text
.
time
).
format
(
'HH'
))
>
11
?
'
PM'
:
'
AM'
);
// let data = moment(text.time).calendar();
// let data = moment(text.time).calendar();
return
data
;
return
data
;
...
...
src/pages/CommunityManagement/FacilityBookings/Bookings.tsx
View file @
489fc3c6
This diff is collapsed.
Click to expand it.
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