qinbo
2021-11-16 afc782bf0610a55eae2e27b7d4e0ecb4565451ea
bug fix
4个文件已修改
38 ■■■■■ 已修改文件
data/getLayerListByUserid.json 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
widgetsTS/widget_detail/view.js 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
widgetsTS/widget_search/view.js 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
widgetsTS/widget_summary/view.js 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
data/getLayerListByUserid.json
@@ -45,7 +45,7 @@
            "style_prefix":"",
            "style_selected":"pm25",
            "styleoptions": ["pm25", "pm10", "no", "no2", "nox", "co"],
            "show":false
            "show":true
        },
        {
            "id": 1005,
widgetsTS/widget_detail/view.js
@@ -316,6 +316,11 @@
            var tableData = data.data.result;
            if (tableData != null && tableData.length > 0) {
                var topObj = tableData[0];
                for (var key in topObj) {
                    if (topObj[key] == null || topObj[key] == 'null' || topObj[key] == undefined || topObj[key] == 'undefined') {
                        topObj[key] = "/";
                    }
                  }
                var _tr = "<tr  onmouseover='over(this)' onmouseout='out(this)'><td>1</td><td>code</td><td>编码</td><td>" + topObj.code + "</td><td>/</td></tr>"
                $("#indexTb").append(_tr);
                _tr = "<tr  onmouseover='over(this)' onmouseout='out(this)' ><td>2</td><td>name</td><td>名称</td><td>" + topObj.name + "</td><td>/</td></tr>"
@@ -323,17 +328,9 @@
                _tr = "<tr  onmouseover='over(this)' onmouseout='out(this)' ><td>3</td><td>datatime</td><td>时间</td><td>" + topObj.datatime + "</td><td>/</td></tr>"
                $("#indexTb").append(_tr);
                _tr = "<tr  onmouseover='over(this)' onmouseout='out(this)' ><td>4</td><td>lon</td><td>经度</td><td>" + topObj.lon + "</td><td>/</td></tr>"
                if (topObj.lon == undefined){
                    $("#indexTb").append("<tr  onmouseover='over(this)' onmouseout='out(this)' ><td>5</td><td>lat</td><td>经度</td><td>" + '/' + "</td><td>/</td></tr>");
                }else{
                    $("#indexTb").append(_tr);
                }
                _tr = "<tr  onmouseover='over(this)' onmouseout='out(this)' ><td>5</td><td>lat</td><td>纬度</td><td>" + topObj.lat + "</td><td>/</td></tr>"
                if (topObj.lat == undefined){
                    $("#indexTb").append("<tr  onmouseover='over(this)' onmouseout='out(this)' ><td>5</td><td>lat</td><td>纬度</td><td>" + '/' + "</td><td>/</td></tr>");
                }else{
                    $("#indexTb").append(_tr);
                }
                var tmp_index = 6;
                for(var p in topObj){//遍历json对象的每个key/value对,p为key
                    if (p!=='code' && p!=='name' && p!=='datatime' && p!=='lon' && p!=='lat'){
@@ -372,6 +369,11 @@
                for (var i = 0; length = tableData.length, i < length; i++) {
                    var j = i + 1;
                    var topObj = tableData[i]; 
                    for (var key in topObj) {
                        if (topObj[key] == null || topObj[key] == 'null' || topObj[key] == undefined || topObj[key] == 'undefined') {
                            topObj[key] = "/";
                        }
                      }
                    var _tr = "<tr onmouseover='over(this)' onmouseout='out(this)' ><td>" + j + "</td><td onclick='locateAndShowDetail(this)'>" + topObj.road_id + "</td><td>" + topObj.name + "</td><td>"+ topObj.pm25 + "</td><td>" + topObj.pm10 + "</td><td>" + topObj.no + "</td><td>" + topObj.nox + "</td><td>" + topObj.no2 + "</td><td>" + topObj.co +"</td></tr>"
                    $("#indexTb").append(_tr);
                }
widgetsTS/widget_search/view.js
@@ -126,6 +126,11 @@
            for(var i=((page-1)*10);i<(page*10)&&i<newsTotalNum;i++){
                var j = i+1; 
                var topObj = tableData[i];
                for (var key in topObj) {
                    if (topObj[key] == null || topObj[key] == 'null' || topObj[key] == undefined || topObj[key] == 'undefined') {
                        topObj[key] = "/";
                    }
                  }
                var content = "<tr _siteid='" + topObj.code + "' _lon='" + topObj.lon + "' _lat='" + topObj.lat + "' onmouseover='over(this)' onmouseout='out(this)' ><td><input type='checkbox' name='selectedItem' value='" + j + "' /></td><td>" + j + "</td><td onclick='locateAndShowDetail(this)'>" + topObj.code + "</td><td onclick='locateAndShowDetail(this)'>" + topObj.name + "</td><td><font color='" + getLayerPointColorByQindexandValue(current_selected_monitor_type, current_selected_monitor_qindex, topObj[current_selected_monitor_qindex]) + "'>" + topObj[current_selected_monitor_qindex] + "</font></td></tr>"
                $("#searchInfo").append(content);
            }
widgetsTS/widget_summary/view.js
@@ -106,16 +106,13 @@
                for (var i = 0; length = tmpTopListQueryResult.length, i < length; i++) {
                    var j = i + 1;
                    var topObj = tmpTopListQueryResult[i];
                    if (topObj[current_selected_monitor_qindex] == null) {
                        var _tr = "<tr _siteid='" + topObj.code + "' _lon='" + topObj.lon + "' _lat='" + topObj.lat + "' onmouseover='over(this)' onmouseout='out(this)' ><td><input type='checkbox' name='selectedItem' value='" + j + "' /></td><td>" + j + "</td><td onclick='locateAndShowDetail(this)'>" + topObj.code + "</td><td onclick='locateAndShowDetail(this)'>" + topObj.name + "</td><td><font color='" + getLayerPointColorByQindexandValue(current_selected_monitor_type, current_selected_monitor_qindex, topObj[current_selected_monitor_qindex]) + "'>" + "/" + "</font></td></tr>"
                        $("#top10Tb").append(_tr);
                    } else if (topObj.name == undefined) {
                        var _tr = "<tr _siteid='" + topObj.code + "' _lon='" + topObj.lon + "' _lat='" + topObj.lat + "' onmouseover='over(this)' onmouseout='out(this)' ><td><input type='checkbox' name='selectedItem' value='" + j + "' /></td><td>" + j + "</td><td onclick='locateAndShowDetail(this)'>" + topObj.code + "</td><td onclick='locateAndShowDetail(this)'>" + "/" + "</td><td><font color='" + getLayerPointColorByQindexandValue(current_selected_monitor_type, current_selected_monitor_qindex, topObj[current_selected_monitor_qindex]) + "'>" + topObj[current_selected_monitor_qindex] + "</font></td></tr>"
                        $("#top10Tb").append(_tr);
                    } else {
                    for (var key in topObj) {
                        if (topObj[key] == null || topObj[key] == 'null' || topObj[key] == undefined || topObj[key] == 'undefined') {
                            topObj[key] = "/";
                        }
                      }
                        var _tr = "<tr _siteid='" + topObj.code + "' _lon='" + topObj.lon + "' _lat='" + topObj.lat + "' onmouseover='over(this)' onmouseout='out(this)' ><td><input type='checkbox' name='selectedItem' value='" + j + "' /></td><td>" + j + "</td><td onclick='locateAndShowDetail(this)'>" + topObj.code + "</td><td onclick='locateAndShowDetail(this)'>" + topObj.name + "</td><td><font color='" + getLayerPointColorByQindexandValue(current_selected_monitor_type, current_selected_monitor_qindex, topObj[current_selected_monitor_qindex]) + "'>" + topObj[current_selected_monitor_qindex] + "</font></td></tr>"
                        $("#top10Tb").append(_tr);
                    }
                }
            } else {
                haoutil.msg("查询无数据,请更换查询条件!");