| <!DOCTYPE html> | 
| <html> | 
|   | 
| <head> | 
|     <meta charset="UTF-8"> | 
|     <title>轨迹飞行</title> | 
|     <link href="../../libs/layui/css/layui.css" rel="stylesheet"> | 
|     <script type="text/javascript" src="../../libs/jquery/jquery-3.5.1.min.js"></script> | 
|     <script type="text/javascript" src="../../libs/layui/layui.js"></script> | 
|     <link rel="stylesheet" href="//at.alicdn.com/t/font_2599272_671fgrsk7ev.css"> | 
|     <style> | 
|         .romadiv { | 
|             overflow-x: hidden; | 
|             overflow-y: auto; | 
|             padding: 0; | 
|         } | 
|   | 
|         .mt-content-head { | 
|             width: 100%; | 
|             height: 30px; | 
|             line-height: 30px; | 
|             text-align: center; | 
|             margin-top: 10px; | 
|         } | 
|   | 
|         .mt-table-content { | 
|             /* margin-top: 10px; */ | 
|             height: 500px; | 
|             color: white; | 
|             width: 100%; | 
|             border: 1px white solid; | 
|             border-radius: 15px; | 
|             /* width: 250px; */ | 
|             float: left; | 
|             /* margin-left: 10px; */ | 
|         } | 
|   | 
|         .mt-table-head { | 
|             width: 300px; | 
|             /* height: 50px; */ | 
|             /* margin-top: 15px; */ | 
|             /* font-size: 24px; */ | 
|         } | 
|   | 
|         .mt-table-row { | 
|             height: 30px; | 
|             /* margin-top: 15px; */ | 
|         } | 
|   | 
|         .mt-table-row-left { | 
|             margin: 0px; | 
|             padding-left: 10px; | 
|             width: 200px; | 
|             border-bottom: solid 1px white; | 
|             border-right: solid 1px white; | 
|         } | 
|   | 
|         .mt-table-row-right { | 
|             margin: 0px; | 
|             padding-left: 10px; | 
|             width: 78px; | 
|             border-bottom: solid 1px white; | 
|             overflow: hidden; | 
|             text-overflow:ellipsis; | 
|             white-space: nowrap; | 
|         } | 
|   | 
|         .mt-table-row-label { | 
|             color: white; | 
|             float: left; | 
|             line-height: 30px; | 
|             font-size: 12px; | 
|         } | 
|   | 
|         .iconfont { | 
|             font-size: 13px; | 
|         } | 
|   | 
|         .mybtn-blue { | 
|             color: #fff; | 
|             background-color: #1E9FFF; | 
|             border-color: #1E9FFF; | 
|         } | 
|         .mybtn-yellow { | 
|             color: #fff; | 
|             background-color: #FFB800; | 
|             border-color: #FFB800; | 
|         } | 
|   | 
|         .mybtn-green { | 
|             color: #fff; | 
|             background-color: #009688; | 
|             border-color: #009688; | 
|         } | 
|         .mybtn-red { | 
|             color: #fff; | 
|             background-color: #FF5722; | 
|             border-color: #FF5722; | 
|         } | 
|     </style> | 
| </head> | 
|   | 
| <body> | 
|   | 
|     <div class="romadiv" action=""> | 
|         <div class="mt-row"> | 
|             <div class="mt-content-head"> | 
|                 <button type="button" class="layui-btn mybtn-blue  layui-btn-sm" onclick="roamDraw()"> | 
|                     <i class="layui-icon-release"></i>绘制路径</button> | 
|                 <button type="button" class="layui-btn mybtn-red  layui-btn-sm" onclick="roamImport()">导入</button> | 
|                 <button type="button" class="layui-btn mybtn-green  layui-btn-sm" onclick="roamExport()">导出</button> | 
|             </div> | 
|         </div> | 
|         <div class="mt-table-content" style="margin-top: 5px;"> | 
|             <div class="mt-table-head"> | 
|                 <div class="mt-table-row-left mt-table-row-label">名称</div> | 
|                 <div class="mt-table-row-right mt-table-row-label ">操作</div> | 
|             </div> | 
|             <div id="view"></div> | 
|             <!-- <div class="mt-table-row"> | 
|                 <div class="mt-table-row-left mt-table-row-label">默认飞行</div> | 
|                 <div class="mt-table-row-right mt-table-row-label "> | 
|                     <div style="display:inline" onclick="roamFly()"> <i class="iconfont icon-manyou"></i></div> | 
|                     <div style="display:inline" onclick="roamEdit()"> <i class="iconfont icon-huitu"></i></div> | 
|                     <div style="display:inline" onclick="roamDelete()"> <i class="iconfont icon-shanchu"></i></div> | 
|   | 
|                 </div> | 
|             </div> --> | 
|             <!-- <button type="button" class="layui-btn mybtn  layui-btn-sm" onclick="roamFly()">第一人称漫游</button> --> | 
|             <!-- <button type="button" class="layui-btn mybtn  layui-btn-sm" onclick="stopRoaming()">结束漫游</button> --> | 
|             <!-- <button type="button" class="layui-btn mybtn  layui-btn-sm" onclick="camera()">视角</button> --> | 
|   | 
|         </div> | 
|         <script id="demo" type="text/html"> | 
|             <div> | 
|             {{#  layui.each(d.list, function(index, item){ }} | 
|             <div class="mt-table-row"> | 
|                 <div class="mt-table-row-left mt-table-row-label">{{item.name}}</div> | 
|                 <div class="mt-table-row-right mt-table-row-label "> | 
|                     <div style="display:inline" onclick="roamFly({{index}})"> <i class="iconfont icon-manyou"></i></div> | 
|                     <div style="display:inline" onclick="roamEdit({{index}})"> <i class="iconfont icon-huitu"></i></div> | 
|                     <div style="display:inline" onclick="roamDelete({{index}})"> <i class="iconfont icon-shanchu"></i></div> | 
|                 </div> | 
|             </div> | 
|             {{#  }); }} | 
|             {{#  if(d.list.length === 0){ }} | 
|               无数据 | 
|             {{#  } }}  | 
|             </div> | 
|         </script> | 
|     </div> | 
|     <script> | 
|         var data = parent.roamData; | 
|   | 
|         refreshTPL(); | 
|   | 
|         function refreshTPL() { | 
|             layui.use('laytpl', function () { | 
|                 var laytpl = layui.laytpl; | 
|                 var getTpl = demo.innerHTML | 
|                     , view = document.getElementById('view'); | 
|                 laytpl(getTpl).render(data, function (html) { | 
|                     view.innerHTML = html; | 
|                 }); | 
|             }); | 
|         } | 
|   | 
|         function roamDraw(index) { | 
|             parent.drawRoamLine(); | 
|         }; | 
|         function roamImport() { | 
|   | 
|         } | 
|         function roamExport() { | 
|   | 
|         } | 
|         function roamFly(index) { | 
|             parent.roamFlyPanel(data.list[index].name); | 
|             parent.roamFly2(data.list[index]); | 
|         } | 
|         function roamEdit(index) { | 
|             parent.drawRoamLine(index); | 
|             // parent.overlookCamera(); | 
|             // parent.roamDraw(); | 
|         } | 
|         function roamDelete(index) { | 
|             // parent.stopRoaming(); | 
|             data.list.splice(index, 1); | 
|             refreshTPL(); | 
|   | 
|         } | 
|     </script> | 
| </body> | 
|   | 
| </html> |