|
@@ -5,6 +5,10 @@
|
|
|
*/
|
|
|
/** 页面初始化 */
|
|
|
$(function () {
|
|
|
+ //弹出层样式
|
|
|
+ layer.config({
|
|
|
+ skin: 'demo-class'
|
|
|
+ });
|
|
|
adjustBlock();
|
|
|
getPermission();
|
|
|
});
|
|
@@ -17,30 +21,36 @@ function getPermission() {
|
|
|
if(result && result.length > 0) {
|
|
|
for(var i=0; i <result.length;i++) {
|
|
|
var obj = result[i];
|
|
|
- //console.info(obj.attributes.url);
|
|
|
- var img = $("#"+obj.attributes.code).find("img")[0];
|
|
|
- $(img).css('cursor', "pointer");
|
|
|
- $(img).attr('src', basePath + "/" +obj.attributes.icon2);
|
|
|
- $(img).click({top: obj}, function(event){
|
|
|
- var obj1 = event.data.top;
|
|
|
- window.open(basePath+obj1.attributes.url);
|
|
|
- });
|
|
|
- $(img).mouseover({top: obj},function(event){
|
|
|
- var obj1 = event.data.top;
|
|
|
- var sIndex = obj1.attributes.icon2.lastIndexOf("/");
|
|
|
- var pIndex = obj1.attributes.icon2.lastIndexOf(".");
|
|
|
- var filename = obj1.attributes.icon2.substr(sIndex+1, pIndex - sIndex - 1);
|
|
|
- var path = obj1.attributes.icon2.substr(0, sIndex+1);
|
|
|
- console.info(filename);
|
|
|
- console.info(path);
|
|
|
- this.src = basePath + "/" + path + filename + "_over.png";
|
|
|
- });
|
|
|
- $(img).mouseout({top: obj},function(event){
|
|
|
- var obj1 = event.data.top;
|
|
|
- this.src = basePath + "/" +obj1.attributes.icon2;
|
|
|
- });
|
|
|
- // 获取二级菜单
|
|
|
- getMenus(obj.id, obj.attributes.code);
|
|
|
+ if("sys" == obj.attributes.code) {
|
|
|
+ $("#imgSys").css("display","inline");
|
|
|
+ $("#imgSys").click({top: obj}, function(event){
|
|
|
+ var obj1 = event.data.top;
|
|
|
+ window.open(basePath+obj1.attributes.url);
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ var img = $("#"+obj.attributes.code).find("img")[0];
|
|
|
+ $(img).css('cursor', "pointer");
|
|
|
+ $(img).attr('src', basePath + "/" +obj.attributes.icon2);
|
|
|
+ $(img).click({top: obj}, function(event){
|
|
|
+ var obj1 = event.data.top;
|
|
|
+ window.open(basePath+obj1.attributes.url);
|
|
|
+ });
|
|
|
+ // 鼠标移入一出事件
|
|
|
+ $(img).mouseover({top: obj},function(event){
|
|
|
+ var obj1 = event.data.top;
|
|
|
+ var sIndex = obj1.attributes.icon2.lastIndexOf("/");
|
|
|
+ var pIndex = obj1.attributes.icon2.lastIndexOf(".");
|
|
|
+ var filename = obj1.attributes.icon2.substr(sIndex+1, pIndex - sIndex - 1);
|
|
|
+ var path = obj1.attributes.icon2.substr(0, sIndex+1);
|
|
|
+ this.src = basePath + "/" + path + filename + "_over.png";
|
|
|
+ });
|
|
|
+ $(img).mouseout({top: obj},function(event){
|
|
|
+ var obj1 = event.data.top;
|
|
|
+ this.src = basePath + "/" +obj1.attributes.icon2;
|
|
|
+ });
|
|
|
+ // 获取二级菜单
|
|
|
+ getMenus(obj.id, obj.attributes.code);
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}, 'json');
|
|
@@ -96,6 +106,9 @@ function openSubPage(code, url, pcode) {
|
|
|
if(code == "skyView") {
|
|
|
$("#aLink").attr("href", url);
|
|
|
$("#spanId").click();
|
|
|
+ } if(code == "adsb") {
|
|
|
+ $("#aLink").attr("href", url);
|
|
|
+ $("#spanId").click();
|
|
|
} else if(code == "cxw") {
|
|
|
window.open(url);
|
|
|
} else if(code == "hsais") {
|
|
@@ -134,4 +147,15 @@ function menuMouseOver(obj) {
|
|
|
|
|
|
function menuMouseOut(obj) {
|
|
|
$(obj).removeClass("h_menudivmouse");
|
|
|
-};
|
|
|
+};
|
|
|
+
|
|
|
+function changePwd() {
|
|
|
+ layer.open({
|
|
|
+ type: 2,
|
|
|
+ title: "修改密码",
|
|
|
+ shadeClose: false,
|
|
|
+ shade: 0.1,
|
|
|
+ area: ['360px', '320px'],
|
|
|
+ content: basePath + '/userManage/pwd'
|
|
|
+ });
|
|
|
+}
|