|
|
|
@ -0,0 +1,223 @@
|
|
|
|
|
<!--#layout("/common/layout.html",{"jsBase":"/js/jlw/studentClientLink/"}){ -->
|
|
|
|
|
<layui:searchForm formId="searchForm" searchList="" condition="${search}">
|
|
|
|
|
</layui:searchForm>
|
|
|
|
|
<table id="studentClientLinkTable" lay-filter="studentClientLinkTable"></table>
|
|
|
|
|
<!--#} -->
|
|
|
|
|
|
|
|
|
|
<script type="text/html" id="toolbar_studentClientLink">
|
|
|
|
|
<div class="layui-btn-container">
|
|
|
|
|
<div class="layui-btn-group" >
|
|
|
|
|
<!--# if(core.searchIsShow(search)) {-->
|
|
|
|
|
<layui:accessButton function="studentClientLink.query" id="searchFormSearch" action="search"><i class="layui-icon"></i>搜索</layui:accessButton>
|
|
|
|
|
<!--# }-->
|
|
|
|
|
<layui:accessButton function="studentClientLink.add" action="add">添加</layui:accessButton>
|
|
|
|
|
<layui:accessButton function="studentClientLink.edit" action="edit">修改</layui:accessButton>
|
|
|
|
|
<layui:accessButton function="studentClientLink.del" action="del">删除</layui:accessButton>
|
|
|
|
|
<!--# if(!isEmpty(search)) {-->
|
|
|
|
|
<layui:accessButton function="studentClientLink.query" action="refresh"><i class="layui-icon"></i>刷新</layui:accessButton>
|
|
|
|
|
<!--# }-->
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</script>
|
|
|
|
|
<script>
|
|
|
|
|
|
|
|
|
|
layui.use(['form', 'laydate', 'table'], function(){
|
|
|
|
|
var form = layui.form;
|
|
|
|
|
var laydate = layui.laydate;
|
|
|
|
|
var table = layui.table;
|
|
|
|
|
var studentClientLinkTable = null;
|
|
|
|
|
var view ={
|
|
|
|
|
init:function(){
|
|
|
|
|
this.initTable();
|
|
|
|
|
this.initSearchForm();
|
|
|
|
|
this.initToolBar();
|
|
|
|
|
window.dataReload = function(){
|
|
|
|
|
Lib.doSearchForm($("#searchForm"),studentClientLinkTable)
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
initTable:function(){
|
|
|
|
|
var sx_ = localStorage.getItem("studentClientLinkTable_field_"+Common.userInfoId); //筛选值显示、隐藏缓存
|
|
|
|
|
if($.isEmpty(sx_)){sx_ = {};}else {sx_ = JSON.parse(sx_);}
|
|
|
|
|
studentClientLinkTable = table.render({
|
|
|
|
|
elem : '#studentClientLinkTable',
|
|
|
|
|
height : Lib.getTableHeight(1),
|
|
|
|
|
cellMinWidth: 100,
|
|
|
|
|
method : 'post',
|
|
|
|
|
where:{studentClientLinkType:'LOGIN_PAGE_NAV'},
|
|
|
|
|
url : Common.ctxPath + '/jlw/studentClientLink/list.json' // 数据接口
|
|
|
|
|
,page : Lib.tablePage // 开启分页
|
|
|
|
|
,toolbar: '#toolbar_studentClientLink' //自定义头部左侧工具栏
|
|
|
|
|
,defaultToolbar: ['filter', 'print', 'exports'] //头部右侧工具栏
|
|
|
|
|
,limit : 10,
|
|
|
|
|
cols : [ [ // 表头
|
|
|
|
|
{
|
|
|
|
|
type : 'checkbox',
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
// {
|
|
|
|
|
// field : 'studentClientLinkId',
|
|
|
|
|
// title : '导航栏ID',
|
|
|
|
|
// align:"center",
|
|
|
|
|
// hideField :false,
|
|
|
|
|
// hide:$.isEmpty(sx_['studentClientLinkId'])?false:sx_['studentClientLinkId'],
|
|
|
|
|
//
|
|
|
|
|
// width : 60,
|
|
|
|
|
// },
|
|
|
|
|
{
|
|
|
|
|
field : 'studentClientLinkOrder',
|
|
|
|
|
title : '导航栏排序',
|
|
|
|
|
align:"center",
|
|
|
|
|
hideField :false,
|
|
|
|
|
hide:$.isEmpty(sx_['studentClientLinkOrder'])?false:sx_['studentClientLinkOrder'],
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
field : 'studentClientLinkTitle',
|
|
|
|
|
title : '导航栏标题',
|
|
|
|
|
align:"center",
|
|
|
|
|
hideField :false,
|
|
|
|
|
hide:$.isEmpty(sx_['studentClientLinkTitle'])?false:sx_['studentClientLinkTitle'],
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
field : 'studentClientLinkContent',
|
|
|
|
|
title : '导航栏链接',
|
|
|
|
|
align:"center",
|
|
|
|
|
hideField :false,
|
|
|
|
|
hide:$.isEmpty(sx_['studentClientLinkContent'])?false:sx_['studentClientLinkContent'],
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
field : 'studentClientLinkTypeText', //数据字典类型为 student_client_link_type
|
|
|
|
|
title : '链接类型',
|
|
|
|
|
align:"center",
|
|
|
|
|
hideField :false,
|
|
|
|
|
hide:$.isEmpty(sx_['studentClientLinkTypeText'])?false:sx_['studentClientLinkTypeText'],
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
field : 'studentClientLinkImg',
|
|
|
|
|
title : '链接图片',
|
|
|
|
|
align:"center",
|
|
|
|
|
hideField :false,
|
|
|
|
|
hide:$.isEmpty(sx_['studentClientLinkImg'])?false:sx_['studentClientLinkImg'],
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
field : 'studentClientLinkStatusText', //数据字典类型为 global_status
|
|
|
|
|
title : '状态',
|
|
|
|
|
align:"center",
|
|
|
|
|
hideField :false,
|
|
|
|
|
hide:$.isEmpty(sx_['studentClientLinkStatusText'])?false:sx_['studentClientLinkStatusText'],
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
field : 'studentClientLinkOpenTypeText', //数据字典类型为 student_client_link_open_type
|
|
|
|
|
title : '打开方式',
|
|
|
|
|
align:"center",
|
|
|
|
|
hideField :false,
|
|
|
|
|
hide:$.isEmpty(sx_['studentClientLinkOpenTypeText'])?false:sx_['studentClientLinkOpenTypeText'],
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
field : 'createTime',
|
|
|
|
|
title : '创建时间',
|
|
|
|
|
align:"center",
|
|
|
|
|
hideField :false,
|
|
|
|
|
hide:$.isEmpty(sx_['createTime'])?false:sx_['createTime'],
|
|
|
|
|
},
|
|
|
|
|
// {
|
|
|
|
|
// 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 = '<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;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
] ]
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
table.on('checkbox(studentClientLinkTable)', function(obj){
|
|
|
|
|
var studentClientLink = obj.data;
|
|
|
|
|
if(obj.checked){
|
|
|
|
|
//按钮逻辑Lib.buttonEnable()
|
|
|
|
|
}else{
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
initSearchForm:function(){
|
|
|
|
|
Lib.initSearchForm( $("#searchForm"),studentClientLinkTable,form);
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
initToolBar:function(){
|
|
|
|
|
toolbar = {
|
|
|
|
|
add: function () {
|
|
|
|
|
var url = "/jlw/studentClientLink/add.do";
|
|
|
|
|
Common.openDlg(url,"StudentClientLink管理>新增");
|
|
|
|
|
},
|
|
|
|
|
edit: function () {
|
|
|
|
|
var data = Common.getOneFromTable(table,"studentClientLinkTable");
|
|
|
|
|
if(data==null){
|
|
|
|
|
return ;
|
|
|
|
|
}
|
|
|
|
|
var url = "/jlw/studentClientLink/add.do?studentClientLinkId="+data.studentClientLinkId;
|
|
|
|
|
Common.openDlg(url,"StudentClientLink管理>"+data.studentClientLinkId+">编辑");
|
|
|
|
|
},
|
|
|
|
|
del: function () {
|
|
|
|
|
layui.use(['del'], function(){
|
|
|
|
|
var delView = layui.del
|
|
|
|
|
delView.delBatch();
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
search: function () {
|
|
|
|
|
Lib.doSearchForm($("#searchForm"), studentClientLinkTable, 1);
|
|
|
|
|
view.initToolBar()
|
|
|
|
|
},
|
|
|
|
|
refresh: function () {
|
|
|
|
|
searchForm.reset();
|
|
|
|
|
Lib.doSearchForm($("#searchForm"), studentClientLinkTable, 1);
|
|
|
|
|
view.initToolBar()
|
|
|
|
|
},
|
|
|
|
|
}
|
|
|
|
|
//触发事件
|
|
|
|
|
$('.ext-toolbar').on('click', function() {
|
|
|
|
|
var type = $(this).data('type');
|
|
|
|
|
toolbar[type] ? toolbar[type].call(this) : '';
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
}, initTableTool: table.on('tool(studentClientLinkTable)', function (obj) {
|
|
|
|
|
var data = obj.data;
|
|
|
|
|
if (obj.event === 'edit') {
|
|
|
|
|
var url = "/jlw/studentClientLink/add.do?studentClientLinkId="+data.studentClientLinkId;
|
|
|
|
|
Common.openDlg(url,"StudentClientLink管理>"+data.studentClientLinkId+">编辑");
|
|
|
|
|
}else if(obj.event === "del"){
|
|
|
|
|
layer.confirm('是否确定删除该信息?', function (index) {
|
|
|
|
|
var ret = Common.postAjax("/jlw/studentClientLink/delete.json",{ids:data.studentClientLinkId});
|
|
|
|
|
layer.msg(ret.code == 0?"删除成功!":ret.msg, {
|
|
|
|
|
offset: ['50%'],
|
|
|
|
|
icon: ret.code == 0?1:2,
|
|
|
|
|
time: 1500 //2秒关闭(如果不配置,默认是3秒)
|
|
|
|
|
},function (){
|
|
|
|
|
if(ret.code == 0){
|
|
|
|
|
Lib.tableRefresh();
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
};
|
|
|
|
|
view.init();
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
</script>
|