From 539d9ffc477d28a23a923b41fdeabc8c37c99ce6 Mon Sep 17 00:00:00 2001 From: zjj <3272660260@qq.com> Date: 星期一, 23 九月 2024 14:43:31 +0800 Subject: [PATCH] # --- src/main/webapp/static/js/configType/configType.js | 35 ++++++++++++++++++++++------------- 1 files changed, 22 insertions(+), 13 deletions(-) diff --git a/src/main/webapp/static/js/configType/configType.js b/src/main/webapp/static/js/configType/configType.js index 234ddc0..3ae58db 100644 --- a/src/main/webapp/static/js/configType/configType.js +++ b/src/main/webapp/static/js/configType/configType.js @@ -22,7 +22,7 @@ cols: [[ {type: 'checkbox', fixed: 'left'} ,{field: 'id', title: 'ID', sort: true,align: 'center', fixed: 'left', width: 80} - ,{field: 'type', align: 'center',title: '绫诲瀷'} + ,{field: 'type', align: 'center',title: '绫诲瀷',hide:true} ,{field: 'name', align: 'center',title: '鍚嶇О'} ,{field: 'value', align: 'center',title: '鍊�'} ,{fixed: 'right', title:'鎿嶄綔', align: 'center', toolbar: '#operate', width:150} @@ -173,7 +173,7 @@ }); // 鐩戝惉琛屽伐鍏蜂簨浠� - table.on('tool(role)', function(obj){ + table.on('tool(configType)', function(obj){ var data = obj.data; switch (obj.event) { // 璇︽儏 @@ -246,17 +246,26 @@ }); } 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; } -- Gitblit v1.9.1