You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
435 lines
17 KiB
435 lines
17 KiB
//单点登录ip配置:
|
|
var _signInIp = "http://xjcamp.xfzn365.com/";
|
|
var usercode = "";
|
|
var orgId = "";
|
|
layui.use(['element', 'layer', 'jquery'], function () {
|
|
var element = layui.element;
|
|
$ = layui.$,
|
|
layer = layui.layer;
|
|
|
|
|
|
var fy_root_c_cookie = $.cookie("fy_root_cookie");
|
|
|
|
//console.log(fy_root_c_cookie);
|
|
|
|
if (fy_root_c_cookie != undefined) {
|
|
fy_root_c_cookie_json = JSON.parse(fy_root_c_cookie)
|
|
usercode = fy_root_c_cookie_json.usersUid;
|
|
} else {
|
|
layer.msg("您未登录或登录超时请登录后使用,页面将在3秒后关闭!", { icon: 0 });
|
|
setTimeout(function () { window.location.href = "/"; }, 3000);
|
|
return;
|
|
}
|
|
|
|
|
|
var height1 = $("#leftmain").height();
|
|
$("#rightmain").css({ height: height1 + "px" });
|
|
var height2 = $("#zhxfbtn1").outerHeight(true);
|
|
var height3 = $("#xfcon1").outerHeight(true);
|
|
$("#rightmain button").css({ height: height2 + "px" });
|
|
$("#rightmain").css({ paddingTop: height3 + "px" });
|
|
|
|
|
|
var usersUid = fy_root_c_cookie_json.usersUid;
|
|
var usersPwd = fy_root_c_cookie_json.usersPwd;
|
|
var usersName = fy_root_c_cookie_json.usersName;
|
|
$("#show_own").html(usersName);
|
|
|
|
|
|
//console.log(usersUid + "/" + usersPwd);
|
|
//$("#firepage").attr("src", "/clouds/signinCamp?usersUid=" + usersUid);
|
|
$("#firepage").attr("src", _signInIp + ":8377/clouds/signinCamp?usersUid=" + usersUid);
|
|
|
|
// _signInIp:8377/clouds/signin?usersUid=shzxfzd&usersPwd=fire119
|
|
|
|
|
|
orgId = fy_root_c_cookie_json.orgId;
|
|
if (orgId == "9668E5E778854EC3939246D6B6A9EFC1") {
|
|
$("#mhzy").css("display", "block");
|
|
}
|
|
//switch (orgId) {
|
|
// case "9668E5E778854EC3939246D6B6A9EFC1":
|
|
// case "004B3911BACE48E9905AE415358E7C8E":
|
|
// case "047C9FB7F52348D2B5E4F90744789525":
|
|
// case "21F21D0D68B84F87B9DC9307A546E2AB":
|
|
// case "4788B3867575414096BDF85659E90C38":
|
|
// case "4850196e820c4d37a490277c79aabe62":
|
|
// case "4FAB375807184081952870B9A9E73967":
|
|
// case "6DCA28BD635B4D99B5E023784FBB379D":
|
|
// case "92C61E9CAD044318B679553FA862EBAA":
|
|
// case "A4DB8804165944F3ABF1E4A18854AA0E":
|
|
// case "CEF5F24AC71E409DB396580F58243CC4":
|
|
// case "E35F09EE78C04EB0BC80DC7B11A9B0B9":
|
|
// case "F7E97C24D382492DA163791E15C142CE":
|
|
// $("#platform1").html("一体化综合管理平台");
|
|
// $("#platform2").html("日常管控");
|
|
// $("#platform3").html("执勤训练辅助系统");a
|
|
// //return false;
|
|
// default:
|
|
// //return false;
|
|
//}
|
|
|
|
//监听选项卡关闭,关闭到0,自动调转上一屏
|
|
element.on("tabDelete(work_index_bodyTab)", function (data) {
|
|
var tabs = $(".layui-tab-title li");
|
|
if (tabs.length == 0) {
|
|
show_and_work("show");
|
|
}
|
|
//console.log(tabtitle.length)
|
|
});
|
|
|
|
//菜单点击监听
|
|
$("li[class='clearfix']").each(function () {
|
|
var _this = $(this);
|
|
_this.click(function () {
|
|
var _on = _this.attr("on");
|
|
if (_on == "1") {
|
|
var _t = _this.attr("t");
|
|
if (_t == "2") {
|
|
var _url = _this.attr("url");
|
|
if (_url.indexOf("null") > -1) {
|
|
layer.tips("<span style='color:#000000'>监管用户暂时不提供“消防物联管理”访问,请关注版本更新。</span>", _this, { tips: [2, "#fff"] });
|
|
return false;
|
|
}
|
|
window.open(_url);
|
|
} else {
|
|
var _url = _this.attr("url");
|
|
var _id = _this.attr("id");
|
|
var _text = _this.find(".cname").html();
|
|
show_and_work("work");
|
|
menuOpt(_url, _t, _id, _text);
|
|
}
|
|
//console.log(_on+"-------"+_t+"------"+_url+"----"+_id)
|
|
} else {
|
|
layer.tips("<span style='color:#000000'>暂时不能访问,请关注版本更新。</span>", _this, { tips: [2, "#fff"] });
|
|
return false;
|
|
}
|
|
});
|
|
});
|
|
//返回第一屏
|
|
$("#section_show_return").click(function () {
|
|
show_and_work("show");
|
|
});
|
|
$("#section_show_return1").click(function () {
|
|
test("show");
|
|
});
|
|
window.addEventListener('message', function (event) {
|
|
test("show");
|
|
})
|
|
|
|
//几个按钮
|
|
$("a[id$='_admin']").click(function () {
|
|
window.location.href = ctx + "/index/admin";
|
|
});
|
|
$("a[id$='_pwd']").each(function () {
|
|
$(this).click(function (e) {
|
|
var x = e.originalEvent.x || e.originalEvent.layerX || 0;
|
|
var y = e.originalEvent.y || e.originalEvent.layerY || 0;
|
|
x += 10; y += 10;
|
|
layer.open({
|
|
type: 1,
|
|
title: false,
|
|
closeBtn: false,
|
|
offset: [y, x],
|
|
area: "auto",
|
|
shade: 0.3,
|
|
//id:''//设定一个id,防止重复弹出
|
|
btn: ["提交新密码", "取消"],
|
|
btnAlign: "c",
|
|
//move:true,//false关闭拖拽/默认.layui-layer-title可不写
|
|
content: "<div style=\"padding:20px;line-height:22px;background-color:#3352AF;color:#fff;font-weight:300;font-size:16px;\"><input type=\"password\" id=\"npwd\" placeholder=\"请输入您的新密码\" autocomplete=\"off\" style=\"font-size:16px;height:30px;line-height:30px;text-align:center;\"/></div>",
|
|
yes: function (index, layero) {
|
|
var npwd = $("#npwd").val();
|
|
if (npwd == "") {
|
|
$("#npwd").focus();
|
|
return false;
|
|
}
|
|
$.ajax({
|
|
type: "post",
|
|
url: "../ashx/SysUserHandler.ashx",
|
|
data: { Action: "Edit", usersUid: usersUid, usersPwd: npwd },
|
|
dataType: "json",
|
|
success: function (data) {
|
|
if (data.code == 1) {
|
|
layer.close(index);
|
|
layer.msg(data.msg + " 请退出重新登录!", { time: 3000 });
|
|
}
|
|
else {
|
|
layer.close(index);
|
|
layer.msg(data.msg, { time: 3000 });
|
|
}
|
|
}
|
|
});
|
|
}
|
|
});
|
|
});
|
|
});
|
|
$("a[id$='_own']").click(function (e) {
|
|
var _html = "<div style=\"padding:30px;background-color:#3352AF;color:#fff;font-weight:300;\">" +
|
|
"<input type=\"text\" id=\"index_newUsersName\" placeholder=\"姓名\" class=\"layui-input\" style=\"width:360px;margin-bottom:20px;\"/>" +
|
|
"<input type=\"text\" id=\"index_newUsersTel\" placeholder=\"电话\" class=\"layui-input\" style=\"width:360px;margin-bottom:20px;\"/>" +
|
|
"<input type=\"text\" id=\"index_newUsersEmail\" placeholder=\"邮箱\" class=\"layui-input\" style=\"width:360px;\"/>" +
|
|
"</div>";
|
|
layer.open({
|
|
type: 1,
|
|
title: false,
|
|
closeBtn: false,
|
|
//offset:"r",
|
|
area: ["420px", "auto"],
|
|
shade: 0.3,
|
|
//id:''//设定一个id,防止重复弹出
|
|
btn: ["确定", "取消"],
|
|
btnAlign: "c",
|
|
content: _html,
|
|
success: function () {
|
|
$.ajax({
|
|
type: "post",
|
|
url: "../ashx/SysUserHandler.ashx",
|
|
|
|
data: { Action: "UserInfo", usersUid: usersUid },
|
|
dataType: "json",
|
|
success: function (data) {
|
|
console.log(data);
|
|
$("#index_newUsersName").val(data.data.USERS_NAME);
|
|
$("#index_newUsersTel").val(data.data.USERS_MOBILE);
|
|
$("#index_newUsersEmail").val(data.data.USERS_EMAIL);
|
|
}
|
|
});
|
|
},
|
|
yes: function (index) {
|
|
var usersName = $("#index_newUsersName");
|
|
if (usersName.val() == "") {
|
|
usersName.focus();
|
|
layer.tips("<span style='color:#000000;'>请输入姓名</span>", "#index_newUsersName", { tips: [2, '#ffffff'] });
|
|
return false;
|
|
}
|
|
var usersTel = $("#index_newUsersTel");
|
|
if (usersTel.val() == "") {
|
|
usersTel.focus();
|
|
layer.tips("<span style='color:#000000;'>请输入电话</span>", "#index_newUsersTel", { tips: [2, '#ffffff'] });
|
|
return false;
|
|
}
|
|
var usersEmail = $("#index_newUsersEmail");
|
|
if (usersEmail.val() == "") {
|
|
usersEmail.focus();
|
|
layer.tips("<span style='color:#000000;'>请输入邮箱</span>", "#index_newUsersEmail", { tips: [2, '#ffffff'] });
|
|
return false;
|
|
}
|
|
$.ajax({
|
|
type: "post",
|
|
url: "../ashx/SysUserHandler.ashx",
|
|
data: { Action: "Edit", usersUid: usersUid, UsersName: usersName.val(), UsersEmail: usersEmail.val(), UsersMobile: usersTel.val() },
|
|
dataType: "json",
|
|
success: function (data) {
|
|
if (data.code == 1) {
|
|
$("#show_own").html(usersName.val());
|
|
|
|
layer.msg("修改成功", { time: 2000 });
|
|
layer.close(index);
|
|
}
|
|
}
|
|
});
|
|
}
|
|
});
|
|
});
|
|
$("a[id$='_out']").each(function () {
|
|
$(this).click(function () {
|
|
layer.open({
|
|
type: 1,
|
|
title: false,
|
|
closeBtn: false,
|
|
area: "auto",
|
|
shade: 0.3,
|
|
//id:''//设定一个id,防止重复弹出
|
|
btn: ["确定", "取消"],
|
|
btnAlign: "c",
|
|
//move:true,//false关闭拖拽/默认.layui-layer-title可不写
|
|
content: "<div style=\"padding:40px;line-height:22px;background-color:#3352AF;color:#fff;font-weight:300;font-size:16px;\">退出云平台?<br/><br/>点击“确定”退出,否者点击“取消”返回。<br/><br/>确定退出?</div>",
|
|
yes: function (index, layero) {
|
|
//跳转退出
|
|
window.location.href = "/";
|
|
}
|
|
});
|
|
});
|
|
});
|
|
});
|
|
var menuOpt = function(url,t,id,text){
|
|
//console.log(url+"======"+t+"======"+id+"======"+text);
|
|
url += "/" + text + "/" + t;
|
|
//console.log(url);
|
|
var flag = true;
|
|
var _layTab = $(".layui-tab-title li[lay-id="+id+"]");
|
|
if(_layTab.length > 0){
|
|
flag = false;
|
|
}
|
|
if(flag){
|
|
element.tabAdd("work_index_bodyTab",{
|
|
title:"<i class=\"icon_title\"></i>"+text,
|
|
content:"<iframe src=\""+url+"\" data-id=\""+id+"\"></frame>",
|
|
id:id
|
|
});
|
|
}
|
|
element.tabChange("work_index_bodyTab",id);
|
|
element.render("tab","work_index_bodyTab");
|
|
}
|
|
var show_and_work = function(t){
|
|
if(t == "work"){
|
|
$(".section_wrap1")
|
|
.add("class","section_wrap1")
|
|
.addClass(function(){
|
|
return "put_section_work";
|
|
});
|
|
}
|
|
if(t == "show"){
|
|
$(".section_wrap1")
|
|
.attr("class","section_wrap1")
|
|
.addClass(function(){
|
|
return "put_section_show";
|
|
});
|
|
}
|
|
}
|
|
|
|
var test = function (t) {
|
|
if (t == "work") {
|
|
|
|
var issuper=JSON.parse(window.sessionStorage.getItem("userInfo")).IS_SUPER;
|
|
if (issuper.indexOf("2") == -1) {
|
|
layer.tips("<span style='color:#000000'>您暂时没有相关访问权限,如要访问请联系管理员!</span>", "#zhxf", { tips: [2, "#fff"] });
|
|
return false;
|
|
}
|
|
|
|
$(".section_wrap")
|
|
.add("class", "section_wrap")
|
|
.addClass(function () {
|
|
return "put_section_work1";
|
|
});
|
|
//window.open("/clouds/signinCamp?usersUid=aksxfzd");
|
|
}
|
|
if (t == "show") {
|
|
$(".section_wrap")
|
|
.attr("class", "section_wrap")
|
|
.addClass(function () {
|
|
return "put_section_show1";
|
|
});
|
|
}
|
|
}
|
|
function camp() { //三维模型
|
|
if (window.sessionStorage.getItem("userInfo") == undefined) {
|
|
layer.msg("您未登录或登录超时请登录后使用,页面将在3秒后关闭!", { icon: 0 });
|
|
setTimeout(function () { window.location.href = "/"; }, 3000);
|
|
return;
|
|
}
|
|
|
|
var issuper = JSON.parse(window.sessionStorage.getItem("userInfo")).IS_SUPER;
|
|
if (issuper.indexOf("4") == -1) {
|
|
layer.tips("<span style='color:#000000'>您暂时没有相关访问权限,如要访问请联系管理员!</span>", "#szyq", { tips: [2, "#fff"] });
|
|
return false;
|
|
}
|
|
window.open("/visualization/3Dvisualization");
|
|
//window.open(_signInIp + ':8072');
|
|
}
|
|
|
|
function building() { //数字政工
|
|
if (window.sessionStorage.getItem("userInfo") == undefined) {
|
|
layer.msg("您未登录或登录超时请登录后使用,页面将在3秒后关闭!", { icon: 0 });
|
|
setTimeout(function () { window.location.href = "/"; }, 3000);
|
|
return;
|
|
}
|
|
|
|
var issuper = JSON.parse(window.sessionStorage.getItem("userInfo")).IS_SUPER;
|
|
if (issuper.indexOf("1") == -1) {
|
|
layer.tips("<span style='color:#000000'>您暂时没有相关访问权限,如要访问请联系管理员!</span>", "#zhdj", { tips: [2, "#fff"] });
|
|
return false;
|
|
}
|
|
window.open(_signInIp + ':7080/political/html/login.html?usersUid=' + usercode);
|
|
}
|
|
|
|
function mhzy() { //灭火资源
|
|
|
|
if (orgId == "9668E5E778854EC3939246D6B6A9EFC1") {
|
|
if (window.sessionStorage.getItem("userInfo") == undefined) {
|
|
layer.msg("您未登录或登录超时请登录后使用,页面将在3秒后关闭!", { icon: 0 });
|
|
setTimeout(function () { window.location.href = "/"; }, 3000);
|
|
return;
|
|
}
|
|
|
|
var issuper = JSON.parse(window.sessionStorage.getItem("userInfo")).IS_SUPER;
|
|
if (issuper.indexOf("3") == -1) {
|
|
layer.tips("<span style='color:#000000'>您暂时没有相关访问权限,如要访问请联系管理员!</span>", "#mhzy", { tips: [2, "#fff"] });
|
|
return false;
|
|
}
|
|
|
|
window.open(_signInIp + ':8071/index.html');
|
|
} else if (orgId == "E35F09EE78C04EB0BC80DC7B11A9B0B9")
|
|
{
|
|
if (window.sessionStorage.getItem("userInfo") == undefined) {
|
|
layer.msg("您未登录或登录超时请登录后使用,页面将在3秒后关闭!", { icon: 0 });
|
|
setTimeout(function () { window.location.href = "/"; }, 3000);
|
|
return;
|
|
}
|
|
|
|
var issuper = JSON.parse(window.sessionStorage.getItem("userInfo")).IS_SUPER;
|
|
if (issuper.indexOf("3") == -1) {
|
|
layer.tips("<span style='color:#000000'>您暂时没有相关访问权限,如要访问请联系管理员!</span>", "#mhzy", { tips: [2, "#fff"] });
|
|
return false;
|
|
}
|
|
|
|
window.open(_signInIp + ':8071/index.html');
|
|
}
|
|
else {
|
|
|
|
layer.msg("功能暂未开放!");
|
|
}
|
|
|
|
|
|
}
|
|
|
|
function rcgl() { //一体化综合平台
|
|
if (window.sessionStorage.getItem("userInfo") == undefined) {
|
|
layer.msg("您未登录或登录超时请登录后使用,页面将在3秒后关闭!", { icon: 0 });
|
|
setTimeout(function () { window.location.href = "/"; }, 3000);
|
|
return;
|
|
}
|
|
|
|
var issuper = JSON.parse(window.sessionStorage.getItem("userInfo")).IS_SUPER;
|
|
if (issuper.indexOf("5") == -1) {
|
|
layer.tips("<span style='color:#000000'>您暂时没有相关访问权限,如要访问请联系管理员!</span>", "#rcgl", { tips: [2, "#fff"] });
|
|
return false;
|
|
}
|
|
|
|
switch (orgId) {
|
|
case "fc21743dcaad4225b8be141dd47d8a2f":
|
|
case "35B405471BCD45D89469E0E308A24A7D":
|
|
case "35B405471BCD45D89469E0E308A24A7D1":
|
|
case "51AA40BE92F9473993C4ED354505405D":
|
|
case "5C202E426CD6479CB976B1D0FBAE6DFA":
|
|
case "5C202E426CD6479CB976B1D0FBAE6DFA1":
|
|
case "937C4086FD724E7EA5F0C4AB2624715F":
|
|
case "937C4086FD724E7EA5F0C4AB2624715F1":
|
|
case "9A2F944352EE49859B1FB16E81CEA81E":
|
|
case "9A2F944352EE49859B1FB16E81CEA81E1":
|
|
case "AA60A79F9E6C449C93D3F5C0860974FD":
|
|
case "AA60A79F9E6C449C93D3F5C0860974FD1":
|
|
case "ACCD0F318DCA4AA2A26740161E8CA736":
|
|
case "B778AF7A50DB468A80191E8D97220F73":
|
|
case "B778AF7A50DB468A80191E8D97220F731":
|
|
case "BAF54D16690049578A3DDB39186E937F":
|
|
case "BAF54D16690049578A3DDB39186E937F1":
|
|
case "C2DFE6A84506471BAB4B5D4737100EC1":
|
|
case "C2DFE6A84506471BAB4B5D4737100EC11":
|
|
case "CD4665674755419A8C229E5824AF64E5":
|
|
case "769566838f5e4c19abbd6e520d057311":
|
|
case "C34B5244B81A471484A63B33924B473B":
|
|
case "bbc2eec2533241058e5be16e1d3a1d6f":
|
|
case "E3870962FEBD447DBA17D1F66E5C9AA8":
|
|
case "405ec4bc325e40e7af6d4b3fab1bbaff":
|
|
case "8bfc412d603a4486ae1247d6f8f253f0":
|
|
case "986026d8fbbf44bca4364c59fb4ad074":
|
|
case "EF10F8E61CB54BBBA99288532B1F7A60":
|
|
case "d8a3e113c80d46249dacafa72a64a2b8":
|
|
//window.open(_signInIp + ':8075/Index/index.html');
|
|
window.open('index.html');
|
|
default:
|
|
window.open('index.html');
|
|
}
|
|
}
|