40 lines
818 B
HTML
40 lines
818 B
HTML
|
<main id="js-page-content" role="main" class="page-content">
|
||
|
<h1 class="p-2 mb-0">太陽能管理</h1>
|
||
|
<div class="row">
|
||
|
<div class="col-sm-12 col-xl-12">
|
||
|
<div id="pageIframe" ></div>
|
||
|
</div>
|
||
|
</div>
|
||
|
</main>
|
||
|
|
||
|
<style>
|
||
|
|
||
|
</style>
|
||
|
|
||
|
<script>
|
||
|
|
||
|
$(function () {
|
||
|
initPage();
|
||
|
});
|
||
|
|
||
|
function initPage() {
|
||
|
// 初始載入 iframe
|
||
|
$('#pageIframe').html(`
|
||
|
<iframe src="/ord?file:^Solar/Site.px|view:?fullScreen=true"
|
||
|
width="100%"
|
||
|
height="600">
|
||
|
</iframe>
|
||
|
`);
|
||
|
// 監聽 iframe 中的點擊事件
|
||
|
$('#pageIframe iframe').on('load', function() {
|
||
|
$(this).contents().on('click', function() {
|
||
|
sessionStorage.setItem("solar", JSON.stringify({'siteID': "133", 'siteName': "大眾電腦內湖總部"}));
|
||
|
$("#app").load(`_solarEnergyItem.html`);
|
||
|
});
|
||
|
});
|
||
|
|
||
|
|
||
|
}
|
||
|
|
||
|
</script>
|