Commit 6c14a8a6 authored by liyuanhong's avatar liyuanhong

M500 事件报文页面开发完成

parent 2f22a080
{"time": {"dateTime": "2020-04-14 11:32:27", "date": "2020-04-14", "time": "11:32:27"}, "curDayTravel": {"todayTotalMilleage": 4375, "todayTotalOil": 400, "todayTotalTime": 265, "theMilleage": 640, "theOil": 40, "theTime": 40}, "travelData": {"totallMilleage": 0, "totalOil": 0, "totalTime": 0}}
\ No newline at end of file
...@@ -251,7 +251,11 @@ class EventReport_protocol(ProtocolBase): ...@@ -251,7 +251,11 @@ class EventReport_protocol(ProtocolBase):
eventObj = EventClass() eventObj = EventClass()
theData = eventObj.lowGearHighSpeedAlarm(int(eventData["0036"]["alarmType"]),int(eventData["0036"]["durationTime"])) theData = eventObj.lowGearHighSpeedAlarm(int(eventData["0036"]["alarmType"]),int(eventData["0036"]["durationTime"]))
data = data + "0037" + self.int2hexStringByBytes(int((len(theData) / 2)), 2) + theData data = data + "0037" + self.int2hexStringByBytes(int((len(theData) / 2)), 2) + theData
print(data) if ("004A" in eventData.keys()): #高档低速报警
dataNums = dataNums + 1
eventObj = EventClass()
theData = eventObj.surplusOilAlarm(int(eventData["004A"]["surplusOilType"]),int(eventData["004A"]["value"]))
data = data + "004A" + self.int2hexStringByBytes(int((len(theData) / 2)), 2) + theData
dataNumsHex = self.int2hexString(int(dataNums)) dataNumsHex = self.int2hexString(int(dataNums))
data = dataNumsHex +data data = dataNumsHex +data
return data return data
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
<h5><b>设置事件携带的GPS数据包:</b> <h5><b>设置事件携带的GPS数据包:</b>
<span style="border-width:1px;border-style:solid;border-color:darkgray;border-radius:10px;padding:1px 10px;"> <span style="border-width:1px;border-style:solid;border-color:darkgray;border-radius:10px;padding:1px 10px;">
<label><input name="gps" type="radio" value="0" checked="checked" onclick="isShowGspArea(this)"/>隐藏</label> <label><input name="gps" type="radio" value="0" checked="checked" onclick="isShowGspArea(this)"/>隐藏</label>
<label><input name="gps" type="radio" value="1" onclick="isShowGspArea(this)"/>显示</label> <label style="margin-left:10px;"><input name="gps" type="radio" value="1" onclick="isShowGspArea(this)"/>显示</label>
</span> </span>
</h5> </h5>
<div style="display:none;" id="gps_area"> <div style="display:none;" id="gps_area">
...@@ -67,7 +67,7 @@ ...@@ -67,7 +67,7 @@
<h5><b>设置事件携带的安防数据包(有些事件需要携带):</b> <h5><b>设置事件携带的安防数据包(有些事件需要携带):</b>
<span style="border-width:1px;border-style:solid;border-color:darkgray;border-radius:10px;padding:1px 10px;"> <span style="border-width:1px;border-style:solid;border-color:darkgray;border-radius:10px;padding:1px 10px;">
<label><input name="security" type="radio" value="0" checked="checked" onclick="isShowSecurityArea(this)"/>隐藏</label> <label><input name="security" type="radio" value="0" checked="checked" onclick="isShowSecurityArea(this)"/>隐藏</label>
<label><input name="security" type="radio" value="1" onclick="isShowSecurityArea(this)"/>显示</label> <label style="margin-left:10px;"><input name="security" type="radio" value="1" onclick="isShowSecurityArea(this)"/>显示</label>
</span> </span>
</h5> </h5>
<div style="display:none;" id="security_area"> <div style="display:none;" id="security_area">
...@@ -303,19 +303,19 @@ ...@@ -303,19 +303,19 @@
<label style="padding: 0px 10px;"><input type="checkbox" id="0037" onclick="eventSelect(this)"/>高档低速报警 </label> <label style="padding: 0px 10px;"><input type="checkbox" id="0037" onclick="eventSelect(this)"/>高档低速报警 </label>
<label style="padding: 0px 10px;"><input type="checkbox" id="004A" onclick="eventSelect(this)"/>剩余油量异常告警 </label> <label style="padding: 0px 10px;"><input type="checkbox" id="004A" onclick="eventSelect(this)"/>剩余油量异常告警 </label>
</div> </div>
<div style="margin-top:10px;width:100%;border-width:1px;border-style:solid;border-color:darkgray;border-radius:10px;padding:2px;_background:skyblue;"> <div id="0010_area" style="display:none;margin-top:10px;width:100%;border-width:1px;border-style:solid;border-color:darkgray;border-radius:10px;padding:2px;_background:skyblue;">
<h5><b>点火事件:</b></h5> <h5><b>点火事件:</b></h5>
<span><label>急加速总次数:</label><input style="width:80px;" id="fire_allRapidlyAccelerateCount" type="text" class="form-control" value="5"></span> <span><label>急加速总次数:</label><input style="width:80px;" id="fire_allRapidlyAccelerateCount" type="text" class="form-control" value="5"></span>
<span><label>急减速总次数:</label><input style="width:80px;" id="fire_allSharpSlowdownCount" type="text" class="form-control" value="6"></span> <span><label>急减速总次数:</label><input style="width:80px;" id="fire_allSharpSlowdownCount" type="text" class="form-control" value="6"></span>
<span><label>急转弯总次数:</label><input style="width:80px;" id="fire_allSharpTurn" type="text" class="form-control" value="4"></span> <span><label>急转弯总次数:</label><input style="width:80px;" id="fire_allSharpTurn" type="text" class="form-control" value="4"></span>
</div> </div>
<div style="margin-top:10px;width:100%;border-width:1px;border-style:solid;border-color:darkgray;border-radius:10px;padding:2px;_background:skyblue;"> <div id="0011_area" style="display:none;margin-top:10px;width:100%;border-width:1px;border-style:solid;border-color:darkgray;border-radius:10px;padding:2px;_background:skyblue;">
<h5><b>熄火事件:</b></h5> <h5><b>熄火事件:</b></h5>
<span><label>急加速总次数:</label><input style="width:80px;" id="misfire_allRapidlyAccelerateCount" type="text" class="form-control" value="5"></span> <span><label>急加速总次数:</label><input style="width:80px;" id="misfire_allRapidlyAccelerateCount" type="text" class="form-control" value="5"></span>
<span><label>急减速总次数:</label><input style="width:80px;" id="misfire_allSharpSlowdownCount" type="text" class="form-control" value="6"></span> <span><label>急减速总次数:</label><input style="width:80px;" id="misfire_allSharpSlowdownCount" type="text" class="form-control" value="6"></span>
<span><label>急转弯总次数:</label><input style="width:80px;" id="misfire_allSharpTurn" type="text" class="form-control" value="4"></span> <span><label>急转弯总次数:</label><input style="width:80px;" id="misfire_allSharpTurn" type="text" class="form-control" value="4"></span>
</div> </div>
<div style="margin-top:10px;width:100%;border-width:1px;border-style:solid;border-color:darkgray;border-radius:10px;padding:2px;_background:skyblue;"> <div id="0036_area" style="display:none;margin-top:10px;width:100%;border-width:1px;border-style:solid;border-color:darkgray;border-radius:10px;padding:2px;_background:skyblue;">
<h5><b>低档高速报警:</b></h5> <h5><b>低档高速报警:</b></h5>
<span><label>报警属性:</label> <span><label>报警属性:</label>
<select id="alarmType_1" class="form-control" style="width:120px;"> <select id="alarmType_1" class="form-control" style="width:120px;">
...@@ -325,7 +325,7 @@ ...@@ -325,7 +325,7 @@
</span> </span>
<span><label>持续时间(秒):</label><input style="width:80px;" id="durationTime_1" type="text" class="form-control" value="6"></span> <span><label>持续时间(秒):</label><input style="width:80px;" id="durationTime_1" type="text" class="form-control" value="6"></span>
</div> </div>
<div style="margin-top:10px;width:100%;border-width:1px;border-style:solid;border-color:darkgray;border-radius:10px;padding:2px;_background:skyblue;"> <div id="0037_area" style="display:none;margin-top:10px;width:100%;border-width:1px;border-style:solid;border-color:darkgray;border-radius:10px;padding:2px;_background:skyblue;">
<h5><b>高档低速报警:</b></h5> <h5><b>高档低速报警:</b></h5>
<span><label>报警属性:</label> <span><label>报警属性:</label>
<select id="alarmType_2" class="form-control" style="width:120px;"> <select id="alarmType_2" class="form-control" style="width:120px;">
...@@ -335,12 +335,12 @@ ...@@ -335,12 +335,12 @@
</span> </span>
<span><label>持续时间(秒):</label><input style="width:80px;" id="durationTime_2" type="text" class="form-control" value="6"></span> <span><label>持续时间(秒):</label><input style="width:80px;" id="durationTime_2" type="text" class="form-control" value="6"></span>
</div> </div>
<div style="margin-top:10px;width:100%;border-width:1px;border-style:solid;border-color:darkgray;border-radius:10px;padding:2px;_background:skyblue;"> <div id="004A_area" style="display:none;margin-top:10px;width:100%;border-width:1px;border-style:solid;border-color:darkgray;border-radius:10px;padding:2px;_background:skyblue;">
<h5><b>剩余油量异常告警附:</b></h5> <h5><b>剩余油量异常告警附:</b></h5>
<span><label>剩余油量单位:</label> <span><label>剩余油量单位:</label>
<select id="surplusOilType" class="form-control" style="width:120px;"> <select id="surplusOilType" class="form-control" style="width:140px;">
<option value="1">升(L)</option>
<option value="0">百分比(%)</option> <option value="0">百分比(%)</option>
<option value="1">升(L)</option>
</select> </select>
</span> </span>
<span><label>异常值:</label><input style="width:80px;" id="surplusOil_value" type="text" class="form-control" value="6"></span> <span><label>异常值:</label><input style="width:80px;" id="surplusOil_value" type="text" class="form-control" value="6"></span>
...@@ -579,7 +579,10 @@ function get0037(){ //高档低速报 ...@@ -579,7 +579,10 @@ function get0037(){ //高档低速报
return data; return data;
} }
function get004A(){ //剩余油量异常告警 function get004A(){ //剩余油量异常告警
return {}; data = {};
data["surplusOilType"] = $("#surplusOilType").val();
data["value"] = $("#surplusOil_value").val();
return data;
} }
//gps区域的隐藏与显示 //gps区域的隐藏与显示
function isShowGspArea(e){ function isShowGspArea(e){
...@@ -601,8 +604,32 @@ function isShowSecurityArea(e){ ...@@ -601,8 +604,32 @@ function isShowSecurityArea(e){
} }
//事件多选按钮的处理事项 //事件多选按钮的处理事项
function eventSelect(){ function eventSelect(e){
if($(e).is(':checked')){
if($(e).attr("id") == "0010"){
$("#0010_area").css("display","block")
}else if($(e).attr("id") == "0011"){
$("#0011_area").css("display","block")
}else if($(e).attr("id") == "0036"){
$("#0036_area").css("display","block")
}else if($(e).attr("id") == "0037"){
$("#0037_area").css("display","block")
}else if($(e).attr("id") == "004A"){
$("#004A_area").css("display","block")
}
}else{
if($(e).attr("id") == "0010"){
$("#0010_area").css("display","none")
}else if($(e).attr("id") == "0011"){
$("#0011_area").css("display","none")
}else if($(e).attr("id") == "0036"){
$("#0036_area").css("display","none")
}else if($(e).attr("id") == "0037"){
$("#0037_area").css("display","none")
}else if($(e).attr("id") == "004A"){
$("#004A_area").css("display","none")
}
}
} }
//设置当前时间到UTC时间输入框 //设置当前时间到UTC时间输入框
......
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