Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
party-build-cloud
Project
Project
Details
Activity
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
wangqinghua
party-build-cloud
Commits
7c24ec95
Commit
7c24ec95
authored
Aug 16, 2019
by
wangqinghua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
党支部
parent
7e898f56
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
65 additions
and
24 deletions
+65
-24
meet-room.html
src/pages/serve-pages/meet-room/meet-room.html
+2
-2
meet-room.ts
src/pages/serve-pages/meet-room/meet-room.ts
+2
-2
room-apply.html
src/pages/serve-pages/meet-room/room-apply/room-apply.html
+10
-4
room-apply.ts
src/pages/serve-pages/meet-room/room-apply/room-apply.ts
+51
-16
No files found.
src/pages/serve-pages/meet-room/meet-room.html
View file @
7c24ec95
...
@@ -69,7 +69,7 @@
...
@@ -69,7 +69,7 @@
上午
上午
</div>
</div>
<div
class=
"morning-room"
>
<div
class=
"morning-room"
>
<span
(
click
)="
goApply
(
item3
,'
8:00:00
'
)"
*
ngFor=
"let item3 of room?.morningNotUse"
>
<span
(
click
)="
goApply
(
item3
)"
*
ngFor=
"let item3 of room?.morningNotUse"
>
{{item3.name}}(可预定)
{{item3.name}}(可预定)
</span>
</span>
</div>
</div>
...
@@ -79,7 +79,7 @@
...
@@ -79,7 +79,7 @@
下午
下午
</div>
</div>
<div
class=
"morning-room"
>
<div
class=
"morning-room"
>
<span
(
click
)="
goApply
(
item4
,'
12:00:00
'
)"
*
ngFor=
"let item4 of room?.afternoonNotUse"
>
<span
(
click
)="
goApply
(
item4
)"
*
ngFor=
"let item4 of room?.afternoonNotUse"
>
{{item4.name}}(可预定)
{{item4.name}}(可预定)
</span>
</span>
</div>
</div>
...
...
src/pages/serve-pages/meet-room/meet-room.ts
View file @
7c24ec95
...
@@ -160,7 +160,7 @@ export class MeetRoomPage {
...
@@ -160,7 +160,7 @@ export class MeetRoomPage {
}
}
//新增申请
//新增申请
goApply
(
item
,
time
)
{
goApply
(
item
)
{
if
(
this
.
role
.
includes
(
1
)
||
this
.
role
.
includes
(
2
)
||
this
.
role
.
includes
(
7
))
{
if
(
this
.
role
.
includes
(
1
)
||
this
.
role
.
includes
(
2
)
||
this
.
role
.
includes
(
7
))
{
let
data
;
let
data
;
if
(
item
)
{
if
(
item
)
{
...
@@ -168,7 +168,7 @@ export class MeetRoomPage {
...
@@ -168,7 +168,7 @@ export class MeetRoomPage {
roomId
:
item
.
id
,
roomId
:
item
.
id
,
roomName
:
item
.
name
,
roomName
:
item
.
name
,
equipmervice
:
item
.
equipmervice
,
equipmervice
:
item
.
equipmervice
,
startTime
:
this
.
date
+
' '
+
time
,
startTime
:
this
.
date
,
accommodation
:
item
.
accommodation
accommodation
:
item
.
accommodation
};
};
}
}
...
...
src/pages/serve-pages/meet-room/room-apply/room-apply.html
View file @
7c24ec95
...
@@ -36,10 +36,16 @@
...
@@ -36,10 +36,16 @@
</ion-label>
</ion-label>
<ion-label
*
ngIf=
"check.orgId"
class=
"check-tips"
>
请选择申请处室
</ion-label>
<ion-label
*
ngIf=
"check.orgId"
class=
"check-tips"
>
请选择申请处室
</ion-label>
</ion-item>
</ion-item>
<div
class=
"item-box"
>
<div
class=
"left"
>
会议日期:
</div>
<div
class=
"right text-right"
>
{{nowDate | date:'yyyy-MM-dd'}}
</div>
</div>
<ion-item>
<ion-item>
<ion-label
class=
"item-left"
><span
class=
"color-red"
>
*
</span>
开始时间:
</ion-label>
<ion-label
class=
"item-left"
><span
class=
"color-red"
>
*
</span>
开始时间:
</ion-label>
<ion-datetime
cancelText=
"取消"
doneText=
"确认"
displayFormat=
"
YYYY-MM-DD
HH:mm"
<ion-datetime
cancelText=
"取消"
doneText=
"确认"
displayFormat=
"HH:mm"
pickerFormat=
"
YYYY MM DD
HH mm"
placeholder=
"请选择"
[
max
]="
obj
.
endTime
"
[
min
]="
nowDate
"
pickerFormat=
"HH mm"
placeholder=
"请选择"
[
max
]="
obj
.
endTime
"
[
min
]="
nowDate
"
[(
ngModel
)]="
obj
.
startTime
"
></ion-datetime>
[(
ngModel
)]="
obj
.
startTime
"
></ion-datetime>
<ion-label
class=
"right-arrow"
>
<ion-label
class=
"right-arrow"
>
<ion-icon
name=
"arrow-forward"
></ion-icon>
<ion-icon
name=
"arrow-forward"
></ion-icon>
...
@@ -48,8 +54,8 @@
...
@@ -48,8 +54,8 @@
</ion-item>
</ion-item>
<ion-item>
<ion-item>
<ion-label
class=
"item-left"
><span
class=
"color-red"
>
*
</span>
结束时间:
</ion-label>
<ion-label
class=
"item-left"
><span
class=
"color-red"
>
*
</span>
结束时间:
</ion-label>
<ion-datetime
cancelText=
"取消"
doneText=
"确认"
displayFormat=
"
YYYY-MM-DD
HH:mm"
<ion-datetime
cancelText=
"取消"
doneText=
"确认"
displayFormat=
"HH:mm"
pickerFormat=
"
YYYY MM DD
HH mm"
placeholder=
"请选择"
[
min
]="
obj
.
startTime
"
pickerFormat=
"HH mm"
placeholder=
"请选择"
[
min
]="
obj
.
startTime
"
[(
ngModel
)]="
obj
.
endTime
"
></ion-datetime>
[(
ngModel
)]="
obj
.
endTime
"
></ion-datetime>
<ion-label
class=
"right-arrow"
>
<ion-label
class=
"right-arrow"
>
<ion-icon
name=
"arrow-forward"
></ion-icon>
<ion-icon
name=
"arrow-forward"
></ion-icon>
...
...
src/pages/serve-pages/meet-room/room-apply/room-apply.ts
View file @
7c24ec95
...
@@ -92,16 +92,20 @@ export class RoomApplyPage {
...
@@ -92,16 +92,20 @@ export class RoomApplyPage {
//时间和会议室初始化
//时间和会议室初始化
initParams
()
{
initParams
()
{
this
.
obj
.
startTime
=
this
.
datePipe
.
transform
(
new
Date
(),
'yyyy-MM-ddTHH:mm'
);
this
.
obj
.
startTime
=
this
.
datePipe
.
transform
(
new
Date
()
.
toISOString
()
,
'yyyy-MM-ddTHH:mm'
);
this
.
nowDate
=
this
.
datePipe
.
transform
(
new
Date
(),
'yyyy-MM-ddTHH:mm'
);
this
.
obj
.
endTime
=
this
.
datePipe
.
transform
(
new
Date
().
toISOString
(),
'yyyy-MM-ddTHH:mm'
);
const
data
=
this
.
navParams
.
get
(
'data'
);
const
data
=
this
.
navParams
.
get
(
'data'
);
if
(
data
)
{
if
(
data
)
{
console
.
log
(
data
);
this
.
nowDate
=
data
.
startTime
;
this
.
obj
.
roomId
=
data
.
roomId
;
this
.
obj
.
roomId
=
data
.
roomId
;
this
.
obj
.
roomText
=
data
.
roomName
;
this
.
obj
.
roomText
=
data
.
roomName
;
this
.
roomMax
=
`该会议室可容纳
${
data
.
accommodation
}
人`
;
this
.
roomMax
=
`该会议室可容纳
${
data
.
accommodation
}
人`
;
this
.
obj
.
equipmervice
=
data
.
equipmervice
.
split
(
','
);
this
.
obj
.
equipmervice
=
data
.
equipmervice
.
split
(
','
);
this
.
getEquipmervice
(
this
.
obj
.
equipmervice
);
this
.
getEquipmervice
(
this
.
obj
.
equipmervice
);
}
else
{
}
}
}
}
...
@@ -281,7 +285,7 @@ export class RoomApplyPage {
...
@@ -281,7 +285,7 @@ export class RoomApplyPage {
modal
.
onDidDismiss
(
data
=>
{
modal
.
onDidDismiss
(
data
=>
{
if
(
data
)
{
if
(
data
)
{
const
arr
=
this
.
personList
.
concat
(
data
);
const
arr
=
this
.
personList
.
concat
(
data
);
this
.
personList
=
this
.
commonSer
.
uniArr
(
arr
,
'id'
);
this
.
personList
=
this
.
commonSer
.
uniArr
(
arr
,
'id'
);
}
}
});
});
modal
.
present
();
modal
.
present
();
...
@@ -292,25 +296,39 @@ export class RoomApplyPage {
...
@@ -292,25 +296,39 @@ export class RoomApplyPage {
this
.
personList
.
splice
(
index
,
1
);
this
.
personList
.
splice
(
index
,
1
);
}
}
submit
()
{
//校验时间
checkPerson
()
{
if
(
new
Date
(
this
.
obj
.
startTime
).
getTime
()
>
new
Date
(
this
.
obj
.
endTime
).
getTime
()
||
new
Date
(
this
.
obj
.
startTime
).
getTime
()
==
new
Date
(
this
.
obj
.
endTime
).
getTime
())
{
this
.
commonSer
.
toast
(
'会议室开始时间和结束时间选择有误'
);
return
false
;
}
const
max
=
this
.
roomMax
.
replace
(
/
[^
0-9
]
/ig
,
""
);
const
max
=
this
.
roomMax
.
replace
(
/
[^
0-9
]
/ig
,
""
);
if
(
isNaN
(
this
.
obj
.
participantAmount
))
{
if
(
isNaN
(
this
.
obj
.
participantAmount
))
{
console
.
log
(
"max is Nan"
);
this
.
commonSer
.
toast
(
`会议室人数必须填数字`
);
this
.
check
.
participantAmount
=
true
;
this
.
check
.
participantAmount
=
true
;
return
false
;
return
false
;
}
}
if
(
~~
this
.
obj
.
participantAmount
>
~~
max
)
{
if
(
~~
this
.
obj
.
participantAmount
>
~~
max
)
{
console
.
log
(
"人数太多"
);
this
.
commonSer
.
toast
(
`会议室最大人数
${
max
}
`
);
this
.
check
.
participantAmount
=
true
;
this
.
check
.
participantAmount
=
true
;
return
false
;
return
false
;
}
}
//校验
return
true
;
}
//校验时间
checkTime
()
{
const
clock12
=
new
Date
(
this
.
datePipe
.
transform
(
new
Date
(),
'yyyy-MM-dd 12:00'
)).
getTime
();
const
startTime
=
new
Date
(
this
.
obj
.
startTime
).
getTime
();
const
endTime
=
new
Date
(
this
.
obj
.
endTime
).
getTime
();
console
.
log
(
"clock12:"
+
clock12
);
console
.
log
(
"startTime:"
+
startTime
);
console
.
log
(
"endTime:"
+
endTime
);
if
(
startTime
<
clock12
&&
clock12
<
endTime
)
{
this
.
commonSer
.
toast
(
'时间选择错误'
);
return
}
return
true
;
}
//校验必填
checkFull
()
{
let
checkBool
=
false
;
let
checkBool
=
false
;
for
(
let
i
in
this
.
check
)
{
for
(
let
i
in
this
.
check
)
{
if
(
!
this
.
obj
[
i
])
{
if
(
!
this
.
obj
[
i
])
{
...
@@ -321,7 +339,24 @@ export class RoomApplyPage {
...
@@ -321,7 +339,24 @@ export class RoomApplyPage {
}
}
}
}
if
(
checkBool
)
return
false
;
if
(
checkBool
)
return
;
return
true
;
}
submit
()
{
if
(
!
this
.
checkTime
())
{
this
.
commonSer
.
toast
(
"时间有误"
);
return
;
}
if
(
!
this
.
checkPerson
())
{
return
;
}
if
(
!
this
.
checkFull
())
{
this
.
commonSer
.
toast
(
"缺少必填项"
);
return
;
}
let
orgName
=
this
.
orgList
.
filter
(
e
=>
this
.
obj
.
orgId
==
e
.
id
)[
0
].
name
;
let
orgName
=
this
.
orgList
.
filter
(
e
=>
this
.
obj
.
orgId
==
e
.
id
)[
0
].
name
;
const
data
=
{
const
data
=
{
...
@@ -329,8 +364,8 @@ export class RoomApplyPage {
...
@@ -329,8 +364,8 @@ export class RoomApplyPage {
roomId
:
this
.
obj
.
roomId
,
roomId
:
this
.
obj
.
roomId
,
orgId
:
this
.
obj
.
orgId
,
orgId
:
this
.
obj
.
orgId
,
orgName
:
orgName
,
orgName
:
orgName
,
startTime
:
new
Date
(
this
.
obj
.
startTime
).
getTime
()
-
8
*
60
*
60
*
1000
,
startTime
:
new
Date
(
this
.
obj
.
startTime
).
getTime
(),
endTime
:
new
Date
(
this
.
obj
.
endTime
).
getTime
()
-
8
*
60
*
60
*
1000
,
endTime
:
new
Date
(
this
.
obj
.
endTime
).
getTime
(),
orgLeader
:
this
.
obj
.
orgLeader
.
join
(
','
),
orgLeader
:
this
.
obj
.
orgLeader
.
join
(
','
),
remark
:
this
.
obj
.
remark
,
remark
:
this
.
obj
.
remark
,
participant
:
this
.
personList
.
map
(
e
=>
{
participant
:
this
.
personList
.
map
(
e
=>
{
...
...
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