<!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-jmkt.css"/>
|
<style>
|
.jmkt-pic-ysj {
|
width: 300px;
|
height: 32px;
|
color: #ef6d34;
|
font-size: 16px;
|
bottom: 0;
|
top: 92%;
|
left: 22%;
|
background: #2e2e2e;
|
}
|
</style>
|
</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 id="open" class="jmkt-tit-more" style="display: none;" onclick="sendAction('9',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" style="display: none;" onclick="sendAction('9',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>
|
|
<div class="pdgxq-group clearfix">
|
<div class="pdgxq-group-item jmkt-chuli">
|
<span id="warnStatus">无</span>警告状态
|
</div>
|
<div class="pdgxq-group-item jmkt-yichuli">
|
<span id="connectionState">正常</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="tbody">
|
<!-- <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>
|
|
</div><!--pdgxq-m1-left end-->
|
|
<div class="layui-col-lg7 layui-col-md7">
|
<div class="pdgxq-m1-right pdgxq-m1-box">
|
<div class="pdgxq-H">
|
<h3><i></i>监控信息</h3>
|
</div>
|
|
<div class="jmkt-jkxx-box">
|
|
<div class="jmkt-picBox">
|
<img src="./images/jmkt-rPic.gif" id="jmkt1" class="jmkt-pic action"/>
|
<img src="./images/jmkt-rPic.png" id="jmkt2" class="jmkt-pic"/>
|
<div class="jmkt-pic-text jmkt-pic-lnq">冷凝器</div>
|
<div class="jmkt-pic-text jmkt-pic-zfq">蒸发器</div>
|
<div class="jmkt-pic-text jmkt-pic-ysj">运行状态:<span id="runStatus">正常</span></div>
|
<!-- <div class="jmkt-pic-text jmkt-pic-sg">加湿供水 除湿排水</div>-->
|
<div class="jmkt-pic-text jmkt-pic-hfwd">
|
<!-- style="right: 50%;bottom: 60%;"-->
|
<p id="indoorTem" style="display: none;">室内温度:<span >##</span>℃</p>
|
<p id="indoorHum" style="display: none;">室内湿度:<span >##</span>%</p>
|
<!-- <p id="prop11" style="display: none;">运行模式:<span >##</span>%</p>-->
|
</div>
|
<div class="jmkt-pic-text jmkt-pic-sfwd" >
|
<p id="setTem" style="display: none;">设定温度:<span >##</span>℃</p>
|
<p id="setHum" style="display: none;">设定湿度:<span >##</span>%</p>
|
</div>
|
</div>
|
</div><!--jmkt-jkxx-box end-->
|
|
</div>
|
|
<!-- 基本信息 -->
|
<div style="padding-top: 20px">
|
<div class="pdgxq-m2-right pdgxq-m2-box">
|
<h3>设备基本信息</h3>
|
<p>设备名称:<span id="deviceName">精密空调#1</span></p>
|
<p>设备状态:<span id="deviceStatus">激活</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><!--pdgxq-m1-left end-->
|
|
</div><!--pdgxq-m1 end-->
|
|
</div>
|
|
</div><!--jmkt-main end-->
|
|
</div> <!--i-container 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 type="text/javascript">
|
//是否展示右侧操作界面
|
function renderAction(category) {
|
var param = {"category":category};
|
$.ajaxSettings.async = false;
|
$.post("./cgi-bin/do/controlShow", JSON.stringify(param), function (data, status) {
|
if ("success" == data.code) {
|
$("#circular").show();
|
} else {
|
$("#circular").hide();
|
}
|
}, "json");
|
}
|
|
$(".jmkt-tit-more").hide();
|
|
var id = "";
|
var deviceInfo = {};
|
var category = "";
|
var from = {};
|
|
var runS = "0";
|
|
|
//开始渲染
|
function renderInfo(deviceData, device) {
|
|
//设备信息
|
deviceInfo = device;
|
category = device.type;
|
id = device.id;
|
renderAction(category);
|
|
$("#deviceName").html(device.name);
|
$("#deviceStatus").html(device.vld==0?"激活":"停用");
|
$("#opVendor").html(window.parent.SYS_SET.opVendor);
|
$("#opPhone").html(window.parent.SYS_SET.opPhone);
|
//实时数据
|
var list = deviceData.value;
|
//时间格式化 yyyy-MM-dd hh:mm
|
var time = deviceData.time;
|
time = time.slice(0,4)+"-"+time.slice(4,6)+"-"+time.slice(6,8)+" "+time.slice(8,10)+":"+time.slice(10,12);
|
var cur;
|
var html = "";
|
for (var i = 1; i <= list.length; i++) {
|
cur = list[i - 1];
|
//通讯状态
|
if(cur.passcode == 1){
|
$("#connectionState").html(cur.value==0?"正常":"报警");
|
html += "<tr><td>"+cur.name+"</td><td>"+(cur.value==0?"正常":"报警")+"</td><td>"+time+"</td></tr>";
|
}else if(cur.passcode == 2){
|
$("#warnStatus").html(cur.value==0?"无":"报警");
|
html += "<tr><td>"+cur.name+"</td><td>"+(cur.value==0?"无":"报警")+"</td><td>"+time+"</td></tr>";
|
}else if(cur.passcode == 3){//运行状态
|
var runName = "开机";
|
if(cur.value==0){
|
if(runS == "1"){
|
$(".jmkt-pic").removeClass("action");
|
$("#jmkt1").addClass("action");
|
}
|
|
// $(".jmkt-pic-ysj").hide();
|
// $("#runStatus").html("开机");
|
|
//弹窗信息
|
from.runStatus0 = "开机";
|
runName = "开机";
|
$("#runStatus").text(from.runStatus0);
|
runS = "0";
|
}else{
|
if(runS == "0"){
|
$(".jmkt-pic").removeClass("action");
|
$("#jmkt2").addClass("action");
|
$(".jmkt-pic-ysj").show();
|
}
|
// $("#runStatus").html("关机");
|
|
//弹窗信息
|
from.runStatus0 = "关机";
|
runName = "关机";
|
$("#runStatus").text(from.runStatus0);
|
runS = "1";
|
}
|
|
html += "<tr><td>"+cur.name+"</td><td>"+runName+"</td><td>"+time+"</td></tr>";
|
}
|
else if(cur.passcode >= 8 && cur.passcode<999){
|
var v = renderValue(category,cur);
|
html += "<tr><td>"+cur.name+"</td><td>"+(v)+"</td><td>"+time+"</td></tr>";
|
// html += "<tr><td>"+cur.name+"</td><td>"+(cur.value==0?"正常":"报警")+"</td><td>"+time+"</td></tr>";
|
}
|
else{
|
if(cur.passcode == 4 || cur.passcode==6){
|
if(cur.value && cur.value != "null"){
|
html += "<tr><td>"+cur.name+"</td><td>"+(cur.value?cur.value:"")+"℃</td><td>"+time+"</td></tr>";
|
}
|
|
}
|
if(cur.passcode == 5 || cur.passcode==7){
|
if(cur.value && cur.value != "null"){
|
html += "<tr><td>"+cur.name+"</td><td>"+(cur.value?cur.value:"")+"%</td><td>"+time+"</td></tr>";
|
}
|
}
|
|
}
|
|
|
|
|
//回风温度
|
if(cur.passcode == 4){
|
$("#indoorTem span").html(cur.value);
|
$("#indoorTem").show();
|
}
|
//回风湿度
|
if(cur.passcode == 5){
|
$("#indoorHum span").html(cur.value);
|
$("#indoorHum").show();
|
}
|
//送风温度
|
if(cur.passcode == 6){
|
$("#setTem span").html(cur.value);
|
$("#setTem").show();
|
from.setTem0 = cur.value;
|
from.setTem1 = cur.value;
|
$("#setTem0").val(from.setTem0);
|
}
|
//送风湿度
|
if(cur.passcode == 7){
|
$("#setHum span").html(cur.value);
|
$("#setHum").show();
|
|
from.setHum0 = cur.value;
|
from.setHum1 = cur.value;
|
$("#setHum0").val(from.setHum0);
|
}
|
|
//送风湿度
|
// if(cur.passcode == 27){
|
// var res = (cur.value=="1"?"开启":"关闭");
|
// $("#runStatus").val(res);
|
// }
|
|
|
//更新时间
|
$(".time").html(time);
|
|
}
|
$("#tbody").html("");
|
$("#tbody").html(html);
|
}
|
|
function renderValue(type,item) {
|
var result = item.value;
|
// if(type == "2002" || type == "2020" || type == "2022"){
|
// if(item.passcode >= 8 && item.passcode <= 998){
|
// result = (item.value=="0"?"正常":"告警");
|
// if(item.passcode == 16){
|
// if(item.value=="0"){
|
// result = "送风";
|
// }
|
// if(item.value=="1"){
|
// result = "制热";
|
// }
|
// if(item.value=="2"){
|
// result = "制冷";
|
// }
|
// // result = (item.value=="0"?"关闭":"开启");
|
// }
|
// }
|
// }
|
|
var str = "";
|
if(item.note && item.note.length > 0){
|
str += item.note;
|
}else{
|
str += item.value;
|
}
|
if(item.unit && item.unit.length > 0){
|
str += " " + item.unit;
|
}
|
result = str;
|
|
return result;
|
}
|
|
|
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(passcode,valId) {
|
var passcode = passcode;
|
var value = $("#"+valId).val();
|
|
if(valId == "stop"){
|
passcode = "10";
|
value = "1";
|
}else if(valId == "open"){
|
passcode = "9";
|
value = "1";
|
}else{
|
if(passcode == "9"){
|
if(value == "-1"){
|
layer.msg("开-关机命令:请选择要发送的命令!");
|
return ;
|
}else if(value == "0"){
|
passcode = "12";
|
}else if(value == "1"){
|
passcode = "13";
|
}
|
}
|
}
|
|
var address = deviceInfo.address;
|
var param = {"id": id,"address": address,"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);
|
}
|
|
</script>
|
<script src="./js/page/circle-menu.js"></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">
|
<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('9','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" class="layui-input pop-input" readonly="readonly">
|
</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('11','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" class="layui-input pop-input" readonly="readonly">
|
</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('13','setHum1');" style="width: 20%;font-size: 18px;">确定</button>
|
</div>
|
</div>
|
</div><!--pop-group end-->
|
|
</form>
|
|
</div><!--popCon end-->
|
</div>
|
|
|
</html>
|