初始化CRICS

This commit is contained in:
2025-12-11 09:17:16 +08:00
commit 83247ec0a2
2735 changed files with 787765 additions and 0 deletions

View File

@@ -0,0 +1,217 @@
<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<dynamic>" %>
<style type="text/css">
#airForm table th {
font-weight: normal;
cursor: default;
}
#airForm table th,
#airForm table td {
/*border: 1px solid red;*/
}
</style>
<div class="box">
<div class="title"><%: Html.Language("RoomStatus")%></div>
<div class="container">
<div class="content">
<table style="width:100%;">
<tr>
<td style="text-align:center;width:20%;"><span class="RoomNumber"><%: Model.RoomNumber %></span></td>
<td style="text-align:center;width:20%;"><span class="RoomStatus"><%: Model.RoomStatus %></span></td>
<td style="text-align:center;width:20%;"><span class="Status"><%: Model.HostStatus %></span></td>
<td style="text-align:center;width:20%;"><span class="IP"><%: Model.IP %></span></td>
<td style="text-align:center;width:20%;"><a href="javascript:void(0)" class="easyui-linkbutton" onclick="changeAirSetting()" <%: (bool)ViewData["EnableAirSetting"] ? "" : "disabled='disabled'" %> ><%:Html.Language("SendData")%></a></td>
</tr>
</table>
</div>
</div>
</div>
<form id="airForm" method="post" action="#">
<div class="clearfix" style="height:120px;position:relative;">
<div class="box" style="width:49.5%;position:absolute;left:0;top:0;">
<div class="title"><%: Html.Language("AirConditioningInformationDisplay")%></div>
<div class="container" style="height:100px;">
<div class="content">
<table style="width:100%;">
<tr>
<th><%: Html.Language("AirConditioningSerialNumber")%></th>
<td>
<input id="cbxModalID" name="ModalID" class="easyui-combobox" style="width:80px;"
data-options="
url: '/HostAir/LoadHostAirs?hostID=' + <%: Model.HostID %>,
editable: false,
panelHeight: 'auto',
valueField: 'ModalTypeID',
textField: 'CustomerName',
onLoadSuccess: cbxModalIDOnLoadSuccess,
onSelect: cbxModalIDOnSelect
" />
</td>
<th><%: Html.Language("TheWindWpeed")%></th>
<td>
<input name="Speed" class="easyui-combobox" style="width:60px;" disabled="disabled"
data-options="
editable: false,
panelHeight: 'auto',
valueField: 'value',
textField: 'text',
data: [
{ value: '0', text: lang.Stop, selected: true },
{ value: '1', text: lang.low },
{ value: '2', text: lang.Middle },
{ value: '3', text: lang.HighSpeed },
{ value: '4', text: lang.Automatic }
]
" />
</td>
</tr>
<tr>
<th><%: Html.Language("AirConditioningControls")%></th>
<td><input name="ControlTypeName" class="easyui-textbox" style="width:80px;" readonly="readonly" /></td>
<th><%: Html.Language("ValveStatus")%></th>
<td><input name="Valve" class="easyui-textbox" style="width:60px;" readonly="readonly" /></td>
</tr>
<tr>
<th><%: Html.Language("IndoorTemperature")%></th>
<td><input name="CurrentTemp" class="easyui-numberbox" style="width:80px;" readonly="readonly" data-options="suffix:'℃'" /></td>
</tr>
</table>
</div>
</div>
</div>
<div class="box" style="width:49.5%;position:absolute;right:0;top:0;">
<div class="title"><%: Html.Language("BasicSetup")%></div>
<div class="container" style="height:100px;">
<div class="content">
<table style="width:100%;">
<tr>
<th><%: Html.Language("ModelWay")%></th>
<td>
<input id="cbxColdHotMode" name="ColdHotMode" class="easyui-combobox" style="width:60px;"
data-options="
editable: false,
panelHeight: 'auto',
valueField: 'value',
textField: 'text',
data: [
{ value: '0', text: lang.Manually, selected: true },
{ value: '1', text: lang.Automatic }
],
onSelect: cbxColdHotModeOnSelect
" />
</td>
<th><%: Html.Language("WindSpeed")%></th>
<td>
<input name="Speed" class="easyui-combobox" style="width:60px;"
data-options="
editable: false,
panelHeight: 'auto',
valueField: 'value',
textField: 'text',
data: [
{ value: '0', text: lang.Stop, selected: true },
{ value: '1', text: lang.low },
{ value: '2', text: lang.Middle },
{ value: '3', text: lang.HighSpeed },
{ value: '4', text: lang.Automatic }
]
" />
</td>
</tr>
<tr>
<th><%: Html.Language("HotAndColdMode")%></th>
<td>
<input id="cbxMode" name="Mode" class="easyui-combobox" style="width:60px;"
data-options="
editable: false,
panelHeight: 'auto',
valueField: 'value',
textField: 'text',
data: [
{ value: '0', text: '', selected: true },
{ value: '1', text: lang.Refrigeration },
{ value: '2', text: lang.Heating },
{ value: '4', text: lang.BlowingIn },
{ value: '8', text: lang.Dehumidification }
]
" />
</td>
<th><%: Html.Language("Locktopic")%></th>
<td><input id="chkIsLockTemp" name="IsLockTemp" type="checkbox" /></td>
</tr>
<tr>
<th><%: Html.Language("TemperatureSetting")%></th>
<td><input name="SettingTemp" class="easyui-numberspinner" value="22" style="width:60px;" data-options="required:true,min:15,max:35,suffix:'℃'" /></td>
<th><%: Html.Language("LockTheTemperature")%></th>
<td><input id="txtLockTemp" name="LockTemp" class="easyui-numberspinner" value="22" style="width:60px;" data-options="required:true,min:15,max:35,suffix:'℃'" /></td>
</tr>
</table>
</div>
</div>
</div>
</div>
<div id="Div1" class="box">
<div class="title"><%: Html.Language("ProfessionalSettings")%></div>
<div class="container">
<div class="content">
<table style="width:100%;">
<tr>
<th><%: Html.Language("KeepTemperature")%></th>
<td><input name="KeepTemp" class="easyui-numberspinner" value="22" style="width:60px;" data-options="required:true,min:16,max:35,suffix:'℃'" /></td>
<th><%: Html.Language("LowestTemperature")%></th>
<td><input name="LowerTemp" class="easyui-numberspinner" value="16" style="width:60px;" data-options="required:true,min:16,max:35,suffix:'℃'" /></td>
<th><%: Html.Language("HeatTransitionDelay")%></th>
<td><input name="ColdHotSwitchDelayTime" class="easyui-numberspinner" value="30" style="width:60px;" data-options="required:true,min:30,max:60,editable:false,increment:10" /></td>
<th><%: Html.Language("AssociatedState")%></th>
<td><input id="chkRelateRoomStatus" name="RelateRoomStatus" type="checkbox" /></td>
</tr>
<tr>
<th><%: Html.Language("TemperatureCompensated")%></th>
<td><input name="CompensatoryTemp" class="easyui-numberspinner" value="0" style="width:60px;" data-options="required:true,min:-6,max:6,precision:1,increment:0.1,suffix:'℃'" /></td>
<th><%: Html.Language("HighestTemperature")%></th>
<td><input name="HightTemp" class="easyui-numberspinner" value="33" style="width:60px;" data-options="required:true,min:16,max:35,suffix:'℃'" /></td>
<th><%: Html.Language("WelcomeModeTime")%></th>
<td><input name="WelcomeTime" class="easyui-numberspinner" value="30" style="width:60px;" data-options="required:true,min:0,max:255" /></td>
<th><%: Html.Language("AssociatedMagnetic")%></th>
<td><input id="chkRelateDoorContact" name="RelateDoorContact" type="checkbox" /></td>
</tr>
<tr>
<th><%: Html.Language("InitialTemperature")%></th>
<td><input name="InitTemp" class="easyui-numberspinner" value="22" style="width:60px;" data-options="required:true,min:16,max:35,suffix:'℃'" /></td>
<th><%: Html.Language("HeatDeflection")%></th>
<td><input id="txtHotDevition" name="HotDevition" class="easyui-numberspinner" value="2" style="width:60px;" data-options="required:true,min:0,max:5,suffix:'℃'" /></td>
<th></th><td></td>
<th><%: Html.Language("StoppedFanRunsWhenTemperaturesReached")%></th>
<td><input id="chkFanStop" type="checkbox" /></td>
</tr>
<tr>
<th><%: Html.Language("DeadZoneTemperature")%></th>
<td><input id="txtDeadTemp" name="DeadTemp" class="easyui-numberspinner" value="2" style="width:60px;" data-options="required:true,min:0,max:5,suffix:'℃'" /></td>
<th><%: Html.Language("ColdBias")%></th>
<td><input id="txtColdDevition" name="ColdDevition" class="easyui-numberspinner" value="2" style="width:60px;" data-options="required:true,min:0,max:5,suffix:'℃'" /></td>
<th></th><td></td>
<th><%: Html.Language("TheWindTurbineForbiddenToRunAtHighSpeed")%></th>
<td><input id="chkDisableFanHighSpeed" type="checkbox" /></td>
</tr>
</table>
</div>
</div>
</div>
</form>
<script type="text/javascript" src="/Scripts/room-status-air-condition.js"></script>
<% switch ((int)Session["isCN"]){case 1: %>
<script type="text/javascript" src="/Scripts/en-US.js"></script>
<% break; case 2: %>
<script type="text/javascript" src="/Scripts/zh-TW.js"></script>
<% break;default: %>
<script type="text/javascript" src="/Scripts/zh-CN.js"></script>
<% break; } %>

