EasyUI知识点
1. easyUI实现动态列,js实现
$('#dg').datagrid({
height: 340,
url: '${path}/salary/datas.do',
method: 'POST',
//queryParams: { 'id': id },
//idField: '产品ID',
striped: true,
fitColumns: true,
//singleSelect: false,
rownumbers: true,
pagination: true,
nowrap: false,
pageSize: 10,
pageList: [10, 20, 50, 100, 150, 200],
showFooter: true,
columns: [[
{ field: 'staffId', title: 'ID', width: 80, align: 'left' },
{ field: 'name', title: '员工姓名', width: 80, align: 'left' },
{ field: 'beginDate', title: '开始日期', width: 80, align: 'left' },
{ field: 'endDate', title: '结束日期', width: 80, align: 'left' },
{ field: 'preSalary', title: '预发工资', width: 80, align: 'left' },
{ field: 'socialInsurance', title: '社会保险', width: 80, align: 'left' },
{ field: 'realSalary', title: '实发工资', width: 80, align: 'left' }
]],
onBeforeLoad: function (param) {
},
onLoadSuccess: function (data) {
},
onLoadError: function () {
},
onClickCell: function (rowIndex, field, value) {
//alert(field);
}
});
2. 实现表格字段数据格式化
<table id="dg" class="easyui-datagrid" title="Basic DataGrid" style="display:none;width:700px;height:250px"
data-options="singleSelect:true,collapsible:true,url:'${path}/staff/datas.do',method:'post'"
pagination="true">
<thead>
<tr>
<th data-options="field:'id',width:80,hidden:true">Item ID</th>
<th data-options="field:'staffNo',width:80">员工编号</th>
<th data-options="field:'name',width:80">姓名</th>
<th data-options="field:'gender',width:80,formatter:function(v){return '1'==v ? '男':'女';}">性别</th>
<th data-options="field:'age',width:80">年龄</th>
<th data-options="field:'joinDate',width:80">入职日期</th>
<th data-options="field:'degree',width:80,formatter:function(v,row,idx){return '0'==v ? '博士' : '1'==v ? '研究生' : '2'==v ? '本科' : '3'==v ? '大专' : '中专';}">学历</th>
<th data-options="field:'status',width:80,formatter:function(value,row,index){return '0' == value ? '正式员工' : '1' == value ? '已离职' : '试用';}">状态</th>
</tr>
</thead>
</table>
EasyUI知识点的更多相关文章
- EasyUI知识点汇总
combobox联动设置 $(document).ready(function() { $('#gdfsdl1').combobox({ onSelect: function(record){ $(' ...
- easyui中的combobox小知识点~~
一直使用的easyui中,一些不为人知的小知识点,与君共勉: 1.combobox设置高度:使用panelHeight属性: 2.combobox本身自带“自动补全”功能,但是在浏览器中是有限制的,在 ...
- EasyUI相关知识点整理
EasyUI相关知识整理 EasyUI是一种基于jQuery.Angular..Vue和React的用户界面插件集合.easyui为创建现代化,互动,JavaScript应用程序,提供必要的功能.也就 ...
- 关于easyui的一些小知识点(1)
让layout布局自动适应浏览器宽度只需要加上fit="true"属性.
- ASP.NET MVC5+EF6+EasyUI 后台管理系统(7)-MVC与EasyUI DataGrid
系列目录 本节知识点 为了符合后面更新后的重构系统,文章于2016-11-1日重写 EasyUI读取MVC后台Json数据 开始实现 我们的系统似乎越来越有趣了 首先从前端入手,开打View下面的Sh ...
- ASP.NET MVC5+EF6+EasyUI 后台管理系统(34)-文章发布系统①-简要分析
系列目录 最新比较闲,为了学习下Android的开发构建ASP.NET MVC4+EF5+EasyUI+Unity2.x注入的后台管理系统(1)-前言与,虽然有点没有目的的学习,但还是了解了Andro ...
- ASP.NET MVC5+EF6+EasyUI 后台管理系统(38)-Easyui-accordion+tree漂亮的菜单导航
系列目录 本节主要知识点是easyui 的手风琴加树结构做菜单导航 有园友抱怨原来菜单非常难看,但是基于原有树形无限级别的设计,没有办法只能已树形展示 先来看原来的效果 改变后的效果,当然我已经做好了 ...
- ASP.NET MVC5+EF6+EasyUI 后台管理系统(41)-组织架构
系列目录 本节开始我们要实现工作流,此工作流可以和之前的所有章节脱离关系,也可以紧密合并. 我们当初设计的项目解决方案就是可伸缩可以拆离,可共享的项目解决方案.所以我们同时要添加App.Flow文件夹 ...
- ASP.NET MVC5+EF6+EasyUI 后台管理系统(55)-工作流设计-表单布局
系列目录 前言:这一节比较有趣.基本纯UI,但是不是很复杂 有了实现表单的打印和更加符合流程表单方式,我们必须自定义布局来适合业务场景打印!我们想要什么效果?看下图 (我们没有布局之前的表单和设置布局 ...
随机推荐
- OpenCV ——背景建模之CodeBook(2)
1,CodeBook的来源 先考虑平均背景的建模方法.该方法是针对每一个像素,累积若干帧的像素值,然后计算平均值和方差,以此来建立背景模型,相当于模型的每一个像素含有两个特征值,这两个特征值只是单纯的 ...
- find the closest sum to a target value
problem: given an array of integers including positive and negative, a target value. find 2 numbers ...
- SUPERVISOR进程管理器配置指南
SUPERVISOR进程管理器配置指南1. supervisor简介1.1. 官网http://supervisord.org/ 1.2. 介绍Supervisor是一个进程控制系统. 它是一个C/S ...
- C#常用集合的使用
大多数集合都在System.Collections,System.Collections.Generic两个命名空间.其中System.Collections.Generic专门用于泛型集合. 针对特 ...
- 关于video.js
网址:http://www.cnblogs.com/webenh/p/5815741.html
- 当@PathVariable遇上中文和点
当@PathVariable遇上中文和点 Spring MVC从3.0开始支持REST,而主要就是通过@PathVariable来处理请求参数和路径的映射. 由于考虑到SEO的缘故,很多人喜欢把新闻 ...
- Unable to chmod /system/build.prop.: Read-only file system
Unable to chmod /system/build.prop.: Read-only file system 只读文件系统 所以需要更改 使用下面的命令 mount -o remount,rw ...
- python 多线程 paramiko实现批量命令输入输出
远程批量执行命令 实现多线程执行 速度快 实现多并发登录 #-*- coding: utf-8 -*- #!/usr/bin/python import paramiko import threadi ...
- drupal错误: Maximum execution time of 240 seconds exceeded
drupal7.5安装完成,导入汉化包时,出现错误: Fatal error: Maximum execution time of 240 seconds exceeded in D:\phpweb\ ...
- Debian下VIM的安装和配置
1.安装 apt-get install vim 2.配置 这是我的vim 配饰文件,基本的功能都能实现,在这里做一个备份,省的以后重装系统还要到处找这个配置文件(/etc/vim/vimrc) : ...