WIDGET-CONT-TREND.lview 3.73 KB
Newer Older
niminmin's avatar
niminmin committed
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
<?xml version="1.0" encoding="UTF-8"?>

<!--
    $Author:
    $Date: 2018/8/2
    $Revision: 1.0
    9.合同 动态
-->
<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_cont_trend{
            width:270px;
            height:640px;
            background-color:#fff;
            position:relative;
            color:rgb(102, 102, 102);
            }
            .widget_cont_trend .listTitle{
            border-bottom:4px solid #00B3B3;
            font-size: 13px;
            height: 40px;
            line-height: 40px;
            padding: 0 10px;
            font-weight: 600;
            }
            .widget_cont_trend .listTitle .left-img{
            width: 20px;
            height: 20px;
            margin-right:6px;
            vertical-align: middle;
            }
            .widget_cont_trend .listBody .listRow{
            height:60px;
            padding:7px 10px;
            border-bottom:1px solid rgb(229, 229, 229);
            }
            .widget_cont_trend .listBody .listRow:hover{
            background:#e8e8e8;
            border-left:4px solid #2dc3e8;
            padding-left:6px;
            }
            .widget_cont_trend .listBody .listRow .contract_name{
            font-size: 14px;
            color: #9c9c9c;
            margin:0;
            line-height:30px;
            max-width:270px;
            white-space:nowrap;text-overflow:ellipsis;overflow:hidden;
            }
            .widget_cont_trend .listBody .listRow img{
            width:15px;
            height:15px;
            vertical-align:middle;
            }
            .widget_cont_trend .listBody .listRow .status{
            margin-left:12px;
            line-height:30px;
            }
            .widget_cont_trend .listBody .listRow .date{
            margin-left:20px;
            line-height:30px;
            }
        </style>
        <script><![CDATA[
        function contTrendHandler(ds){
            console.log(ds);
            var records=ds.data;
            var html='';
            records.forEach(function(record){
                html+='<div class="listRow"><p class="contract_name">';
                html+=record.data['contract_name'];
                html+='</p><div><img src="${/request/@context_path}/leafresource/images/widget/clock2.png"/><span class="status">';
                html+=record.data['trend_status'];
                html+='</span><span class="date">';
                html+=record.data['trend_date'];
                html+='</span></div></div>';
            });
            jQuery(".listBody").html(html);
        }
            ]]></script>
        <a:dataSets>
            <a:dataSet id="cont_trend_ds" autoQuery="true"  pageSize="8" page="1" model="cont.CON1003.cont_trend">
                <a:fields>
                    <a:field name="contract_name"/>
                    <a:field name="trend_status"/>
                    <a:field name="trend_date"/>
                </a:fields>
                <a:events>
                    <a:event name="load" handler="contTrendHandler"/>
                </a:events>
            </a:dataSet>
        </a:dataSets>
        <div class="widget_cont_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>