View File

@@ -0,0 +1,162 @@
<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<dynamic>" %>
<div class="box" style="margin-bottom:5px;">
<div class="title"><%: Html.Language("RoomStatus")%></div>
<div class="container">
<div class="content">
<table style="width:100%;">
<tr>
<td style="text-align:center;width:20%;"><span class="RoomNumber"><%: Model.RoomNumber %></span></td>
<td style="text-align:center;width:20%;"><span class="RoomStatus"><%: Model.RoomStatus %></span></td>
<td style="text-align:center;width:20%;"><span class="Status"><%: Model.HostStatus %></span></td>
<td style="text-align:center;width:20%;"><span class="IP"><%: Model.IP %></span></td>
</tr>
</table>
</div>
</div>
</div>
<div style="height:280px;">
<table title='' id="dgLights" class="easyui-datagrid"
data-options="
url: '/HostModal/LoadHostModals/',
queryParams: { HostID: <%: Model.HostID %> },
border: true,
singleSelect: true,
rownumbers: true,
striped: true,
fit: true,
fitColumns: true,
idField: 'HostID',
method: 'post',
sortName: 'Number',
sortOrder: 'asc',
tools:[{
iconCls: 'icon-reload',
handler: function(){ $('#dgLights').datagrid('reload') }
}]
">
<thead>
<tr>
<th data-options="field:'ModalAddress',resizable:false">
<%: Html.Language("ReturnAddress")%>
</th>
<th data-options="field:'Outlet',resizable:false">
<%: Html.Language("DeliveryOutlet")%>
</th>
<th data-options="field:'Name',resizable:false">
<%: Html.Language("Name")%>
</th>
<th data-options="field:'TypeName',resizable:false">
<%: Html.Language("Type")%>
</th>
<th data-options="field:'Status',align:'center',resizable:false,
formatter: function(val){
if(val == 1){
return lang.Opened;
} else {
return lang.Closed;
}
}">
<%: Html.Language("Status")%>
</th>
<th data-options="field:'Brightness',align:'center',resizable:false,
formatter:function(val,row){
switch (row.Type) {
case 'Dimmer':
case 'Strip':
case 'Traic':
case 'PWMDimmer':
return val + '%';
case 'Relay':
case 'Expand':
return row.Status==1?'100%':'0%';
case 'AirDetect':
return val;
default:
return '';
}
}">
<%: Html.Language("Brightness")%>
</th>
<th data-options="field:'SettingTemp',align:'center',resizable:false,
formatter: function(val,row){
if(row.Type=='AirConditioner' || row.Type=='FloorHot'){
return val + '℃';
}else return '';
}">
<%: Html.Language("SettingTemp")%>
</th>
<th data-options="field:'FanSpeed',align:'center',resizable:false,
formatter: function(val,row){
if(row.Type=='AirConditioner'){
switch (val) {
case 1:
return lang.low;
case 2:
return lang.Middle;
case 3:
return lang.HighSpeed;
default:
return lang.Automatic;
}
}else return '';
}">
<%: Html.Language("FanSpeed")%>
</th>
<th data-options="field:'Mode',align:'center',resizable:false,
formatter: function(val,row){
if(row.Type=='AirConditioner'){
switch (val) {
case 1:
return lang.Refrigeration;
case 2:
return lang.Heating;
case 3:
return lang.BlowingIn;
default:
return lang.Automatic;
}
}else return '';
}">
<%: Html.Language("Mode")%>
</th>
<th data-options="field:'Valve',align:'center',resizable:false,
formatter: function(val,row){
if(row.Type=='AirConditioner'){
if(val == 1){
return lang.ValveOpen;
} else {
return lang.ValveClose;
}
}else return '';
}">
<%: Html.Language("Valve")%>
</th>
<%--<th data-options="field:'Time',resizable:false,formatter:timeFormatter">
<%: Html.Language("WhenTheDayOfOpenLong")%>
</th>--%>
</tr>
</thead>
</table>
</div>
<style type="text/css">
.onoff {
color: red;
}
</style>
<% switch ((int)Session["isCN"]){case 1: %>
<script type="text/javascript" src="/Scripts/en-US.js"></script>
<% break; case 2: %>
<script type="text/javascript" src="/Scripts/zh-TW.js"></script>
<% break;default: %>
<script type="text/javascript" src="/Scripts/zh-CN.js"></script>
<% break; } %>
<script type="text/javascript">
function timeFormatter(val) {
var hour = Math.floor(val / 60);
var minute = val % 60;
return hour + lang.Hour + minute + lang.Minute;
}
</script>

