| | |
| | | }, |
| | | //height: 'full', |
| | | limit: 500, |
| | | limits: [16, 50, 100, 200, 500,], |
| | | limits: [16, 50, 100, 200, 500,2000,5000,10000], |
| | | even: true, |
| | | toolbar: '#toolbar', |
| | | cellMinWidth: 50, |
| | |
| | | layer.confirm('确定修改'+(data.length===1?'此':data.length)+'条数据吗', function(){ |
| | | $.ajax({ |
| | | url: baseUrl+"/pla/update/auth", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | data: JSON.stringify(data), |
| | | contentType:'application/json;charset=UTF-8', |
| | | 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; |
| | | case 'updateDataByAdmin': |
| | | var data = checkStatus.data; |
| | | if (data.length === 0){ |
| | | layer.msg('请选择数据'); |
| | | } else { |
| | | layer.confirm('确定修改'+(data.length===1?'此':data.length)+'条数据吗', function(){ |
| | | $.ajax({ |
| | | url: baseUrl+"/pla/updateByAdmin/auth", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | data: JSON.stringify(data), |
| | | contentType:'application/json;charset=UTF-8', |
| | |
| | | |
| | | var iframe = window['layui-layer-iframe' + index]; |
| | | iframe.child(dataSave) |
| | | }, |
| | | end: function() { |
| | | // ✅ 子页面关闭时刷新表格 |
| | | tableReload(false); // 或根据实际情况传 true/false |
| | | } |
| | | }); |
| | | }) |