| | |
| | | top.location.href = baseUrl + "/"; |
| | | } |
| | | pageCurr = curr; |
| | | // 延迟调用权限控制,确保表格操作列的按钮已经渲染完成 |
| | | setTimeout(function() { |
| | | var param = window.location.href.split("?")[1]; |
| | | if (null != param) { |
| | | var resourceId = param.split("=")[1]; |
| | | $.ajax({ |
| | | url: baseUrl+"/power/menu/"+resourceId+"/auth", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | method: 'GET', |
| | | async: false, |
| | | success: function (res) { |
| | | if (res.code === 200){ |
| | | for(var i = 0, len = res.data.length; i < len; i++) { |
| | | var code = res.data[i].code; |
| | | $('#'+code).css("display", "inline-block"); |
| | | $('.'+code).css("display", "inline-block"); |
| | | } |
| | | } else if (res.code === 403){ |
| | | top.location.href = baseUrl+"/"; |
| | | } else { |
| | | layer.msg(res.msg) |
| | | } |
| | | } |
| | | }); |
| | | } |
| | | }, 200); |
| | | } |
| | | }); |
| | | |
| | |
| | | top.location.href = baseUrl+"/"; |
| | | } |
| | | pageCurr=curr; |
| | | // 延迟调用权限控制,确保表格操作列的按钮已经渲染完成 |
| | | setTimeout(function() { |
| | | var param = window.location.href.split("?")[1]; |
| | | if (null != param) { |
| | | var resourceId = param.split("=")[1]; |
| | | $.ajax({ |
| | | url: baseUrl+"/power/menu/"+resourceId+"/auth", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | method: 'GET', |
| | | async: false, |
| | | success: function (res) { |
| | | if (res.code === 200){ |
| | | for(var i = 0, len = res.data.length; i < len; i++) { |
| | | var code = res.data[i].code; |
| | | $('#'+code).css("display", "inline-block"); |
| | | $('.'+code).css("display", "inline-block"); |
| | | } |
| | | } else if (res.code === 403){ |
| | | top.location.href = baseUrl+"/"; |
| | | } else { |
| | | layer.msg(res.msg) |
| | | } |
| | | } |
| | | }); |
| | | } |
| | | }, 200); |
| | | if (res.data.length === 0 && count !== 0) { |
| | | var reloadTableInstance = child ? parent.tableIns : tableIns; |
| | | // 如果 searchData 为空,也完全替换 where 对象 |