wangzhibo
2021-10-04 d83e6e161a81cb877018393c21ce3999ed33a276
总览窗口
3个文件已修改
17 ■■■■■ 已修改文件
widgetsTS/widget_summary/view.html 1 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
widgetsTS/widget_summary/view.js 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
widgetsTS/widget_summary/widget.js 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
widgetsTS/widget_summary/view.html
@@ -6,6 +6,7 @@
    <script type="text/javascript" src="../../lib/jquery/jquery-2.1.4.min.js"></script>
    <script type="text/javascript" src="../../lib/layui/layui.js"></script>
    <link href="./view.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript" src="../../js/changable_params.js"></script>
    <script type="text/javascript" src="../../js/function_1001.js"></script>
</head>
widgetsTS/widget_summary/view.js
@@ -75,6 +75,7 @@
}
function reloadData() {
    $("#top10Tb").empty();
    var backend_url = thisWidget.nodejs_url_predix + "dataapi/Bdata?bid=get_" + current_selected_monitor_type + "_list&datatype=" + thisWidget.datatype + "&datatime=" + thisWidget.datatime + "&qindex=" + current_selected_monitor_qindex + "&pageno=1&pagesize=10";
    //加入cntId
    $.ajax({
@@ -87,12 +88,11 @@
        success: function (data) {
            var tableData = data.data.result;
            //console.log(tableData);
            $("#top10Tb").empty();
            if (tableData != null) {
                for (var i = 0; i < tableData.length; i++) {
                    var j = i + 1;
                    var topObj = tableData[i];
                    var _tr = "<tr _siteid='" + topObj.code + "' _lon='" + topObj.lon + "' _lat='" + topObj.lat + "' onclick='locateAndShowDetail(this)' onmouseover='over(this)' onmouseout='out(this)' ><td>" + j + "</td><td>" + topObj.code + "</td><td>" + 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>"
                    var _tr = "<tr _siteid='" + topObj.code + "' _lon='" + topObj.lon + "' _lat='" + topObj.lat + "' onclick='locateAndShowDetail(this)' onmouseover='over(this)' onmouseout='out(this)' ><td>" + j + "</td><td>" + topObj.code + "</td><td>" + 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);
                }
@@ -123,8 +123,8 @@
    var lon = $(obj).attr("_lon");
    var lat = $(obj).attr("_lat");
    if (lon && lon !='undefined'){
        thisWidget.locateAndHighlight(lon,lat);
    if (lon && lon != 'undefined') {
        thisWidget.locateAndHighlight(lon, lat);
    }
   thisWidget.showDetailedWindow({"layer":current_selected_monitor_type,"siteid":siteId});
    thisWidget.showDetailedWindow({ "nodejs_url_predix": thisWidget.nodejs_url_predix, "datatype": thisWidget.datatype,"selected_qindex": current_selected_monitor_qindex,"datatime": thisWidget.datatime, "layerid": current_selected_monitor_type, "siteid": siteId });
}
widgetsTS/widget_summary/widget.js
@@ -3,7 +3,6 @@
(function (window, mars3d) {
    //创建widget类,需要继承BaseWidget
    class MyWidget extends mars3d.widget.BaseWidget {
        //弹窗配置,2个弹窗的情形
        get view() {
            return {
                type: 'window',
@@ -43,14 +42,11 @@
            } else {
                mars3d.widget.activate({
                    uri: "widgetsTS/widget_detail/widget.js",
                    disableOther: false,
                    params: params
                });
            }
        }
        //每个窗口创建完成后调用
        winCreateOK(opt, result) {