43 lines
1.3 KiB
JavaScript
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','authz/account_owner_list',[[
|
|
{field:'name', title: '用户名', sort: true}
|
|
,{field:'nickname', title: '显示名'}
|
|
,{field:'owner_list', title: '渠道', sort: true}
|
|
,{fixed: 'right', title:'操作', toolbar: '#datarights-barDemo', width:100}
|
|
]]);
|
|
}
|
|
};
|
|
})();
|
|
|