|
|
|
@ -14,11 +14,7 @@ layui.define(['form', 'laydate', 'table'], function (exports) {
|
|
|
|
|
},
|
|
|
|
|
initTable:function(){
|
|
|
|
|
var sx_ = localStorage.getItem("universityFacultyTable_field_"+Common.userInfoId); //筛选值显示、隐藏缓存
|
|
|
|
|
if ($.isEmpty(sx_)) {
|
|
|
|
|
sx_ = {};
|
|
|
|
|
} else {
|
|
|
|
|
sx_ = JSON.parse(sx_);
|
|
|
|
|
}
|
|
|
|
|
if($.isEmpty(sx_)){sx_ = {};}else {sx_ = JSON.parse(sx_);}
|
|
|
|
|
universityFacultyTable = table.render({
|
|
|
|
|
elem : '#universityFacultyTable',
|
|
|
|
|
height : Lib.getTableHeight(1),
|
|
|
|
@ -26,21 +22,22 @@ layui.define(['form', 'laydate', 'table'], function (exports) {
|
|
|
|
|
method : 'post',
|
|
|
|
|
url : Common.ctxPath + '/jlw/universityFaculty/list.json' // 数据接口
|
|
|
|
|
,page : Lib.tablePage // 开启分页
|
|
|
|
|
/*,toolbar: '#toolbar_universityFaculty' //自定义头部左侧工具栏*/
|
|
|
|
|
/*,defaultToolbar: ['filter', 'print', 'exports'] //头部右侧工具栏*/
|
|
|
|
|
,toolbar: '#toolbar_universityFaculty' //自定义头部左侧工具栏
|
|
|
|
|
,defaultToolbar: ['filter', 'print', 'exports'] //头部右侧工具栏
|
|
|
|
|
,limit : 10,
|
|
|
|
|
cols : [ [ // 表头
|
|
|
|
|
/*{
|
|
|
|
|
{
|
|
|
|
|
type : 'checkbox',
|
|
|
|
|
|
|
|
|
|
},*/
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
field : 'universityFacultyId',
|
|
|
|
|
// title : '院系ID(学院ID)',
|
|
|
|
|
title : '院系ID',
|
|
|
|
|
align:"center",
|
|
|
|
|
hideField :false,
|
|
|
|
|
hide: $.isEmpty(sx_['universityFacultyId']) ?/*false*/true :/*sx_['universityFacultyId']*/true,
|
|
|
|
|
hide:$.isEmpty(sx_['universityFacultyId'])?false:sx_['universityFacultyId'],
|
|
|
|
|
|
|
|
|
|
width : 60,
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
@ -71,20 +68,20 @@ layui.define(['form', 'laydate', 'table'], function (exports) {
|
|
|
|
|
hideField :false,
|
|
|
|
|
hide:$.isEmpty(sx_['universityFacultyContactAddress'])?false:sx_['universityFacultyContactAddress'],
|
|
|
|
|
},
|
|
|
|
|
// {
|
|
|
|
|
// field : 'universitiesCollegesId',
|
|
|
|
|
// title : '院校ID (院系的上一级)',
|
|
|
|
|
// align:"center",
|
|
|
|
|
// hideField :false,
|
|
|
|
|
// hide:$.isEmpty(sx_['universitiesCollegesId'])?false:sx_['universitiesCollegesId'],
|
|
|
|
|
// },
|
|
|
|
|
{
|
|
|
|
|
field : 'universitiesCollegesIdText',
|
|
|
|
|
title : '院校名称',
|
|
|
|
|
align:"center",
|
|
|
|
|
hideField :false,
|
|
|
|
|
hide:$.isEmpty(sx_['universitiesCollegesIdText'])?false:sx_['universitiesCollegesIdText'],
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
field : 'universityFacultyStatusText', //数据字典类型为 global_status
|
|
|
|
|
title : '状态',
|
|
|
|
|
// title : '状态( 1 正常 2删除)',
|
|
|
|
|
align:"center",
|
|
|
|
|
hideField :false,
|
|
|
|
|
hide: true,/*$.isEmpty(sx_['universityFacultyStatusText']) ? false : sx_['universityFacultyStatusText'],*/
|
|
|
|
|
hide:$.isEmpty(sx_['universityFacultyStatusText'])?false:sx_['universityFacultyStatusText'],
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
field : 'universityFacultyAddTime',
|
|
|
|
@ -93,10 +90,24 @@ layui.define(['form', 'laydate', 'table'], function (exports) {
|
|
|
|
|
hideField :false,
|
|
|
|
|
hide:$.isEmpty(sx_['universityFacultyAddTime'])?false:sx_['universityFacultyAddTime'],
|
|
|
|
|
},
|
|
|
|
|
// {
|
|
|
|
|
// field : 'userId',
|
|
|
|
|
// title : '用户ID',
|
|
|
|
|
// align:"center",
|
|
|
|
|
// hideField :false,
|
|
|
|
|
// hide:$.isEmpty(sx_['userId'])?false:sx_['userId'],
|
|
|
|
|
// },
|
|
|
|
|
// {
|
|
|
|
|
// field : 'orgId',
|
|
|
|
|
// title : '组织ID',
|
|
|
|
|
// align:"center",
|
|
|
|
|
// hideField :false,
|
|
|
|
|
// hide:$.isEmpty(sx_['orgId'])?false:sx_['orgId'],
|
|
|
|
|
// }
|
|
|
|
|
{
|
|
|
|
|
field : 'operation_',title : '操作',align:"center", templet: function (d) {
|
|
|
|
|
var htm = '<a class="layui-table-link" lay-event="edit">编辑</a>';
|
|
|
|
|
htm += '<a class="layui-table-link" lay-event="del">删除</a>';
|
|
|
|
|
var htm = '<button type="button" class="layui-btn layui-btn-normal layui-btn-xs" lay-event="edit">编辑</button>';
|
|
|
|
|
htm += '<button type="button" class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">删除</button>';
|
|
|
|
|
return htm;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|