90 lines
3.3 KiB
HTML
90 lines
3.3 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en" id="container" onmousedown="startDrag(event)" onmouseup="stopDrag(event)" onmousemove="dragging(event)" style="overflow-x: hidden;
|
|
overflow-y: hidden; ">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<script src="../jquery-2.1.0.min.js"></script>
|
|
<script type="text/javascript">
|
|
var EditRestChargeStation_Sch=0;
|
|
var AGV_ID=0;
|
|
var Default_Rest_NodeID=0;
|
|
var Default_Charge_NodeID=0;
|
|
|
|
function SketchLeftEditRestChargeStationMainPostMessage(str){
|
|
parent.window.postMessage(
|
|
str,
|
|
"*" //or "www.parentpage.com"
|
|
);
|
|
}
|
|
|
|
function client_request_left_editrestchargestation_main(str){
|
|
window.parent.parent.postMessage(
|
|
{
|
|
event_id: 'client_request_left_editrestchargestation_main',
|
|
data: {
|
|
v1: str
|
|
}
|
|
},
|
|
"*" //or "www.parentpage.com"
|
|
);
|
|
}
|
|
|
|
|
|
function receiveMessage(event) {
|
|
if (event.data.event_id == "client_response_left_editrestchargestation_main") {
|
|
document.getElementById('LeftEditRestChargeStationIframe').contentWindow.postMessage(
|
|
event.data
|
|
);
|
|
return;
|
|
}
|
|
var frame = event.data.split('#');
|
|
var head = frame[0].split(':');
|
|
|
|
switch (head[0]) {
|
|
case 'EditRestChargeStationSch0': {
|
|
window.open('HMI_Sketch_Left_EditRestChargeStation_Sch1.html', 'LeftEditRestChargeStationIframe');
|
|
EditRestChargeStation_Sch = 1;
|
|
}
|
|
break;
|
|
case 'EditRestChargeStationSch1_GetSimulationVehicleTable':{
|
|
client_request_left_editrestchargestation_main("GetSimulationVehicleTable");
|
|
}
|
|
break;
|
|
case 'EditRestChargeStationSch1':{
|
|
var data = head[1].split(',');
|
|
AGV_ID = parseInt(data[0]);
|
|
Default_Rest_NodeID = parseInt(data[1]);
|
|
Default_Charge_NodeID = parseInt(data[2]);
|
|
window.open('HMI_Sketch_Left_EditRestChargeStation_Sch2.html', 'LeftEditRestChargeStationIframe');
|
|
EditRestChargeStation_Sch = 2;
|
|
}
|
|
break;
|
|
case 'EditRestChargeStationSch2':{
|
|
var data=head[1];
|
|
if(data=="OK"){
|
|
client_request_left_editrestchargestation_main("SetSimulationVehicleTable:"+AGV_ID+";"+Default_Rest_NodeID+";"+Default_Charge_NodeID+";"+"#");
|
|
}
|
|
SketchLeftEditRestChargeStationMainPostMessage("Main");
|
|
}
|
|
break;
|
|
}
|
|
}
|
|
|
|
window.addEventListener("message", receiveMessage, false);
|
|
|
|
function Timer(){
|
|
|
|
}
|
|
|
|
window.setInterval("Timer()",100);
|
|
</script>
|
|
<title>Title</title>
|
|
</head>
|
|
<body>
|
|
HMI_Sketch_Left_EditRestChargeStation_Main
|
|
<div>
|
|
<iframe id="LeftEditRestChargeStationIframe" name="LeftEditRestChargeStationIframe" width=100% height=560 src="HMI_Sketch_Left_EditRestChargeStation_Sch0.html" frameborder="2" scrolling="auto"></iframe>
|
|
</div>
|
|
</body>
|
|
<script src="../js/drag.js"></script>
|
|
</html> |