$(function () { var sys_timer = setInterval(updateTime, 1000); //卫星影像资源 satelliteTop(); //行业服务应用 Industry(); //卫星影像资源下 // satelliteBom(); //卫星影像处理 Handle(); //窗口改变事件 防止屏幕拉小出现滚动条后再还原出现页面布局错误 $(window).resize(function () { $('body,html').animate({ 'scrollTop': 0 }, 0); }); //点击事件 meauClick(); //显示登录 DisplayLogin(); }) //时间实时加载 function updateTime() { var cd = new Date(); $('.sys_date').find('.time').text(zeroPadding(cd.getHours(), 2) + ':' + zeroPadding(cd.getMinutes(), 2) + ':' + zeroPadding(cd.getSeconds(), 2)); $('.sys_date').find('.date').text(zeroPadding(cd.getFullYear(), 4) + '-' + zeroPadding(cd.getMonth()+1, 2) + '-' + zeroPadding(cd.getDate(), 2)); }; function zeroPadding(num, digit) { var zero = ''; for(var i = 0; i < digit; i++) { zero += '0'; } return (zero + num).slice(-digit); } //卫星影像资源 function satelliteTop() { $.ajax({ url: './src/config/satelliteA.json', dataType: "json", //返回格式为json async: true, //请求是否异步,默认为异步,这也是ajax重要特性 type: "GET", //请求方式 success: function (data) { if(!data) return; var title = []; var res = []; var percent=[]; for(var i=0,l=data.length;i: {c}%" // }, // legend: { // orient: 'vertical', // left: 10, // data: ['直接访问', '邮件营销', '联盟广告', '视频广告', '搜索引擎', "sfd"] // }, // color: ['#00a1e4', '#1efe3b', '#ffc600', '#ff7e00','#ffffff','#f0f0f0'], // title: { // text: '覆盖率', // left: 'center', // top: '45%', // left: '23%', // textStyle: { // color: '#fff', // fontSize: 30, // align: 'center' // } // }, // series: [ // { // name: '', // type: 'pie', // radius: ['50%', '70%'], // avoidLabelOverlap: false, // center: ["35%", "53%"], // label: { // normal: { // show: false, // position: 'center' // }, // emphasis: { // show: false, // textStyle: { // fontSize: '30', // fontWeight: 'bold' // } // } // }, // labelLine: { // normal: { // show: false // } // }, // data: [21, 22, 23, 23, 23, 35], // } // ] //}; //获取dom容器 // 使用刚指定的配置项和数据显示图表。 myChart.setOption(option); //$('#satellite_content_bottom').append('
' + // '
' + // '

62个

GF-1

' + // '
' + // '
' + // '

75%

覆盖率

' + // '
' + // '
'); } //卫星影像处理 function Handle() { $.ajax({ url: './src/config/Handle.json', dataType: "json", //返回格式为json async: true, //请求是否异步,默认为异步,这也是ajax重要特性 type: "GET", //请求方式 success: function (data) { if(!data) return; var title = []; var res = []; for(var i=0,l=data.length;i') for(var i=0,l=res.length;i'+title[i]+''+res[i]+'个'); } } }) } function meauClick() { $(".td_display").parents("li").click(function () { location.href = "Gis.html"; /*if (!!window.ActiveXObject || "ActiveXObject" in window) { location.href = "Gis.html"; } else { var port = window.location.port; window.protocolCheck("alert:http://118.213.95.33:8090/Gis.html", function () { alert("尚未安装插件,插件安装完成后再次点击"); window.location.href = "App/setup.exe";//插件 }); event.preventDefault ? event.preventDefault() : event.returnValue = false; //location.href = "alert:http://localhost:" + port + "/Gis.html?u=" + U; location.href = "alert:http://118.213.95.33:8090/Gis.html"; }*/ //var UserInfo = JSON.parse(localStorage.getItem("UserInfo")); //var U=""; //if (UserInfo == ""|UserInfo==null) { // $(".logBg").show(); // return false; //} else { // $(".logBg").hide(); // for (var i = 0; i < UserInfo.Data.length; i++) { // U = UserInfo.Data[i].UserName; // P = UserInfo.Data[i].PassWord; // } // U = U + "+" + P; // if (!!window.ActiveXObject || "ActiveXObject" in window) { // location.href = "Gis.html?u=" + U; // } else { // var port = window.location.port; // location.href = "alert:http://localhost:"+port+"/Gis.html?u=" + U; // //location.href = "alert:http://118.213.95.33:8090/Gis.html?u=" + U ; // } //} }); $(".data_manage").parents("li").click(function () { //location.href = "http://sg.qhsddy.cn"; window.open("https://118.213.95.33/sg/Index/index.do","_blank","") }); $(".super_plat").parents("li").click(function () { //location.href = "http://118.213.95.33:18087"; window.open("http://118.213.95.33:18087","_blank","") }); $(".intel_applica").parents("li").click(function () { //location.href = "http://118.213.95.33:17073/"; window.open("http://118.213.95.33:17073/","_blank","") }); $(".auto_process").parents("li").click(function () { alert('请从内网访问影像自动处理系统。'); }); $(".evenment_anylise").parents("li").click(function () { window.open("http://118.213.95.33:8812","_blank",""); }); } //展示登录界面 function DisplayLogin() { $(".user").click(function () { $(".logBg").show(); }); $(".Sumit").click(function () { GetLoginUserInfo(); }); $(".reset").click(function () { var userName = $(".loginAdmin").val(""); var passWord = $(".loginPass").val(""); }) } //登录 function GetLoginUserInfo() { var userName=$.trim($(".loginAdmin").val()); var passWord = $.trim($(".loginPass").val()); if (userName == "") { alert("用户名不能为空"); return false; } if (passWord == "") { alert("密码不能为空"); return false; } else { var reg1 = new RegExp(/^[A-Za-z]|[0-9]+$/); if (!reg1.test(passWord)) { alert("密码填写不合理"); return false; } } //请求后台数据 $.ajax({ url: '../../ashx/LoginInfo.ashx', type: "post", async :false, data: { Action: "UserInfo", userName: userName, passWord:passWord }, dataType: "json", success: function (Result) { if (Result.Msg == "failed") { alert(Result.Errmsg); return false; } else { localStorage.setItem("UserInfo", JSON.stringify(Result)); $(".logBg").hide(); } } }) }