1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author:
$Date: 2018/8/2
$Revision: 1.0
1.商业伙伴统计
-->
<a:screen xmlns:a="http://www.leaf-framework.org/application">
<a:init-procedure/>
<a:view template="default" package="leaf.ui.std">
<!--Beyond styles-->
<link href="${/request/@context_path}/leafresource/hls/beyondChart/assets/css/beyond.min.css" rel="stylesheet" />
<link href="${/request/@context_path}/leafresource/hls/beyondChart/assets/css/demo.min.css" rel="stylesheet" />
<link href="${/request/@context_path}/leafresource/hls/beyondChart/assets/css/typicons.min.css" rel="stylesheet" />
<link href="${/request/@context_path}/leafresource/hls/beyondChart/assets/css/animate.min.css" rel="stylesheet" />
<!--Basic Scripts-->
<script src="${/request/@context_path}/leafresource/hls/beyondChart/assets/js/skins.min.js"></script>
<script src="${/request/@context_path}/leafresource/hls/beyondChart/assets/js/bootstrap.min.js"></script>
<script src="${/request/@context_path}/leafresource/hls/beyondChart/assets/js/slimscroll/jquery.slimscroll.min.js"></script>
<!--Beyond Scripts-->
<script src="${/request/@context_path}/leafresource/hls/beyondChart/assets/js/beyond.min.js"></script>
<!--Page Related Scripts-->
<script src="${/request/@context_path}/leafresource/hls/beyondChart/assets/js/charts/morris/raphael-2.0.2.min.js"></script>
<script src="${/request/@context_path}/leafresource/hls/beyondChart/assets/js/charts/morris/morris.js"></script>
<script src="${/request/@context_path}/leafresource/hls/beyondChart/assets/js/charts/morris/morris-init.js"></script>
<style>
html,body{
background-color:#eee;
width:870px;
height:355px;
margin: 0;
padding: 0;
}
.widget_bp_count{
width:870px;
height:355px;
background-color:#fff;
}
.widget_bp_count .clickable{
cursor:pointer;
}
.widget_bp_count_title{
background:#E75B8D;
color:#fff;
height:50px;
line-height:50px;
border-top-left-radius:5px;
border-top-right-radius:5px;
}
.widget_bp_count_title img{
width:25px;
height:25px;
position:relative;
top:12.5px;
}
.widget_bp_count_title .title-left{
display:inline-block;
float:left;
line-height:50px;
margin-left:15px;
}
.widget_bp_count_title .title-right{
display:inlne-block;
float:right;
line-height:50px;
margin-right:15px;
}
.widget_bp_count_title .clearFloat{
clear:both;
height:0;
line-height:0;
font-size:0
}
.widget_bp_count_chart{
background-color:#fff;
}
</style>
<script><![CDATA[
function on_bp_category_count_ds_load(){
var records=$('bp_category_count_ds').data;
var data=[];
if(records!==null && records.length>0){
records.forEach(function(i){
data.push(i.data);
});
}
Morris.Bar({
noDataContent: "暂无数据",
element: 'chart',
data: data,
xkey: 'category',
ymax: 'auto',
ykeys: ['count'],
labels: ['人数'],
hideHover: 'auto',
barColors:['#42A5F5'],
barSizeRatio:0.3,
xLabelMargin:3
});
};
function total_count_label_renderer(value,record,name){
return '总数'+value
}
function this_month_count_label_renderer(value,record,name){
return '本月新增'+value
}
function go_bp_query(){
<!--top.mainJumpCode('HLS214N');-->
location.href='/modules/hls/HLS214N/hls_bp_master_modify_entrance.lview?layout_code=BP_MODIFY_ENTRANCE&function_code=HLS214N';
}
]]></script>
<a:dataSets>
<a:dataSet id="bp_category_count_ds" autoQuery="true" model="bp.bp_category_count">
<a:fields>
<a:field name="category"/>
<a:field name="count"/>
</a:fields>
<a:events>
<a:event name="load" handler="on_bp_category_count_ds_load"/>
</a:events>
</a:dataSet>
<a:dataSet id="bp_total_count_ds" autoQuery="true" model="bp.bp_total_count">
<a:fields>
<a:field name="total"/>
<a:field name="this_month_total"/>
</a:fields>
</a:dataSet>
</a:dataSets>
<div class="widget_bp_count">
<div class="widget_bp_count_title">
<div class="title-left">
<img src="${base.contextPath}/leafresource/images/widget/line.png" alt="png"/>
</div>
<div class="title-left">
<span class="title_style">商业伙伴统计</span>
</div>
<a:label className="title-left" bindTarget="bp_total_count_ds" name="total" renderer="total_count_label_renderer" style="width:auto"/>
<a:label className="title-left" bindTarget="bp_total_count_ds" name="this_month_total" renderer="this_month_count_label_renderer" style="width:auto"/>
<div class="title-right">
<img class="clickable" src="${base.contextPath}/leafresource/images/widget/homeAdd.png" style="margin-right:3px"/>
<img class="clickable" onclick="go_bp_query()" src="${base.contextPath}/leafresource/images/widget/whiteQuery.png"/>
</div>
<div class="clearFloat"></div>
</div>
<div class="widget_bp_count_chart">
<div id="chart" style="width:870px;height:305px"></div>
</div>
</div>
<a:screenBody style="display:none">
</a:screenBody>
</a:view>
</a:screen>