Commit db41ae35 authored by liyuanhong's avatar liyuanhong

地图工具修改了轨迹编辑弹窗

parent 30876794
...@@ -53,7 +53,7 @@ ...@@ -53,7 +53,7 @@
<h5>地址:<p style="display:inline;" id="curLngLatInfo"></p></h5> <h5>地址:<p style="display:inline;" id="curLngLatInfo"></p></h5>
</div> </div>
</div> </div>
<div id="ctrArea_2" style="width:400px;height:280px;background:white;z-index:50;position:absolute;top:160px;right:40px;border-radius:5px;display:none;" class="btn-group btn-group-justified" role="group"> <div id="ctrArea_2" style="width:400px;height:340px;background:white;z-index:50;position:absolute;top:160px;right:40px;border-radius:5px;display:none;" class="btn-group btn-group-justified" role="group">
<div style="margin: 10px;padding-bottom: 5px;"> <div style="margin: 10px;padding-bottom: 5px;">
<label>轨迹录制:</label> <label>轨迹录制:</label>
<button type="button" class="btn btn-default" onclick="changeRecodeStatusOn()">开始录制</button> <button type="button" class="btn btn-default" onclick="changeRecodeStatusOn()">开始录制</button>
......
...@@ -193,6 +193,7 @@ ...@@ -193,6 +193,7 @@
<span style="margin-left:10px;display: inline-block;"><label>油耗(Km/L):</label><input style="width:80px;margin-right:5px;" id="change_oilExpend" type="text" class="form-control" value="10"><button type="button" class="btn btn-primary" onclick="changeOilExpend()">改变油耗</button></span> <span style="margin-left:10px;display: inline-block;"><label>油耗(Km/L):</label><input style="width:80px;margin-right:5px;" id="change_oilExpend" type="text" class="form-control" value="10"><button type="button" class="btn btn-primary" onclick="changeOilExpend()">改变油耗</button></span>
<span style="margin-left:10px;display: inline-block;"><label>上报间隔(秒):</label><input style="width:80px;margin-right:5px;" id="change_durTime" type="text" class="form-control" value="5"><button type="button" class="btn btn-primary" onclick="changeDurTime()">改变上报间隔</button></span> <span style="margin-left:10px;display: inline-block;"><label>上报间隔(秒):</label><input style="width:80px;margin-right:5px;" id="change_durTime" type="text" class="form-control" value="5"><button type="button" class="btn btn-primary" onclick="changeDurTime()">改变上报间隔</button></span>
<span style="margin-left:10px;display: inline-block;"><button title="点击后,将会把上报的消息存到本地,不上报消息;用来模拟车机无信号的情况" type="button" class="btn btn-primary" onclick="storeMsg()" id="storeMsgBut">存储上报消息</button><label style="color:red;" id="storeMsgLab">未存储...</label></span> <span style="margin-left:10px;display: inline-block;"><button title="点击后,将会把上报的消息存到本地,不上报消息;用来模拟车机无信号的情况" type="button" class="btn btn-primary" onclick="storeMsg()" id="storeMsgBut">存储上报消息</button><label style="color:red;" id="storeMsgLab">未存储...</label></span>
<span style="margin-left:10px;display: inline-block;"><button type="button" class="btn btn-primary" onclick="sendStoreMsg()">补报存储消息</button></span>
<span style="margin-left:10px;display: inline-block;"><label>剩余油量(%):</label><input style="width:80px;margin-right:5px;" id="change_surplusOil" type="text" class="form-control" value="50.5"><button type="button" class="btn btn-primary" onclick="changeSurplusOil()">改变剩余油量</button></span> <span style="margin-left:10px;display: inline-block;"><label>剩余油量(%):</label><input style="width:80px;margin-right:5px;" id="change_surplusOil" type="text" class="form-control" value="50.5"><button type="button" class="btn btn-primary" onclick="changeSurplusOil()">改变剩余油量</button></span>
<span style="margin-left:10px;display: inline-block;"><label>发动机转速:</label><input style="width:80px;margin-right:5px;" id="change_engineSpeed" type="text" class="form-control" value="3000"><button type="button" class="btn btn-primary" onclick="changeEngineSpeed()">改变发动机转速</button></span> <span style="margin-left:10px;display: inline-block;"><label>发动机转速:</label><input style="width:80px;margin-right:5px;" id="change_engineSpeed" type="text" class="form-control" value="3000"><button type="button" class="btn btn-primary" onclick="changeEngineSpeed()">改变发动机转速</button></span>
<span style="margin-top:10px;display:inline-block;border-width:1px;border-style:solid;border-color:darkgray;border-radius:10px;padding:1px 10px;margin-left:10px;"> <span style="margin-top:10px;display:inline-block;border-width:1px;border-style:solid;border-color:darkgray;border-radius:10px;padding:1px 10px;margin-left:10px;">
...@@ -1124,6 +1125,18 @@ function storeMsg(){ ...@@ -1124,6 +1125,18 @@ function storeMsg(){
}); });
} }
} }
//手动补报消息
function sendStoreMsg(){
var data = {}
var carId = $("#carId").val()
data["carId"] = carId
//会话session数据
data["session"] = {}
var sessionId = $("#curSession").val()
data["session"]["sessionId"] = sessionId
url = "/protocolTools/M_carSimulater_process/sendStoreMsg";
sendjson(data,url);
}
//控制GPS是否有效 //控制GPS是否有效
function changeGPSValid(e){ function changeGPSValid(e){
var data = {} var data = {}
......
...@@ -1671,6 +1671,37 @@ def controlStoreMsg(): ...@@ -1671,6 +1671,37 @@ def controlStoreMsg():
data["message"] = "Error: 控制是否存储消息到本地失败!" data["message"] = "Error: 控制是否存储消息到本地失败!"
return Response(json.dumps(data), mimetype='application/json') return Response(json.dumps(data), mimetype='application/json')
##########################################
# 【接口类型】补报存储的数据
##########################################
@M_carSimulater_process.route("/sendStoreMsg", methods=['POST'])
def sendStoreMsg():
params = request.get_data()
params = json.loads(params.decode("utf-8"))
sessionId = params["session"]["sessionId"]
data = {}
if not sessionId in connects.keys():
data["status"] = "4003"
data["message"] = "Error: 未启动服务,不可补报存储的消息!"
return Response(json.dumps(data), mimetype='application/json')
service = connects[sessionId]["service"]
try:
# 数据补报
if(os.path.exists("data/protocolTools/sendMsg/" + params["carId"])):
ds = DelaySend(params["carId"], service)
ds.sendDelayMsgs()
else:
pass
data["status"] = "200"
data["message"] = "补报消息发送成功!"
except BaseException as e:
# 打印异常信息
traceback.print_exc()
data["status"] = "4003"
data["message"] = "Error: 控制是否存储消息到本地失败!"
return Response(json.dumps(data), mimetype='application/json')
########################################## ##########################################
# 【接口类型】改变剩余油量 # 【接口类型】改变剩余油量
########################################## ##########################################
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment