WIDGET-MODULE.lview 5.19 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 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
<?xml version="1.0" encoding="UTF-8"?>

<!--
    :Think
    : 1.0
-->
<a:screen xmlns:a="http://www.leaf-framework.org/application">
    <a:init-procedure/>
    <a:view template="default" package="leaf.ui.std">
        <a:link id="bmLink_function_query" model="sys.SYS890.hls_sys_role_home_page_vl" modelaction="query"/>
        <style>
            html, body {
                width: 552px;
                height: 72px;
                margin: 0;
                padding: 0;
            }

            .widget-module {
                width: 552px;
                height: 72px;
                background: #FFFFFF;
                border: 1px solid #F0F0F3;
            }

            .widget-module .module {
                float: left;
                width: 50px;
                margin: 12px 20px 6px 20px;
                display: inline-block;
                text-align: center;
                cursor: pointer;
            }

            .widget-module .module .module-img {
                width: 32px;
                height: 32px;
                background: #FFFFFF;
                box-shadow: 0 2px 12px 0 rgba(78, 104, 142, 0.10);
                border-radius: 4px;
                margin-left: 8px;
                margin-bottom: 5px;
            }
            .widget-module .module .module-img img{
                width: 18px;
                margin-top: 7px;

            }

            .widget-module .module div {
                font-size: 12px;
                color: rgba(75, 80, 90, 0.65);
                text-align: center;
                overflow: hidden;
                text-overflow: ellipsis;
                width: 50px;
                height: 15px;
                word-break: keep-all;
            }

        </style>
        <script><![CDATA[
        //渲染数据
        !function () {
            Leaf.request({
                url: $('bmLink_function_query').getUrl(),
                para: {
                    role_id: ${/session/@role_id}
                },
                scope: this,
                success: function (res) {
                    if (res.success && res.result.record) {
                        var fastFunctionList = res.result.record;
                        if (Array.isArray(fastFunctionList)) {
                            fastFunctionList = fastFunctionList
                        } else {
                            fastFunctionList = [fastFunctionList]
                        }
                        var widget_module = jQuery(".widget-module");
                        for(var i = 0; i < fastFunctionList.length && i < 6; i++){
                            var module = jQuery('<div class="module"></div>');
                            module.appendTo(widget_module);
                            var module_img = jQuery('<div class="module-img"></div>');
                            module_img.appendTo(module);
                            var img = jQuery('<img src="${/request/@context_path}/leafresource/images/former-rent-grey@2x.png"/>');
                            img.appendTo(module_img);
                            var span = jQuery('<div title="'+fastFunctionList[i].function_name+'">'+fastFunctionList[i].function_name+'</div>');
                            span.appendTo(module);
                            module[0].function_code = fastFunctionList[i].function_code;
                            module.click(function(){
                                top.mainJumpCode(this.function_code);
                            });
                        }
                    }
                }
            })
        }();

        ]]></script>
        <a:dataSets></a:dataSets>
        <div class="widget-module">
            <!--<div class="module">
                <div class="module-img">
                    <img src="${/request/@context_path}/leafresource/images/report-gray@2x.png"/>
                </div>

                <div>报表管理</div>
            </div>
            <div class="module">
                <div class="module-img">
                    <img src="${/request/@context_path}/leafresource/images/former-rent-grey@2x.png"/>
                </div>
                <div>租前管理</div>
            </div>
            <div class="module">
                <div class="module-img">
                    <img src="${/request/@context_path}/leafresource/images/workflow-grey@2x.png"/>
                </div>
                <div>工作流</div>
            </div>
            <div class="module">
                <div class="module-img">
                    <img src="${/request/@context_path}/leafresource/images/contract-purple@2x.png"/>
                </div>
                <div>合同管理</div>
            </div>
            <div class="module">
                <div class="module-img">
                    <img src="${/request/@context_path}/leafresource/images/systemSettings-grey@2x.png"/>
                </div>
                <div>系统管理</div>
            </div>
            <div class="module">
                <div class="module-img">
                    <img src="${/request/@context_path}/leafresource/images/add@2x.png"/>
                </div>
            </div>-->

        </div>


        <a:screenBody style="display:none"></a:screenBody>
    </a:view>
</a:screen>