提交 00ae954e 编写于 作者: Skyeye云's avatar Skyeye云

【手机端】APP菜单权限点完成

上级 640074ff
......@@ -9,17 +9,46 @@ layui.config({
var index = parent.layer.getFrameIndex(window.name);
var $ = layui.$,
form = layui.form;
// 所属父级节点类型
var parentType = parent.parentType;
// 所属父级节点id
var parentId = parent.parentId;
// 所属菜单id
var menuId = parent.menuId;
if (isNull(parentType)) {
// 如果为空,则需要添加权限点
$("#showForm").html($("#authPointTemplate").html());
} else if (parentType == 1) {
// 如果为1,则需要添加数据权限分组
$("#showForm").html($("#groupTemplate").html());
} else if (parentType == 2) {
// 如果为2,写需要添加数据权限
$("#showForm").html($("#dataAuthPointTemplate").html());
}
matchingLanguage();
form.render();
form.on('submit(formAddBean)', function (data) {
if (winui.verifyForm(data.elem)) {
var params = {
authMenuName: $("#authMenuName").val(),
authMenu: $("#authMenu").val(),
menuId: parent.menuId
};
AjaxPostUtil.request({url: reqBasePath + "appworkpageauthpoint002", params: params, type: 'json', callback: function (json) {
var params = {
title: $("#authMenuName").val(),
authMenu: $("#authMenu").val(),
menuId: menuId,
parentId: parentId
};
if (isNull(parentType)) {
// 如果为空,则需要添加权限点
params.type = 1;
} else if (parentType == 1) {
// 如果为1,则需要添加数据权限分组
params.type = 2;
} else if (parentType == 2) {
// 如果为2,写需要添加数据权限
params.type = 3;
}
AjaxPostUtil.request({url: reqBasePath + "writeAppWorkPageAuthPointMation", params: params, type: 'json', callback: function (json) {
parent.layer.close(index);
parent.refreshCode = '0';
}});
......@@ -27,7 +56,7 @@ layui.config({
return false;
});
//取消
// 取消
$("body").on("click", "#cancle", function() {
parent.layer.close(index);
});
......
......@@ -10,21 +10,34 @@ layui.config({
var $ = layui.$,
form = layui.form;
AjaxPostUtil.request({url: reqBasePath + "appworkpageauthpoint003", params:{rowId: parent.rowId}, type: 'json', callback: function (json) {
AjaxPostUtil.request({url: reqBasePath + "appworkpageauthpoint003", params: {rowId: parent.rowId}, type: 'json', method: "GET", callback: function (json) {
var type = json.bean.type;
if (type == 1) {
// 如果为1,则需要编辑权限点
$("#showForm").html($("#authPointTemplate").html());
} else if (type == 2) {
// 如果为2,则需要编辑数据权限分组
$("#showForm").html($("#groupTemplate").html());
} else if (type == 3) {
// 如果为3,写需要编辑数据权限
$("#showForm").html($("#dataAuthPointTemplate").html());
}
$("#authMenuName").val(json.bean.authMenuName);
$("#authMenu").val(json.bean.authMenu);
matchingLanguage();
form.render();
form.on('submit(formEditBean)', function (data) {
if (winui.verifyForm(data.elem)) {
var params = {
authMenuName: $("#authMenuName").val(),
title: $("#authMenuName").val(),
authMenu: $("#authMenu").val(),
rowId: parent.rowId,
menuId: parent.menuId
menuId: parent.menuId,
parentId: json.bean.parentId,
type: type,
id: parent.rowId
};
AjaxPostUtil.request({url: reqBasePath + "appworkpageauthpoint004", params: params, type: 'json', callback: function (json) {
AjaxPostUtil.request({url: reqBasePath + "writeAppWorkPageAuthPointMation", params: params, type: 'json', callback: function (json) {
parent.layer.close(index);
parent.refreshCode = '0';
}});
......@@ -33,7 +46,7 @@ layui.config({
});
}});
//取消
// 取消
$("body").on("click", "#cancle", function() {
parent.layer.close(index);
});
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册