Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
new-socketemulator
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
李远洪
new-socketemulator
Commits
db41ae35
Commit
db41ae35
authored
Dec 03, 2020
by
liyuanhong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
地图工具修改了轨迹编辑弹窗
parent
30876794
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
45 additions
and
1 deletion
+45
-1
templates/otherTools/maptool.html
templates/otherTools/maptool.html
+1
-1
templates/protocolTools/report/M_carSimulater_page.html
templates/protocolTools/report/M_carSimulater_page.html
+13
-0
views/protocolTools/M_carSimulater_process.py
views/protocolTools/M_carSimulater_process.py
+31
-0
No files found.
templates/otherTools/maptool.html
View file @
db41ae35
...
@@ -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:
28
0px;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:
34
0px;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>
...
...
templates/protocolTools/report/M_carSimulater_page.html
View file @
db41ae35
...
@@ -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
=
{}
...
...
views/protocolTools/M_carSimulater_process.py
View file @
db41ae35
...
@@ -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'
)
##########################################
##########################################
# 【接口类型】改变剩余油量
# 【接口类型】改变剩余油量
##########################################
##########################################
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment