考勤系统主页的布局用的是easyui的Layout控件

Layout:布局容器有5个区域:北、南、东、西和中间。中间区域面板是必须的,边缘的面板都是可选的。每个边缘区域面板都可以通过拖拽其边框改变大小,也可以点击折叠按钮将面板折叠起来。布局可以进行嵌套,用户可以通过组合布局构建复杂的布局结构。

<div id="cc" class="easyui-layout" style="width:600px;height:400px;">
<div data-options="region:'north',title:'North Title',split:true" style="height:100px;"></div>
<div data-options="region:'south',title:'South Title',split:true" style="height:100px;"></div>
<div data-options="region:'east',iconCls:'icon-reload',title:'East',split:true" style="width:100px;"></div>
<div data-options="region:'west',title:'West',split:true" style="width:100px;"></div>
<div data-options="region:'center',title:'center title'" style="padding:5px;background:#eee;"></div>
</div>

页面展示:

我们的考勤系统就是采用layout控件进行布局,还需要tabs选项卡

考勤系统我们仅需要上部,左部,中部

<!-- 布局 -->
<div id="cc" class="easyui-layout" style="width:100%;height:600px;">
<!-- 顶部 -->
<div data-options="region:'north',split:true," style="height:158px;">
<div style="width:100%;height:100px;margin-top:0px;">
<img alt="" src="data:images/head.jpg" width="100%">
</div>
<!-- 顶部导航标签 -->
<div style="background-color:#393755;width:100%;height:50px;margin-top:0px;">
<a href="#"><div class="caidan">人事管理模块</div></a>
<a href="#"><div class="caidan">考勤管理模块</div></a>
<a href="#"><div class="caidan">招聘管理模块</div></a>
<a href="#"><div class="caidan">培训管理模块</div></a>
<a href="#"><div class="caidan">薪酬管理模块</div></a>
</div>
</div>
<!-- 底部 -->
<div data-options="region:'south',split:true" style="height:20px;">
<p> 汉企玛雅考勤系统</p>
</div>
<!-- 左侧导航 -->
<div data-options="region:'west',title:'导航菜单',split:true" style="width:15%;">
<!-- 导航菜单 -->
<div id="aa" class="easyui-accordion" style="width:100%;height:100%;">
<div title="基本信息/打卡" style="overflow:auto;">
<a class="easyui-linkbutton" id="add_tab" href="#" style="width:100%" title="dakaMain.jsp">上下班打卡</a><br>
<a class="easyui-linkbutton" href="#" style="width:100%" data-options="iconCls:'icon-search'" title="shangxiabanBiaoZhun.jsp">上下班标准</a><br>
</div>
<div title="查询考勤信息" style="overflow:auto;">
<a class="easyui-linkbutton" href="#" style="width:100%" data-options="iconCls:'icon-ok'" title="rikaoqinxinxi.jsp">日考勤信息</a><br>
<a class="easyui-linkbutton" href="#" style="width:100%" data-options="iconCls:'icon-undo'" title="yuekaoqinxinxi.jsp">月考勤信息</a><br>
<a class="easyui-linkbutton" href="#" style="width:100%" data-options="iconCls:'icon-man'" title="jiabanxinxi.jsp">加班信息</a><br>
<a class="easyui-linkbutton" href="#" style="width:100%" data-options="iconCls:'icon-add'" title="tongjiyuekaoqin.jsp">统计月考勤</a><br>
</div>
<div title="请假申请">
<a class="easyui-linkbutton" href="#" style="width:100%" data-options="iconCls:'icon-tip'" title="qingjiaxinxi.jsp">请假信息</a><br>
<a class="easyui-linkbutton" href="#" style="width:100%" data-options="iconCls:'icon-ok'" title="Qingjiashenqing.jsp">请假申请</a><br>
</div>
</div> </div>
<!-- 中部内容显示 -->
<div data-options="region:'center',title:'信息展示'" style="padding:5px;background:#eee;">
<!-- 标签页 -->
<div id="tt" class="easyui-tabs" style="width:100%;height:100%;background:url(images/background.png)"></div>
</div>
</div>

左侧导航我们使用linkbutton来建立标签,title指向要显示的界面,通过jQuery来控制点击事件

 <a class="easyui-linkbutton" href="#" style="width:100%" data-options="iconCls:'icon-ok'" title="rikaoqinxinxi.jsp">日考勤信息</a><br>

tabs选项卡:选项卡显示一批面板。但在同一个时间只会显示一个面板。每个选项卡面板都有头标题和一些小的按钮工具菜单,包括关闭按钮和其他自定义按钮。

<!-- 标签页 -->
<div id="tt" class="easyui-tabs" style="width:100%;height:100%;background:url(images/background.png)"></div>

使用jQuery来控制标签页的打开

$(".easyui-linkbutton").click(function(){
// 获取组件的属性和值
var str = $(this).text();
var tab_href = $(this).attr("title");
if($("#tt").tabs('exists',str)){
$("#tt").tabs('select',str);
}else{
$("#tt").tabs('add',{title:str,closable:true,//href:tab_href
content:"<iframe width='100%' frameborder='0' height='100%' src='"+ tab_href +"'></iframe>"
});
}
});

