Commit 48049a07 authored by liyuanhong's avatar liyuanhong

修复了模拟器版本上报bug

parent cded76cf
......@@ -98,7 +98,7 @@ class MessageSimulaterService():
verObj = TerminalVersionInfo_msg()
time.sleep(0.5)
msg = verObj.generateMsg_GUI(msgID="0205",phoneNum=int(self.data["phoneNum"]),msgWaterCode=self.sn,encryptionType=0,subPkg=0, \
softwareVersion=self.data["version"]["softwareVersion"], softwareVersionDate=self.data["version"]["softwareVersionDate"], CPUId=self.data["version"]["softwareVersionDate"], \
softwareVersion=self.data["version"]["softwareVersion"], softwareVersionDate=self.data["version"]["softwareVersionDate"], CPUId=self.data["version"]["CPUId"], \
GMSType=self.data["version"]["GMSType"], GMS_IMEI=self.data["version"]["GMS_IMEI"], SIM_IMSI=self.data["version"]["SIM_IMSI"], \
SIM_ICCID=self.data["version"]["SIM_ICCID"],carType=int(self.data["version"]["carType"]), VIN=self.data["version"]["VIN"], \
totalMileage=int(self.data["version"]["totalMileage"]), totalOilExpend=int(self.data["version"]["totalOilExpend"]), \
......
......@@ -117,6 +117,7 @@
<button id="unConnectAll_B" type="button" class="btn btn-danger" onclick="reset()">复位</button>
<button id="clear_B" type="button" class="btn btn-warning" onclick="clearlog()">清空日志</button>
<span style="margin-left:20px;"><label>当前状态:</label><input id="curStatus" value="断网" disabled="disabled" class="form-control" style="font-weight: bold;width:85px;color:red;border-width: 1px; border-style: solid; border-color: darkgray; border-radius: 10px;"></span>
<span style="width:80px;padding-left:10px;"><label style="width:70px"><input type="checkbox" id="ignition" onclick="isLogShow(this)"/>隐藏日志</label> </span>
</div>
<div style="width:100%;padding-bottom:60px;border-bottom: 1px solid #eee;">
<h3>日志:</h3>
......@@ -331,6 +332,7 @@ function isShowLoginArea(e){
client = "0"
ws = null;
i = 1;
showLog = true; //设置日志是否显示
(function(){
ws = null;
i = 1;
......@@ -357,7 +359,9 @@ function startWebSocket(){
text = text + "[" + curTime + "] " + received_msg["msg"] + "\n";
$('#showFeedback').scrollTop($('#showFeedback')[0].scrollHeight);
}
$("#showFeedback").val(text)
if(showLog){
$("#showFeedback").val(text);
}
};
ws.onclose = function(){
alert("连接已关闭..."); // 关闭 websocket
......@@ -454,5 +458,14 @@ $("#searchCarData").click(function(){
}
});
});
//设置隐藏或显示日志
function isLogShow(e){
if($(e).is(':checked')){
showLog = false;
}else{
showLog = true;
}
}
</script>
{% endblock %}
\ No newline at end of file
......@@ -34,7 +34,7 @@
<ul class="nav nav-pills" style="font-size:14px;">
<li role="presentation"><a id="terminalHeartBeat_msg" {% if arg.path[2]=="heartBeat_msg_page" %} class="link-tab" {% endif %} onclick="messageManTab(this)">心跳消息</b></a></li>
<li role="presentation"><a id="terminalRegister_msg" {% if arg.path[2]=="terminalRegister_msg_page" %} class="link-tab" {% endif %} onclick="messageManTab(this)">终端注册</b></a></li>
<li role="presentation"><a id="terminalVersionInfoUpload_msg" {% if arg.path[2]=="terminalVersionInfoUpload_msg_page" %} class="link-tab" {% endif %} onclick="messageManTab(this)">终端版本信息主动上报</b></a></li>
<li role="presentation"><a id="terminalVersionInfoUpload_msg" {% if arg.path[2]=="terminalVersionInfoUpload_msg_page" %} class="link-tab" {% endif %} onclick="messageManTab(this)">终端版本信息上报</b></a></li>
<li role="presentation"><a id="dataUpstreamTransport_msg" {% if arg.path[2]=="dataUpstreamTransport_msg_page" or arg.path[2]=="dataUpstreamTransport_msg_f2_page" or arg.path[2]=="dataUpstreamTransport_msg_f3_page" or arg.path[2]=="dataUpstreamTransport_msg_f4_page" %} class="link-tab" {% endif %} onclick="messageManTab(this)">数据上行透传</b></a></li>
<li role="presentation"><a id="location_msg" {% if arg.path[2]=="location_msg_page" %} class="link-tab" {% endif %} onclick="messageManTab(this)">位置信息汇报</b></a></li>
<!-- <li role="presentation"><a id="style_index2" {% if arg.path[2]=="2" %} class="link-tab" {% endif %} onclick="messageManTab(this)">其他报文</b></a></li>-->
......
......@@ -107,6 +107,7 @@
<button id="unConnectAll_B" type="button" class="btn btn-danger" onclick="reset()">复位</button>
<button id="clear_B" type="button" class="btn btn-warning" onclick="clearlog()">清空日志</button>
<span style="margin-left:20px;"><label>当前状态:</label><input id="curStatus" value="断网" disabled="disabled" class="form-control" style="font-weight: bold;width:85px;color:red;border-width: 1px; border-style: solid; border-color: darkgray; border-radius: 10px;"></span>
<span style="width:80px;padding-left:10px;"><label style="width:70px"><input type="checkbox" id="ignition" onclick="isLogShow(this)"/>隐藏日志</label> </span>
</div>
<div style="width:100%;padding-bottom:60px;border-bottom: 1px solid #eee;">
<h3>日志:</h3>
......@@ -300,6 +301,7 @@ function isShowLoginArea(e){
client = "0"
ws = null;
i = 1;
showLog = true; //设置日志是否显示
(function(){
ws = null;
i = 1;
......@@ -326,7 +328,9 @@ function WebSocketTest(){
text = text + "[" + curTime + "] " + received_msg["msg"] + "\n";
$('#showFeedback').scrollTop($('#showFeedback')[0].scrollHeight);
}
$("#showFeedback").val(text)
if(showLog){
$("#showFeedback").val(text);
}
};
ws.onclose = function(){
alert("连接已关闭..."); // 关闭 websocket
......@@ -423,6 +427,15 @@ $("#searchCarData").click(function(){
}
});
});
//设置隐藏或显示日志
function isLogShow(e){
if($(e).is(':checked')){
showLog = false;
}else{
showLog = true;
}
}
</script>
{% endblock %}
</div>
......
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