From 8f5b493fa963a056888c89fa8b7f32fa980510e3 Mon Sep 17 00:00:00 2001
From: zhaoxing <zhaoxing@shsening.com>
Date: 星期五, 21 十月 2022 18:23:24 +0800
Subject: [PATCH] 轨迹查询/图层显示/撒点高度等
---
js/function.js | 43 +++++++++++----------
widgetsTS/widget_search/widget.js | 2
widgets/manageLayers_style/view.js | 3 +
widgetsTS/widget_detail/view.js | 4 ++
widgetsTS/taxiRouteReplay/view.js | 7 +++
config/widget.json | 3 +
widgetsTS/taxiRouteReplay/widget.js | 7 +--
widgetsTS/widget_summary/widget.js | 2
8 files changed, 42 insertions(+), 29 deletions(-)
diff --git a/config/widget.json b/config/widget.json
index 9be8e33..b4f5bce 100644
--- a/config/widget.json
+++ b/config/widget.json
@@ -315,7 +315,8 @@
"bottom": 30,
"right": 5
}
- }
+ },
+ "autoDisable":false
},
{
diff --git a/js/function.js b/js/function.js
index 02a414a..51dce5d 100644
--- a/js/function.js
+++ b/js/function.js
@@ -233,6 +233,7 @@
function mask_selection(regionCode){
if(regionCode == 0){
geoJsonLayer = new mars3d.layer.GeoJsonLayer({
+ id:9999,
url: "./data/shanghai.json",
mask: true, //鏍囪瘑涓洪伄缃╁眰銆愰噸鐐瑰弬鏁般��
symbol: {
@@ -246,29 +247,31 @@
arcType: Cesium.ArcType.GEODESIC,
clampToGround: true,
},
- },
- zIndex: 99999999999,
+ }
});
map.addLayer(geoJsonLayer);
// return
+ }else{
+ //geojson 鍚勮鏀垮尯杈圭晫绾�
+ geoJsonLayer = new mars3d.layer.GeoJsonLayer({
+ id:9999,
+ url: "./data/"+regionCode+".geojson",
+ mask: true, //鏍囪瘑涓洪伄缃╁眰銆愰噸鐐瑰弬鏁般��
+ symbol: {
+ styleOptions: {
+ fill: true,
+ color: "rgb(2,26,79)",
+ outline: true,
+ outlineColor: "#39E09B",
+ outlineWidth: 3,
+ outlineOpacity: 0.5,
+ arcType: Cesium.ArcType.GEODESIC,
+ clampToGround: true,
+ },
+ },
+});
+map.addLayer(geoJsonLayer);
}
- //geojson 鍚勮鏀垮尯杈圭晫绾�
- geoJsonLayer = new mars3d.layer.GeoJsonLayer({
- url: "./data/"+regionCode+".geojson",
- mask: true, //鏍囪瘑涓洪伄缃╁眰銆愰噸鐐瑰弬鏁般��
- symbol: {
- styleOptions: {
- fill: true,
- color: "rgb(2,26,79)",
- outline: true,
- outlineColor: "#39E09B",
- outlineWidth: 3,
- outlineOpacity: 0.5,
- arcType: Cesium.ArcType.GEODESIC,
- clampToGround: true,
- },
- },
- });
- map.addLayer(geoJsonLayer);
+
}
diff --git a/widgets/manageLayers_style/view.js b/widgets/manageLayers_style/view.js
index 862ef55..3e6dfcb 100644
--- a/widgets/manageLayers_style/view.js
+++ b/widgets/manageLayers_style/view.js
@@ -51,8 +51,9 @@
}
var item = layer.options;
+ console.log(item,"item")
- if (!item.name || item.name == "") {
+ if (!item.name || item.name == "" || item.id == 9999) {
console.log("鏈懡鍚嶅浘灞備笉鍔犲叆鍥惧眰绠$悊", layer);
return;
}
diff --git a/widgetsTS/taxiRouteReplay/view.js b/widgetsTS/taxiRouteReplay/view.js
index e60c850..6a5c8db 100644
--- a/widgetsTS/taxiRouteReplay/view.js
+++ b/widgetsTS/taxiRouteReplay/view.js
@@ -56,12 +56,17 @@
haoutil.loading.show();
thisWidget.appDateHourStart = $("#appDateHourStart").val()
thisWidget.appDateHourEnd = $("#appDateHourEnd").val()
- if($("#taxisn").val() || $("#taxisn").val()=='') {$("#taxisn").val(thisWidget.taxi_sn)}
+ if(!$("#taxisn").val() || $("#taxisn").val()=='') {$("#taxisn").val(thisWidget.taxi_sn)}
+ let str = $("#taxisn").val()
+ let time_1 = thisWidget.appDateHourStart
+ let time_2 = thisWidget.appDateHourEnd
+ console.log(str,time_1,time_2,"鍙傛暟")
$.getJSON(thisWidget.nodejs_url_predix + "dataapi/Bdata?bid=get_1004_single_path&siteid=" + $("#taxisn").val(), {
// $.getJSON(thisWidget.nodejs_url_predix + "dataapi/Bdata?bid=get_1004_single_path&siteid=" + thisWidget.taxi_sn, {
datatime1: thisWidget.appDateHourStart,
datatime2: thisWidget.appDateHourEnd
}, (result) => {
+ console.log(result,"result")
haoutil.loading.hide();
thisWidget.clearReplayLayers();
if (result.data.result.length > 0) {
diff --git a/widgetsTS/taxiRouteReplay/widget.js b/widgetsTS/taxiRouteReplay/widget.js
index ef35981..6f7cdce 100644
--- a/widgetsTS/taxiRouteReplay/widget.js
+++ b/widgetsTS/taxiRouteReplay/widget.js
@@ -14,9 +14,9 @@
reloadData(new_taxi_sn) {
console.log(new_taxi_sn,"reload")
- this.taxi_sn = new_taxi_sn;
- this.viewWindow.resetStartQueryTaxiDataText(this.taxi_sn);
+ this.viewWindow.resetStartQueryTaxiDataText(new_taxi_sn);
+ this.taxi_sn = new_taxi_sn;
if (this.startGraphic) {
this.startGraphic.remove();
@@ -143,7 +143,6 @@
}
item = changeNullAndundefinedToEmpty(item)
let color_value = this.viewWindow.getLayerPointColorByQindexandValue(1004,this.qindex, item[this.qindex]);
- console.log(item,"璺嚎item",item[this.qindex],this.viewWindow.getLayerPointColorByQindexandValue(1004,this.qindex, item[this.qindex]))
//points[Pointsdata.length] = [lon,lat]
var CorridorPrimitive = new mars3d.graphic.CorridorEntity({
positions: [position,position2],
@@ -153,7 +152,7 @@
height: 0,
cornerType: Cesium.CornerType.BEVELED,
// radius: 8.0,
- diffHeight: this.qindex == "co" ? 300 * item[this.qindex] : item[this.qindex] || item[this.qindex] == "/" ? 500 : item[this.qindex], //楂樺害
+ diffHeight: this.qindex == "co" ? 100 * item[this.qindex] : 10*item[this.qindex], //楂樺害
color:color_value,
opacity: 1,
// rotationDegree: 45,
diff --git a/widgetsTS/widget_detail/view.js b/widgetsTS/widget_detail/view.js
index c529b1a..f406ffe 100644
--- a/widgetsTS/widget_detail/view.js
+++ b/widgetsTS/widget_detail/view.js
@@ -168,6 +168,10 @@
for (var i = 0; length = tableData.length, i < length; i++) {
var j = i + 1;
var topObj = tableData[i];
+ let end_time = topObj.posttime.split(" ");
+ if(end_time[1] === "00:00:00"){
+ topObj.posttime = end_time[0]
+ }
topObj = changeNullAndundefinedToEmpty(topObj);
var _tr = "<tr onmouseover='over(this)' onmouseout='out(this)' ><td>" + j + "</td><td onclick='locateAndShowDetail(this)'>" +topObj.name+"</td><td>" + topObj.posttime + "</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);
diff --git a/widgetsTS/widget_search/widget.js b/widgetsTS/widget_search/widget.js
index 7ffd704..4ba470c 100644
--- a/widgetsTS/widget_search/widget.js
+++ b/widgetsTS/widget_search/widget.js
@@ -168,7 +168,7 @@
//closure: true,
height: 0,
cornerType: Cesium.CornerType.MITERED,
- diffHeight: qindex == "co" ? 500 * attr[qindex] : attr[qindex] || attr[qindex] == "/" ? 2000 : attr[qindex], //楂樺害
+ diffHeight: qindex == "co" ? 500 * attr[qindex] : 20*attr[qindex], //楂樺害
color: this.winPage.getLayerPointColorByQindexandValue(layerid, qindex, attr[qindex] || "#C0C0C0"),
// material: mars3d.MaterialUtil.createMaterial(mars3d.MaterialType.LineFlow, {
// //鍔ㄧ敾绾挎潗璐�
diff --git a/widgetsTS/widget_summary/widget.js b/widgetsTS/widget_summary/widget.js
index f85755b..cd8cba6 100644
--- a/widgetsTS/widget_summary/widget.js
+++ b/widgetsTS/widget_summary/widget.js
@@ -178,7 +178,7 @@
//closure: true,
height: 0,
cornerType: Cesium.CornerType.MITERED,
- diffHeight: qindex == "co" ? 500 * attr[qindex] : attr[qindex] || attr[qindex] == "/" ? 2000 : attr[qindex],//楂樺害
+ diffHeight: qindex == "co" ? 500 * attr[qindex] : 20 * attr[qindex],//楂樺害
color: this.winPage.getLayerPointColorByQindexandValue(layerid, qindex, attr[qindex]),
// material: mars3d.MaterialUtil.createMaterial(mars3d.MaterialType.LineFlow, {
// //鍔ㄧ敾绾挎潗璐�
--
Gitblit v1.9.1