View File

@@ -0,0 +1,316 @@
<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<dynamic>" %>
<%
//var connectingRooms = ViewData["ConnectingRooms"] as IList<Domain.Host>;
var services = ViewData["Services"] as IList<string>;
//var abnormities = ViewData["Abnormities"] as IList<string>;
%>
<style type="text/css">
#connectingRoomList
{
margin: 0;
padding: 0;
}
#connectingRoomList li
{
float: left;
padding: 3px 5px;
list-style-type: none;
cursor: default;
}
#connectingRoomList li:hover
{
background: #00A2EA;
color: #FFF;
border-radius: 5px;
}
ul.list
{
margin: 0;
padding: 0;
}
ul.list li
{
float: left;
padding: 3px 5px;
list-style-type: none;
cursor: default;
}
ul.list li label
{
font-weight: bold;
}
ul.list li:hover
{
background: #00A2EA;
color: #FFF;
border-radius: 5px;
}
#roomInfo li
{
min-width: 90px;
}
</style>
<table id="layout" style="width: 100%; height: 100%;">
<tr>
<td style="height: 50px; vertical-align: top;">
<div class="box">
<div class="title">
<%: Html.Language("RoomInformation")%></div>
<div class="container">
<div class="content">
<ul id="roomInfo" class="list clearfix">
<li>
<label>
<%: Html.Language("RoomNumber")%></label><%: Model.RoomNumber %></li>
<li>
<label>
<%: Html.Language("RoomStatus")%></label><%: Model.RoomStatus %></li>
<li>
<label>
<%: Html.Language("Identity")%></label><%: Model.Identity %></li>
<li>
<label>
<%: Html.Language("Status")%></label><%: Model.HostStatus %></li>
<li>
<label>
IP</label><%: Model.IP %></li>
<%--<li>
<label>
<%: Html.Language("Port")%></label><%: Model.Port %></li>--%>
</ul>
</div>
</div>
</div>
</td>
</tr>
<tr>
<td style="vertical-align: top;">
<div class="box">
<div class="title">
<%: Html.Language("ServiceInformation")%></div>
<div class="container">
<div class="content">
<ul id="serviceList" class="list clearfix">
<% foreach (var service in services)
{ %>
<li>
<%: service %></li>
<% } %>
</ul>
</div>
</div>
</div>
</td>
</tr>
<%--<tr>
<td style="vertical-align: top;">
<div class="box">
<div class="title">
<%: Html.Language("AbnormityMessage")%></div>
<div class="container">
<div class="content">
<ul id="alarmList" class="list clearfix">
<% foreach (var abnormity in abnormities)
{ %>
<li>
<%: abnormity %></li>
<% } %>
</ul>
</div>
</div>
</div>
</td>
</tr>--%>
<tr>
<td style="height: 40%; vertical-align: top;">
<table title='<%: Html.Language("AbnormityMessage")%>' id="abnormityMessage"
class="easyui-datagrid" data-options="
url: '/RoomStatus/LoadCurrentHostFault/',
queryParams: { hostID: <%: Model.HostID %> },
border: true,
singleSelect: false,
rownumbers: true,
striped: true,
fit: true,
fitColumns: false,
idField: 'HostID',
method: 'post',
tools:[
{ iconCls: 'icon-reload', handler: function() { $('#abnormityMessage').datagrid('reload'); } }
]
">
<thead>
<tr>
<th data-options="field:'Address',resizable:false">
<%: Html.Language("ReturnAddress")%>
</th>
<th data-options="field:'Name',resizable:false">
<%: Html.Language("Name")%>
</th>
<th data-options="field:'AbnormalStatus',resizable:false,formatter:statusFormatter">
<%: Html.Language("Status")%>
</th>
<th data-options="field:'StatusDate',resizable:false">
<%: Html.Language("StatusDate")%>
</th>
<th data-options="field:'AbnormalElectricQty',align:'center',resizable:false,formatter:electricQtyFormatter">
<%: Html.Language("Electricity")%>
</th>
<th data-options="field:'ElectricQtyDate',resizable:false">
<%: Html.Language("ElectricQtyDate")%>
</th>
<th data-options="field:'Abnormal3',align:'center',resizable:false">
<%: Html.Language("Abnormal3")%>
</th>
<th data-options="field:'Abnormal3Date',resizable:false">
<%: Html.Language("Abnormal3Date")%>
</th>
<th data-options="field:'Abnormal4',align:'center',resizable:false">
<%: Html.Language("Abnormal4")%>
</th>
<th data-options="field:'Abnormal4Date',resizable:false">
<%: Html.Language("Abnormal4Date")%>
</th>
<th data-options="field:'Abnormal5',align:'center',resizable:false">
<%: Html.Language("Abnormal5")%>
</th>
<th data-options="field:'Abnormal5Date',resizable:false">
<%: Html.Language("Abnormal5Date")%>
</th>
</tr>
</thead>
</table>
</td>
</tr>
<%--<tr>
<td style="vertical-align: top;">
<div class="box">
<div class="title">
<%: Html.Language("ConnectingRoom")%></div>
<div class="container">
<div class="content">
<ul id="" class="list clearfix">
<% foreach (var host in connectingRooms)
{ %>
<li>
<%: host.RoomNumber %></li>
<% } %>
</ul>
</div>
</div>
</div>
</td>
</tr>--%>
<tr>
<td style="height: 50%; vertical-align: top;">
<table title='<%: Html.Language("AirConditioningInformationDisplay")%>' id="air1"
class="easyui-datagrid" data-options="
url: '/RoomStatus/LoadHostAirs/',
queryParams: { HostID: <%: Model.HostID %> },
border: true,
singleSelect: false,
rownumbers: true,
striped: true,
fit: true,
fitColumns: false,
idField: 'HostID',
method: 'post',
tools:[
{ iconCls: 'icon-reload', handler: function() { $('#air1').datagrid('reload'); } }
]
">
<thead>
<tr>
<th data-options="field:'ModalAddress',resizable:false">
<%: Html.Language("ReturnAddress")%>
</th>
<th data-options="field:'Name',resizable:false">
<%: Html.Language("Name")%>
</th>
<th data-options="field:'Status',align:'center',resizable:false,
formatter: function(val){
if(val == 1){
return lang.Opened;
} else {
return lang.Closed;
}
}">
<%: Html.Language("Status")%>
</th>
<th data-options="field:'CurrentTemp',align:'center',resizable:false">
<%: Html.Language("CurrentTemperature")%>
</th>
<th data-options="field:'SettingTemp',align:'center',resizable:false">
<%: Html.Language("SetTemperature")%>
</th>
<th data-options="field:'Mode',align:'center',resizable:false,
formatter: function(val){
switch (val) {
case 1:
return lang.Refrigeration;
case 2:
return lang.Heating;
case 3:
return lang.BlowingIn;
default:
return '';
}
}">
<%: Html.Language("Mode")%>
</th>
<th data-options="field:'FanSpeed',align:'center',resizable:false,
formatter: function(val){
switch (val) {
case 1:
return lang.low;
case 2:
return lang.Middle;
case 3:
return lang.HighSpeed;
default:
return '';
}
}">
<%: Html.Language("FanSpeed")%>
</th>
<th data-options="field:'Valve',resizable:false">
<%: Html.Language("Valve")%>
</th>
</tr>
</thead>
</table>
</td>
</tr>
</table>
<script type="text/javascript">
function timeFormatter(val) {
var hour = Math.floor(val / 60);
var minute = val % 60;
return hour + lang.Hour + minute + lang.Minute;
}
//格式化异常状态
function statusFormatter(val) {
switch (val) {
case 0:
return lang.Online;
case 1:
return '<font style=' + 'color:red;' + '>' + lang.Offline + '</font>';
default:
return "";
}
}
//格式化异常电量
function electricQtyFormatter(val) {
if (val == undefined || val === "") {
return "";
}
else if (val < 26) {
return '<font style=' + 'color:red;' + '>' + val + '%</font>';
}
else {
return val + "%";
}
}
</script>

