From cdd61fe225ec02defd5707acbc5727fcadb9c7e8 Mon Sep 17 00:00:00 2001
From: cshenfu <men883234@gmail.com>
Date: 星期五, 28 十月 2022 16:20:31 +0800
Subject: [PATCH] 更改小时和天日历选择bug
---
js/function.js | 4 +---
widgetsTS/dataTime/widget.js | 11 ++++++-----
js/changable_params.js | 1 +
js/function_1001.js | 6 ------
widgetsTS/taxiRouteReplay/view.js | 6 ++----
js/function_1004.js | 6 +-----
widgetsTS/taxiRouteReplay/widget.js | 1 +
; | 5 +++++
widgetsTS/taxiRouteReplay2/widget.js | 6 ------
9 files changed, 17 insertions(+), 29 deletions(-)
diff --git a/; b/;
new file mode 100644
index 0000000..26680b1
--- /dev/null
+++ b/;
@@ -0,0 +1,5 @@
+Merge branch 'master' of http://www.shsening.com:10000/r/template/shanghai
+# 璇疯緭鍏ヤ竴涓彁浜や俊鎭互瑙i噴姝ゅ悎骞剁殑蹇呰鎬э紝灏ゅ叾鏄皢涓�涓洿鏂板悗鐨勪笂娓稿垎鏀�
+# 鍚堝苟鍒颁富棰樺垎鏀��
+#
+# 浠� '#' 寮�濮嬬殑琛屽皢琚拷鐣ワ紝鑰岀┖鐨勬彁浜よ鏄庡皢缁堟鎻愪氦銆�
diff --git a/js/changable_params.js b/js/changable_params.js
index cc589d3..7584c9f 100644
--- a/js/changable_params.js
+++ b/js/changable_params.js
@@ -57,6 +57,7 @@
var default_grid_camerview = {grid5000:{"lat":30.367931,"lng":121.518409,"alt":128482,"heading":2,"pitch":-57},grid3000:{"lat":30.902475,"lng":121.487751,"alt":38716,"heading":2,"pitch":-57},grid1000:{"lat":31.066346,"lng":121.462529,"alt":10026,"heading":2,"pitch":-57},grid500:{"lat":31.112561,"lng":121.458433,"alt":2483,"heading":2,"pitch":-57}};
function bindPopupFunction(event) {
+ console.log(this,event,"杩欐槸event")
let layerid = event.layer.options.id;
let item = event.graphic?.attr;
let qindex = event.layer.options.style_selected;
diff --git a/js/function.js b/js/function.js
index 647b7a9..9ae44a2 100644
--- a/js/function.js
+++ b/js/function.js
@@ -58,6 +58,7 @@
} else {
min = 45
}
+
return year + "-" +
((month + 1) > 9 ? (month + 1) : "0" + (month + 1)) + "-" +
(day > 9 ? day : ("0" + day)) + " " +
@@ -133,8 +134,6 @@
function reLoadLayers() {
var layers = map.getLayers({ layers: true });
layers.forEach((layer) => {
- // console.log(layer.name + ":" + layer.type);
-
if ([layer.type] == 'wms') {
layer.options.layers = "konglu_58:" + layer.options.geoname_prefix + mars3d.global_variables.queryDataType;
layer.options.parameters.viewparams = "userid:" + mars3d.global_variables.userid + ";regiontype:" + layer.options.regiontype + ";datetime:" + mars3d.global_variables.queryDataTStartGeo
@@ -189,7 +188,6 @@
function addGraphictoHighlightLayer() {
mars3d.global_variables.tmpHighlightGraphics.forEach((item) => {
mars3d.global_variables.tmpHighlightGraphicLayer.addGraphic(item);
- console.log(item,"楂樹寒")
});
}
diff --git a/js/function_1001.js b/js/function_1001.js
index 47f5818..34de637 100644
--- a/js/function_1001.js
+++ b/js/function_1001.js
@@ -7,8 +7,6 @@
function addWMSLayer(item) {
- console.log(item,"鏌ョ湅griditem")
-
var wmsLyer = new mars3d.layer.WmsLayer({
id: item.id,
pid: item.pid,
@@ -60,7 +58,6 @@
wmsLyer.options.maximumLevel = item.maximumLevel;
wmsLyer.options.maximumTerrainLevel = item.maximumLevel;
}
-
wmsLyer.bindPopup(bindPopupFunction);
@@ -70,9 +67,6 @@
var id = event.layer.options.id;
var qindex = event.layer.options.style_selected;
event.graphic.style.diffHeight = qindex == 'co' ? 10 * event.graphic.attr[qindex] : event.graphic.attr[qindex];
- //console.log(id, qindex, event.graphic.attr[qindex]);
- //console.log(getLayerPointColorByQindexandValue(id, qindex, event.graphic.attr[qindex]));
- //console.log(Cesium.Color.fromCssColorString(getLayerPointColorByQindexandValue(id, qindex, event.graphic.attr[qindex])))
//event.graphic.style.material.uniforms.color = getLayerPointColorByQindexandValue(id, qindex, event.graphic.attr[qindex]);
//event.graphic.style.material.uniforms.color = getLayerPointColorByQindexandValue(id, qindex, event.graphic.attr[qindex]);
event.graphic.style.material = new mars3d.MaterialUtil.createMaterial(mars3d.MaterialType.LineFlow, {
diff --git a/js/function_1004.js b/js/function_1004.js
index f4686b6..b509c80 100644
--- a/js/function_1004.js
+++ b/js/function_1004.js
@@ -29,7 +29,6 @@
taxi_layer.on(mars3d.EventType.click, function (event) {
console.log("鐩戝惉layer锛屽崟鍑讳簡鐭㈤噺瀵硅薄", event);
var item = event.graphic?.attr;
- //console.log(item);
});
taxi_layer.bindPopup(bindPopupFunction);
@@ -50,14 +49,13 @@
}
function setTaxiLayerMapClock() {
- console.log(mars3d.global_variables.queryDataTStartTaxi,mars3d.global_variables.queryDataTEnd,"鏃堕棿")
+
map.clock.shouldAnimate = true;
map.clock.startTime = Cesium.JulianDate.fromDate(new Date(mars3d.global_variables.queryDataTStartTaxi));
map.clock.currentTime = Cesium.JulianDate.fromDate(new Date(mars3d.global_variables.queryDataTStartTaxi));
map.clock.stopTime = Cesium.JulianDate.fromDate(new Date(mars3d.global_variables.queryDataTEnd));
map.clock.multiplier = 2.0;
map.clock.clockRange = Cesium.ClockRange.LOOP_STOP;
-
var last_time_second = 0;
@@ -246,10 +244,8 @@
polygon_Points = result2.features[0].geometry.coordinates[0][0]
for (var i = 0, len = result.data.result.length; i < len; i++) {
let item = result.data.result[i];
- console.log(item.lon,item.lat,polygon_Points)
let isIn = isInPolygon([item.lon,item.lat],polygon_Points)
if(isIn){
- console.log("杩涙潵浜�")
tmpPositionProperty.addSample(Cesium.JulianDate.fromDate(new Date(item["datatime"])), Cesium.Cartesian3.fromDegrees(item["lon"], item["lat"], 0.2))
}
// mpPositionProperty.addSample(Cesium.JulianDate.fromDate(new Date(item["datatime"])), Cesium.Cartesian3.fromDegrees(item["lon"], item["lat"], 0.2))
diff --git a/widgetsTS/dataTime/widget.js b/widgetsTS/dataTime/widget.js
index 7935baa..710b4c5 100644
--- a/widgetsTS/dataTime/widget.js
+++ b/widgetsTS/dataTime/widget.js
@@ -97,12 +97,12 @@
var tmpDatetime = $('#appDateHour').val();
tmpDatetime = tmpDatetime.replace(/\:/g,"").replace(/-/g,"").replace(/\s+/g,"");
mars3d.global_variables.queryDataTStart = $('#appDateHour').val();
- mars3d.global_variables.queryDataTEnd = $('#appDateHour').val().substring(0,14)+"15:00";
+ mars3d.global_variables.queryDataTEnd = $('#appDateMin').val().substring(0,14) + (Number($('#appDateMin').val().substring(14,16)) + 14).toString() +":59";
+ // mars3d.global_variables.queryDataTEnd = $('#appDateHour').val().substring(0,14)+"15:00";
mars3d.global_variables.DefaultDateTimeStart = $('#appDateHour').val().substring(0,11)+"00:00:00";
mars3d.global_variables.queryDataTStartGeo = tmpDatetime;
mars3d.global_variables.queryDataType = value;
mars3d.global_variables.timetype = "hour";
- console.log(mars3d.global_variables.queryDataTStart,"start",mars3d.global_variables.queryDataTEnd,"end",mars3d.global_variables.DefaultDateTimeStart,"涓�澶╃殑鏃堕棿")
reLoadLayers();
refreshWidgets();
timetype_change1();
@@ -119,12 +119,12 @@
tmpDatetime = tmpDatetime.replace(/\:/g,"").replace(/-/g,"").replace(/\s+/g,"");
mars3d.global_variables.queryDataTStart = $('#appDate').val() + " 00:00:00";
- mars3d.global_variables.queryDataTEnd = $('#appDate').val()+ " 00:15:00";
+ mars3d.global_variables.queryDataTEnd = $('#appDateMin').val().substring(0,14) + (Number($('#appDateMin').val().substring(14,16)) + 14).toString() +":59";
+ // mars3d.global_variables.queryDataTEnd = $('#appDate').val()+ " 00:15:00";
mars3d.global_variables.DefaultDateTimeStart = $('#appDate').val().substring(0,8)+"01 00:00:00";
mars3d.global_variables.queryDataTStartGeo = tmpDatetime;
mars3d.global_variables.queryDataType = value;
mars3d.global_variables.timetype = "day";
- console.log(tmpDatetime,mars3d.global_variables.queryDataTStart,mars3d.global_variables.queryDataTEnd ,mars3d.global_variables.DefaultDateTimeStart,"涓�澶╃殑鏃堕棿")
reLoadLayers();
refreshWidgets();
timetype_change1();
@@ -140,10 +140,12 @@
$('#appDateHour').hide()
$('#appDateMin').show()
// mars3d.global_variables.queryDataTStart = $('#appDateMin').val();
+
mars3d.global_variables.queryDataTStartTaxi = $('#appDateMin').val();
mars3d.global_variables.queryDataTEnd = $('#appDateMin').val().substring(0,14) + (Number($('#appDateMin').val().substring(14,16)) + 14).toString() +":59";
mars3d.global_variables.DefaultDateTimeStart = $('#appDateMin').val().substring(0,11)+"00:00:00";
mars3d.global_variables.timetype = "min";
+ console.log($('#appDateMin').val(),mars3d.global_variables.queryDataTEnd,mars3d.global_variables.DefaultDateTimeStart)
taxi_reLoadLayers();
timetype_change1();
timetype_change2();
@@ -180,7 +182,6 @@
});
$("#appDate").datetimepicker("setDate", new Date(this.defaultDate));
$("#appDate").datetimepicker("setEndDate", new Date(this.defaultDate));
-
$("#appDateHour").datetimepicker({
bootcssVer: 3, //bootstrap-datetimepicker锛媌ootstrap v3锛屼絾杩欎釜鎻掍欢浣跨敤鐨勬椂鍊欙紝骞舵病鏈夊拰V3鐩稿尮閰嶏紝浠嶇劧璋冪敤鐨勬槸bootstrap V2鐨勫浘鏍� 鎶奲ootcssVer鐨勫�肩洿鎺ヨ涓�3锛屽惁鍒檇atetimepicker涓嶄細鏄剧ず鍑轰笂銆佷笅涓湀鐨勭澶�
format: 'yyyy-mm-dd hh:00:00',
diff --git a/widgetsTS/taxiRouteReplay/view.js b/widgetsTS/taxiRouteReplay/view.js
index 207c5b8..69217e7 100644
--- a/widgetsTS/taxiRouteReplay/view.js
+++ b/widgetsTS/taxiRouteReplay/view.js
@@ -7,7 +7,6 @@
thisWidget = _thisWidget;
DatePicker("#appDateHourStart", '#appDateHourEnd');
- console.log($("#appDateHourStart").val(),$('#appDateHourEnd').val(),"rywsjbh")
$("#appDateHourStart").datetimepicker("setDate", new Date(thisWidget.appDateHourStart));
$('#appDateHourEnd').datetimepicker('setDate', new Date(thisWidget.appDateHourEnd));
$("#taxisn").val(thisWidget.taxi_sn);
@@ -60,12 +59,12 @@
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,"鏌ヨ鏁版嵁")
haoutil.loading.hide();
thisWidget.clearReplayLayers();
if (result.data.result.length > 0) {
@@ -137,7 +136,6 @@
}
function resetStartQueryTaxiDataText(taxi) {
- console.log(taxi,"taxi缂栧彿")
$("#taxisn").val(taxi)
// $("#startQueryTaxiDataText").text("杞ㄨ抗鏌ヨ(" + taxi + ")");
@@ -149,7 +147,7 @@
{
bootcssVer: 3, //bootstrap-datetimepicker锛媌ootstrap v3锛屼絾杩欎釜鎻掍欢浣跨敤鐨勬椂鍊欙紝骞舵病鏈夊拰V3鐩稿尮閰嶏紝浠嶇劧璋冪敤鐨勬槸bootstrap V2鐨勫浘鏍� 鎶奲ootcssVer鐨勫�肩洿鎺ヨ涓�3锛屽惁鍒檇atetimepicker涓嶄細鏄剧ず鍑轰笂銆佷笅涓湀鐨勭澶�
format: 'yyyy-mm-dd hh:ii:00',
- minView: 'day',//璁剧疆鏃堕棿閫夋嫨涓哄勾鏈堟棩 鍘绘帀鏃跺垎绉掗�夋嫨
+ // minView: 'day',//璁剧疆鏃堕棿閫夋嫨涓哄勾鏈堟棩 鍘绘帀鏃跺垎绉掗�夋嫨
todayBtn: true, //濡傛灉姝ゅ�间负true 鎴� "linked"锛屽垯鍦ㄦ棩鏈熸椂闂撮�夋嫨鍣ㄧ粍浠剁殑搴曢儴鏄剧ず涓�涓� "Today" 鎸夐挳鐢ㄤ互閫夋嫨褰撳墠鏃ユ湡銆傚鏋滄槸true鐨勮瘽锛�"Today" 鎸夐挳浠呬粎灏嗚鍥捐浆鍒板綋澶╃殑鏃ユ湡锛屽鏋滄槸"linked"锛屽綋澶╂棩鏈熷皢浼氳閫変腑銆�
clearBtn: true,
language: 'zh-CN',
diff --git a/widgetsTS/taxiRouteReplay/widget.js b/widgetsTS/taxiRouteReplay/widget.js
index 7bfa563..7f8b71c 100644
--- a/widgetsTS/taxiRouteReplay/widget.js
+++ b/widgetsTS/taxiRouteReplay/widget.js
@@ -282,6 +282,7 @@
//==============寮�濮嬪鑸�===================
startDH() {
//瀵艰埅鍓嶉噴鏀句箣鍓嶇殑鎵�鏈夊鑸搷浣�
+ console.log(this.appDateHourEnd,this.appDateHourStart,this.appDateHourEnd,"寮�濮嬪洖鏀�")
this.map.clock.shouldAnimate = true;
this.map.clock.startTime = Cesium.JulianDate.fromDate(new Date(this.appDateHourStart));
this.map.clock.currentTime = Cesium.JulianDate.fromDate(new Date(this.appDateHourStart));
diff --git a/widgetsTS/taxiRouteReplay2/widget.js b/widgetsTS/taxiRouteReplay2/widget.js
index 4490736..ea66803 100644
--- a/widgetsTS/taxiRouteReplay2/widget.js
+++ b/widgetsTS/taxiRouteReplay2/widget.js
@@ -14,7 +14,6 @@
}
reloadData(new_taxi_sn) {
- console.log(new_taxi_sn,"reload")
this.viewWindow.resetStartQueryTaxiDataText(new_taxi_sn);
this.taxi_sn = new_taxi_sn;
@@ -78,7 +77,6 @@
position2 = Cesium.Cartesian3.fromDegrees(lng2, lat2);
}
item = changeNullAndundefinedToEmpty(item)
- // console.log(item,"璺嚎item",item[this.qindex])
let graphic = new mars3d.graphic.PolylineEntity({
positions: [position,position2],
style: {
@@ -220,8 +218,6 @@
//姣忎釜绐楀彛鍒涘缓瀹屾垚鍚庤皟鐢�
winCreateOK(opt, result) {
this.viewWindow = result;
- console.log(this)
- console.log(this.config.params,"this.taxi_sn")
this.appDateHourStart = mars3d.global_variables.queryDataTStartTaxi;
this.appDateHourEnd = mars3d.global_variables.queryDataTEnd;
this.nodejs_url_predix = mars3d.global_variables.nodejs_url_predix;
@@ -231,7 +227,6 @@
}
//鎵撳紑婵�娲�
activate() {
- console.log(this,"this.map")
this.map.addLayer(this.groupLayer);
this.map.clock.shouldAnimate = false;
this.old_map_clock_startTime = this.map.clock.startTime;
@@ -288,7 +283,6 @@
this.map.clock.currentTime = Cesium.JulianDate.fromDate(new Date(this.appDateHourStart));
this.map.clock.stopTime = Cesium.JulianDate.fromDate(new Date(this.appDateHourEnd));
this.map.clock.multiplier = 2.0;
- console.log(this.map._layerCache["1004"].options.show,"taxi_layer.shouw")
}
//============寮�濮嬭瑙掕窡闅�=============
--
Gitblit v1.9.1