Merge branch 'dev_lxw' of https://whyclxw1@gitlab.com/whyclxw1/gx_tieta.git into dev_lxw
| | |
| | | <link rel="stylesheet" type="text/css" href="styles.css">
|
| | | -->
|
| | | <link rel="stylesheet" type="text/css" href="css/basic.css" />
|
| | | <script type="text/javascript" src="js/frame.js"></script>
|
| | | <script type="text/javascript" src="js/jquery-1.8.3.js"></script>
|
| | | <script type="text/javascript" src="js/base.js"></script>
|
| | | <script type="text/javascript" src="js/buildNav.js"></script>
|
| | | </head>
|
| | | <body>
|
| | | <!-- <form action="MyFileAction!UploadTestFile" method="post" enctype="multipart/form-data" id="up-form1">
|
| | |
| | | <img alt="" id="im" src="">
|
| | | </form>
|
| | | </body>
|
| | | |
| | | <script type="text/javascript" src="js/VoiceUtil.js"></script>
|
| | | <script type="text/javascript">
|
| | | var permits;
|
| | | <% Object obj=session.getAttribute("permits");
|
| | |
| | | <% } %>
|
| | |
|
| | |
|
| | | |
| | | |
| | | var param = {
|
| | | dev_id:910000001,
|
| | | record_datetime:'2018-01-01 00:00:00',
|
| | | record_datetime_end:'2018-03-30 23:59:59',
|
| | | station_event_type:0, //1:基站停电 2:基站续航 3:基站发电 4:基站开门 5:基站掉站 6:基站温度上限 7:基站温度下限 8:基站湿度上限 9:基站湿度下限 |
| | | page:{
|
| | | pageSize:10, //每页的行数
|
| | | pageCurr:1 //当前页码数
|
| | | }
|
| | | };
|
| | | searchStationHistRecord(param);
|
| | | |
| | | //查询基站详情
|
| | | function searchStationHistRecord(param){
|
| | | // 请求获取当前省下的市
|
| | | $.ajax({ |
| | | type: "post", |
| | | url: "Bts_station_eventAction!serchByInfo", |
| | | async:true, |
| | | dataType:'json',
|
| | | data:"json = "+JSON.stringify(param), |
| | | success: function(data){
|
| | | var rs = JSON.parse(data.result);
|
| | | console.info(rs);
|
| | | if(rs.code == 1) {
|
| | | |
| | | }else {
|
| | | |
| | | }
|
| | | }
|
| | | });
|
| | | }
|
| | | |
| | | |
| | | |
| | | setTimeout(function() {
|
| | | voice.play("这是我第一次做语音播报在 2018-01-01 01:56:23");
|
| | | },2000);
|
| | |
|
| | | //上传logo
|
| | | $('#up-file1').click(function(){
|
| | |
| | | /* margin-left */
|
| | | .mr5 {
|
| | | margin-left: 5px;
|
| | | }
|
| | | .mr10 {
|
| | | margin-left: 10px;
|
| | | margin-right: 0;
|
| | | }
|
| | |
|
| | | /* font-color */
|
| | | .red {
|
| | | color: #FF0000;
|
| | | }
|
| | |
|
| | | /* width em */
|
| | | .w8em {
|
| | | width: 8em;
|
| | | }
|
| | |
|
| | | /* text-align */
|
| | | .alg-r {
|
| | | text-align: right;
|
| | | }
|
| | | .alg-c {
|
| | | text-align: center;
|
| | | }
|
| | | /* side-bar-menu模块 */
|
| | | .whyc-sider-menu-container {
|
| | | overflow: hidden;
|
| | |
| | | border: 1px solid #ccc;
|
| | | }
|
| | |
|
| | | /* whyc-tab */
|
| | | .whyc-tab-card {
|
| | | |
| | | }
|
| | | .whyc-tab-card .whyc-tab-title {
|
| | | position: relative;
|
| | | border: 1px solid #e6e6e6;
|
| | | height: 40px;
|
| | | background-color: #f2f2f2;
|
| | | }
|
| | |
|
| | |
|
| | | .whyc-tab-title li {
|
| | | display: inline-block;
|
| | | vertical-align: middle;
|
| | | min-width: 65px;
|
| | | text-align: center;
|
| | | line-height: 40px;
|
| | | padding: 0 15px;
|
| | | cursor: pointer;
|
| | | }
|
| | | .whyc-tab-card .whyc-tab-title li.whyc-tab-this {
|
| | | line-height: 41px;
|
| | | background-color: #FFFFFF;
|
| | | }
|
| | |
|
| | |
|
| | |
|
| | | /* jquery ui style */
|
| | | body .ui-front {
|
| | | z-index: 999999;
|
| | |
| | | .item-timeout {
|
| | | /* color: blue !important; */
|
| | | }
|
| | |
|
| | | .map-info-panel-left {
|
| | | position: absolute;
|
| | | top: 10px;
|
| | | left: 10px;
|
| | | z-index: 10;
|
| | | background-color: #FFFFFF;
|
| | | border: 1px solid #cccccc;
|
| | | }
|
| | | .map-info-panel-content {
|
| | | position: relative;
|
| | | }
|
| | |
|
| | | .map-info-panel-content .map-info {
|
| | | padding: 0 10px;
|
| | | line-height: 30px;
|
| | | text-align: center;
|
| | | background-color: #CDDCFA;
|
| | | border-bottom: 1px solid #CCCCCC;
|
| | | }
|
| | | .map-info-panel-content .map-info .k-point {
|
| | | font-weight: bold;
|
| | | }
|
| | | .map-info-btn-icon {
|
| | | margin-left: 15px;
|
| | | font-size: 18px;
|
| | | vertical-align: middle;
|
| | | cursor: pointer;
|
| | | }
|
| | | .map-info-btn-icon:hover {
|
| | | color: #1495E7;
|
| | | }
|
| | |
|
| | | .map-info-detail {
|
| | | display: none;
|
| | | }
|
| | | .map-info-detail table {
|
| | | width: 100%;
|
| | | margin-top: 8px;
|
| | | margin-bottom: 8px;
|
| | | }
|
| | | .map-info-detail table td {
|
| | | padding: 4px 0;
|
| | | }
|
| | | .map-info-detail table select {
|
| | | width: 96%;
|
| | | height: 24px;
|
| | | border: 1px solid #CCCCCC;
|
| | | }
|
| | | .map-info-footer {
|
| | | padding: 8px 0;
|
| | | border-top: 1px solid #CCCCCC;
|
| | | }
|
| | | .map-info-footer button {
|
| | | padding:6px 20px;
|
| | | border: 1px solid #c1c1c1;
|
| | | background: #FFFFFF;
|
| | | background: -webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), to(#f4f4f4));
|
| | | background: -o-linear-gradient(top, #ffffff, #f4f4f4);
|
| | | background: -ms-linear-gradient(top, #ffffff 0%,#f4f4f4 100%);
|
| | | background: linear-gradient(top, #ffffff, #f4f4f4);
|
| | | color: #555;
|
| | | }
|
| | | .map-info-footer button:hover {
|
| | | background: #f4f4f4;
|
| | | color: #555;
|
| | | } |
| | |
| | |
|
| | | <title><s:text name="HomePage"></s:text></title>
|
| | | <meta name="renderer" content="webkit">
|
| | | <meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
|
| | | <!-- 导入百度地图API -->
|
| | | <link rel="stylesheet" href="http://api.map.baidu.com/library/SearchInfoWindow/1.5/src/SearchInfoWindow_min.css" />
|
| | | <script type="text/javascript" src="http://api.map.baidu.com/api?v=2.0&ak=QAerSFEiGDCx1oHPB7Z5XYcBHI6R3qwx"></script>
|
| | | <script type="text/javascript" src="http://api.map.baidu.com/library/SearchInfoWindow/1.5/src/SearchInfoWindow_min.js"></script>
|
| | | <link rel="stylesheet" href="http://api.map.baidu.com/library/SearchInfoWindow/1.5/src/SearchInfoWindow_min.css" />
|
| | | <script type="text/javascript" src="js/AreaRestriction_min.js"></script>
|
| | | <link href="css/basic.css" type="text/css" rel="stylesheet" />
|
| | | <link href="css/common.css" type="text/css" rel="stylesheet" />
|
| | | <link href="css/index_layout.css" type="text/css" rel="stylesheet" />
|
| | |
| | | }
|
| | | </style>
|
| | | <script type="text/javascript" src="js/jquery-1.8.3.js"></script>
|
| | | |
| | | <script type="text/javascript" src="js/echarts.js"></script>
|
| | | <script type="text/javascript" src="js/createTab.js"></script>
|
| | |
|
| | |
| | | <jsp:include page="nav.jsp" flush="true"/>
|
| | | <!--导航结束-->
|
| | | <div id="content">
|
| | | <!-- <div id="mapStatusOpts" class="map-status-container">
|
| | | <div class="layui-form layui-form-pane">
|
| | | <label class="layui-form-label">机房类型</label>
|
| | | <div class="layui-input-inline">
|
| | | <select name="warnType" id="warnType">
|
| | | <option value="0">全部</option>
|
| | | <option value="1">落后</option>
|
| | | <option value="2">告警</option>
|
| | | <option value="3">延时</option>
|
| | | <option value="4">正常</option>
|
| | | </select>
|
| | | <!-- 地图内容筛选 -->
|
| | | <div class="map-info-panel-left">
|
| | | <div class="map-info-panel-content">
|
| | | <div class="map-info">
|
| | | <span>限制显示区域: </span><span class="k-point red" id="mapVsArea">中国</span>
|
| | | <span class="mr5">机房显示类型:</span><span class="k-point red" id="mapIconStyle">全部</span>
|
| | | </div>
|
| | | <div class="map-info-detail">
|
| | | <table>
|
| | | <tbody>
|
| | | <tr>
|
| | | <td class="w8em alg-c">机房显示类型:</td>
|
| | | <td>
|
| | | <select name="mapIconStyleSel" id="mapIconStyleSel">
|
| | | <option>全部</option>
|
| | | <option>已安装</option>
|
| | | <option>未安装</option>
|
| | | </select>
|
| | | </td>
|
| | | </tr>
|
| | | </tbody>
|
| | | </table>
|
| | | <div class="map-info-footer alg-r">
|
| | | <button type="button" class="mr10 map-panel-hide" value="确定" id="mapPanelEn">确定</button>
|
| | | <button type="button" class="mr10 map-panel-hide" value="隐藏">隐藏</button>
|
| | | </div>
|
| | | </div>
|
| | | </div>
|
| | | </div> -->
|
| | | </div>
|
| | | <div class="nav-map small">
|
| | | <!-- 电池分布图 -->
|
| | | <div class="china-map" id="map">
|
| | |
| | | centerMapByPoint(map); // 根据当前用户设定的位置显示中心点
|
| | | map.enableScrollWheelZoom();
|
| | | map.disableDoubleClickZoom();
|
| | | map.setMapStyle({style: 'grayscale'}); // 设置地图的风格
|
| | | //map.setMapStyle({style: 'grayscale'}); // 设置地图的风格
|
| | | // 添加地图类型控件
|
| | | map.addControl(new BMap.MapTypeControl());
|
| | | // 给地图添加工具条(地图-卫星-三维)和比例尺控件
|
| | |
| | | var menu = new BMap.ContextMenu();
|
| | | var txtMenuItem = [
|
| | | {
|
| | | text: '设置中心点',
|
| | | callback: function(e) {
|
| | | myConfirm.show({
|
| | | title: '设置地图默认显示位置',
|
| | | content: '是否确认修改地图默认中心坐标',
|
| | | enfun:updateMapCenterPoint,
|
| | | enparams:[e]
|
| | | });
|
| | | }
|
| | | },
|
| | | {
|
| | | text: '搜索地址',
|
| | | callback: function(e) {
|
| | | search.showSearch();
|
| | |
| | | smallMap();
|
| | | }
|
| | | },
|
| | | |
| | | {
|
| | | text: '设置中心点',
|
| | | text: '返回中心点',
|
| | | callback: function(e) {
|
| | | myConfirm.show({
|
| | | title: '设置地图默认显示位置',
|
| | | content: '是否确认修改地图默认中心坐标',
|
| | | enfun:updateMapCenterPoint,
|
| | | enparams:[e]
|
| | | });
|
| | | centerMapByPoint(map);
|
| | | }
|
| | | }
|
| | | },
|
| | | ];
|
| | | //console.info(getPermit('taskchange_edit_permit', permits)+"*******");
|
| | | if(getPermit('batt_map_edit_permit', permits)) {
|
| | |
| | | });
|
| | |
|
| | | $(window).resize(function() {
|
| | | console.log(123);
|
| | | getMapHt();
|
| | | });
|
| | | // 改变div的大小
|
| | |
| | | }
|
| | |
|
| | | // 生成地图图标
|
| | | function createMapDot(map, dotList) {
|
| | | function createMapDot(map, dotList, isTop) {
|
| | | // 清空覆盖物和对应的mk点
|
| | | mkList = [];
|
| | |
|
| | |
| | | //showMapPanel(target, dotList);
|
| | | searchPanelInfo(target);
|
| | | });
|
| | | |
| | | if(isTop) {
|
| | | mk.setTop(true);
|
| | | }
|
| | | |
| | | mkList.push(mk);
|
| | | // 向地图添加覆盖物
|
| | | map.addOverlay(mk);
|
| | |
| | | data: "json="+JSON.stringify(mapPages),
|
| | | success: function(result) {
|
| | | var data = JSON.parse(result.result);
|
| | | console.log(data);
|
| | | //console.log(data);
|
| | | for(var i=0; i<data.length; i++) {
|
| | | var _data = data[i];
|
| | | var _list = formatUpdateStation(_data);
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | console.log(updateStationData);
|
| | | createMapDot(map, updateStationData);
|
| | | //console.log(updateStationData);
|
| | | createMapDot(map, updateStationData, true);
|
| | |
|
| | | // 更新分页信息
|
| | | mapPages.pageCurr++;
|
| | | if(mapPages.pageCurr>mapPages.pageNum) {
|
| | | if(mapPages.pageCurr>mapPages.pageNum || updateStationData.length<mapPages.pageSize) {
|
| | | mapPages.pageCurr=1;
|
| | | mapPages.pageNew=false;
|
| | | }
|
| | |
| | | }
|
| | | });
|
| | | }
|
| | | |
| | | var mapViewArea = GLOBAL.BMap.mapViewArea;
|
| | | // 显示默认区域-中国
|
| | | setMapViewArea(mapViewArea[0]); |
| | | // 设置地图的可视区域
|
| | | function setMapViewArea(data) {
|
| | | var left = new BMap.Point(data.left.lng, data.left.lat);
|
| | | var right = new BMap.Point(data.right.lng, data.right.lat);
|
| | | var b = new BMap.Bounds(left, right);
|
| | | try {
|
| | | BMapLib.AreaRestriction.setBounds(map, b);
|
| | | } catch (e) {
|
| | | alert(e);
|
| | | }
|
| | | }
|
| | | });
|
| | | </script>
|
| | | </html>
|
| | |
| | | var BMapLib=window.BMapLib=BMapLib||{};(function(){var b=BMapLib.AreaRestriction=function(){};var a=false;var c=null;var d=null;b.setBounds=function(f,e){if(!f||!e||!(e instanceof BMap.Bounds)){throw"\u8bf7\u68c0\u67e5\u4f20\u5165\u53c2\u6570\u503c\u7684\u5408\u6cd5\u6027";return false}if(a){this.clearBounds()}c=f;d=e;c.addEventListener("moveend",this._mapMoveendEvent);a=true;return true};b._mapMoveendEvent=function(k){if(d.containsBounds(c.getBounds())){return}var i=c.getBounds(),h=i.getSouthWest(),g=i.getNorthEast(),m=d.getSouthWest(),j=d.getNorthEast();var l={n:0,e:0,s:0,w:0};l.n=(g.lat<j.lat)?g.lat:j.lat;l.e=(g.lng<j.lng)?g.lng:j.lng;l.s=(h.lat<m.lat)?m.lat:h.lat;l.w=(h.lng<m.lng)?m.lng:h.lng;var f=new BMap.Point(l.w+(l.e-l.w)/2,l.s+(l.n-l.s)/2);setTimeout(function(){c.panTo(f,{noAnimation:"no"})},1)};b.clearBounds=function(){if(!a){return}c.removeEventListener("moveend",this._mapMoveendEvent);a=false}})(); |
| | | var BMapLib = window.BMapLib = BMapLib || {};
|
| | | (function() {
|
| | | var b = BMapLib.AreaRestriction = function() {};
|
| | | var a = false;
|
| | | var c = null;
|
| | | var d = null;
|
| | | b.setBounds = function(f, e) {
|
| | | if (!f || !e || !(e instanceof BMap.Bounds)) {
|
| | | throw "请检查传入参数值的合法性";
|
| | | return false;
|
| | | }
|
| | | if (a) {
|
| | | this.clearBounds();
|
| | | }
|
| | | c = f;
|
| | | d = e;
|
| | | c.addEventListener("moveend", this._mapMoveendEvent);
|
| | | a = true;
|
| | | return true;
|
| | | };
|
| | | b._mapMoveendEvent = function(k) {
|
| | | if (d.containsBounds(c.getBounds())) {
|
| | | return
|
| | | }
|
| | | console.log(c.getBounds());
|
| | | var i = c.getBounds(),
|
| | | h = i.getSouthWest(),
|
| | | g = i.getNorthEast(),
|
| | | m = d.getSouthWest(),
|
| | | j = d.getNorthEast();
|
| | | var l = {
|
| | | n: 0,
|
| | | e: 0,
|
| | | s: 0,
|
| | | w: 0
|
| | | };
|
| | | l.n = (g.lat < j.lat) ? g.lat : j.lat;
|
| | | l.e = (g.lng < j.lng) ? g.lng : j.lng;
|
| | | l.s = (h.lat < m.lat) ? m.lat : h.lat;
|
| | | l.w = (h.lng < m.lng) ? m.lng : h.lng;
|
| | | var f = new BMap.Point(l.w + (l.e - l.w) / 2, l.s + (l.n - l.s) / 2);
|
| | | setTimeout(function() {
|
| | | c.panTo(f, {
|
| | | noAnimation: "no"
|
| | | });
|
| | | }, 1);
|
| | | };
|
| | | b.clearBounds = function() {
|
| | | if (!a) {
|
| | | return
|
| | | }
|
| | | c.removeEventListener("moveend", this._mapMoveendEvent);
|
| | | a = false;
|
| | | };
|
| | | })(); |
New file |
| | |
| | | // 设置语音播报对象
|
| | | var Voice = function() {
|
| | | this.speak = window.speechSynthesis;
|
| | | this.voice = '';
|
| | | this.zh_CN = false;
|
| | | this._setLang(); // 获取并检测是否有中文的环境
|
| | | };
|
| | |
|
| | | // 播报语音 (调用发声的方法时请使用延时发声)
|
| | | Voice.prototype.play = function(txt) {
|
| | | if(!this.zh_CN) {
|
| | | console.info('你的电脑不支持中文播报!'); |
| | | }
|
| | | console.info(this.zh_CN);
|
| | | this.cancel();
|
| | | var to_speak = new SpeechSynthesisUtterance(txt);
|
| | | to_speak.voice = this.voice; // 设定中文播报
|
| | |
|
| | | this.speak.speak(to_speak);
|
| | | |
| | | };
|
| | |
|
| | | // 退出当前播报
|
| | | Voice.prototype.cancel = function() {
|
| | | this.speak.cancel();
|
| | | };
|
| | |
|
| | | // 检查当前语言环境
|
| | | Voice.prototype._setLang = function() {
|
| | | var _this = this;
|
| | | setTimeout(function(){
|
| | | var voices = _this.speak.getVoices();
|
| | | for(var i=0; i<voices.length; i++) {
|
| | | var _voices = voices[0];
|
| | | //console.info(_voices);
|
| | | if(_voices.lang === 'zh-CN') {
|
| | | _this.zh_CN = true;
|
| | | _this.voice = _voices;
|
| | | }
|
| | | }
|
| | | }, 0);
|
| | | };
|
| | |
|
| | | var voice = new Voice();
|
| | |
| | | gl.CMD.e61850.getDischargeParm = 41; //获取参数
|
| | | })(jQuery, window, document, GLOBAL);
|
| | |
|
| | | // 地图信息
|
| | | ;(function($, window, document, gl, undefined) {
|
| | | // 定义BMap的命名空间
|
| | | gl.namespace('BMap');
|
| | | // 地图可视区域定义
|
| | | var mapViewArea = [
|
| | | {name: '中国',area:'中国' ,left: {lng:71.3822, lat:0.6212}, right: {lng: 139.526,lat:54.3093}},
|
| | | ];
|
| | | |
| | | // 将变量mapView绑定到GLOBAL.BMap下
|
| | | gl.BMap.mapViewArea = mapViewArea;
|
| | | |
| | | })(jQuery, window, document, GLOBAL);
|
| | |
|
| | |
|
| | | // 生成阿里图标的元素
|
| | | function create_ali_font(cla, color, data) {
|
| | | var i = $('<i class="icon iconfont"></i>');
|