View File

@@ -0,0 +1,93 @@
<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<dynamic>" %>
<style type="text/css">
#changeRoomStatusForm ul {
list-style-type: none;
margin: 0;
padding: 0;
}
#changeRoomStatusForm ul li{
float: left;
height: 25px;
line-height: 25px;
text-align: center;
width: 100px;
}
</style>
<div class="box">
<div class="title"><%: Html.Language("RoomStatus")%></div>
<div class="container" style="width:520px;">
<div class="content" style="width:460px;">
<table style="width:100%;">
<tr>
<td style="text-align:center;width:13%;"><span class="RoomNumber"><%: Model.RoomNumber %></span></td>
<td style="text-align:center;width:13%;"><span class="RoomStatus"><%: Model.RoomStatus %></span></td>
<td style="text-align:center;width:13%;"><span class="Status"><%: Model.HostStatus %></span></td>
<%--<td style="text-align:center;width:13%;"><span class="IP"><%: Model.IP %></span></td>--%>
<%--<td style="text-align:center;width:20%;"><button class="easyui-linkbutton" onclick="changePowerSupply()"><%:ViewData["PowerSwitch"]%></button></td>--%><%--<%:ViewData["PowerSwitch"]%>--%>
<td style="width:33%; text-align:center;">
<label><%: Html.Language("PowerStatus")%></label><label id="lblPowerStatus"><%: (Model.PowerSupply) ? Html.Language("Normal") : Html.Language("Lock") %></label>
</td>
<td style="width: 20%;">
<a href="javascript:void(0)" class="easyui-linkbutton" onclick="changePowerSupply();"><%: Html.Language("PowerSwitch")%></a>
<input id="hidHostID" type="hidden" value='<%: Model.HostID %>' />
<input id="hidPowerSupply" type="hidden" value='<%: (Model.PowerSupply) ? "Lock" : "Normal" %>' />
</td>
</tr>
</table>
</div>
</div>
</div>
<div class="box">
<div class="title"><%:Html.Language("ChooseTheRoomStatus")%></div>
<div class="container">
<div class="content" style="height:33px;">
<form id="changeRoomStatusForm" method="post" action="#">
<input type="hidden" name="ID" value="<%=Model.HostID %>" />
<ul class="clearfix">
<% foreach (var item in ViewData["RoomStatus"] as IList<Domain.RoomStatus>) { %>
<li><label><input type="radio" name="RoomStatusID" value="<%=item.ID %>" <%: Model.RoomStatus == item.Name ? "checked='checked'" : "" %> /><%=item.Name %></label></li>
<% } %>
<li><a href="javascript:void(0)" class="easyui-linkbutton" onclick="changeRoomStatus();"><%:Html.Language("SendData")%></a></li>
</ul>
</form>
</div>
</div>
</div>
<script type="text/javascript">
function changeRoomStatus() {
var param = $("#changeRoomStatusForm").serializeJson();
$.tools.post(param, "/Host/ChangeRoomStatus/", function () {
$('#dialog').window('close');
viewModel && viewModel.loadRooms();
}, this);
}
function changePowerSupply(id, ctrl) {
var hostID = $("#hidHostID").val();
var powerSupply = $("#hidPowerSupply").val();
$.ajax({
url: '/Host/ChangePowerSupply/',
type: 'POST',
async: false,
dataType: 'JSON',
data: {
hostID: hostID,
ctrl: powerSupply
}, success: function (r) {
if (r.IsSuccess) {
if (powerSupply == 'Normal') {
$("#lblPowerStatus").html(lang.Normal);
$("#hidPowerSupply").val("Lock");
} else {
$("#lblPowerStatus").html(lang.Lock);
$("#hidPowerSupply").val("Normal");
}
}
$.tools.alert(r.Message);
}
});
}
</script>