为linkbutton添加点击事件,首先我们要获取linkbutton的text值,传给tabs,使得新打开的标签页与linkbutton的名字相同,对应到相应的页面上,其次再控制新的标签页。

考勤系统代码分析——主页布局easyui框架的更多相关文章

  1. 考勤系统——代码分析datagrid

    datagrid是easyui的控件,DataGrid以表格形式展示数据,并提供了丰富的选择.排序.分组和编辑数据的功能支持.DataGrid的设计用于缩短开发时间,并且使开发人员不需要具备特定的知识 ...

  2. android recovery 主系统代码分析

    阅读完上一篇文章: http://blog.csdn.net/andyhuabing/article/details/9226569 我们已经清楚了如何进入正常模式和Recovery模式已有深刻理解了 ...

  3. android recover 系统代码分析 -- 选择进入

    最近做Recovery的规范及操作指导文档,花了一些时间将流程搞清. Android利用Recovery模式,进行恢复出厂设置,OTA升级,patch升级及firmware升级.而在进入Recover ...

  4. android recovery 主系统代码分析【转】

    本文转载自:http://blog.csdn.net/andyhuabing/article/details/9248713 阅读完上一篇文章: http://blog.csdn.net/andyhu ...

  5. android recovery 系统代码分析 -- 选择进入【转】

    本文转载自:http://blog.csdn.net/andyhuabing/article/details/9226569 最近做Recovery的规范及操作指导文档,花了一些时间将流程搞清. An ...

  6. 11.5 Android显示系统框架_Vsync机制_代码分析

    5.5 surfaceflinger对vsync的处理buffer状态图画得不错:http://ju.outofmemory.cn/entry/146313 android设备可能连有多个显示器,AP ...

  7. 构建ASP.NET MVC4+EF5+EasyUI+Unity2.x注入的后台管理系统(34)-文章发布系统①-简要分析

    原文:构建ASP.NET MVC4+EF5+EasyUI+Unity2.x注入的后台管理系统(34)-文章发布系统①-简要分析 系列目录 最新比较闲,为了学习下Android的开发构建ASP.NET ...

  8. 基于SSH框架的在线考勤系统开发的质量属性

    我要开发的是一个基于SSH框架的在线考勤系统. 质量属性是指影响质量的相关因素,下面我将分别从6个系统质量属性(可用性,易用性,可修改性,性能,安全性,可测试性)来分析我的系统,以及如何实现这些质量属 ...

  9. Linux内核中的GPIO系统之(3):pin controller driver代码分析

    一.前言 对于一个嵌入式软件工程师,我们的软件模块经常和硬件打交道,pin control subsystem也不例外,被它驱动的硬件叫做pin controller(一般ARM soc的datash ...

随机推荐

  1. DelphiXE10.1自定义控件添加图标方法

    1 在资源文件中加入个24*24的BMP图片,命名为控件的类名(全大写包括T)        2 项目文件中加入对应的 {$R *.dres} 缺省为项目文件同名,自动加入到项目文件(Projrct- ...

  2. servlet jsp jdbc bootstrarp mvc分层模式实现的第一个项目

    登录注册界面 这是一个注册和登录的界面 用到了前端页面中自带的一点H5的标签和属性---巩固下 邮箱格式 :type="email"  不能为空:  required=" ...

  3. jQuery数据缓存方案详解:$.data()的使用

    我们经常使用隐藏控件或者是js全局变量来临时存储数据,全局变量容易导致命名污染,隐藏控件导致经常读写dom浪费性能.jQuery提供了自己的数据缓存方案,能够达到和隐藏控件.全局变量相同的效果,但是j ...

  4. Theano 学习笔记(一)

    Theano 学习笔记(一) theano 为什么要定义共享变量? 定义共享变量的原因在于GPU的使用,如果不定义共享的话,那么当GPU调用这些变量时,遇到一次就要调用一次,这样就会花费大量时间在数据 ...

  5. 爬虫研究-主要针对ali

    公司一个同事想爬取ali的网页受挫,自己跟着尝试了下,发现存在anti-spdier.准备了解下反爬虫,看怎么处理ali. http://www.freebuf.com/news/topnews/96 ...

  6. Android MVP 利用rxjava 避免向Model传入监听方法

    传统的MVP: 1.抽离出View的接口,即ILoginView. 2.抽离Model的接口,即ILoginModel. 3.抽离Presenter的接口,即ILoginPresenter. 4.实现 ...

  7. topcoder SRM 628 DIV2 BishopMove

    题目比较简单. 注意看测试用例2,给的提示 Please note that this is the largest possible return value: whenever there is ...

  8. xcode8 升级后注释快键键不能使用的解决方法

    1.这个是因为苹果解决xcode ghost.把插件屏蔽了.解决方法 命令运行:  sudo /usr/libexec/xpccachectl 然后必须重启电脑后生效 2.option+command ...

  9. 轻松3步实现c#windowsform窗体美化

    1.需要下载IrisSkin4.dll或者IrisSkin2.dll和ssk皮肤文件. 2.添加引用IrisSkin4.dll或者IrisSkin2.dll到项目中,将下载好的ssk皮肤文件复制到项目 ...

  10. const 使用一二

    Primer C++ 练习题4.20: int i = -1; const int ic = i; 对于这个,一开始认为,ic 作为const 类型变量,定义时应该给其赋常值,而此处给的是变量i,因此 ...