Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
R
regManage
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
regManage
Commits
a0cd86ab
Commit
a0cd86ab
authored
Mar 12, 2020
by
wangqinghua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
通讯录-选择角色
parent
e84ed9aa
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
166 additions
and
6 deletions
+166
-6
contact-list.html
src/pages/home/contact-list/contact-list.html
+17
-1
contact-list.ts
src/pages/home/contact-list/contact-list.ts
+14
-4
contact-role.html
src/pages/home/contact-role/contact-role.html
+22
-0
contact-role.scss
src/pages/home/contact-role/contact-role.scss
+77
-0
contact-role.ts
src/pages/home/contact-role/contact-role.ts
+31
-0
contact.ts
src/pages/home/contact/contact.ts
+2
-1
home.module.ts
src/pages/home/home.module.ts
+3
-0
No files found.
src/pages/home/contact-list/contact-list.html
View file @
a0cd86ab
<ion-header>
<ion-header>
<ion-navbar>
<ion-navbar>
<ion-title
text-center
>
<ion-title
text-center
>
<span>
{{area?.name}}
</span>
<span>
{{area?.name}}
({{roleName}})
</span>
</ion-title>
</ion-title>
</ion-navbar>
</ion-navbar>
</ion-header>
</ion-header>
...
@@ -24,6 +24,22 @@
...
@@ -24,6 +24,22 @@
</div>
</div>
</ion-item>
</ion-item>
</ng-container>
</ng-container>
<ng-container
*
ngFor=
"let person of page.noNumList"
>
<ion-item
(
click
)="
goToInfo
(
person
)"
>
<div
class=
"contact-box"
>
<img
src=
"./assets/imgs/man.png"
class=
"contact-img"
>
<div
class=
"contact-box-right"
>
<div>
<span
class=
"contact-name"
>
{{person.name}}
</span>
</div>
<div>
<span
class=
"contact-handphone"
>
手机:{{person.mobilePhone || "-"}}
</span>
<span
class=
"contact-telphone"
>
座机:{{person.telPhone || "-"}}
</span>
</div>
</div>
</div>
</ion-item>
</ng-container>
</ion-list>
</ion-list>
<ion-list
text-center
style=
"margin-top: 10rem"
*
ngIf=
"page.list.length == 0 && page.isLoad"
>
<ion-list
text-center
style=
"margin-top: 10rem"
*
ngIf=
"page.list.length == 0 && page.isLoad"
>
<img
style=
"width: 20%;"
src=
"./assets/imgs/no-data.png"
alt=
""
>
<img
style=
"width: 20%;"
src=
"./assets/imgs/no-data.png"
alt=
""
>
...
...
src/pages/home/contact-list/contact-list.ts
View file @
a0cd86ab
...
@@ -11,16 +11,21 @@ import {GlobalData} from "../../../core/GlobleData";
...
@@ -11,16 +11,21 @@ import {GlobalData} from "../../../core/GlobleData";
})
})
export
class
ContactListPage
{
export
class
ContactListPage
{
role
;
area
;
area
;
page
=
{
page
=
{
list
:
[],
list
:
[],
noNumList
:
[],
isLoad
:
false
isLoad
:
false
}
};
roleName
;
constructor
(
public
navCtrl
:
NavController
,
public
navParams
:
NavParams
,
constructor
(
public
navCtrl
:
NavController
,
public
navParams
:
NavParams
,
private
globle
:
GlobalData
,
private
globle
:
GlobalData
,
private
homeSer
:
HomeService
)
{
private
homeSer
:
HomeService
)
{
this
.
role
=
this
.
navParams
.
get
(
'role'
);
this
.
area
=
this
.
navParams
.
get
(
'area'
);
this
.
area
=
this
.
navParams
.
get
(
'area'
);
this
.
roleName
=
this
.
navParams
.
get
(
'roleName'
);
}
}
ionViewDidLoad
()
{
ionViewDidLoad
()
{
...
@@ -32,11 +37,16 @@ export class ContactListPage {
...
@@ -32,11 +37,16 @@ export class ContactListPage {
const
data
=
{
const
data
=
{
page
:
1
,
page
:
1
,
limit
:
1000
,
limit
:
1000
,
areacode
:
this
.
area
.
code
areacode
:
this
.
area
.
code
,
role
:
this
.
role
,
};
};
this
.
homeSer
.
getOrgList
(
data
).
subscribe
(
this
.
homeSer
.
getOrgList
(
data
).
subscribe
(
(
res
)
=>
{
(
res
)
=>
{
this
.
page
.
list
=
res
.
list
.
user
.
filter
(
e
=>
e
.
areacode
==
this
.
area
.
code
);
this
.
page
.
list
=
res
.
list
.
user
.
filter
(
e
=>
e
.
orderNum
!=
""
&&
e
.
areacode
==
this
.
area
.
code
);
this
.
page
.
noNumList
=
res
.
list
.
user
.
filter
(
e
=>
e
.
orderNum
==
""
&&
e
.
areacode
==
this
.
area
.
code
);
this
.
page
.
list
.
sort
((
a
,
b
)
=>
a
.
orderNum
-
b
.
orderNum
);
console
.
log
(
this
.
page
.
list
);
console
.
log
(
this
.
page
.
noNumList
);
this
.
page
.
isLoad
=
true
;
this
.
page
.
isLoad
=
true
;
}
}
)
)
...
...
src/pages/home/contact-role/contact-role.html
0 → 100644
View file @
a0cd86ab
<ion-header>
<ion-navbar>
<ion-title
text-center
>
<span>
用户角色
</span>
</ion-title>
</ion-navbar>
</ion-header>
<ion-content
direction=
"y"
scrollbar-y=
"true"
>
<ion-list>
<ion-item
*
ngFor=
"let item of roleList"
>
<div
class=
"contact-box"
(
click
)="
goToList
(
item
)"
>
<img
src=
"./assets/imgs/man.png"
class=
"contact-img"
>
<div
class=
"contact-box-right"
>
<div>
<span
class=
"contact-name"
>
{{item.label}}
</span>
</div>
</div>
</div>
</ion-item>
</ion-list>
</ion-content>
src/pages/home/contact-role/contact-role.scss
0 → 100644
View file @
a0cd86ab
page-contact-role
{
.searchToolBar
{
display
:
flex
;
flex-direction
:
row
;
align-items
:
center
;
justify-content
:
left
;
box-sizing
:
border-box
;
}
.list-ios
.item-block
.item-inner
{
border-bottom
:
1px
solid
#dadada
;
}
.search
{
float
:
right
;
color
:
#72a4fe
;
font-size
:
24px
;
margin-right
:
10px
;
}
.contact-box
{
// height: 100%;
display
:
flex
;
flex-direction
:
row
;
align-items
:
center
;
justify-content
:
left
;
box-sizing
:
border-box
;
}
.contact-box-right
{
margin-left
:
10px
;
}
.contact-img
{
width
:
4rem
;
height
:
4rem
;
border-radius
:
2px
;
}
.contact-name
{
font-size
:
16px
;
}
.contact-sex
{
font-size
:
16px
;
font-weight
:
bold
;
}
.male
{
color
:
#72a4fe
;
}
.female
{
color
:
#f09ae5
;
}
.contact-organization
{
color
:
#808080
;
font-size
:
12px
;
}
.contact-telphone
{
color
:
#808080
;
font-size
:
12px
;
}
.contact-handphone
{
color
:
#808080
;
font-size
:
12px
;
margin-right
:
10px
;
}
.back-btn
{
width
:
30px
;
height
:
30px
;
}
}
src/pages/home/contact-role/contact-role.ts
0 → 100644
View file @
a0cd86ab
import
{
Component
}
from
'@angular/core'
;
import
{
IonicPage
,
NavController
,
NavParams
}
from
'ionic-angular'
;
import
{
ContactListPage
}
from
"../contact-list/contact-list"
;
@
Component
({
selector
:
'page-contact-role'
,
templateUrl
:
'contact-role.html'
,
})
export
class
ContactRolePage
{
roleList
=
[
{
value
:
0
,
label
:
'管理员'
},
{
value
:
1
,
label
:
'单位领导'
},
{
value
:
2
,
label
:
'工作人员'
},
{
value
:
3
,
label
:
'其他人员'
},
];
area
;
constructor
(
public
navCtrl
:
NavController
,
public
navParams
:
NavParams
)
{
this
.
area
=
this
.
navParams
.
get
(
'area'
);
}
ionViewDidLoad
()
{
console
.
log
(
'ionViewDidLoad ContactRolePage'
);
}
goToList
(
item
)
{
this
.
navCtrl
.
push
(
ContactListPage
,
{
role
:
item
.
value
,
area
:
this
.
area
,
roleName
:
item
.
label
});
}
}
src/pages/home/contact/contact.ts
View file @
a0cd86ab
...
@@ -5,6 +5,7 @@ import {ContactListPage} from "../contact-list/contact-list";
...
@@ -5,6 +5,7 @@ import {ContactListPage} from "../contact-list/contact-list";
import
*
as
Mock
from
"mockjs"
import
*
as
Mock
from
"mockjs"
import
{
HomeService
}
from
"../home.service"
;
import
{
HomeService
}
from
"../home.service"
;
import
{
LoginService
}
from
"../../login/login.service"
;
import
{
LoginService
}
from
"../../login/login.service"
;
import
{
ContactRolePage
}
from
"../contact-role/contact-role"
;
@
Component
({
@
Component
({
selector
:
'page-contact'
,
selector
:
'page-contact'
,
...
@@ -43,7 +44,7 @@ export class ContactPage {
...
@@ -43,7 +44,7 @@ export class ContactPage {
//人员列表
//人员列表
goToList
(
area
)
{
goToList
(
area
)
{
this
.
navCtrl
.
push
(
Contact
List
Page
,
{
area
:
area
});
this
.
navCtrl
.
push
(
Contact
Role
Page
,
{
area
:
area
});
}
}
//查询人员
//查询人员
...
...
src/pages/home/home.module.ts
View file @
a0cd86ab
...
@@ -12,6 +12,7 @@ import {InfoDetailPage} from "./report-info/info-detail/info-detail";
...
@@ -12,6 +12,7 @@ import {InfoDetailPage} from "./report-info/info-detail/info-detail";
import
{
InfoListPage
}
from
"./report-info/info-list/info-list"
;
import
{
InfoListPage
}
from
"./report-info/info-list/info-list"
;
import
{
YearReportPage
}
from
"./report-info/year-report/year-report"
;
import
{
YearReportPage
}
from
"./report-info/year-report/year-report"
;
import
{
PipesModule
}
from
"../../pipes/pipes.module"
;
import
{
PipesModule
}
from
"../../pipes/pipes.module"
;
import
{
ContactRolePage
}
from
"./contact-role/contact-role"
;
@
NgModule
({
@
NgModule
({
declarations
:
[
declarations
:
[
...
@@ -25,6 +26,7 @@ import {PipesModule} from "../../pipes/pipes.module";
...
@@ -25,6 +26,7 @@ import {PipesModule} from "../../pipes/pipes.module";
InfoDetailPage
,
InfoDetailPage
,
InfoListPage
,
InfoListPage
,
YearReportPage
,
YearReportPage
,
ContactRolePage
,
],
],
imports
:
[
imports
:
[
IonicPageModule
.
forChild
(
HomePage
),
IonicPageModule
.
forChild
(
HomePage
),
...
@@ -40,6 +42,7 @@ import {PipesModule} from "../../pipes/pipes.module";
...
@@ -40,6 +42,7 @@ import {PipesModule} from "../../pipes/pipes.module";
DoVerityPage
,
DoVerityPage
,
InfoDetailPage
,
InfoDetailPage
,
InfoListPage
,
InfoListPage
,
ContactRolePage
,
YearReportPage
,
YearReportPage
,
]
]
})
})
...
...
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