1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071 |
- /**
- *角色管理
- *
- */
- $.namespace("role.main");
- role.main.init=function(){
- //把form传入,构造翻页控件
- pageinfo($("#roleform"));
- }
- role.main.search=function(){
- $('#pagejump').val(1);
- $("#roleform").submit();
- }
- role.main.del=function(data){
- $.confirm({
- title: '确认框',
- content: '确认删除吗',
- confirm: function(){
- $.post($.app + "/role/delete", {
- id : data
- }, function(data) {
- if (data.success) {
- $.alert({
- title: '提示',
- content: '操作成功',
- confirm: function(){
- $("#roleform").submit();
- }
- });
- } else {
- $.alert({
- title: '提示',
- content: data.message,
- confirm: function(){
-
- }
- });
- }
- }, "json");
- },
- cancel: function(){
-
- }
- });
- }
- role.main.edit=function(data){
- location.href=$.app+"/role/edit?id="+data;
- }
- role.main.view=function(data){
- location.href=$.app+"/role/view?id="+data;
- }
- /**
- * 弹出新增页面
- * */
- role.main.add=function(){
- location.href=$.app+"/role/add";
- }
|