xfrontend/web/srczip/logic/datarights.js
2021-05-27 18:44:11 +08:00

43 lines
1.3 KiB
JavaScript

(function(){
X.pageLogic['datarights'] = {
init : function(){
var me = this;
$(".datarights-add-box").click(function(){
X.open({
type: 1,
title: false,
closeBtn: 0,
shadeClose: true,
skin: 'yourclass',
url: 'datarightsedit'
})
})
me.dataauthlist();
layui.table.on('tool(datarightstest)', function(obj){
var data = obj.data;
if(obj.event === "edit"){
// 编辑
X.parametersopen(data,'datarightsedit','auto',function(d){
// console.log("1111",d);
me.dataauthlist();
})
}
})
},
dataauthlist:function(){
X.tabledata('#datarightsdata','data_auth/list',[[
{field:'title', title: '数据权限名称', sort: true}
,{field:'data_range', title: '事件范围'}
,{field:'update_date', title: '最后调整时间', sort: true}
,{fixed: 'right', title:'操作', toolbar: '#datarights-barDemo', width:100}
]]);
}
};
})();