|
|
|
@ -22,7 +22,7 @@ layui.define(['message', 'table', 'jquery', 'element', 'yaml', 'form', 'tab', 'm
|
|
|
|
|
var msgInstance;
|
|
|
|
|
var body = $('body');
|
|
|
|
|
|
|
|
|
|
var pearAdmin = new function () {
|
|
|
|
|
var pearAdmin = new function () {
|
|
|
|
|
|
|
|
|
|
var configType = 'yml';
|
|
|
|
|
var configPath = 'pear.config.yml';
|
|
|
|
@ -100,44 +100,14 @@ layui.define(['message', 'table', 'jquery', 'element', 'yaml', 'form', 'tab', 'm
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
this.bodyRender = function (param) {
|
|
|
|
|
this.bodyRender = function(param) {
|
|
|
|
|
|
|
|
|
|
body.on("click", ".refresh", function () {
|
|
|
|
|
body.on("click", ".refresh", function() {
|
|
|
|
|
refresh();
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
if (isMuiltTab(param) === "true" || isMuiltTab(param) === true) {
|
|
|
|
|
|
|
|
|
|
var indexTabData = {};
|
|
|
|
|
// $.ajax({
|
|
|
|
|
// type: "GET",
|
|
|
|
|
// url: "/dsBase/gtzz/getWhiceRole",
|
|
|
|
|
// async: false,
|
|
|
|
|
// success: function (res) {
|
|
|
|
|
// var indexHref = 'html/pages/welcome.html';
|
|
|
|
|
// var _id = "indexPage";
|
|
|
|
|
//
|
|
|
|
|
// if (param.other.report) {
|
|
|
|
|
// indexHref = 'view/tb/school/task_list_p.html?is_finish=0';
|
|
|
|
|
// _id = "10";
|
|
|
|
|
// } else {
|
|
|
|
|
// if (res.role_id == 232) {
|
|
|
|
|
// indexHref = 'html/pages/projectManagement/zbzx/index.html';
|
|
|
|
|
// } else if (res.role_id == 234 || res.role_id === 243) {
|
|
|
|
|
// indexHref = 'html/pages/projectManagement/xx/index.html';
|
|
|
|
|
// }
|
|
|
|
|
// }
|
|
|
|
|
//
|
|
|
|
|
// indexTabData = {
|
|
|
|
|
// id: _id,
|
|
|
|
|
// url: indexHref,
|
|
|
|
|
// title: param.tab.index.title,
|
|
|
|
|
// close: false
|
|
|
|
|
// }
|
|
|
|
|
//
|
|
|
|
|
// }
|
|
|
|
|
// });
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
bodyTab = pearTab.render({
|
|
|
|
|
elem: 'content',
|
|
|
|
|
roll: true,
|
|
|
|
@ -148,13 +118,18 @@ layui.define(['message', 'table', 'jquery', 'element', 'yaml', 'form', 'tab', 'm
|
|
|
|
|
index: 0,
|
|
|
|
|
tabMax: param.tab.max,
|
|
|
|
|
preload: param.tab.preload,
|
|
|
|
|
closeEvent: function (id) {
|
|
|
|
|
closeEvent: function(id) {
|
|
|
|
|
sideMenu.selectItem(id);
|
|
|
|
|
},
|
|
|
|
|
data: [indexTabData],
|
|
|
|
|
success: function (id) {
|
|
|
|
|
data: [{
|
|
|
|
|
id: param.tab.index.id,
|
|
|
|
|
url: param.tab.index.href,
|
|
|
|
|
title: param.tab.index.title,
|
|
|
|
|
close: false
|
|
|
|
|
}],
|
|
|
|
|
success: function(id) {
|
|
|
|
|
if (param.tab.session) {
|
|
|
|
|
setTimeout(function () {
|
|
|
|
|
setTimeout(function() {
|
|
|
|
|
sideMenu.selectItem(id);
|
|
|
|
|
bodyTab.positionTab();
|
|
|
|
|
}, 500)
|
|
|
|
@ -162,7 +137,7 @@ layui.define(['message', 'table', 'jquery', 'element', 'yaml', 'form', 'tab', 'm
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
bodyTab.click(function (id) {
|
|
|
|
|
bodyTab.click(function(id) {
|
|
|
|
|
if (!param.tab.keepState) {
|
|
|
|
|
bodyTab.refresh(false);
|
|
|
|
|
}
|
|
|
|
@ -170,7 +145,7 @@ layui.define(['message', 'table', 'jquery', 'element', 'yaml', 'form', 'tab', 'm
|
|
|
|
|
sideMenu.selectItem(id);
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
sideMenu.click(function (dom, data) {
|
|
|
|
|
sideMenu.click(function(dom, data) {
|
|
|
|
|
bodyTab.addTabOnly({
|
|
|
|
|
id: data.menuId,
|
|
|
|
|
title: data.menuTitle,
|
|
|
|
@ -181,6 +156,7 @@ layui.define(['message', 'table', 'jquery', 'element', 'yaml', 'form', 'tab', 'm
|
|
|
|
|
compatible();
|
|
|
|
|
})
|
|
|
|
|
} else {
|
|
|
|
|
console.log(param);
|
|
|
|
|
bodyFrame = pearFrame.render({
|
|
|
|
|
elem: 'content',
|
|
|
|
|
title: '首页',
|
|
|
|
@ -189,7 +165,7 @@ layui.define(['message', 'table', 'jquery', 'element', 'yaml', 'form', 'tab', 'm
|
|
|
|
|
height: '100%'
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
sideMenu.click(function (dom, data) {
|
|
|
|
|
sideMenu.click(function(dom, data) {
|
|
|
|
|
bodyFrame.changePage(data.menuUrl, true);
|
|
|
|
|
compatible()
|
|
|
|
|
})
|
|
|
|
|