View File

@@ -0,0 +1,145 @@
<%@ Page Language="C#" MasterPageFile="~/Views/Shared/MasterPage.Master" Inherits="System.Web.Mvc.ViewPage<dynamic>" %>
<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
<%: Html.Language("RoomStatus")%>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
<div title='<%: Html.Language("RoomStatus")%>' class="easyui-panel" data-options="fit:true,border:false">
<table id="dg" class="easyui-datagrid" style="width:100%; height:auto;"
data-options="
toolbar: '#tb',
border: false,
singleSelect: true,
pagination: true,
pageSize: 50,
rownumbers: true,
striped: true,
sortName: 'RoomNumber',
sortOrder: 'asc',
fit: true,
fitColumns: true,
idField: 'ID',
frozenColumns: [[
{ field: 'ID', checkbox: true }
]],
url: '/RoomStatus/LoadRoomStatus/',
method: 'post',
loadFilter: dgLoadFilter,
autoRowHeight: false,
rowStyler: function(){ return { class: 'dg-row-style' }; },
onDblClickRow: function(index, row){ detail(row); },
onRowContextMenu: dgOnRowContextMenu,
groupField: 'RoomStatus',
view: groupview,
groupFormatter: function(value, rows){
return value + '(' + rows.length + ')';
}
">
<thead>
<tr>
<th data-options="field:'Status',align:'center',formatter:statusFormatter" rowspan="2">
<%: Html.Language("Status")%>
</th>
<th data-options="field:'RoomNumber',align:'center',sortable:true" rowspan="2">
<%: Html.Language("RoomNumber")%>
</th>
<th data-options="field:'RoomStatus',align:'center',sortable:true" rowspan="2">
<%: Html.Language("RoomStatus")%>
</th>
<th data-options="field:'RoomCard',align:'center',sortable:true" rowspan="2">
<%: Html.Language("Identity")%>
</th>
<th data-options="field:'CardUserName',align:'center',sortable:true" rowspan="2">
<%: Html.Language("FullName")%>
</th>
<th data-options="align:'center'" colspan="4">
<%: Html.Language("ServiceRequest")%>
</th>
<th data-options="align:'center'" colspan="3">
<%: Html.Language("AlarmStatus")%>
</th>
<th data-options="align:'center'" colspan="3">
<%: Html.Language("AirConditioningStatus")%>
</th>
</tr>
<tr>
<th data-options="field:'RequestService',align:'center',sortable:true,formatter:requestServiceFormatter">
<%: Html.Language("Service")%>
</th>
<th data-options="field:'RequestClear',align:'center',sortable:true,formatter:requestClearFormatter">
<%: Html.Language("Clean")%>
</th>
<th data-options="field:'RequestDNDST',align:'center',sortable:true,formatter:requestDNDSTFormatter">
<%: Html.Language("NoDisturb")%>
</th>
<th data-options="field:'RequestCheckOut',align:'center',sortable:true,formatter:requestCheckOutFormatter">
<%: Html.Language("CheckOut")%>
</th>
<th data-options="field:'SOS',align:'center',sortable:true,formatter:SOSFormatter">
SOS
</th>
<th data-options="field:'DoorLockStatus',align:'center',sortable:true,formatter:doorLockStatusFormatter">
<%: Html.Language("GateLock")%>
</th>
<th data-options="field:'SafeStatus',align:'center',sortable:true,formatter:safeStatusFormatter">
<%: Html.Language("Safe")%>
</th>
<th data-options="field:'CurrentTemp',align:'center',sortable:true,formatter:function(value){ return value + '℃' }">
<%: Html.Language("Temperature")%>
</th>
<th data-options="field:'SettingTemp',align:'center',sortable:true,formatter:function(value){ return value + '℃' }">
<%: Html.Language("SetTemperature")%>
</th>
<th data-options="field:'Speed',align:'center',sortable:true,formatter:speedFormatter">
<%: Html.Language("TheWindWpeed")%>
</th>
</tr>
</thead>
</table>
</div>
<div id="tb" style="padding-left:10px;">
<%: Html.Language("Floor")%>
<select id="selGroup" name="GroupID" class="easyui-combotree" style="width:100px;"
data-options="
url:'/Group/LoadCurrentUserGroupTree/',
lines:true,
editable: false,
bodyCls:'easyui-tree-no-icon'
">
</select>&nbsp;
<%: Html.Language("Status")%>
<select id="selHostStatus" name="Status" class="easyui-combobox" style="width:100px;" data-options="panelHeight: 'auto',editable: false">
<option value=""> <%: Html.Language("All")%></option>
<option value="1"><%: Html.Language("Online")%></option>
<option value="0"><%: Html.Language("Offline")%></option>
</select>&nbsp;
<%: Html.Language("RoomNumber")%>
<input id="txtRoomNumber" class="easyui-textbox" style="width:100px;" />
<a href="javascript:void(0)" class="easyui-linkbutton" data-options="iconCls:'icon-search',plain:true" onclick="query()"><%: Html.Language("Query")%></a>
<a href="javascript:void(0)" class="easyui-linkbutton" data-options="iconCls:'icon-room-status-detail',plain:true" onclick="detail()"><%: Html.Language("Detailed")%></a>
<label style="vertical-align:middle;"><input id="chkTimingRefresh" type="checkbox" style="vertical-align:middle;" /><%: Html.Language("TimingUpdated")%></label>
</div>
<div id="dialog" class="easyui-window" title="" style="width:650px; height:500px; padding:5px;"
closed="true" modal="true" collapsible="false" minimizable="false" maximizable="false"
data-options="
tools:[
{ iconCls: 'icon-reload', handler: function() { $('#dialog').window('refresh'); } }
]
">
</div>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ScriptContent" runat="server">
<link type="text/css" rel="stylesheet" href="/Styles/room-status-index.css" />
<script type="text/javascript" src="/easyui-1.4.2/datagrid-groupview.js"></script>
<script type="text/javascript" src="/Scripts/room-status-index.js"></script>
</asp:Content>

