Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wisdom-ces
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
wisdom-ces
Commits
2998a412
Commit
2998a412
authored
Sep 23, 2018
by
wangqinghua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
值班
parent
6a3479d8
Show whitespace changes
Inline
Side-by-side
Showing
19 changed files
with
153 additions
and
65 deletions
+153
-65
.gitignore
.gitignore
+4
-1
wisdom-ces.iml
.idea/wisdom-ces.iml
+2
-0
ionic.config.json
ionic.config.json
+2
-1
app.component.ts
src/app/app.component.ts
+0
-1
main.ts
src/app/main.ts
+3
-0
duty-sign-up.ts
src/pages/dutyALl/duty-sign-up/duty-sign-up.ts
+3
-3
duty.html
src/pages/dutyALl/duty/duty.html
+4
-4
duty.ts
src/pages/dutyALl/duty/duty.ts
+10
-18
login.ts
src/pages/login/login.ts
+2
-0
change-apply-sure.html
...pages/manageDuty/change-apply-sure/change-apply-sure.html
+2
-1
change-apply-sure.ts
src/pages/manageDuty/change-apply-sure/change-apply-sure.ts
+22
-17
duty-apply-handle.ts
src/pages/manageDuty/duty-apply-handle/duty-apply-handle.ts
+3
-2
select-change-person.html
...manageDuty/select-change-person/select-change-person.html
+9
-7
select-change-person.scss
...manageDuty/select-change-person/select-change-person.scss
+24
-1
select-change-person.ts
...s/manageDuty/select-change-person/select-change-person.ts
+10
-3
select-relay-person.html
...s/manageDuty/select-relay-person/select-relay-person.html
+17
-2
select-relay-person.scss
...s/manageDuty/select-relay-person/select-relay-person.scss
+24
-1
select-relay-person.ts
...ges/manageDuty/select-relay-person/select-relay-person.ts
+11
-2
appHttpService.ts
src/service/appHttpService.ts
+1
-1
No files found.
.gitignore
View file @
2998a412
/node_modules
/platforms/android/
/www
/.sourcemaps
/plugins
/platforms
.idea/wisdom-ces.iml
View file @
2998a412
...
...
@@ -4,9 +4,11 @@
<content
url=
"file://$MODULE_DIR$"
>
<excludeFolder
url=
"file://$MODULE_DIR$/.tmp"
/>
<excludeFolder
url=
"file://$MODULE_DIR$/platforms"
/>
<excludeFolder
url=
"file://$MODULE_DIR$/platforms/android"
/>
<excludeFolder
url=
"file://$MODULE_DIR$/temp"
/>
<excludeFolder
url=
"file://$MODULE_DIR$/tmp"
/>
</content>
<content
url=
"file://$MODULE_DIR$/platforms/android"
/>
<orderEntry
type=
"inheritedJdk"
/>
<orderEntry
type=
"sourceFolder"
forTests=
"false"
/>
</component>
...
...
ionic.config.json
View file @
2998a412
...
...
@@ -7,7 +7,7 @@
"proxies"
:
[
{
"path"
:
"/wisdomgroup"
,
"proxyUrl"
:
"http://1
0.10.202.54:8080
/wisdomgroup"
"proxyUrl"
:
"http://1
80.168.156.212:2931
/wisdomgroup"
}
]
}
\ No newline at end of file
src/app/app.component.ts
View file @
2998a412
...
...
@@ -46,7 +46,6 @@ export class MyApp {
});
//log角标数目显示
badge
.
set
(
10
);
});
}
}
src/app/main.ts
View file @
2998a412
...
...
@@ -3,3 +3,6 @@ import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
import
{
AppModule
}
from
'./app.module'
;
platformBrowserDynamic
().
bootstrapModule
(
AppModule
);
export
const
monthCh
=
[
'1月'
,
'2月'
,
'3月'
,
'4月'
,
'5月'
,
'6月'
,
'7月'
,
'8月'
,
'9月'
,
'10月'
,
'11月'
,
'12月'
];
export
const
weekDay
=
[
'日'
,
'一'
,
'二'
,
'三'
,
'四'
,
'五'
,
'六'
];
src/pages/dutyALl/duty-sign-up/duty-sign-up.ts
View file @
2998a412
...
...
@@ -18,9 +18,9 @@ export class DutySignUpPage {
ionViewDidLoad
()
{
this
.
id
=
this
.
navParams
.
get
(
'id'
);
const
data
=
{
'id'
:
this
.
id
'id'
:
'fdc14f03746743bea1d9167b165ca76b'
};
this
.
appService
.
ObserverHttpGet
(
'
/schedule/hasSignIn'
,
data
)
this
.
appService
.
ObserverHttpGet
Option
(
'/wisdomgroup
/schedule/hasSignIn'
,
data
)
.
subscribe
((
res
)
=>
{
console
.
log
(
res
);
})
...
...
@@ -31,7 +31,7 @@ export class DutySignUpPage {
id
:
this
.
id
,
//值班记录id,
address
:
''
//签到地址
};
this
.
appService
.
ObserverHttpGet
(
'/schedule/signIn'
,
data
)
this
.
appService
.
ObserverHttpGet
(
'/
wisdomgroup/
schedule/signIn'
,
data
)
.
subscribe
((
res
)
=>
{
console
.
log
(
res
);
})
...
...
src/pages/dutyALl/duty/duty.html
View file @
2998a412
...
...
@@ -20,10 +20,10 @@
<ion-content
direction=
"y"
scrollbar-y=
"true"
class=
"bgc-e7e8ed"
>
<ng-container
*
ngIf=
"changeType == 1"
>
<ion-calendar
[(
ngModel
)]="
date
"
(
on
Select
)="
onChange
($
event
)"
[
options
]="
options
Multi
"
[
type
]="
type
"
[
format
]="'
YYYY-MM-DD
'
"
>
(
on
Change
)="
onChange
($
event
)"
[
options
]="
options
"
type=
"string
"
format=
"YYYY-MM-DD
"
>
</ion-calendar>
<div>
<ion-item>
...
...
src/pages/dutyALl/duty/duty.ts
View file @
2998a412
...
...
@@ -6,6 +6,7 @@ import {DutyApplyPage} from "../duty-apply/duty-apply";
import
{
DutyDetailPage
}
from
"../duty-detail/duty-detail"
;
import
{
DutySignUpPage
}
from
"../duty-sign-up/duty-sign-up"
;
import
{
DayConfig
}
from
"ion2-calendar"
;
import
{
monthCh
,
weekDay
}
from
"../../../app/main"
;
declare
var
Swiper
;
@
IonicPage
()
...
...
@@ -20,34 +21,25 @@ export class DutyPage {
{
name
:
'我的值班'
},
]
swiperIndex
;
optionsMulti
:
CalendarComponentOptions
=
{};
changeType
=
1
;
dayObj
;
nightObj
;
nowDuty
;
historyDuty
;
date
:
string
[]
=
[
'2018-01-01'
,
'2018-01-02'
,
'2018-01-05'
];
options
:
CalendarComponentOptions
=
{
from
:
new
Date
(
2000
,
0
,
1
),
monthFormat
:
'YYYY 年 MM 月 '
,
weekdays
:
weekDay
,
monthPickerFormat
:
monthCh
,
pickMode
:
'multi'
,
color
:
'danger'
};
constructor
(
public
navCtrl
:
NavController
,
public
navParams
:
NavParams
,
public
appService
:
AppService
)
{
}
ionViewDidLoad
()
{
let
_daysConfig
:
DayConfig
[]
=
[];
for
(
let
i
=
0
;
i
<
31
;
i
++
)
{
_daysConfig
.
push
({
date
:
new
Date
(
2018
,
8
,
i
+
1
),
marked
:
true
,
cssClass
:
'lass on-selected'
})
}
console
.
log
(
_daysConfig
);
this
.
optionsMulti
=
{
pickMode
:
'multi'
,
monthFormat
:
'YYYY 年 MM 月 '
,
weekdays
:
[
'天'
,
'一'
,
'二'
,
'三'
,
'四'
,
'五'
,
'六'
],
weekStart
:
1
,
daysConfig
:
_daysConfig
,
color
:
'danger'
};
const
date
=
new
Date
().
toLocaleDateString
();
this
.
getDuty
(
date
);
...
...
src/pages/login/login.ts
View file @
2998a412
...
...
@@ -37,6 +37,8 @@ export class LoginPage {
}
ionViewDidLoad
(){
alert
(
"123"
);
this
.
storage
.
get
(
"userLoginInfo"
).
then
((
value
)
=>
{
if
(
value
!=
null
&&
value
!=
''
){
this
.
user
=
value
;
...
...
src/pages/manageDuty/change-apply-sure/change-apply-sure.html
View file @
2998a412
...
...
@@ -9,5 +9,6 @@
<ion-content
padding
>
<button
*
ngIf=
"applyType == 'replace'"
class=
"submit-btn submit"
(
click
)="
replace
()"
>
确认替班
</button>
<button
*
ngIf=
"applyType == 'change'"
class=
"submit-btn submit"
(
click
)="
change
()"
>
确认换班
</button>
</ion-content>
src/pages/manageDuty/change-apply-sure/change-apply-sure.ts
View file @
2998a412
import
{
Component
}
from
'@angular/core'
;
import
{
IonicPage
,
NavController
,
NavParams
}
from
'ionic-angular'
;
import
{
Component
}
from
'@angular/core'
;
import
{
IonicPage
,
NavController
,
NavParams
}
from
'ionic-angular'
;
import
{
AppService
}
from
"../../../service/appHttpService"
;
...
...
@@ -19,38 +19,43 @@ export class ChangeApplySurePage {
}
ionViewDidLoad
()
{
console
.
log
(
'ionViewDidLoad ChangeApplySurePage'
);
this
.
personId
=
this
.
navParams
.
get
(
'personId'
);
this
.
nowId
=
this
.
navParams
.
get
(
'nowId'
);
this
.
changeId
=
this
.
navParams
.
get
(
'changeId'
);
if
(
this
.
personId
){
console
.
log
(
'personId:'
+
this
.
personId
);
console
.
log
(
'nowId:'
+
this
.
nowId
);
console
.
log
(
'changeId:'
+
this
.
changeId
);
if
(
this
.
personId
)
{
this
.
applyType
=
'replace'
;
//值班
}
else
{
}
else
{
this
.
applyType
=
'change'
;
//替班
}
}
//换
班
change
()
{
//替
班
replace
()
{
const
data
=
{
id
:
''
,
//值班记录id
personId
:
''
//替班人id
id
:
this
.
nowId
,
//值班记录id
personId
:
this
.
personId
//替班人id
};
this
.
appService
.
ObserverHttpGet
(
'/wisdomgroup/schedule/change'
,
data
)
.
subscribe
((
res
)
=>
{
console
.
log
(
data
);
this
.
appService
.
ObserverHttpGetOption
(
'/wisdomgroup/schedule/replace'
,
data
)
.
subscribe
((
res
)
=>
{
console
.
log
(
res
.
json
());
})
}
//替
班
replace
()
{
//换
班
change
()
{
const
data
=
{
nowId
:
''
,
//值班记录id
changeId
:
''
//互换的值班ID
nowId
:
this
.
nowId
,
//值班记录id
changeId
:
this
.
changeId
//互换的值班ID
};
this
.
appService
.
ObserverHttpGet
(
'/wisdomgroup/schedule/replace '
,
data
)
.
subscribe
((
res
)
=>
{
console
.
log
(
data
);
this
.
appService
.
ObserverHttpGetOption
(
'/wisdomgroup/schedule/change'
,
data
)
.
subscribe
((
res
)
=>
{
console
.
log
(
res
.
json
());
})
}
...
...
src/pages/manageDuty/duty-apply-handle/duty-apply-handle.ts
View file @
2998a412
...
...
@@ -13,6 +13,7 @@ export class DutyApplyHandlePage {
applyDetail
=
{
id
:
''
,
scheduleId
:
''
,
reason
:
''
};
personDetail
=
{
...
...
@@ -40,13 +41,13 @@ export class DutyApplyHandlePage {
switch
(
type
){
case
'1'
:{
//换班
this
.
navCtrl
.
push
(
'SelectChangePersonPage'
,{
nowId
:
this
.
applyDetail
.
i
d
nowId
:
this
.
applyDetail
.
scheduleI
d
});
break
;
}
case
'2'
:{
//替班
this
.
navCtrl
.
push
(
'SelectRelayPersonPage'
,{
id
:
this
.
applyDetail
.
i
d
id
:
this
.
applyDetail
.
scheduleI
d
});
break
;
}
...
...
src/pages/manageDuty/select-change-person/select-change-person.html
View file @
2998a412
<!--
Generated template for the SelectChangePersonPage page.
See http://ionicframework.com/docs/components/#navigation for more info on
Ionic pages and navigation.
-->
<ion-header>
<ion-navbar>
<ion-title>
选择换班人员
</ion-title>
</ion-navbar>
<div
class=
"duty"
>
<div
class=
"dutyItem"
(
click
)="
change
(
0
)"
>
<span
class=
"{{changeType == 0?'duty-title':''}}"
>
白班
</span>
</div>
<div
class=
"dutyItem"
(
click
)="
change
(
1
)"
>
<span
class=
"{{changeType == 1?'duty-title':''}}"
>
夜班
</span>
</div>
</div>
</ion-header>
...
...
@@ -18,8 +21,7 @@
<ion-item
*
ngFor=
"let item of list;"
>
<div
(
click
)="
select
(
item
)"
>
<span>
{{item.dutyDate | date:'yyyy-MM-dd'}}
</span>
<span
*
ngIf=
"item.nightName"
>
夜班:{{item.nightName}}
</span>
<span
*
ngIf=
"item.dayName"
>
白班:{{item.dayName}}
</span>
<span>
{{item.name}}
</span>
</div>
</ion-item>
...
...
src/pages/manageDuty/select-change-person/select-change-person.scss
View file @
2998a412
page-select-change-person
{
.duty
{
display
:
flex
;
flex-direction
:
row
;
align-items
:
center
;
justify-content
:
center
;
}
.duty
div
{
width
:
50%
;
text-align
:
center
;
position
:
relative
;
}
.duty-title
{
position
:
relative
;
color
:
#24bafc
;
}
.
duty-title
:
:
after
{
content
:
''
;
position
:
absolute
;
width
:
100%
;
height
:
2px
;
background-color
:
#24bafc
;
bottom
:
-8px
;
left
:
0px
;
}
}
src/pages/manageDuty/select-change-person/select-change-person.ts
View file @
2998a412
...
...
@@ -19,6 +19,7 @@ export class SelectChangePersonPage {
nowId
;
list
=
[];
changeType
=
0
;
constructor
(
public
navCtrl
:
NavController
,
public
navParams
:
NavParams
,
public
appService
:
AppService
)
{
}
...
...
@@ -30,9 +31,10 @@ export class SelectChangePersonPage {
getMonth
(){
const
data
=
{
date
:
'2018/10/01'
date
:
'2018/10/01'
,
type
:
this
.
changeType
};
this
.
appService
.
ObserverHttpGetOption
(
'/wisdomgroup/schedule/getScheduleByMonth'
,
data
)
this
.
appService
.
ObserverHttpGetOption
(
'/wisdomgroup/schedule/getScheduleByMonth
AndType
'
,
data
)
.
subscribe
((
res
)
=>
{
this
.
list
=
res
.
json
();
console
.
log
(
res
.
json
())
...
...
@@ -42,9 +44,14 @@ export class SelectChangePersonPage {
//换班
select
(
item
){
this
.
navCtrl
.
push
(
'ChangeApplySurePage'
,{
'changeId'
:
''
,
'changeId'
:
item
.
id
,
'nowId'
:
this
.
nowId
})
}
change
(
type
){
this
.
changeType
=
type
;
this
.
getMonth
();
}
}
src/pages/manageDuty/select-relay-person/select-relay-person.html
View file @
2998a412
...
...
@@ -3,10 +3,25 @@
<ion-navbar>
<ion-title>
选择替班人员
</ion-title>
</ion-navbar>
<div
class=
"duty"
>
<div
class=
"dutyItem"
(
click
)="
change
(
0
)"
>
<span
class=
"{{changeType == 0?'duty-title':''}}"
>
女
</span>
</div>
<div
class=
"dutyItem"
(
click
)="
change
(
1
)"
>
<span
class=
"{{changeType == 1?'duty-title':''}}"
>
男
</span>
</div>
</div>
</ion-header>
<ion-content
padding
>
<ion-list>
<ion-item
*
ngFor=
"let item of list"
>
<div
(
click
)="
selectPerson
(
item
)"
>
<span>
{{item.name}}
</span>
<span>
{{item.orgName}}
</span>
<span>
{{item.phoneNumber}}
</span>
</div>
</ion-item>
</ion-list>
</ion-content>
src/pages/manageDuty/select-relay-person/select-relay-person.scss
View file @
2998a412
page-select-relay-person
{
.duty
{
display
:
flex
;
flex-direction
:
row
;
align-items
:
center
;
justify-content
:
center
;
}
.duty
div
{
width
:
50%
;
text-align
:
center
;
position
:
relative
;
}
.duty-title
{
position
:
relative
;
color
:
#24bafc
;
}
.
duty-title
:
:
after
{
content
:
''
;
position
:
absolute
;
width
:
100%
;
height
:
2px
;
background-color
:
#24bafc
;
bottom
:
-8px
;
left
:
0px
;
}
}
src/pages/manageDuty/select-relay-person/select-relay-person.ts
View file @
2998a412
...
...
@@ -18,32 +18,41 @@ import {ChangeApplySurePage} from "../change-apply-sure/change-apply-sure";
export
class
SelectRelayPersonPage
{
id
;
list
;
changeType
=
0
;
constructor
(
public
navCtrl
:
NavController
,
public
navParams
:
NavParams
,
public
appService
:
AppService
)
{
}
ionViewDidLoad
()
{
this
.
id
=
this
.
navParams
.
get
(
'id'
);
console
.
log
(
'nowId:'
+
this
.
id
);
this
.
getPerson
();
}
getPerson
(){
const
data
=
{
date
:
'2018/10/01'
,
gender
:
'0'
,
gender
:
this
.
changeType
,
id
:
''
};
this
.
appService
.
ObserverHttpGetOption
(
'/wisdomgroup/dutyPerson/getPersonListOutOfMine'
,
data
)
.
subscribe
((
res
)
=>
{
this
.
list
=
res
.
json
();
})
}
//替班
selectPerson
(
item
){
this
.
navCtrl
.
push
(
'ChangeApplySurePage'
,{
'personId'
:
item
.
personI
d
,
'personId'
:
item
.
i
d
,
'nowId'
:
this
.
id
})
}
change
(
type
){
this
.
changeType
=
type
;
this
.
getPerson
();
}
}
src/service/appHttpService.ts
View file @
2998a412
...
...
@@ -80,7 +80,7 @@ export class AppService {
//get请求带?的
ObserverHttpGetOption
(
url
,
params
):
Observable
<
any
>
{
// return this.http.get(AppGlobal.domain+url+this.encode(params,"get")) //app
// return this.http.get(AppGlobal.domain+url+this.encode(params,"get"))
;
//app
return
this
.
http
.
get
(
url
,{
params
:
params
});
//本地
...
...
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