Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
yuanman0109 committed Dec 22, 2016
1 parent a507709 commit fbb5136
Show file tree
Hide file tree
Showing 5 changed files with 139 additions and 106 deletions.
38 changes: 38 additions & 0 deletions app/js/controllers/userLists.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,44 @@ export default class UserListsCtrl{
constructor($http){
this.totalItems =70;
this.$http=$http;
this.userLists=[
{
id:1,
name:"程良",
jnumber:"0411111",
role:"产品",
department:"产品部们",
account:"[email protected]",
state:"正常"
},
{
id:1,
name:"程良",
jnumber:"0411111",
role:"产品",
department:"产品部",
account:"[email protected]",
state:"正常"
},
{
id:1,
name:"程良",
jnumber:"0411111",
role:"产品",
department:"产品部",
account:"[email protected]",
state:"正常"
},
{
id:1,
name:"程良",
jnumber:"0411111",
role:"产品",
department:"产品部",
account:"[email protected]",
state:"正常"
}
]
}
addAccount(){
this.$http({
Expand Down
4 changes: 2 additions & 2 deletions app/js/services/echarts-directive.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export default angular.module('echartDirective',[])
source:'='
},
replace: true,
template:'<div></div>',
template:'<div style="width:100%;height:100%;"></div>',
link:function(scope,element,attr){
// 基于准备好的dom,初始化echarts实例
var myChart = echarts.init(element[0]);
Expand Down Expand Up @@ -172,7 +172,7 @@ export default angular.module('echartDirective',[])
source:'='
},
replace: true,
template:'<div></div>',
template:'<div style="width:100%;height:100%;"></div>',
link:function(scope,element,attr){
// 基于准备好的dom,初始化echarts实例
var myChart = echarts.init(element[0]);
Expand Down
66 changes: 66 additions & 0 deletions app/style/dashboard.scss
Original file line number Diff line number Diff line change
Expand Up @@ -647,4 +647,70 @@ input[type=checkbox]{
color: #98A4AA;
padding: 10px;
}
}
/****customerManager***/
.ctmgInfo{
padding: 0;
list-style: none;
overflow: hidden;
padding:25px 20px 20px;
li{
float: left;
width: 25%;
border-right: 1px solid #ECECEC;
text-align: center;
h3{
font-size: 58px;
margin:0 0 20px;
}
p{
color: #98A4AA;
margin: 0;
}
&:last-child{
border: none;
}
&:nth-child(1) h3{
color: #52BAE7;
}
&:nth-child(2) h3{
color: #71CF64;
}
&:nth-child(3) h3{
color: #F57190;
}
&:nth-child(4) h3{
color: #EBB02A;
}
}
}
.chartInfo{
margin-top: 25px;
width: 100%;
height: 700px;
.pull-left{
width: calc(40% - 12px);
width: -webkit-calc(40% - 12px);
height: 100%;
.mainContent{
height: calc(50% - 12px);
height:-webkit-calc(50% - 12px);
&:first-child{
height: calc(50% - 13px);
height:-webkit-calc(50% - 13px);
margin-bottom: 25px;
}
}
}
.pull-right{
width: calc(60% - 13px);
width: -webkit-calc(60% - 13px);
height: 100%;
.mainContent{
height: 100%;
}
}
.mainContent{
padding: 15px;
}
}
25 changes: 23 additions & 2 deletions app/views/customerManager.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,25 @@
<div class="mainContent">
<echart-map style="width:500px;height: 500px"></echart-map>
<echart-pie style="width:500px;height: 500px"></echart-pie>
<ul class="ctmgInfo">
<li><h3>12345</h3><p>已签约客户</p></li>
<li><h3>245</h3><p>本月新增</p></li>
<li><h3>75</h3><p>本周新增</p></li>
<li><h3>6</h3><p>昨日新增</p></li>
</ul>
</div>
<div class="clearfix chartInfo">
<div class="pull-left">
<div class="mainContent">
<echart-pie></echart-pie>
</div>
<div class="mainContent">
<echart-pie></echart-pie>
</div>
</div>
<div class="pull-right">
<div class="mainContent">
<echart-map></echart-map>
</div>
</div>
</div>


112 changes: 10 additions & 102 deletions app/views/userLists.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<li><a href="#">账户管理</a></li>
<li class="active">账户列表</li>
</ul>
<div class="mainContent">
<div class="mainContent" ng-controller="userListsCtrl as userli">
<div class="table-head form-inline">
<select class="form-control">
<option>按角色</option>
Expand Down Expand Up @@ -46,126 +46,34 @@
</tr>
</thead>
<tbody>
<tr>
<td>
<img src="./app/images/userdef.jpg" alt="陈良" class="userImg">
</td>
<td>
陈良
</td>
<td>
0411111
</td>
<td>
产品
</td>
<td>
产品部
</td>
<td>
[email protected]
</td>
<td>
正常
</td>
</tr>
<tr>
<td>
<img src="./app/images/userdef.jpg" alt="陈良" class="userImg">
</td>
<td>
陈良
</td>
<td>
0411111
</td>
<td>
产品
</td>
<td>
产品部
</td>
<td>
[email protected]
</td>
<td>
正常
</td>
</tr>
<tr>
<td>
<img src="./app/images/userdef.jpg" alt="陈良" class="userImg">
</td>
<td>
陈良
</td>
<td>
0411111
</td>
<td>
产品
</td>
<td>
产品部
</td>
<td>
[email protected]
</td>
<td>
正常
</td>
</tr>
<tr>
<td>
<img src="./app/images/userdef.jpg" alt="陈良" class="userImg">
</td>
<td>
陈良
</td>
<td>
0411111
</td>
<td>
产品
</td>
<td>
产品部
</td>
<td>
[email protected]
</td>
<td>
正常
</td>
</tr>
<tr>
<tr ng-repeat="user in userli.userLists">
<td>
<img src="./app/images/userdef.jpg" alt="陈良" class="userImg">
</td>
<td>
陈良
{{user.name}}
</td>
<td>
0411111
{{user.jnumber}}
</td>
<td>
产品
{{user.role}}
</td>
<td>
产品部
{{user.department}}
</td>
<td>
[email protected]
{{user.account}}
</td>
<td>
正常
{{user.state}}
</td>
</tr>
</tbody>
</table>
<div ng-controller="userListsCtrl as pages">
<div>
<button type="button" class="btn btn-primary" ui-sref="addUser">添加账号</button>
<ul uib-pagination total-items="pages.totalItems" items-per-page="20" previous-text="<" next-text=">" ng-model="pages.currentPage" ng-change="pages.pageChanged()" class="pull-right"></ul>
<ul uib-pagination total-items="userli.totalItems" items-per-page="20" previous-text="<" next-text=">" ng-model="userli.currentPage" ng-change="userli.pageChanged()" class="pull-right"></ul>
</div>
</div>
</div>

0 comments on commit fbb5136

Please sign in to comment.