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
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: huangtianyang
$Date: 2018/7/9 下午7:43
$Revision: 1.0
-->
<a:screen xmlns:a="http://www.leaf-framework.org/application">
<a:init-procedure/>
<a:view template="default" package="leaf.ui.std">
<link href="${/request/@context_path}/leafresource/leaf.ui.std/hap/hlscomponent/hlsfont/hls-font.css"
rel="stylesheet"
type="text/css"/>
<link href="${/request/@context_path}/leafresource/leaf.ui.std/hap/hlscomponent/hls-all.css" rel="stylesheet"
type="text/css"/>
<link href="${/request/@context_path}/css/lon/gld-home-style.css" rel="stylesheet" type="text/css"/>
<a:link id="widget_model_query" model="lon.lon120w.lon_notice" modelaction="query"/>
<style>
html, body {
width: 270px;
height: 645px;
}
/*查询条件*/
.queryOptions {
margin-left: 5px;
}
/*通知栏部分*/
.notice_row {
width: 250px;
min-height: 65px;
margin: 0 auto;
padding: 10px 10px;
box-sizing: border-box;
}
.notice_row strong {
font-size: 13px;
font-weight: lighter;
display: block;
}
.iremove {
position: absolute;
right: -16px;
top: 24px;
z-index: 999;
cursor: pointer;
}
.notice-font {
font-size: 12px;
height: 40px;
line-height: 40px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
/*审批状态*/
.status_new, .status_approving, .status_approved, .status_rejected {
width: 60px;
height: 20px;
line-height: 20px;
border-radius: 2px;
max-height: 32px;
text-align: center;
color: #fff;
display: inline-block;
overflow: hidden;
}
.status_new {
background-color: #00b3b3;
}
.status_approving {
background-color: #FFCD55;
}
.status_approved {
background-color: #8cc375;
}
.status_rejected {
background-color: rgb(245, 123, 105);
}
/*查询框*/
.conInfoInput {
border: 1px solid #cccccc;
width: 230px;
height: 35px;
margin-top: 10px;
border-radius: 2px;
}
.conInfoInput > img {
width: 15px;
height: 15px;
display: inline-block;
margin-left: 2px;
}
.conInfoInput input {
background: #fff;
border: none;
width: 205px;
height: 27px;
}
/*投放统计图表*/
.con-overdue-title {
height: 40px;
width: inherit;
background-color: #FA6A4D;
color: #FFF;
line-height: 40px;
vertical-align: middle;
}
.con-overdue-title-img {
display: block;
float: left;
margin-left: 10px;
width: 20px;
height: 20px;
margin-top: 10px;
margin-right: 6px;
}
.con-overdue-title-content {
float: left;
color: #ffffff;
}
.co-body-title1-amt {
margin-top: 5px;
height: 25px;
width: inherit;
color: rgb(249, 112, 100);
line-height: 25px;
vertical-align: middle;
margin-left: 20px;
}
.co-body-title1-name {
font-size: 12px;
height: 25px;
width: inherit;
color: #2cc2e3;
line-height: 25px;
vertical-align: middle;
margin-left: 20px;
margin-bottom: 25px;
}
/*提款统计环形图*/
#circularChart_chart {
margin-top: 10px;
margin-bottom: 20px;
}
.hls-analyse-count-chart .other-orange-bgcolor {
background-color: #FFCD55;
}
.hls-analyse-count-chart .new-blue-bgcolor {
background-color: #8cc375;
}
.hls-analyse-count-chart .igreen {
color: #8cc375;
}
.border-bottom-green {
border-bottom: 4px solid #8cc375;
}
.nav-boxShadow-fontColor {
box-shadow: 0px 3px 0px rgb(204, 204, 204);
}
.nav-no-boxShadow-fontColor {
box-shadow: 0px 0px 0px rgb(204, 204, 204);
}
/*控制表格样式*/
#contractInfoTable tr td:nth-child(1) {
width: 11%
}
#contractInfoTable tr td:nth-child(2) {
width: 10%
}
#contractInfoTable tr td:nth-child(3) {
width: 23%
}
</style>
<div></div>
<script type="text/javascript"></script>
<a:dataSets/>
<div id="widget515_noticeBoard" class="section hls-block-x1"
style="height: 645px; background-color: #FFF;">
<div class="section-title global-font-size13 border-bottom-green">
<img class="left-img" src="${/request/@context_path}/images/lon/notice.png"/>
<span>动态</span>
</div>
</div>
<script type="text/javascript"><![CDATA[
function getNotice(contextPath, divName, url) {
$jq.ajax({
type: 'GET',
url: url,
async: false, //设为同步
contentType: "application/json; charset=utf-8",
success: function (rs) {
if (rs.success && rs.result.record) {
var datas;
if (!rs.result.record instanceof Array) {
datas = new Array(rs.result.record);
} else {
datas = rs.result.record;
}
var noticeObj = document.getElementById(divName);
if (!noticeObj) return false;
for (var i = 0; i < datas.length; i++) {
var outDiv = document.createElement("div");
var h = document.createElement("strong");
var innerDiv = document.createElement("div");
innerDiv.setAttribute("class", "notice-font");
outDiv.setAttribute("class", "notice_row border-bottom-1 postion-relative section-row-height");
h.innerHTML = datas[i].loan_contract_name;
if (datas[i].c_date) {
datas[i].c_date = new Date(datas[i].c_date.substring(0,19).replace(/-/g,"/"));
var nowTime = new Date();
var interval = (nowTime - datas[i].c_date) / 60000;
if (interval <= 1) {
//时间小于1min
datas[i].c_date = "刚刚 ";
} else if (interval > 1 && interval < 60) {
//时间大于1min小于1H
datas[i].c_date = Number.parseInt(interval) + "分钟以前";
} else {
datas[i].c_date = datas[i].c_date.getFullYear() + '-' + (datas[i].c_date.getMonth() + 1) + '-' + datas[i].c_date.getDate()
}
}
if (datas[i].c_date.indexOf('-') !== -1) {
innerDiv.innerHTML =
"<img style='height:15px;width:15px;' src=" + contextPath + "/images/lon/clock2.png /> " + datas[i].c_date + " " + datas[i].loan_contract_status_display
} else {
innerDiv.innerHTML =
"<img style='height:15px;width:15px;' src=" + contextPath + "/images/lon/clock1.png /> " + datas[i].c_date + " " + datas[i].loan_contract_status_display
}
outDiv.appendChild(h);
outDiv.appendChild(innerDiv);
noticeObj.appendChild(outDiv);
}
}
}
});
}
getNotice('${/request/@context_path}', "widget515_noticeBoard", $('widget_model_query').getUrl() + '?pagenum=1&pagesize=7&ORDER_FIELD=creation_date&ORDER_TYPE=desc');
]]></script>
<a:screenBody style="display:none;"/>
</a:view>
</a:screen>