<?xml version="1.0" encoding="UTF-8"?> <!-- $Author: $Date: 2018/8/2 $Revision: 1.0 6.PRJ 动态 --> <a:screen xmlns:a="http://www.leaf-framework.org/application"> <a:init-procedure/> <a:view template="default" package="leaf.ui.std"> <style> html,body{ background-color:#eee; width:270px; height:640px; margin: 0; padding: 0; } .widget_prj_trend{ width:270px; height:640px; background-color:#fff; position:relative; color:rgb(102, 102, 102); } .widget_prj_trend .listTitle{ border-bottom:4px solid #00B3B3; font-size: 13px; height: 40px; line-height: 40px; padding: 0 10px; font-weight: 600; } .widget_prj_trend .listTitle .left-img{ width: 20px; height: 20px; margin-right:6px; vertical-align: middle; } .widget_prj_trend .listBody .listRow{ height:60px; padding:7px 10px; border-bottom:1px solid rgb(229, 229, 229); } .widget_prj_trend .listBody .listRow:hover{ background:#e8e8e8; border-left:4px solid #2dc3e8; padding-left:6px; } .widget_prj_trend .listBody .listRow .project_name{ font-size: 14px; color: #9c9c9c; margin:0; line-height:30px; max-width:270px; white-space:nowrap;text-overflow:ellipsis;overflow:hidden; } .widget_prj_trend .listBody .listRow img{ width:15px; height:15px; vertical-align:middle; } .widget_prj_trend .listBody .listRow .status{ margin-left:12px; line-height:30px; } .widget_prj_trend .listBody .listRow .date{ margin-left:20px; line-height:30px; } </style> <script><![CDATA[ function prjTrendHandler(ds){ console.log(ds); var records=ds.data; var html=''; records.forEach(function(record){ html+='<div class="listRow"><p class="project_name">'; html+=record.data['project_name']; html+='</p><div><img src="${/request/@context_path}/leafresource/images/widget/clock2.png"/><span class="status">'; html+=record.data['chance_status_n']; html+='</span><span class="date">'; html+=record.data['trend_date']; html+='</span></div></div>'; }); jQuery(".listBody").html(html); } ]]></script> <a:dataSets> <a:dataSet id="prj_trend_ds" autoQuery="true" pageSize="8" page="1" model="prj.PRJ1101.prj_trend"> <a:fields> <a:field name="project_name"/> <a:field name="chance_status_n"/> <a:field name="trend_date"/> </a:fields> <a:events> <a:event name="load" handler="prjTrendHandler"/> </a:events> </a:dataSet> </a:dataSets> <div class="widget_prj_trend recordList"> <div class="listTitle"> <img class="left-img" src="${/request/@context_path}/leafresource/images/widget/message.png"/> <span>动态</span> </div> <div class="listBody"> </div> </div> <a:screenBody style="display:none"> </a:screenBody> </a:view> </a:screen>