<!DOCTYPE html>
|
<html lang="zh-CN">
|
<head>
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
|
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
|
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
<meta name="renderer" content="webkit">
|
<title>智能机房管理平台-设备详细</title>
|
<link rel="stylesheet" type="text/css" href="./plugins/layui/css/layui.css"/>
|
<link rel="stylesheet" type="text/css" href="css/page/detail-ty.css"/>
|
</head>
|
|
<body class="pdgxq-body">
|
<div class="i-container div-body">
|
|
<div class="jmkt-main">
|
|
<div class="layui-fluid">
|
<div class="pdgxq-m1 layui-row layui-col-space20">
|
<div class="layui-col-lg5 layui-col-md5">
|
<div class="pdgxq-m1-left pdgxq-m1-box" style="">
|
<div class="pdgxq-H">
|
<h3><i></i>设备基本信息</h3>
|
</div>
|
|
<!-- 基本信息 -->
|
<div style="padding: 10px">
|
<div class="pdgxq-m2-right pdgxq-m2-box">
|
<p></p>
|
<p>设备名称:<span id="deviceName">未知设备#1</span></p>
|
<p>设备状态:<span id="deviceVld">激活</span></p>
|
<p style="display: none;">运维厂商:<span id="opVendor"></span></p>
|
|
<div class="pdgxq-phone" style="display: none;">
|
<h4>运维电话</h4>
|
<p id="opPhone"></p>
|
</div>
|
</div>
|
</div>
|
|
</div>
|
|
</div><!--pdgxq-m1-left end-->
|
|
<div class="layui-col-lg7 layui-col-md7">
|
|
<div class="pdgxq-m1-right pdgxq-m1-box" style="">
|
<div class="pdgxq-H">
|
<h3><i></i>实时监控</h3>
|
<div id="open" class="jmkt-tit-more kt" style="display: none;" onclick="sendAction(this.id);">
|
<button type="button" class="layui-btn layui-btn-normal pop-complete-btn"
|
style="background-color: #46b8da;color: #ffffff;margin-left: 10px;">开机</button>
|
</div>
|
<div id="stop" class="jmkt-tit-more kt" style="display: none;" onclick="sendAction(this.id);">
|
<button type="button" class="layui-btn layui-btn-normal pop-complete-btn"
|
style="background-color: #ff6600;color: #ffffff;margin-left: 10px;">关机</button>
|
</div>
|
<div id="mc_open" class="jmkt-tit-more mc" style="display: none" onclick="sendActionMC();">
|
<button type="button" class="layui-btn layui-btn-normal pop-complete-btn"
|
style="background-color: #ff6600;color: #ffffff;margin-left: 10px;">开门</button>
|
</div>
|
</div>
|
|
<div class="pdgxq-group clearfix">
|
<div class="pdgxq-group-item jmkt-chuli">
|
<span id="warnState">无</span>警告状态
|
</div>
|
<div class="pdgxq-group-item jmkt-yichuli">
|
<span id="conState">正常</span>通讯状态
|
</div>
|
</div>
|
|
<div class="pdgxq-table jmkt-table-wrap">
|
<div class="table-thead">
|
<table class="layui-table pdgxq-table1 poptable" lay-skin="nob">
|
<colgroup>
|
<col width="33%">
|
<col width="33%">
|
<col width="33%">
|
</colgroup>
|
<thead>
|
<tr>
|
<th>监控属性</th>
|
<th>监 控 值</th>
|
<th>更新时间</th>
|
</tr>
|
</thead>
|
</table>
|
</div>
|
<div class="table-tbody">
|
<table class="layui-table pdgxq-table1 poptable" lay-skin="nob">
|
<colgroup>
|
<col width="33%">
|
<col width="33%">
|
<col width="33%">
|
</colgroup>
|
<tbody id="listData">
|
<!-- <tr>-->
|
<!-- <td>通讯状态</td>-->
|
<!-- <td>正常</td>-->
|
<!-- <td>2020-04-26 12:30</td>-->
|
<!-- </tr>-->
|
<!-- <tr>-->
|
<!-- <td>警告状态</td>-->
|
<!-- <td>无</td>-->
|
<!-- <td>2020-04-26 12:30</td>-->
|
<!-- </tr>-->
|
</tbody>
|
</table>
|
</div>
|
<div style="height: 15px;border-top: 1px solid #444d58;"></div>
|
</div><!--pdgxq-table end-->
|
|
</div><!--jmkt-jkxx-box end-->
|
|
</div>
|
</div><!--pdgxq-m1-left end-->
|
|
</div><!--pdgxq-m1 end-->
|
|
</div>
|
|
</div>
|
|
|
<div id="circular" style="display: none; ">
|
|
<div fragment="circleMenu" >
|
<link rel="stylesheet" type="text/css" href="css/page/circle-menu.css"/>
|
<style>
|
.circle-menu {
|
position: fixed;
|
right: 0;
|
top: 50%;
|
z-index: 9999;
|
width: 180px;
|
height: 360px;
|
margin-top: -180px;
|
}
|
.circle-menu #menu {
|
position: absolute;
|
left: -70px;
|
top: -70px;
|
display: block;
|
width: 500px;
|
height: 500px;
|
border-radius: 50%;
|
overflow: visible;
|
}
|
.item .sector {
|
fill: #141c25;
|
stroke: #00abfc;
|
stroke-width: 2;
|
transition: all 0.1s linear;
|
}
|
.item:hover .sector {
|
fill: #1b293a;
|
}
|
.menu-trigger {
|
pointer-events: auto;
|
-webkit-transform: translate(50px);
|
transform: translate(50px);
|
transition: -webkit-transform 0.3s ease-in-out;
|
transition: transform 0.3s ease-in-out;
|
transition: transform 0.3s ease-in-out, -webkit-transform 0.3s ease-in-out;
|
}
|
.menu-trigger:hover,
|
.menu-trigger.active {
|
-webkit-transform: translate(0);
|
transform: translate(0);
|
}
|
.item,
|
.menu-trigger:hover {
|
cursor: pointer;
|
}
|
.menu-trigger circle {
|
-webkit-transform-origin: 250px 250px;
|
transform-origin: 250px 250px;
|
}
|
.menu-trigger circle:hover,
|
.menu-trigger.active circle {
|
-webkit-animation: rotate 4s linear infinite;
|
animation: rotate 4s linear infinite;
|
}
|
.menu-trigger circle:hover:nth-child(1),
|
.menu-trigger.active circle:nth-child(1) {
|
animation: rotate 4s linear infinite reverse;
|
}
|
.item use,
|
.item text {
|
fill: #00abfc;
|
}
|
.item text {
|
font-size: 18px;
|
font-weight: 500;
|
}
|
@-webkit-keyframes rotate {
|
0% {
|
-webkit-transform: rotate(0deg);
|
transform: rotate(0deg);
|
}
|
100% {
|
-webkit-transform: rotate(360deg);
|
transform: rotate(360deg);
|
}
|
}
|
@keyframes rotate {
|
0% {
|
-webkit-transform: rotate(0deg);
|
transform: rotate(0deg);
|
}
|
100% {
|
-webkit-transform: rotate(360deg);
|
transform: rotate(360deg);
|
}
|
}
|
</style>
|
<div class="circle-menu">
|
<svg id="menu" viewBox="-100 -100 700 700" xmlns:xlink="http://www.w3.org/1999/xlink">
|
<defs>
|
<!-- 这里的width、height都是相对的比例,所以1也代表100% -->
|
<pattern height="1" id="e" patternContentUnits="objectBoundingBox" width="1">
|
<!-- 这里的width、height是相对图片的真实大小,数字越大,显示的区域越小 -->
|
<image height="1" preserveAspectRatio="none" href="images/float-circle-wrap.png" width="1" xlink:href="images/float-circle-wrap.png" xmlns:xlink="http://www.w3.org/1999/xlink" />
|
</pattern>
|
<pattern height="1" id="f" patternContentUnits="objectBoundingBox" width="1">
|
<image height="1" preserveAspectRatio="none" href="images/float-circle-solid.png" width="1" xlink:href="images/float-circle-solid.png" xmlns:xlink="http://www.w3.org/1999/xlink" />
|
</pattern>
|
</defs>
|
<g id="symbols">
|
<symbol id="a" viewBox="0 0 29 29">
|
<g fill="none" fill-rule="evenodd">
|
<path d="M.807.085h28v28h-28z" />
|
<g fill="#15E1FA" fill-rule="nonzero">
|
<path d="M26.882 2.718l-.14-.587-.587-.143c-.336-.082-.946-.177-1.958-.177-1.914 0-4.317.35-6.423.935-1.154.32-2.185.697-3.062 1.12-.908.438-1.65.933-2.147 1.43-.454.455-1.047 1.354-1.766 2.675-.167.306-.34.635-.517.985-1.457.415-3.191 1.44-3.924 1.903-1.662 1.041-3.01 2.132-3.601 2.914a.986.986 0 0 0 .432 1.513c.183.07.383.145.593.227.957.363 2.128.803 3.036 1.25l-.003.005 5.266 5.272c.446.91.892 2.089 1.258 3.054l.227.593a.982.982 0 0 0 1.512.432c.782-.59 1.873-1.938 2.915-3.601.46-.736 1.485-2.464 1.906-3.924.355-.18.692-.355 1.003-.525 1.33-.722 2.229-1.318 2.677-1.772 1.285-1.285 2.423-4.044 3.046-7.38.271-1.454.424-2.934.43-4.164.008-1.047-.088-1.685-.173-2.035zM8.814 12.051a125.179 125.179 0 0 0-1.247 2.885 32.39 32.39 0 0 0-2.234-.941c.527-.432 1.227-.94 2.072-1.468.553-.348 1.1-.66 1.611-.92a16.61 16.61 0 0 0-.202.444zm7.51 9.42a20.907 20.907 0 0 1-1.467 2.072 32.88 32.88 0 0 0-.938-2.23c.845-.354 1.848-.783 2.9-1.256.143-.066.285-.128.425-.191a23.038 23.038 0 0 1-.92 1.605zM25.09 4.739c-.006 1.118-.145 2.472-.397 3.815-.273 1.46-.662 2.835-1.126 3.984-.432 1.069-.922 1.91-1.379 2.365l-.005.005c-.11.112-.596.544-2.22 1.428-1.061.574-2.39 1.222-3.954 1.927-1.29.58-2.51 1.094-3.44 1.48l-3.434-3.446c.382-.932.9-2.154 1.476-3.44.708-1.572 1.356-2.9 1.925-3.95.878-1.614 1.315-2.109 1.427-2.221.337-.336.908-.708 1.611-1.047.771-.372 1.69-.708 2.732-.996 1.944-.544 4.148-.866 5.895-.866.353 0 .634.013.859.032.019.241.032.547.03.93zM5.87 20.615c-1.069 0-1.971.708-2.264 1.684L2.58 25.695a.474.474 0 0 0 .588.59l3.39-1.03a2.374 2.374 0 0 0 1.68-2.27c0-1.31-1.059-2.37-2.366-2.37z" />
|
<path d="M17.07 11.795a1.75 1.75 0 1 0 2.475-2.475 1.75 1.75 0 0 0-2.475 2.475z" />
|
</g>
|
</g>
|
</symbol>
|
<symbol id="b" viewBox="0 0 29 29">
|
<g fill="none" fill-rule="evenodd">
|
<path d="M.295.617h28v28h-28z" />
|
<path d="M26.326 5.367l-5.012-2.883a.874.874 0 0 0-.864 0l-5.012 2.883a.867.867 0 0 0-.432.751v.244l-.277-.159a.874.874 0 0 0-.864 0l-.279.162v-.247a.873.873 0 0 0-.434-.751L8.137 2.484a.874.874 0 0 0-.864 0L2.26 5.367a.864.864 0 0 0-.435.751v5.786c0 .31.164.596.435.752l5.012 2.882a.866.866 0 0 0 .864 0l.279-.16v.245c0 .31.166.596.434.752l.178.101-.178.101a.87.87 0 0 0-.434.752v5.786c0 .31.166.596.434.752l5.013 2.882a.874.874 0 0 0 .864 0l5.012-2.882a.87.87 0 0 0 .434-.752v-5.783a.873.873 0 0 0-.434-.752l-.178-.101.178-.101a.87.87 0 0 0 .434-.752v-.243l.277.158a.874.874 0 0 0 .864 0l5.012-2.885a.872.872 0 0 0 .437-.752V6.118a.866.866 0 0 0-.437-.751zM7.705 13.515l-3.91-2.248V6.756l3.91-2.248 3.91 2.248v.74L8.85 9.087a.87.87 0 0 0-.434.751v3.27l-.711.408zm3.91-4.566v2.321l-1.942 1.116v-2.322l1.942-1.115zm6.59 9.02v4.512l-3.91 2.248-3.91-2.248v-4.512l.617-.355 2.86 1.643a.874.874 0 0 0 .865 0l2.86-1.643.618.355zm-5.94-1.083l2.03-1.167 2.028 1.167-2.028 1.168-2.03-1.168zm6.65-1.487l-.615.355-3.573-2.053a.874.874 0 0 0-.864 0l-3.574 2.053-.616-.355v-.744l3.476-1.999a.87.87 0 0 0 .435-.752V7.817l.713-.41.709.407v4.093a.87.87 0 0 0 .432.752l3.478 1.999v.74zm0-3.013l-1.94-1.119V8.943l1.94 1.118v2.325zm5.88-1.119l-3.913 2.248-.709-.405V9.837a.87.87 0 0 0-.432-.752l-2.767-1.591v-.738l3.91-2.248 3.91 2.248v4.511z" fill="#15E1FA" fill-rule="nonzero" />
|
</g>
|
</symbol>
|
<symbol id="c" viewBox="0 0 29 29">
|
<path d="M14.549 11.125a3.485 3.485 0 0 0-2.729 1.017 3.489 3.489 0 0 0-1.017 2.73l-2.696 5.93 5.93-2.696a3.485 3.485 0 0 0 2.73-1.017 3.489 3.489 0 0 0 1.017-2.73l2.696-5.93-5.931 2.696zm.828 4.575a1.53 1.53 0 0 1-2.165 0 1.53 1.53 0 0 1 0-2.166 1.53 1.53 0 0 1 2.165 0 1.53 1.53 0 0 1 0 2.166zM14.295.617c-7.733 0-14 6.267-14 14s6.267 14 14 14c7.732 0 14-6.267 14-14s-6.268-14-14-14zm0 26.031c-6.645 0-12.032-5.387-12.032-12.031 0-6.645 5.387-12.031 12.032-12.031 6.644 0 12.03 5.386 12.03 12.03 0 6.645-5.386 12.032-12.03 12.032z" fill="#15E1FA" fill-rule="nonzero" />
|
</symbol>
|
<symbol id="d" viewBox="0 0 29 29">
|
<path d="M14.624.05c-7.732 0-14 6.267-14 14s6.268 14 14 14c7.733 0 14-6.267 14-14s-6.267-14-14-14zm8.507 22.507a11.969 11.969 0 0 1-3.825 2.578 11.916 11.916 0 0 1-4.682.947c-1.624 0-3.199-.318-4.68-.944a12.044 12.044 0 0 1-3.826-2.578 11.969 11.969 0 0 1-2.579-3.826 11.939 11.939 0 0 1-.946-4.684c0-1.624.317-3.199.943-4.681a12.044 12.044 0 0 1 2.579-3.825A11.969 11.969 0 0 1 9.94 2.965a11.939 11.939 0 0 1 4.684-.946c1.625 0 3.2.317 4.682.943a12.044 12.044 0 0 1 3.825 2.579 11.969 11.969 0 0 1 2.579 3.825c.628 1.485.946 3.06.946 4.684a11.962 11.962 0 0 1-3.525 8.507zm-2.464-8.725H15.61V7.269a.984.984 0 1 0-1.969 0v6.563c0 1.088.88 1.968 1.969 1.968h5.058a.984.984 0 1 0 0-1.968z" fill="#15E1FA" fill-rule="nonzero" />
|
</symbol>
|
</g>
|
<g data-svg-origin="250 250" id="items" transform="rotate(-90 250 250)">
|
<a class="item update" data-svg-origin="250 250" style="transform:matrix(0,0,0,0,250,250)">
|
<path class="sector" d="M350 250h150a250 250 0 0 0-73.223-176.777L320.71 179.29A100 100 0 0 1 350 250" />
|
<use height="40" transform="rotate(157.5 414.45 181.882)" width="40" x="366.451" xlink:href="#a" y="166.882" />
|
<text transform="rotate(148.5 414.45 181.882)" x="414.451" y="190.882">更新</text>
|
</a>
|
<a class="item passthrough" data-svg-origin="250 250" style="transform:matrix(0,0,0,0,250,250)">
|
<path class="sector" d="M350 250h150a250 250 0 0 0-73.223-176.777L320.71 179.29A100 100 0 0 1 350 250" fill="none" />
|
<use height="40" transform="rotate(67.5 414.45 181.882)" width="40" x="394.451" xlink:href="#b" y="135.882" />
|
<text transform="rotate(174.5 414.45 181.882)" x="414.451" y="190.882">透传</text>
|
</a>
|
<a class="item action" data-svg-origin="250 250" style="transform:matrix(0,0,0,0,250,250)">
|
<path class="sector" d="M350 250h150a250 250 0 0 0-73.223-176.777L320.71 179.29A100 100 0 0 1 350 250" fill="none" />
|
<use height="40" transform="rotate(67.5 414.45 181.882)" width="40" x="394.451" xlink:href="#c" y="135.882" />
|
<text transform="rotate(145 414.45 181.882)" x="416.451" y="184.882">操作</text>
|
</a>
|
<a class="item timing" data-svg-origin="250 250" style="transform:matrix(0,0,0,0,250,250)">
|
<path class="sector" d="M350 250h150a250 250 0 0 0-73.223-176.777L320.71 179.29A100 100 0 0 1 350 250" fill="none" />
|
<use height="40" transform="rotate(67.5 414.45 181.882)" width="40" x="394.451" xlink:href="#d" y="135.882" />
|
<text transform="rotate(167.5 414.45 181.882)" x="416.451" y="190.882">定时</text>
|
</a>
|
</g>
|
<g class="menu-trigger">
|
<circle cx="250" cy="250" fill="url(#e)" r="126" />
|
<circle cx="250" cy="250" fill="url(#f)" r="126" />
|
</g>
|
</svg>
|
</div>
|
<script src="plugins/tweenmax@1.16.0/TweenMax.min.js" ></script>
|
</div>
|
|
</div>
|
|
|
<script src="./js/jquery.min.js"></script>
|
<script src="./plugins/layui/layui.js"></script>
|
<!--<script src="./js/page/circle-menu.js"></script>-->
|
<script type="text/javascript">
|
var id = "";
|
var category = "";
|
var from = {};
|
|
//开始渲染
|
function renderInfo(deviceData, device) {
|
//设备信息
|
category = device.type;
|
id = device.id;
|
|
if(category == "2003"){
|
//空调显示控制
|
$(".jmkt-tit-more.kt").show();
|
}
|
if(category == "3005"){
|
//空调显示控制
|
$(".jmkt-tit-more.mc").show();
|
}
|
|
//设备基本信息
|
$("#deviceName").html(device.name);
|
$("#deviceVld").html(device.vld==0?'激活':'停用');
|
$("#opVendor").html(window.parent.SYS_SET.opVendor);
|
$("#opPhone").html(window.parent.SYS_SET.opPhone);
|
|
//时间格式处理
|
var time = deviceData.time.substring(0,4) + "-" +
|
deviceData.time.substring(4,6) + "-" +
|
deviceData.time.substring(6,8) + " " +
|
deviceData.time.substring(8,10) + ":" +
|
deviceData.time.substring(10,12);
|
|
//监控属性渲染
|
var list = deviceData.value;
|
var html='';
|
|
var warnTag = true;
|
if(list !=null && list.length>0){
|
$.each(list,function(index,item){
|
html += '<tr><td>' + item.name + '</td>';
|
if(item.passcode == 1){
|
if (item.value == "0") { //正常
|
html += '<td>正常</td>';
|
}else {
|
html += '<td>异常</td>';
|
$("#conState").html("异常");
|
}
|
}else if(item.passcode == 2){
|
if (item.value == "0") { //正常
|
html += '<td>无</td>';
|
warnTag = true;
|
}else {
|
html += '<td>报警</td>';
|
$("#warnState").html("报警");
|
warnTag = false;
|
}
|
}else {
|
|
var v = renderValue(category,item,warnTag);
|
html += '<td>' + v + '</td>';
|
}
|
html += '<td>' + time + '</td></tr>';
|
});
|
}else {
|
html += "<tr><td colspan='3'>暂无数据</td></tr>";
|
}
|
$("#listData").html(html);
|
}
|
|
function renderValue(type,cur,warnTag) {
|
var result = cur.value;
|
|
var str = "";
|
if(cur.note && cur.note.length > 0){
|
str += cur.note;
|
}else{
|
str += cur.value;
|
}
|
if(cur.unit && cur.unit.length > 0){
|
str += " " + cur.unit;
|
}
|
|
return str;
|
|
|
// result = item.value == 0 ? "正常" : "告警";
|
// if(item.value != 0 && item.value != 1){
|
// result = item.value;
|
// }
|
//
|
// if(type == "2003"){
|
// if(item.passcode == "3"){
|
// result = item.value + "℃";
|
// }
|
// if(item.passcode == "4"){
|
// result = item.value + "%";
|
// }
|
// if(item.passcode == "5"){
|
// // result = item.value == 0 ? "开启" : "关闭";
|
// result = item.value == 0 ? "关闭" : "开启";
|
// }
|
// if(item.passcode == "6"){
|
// result = item.value == 0 ? "开启" : "关闭";
|
// // result = item.value == 0 ? "关闭" : "开启";
|
// }
|
// if(item.passcode >= 7 && item.passcode <= 8){
|
// result = item.value + "℃";
|
// }
|
// if(item.passcode >= 9 && item.passcode <= 99){
|
// // result = item.value == 0 ? "开启" : "关闭";
|
// result = item.value == 0 ? "关闭" : "开启";
|
// // if(item.passcode == 17){
|
// // if(item.value == 0){result = "手动";}
|
// // if(item.value == 1){result = "温度控制";}
|
// // if(item.value == 2){result = "定时控制";}
|
// // }
|
// }
|
// }
|
// if(type == "2004"){
|
// if(item.passcode >= 13 && item.passcode <= 16){
|
// result = item.value == 0 ? "正常" : "告警";
|
// }
|
// }
|
// if(type == "2015"){
|
// result = item.value ;
|
// }
|
// if(type == "3005"){
|
// if(item.passcode >= 3 && item.passcode <= 99){
|
// result = item.value == 1 ? "闭合" : "断开";
|
// }
|
// }
|
// if(type == "3007"){
|
// if(item.passcode >= 3 && item.passcode <= 99){
|
// result = item.value == 0 ? "正常" : "告警";
|
// }
|
// }
|
// if(type == "2020"){
|
// if(item.passcode == 3){
|
// result = item.value + "ppm";
|
// }
|
// }
|
// if(type == "2024"){
|
// if(item.passcode == 3){
|
// result = item.value + "ppm";
|
// }
|
// }
|
// if(type == "2023"){
|
// if(item.passcode == 3){
|
// result = item.value + "ppm";
|
// }
|
// }
|
// if(type == "4002"){
|
// if(item.passcode >= 3 && item.passcode < 999){
|
// result = item.value;
|
// if(item.passcode == 3){
|
// result = item.value + "℃";
|
// }
|
// if(item.passcode == 4){
|
// result = item.value + "Nm³/h";
|
// }
|
// if(item.passcode == 5){
|
// result = item.value + "MPa";
|
// }
|
// if(item.passcode == 9){
|
// result = item.value + "Nm³/h";
|
// }
|
// }
|
// }
|
// if(type == "3007"){
|
// if(item.passcode >= 3 && item.passcode <= 99){
|
// result = item.value == 0 ? "正常" : "告警";
|
// }
|
//
|
// }
|
// if(type == "9999"){
|
// if(item.passcode >= 3 && item.passcode <= 99){
|
// result = item.value == 0 ? "正常" : "告警";
|
// }
|
// if(item.passcode == 3){
|
// result = item.value + "PPM";
|
// }
|
// if(item.passcode == 4){
|
// result = item.value + "PPM";
|
// }
|
//
|
//
|
// }
|
//
|
//
|
// return result;
|
}
|
|
function closepopBtn(){
|
layer.closeAll();
|
}
|
|
|
function action() {
|
|
// from.runStatus0 = "关机";
|
// from.setHum0 = "25";
|
// from.setHum1 = "25";
|
// from.setTem0 = "25";
|
// from.setTem1 = "25";
|
// console.log(from);
|
|
$("#runStatus0").val(from.runStatus0);
|
|
$("#setHum0").val(from.setHum0);
|
$("#setHum1").val(from.setHum1);
|
|
$("#setTem0").val(from.setTem0);
|
$("#setTem1").val(from.setTem1);
|
|
|
layer.open({
|
skin: 'mypop',
|
type: 1,
|
title: false,
|
area: ['43%', '80%'],
|
closeBtn: 0,
|
shade: 0,
|
scrollbar: false,
|
content: $('#editWarnDom')
|
});
|
}
|
|
function closepopBtn(){
|
layer.closeAll();
|
}
|
|
function sendAction(boxId) {
|
var passcode = 0;
|
var value = "00";
|
var msg = "";
|
if(boxId == "open"){
|
passcode = 14;
|
value = "00";
|
// value = "01";
|
msg = "发送空调开机命令!";
|
}else{
|
passcode = 14;
|
value = "01";
|
// value = "00";
|
msg = "发送空调关机命令!";
|
}
|
if(category == "3005"){
|
if(boxId == "open"){
|
passcode = 3;
|
value = "1";
|
msg = "发送开机命令!";
|
}else{
|
passcode = 4;
|
value = "1";
|
msg = "发送关机命令!";
|
}
|
}
|
|
// var address = deviceInfo.address;
|
|
if (confirm(msg)){
|
var param = {"id": id,"passcode": passcode,"value":value};
|
console.log(param);
|
$.ajaxSettings.async = false;
|
$.post("./cgi-bin/file/action-control", JSON.stringify(param), function (data, status) {
|
layer.closeAll();
|
layer.msg("命令发送成功!");
|
}, "json");
|
}
|
|
|
}
|
|
function add(id) {
|
var value = $("#"+id).val();
|
var result = (value * 1) + 1;
|
if(id=="setTem1"){
|
result = result == 31 ? 30 : result;
|
}
|
$("#"+id).val(result);
|
}
|
function sub(id) {
|
var value = $("#"+id).val();
|
var result = (value * 1) - 1;
|
if(id=="setTem1"){
|
result = result == 15 ? 16 : result;
|
}
|
$("#"+id).val(result);
|
}
|
|
function sendActionMC() {
|
var msg = "是否开门";
|
if (confirm(msg)){
|
$.ajaxSettings.async = false;
|
$.get("./cgi-bin/do/set-do2", function (data, status) {
|
layer.closeAll();
|
layer.msg("命令发送成功!");
|
}, "json");
|
}
|
}
|
|
</script>
|
<script src="./js/page/detail.js"></script>
|
</body>
|
|
<!--警报弹窗-->
|
<div id="editWarnDom" style=" display: none;overflow: hidden;">
|
<div class="i-popBox-tit layui-clear bor-b-1">
|
<div class="pdgxq-H">
|
<h3><i></i>控制模块</h3>
|
</div>
|
<i class="i-popclose layui-icon-close layui-icon layui-anim layui-anim-rotate" onclick="closepopBtn();"></i>
|
</div>
|
|
<div class="popCon">
|
<form class="layui-form" id="edit_warn_example" lay-filter="edit_warn_example">
|
|
<div class="pdgxq-H">
|
<h3>开-关机</h3>
|
</div>
|
|
<div class="pop-group layui-clear">
|
<div class="pop-item fl" style="display: none;">
|
<div class="layui-form-item">
|
<label class="layui-form-label">当前状态</label>
|
<div class="layui-input-block">
|
<input type="text" id="runStatus0" required class="layui-input pop-input" readonly="readonly" value="开机">
|
</div>
|
</div>
|
</div>
|
|
<div class="pop-item fr">
|
<div class="layui-form-item">
|
<label class="layui-form-label">目标状态</label>
|
<div class="layui-input-block">
|
<select class="layui-select" id="runStatus1">
|
<option value="-1">请选择</option>
|
<option value="0">关机</option>
|
<option value="1">开机</option>
|
|
</select>
|
</div>
|
</div>
|
</div>
|
</div><!--pop-group end-->
|
|
<div class="pop-group layui-clear">
|
<div class="pop-item pop-item-all">
|
<div class="layui-form-item" style="text-align: center;">
|
<button type="button" class="layui-btn layui-btn-normal pop-complete-btn"
|
onclick="sendAction('14','runStatus1');" style="width: 20%;font-size: 18px;">确定</button>
|
</div>
|
</div>
|
</div><!--pop-group end-->
|
|
<div class="pop-line"></div>
|
|
<div class="pdgxq-H">
|
<h3>温度设定</h3>
|
</div>
|
|
<div class="pop-group layui-clear">
|
<div class="pop-item fl">
|
<div class="layui-form-item">
|
<label class="layui-form-label">当前值</label>
|
<div class="layui-input-block">
|
<input type="text" id="setTem0" class="layui-input pop-input" readonly="readonly">
|
</div>
|
</div>
|
</div>
|
|
<div class="pop-item fr">
|
<div class="layui-form-item">
|
<label class="layui-form-label" style="width: 120px;">范围:16~30℃</label>
|
</div>
|
</div>
|
|
</div><!--pop-group end-->
|
|
<div class="pop-group layui-clear">
|
<div class="pop-item fl">
|
<div class="layui-form-item">
|
<label class="layui-form-label">目标值</label>
|
<div class="layui-input-block">
|
<input type="text" id="setTem1" value="25" class="layui-input pop-input" >
|
</div>
|
</div>
|
</div>
|
|
<div class="pop-item fr">
|
<div class="layui-form-item" style="text-align: left;">
|
<button type="button" class="layui-btn layui-btn-normal pop-complete-btn"
|
onclick="sub('setTem1');" style="width: 30%;font-size: 22px;">-</button>
|
<button type="button" class="layui-btn layui-btn-normal pop-complete-btn"
|
onclick="add('setTem1');" style="width: 30%;font-size: 22px;">+</button>
|
</div>
|
</div>
|
|
</div><!--pop-group end-->
|
|
<div class="pop-group layui-clear">
|
<div class="pop-item pop-item-all">
|
<div class="layui-form-item" style="text-align: center;">
|
<button type="button" class="layui-btn layui-btn-normal pop-complete-btn"
|
onclick="sendAction('14','setTem1');" style="width: 20%;font-size: 18px;">确定</button>
|
</div>
|
</div>
|
</div><!--pop-group end-->
|
|
<div class="pop-line"></div>
|
|
<div class="pdgxq-H">
|
<h3>湿度设定</h3>
|
</div>
|
|
<div class="pop-group layui-clear">
|
<div class="pop-item fl">
|
<div class="layui-form-item">
|
<label class="layui-form-label">当前值</label>
|
<div class="layui-input-block">
|
<input type="text" id="setHum0" class="layui-input pop-input" readonly="readonly">
|
</div>
|
</div>
|
</div>
|
|
<div class="pop-item fr">
|
<div class="layui-form-item">
|
|
</div>
|
</div>
|
|
</div><!--pop-group end-->
|
|
<div class="pop-group layui-clear">
|
<div class="pop-item fl">
|
<div class="layui-form-item">
|
<label class="layui-form-label">目标值</label>
|
<div class="layui-input-block">
|
<input type="text" id="setHum1" value="60" class="layui-input pop-input" >
|
</div>
|
</div>
|
</div>
|
|
<div class="pop-item fr">
|
<div class="layui-form-item" style="text-align: left;">
|
<button type="button" class="layui-btn layui-btn-normal pop-complete-btn"
|
onclick="sub('setHum1');" style="width: 30%;font-size: 22px;">-</button>
|
<button type="button" class="layui-btn layui-btn-normal pop-complete-btn"
|
onclick="add('setHum1');" style="width: 30%;font-size: 22px;">+</button>
|
</div>
|
</div>
|
|
</div><!--pop-group end-->
|
|
<div class="pop-group layui-clear">
|
<div class="pop-item pop-item-all">
|
<div class="layui-form-item" style="text-align: center;">
|
<button type="button" class="layui-btn layui-btn-normal pop-complete-btn"
|
onclick="sendAction('14','setHum1');" style="width: 20%;font-size: 18px;">确定</button>
|
</div>
|
</div>
|
</div><!--pop-group end-->
|
|
</form>
|
|
</div><!--popCon end-->
|
</div>
|
|
</html>
|