提交 12fc86a5 编写于 作者: doc_wei's avatar doc_wei

菜单管理整改

上级 50c63e45
......@@ -24,7 +24,6 @@ layui.config({
limits: getLimits(),
limit: getLimit(),
cols: [[
{ title: systemLanguage["com.skyeye.serialNumber"][languageType], type: 'numbers' },
{ field: 'name', title: '名称', align: 'left', width: 200 },
{ field: 'sort', title: systemLanguage["com.skyeye.serialNumber"][languageType], align: 'center', width: 80 },
{ field: 'remark', title: '备注', align: 'left', width: 200 },
......
......@@ -54,7 +54,6 @@ layui.config({
url: reqBasePath + 'companyjob001',
where: getTableParams(),
cols: [[
{ title: systemLanguage["com.skyeye.serialNumber"][languageType], type: 'numbers' },
{ field: 'jobName', title: '职位名称', width: 180 },
{ field: 'id', title: '职位简介', width: 80, align: 'center', templet: function (d) {
return '<i class="fa fa-fw fa-html5 cursor" lay-event="jobDesc"></i>';
......
......@@ -20,7 +20,6 @@ layui.config({
url: reqBasePath + 'companymation001',
where:{companyName: $("#companyName").val()},
cols: [[
{ title: systemLanguage["com.skyeye.serialNumber"][languageType], type: 'numbers' },
{ field: 'companyName', width: 300, title: '公司名称'},
{ field: 'companyDesc', width: 80, title: '公司简介', align: 'center', templet: function (d) {
return '<i class="fa fa-fw fa-html5 cursor" lay-event="companyDesc"></i>';
......
......@@ -12,8 +12,6 @@ layui.config({
var colorpicker = layui.colorpicker;
var selOption = getFileContent('tpl/template/select-option.tpl');
var parentId = "0";
// 加载图标信息
systemCommonUtil.initIconChooseHtml('iconMation', form, colorpicker, 12);
......@@ -40,59 +38,33 @@ layui.config({
}
});
//菜单级别变化事件
// 菜单类型变化事件
form.on('radio(menuLevel)', function (data) {
var val = data.value;
if(val == '1'){//创世菜单
$("#parentIdBox").addClass("layui-hide");
} else if (val == '2'){
parentId = "0";
$("#lockParentSel").html("");
$("#parentIdBox").removeClass("layui-hide");
loadChildMenu();
} else {
winui.window.msg('状态值错误', {icon: 2, time: 2000});
}
});
//系统菜单同步
form.on('switch(isNecessary)', function (data) {
//同步开关值
$(data.elem).val(data.elem.checked);
});
//同步共享
form.on('switch(isShare)', function (data) {
//同步开关值
$(data.elem).val(data.elem.checked);
});
form.on('select(selectParent)', function(data) {
if (data.value != parentId){
if(isNull(data.value) || data.value == '请选择'){
layui.$(data.elem).parent('dd').nextAll().remove();
if(layui.$(data.elem).parent('dd').prev().children('select[class=menuParent]').length > 0){
parentId = layui.$(data.elem).parent('dd').prev().children('select[class=menuParent]')[0].value;
} else {
parentId = "0";
}
} else {
layui.$(data.elem).parent('dd').nextAll().remove();
parentId = data.value;
loadChildMenu();
}
if (val == 0) {
$("#lockParentSel").html("");
$("#parentIdBox").addClass("layui-hide");
} else if (val == 1) {
$("#parentIdBox").removeClass("layui-hide");
loadChildMenu();
}
});
form.render('select');
});
form.on('submit(formAddMenu)', function (data) {
if (winui.verifyForm(data.elem)) {
var menuLevel = $("input[name='menuLevel']:checked").val();
var params = {
menuName: $("#menuName").val(),
menuNameEn: $("#menuNameEn").val(),
sysWinId: data.field.menuSysWinId,
desktopId: data.field.desktop,
sysWinId: $("#menuSysWinId").val(),
desktopId: $("#desktop").val(),
menuUrl: $("#menuUrl").val(),
menuType: data.field.menuType
menuType: $("input[name='menuType']:checked").val(),
menuLevel: menuLevel,
parentId: menuLevel == 0 ? "0" : $("#menuParent").val(),
menuSysType: $("input[name='menuSysType']:checked").val(),
isShare: $("input[name='isShare']:checked").val(),
};
// 获取图标信息
......@@ -100,36 +72,6 @@ layui.config({
if (!params["iconChooseResult"]) {
return false;
}
if (data.field.menuLevel == '1'){//创世菜单
params.parentId = '0';
} else if (data.field.menuLevel == '2'){//子菜单
var $menu = layui.$('.menuParent');
var str = "";
for (var i = 0; i < $menu.length; i++) {
if (!isNull($menu[i].value) && $menu[i].value != '请选择') {
str += $menu[i].value + ",";
}
}
if (isNull(str)) {//父菜单为空
winui.window.msg("请至少选择一级父菜单", {icon: 2, time: 2000});
return false;
} else {
params.parentId = str;
}
} else {
winui.window.msg('状态值错误', {icon: 2, time: 2000});
}
if ($("#menuSysType").val() == 'true') {
params.menuSysType = '1';
} else {
params.menuSysType = '2';
}
if ($("#isShare").val() == 'true') {
params.isShare = '1';
} else {
params.isShare = '0';
}
AjaxPostUtil.request({url: reqBasePath + "sys007", params: params, type: 'json', callback: function(json) {
parent.layer.close(index);
parent.refreshCode = '0';
......@@ -138,31 +80,18 @@ layui.config({
return false;
});
//加载同级菜单
function loadChildMenu(){
AjaxPostUtil.request({url: reqBasePath + "sys009", params: {parentId: parentId}, type: 'json', callback: function (json) {
var str = '<dd><select class="menuParent" lay-filter="selectParent" lay-search=""><option value="">请选择</option>';
// 加载一级菜单
function loadChildMenu() {
AjaxPostUtil.request({url: reqBasePath + "sys009", params: {parentId: '0'}, type: 'json', method: 'GET', callback: function (json) {
var str = '<select id="menuParent" lay-filter="selectParent" win-verify="required" lay-search=""><option value="">请选择</option>';
for(var i = 0; i < json.rows.length; i++){
str += '<option value="' + json.rows[i].id + '">' + json.rows[i].desktopName + '---------' + json.rows[i].menuName + '---------' + getMenuLevelName(json.rows[i].menuLevel) + '</option>';
str += '<option value="' + json.rows[i].id + '">' + json.rows[i].desktopName + '---------' + json.rows[i].menuName + '</option>';
}
str += '</select></dd>';
str += '</select>';
$("#lockParentSel").append(str);
form.render('select');
}});
}, async: false});
}
//获取菜单级别
function getMenuLevelName(level){
if(level == '0'){
return "创世菜单";
} else {
return level + "级子菜单";
}
}
//初始化加载隐藏创世菜单
$("#parentIdBox").addClass("layui-hide");
// 取消
$("body").on("click", "#cancle", function() {
parent.layer.close(index);
......
......@@ -13,41 +13,26 @@ layui.config({
showGrid({
id: "showForm",
url: reqBasePath + "sys040",
params: {rowId:parent.rowId},
params: {id: parent.rowId},
pagination: false,
template: getFileContent('tpl/sysevemenu/sysevemenudetailsTemplate.tpl'),
method: 'GET',
template: $("#beanTemplate").html(),
ajaxSendAfter:function (json) {
var str = '';
if(json.bean.menuIconType == '1'){
if(isNull(json.bean.menuIconBg)){
str += '<div class="winui-icon winui-icon-font" style="width: 20px; height: 20px;">';
} else {
str += '<div class="winui-icon winui-icon-font" style="text-align: center; padding: 7px; width: 20px; height: 20px; background-color:' + json.bean.menuIconBg + '">';
}
if(isNull(json.bean.menuIconColor)){
str += '<i class="fa fa-fw ' + json.bean.menuIcon + '" style="color: white"></i>';
} else {
str += '<i class="fa fa-fw ' + json.bean.menuIcon + '" style="color: ' + json.bean.menuIconColor + '"></i>';
}
str += '</div>';
} else if (json.bean.menuIconType == '2'){
str = '<img src="' + fileBasePath + json.bean.menuIconPic + '" class="photo-img" id="menuIconPic">';
}
$("#icon").html(str);
$("#icon").html(systemCommonUtil.initIconShow(json.bean));
if(json.bean.parentId == '0'){
$("#menuLevel").html("创世菜单");
$("#menuLevel").html("菜单");
} else {
$("#menuLevel").html( "子菜单-->" + json.bean.menuLevel + "级子菜单");
$("#menuLevel").html( "子菜单");
}
matchingLanguage();
form.render();
$("body").on("click","#menuIconPic", function() {
systemCommonUtil.showPicImg(fileBasePath + json.bean.menuIconPic);
})
}
});
$("body").on("click","#menuIconPic", function() {
systemCommonUtil.showPicImg(fileBasePath + json.bean.menuIconPic);
})
});
});
\ No newline at end of file
layui.config({
base: basePath,
version: skyeyeVersion
}).extend({
window: 'js/winui.window'
}).define(['window', 'table', 'jquery', 'winui', 'colorpicker', 'fileUpload'], function (exports) {
winui.renderColor();
layui.use(['form'], function (form) {
var index = parent.layer.getFrameIndex(window.name);
var $ = layui.$;
var colorpicker = layui.colorpicker;
var selOption = getFileContent('tpl/template/select-option.tpl');
showGrid({
id: "showForm",
url: reqBasePath + "sys040",
params: {id: parent.rowId},
pagination: false,
method: 'GET',
template: $("#beanTemplate").html(),
ajaxSendLoadBefore: function(hdb) {},
ajaxSendAfter:function (json) {
// 加载图标信息
systemCommonUtil.initEditIconChooseHtml('iconMation', form, colorpicker, 12, json.bean);
// 桌面信息
systemCommonUtil.getSysDesttop(function (data) {
// 加载账户数据
$("#desktop").html(getDataUseHandlebars(selOption, data));
$("#desktop").val(json.bean.desktopId);
form.render('select');
});
// 所属系统
showGrid({
id: "menuSysWinId",
url: reqBasePath + "querySysEveWinList",
params: {},
pagination: false,
method: "GET",
template: selOption,
ajaxSendLoadBefore: function(hdb) {},
ajaxSendAfter: function(j) {
$("#menuSysWinId").val(json.bean.sysWinId);
form.render('select');
}
});
// 菜单类型
$("input:radio[name='menuLevel'][value='" + json.bean.menuLevel + "']").attr("checked", true);
if(json.bean.menuLevel == '0'){
$("#parentIdBox").addClass("layui-hide");
} else {
loadChildMenu();
$("#menuParent").val(json.bean.parentId);
}
$("input:radio[name='menuType'][value='" + json.bean.menuType + "']").attr("checked", true);
$("input:radio[name='menuSysType'][value='" + json.bean.menuSysType + "']").attr("checked", true);
$("input:radio[name='isShare'][value='" + json.bean.isShare + "']").attr("checked", true);
matchingLanguage();
form.render();
// 菜单类型变化事件
form.on('radio(menuLevel)', function (data) {
var val = data.value;
if (val == 0) {
$("#lockParentSel").html("");
$("#parentIdBox").addClass("layui-hide");
} else if (val == 1) {
$("#parentIdBox").removeClass("layui-hide");
loadChildMenu();
}
form.render('select');
});
form.on('submit(formEditMenu)', function (data) {
if (winui.verifyForm(data.elem)) {
var menuLevel = $("input[name='menuLevel']:checked").val();
var params = {
menuName: $("#menuName").val(),
menuNameEn: $("#menuNameEn").val(),
sysWinId: $("#menuSysWinId").val(),
desktopId: $("#desktop").val(),
menuUrl: $("#menuUrl").val(),
menuType: $("input[name='menuType']:checked").val(),
menuLevel: menuLevel,
parentId: menuLevel == 0 ? "0" : $("#menuParent").val(),
menuSysType: $("input[name='menuSysType']:checked").val(),
isShare: $("input[name='isShare']:checked").val(),
id: parent.rowId,
};
// 获取图标信息
params = systemCommonUtil.getIconChoose(params);
if (!params["iconChooseResult"]) {
return false;
}
AjaxPostUtil.request({url: reqBasePath + "sys010", params: params, type: 'json', method: 'PUT', callback: function(json) {
parent.layer.close(index);
parent.refreshCode = '0';
}});
}
return false;
});
}
});
// 加载一级菜单
function loadChildMenu() {
AjaxPostUtil.request({url: reqBasePath + "sys009", params: {parentId: '0'}, type: 'json', method: 'GET', callback: function (json) {
var str = '<select id="menuParent" lay-filter="selectParent" win-verify="required" lay-search=""><option value="">请选择</option>';
for(var i = 0; i < json.rows.length; i++){
str += '<option value="' + json.rows[i].id + '">' + json.rows[i].desktopName + '---------' + json.rows[i].menuName + '</option>';
}
str += '</select>';
$("#lockParentSel").append(str);
}, async: false});
}
// 取消
$("body").on("click", "#cancle", function() {
parent.layer.close(index);
});
});
});
\ No newline at end of file
......@@ -8,38 +8,18 @@ layui.config({
version: skyeyeVersion
}).extend({
window: 'js/winui.window'
}).define(['window', 'table', 'jquery', 'winui', 'form', 'fsCommon', 'fsTree'], function (exports) {
}).define(['window', 'tableTreeDj', 'jquery', 'winui', 'form', 'fsTree'], function (exports) {
winui.renderColor();
var $ = layui.$,
form = layui.form,
fsTree = layui.fsTree,
fsCommon = layui.fsCommon,
table = layui.table;
var parentId = "";
tableTree = layui.tableTreeDj;
var sysWinId = "";
authBtn('1552958167410');
showGrid({
id: "menuLevel",
url: reqBasePath + "sys021",
params: {},
pagination: false,
template: getFileContent('tpl/template/select-option.tpl'),
ajaxSendLoadBefore: function(hdb) {
},
ajaxSendAfter:function (json) {
form.render('select');
}
});
// 桌面信息
systemCommonUtil.getSysDesttop(function (json) {
$("#desktop").html(getDataUseHandlebars(getFileContent('tpl/template/select-option.tpl'), json));
form.render('select');
});
function initLoadTable() {
table.render({
tableTree.render({
id: 'messageTable',
elem: '#messageTable',
method: 'post',
......@@ -50,30 +30,18 @@ layui.config({
limits: getLimits(),
limit: getLimit(),
cols: [[
{ title: systemLanguage["com.skyeye.serialNumber"][languageType], type: 'numbers' },
{ field: 'menuName', title: '菜单名称', width: 120, templet: function (d) {
return '<a lay-event="details" class="notice-title-click">' + d.menuName + '</a>';
}},
{ field: 'menuName', title: '菜单名称', width: 120 },
{ field: 'menuNameEn', title: '英文名称', width: 150 },
{ field: 'id', title: '图标', align: 'center', width: 60, templet: function (d) {
return systemCommonUtil.initIconShow(d);
}},
{ field: 'menuLevel', title: '菜单级别', width: 140, templet: function (d) {
if(d.parentId == '0'){
return "创世菜单";
} else {
return "子菜单-->" + d.menuLevel + "级子菜单";
}
{ field: 'orderNum', title: '排序', align: 'center', width: 80 },
{ field: 'menuLevel', title: '菜单类型', align: 'center', width: 100, templet: function (d) {
return d.menuLevel == 0 ? '父菜单' : '子菜单';
}},
{ field: 'desktopName', title: '所属桌面', width: 140},
{ field: 'desktopName', title: '所属桌面', width: 120 },
{ field: 'isShare', title: '共享', align: 'center', width: 80, templet: function (d) {
if(d.isShare == 0){
return '';
} else if (d.isShare == 1){
return '';
} else {
return '参数错误';
}
return d.isShare == 0 ? '' : '';
}},
{ field: 'menuParentName', title: '父菜单', width: 100 },
{ field: 'menuUrl', title: '菜单链接', width: 160 },
......@@ -81,14 +49,21 @@ layui.config({
{ field: 'createTime', title: systemLanguage["com.skyeye.createTime"][languageType], align: 'center', width: 150 },
{ field: 'lastUpdateName', title: systemLanguage["com.skyeye.lastUpdateName"][languageType], align: 'left', width: 120 },
{ field: 'lastUpdateTime', title: systemLanguage["com.skyeye.lastUpdateTime"][languageType], align: 'center', width: 150 },
{ title: systemLanguage["com.skyeye.operation"][languageType], fixed: 'right', align: 'center', width: 300, toolbar: '#tableBar'}
{ title: systemLanguage["com.skyeye.operation"][languageType], fixed: 'right', align: 'center', width: 320, toolbar: '#tableBar' }
]],
done: function(json) {
matchingLanguage();
initTableSearchUtil.initAdvancedSearch($("#messageTable")[0], json.searchFilter, form, "请输入菜单名称", function () {
tableTree.reload("messageTable", {page: {curr: 1}, where: getTableParams()});
});
}
}, {
keyId: 'id',
keyPid: 'parentId',
title: 'menuName',
});
table.on('tool(messageTable)', function (obj) {
tableTree.getTable().on('tool(messageTable)', function (obj) {
var data = obj.data;
var layEvent = obj.event;
if (layEvent === 'del') { // 删除
......@@ -122,19 +97,14 @@ layui.config({
//异步加载的方法
function onClickTree(event, treeId, treeNode) {
if(treeNode == undefined) {
parentId = "";
sysWinId = "";
} else {
parentId = treeNode.id;
sysWinId = treeNode.id;
}
loadTable();
}
/********* tree 处理 end *************/
// 刷新数据
$("body").on("click", "#reloadTable", function() {
loadTable();
});
// 删除
function del(data, obj) {
layer.confirm(systemLanguage["com.skyeye.deleteOperationMsg"][languageType], {icon: 3, title: systemLanguage["com.skyeye.deleteOperation"][languageType]}, function (index) {
......@@ -150,9 +120,9 @@ layui.config({
function details(data) {
rowId = data.id;
_openNewWindows({
url: "../../tpl/sysevemenu/sysevemenudetails.html",
url: "../../tpl/sysEveMenu/sysEveMenuDetails.html",
title: systemLanguage["com.skyeye.detailsPageTitle"][languageType],
pageId: "sysevemenudetails",
pageId: "sysEveMenuDetails",
area: ['90vw', '90vh'],
callBack: function (refreshCode) {
}});
......@@ -162,9 +132,9 @@ layui.config({
function edit(data) {
rowId = data.id;
_openNewWindows({
url: "../../tpl/sysevemenu/sysevemenuedit.html",
url: "../../tpl/sysEveMenu/sysEveMenuEdit.html",
title: systemLanguage["com.skyeye.editPageTitle"][languageType],
pageId: "sysevemenuedit",
pageId: "sysEveMenuEdit",
area: ['90vw', '90vh'],
callBack: function (refreshCode) {
winui.window.msg(systemLanguage["com.skyeye.successfulOperation"][languageType], {icon: 1, time: 2000});
......@@ -191,9 +161,9 @@ layui.config({
// 新增菜单
$("body").on("click", "#addBean", function() {
_openNewWindows({
url: "../../tpl/sysevemenu/sysevemenuadd.html",
url: "../../tpl/sysEveMenu/sysEveMenuAdd.html",
title: systemLanguage["com.skyeye.addPageTitle"][languageType],
pageId: "sysevemenuadd",
pageId: "sysEveMenuAdd",
area: ['90vw', '90vh'],
callBack: function (refreshCode) {
winui.window.msg(systemLanguage["com.skyeye.successfulOperation"][languageType], {icon: 1, time: 2000});
......@@ -215,28 +185,16 @@ layui.config({
}
form.render();
form.on('submit(formSearch)', function (data) {
if (winui.verifyForm(data.elem)) {
table.reloadData("messageTable", {page: {curr: 1}, where: getTableParams()});
}
return false;
$("body").on("click", "#reloadTable", function() {
loadTable();
});
function loadTable() {
table.reloadData("messageTable", {where: getTableParams()});
tableTree.reload("messageTable", {where: getTableParams()});
}
function getTableParams() {
return {
menuName: $("#menuName").val(),
menuUrl: $("#menuUrl").val(),
parentId: parentId,
menuLevel: $("#menuLevel").val(),
desktopId: $("#desktop").val(),
isShare: $("#isShare").val(),
parentMenuName: $("#parentMenuName").val()
};
return $.extend(true, {sysWinId: sysWinId}, initTableSearchUtil.getSearchValue("messageTable"));
}
exports('sysevemenulist', {});
exports('sysEveMenuList', {});
});
layui.config({
base: basePath,
version: skyeyeVersion
}).extend({
window: 'js/winui.window'
}).define(['window', 'table', 'jquery', 'winui', 'colorpicker', 'fileUpload'], function (exports) {
winui.renderColor();
layui.use(['form'], function (form) {
var index = parent.layer.getFrameIndex(window.name);
var $ = layui.$;
var colorpicker = layui.colorpicker;
var selOption = getFileContent('tpl/template/select-option.tpl');
var parentId = "0";
showGrid({
id: "showForm",
url: reqBasePath + "sys008",
params: {rowId: parent.rowId},
pagination: false,
template: $("#beanTemplate").html(),
ajaxSendLoadBefore: function(hdb) {
//是否为系统菜单
hdb.registerHelper("compare2", function(v1, options){
if(v1 == '1'){
return 'checked';
} else if (v1 == '2'){
return '';
} else {
return '';
}
});
hdb.registerHelper("compare3", function(v1, options){
if(v1 == '1'){
return 'true';
} else if (v1 == '2'){
return 'false';
} else {
return 'false';
}
});
//同步共享
hdb.registerHelper("compare4", function(v1, options){
if(v1 == '1'){
return 'checked';
} else if (v1 == '0'){
return '';
} else {
return '';
}
});
hdb.registerHelper("compare5", function(v1, options){
if(v1 == '1'){
return 'true';
} else if (v1 == '0'){
return 'false';
} else {
return 'false';
}
});
},
ajaxSendAfter:function (json) {
// 加载图标信息
systemCommonUtil.initEditIconChooseHtml('iconMation', form, colorpicker, 12, json.bean);
// 桌面信息
systemCommonUtil.getSysDesttop(function (data) {
// 加载账户数据
$("#desktop").html(getDataUseHandlebars(selOption, data));
$("#desktop").val(json.bean.desktopId);
form.render('select');
});
// 所属系统
showGrid({
id: "menuSysWinId",
url: reqBasePath + "querySysEveWinList",
params: {},
pagination: false,
method: "GET",
template: selOption,
ajaxSendLoadBefore: function(hdb) {},
ajaxSendAfter: function(j) {
$("#menuSysWinId").val(json.bean.sysWinId);
form.render('select');
}
});
//菜单级别
if(json.bean.menuLevel == '0'){
$("#parentIdBox").addClass("layui-hide");
$("input:radio[name=menuLevel][value=1]").attr("checked", true);
} else {
$("input:radio[name=menuLevel][value=2]").attr("checked", true);
//初始化父菜单
loadChildMenuAll(json.bean.parentId.split(','));
}
// 菜单类型
$("input:radio[name=menuType][value=" + json.bean.menuType + "]").attr("checked", true);
matchingLanguage();
form.render();
//菜单级别变化事件
form.on('radio(menuLevel)', function (data) {
var val = data.value;
if(val == '1'){//创世菜单
$("#parentIdBox").addClass("layui-hide");
} else if (val == '2'){
parentId = "0";
$("#lockParentSel").html("");
$("#parentIdBox").removeClass("layui-hide");
loadChildMenu();
} else {
winui.window.msg('状态值错误', {icon: 2, time: 2000});
}
});
//系统菜单同步
form.on('switch(isNecessary)', function (data) {
//同步开关值
$(data.elem).val(data.elem.checked);
});
//同步共享
form.on('switch(isShare)', function (data) {
//同步开关值
$(data.elem).val(data.elem.checked);
});
//父菜单变化事件
form.on('select(selectParent)', function(data) {
if (data.value != parentId){
if(isNull(data.value) || data.value == '请选择'){
layui.$(data.elem).parent('dd').nextAll().remove();
if(layui.$(data.elem).parent('dd').prev().children('select[class=menuParent]').length > 0){
parentId = layui.$(data.elem).parent('dd').prev().children('select[class=menuParent]')[0].value;
} else {
parentId = "0";
}
} else {
layui.$(data.elem).parent('dd').nextAll().remove();
parentId = data.value;
loadChildMenu();
}
}
});
form.on('submit(formEditMenu)', function (data) {
if (winui.verifyForm(data.elem)) {
var params = {
menuName: $("#menuName").val(),
menuNameEn: $("#menuNameEn").val(),
sysWinId: data.field.menuSysWinId,
desktopId: data.field.desktop,
menuUrl: $("#menuUrl").val(),
menuType: data.field.menuType,
id: parent.rowId,
};
// 获取图标信息
params = systemCommonUtil.getIconChoose(params);
if (!params["iconChooseResult"]) {
return false;
}
if (data.field.menuLevel == '1'){//创世菜单
params.parentId = '0';
} else if (data.field.menuLevel == '2'){//子菜单
var $menu = layui.$('.menuParent');
var str = "";
for(var i = 0; i < $menu.length; i++){
if (!isNull($menu[i].value) && $menu[i].value != '请选择'){
str += $menu[i].value + ",";
}
}
if(isNull(str)){//父菜单为空
winui.window.msg("请至少选择一级父菜单", {icon: 2, time: 2000});
return false;
} else {
params.parentId = str;
}
} else {
winui.window.msg('状态值错误', {icon: 2, time: 2000});
}
if($("#menuSysType").val() == 'true'){
params.menuSysType = '1';
} else {
params.menuSysType = '2';
}
if($("#isShare").val() == 'true'){
params.isShare = '1';
} else {
params.isShare = '0';
}
AjaxPostUtil.request({url: reqBasePath + "sys010", params: params, type: 'json', method: 'PUT', callback: function(json) {
parent.layer.close(index);
parent.refreshCode = '0';
}});
}
return false;
});
}
});
//初始化当前子菜单的父菜单
function loadChildMenuAll(pid){
if(pid.length > 0){
if (!isNull(pid[0])){
AjaxPostUtil.request({url: reqBasePath + "sys009", params: {parentId: parentId}, type: 'json', callback: function (json) {
var str = '<dd><select class="menuParent" lay-filter="selectParent" lay-search=""><option value="">请选择</option>';
for(var i = 0; i < json.rows.length; i++){
if(json.rows[i].id != parent.rowId){
if(json.rows[i].id != pid[0]){
str += '<option value="' + json.rows[i].id + '">' + json.rows[i].desktopName + '---------' + json.rows[i].menuName + '---------' + getMenuLevelName(json.rows[i].menuLevel) + '</option>';
} else {
str += '<option value="' + json.rows[i].id + '" selected>' + json.rows[i].desktopName + '---------' + json.rows[i].menuName + '---------' + getMenuLevelName(json.rows[i].menuLevel) + '</option>';
}
}
}
str += '</select></dd>';
$("#lockParentSel").append(str);
form.render('select');
parentId = pid[0];
pid.splice(0, 1);
loadChildMenuAll(pid);
}});
} else {
pid.splice(0, 1);
loadChildMenuAll(pid);
}
} else {
loadChildMenu()
}
}
//加载同级菜单
function loadChildMenu(){
AjaxPostUtil.request({url: reqBasePath + "sys009", params: {parentId: parentId}, type: 'json', callback: function (json) {
var str = '<dd><select class="menuParent" lay-filter="selectParent" lay-search=""><option value="">请选择</option>';
for(var i = 0; i < json.rows.length; i++){
if(json.rows[i].id != parent.rowId){
str += '<option value="' + json.rows[i].id + '">' + json.rows[i].desktopName + '---------' + json.rows[i].menuName + '---------' + getMenuLevelName(json.rows[i].menuLevel) + '</option>';
}
}
str += '</select></dd>';
$("#lockParentSel").append(str);
form.render('select');
}});
}
// 菜单图标选中事件
$("body").on("focus", "#menuIcon", function (e) {
systemCommonUtil.openSysEveIconChoosePage(function(sysIconChooseClass){
$("#menuIcon").val(sysIconChooseClass);
$("#iconShow").css({'color': 'white'});
$("#iconShow").attr("class", "fa fa-fw " + $("#menuIcon").val());
});
});
// 获取菜单级别
function getMenuLevelName(level){
if(level == '0'){
return "创世菜单";
} else {
return level + "级子菜单";
}
}
// 取消
$("body").on("click", "#cancle", function() {
parent.layer.close(index);
});
});
});
\ No newline at end of file
......@@ -9,76 +9,78 @@
<body>
<div style="margin:0 auto;padding:20px;">
<form class="layui-form" action="" id="showForm" autocomplete="off">
<div class="layui-form-item">
<div class="layui-form-item layui-col-xs6">
<label class="layui-form-label">菜单名称<i class="red">*</i></label>
<div class="layui-input-block">
<input type="text" id="menuName" name="menuName" win-verify="required" placeholder="请输入菜单名称" class="layui-input" />
</div>
</div>
<div class="layui-form-item">
<div class="layui-form-item layui-col-xs6">
<label class="layui-form-label">英文名称<i class="red">*</i></label>
<div class="layui-input-block">
<input type="text" id="menuNameEn" name="menuNameEn" win-verify="required" placeholder="请输入英文名称" class="layui-input" />
</div>
</div>
<div class="layui-form-item" id="iconMation">
<div class="layui-form-item layui-col-xs12" id="iconMation">
</div>
<div class="layui-form-item">
<label class="layui-form-label">所属桌面</label>
<div class="layui-input-block">
<select id="desktop" name="desktop" lay-filter="desktop" lay-search="" win-verify="required">
</select>
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">菜单地址<i class="red">*</i></label>
<div class="layui-input-block">
<input type="text" id="menuUrl" name="menuUrl" win-verify="required" placeholder="请输入菜单地址" class="layui-input" />
<div class="layui-form-mid layui-word-aux">如果是一级菜单,格式为:--<br>如果是子菜单,格式为:../../tpl/model/modellist.html</div>
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">所属系统<i class="red">*</i></label>
<div class="layui-form-item layui-col-xs12">
<label class="layui-form-label">菜单地址<i class="red">*</i></label>
<div class="layui-input-block">
<input type="text" id="menuUrl" name="menuUrl" win-verify="required" placeholder="请输入菜单地址" class="layui-input" />
<div class="layui-form-mid layui-word-aux">如果是一级菜单,格式为:--<br>如果是子菜单,格式为:../../tpl/model/modellist.html</div>
</div>
</div>
<div class="layui-form-item layui-col-xs6">
<label class="layui-form-label">所属桌面</label>
<div class="layui-input-block">
<select id="desktop" name="desktop" lay-filter="desktop" lay-search="" win-verify="required">
</select>
</div>
</div>
<div class="layui-form-item layui-col-xs6">
<label class="layui-form-label">所属服务<i class="red">*</i></label>
<div class="layui-input-block">
<select id="menuSysWinId" name="menuSysWinId" class="menuSysWinId" win-verify="required" lay-filter="selectMenuSysWinId" lay-search="">
</select>
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">菜单级别<i class="red">*</i></label>
<div class="layui-form-item layui-col-xs6">
<label class="layui-form-label">菜单类型<i class="red">*</i></label>
<div class="layui-input-block winui-radio">
<input type="radio" name="menuLevel" value="1" title="创世菜单" lay-filter="menuLevel" checked/>
<input type="radio" name="menuLevel" value="2" title="子菜单" lay-filter="menuLevel" />
<input type="radio" name="menuLevel" value="0" title="父菜单" lay-filter="menuLevel" checked/>
<input type="radio" name="menuLevel" value="1" title="子菜单" lay-filter="menuLevel" />
</div>
</div>
<div class="layui-form-item" id="parentIdBox">
<label class="layui-form-label">上级菜单<i class="red">*</i></label>
<div class="layui-form-item layui-col-xs6 layui-hide" id="parentIdBox">
<label class="layui-form-label">菜单<i class="red">*</i></label>
<div class="layui-input-block" id="lockParentSel">
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">菜单类型<i class="red">*</i></label>
<div class="layui-form-item layui-col-xs12">
<label class="layui-form-label">打开方式<i class="red">*</i></label>
<div class="layui-input-block winui-radio">
<input type="radio" name="menuType" value="html" title="当前页面打开" lay-filter="menuType" checked/>
<input type="radio" name="menuType" value="win" title="新窗口打开" lay-filter="menuType" />
</div>
</div>
<div class="layui-form-item">
<div class="layui-form-item layui-col-xs6">
<label class="layui-form-label">系统菜单<i class="red">*</i></label>
<div class="layui-input-block winui-switch">
<input id="menuSysType" name="menuSysType" lay-filter="isNecessary" type="checkbox" lay-skin="switch" lay-text="是|否" value="false" />
</div>
<div class="layui-input-block winui-radio">
<input type="radio" name="menuSysType" value="1" title="是" lay-filter="menuSysType" checked/>
<input type="radio" name="menuSysType" value="2" title="否" lay-filter="menuSysType" />
</div>
</div>
<div class="layui-form-item">
<div class="layui-form-item layui-col-xs6">
<label class="layui-form-label">同步共享<i class="red">*</i></label>
<div class="layui-input-block winui-switch">
<input id="isShare" name="isShare" lay-filter="isShare" type="checkbox" lay-skin="switch" lay-text="是|否" value="false" />
</div>
<div class="layui-input-block winui-radio">
<input type="radio" name="isShare" value="1" title="是" lay-filter="isShare" />
<input type="radio" name="isShare" value="0" title="否" lay-filter="isShare" checked/>
</div>
</div>
<div class="layui-form-item">
<div class="layui-form-item layui-col-xs12">
<div class="layui-input-block">
<button class="winui-btn" id="cancle"><language showName="com.skyeye.cancel"></language></button>
<button class="winui-btn" lay-submit lay-filter="formAddMenu"><language showName="com.skyeye.save"></language></button>
......@@ -89,7 +91,7 @@
<script src="../../assets/lib/layui/layui.js"></script>
<script src="../../assets/lib/layui/custom.js"></script>
<script type="text/javascript">
layui.config({base: '../../js/sysevemenu/'}).use('sysevemenuadd');
layui.config({base: '../../js/sysEveMenu/'}).use('sysEveMenuAdd');
</script>
</body>
</html>
\ No newline at end of file
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title></title>
<link href="../../assets/lib/layui/css/layui.css" rel="stylesheet" />
<link href="../../assets/lib/winui/css/winui.css" rel="stylesheet" />
</head>
<body>
<div style="padding:20px; margin:0 auto;">
<form class="layui-form" action="" id="showForm">
</form>
</div>
<script type="text/x-handlebars-template" id="beanTemplate">
{{#bean}}
<div class="layui-form-item layui-col-xs12">
<span class="hr-title">基本信息</span><hr>
</div>
<div class="layui-form-item layui-col-xs6">
<label class="layui-form-label">菜单名称</label>
<div class="layui-input-block ver-center">
{{menuName}}
</div>
</div>
<div class="layui-form-item layui-col-xs6">
<label class="layui-form-label">英文名称</label>
<div class="layui-input-block ver-center">
{{menuNameEn}}
</div>
</div>
<div class="layui-form-item layui-col-xs12">
<label class="layui-form-label">图标</label>
<div class="layui-input-block" id="icon" style="font-size: 60px; display: flex;">
</div>
</div>
<div class="layui-form-item layui-col-xs12">
<label class="layui-form-label">菜单地址</label>
<div class="layui-input-block ver-center">
{{menuUrl}}
</div>
</div>
<div class="layui-form-item layui-col-xs6">
<label class="layui-form-label">所属桌面</label>
<div class="layui-input-block ver-center">
{{desktopName}}
</div>
</div>
<div class="layui-form-item layui-col-xs6">
<label class="layui-form-label">所属服务</label>
<div class="layui-input-block ver-center">
{{sysWinName}}
</div>
</div>
<div class="layui-form-item layui-col-xs6">
<label class="layui-form-label">菜单类型</label>
<div class="layui-input-block ver-center" id="menuLevel">
</div>
</div>
<div class="layui-form-item layui-col-xs6">
<label class="layui-form-label">父菜单</label>
<div class="layui-input-block ver-center">
{{menuParentName}}
</div>
</div>
<div class="layui-form-item layui-col-xs12">
<label class="layui-form-label">打开方式</label>
<div class="layui-input-block ver-center">
{{menuType}}
</div>
</div>
<div class="layui-form-item layui-col-xs6">
<label class="layui-form-label">系统菜单</label>
<div class="layui-input-block ver-center">
{{menuSysTypeName}}
</div>
</div>
<div class="layui-form-item layui-col-xs6">
<label class="layui-form-label">同步共享</label>
<div class="layui-input-block ver-center">
{{isShareName}}
</div>
</div>
<div class="layui-form-item layui-col-xs12">
<span class="hr-title">使用信息</span><hr>
</div>
<div class="layui-form-item layui-col-xs6">
<label class="layui-form-label">角色使用量</label>
<div class="layui-input-block ver-center">
{{roleNum}}
</div>
</div>
<div class="layui-form-item layui-col-xs6">
<label class="layui-form-label">权限点数量</label>
<div class="layui-input-block ver-center">
{{authpointNum}}
</div>
</div>
<div class="layui-form-item layui-col-xs12">
<span class="hr-title">创建信息</span><hr>
</div>
<div class="layui-form-item layui-col-xs6">
<label class="layui-form-label">创建人</label>
<div class="layui-input-block ver-center">
{{userName}}
</div>
</div>
<div class="layui-form-item layui-col-xs6">
<label class="layui-form-label">创建时间</label>
<div class="layui-input-block ver-center">
{{createTime}}
</div>
</div>
{{/bean}}
</script>
<script src="../../assets/lib/layui/layui.js"></script>
<script src="../../assets/lib/layui/custom.js"></script>
<script type="text/javascript">
layui.config({base: '../../js/sysEveMenu/'}).use('sysEveMenuDetails');
</script>
</body>
</html>
\ No newline at end of file
......@@ -15,22 +15,29 @@
<script type="text/x-handlebars-template" id="beanTemplate">
{{#bean}}
<div class="layui-form-item">
<div class="layui-form-item layui-col-xs6">
<label class="layui-form-label">菜单名称<i class="red">*</i></label>
<div class="layui-input-block">
<input type="text" id="menuName" name="menuName" win-verify="required" placeholder="请输入菜单名称" class="layui-input" value="{{menuName}}" />
</div>
</div>
<div class="layui-form-item">
<div class="layui-form-item layui-col-xs6">
<label class="layui-form-label">英文名称<i class="red">*</i></label>
<div class="layui-input-block">
<input type="text" id="menuNameEn" name="menuNameEn" win-verify="required" placeholder="请输入英文名称" class="layui-input" value="{{menuNameEn}}" />
</div>
</div>
<div class="layui-form-item" id="iconMation">
<div class="layui-form-item layui-col-xs12" id="iconMation">
</div>
<div class="layui-form-item">
<div class="layui-form-item layui-col-xs12">
<label class="layui-form-label">菜单地址<i class="red">*</i></label>
<div class="layui-input-block">
<input type="text" id="menuUrl" name="menuUrl" win-verify="required" placeholder="请输入菜单地址" class="layui-input" value="{{menuUrl}}" />
<div class="layui-form-mid layui-word-aux">如果是一级菜单,格式为--<br>如果是子菜单,格式为../../tpl/model/modellist.html</div>
</div>
</div>
<div class="layui-form-item layui-col-xs6">
<label class="layui-form-label">所属桌面</label>
<div class="layui-input-block">
<select id="desktop" name="desktop" lay-filter="desktop" lay-search="" win-verify="required">
......@@ -38,53 +45,48 @@
</select>
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">菜单地址<i class="red">*</i></label>
<div class="layui-input-block">
<input type="text" id="menuUrl" name="menuUrl" win-verify="required" placeholder="请输入菜单地址" class="layui-input" value="{{menuUrl}}" />
<div class="layui-form-mid layui-word-aux">如果是一级菜单,格式为--<br>如果是子菜单,格式为../../tpl/model/modellist.html</div>
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">所属系统<i class="red">*</i></label>
<div class="layui-form-item layui-col-xs6">
<label class="layui-form-label">所属服务<i class="red">*</i></label>
<div class="layui-input-block">
<select id="menuSysWinId" name="menuSysWinId" class="menuSysWinId" win-verify="required" lay-filter="selectMenuSysWinId" lay-search="">
</select>
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">菜单级别<i class="red">*</i></label>
<div class="layui-form-item layui-col-xs6">
<label class="layui-form-label">菜单类型<i class="red">*</i></label>
<div class="layui-input-block winui-radio">
<input type="radio" name="menuLevel" value="1" title="创世菜单" lay-filter="menuLevel"/>
<input type="radio" name="menuLevel" value="2" title="子菜单" lay-filter="menuLevel"/>
<input type="radio" name="menuLevel" value="0" title="菜单" lay-filter="menuLevel"/>
<input type="radio" name="menuLevel" value="1" title="子菜单" lay-filter="menuLevel"/>
</div>
</div>
<div class="layui-form-item" id="parentIdBox">
<label class="layui-form-label">上级菜单<i class="red">*</i></label>
<div class="layui-form-item layui-col-xs6" id="parentIdBox">
<label class="layui-form-label">菜单<i class="red">*</i></label>
<div class="layui-input-block" id="lockParentSel">
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">菜单类型<i class="red">*</i></label>
<div class="layui-form-item layui-col-xs12">
<label class="layui-form-label">打开方式<i class="red">*</i></label>
<div class="layui-input-block winui-radio">
<input type="radio" name="menuType" value="html" title="当前页面打开" lay-filter="menuType"/>
<input type="radio" name="menuType" value="win" title="新窗口打开" lay-filter="menuType"/>
</div>
</div>
<div class="layui-form-item">
<div class="layui-form-item layui-col-xs6">
<label class="layui-form-label">系统菜单<i class="red">*</i></label>
<div class="layui-input-block winui-switch">
<input id="menuSysType" name="menuSysType" lay-filter="isNecessary" type="checkbox" lay-skin="switch" lay-text="是|否" {{#compare2 menuSysType}}{{/compare2}} value="{{#compare3 menuSysType}}{{/compare3}}" />
<div class="layui-input-block winui-radio">
<input type="radio" name="menuSysType" value="1" title="" lay-filter="menuSysType" checked/>
<input type="radio" name="menuSysType" value="2" title="" lay-filter="menuSysType" />
</div>
</div>
<div class="layui-form-item">
<div class="layui-form-item layui-col-xs6">
<label class="layui-form-label">同步共享<i class="red">*</i></label>
<div class="layui-input-block winui-switch">
<input id="isShare" name="isShare" lay-filter="isShare" type="checkbox" lay-skin="switch" lay-text="是|否" {{#compare4 isShare}}{{/compare4}} value="{{#compare5 isShare}}{{/compare5}}" />
<div class="layui-input-block winui-radio">
<input type="radio" name="isShare" value="1" title="" lay-filter="isShare" />
<input type="radio" name="isShare" value="0" title="" lay-filter="isShare" checked/>
</div>
</div>
<div class="layui-form-item">
<div class="layui-form-item layui-col-xs12">
<div class="layui-input-block">
<button class="winui-btn" id="cancle"><language showName="com.skyeye.cancel"></language></button>
<button class="winui-btn" lay-submit lay-filter="formEditMenu"><language showName="com.skyeye.save"></language></button>
......@@ -96,7 +98,7 @@
<script src="../../assets/lib/layui/layui.js"></script>
<script src="../../assets/lib/layui/custom.js"></script>
<script type="text/javascript">
layui.config({base: '../../js/sysevemenu/'}).use('sysevemenuedit');
layui.config({base: '../../js/sysEveMenu/'}).use('sysEveMenuEdit');
</script>
</body>
</html>
\ No newline at end of file
......@@ -9,51 +9,10 @@
<link href="../../assets/lib/layui/lay/modules/contextMenu/jquery.contextMenu.min.css" rel="stylesheet" />
</head>
<body>
<div class="txtcenter" style="margin:0 auto;padding-top:10px;">
<form class="layui-form layui-form-pane" action="" autocomplete="off">
<div class="layui-form-item">
<div class="layui-inline">
<label class="layui-form-label">菜单级别</label>
<div class="layui-input-inline">
<select id="menuLevel" name="menuLevel"></select>
</div>
<label class="layui-form-label">菜单名称</label>
<div class="layui-input-inline">
<input type="text" id="menuName" name="menuName" placeholder="请输入菜单名称" class="layui-input" />
</div>
<label class="layui-form-label">父菜单名称</label>
<div class="layui-input-inline">
<input type="text" id="parentMenuName" name="parentMenuName" placeholder="请输入父菜单名称" class="layui-input" />
</div>
<label class="layui-form-label">菜单链接</label>
<div class="layui-input-inline">
<input type="text" id="menuUrl" name="menuUrl" placeholder="请输入菜单链接" class="layui-input" />
</div>
<label class="layui-form-label">同步共享</label>
<div class="layui-input-inline">
<select id="isShare" name="isShare">
<option value="">全部</option>
<option value="1"></option>
<option value="0"></option>
</select>
</div>
<label class="layui-form-label">所属桌面</label>
<div class="layui-input-inline">
<select id="desktop" name="desktop" lay-filter="desktop" lay-search="">
</select>
</div>
<button type="reset" class="layui-btn layui-btn-primary list-form-search"><language showName="com.skyeye.reset"></language></button>
<button class="layui-btn list-form-search" lay-submit lay-filter="formSearch"><language showName="com.skyeye.search2"></language></button>
</div>
</div>
</form>
</div>
<div class="winui-toolbar">
<div class="winui-tool">
<button id="reloadTable" class="winui-toolbtn"><i class="fa fa-refresh" aria-hidden="true"></i><language showName="com.skyeye.refreshDataBtn"></language></button>
<button id="addBean" class="winui-toolbtn" auth="1552958167410"><i class="fa fa-plus" aria-hidden="true"></i><language showName="com.skyeye.addBtn"></language></button>
<button id="reloadTable" class="winui-toolbtn search-table-btn-right"><i class="fa fa-refresh" aria-hidden="true"></i><language showName="com.skyeye.refreshDataBtn"></language></button>
<button id="addBean" class="winui-toolbtn search-table-btn-right" auth="1552958167410"><i class="fa fa-plus" aria-hidden="true"></i><language showName="com.skyeye.addBtn"></language></button>
</div>
</div>
......@@ -84,6 +43,7 @@
{{# if(auth('1552957843505')){ }}
<a class="layui-btn layui-btn-xs" lay-event="authpoint">权限点</a>
{{# } }}
<a class="layui-btn layui-btn-xs" lay-event="details">详情</a>
</script>
<script src="../../assets/lib/layui/layui.js"></script>
......@@ -92,7 +52,7 @@
<script type="text/javascript" src="../../assets/lib/layui/lay/modules/contextMenu/jquery.contextMenu.min.js"></script>
<script type="text/javascript" src="../../assets/lib/layui/lay/modules/ztree/js/jquery.ztree.all.min.js"></script>
<script type="text/javascript">
layui.config({base: '../../js/sysevemenu/'}).use('sysevemenulist');
layui.config({base: '../../js/sysEveMenu/'}).use('sysEveMenuList');
</script>
</body>
</html>
\ No newline at end of file
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title></title>
<link href="../../assets/lib/layui/css/layui.css" rel="stylesheet" />
<link href="../../assets/lib/winui/css/winui.css" rel="stylesheet" />
</head>
<body>
<div style="padding:20px; margin:0 auto;">
<form class="layui-form" action="" id="showForm">
</form>
</div>
<script src="../../assets/lib/layui/layui.js"></script>
<script src="../../assets/lib/layui/custom.js"></script>
<script type="text/javascript">
layui.config({base: '../../js/sysevemenu/'}).use('sysevemenudetails');
</script>
</body>
</html>
\ No newline at end of file
{{#bean}}
<div class="layui-form-item layui-col-xs12">
<label class="layui-form-label">菜单名称:</label>
<div class="layui-input-block ver-center">
{{menuName}}
</div>
</div>
<div class="layui-form-item layui-col-xs12">
<label class="layui-form-label">英文名称:</label>
<div class="layui-input-block ver-center">
{{menuNameEn}}
</div>
</div>
<div class="layui-form-item layui-col-xs12">
<label class="layui-form-label">图标:</label>
<div class="layui-input-block">
<div class="layui-col-xs2" id="icon">
</div>
</div>
</div>
<div class="layui-form-item layui-col-xs12">
<label class="layui-form-label">所属桌面:</label>
<div class="layui-input-block ver-center">
{{desktopName}}
</div>
</div>
<div class="layui-form-item layui-col-xs12">
<label class="layui-form-label">菜单级别:</label>
<div class="layui-input-block ver-center" id="menuLevel">
</div>
</div>
<div class="layui-form-item layui-col-xs12">
<label class="layui-form-label">菜单地址:</label>
<div class="layui-input-block ver-center">
{{menuUrl}}
</div>
</div>
<div class="layui-form-item layui-col-xs6">
<label class="layui-form-label">角色使用量:</label>
<div class="layui-input-block ver-center">
{{roleNum}}
</div>
</div>
<div class="layui-form-item layui-col-xs6">
<label class="layui-form-label">权限点数量:</label>
<div class="layui-input-block ver-center">
{{authpointNum}}
</div>
</div>
<div class="layui-form-item layui-col-xs12">
<label class="layui-form-label">上级菜单:</label>
<div class="layui-input-block ver-center">
{{menuParentName}}
</div>
</div>
<div class="layui-form-item layui-col-xs12">
<label class="layui-form-label">菜单类型:</label>
<div class="layui-input-block ver-center">
{{menuType}}
</div>
</div>
<div class="layui-form-item layui-col-xs12">
<label class="layui-form-label">系统菜单:</label>
<div class="layui-input-block ver-center">
{{menuSysType}}
</div>
</div>
<div class="layui-form-item layui-col-xs12">
<label class="layui-form-label">同步共享:</label>
<div class="layui-input-block ver-center">
{{isShare}}
</div>
</div>
<div class="layui-form-item layui-col-xs6">
<label class="layui-form-label">创建人:</label>
<div class="layui-input-block ver-center">
{{userName}}
</div>
</div>
<div class="layui-form-item layui-col-xs6">
<label class="layui-form-label">创建时间:</label>
<div class="layui-input-block ver-center">
{{createTime}}
</div>
</div>
{{/bean}}
\ No newline at end of file
......@@ -87,7 +87,8 @@ layui.define(['jquery', 'layer', 'winui'], function (exports) {
childsmenuSysWinUrl = isNull(bean.sysWinUrl) ? '' : 'win-sysWinUrl="' + bean.sysWinUrl + '"',
childsmenuIcon = '';
//如果子菜单的所属桌面和父菜单的一样或者该菜单所属桌面不存在
if(bean.deskTopId === item.deskTopId || $('.winui-desktop').find("article[id='" + bean.deskTopId + "']").length == 0 || bean.deskTopId === 'winfixedpage00000000'){
if(bean.deskTopId === item.deskTopId || $('.winui-desktop').find("article[id='" + bean.deskTopId + "']").length == 0
|| bean.deskTopId === 'winfixedpage00000000'){
var childsicon;
var childsiconsmall;
var childsisFaIcon = "";
......
......@@ -126,9 +126,7 @@ layui.config({
winui.helper.addTool([{
tips: '主题设置',
icon: 'fa-paw',
click: function (e) {
winui.window.openTheme(loadBottomMenuIcon);
}
click: function (e) {winui.window.openTheme(loadBottomMenuIcon);}
}, {
tips: '添加便签',
icon: 'fa-pencil-square-o',
......@@ -172,9 +170,7 @@ layui.config({
}, {
tips: '消息中心',
icon: 'fa-list-ul',
click: function(e) {
winui.window.openSysNotice(loadBottomMenuIcon);
}
click: function(e) {winui.window.openSysNotice(loadBottomMenuIcon);}
}]);
// 读取本地便签
......@@ -638,10 +634,7 @@ layui.config({
vagueBgSrcValue: currentUserMation.winBgPicVagueValue
},
desktop: {//桌面菜单栏
options: {
url: reqBasePath + 'login004',
method: 'get',
}, //可以为{}
options: {url: reqBasePath + 'login004', method: 'get',},
done: function (desktopApp) {
desktopApp.onclick(function (id, elem) {
var item = $(elem);
......@@ -656,10 +649,7 @@ layui.config({
}
},
menu: {//左下角菜单栏右键效果
options: {
url: reqBasePath + 'login005',
method: 'get',
},
options: {url: reqBasePath + 'login005', method: 'get',},
done: function (menuItem) {
//监听开始菜单点击
menuItem.onclick(function (elem) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册