100 lines
3.4 KiB
Plaintext
100 lines
3.4 KiB
Plaintext
<%@ page language="java" pageEncoding="UTF-8"%>
|
|
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
|
|
<style type="text/css">
|
|
.select2-container .select2-selection--single {
|
|
height: 34px;
|
|
line-height: 34px;
|
|
}
|
|
|
|
.select2-selection__arrow {
|
|
margin-top: 3px;
|
|
}
|
|
</style>
|
|
<script type="text/javascript">
|
|
$(function () {
|
|
//console.log("plan",eval('${plan}')[0]);
|
|
document.getElementById('PreviewFrame').src = '<%=request.getContextPath()%>/plan/doView.do?planId=' + eval('${plan}')[0].id;
|
|
createInteraction();
|
|
//浏览器当下窗口可视区域高度
|
|
$("#PreviewFrame").height($(document.body).height() * 0.5);
|
|
$(window).resize(function () {
|
|
$("#PreviewFrame").height($(document.body).height() * 0.5);
|
|
});
|
|
|
|
var px = [];
|
|
var row1 = { name: "一号", width: 1280 };
|
|
var row2 = { name: "二号", width: 1280 };
|
|
var row3 = { name: "三号", width: 1280 };
|
|
px.push(row1);
|
|
px.push(row2);
|
|
px.push(row3);
|
|
|
|
});
|
|
|
|
//构建交互按钮
|
|
function createInteraction() {
|
|
var plan = eval('${plan}')[0];
|
|
if (plan.planInteraction != null && plan.planInteraction != "") {
|
|
var interactions = plan.planInteraction;
|
|
//循环生成buttons
|
|
for (var i = 0; i < interactions.length; i++) {
|
|
var button = document.createElement("button");
|
|
button.setAttribute('type', "button");
|
|
button.setAttribute('class', interactions[i].btnclass);
|
|
button.setAttribute('style', interactions[i].btnstyle);
|
|
button.setAttribute('onclick', "interactionOnClick('" + interactions[i].id + "')");
|
|
button.innerText = interactions[i].name;
|
|
button.value = interactions[i].id;
|
|
//div.appendChild(button);
|
|
document.getElementById('interactionSheet').append(button);
|
|
}
|
|
}
|
|
}
|
|
|
|
//发送指令传递JSON 先表明是交互
|
|
function interactionOnClick(id) {
|
|
var jsonstr = "[{'type':'interaction','id':'" + id + "'}]";
|
|
websocket.send(jsonstr);
|
|
};
|
|
|
|
function OpenWindows() {
|
|
var planid=eval('${plan}')[0].id;
|
|
switchWindow = window.open(ext.contextPath + "/plan/doSwitch.do?planId="+planid, "大屏"
|
|
, 'channelmode=1,fullscreen=1,toolbar=0,location=0,directories=0,status=0,menubar=0,resizable=1,scrollbars=1,left=1366px');
|
|
}
|
|
</script>
|
|
<div class="box box-primary">
|
|
<div class="box-header with-border">
|
|
<button type="button" class="btn btn-default" onclick="doCollapse();"><i id="collapseIcon"
|
|
class="fa fa-arrow-left"></i></button>
|
|
<h3 class="box-title">方案预览</h3>
|
|
</div>
|
|
<!-- /.box-header -->
|
|
<div class="box-body ">
|
|
<div class="row">
|
|
<div class="col-lg-12 col-sm-12 col-md-12 col-xs-12">
|
|
<iframe width="100%" FRAMEBORDER="0" id="PreviewFrame" name="PreviewFrame" src=""></iframe>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="row">
|
|
<!-- 交互栏 -->
|
|
<div class="col-lg-12 col-sm-12 col-md-12 col-xs-12">
|
|
<div id="interactionSheet" class="btn-group">
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<br />
|
|
<div class="row">
|
|
<div class="col-lg-12 col-sm-12 col-md-12 col-xs-12">
|
|
<div style="width:20%;float:left;">
|
|
<button type="button" class="btn btn-info btn-lg" onclick="OpenWindows();">弹出页面</button>
|
|
</div>
|
|
<div style="width:20%;float:right;">
|
|
<button type="button" class="btn btn-success btn-lg" id="Putin" disabled="disabled">投至大屏</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div> |