角色权限唯一校验
This commit is contained in:
@ -98,6 +98,20 @@
|
||||
},
|
||||
roleKey:{
|
||||
required:true,
|
||||
remote: {
|
||||
url: ctx + "system/role/checkRoleKeyUnique",
|
||||
type: "post",
|
||||
dataType: "json",
|
||||
data: {
|
||||
"roleName" : function() {
|
||||
return $.trim($("#roleName").val());
|
||||
}
|
||||
},
|
||||
dataFilter: function(data, type) {
|
||||
if (data == "0") return true;
|
||||
else return false;
|
||||
}
|
||||
}
|
||||
},
|
||||
roleSort:{
|
||||
required:true,
|
||||
@ -106,7 +120,10 @@
|
||||
},
|
||||
messages: {
|
||||
"roleName": {
|
||||
remote: "角色已经存在"
|
||||
remote: "角色名称已经存在"
|
||||
},
|
||||
"roleKey": {
|
||||
remote: "角色权限已经存在"
|
||||
}
|
||||
},
|
||||
submitHandler:function(form){
|
||||
|
Reference in New Issue
Block a user