| | |
| | | }); |
| | | |
| | | // 监听行工具事件 |
| | | table.on('tool(role)', function(obj){ |
| | | table.on('tool(configType)', function(obj){ |
| | | var data = obj.data; |
| | | switch (obj.event) { |
| | | // 详情 |
| | |
| | | }); |
| | | } |
| | | break; |
| | | case 'power': |
| | | roleId = data.id; |
| | | layer.open({ |
| | | type: 2, |
| | | title: data.name + ' 权限分配', |
| | | maxmin: true, |
| | | area: [top.detailWidth/2, '85%'], |
| | | shadeClose: false, |
| | | content: 'role_power_detail.html', |
| | | success: function(layero, index){ |
| | | case 'delete': |
| | | id = data.id; |
| | | layer.confirm('确定删除吗', function(){ |
| | | $.ajax({ |
| | | url: baseUrl+"/configType/delete/auth", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | data: {id: id}, |
| | | method: 'POST', |
| | | traditional:true, |
| | | success: function (res) { |
| | | if (res.code === 200){ |
| | | layer.closeAll(); |
| | | tableReload(false); |
| | | } else if (res.code === 403){ |
| | | top.location.href = baseUrl+"/"; |
| | | } else { |
| | | layer.msg(res.msg) |
| | | } |
| | | } |
| | | }) |
| | | }); |
| | | break; |
| | | } |