system.ftl

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org"
      xmlns:sec="http://www.thymeleaf.org/thymeleaf-extras-springsecurity3">
<head>
    <title>Hello World!</title>
    <link type="text/css" rel="stylesheet" href="common/common.css"/>
</head>
<body style="margin-left: 10px;margin-right: 10px">
<div id="cc" class="easyui-layout" fit="true">
    <div data-options="region:'north',title:'后台管理系统',split:true" style="height:150px;background: #23cbde">

        <div align="center" style="font-size: 18px;font-family:'arial'">
            <p></p>
            欢迎<a id="welcome" style="color: #b7d2ff"></a>访问系统
        </div>
    </div>
    <div data-options="region:'west',title:'菜单',split:true" style="width:150px;">
        <ul id="tree" class="easyui-tree">
                <#list menu as item>
                    <li>
                        <span><a  onclick="openTab('${item.url}','${item.value}')">${item.value}</a></span>
                    </li>
                </#list>
        </ul>
    </div>
    <div data-options="region:'center',title:'content'" style="padding:5px;background:#eee;">
        <div id="tabs" class="easyui-tabs" fit ="true" >

        </div>
    </div>
</div>
<script type='text/javascript' src='common/common.js'></script>

<script>
    $(function () {
        var username=getCookie("username");
        if(username!=null && username !=''){
            $('#welcome').append(username);
        }
    })
    function openTab(url,value) {
       if($('#tabs').tabs('exists',value)){
            $('#tabs').tabs('select',value);
       }else {
           $('#tabs').tabs('add',{
               title:value,
               content: '<iframe iframeborder="0" width="100%" height="100%" src='+url+'></iframe>',
               //href:'./'+url,
               closable:true
           })
       }
    };
</script>
</body>
</html>

猜你喜欢

转载自blog.csdn.net/linjun20/article/details/81123774