View File

@@ -0,0 +1,69 @@
<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/SimonMasterPage.Master"
Inherits="System.Web.Mvc.ViewPage<dynamic>" %>
<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
<%: Html.Language("RoomStatus")%>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
<div class="easyui-layout" data-options="fit:true">
<div data-options="region:'north',border:false" style="height: 35px;">
<div class="toolbar">
<select id="cbtGroup" class="easyui-combotree" style="width: 100px;" data-options="
url: '/Group/LoadCurrentUserGroupTree/',
lines: true,
editable: false,
onSelect: cbtGroupOnSelect,
panelWidth: 206,
panelHeight: 300
">
</select>
<select id="cbxService" class="easyui-combobox" style="width: 100px;" data-options="
url: '/RoomService/LoadServicesForCombobox/',
valueField: 'Code',
textField: 'Name',
editable: false,
panelHeight: 'auto',
formatter: cbxServiceFormatter,
onSelect: cbxServiceOnSelect
">
</select>
<select id="cbxRoomStatus" class="easyui-combobox" style="width: 102px;" data-options="
url: '/RoomStatus/LoadRoomStatusForCombobox/',
valueField: 'ID',
textField: 'Name',
editable: false,
panelHeight: 'auto',
formatter: cbxRoomStatusFormatter,
onSelect: cbxRoomStatusOnSelect
">
</select>
<a id="btnRefresh" href="javascript:void(0)" class="toolbar-button tb-icon-refresh"
onclick="refresh();">
<%: Html.Language("Refresh")%></a>
<label>
<input id="chkSwitchLine" type="checkbox" checked="checked" /><%: Html.Language("WordWrap")%></label>
<label>
<input id="chkAirDetect" type="checkbox" /><%: Html.Language("DisplayAirQualityDetection")%></label>
</div>
</div>
<div region="center" border="false">
<table id="rooms" cellpadding="0" cellspacing="0">
</table>
</div>
<%--<div region="south" border="false">
<div id="pp" class="easyui-pagination" style="background: #efefef; border-top: 1px solid #ccc;"
data-options="total:100,pageSize:100">
</div>
</div>--%>
</div>
<div id="dialog" class="easyui-window" title="" style="width: 650px; height: 500px;
padding: 5px;" closed="true" modal="true" collapsible="false" minimizable="false"
maximizable="false" data-options="tools:[ { iconCls: 'icon-reload', handler: function() { $('#dialog').window('refresh'); } } ]">
</div>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ScriptContent" runat="server">
<link type="text/css" rel="stylesheet" href="/Styles/simon-room-status-index.css" />
<%--<script type="text/javascript" src="/Scripts/jquery.cookie.js"></script>--%>
<script type="text/javascript" src="/Scripts/libs/avalon.min.js"></script>
<script type="text/javascript" src="/Scripts/simon-room-status-index.js"></script>
</asp:Content>

View File

@@ -0,0 +1,12 @@
<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/SimonMasterPage.Master" Inherits="System.Web.Mvc.ViewPage<dynamic>" %>
<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
客房详细
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ScriptContent" runat="server">
</asp:Content>