static
This commit is contained in:
@@ -0,0 +1,75 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<script type="text/javascript" src="Lu_Mapping_Bosch_Driver.js"></script>
|
||||
<script type="text/javascript" type="text/javascript">
|
||||
|
||||
function MappingLeftBoschMappingSch1PostMessage(str){
|
||||
parent.window.postMessage(
|
||||
str,
|
||||
"*" //or "www.parentpage.com"
|
||||
);
|
||||
}
|
||||
|
||||
function receiveMessage(event) {
|
||||
switch(event.data.event_id){
|
||||
case "client_response_left_boschmapping_main":{//case "client_response":{
|
||||
var data=event.data.data;
|
||||
var result=data.v1;
|
||||
var ROS_String_Output=data.v2;
|
||||
var Rec_HMI_String_Input=data.v3;
|
||||
document.getElementById('result').innerText='result='+result;
|
||||
document.getElementById('ROS_String_Output').innerText='ROS_String_Output='+ROS_String_Output;
|
||||
document.getElementById('Rec_HMI_String_Input').innerText='Rec_HMI_String_Input='+Rec_HMI_String_Input;
|
||||
|
||||
var recordingNames_Arr=Lu_Parse_RecordingList(ROS_String_Output);
|
||||
|
||||
recordingNames_Arr.forEach((item,index)=>{
|
||||
if(!item){
|
||||
recordingNames_Arr.splice(index,1);//删除空项
|
||||
}
|
||||
else{
|
||||
var MyDiv =document.getElementById("output");
|
||||
var button = document.createElement("input");
|
||||
button.setAttribute("type", "button");
|
||||
button.setAttribute("value", recordingNames_Arr[index]);
|
||||
button.style.width = "80%";
|
||||
button.style.height = "50px";
|
||||
button.style.background="Cyan";
|
||||
button.setAttribute("onclick", "Button_BoschMapStart(this.value)");
|
||||
MyDiv.appendChild(button);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function MappingLeftBoschMappingList(str){
|
||||
parent.window.postMessage(
|
||||
str,
|
||||
"*" //or "www.parentpage.com"
|
||||
);
|
||||
}
|
||||
|
||||
function Button_BoschMapStart(recordingName){
|
||||
var str ="BoschMapping_Sch1$"+ "BoschMapStart:" + recordingName +"#";
|
||||
console.log(str);
|
||||
MappingLeftBoschMappingSch1PostMessage(str);
|
||||
}
|
||||
|
||||
|
||||
window.addEventListener("message", receiveMessage, false);
|
||||
</script>
|
||||
<title>Title</title>
|
||||
</head>
|
||||
<body>
|
||||
HMI_Mapping_Left_BoschMapping_Sch1
|
||||
<tr>
|
||||
<div id='result'></div>
|
||||
<div id='ROS_String_Output'></div>
|
||||
<div id='Rec_HMI_String_Input'></div>
|
||||
</tr>
|
||||
<div id="output"></div>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user