初始化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,298 @@
<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<dynamic>" %>
<link type="text/css" rel="stylesheet" href="/Styles/partbox.css" />
<style type="text/css">
#airForm table th,
#airForm table td {
/*background: pink;*/
text-align: right;
}
#airForm table th {
font-weight: normal;
cursor: default;
}
</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" src="/Scripts/air-condition-control-index.js"></script>
<div style="margin:0px 10px;width:1110px;">
<form id="airForm" method="post" action="#">
<div class="partbox">
<div class="title"><%: Html.Language("AirConditioningInformationDisplay")%></div>
<div class="container">
<div class="content">
<table cellpadding="2px" style="width:100%;">
<tr>
<td>
<label><%: Html.Language("AirConditioningSerialNumber")%></label>
<input id="cbxModalID" name="ModalTypeID" class="easyui-combobox" style="width:80px;"
data-options="
editable: false,
panelHeight: 'auto',
valueField: 'ModalTypeID',
textField: 'CustomerName',
required: true,
onSelect: cbxModalIDOnSelect
" />
</td>
<td>
<label><%: Html.Language("AirConditioningControls")%></label>
<input id="txtControlType" name="ControlTypeName" class="easyui-textbox" style="width:80px;" readonly="readonly" />
</td>
<td style="text-align:right;padding-right:10px;"><a href="javascript:void(0)" class="easyui-linkbutton" data-options="iconCls:'icon-send'" onclick="send()"><%: Html.Language("AllIssue")%></a></td>
</tr>
</table>
</div>
</div>
</div>
<div class="partbox">
<div class="title"><%: Html.Language("BasicSetup")%></div>
<div class="container">
<div class="content">
<table style="width:100%;">
<tr>
<td>
<%: Html.Language("ModelWay")%>
<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 }
]
" />
<a href="javascript:void(0)" class="easyui-linkbutton" data-options="iconCls:'icon-send'" onclick="setAirHotColdMode()"><%: Html.Language("Issue")%></a>
</td>
<td>
<label><%: Html.Language("TemperatureSetting")%></label>
<input id="txtSettingTemp" name="SettingTemp" class="easyui-numberspinner" value="22" style="width:60px;" data-options="required:true,min:15,max:35,suffix:'℃'" />
<a href="javascript:void(0)" class="easyui-linkbutton" data-options="iconCls:'icon-send'" onclick="setAirSettingTemp()"><%: Html.Language("Issue")%></a>
</td>
<td style="text-align:right;padding-right:40px;">
<label><%: Html.Language("Locktopic")%></label>
<input id="chkIsLockTemp" name="IsLockTemp" type="checkbox" />
</td>
<td rowspan="2" style="text-align:right;padding-right:10px;">
<a href="javascript:void(0)" class="easyui-linkbutton" data-options="iconCls:'icon-send'" onclick="setAirLockTemp()"><%: Html.Language("Issue")%></a>
</td>
</tr>
<tr>
<td rowspan="2">
<label><%: Html.Language("HotAndColdMode")%></label>
<input id="cbxMode" name="Mode" class="easyui-combobox" style="width:60px;"
data-options="
editable: false,
panelHeight: 'auto',
valueField: 'value',
textField: 'text',
data: [
{ value: '1', text: lang.Refrigeration, selected: true },
{ value: '2', text: lang.Heating },
{ value: '4', text: lang.BlowingIn },
{ value: '8', text: lang.Dehumidification }
]
" />
<a href="javascript:void(0)" class="easyui-linkbutton" data-options="iconCls:'icon-send'" onclick="setAirMode()"><%: Html.Language("Issue")%></a>
</td>
<td>
<label><%: Html.Language("WindSpeed")%><%--&nbsp;&nbsp;--%></label>
<input id="cbxSpeed" 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 }
]
" />
<a href="javascript:void(0)" class="easyui-linkbutton" data-options="iconCls:'icon-send'" onclick="setAirSpeed()"><%: Html.Language("Issue")%></a>
</td>
<td style="text-align:right;">
<label><%: Html.Language("LockTheTemperature")%></label>
<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 id="Div1" class="partbox">
<div class="title"><%: Html.Language("ProfessionalSettings")%></div>
<div class="container">
<div class="content">
<table style="width:100%;">
<tr>
<td>
<label><%: Html.Language("KeepTemperature")%></label>
<input id="txtKeepTemp" name="KeepTemp" class="easyui-numberspinner" value="22" style="width:60px;" data-options="required:true,min:16,max:35,suffix:'℃'" />
<a href="javascript:void(0)" class="easyui-linkbutton" data-options="iconCls:'icon-send'" onclick="setAirKeepTemp()"><%: Html.Language("Issue")%></a>
</td>
<td>
<label><%: Html.Language("LowestTemperature")%></label>
<input id="txtLowerTemp" name="LowerTemp" class="easyui-numberspinner" value="16" style="width:60px;" data-options="required:true,min:16,max:35,suffix:'℃'" />
<a href="javascript:void(0)" class="easyui-linkbutton" data-options="iconCls:'icon-send'" onclick="setAirLowerTemp()"><%: Html.Language("Issue")%></a>
</td>
<td>
<label><%: Html.Language("HeatTransitionDelay")%></label>
<input id="txtColdHotSwitchDelayTime" name="ColdHotSwitchDelayTime" class="easyui-numberspinner" value="30" style="width:60px;" data-options="required:true,min:30,max:60,editable:false,increment:10" />
<a href="javascript:void(0)" class="easyui-linkbutton" data-options="iconCls:'icon-send'" onclick="setAirColdHotSwitchDelayTime()"><%: Html.Language("Issue")%></a>
</td>
<td style="text-align:right;padding-right:10px;">
<label><%: Html.Language("AssociatedState")%></label><%--&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;--%>
<input id="chkRelateRoomStatus" name="RelateRoomStatus" type="checkbox" />
<a href="javascript:void(0)" class="easyui-linkbutton" data-options="iconCls:'icon-send'" onclick="setAirRelateRoomStatus()"><%: Html.Language("Issue")%></a>
</td>
</tr>
<tr>
<td>
<label><%: Html.Language("TemperatureCompensated")%></label>
<input id="txtCompensatoryTemp" name="CompensatoryTemp" class="easyui-numberspinner" value="0" style="width:60px;" data-options="required:true,min:-6,max:6,precision:1,increment:0.1,suffix:'℃'" />
<a href="javascript:void(0)" class="easyui-linkbutton" data-options="iconCls:'icon-send'" onclick="setAirCompensatoryTemp()"><%: Html.Language("Issue")%></a>
</td>
<td>
<label><%: Html.Language("HighestTemperature")%></label>
<input id="txtHighTemp" name="HightTemp" class="easyui-numberspinner" value="33" style="width:60px;" data-options="required:true,min:16,max:35,suffix:'℃'" />
<a href="javascript:void(0)" class="easyui-linkbutton" data-options="iconCls:'icon-send'" onclick="setAirHighTemp()"><%: Html.Language("Issue")%></a>
</td>
<td>
<label><%: Html.Language("WelcomeModeTime")%></label>
<input id="txtWelcomeTime" name="WelcomeTime" class="easyui-numberspinner" value="30" style="width:60px;" data-options="required:true,min:0,max:255" />
<a href="javascript:void(0)" class="easyui-linkbutton" data-options="iconCls:'icon-send'" onclick="setAirWelcomeTime()"><%: Html.Language("Issue")%></a>
</td>
<td style="text-align:right;padding-right:10px;">
<label><%: Html.Language("AssociatedMagnetic")%></label><%--&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;--%>
<input id="chkRelateDoorContact" name="RelateDoorContact" type="checkbox" />
<a href="javascript:void(0)" class="easyui-linkbutton" data-options="iconCls:'icon-send'" onclick="setAirRelateDoorContact()"><%: Html.Language("Issue")%></a>
</td>
</tr>
<tr>
<td>
<label><%: Html.Language("InitialTemperature")%></label>
<input id="txtInitTemp" name="InitTemp" class="easyui-numberspinner" value="22" style="width:60px;" data-options="required:true,min:16,max:35,suffix:'℃'" />
<a href="javascript:void(0)" class="easyui-linkbutton" data-options="iconCls:'icon-send'" onclick="setAirInitTemp()"><%: Html.Language("Issue")%></a>
</td>
<td>
<label><%: Html.Language("HeatDeflection")%>&nbsp;</label>
<input id="txtHotDevition" name="HotDevition" class="easyui-numberspinner" value="2" style="width:60px;" data-options="required:true,min:0,max:5,suffix:'℃'" />
<a href="javascript:void(0)" class="easyui-linkbutton" data-options="iconCls:'icon-send'" onclick="setAirHotDevition()"><%: Html.Language("Issue")%></a>
</td>
<td></td>
<td style="text-align:right;padding-right:10px;">
<label><%: Html.Language("StoppedFanRunsWhenTemperaturesReached")%></label>
<input id="chkFanStop" type="checkbox" />
<a href="javascript:void(0)" class="easyui-linkbutton" data-options="iconCls:'icon-send'" onclick="setAirFanStop()"><%: Html.Language("Issue")%></a>
</td>
</tr>
<tr>
<td>
<label><%: Html.Language("DeadZoneTemperature")%></label>
<input id="txtDeadTemp" name="DeadTemp" class="easyui-numberspinner" value="2" style="width:60px;" data-options="required:true,min:0,max:5,suffix:'℃'" />
<a href="javascript:void(0)" class="easyui-linkbutton" data-options="iconCls:'icon-send'" onclick="setAirDeadTemp()"><%: Html.Language("Issue")%></a>
</td>
<td>
<label><%: Html.Language("ColdBias")%>&nbsp;</label>
<input id="txtColdDevition" name="ColdDevition" class="easyui-numberspinner" value="2" style="width:60px;" data-options="required:true,min:0,max:5,suffix:'℃'" />
<a href="javascript:void(0)" class="easyui-linkbutton" data-options="iconCls:'icon-send'" onclick="setAirColdDevition()"><%: Html.Language("Issue")%></a>
</td>
<td></td>
<td style="text-align:right;padding-right:10px;">
<label><%: Html.Language("TheWindTurbineForbiddenToRunAtHighSpeed")%></label><%--&nbsp;&nbsp;--%>
<input id="chkDisableFanHighSpeed" type="checkbox" />
<a href="javascript:void(0)" class="easyui-linkbutton" data-options="iconCls:'icon-send'" onclick="setAirDisableFanHighSpeed()"><%: Html.Language("Issue")%></a>
</td>
</tr>
</table>
</div>
</div>
</div>
<div id="sleep" class="partbox">
<div class="title"><%: Html.Language("SleepingTemperatureSetting")%></div>
<div class="container">
<div class="content">
<table style="width:100%;">
<tr>
<td style="width:15%;">
<label><%: Html.Language("StartSleepingTemperatureSetting")%></label>
<input id="chkSleepFlag" name="SleepFlag" type="checkbox" />
</td>
<td style="width:30%;">
<label><%: Html.Language("TemperatureDeviationOfSleep")%></label>
<input id="txtSleepDevition" name="SleepDevition" class="easyui-numberspinner" value="2" style="width:60px;" data-options="required:true,min:0,max:5,suffix:'℃'" />
</td>
<td style="width:24%;">
<label><%: Html.Language("SleepingTime")%></label>
<input id="txtSleepStartTime" name="SleepStartTime" class="easyui-timespinner" style="width:60px;" required="required" value="00:00" />
</td>
<td style="width:20%;">
<label><%: Html.Language("SleepingEndDate")%></label>
<input id="txtSleepEndTime" name="SleepEndTime" class="easyui-timespinner" style="width:60px;" required="required" value="00:00" />
</td>
<td style="width:20%;text-align:right;padding-right:10px;">
<a href="javascript:void(0)" class="easyui-linkbutton" data-options="iconCls:'icon-send'" onclick="setAirSleepMode()"><%: Html.Language("Issue")%></a>
</td>
</tr>
</table>
</div>
</div>
</div>
<div class="partbox">
<div class="title"><%: Html.Language("AirConditioningTimingSettings")%></div>
<div class="container">
<div class="content">
<table style="width:100%;">
<tr>
<td style="width:15%;" rowspan="2"><label><%: Html.Language("TimeSwitch")%></label><input id="chkTimeFlag" name="TimeFlag" type="checkbox" /></td>
<td style="width:30%;">
<label><%: Html.Language("TimeSwitchOpen1")%></label>
<input id="txtTimeStartTime1" name="TimeStartTime1" class="easyui-timespinner" style="width:60px;" required="required" value="00:00" />
</td>
<td style="width:24%;">
<label><%: Html.Language("TimeSwitchOpen2")%></label>
<input id="txtTimeStartTime2" name="TimeStartTime2" class="easyui-timespinner" style="width:60px;" required="required" value="00:00" />
</td>
<td style="width:20%;">
<label><%: Html.Language("TimeSwitchOpen3")%></label>
<input id="txtTimeStartTime3" name="TimeStartTime3" class="easyui-timespinner" style="width:60px;" required="required" value="00:00" />
</td>
<td style="width:20%;text-align:right;padding-right:10px;" rowspan="2">
<a href="javascript:void(0)" class="easyui-linkbutton" data-options="iconCls:'icon-send'" onclick="setAirTimeSetting()"><%: Html.Language("Issue")%></a>
</td>
</tr>
<tr>
<td>
<label><%: Html.Language("TimeSwitchClose1")%></label>
<input id="txtTimeEndTime1" name="TimeEndTime1" class="easyui-timespinner" style="width:60px;" required="required" value="00:00" />
</td>
<td>
<label><%: Html.Language("TimeSwitchClose2")%></label>
<input id="txtTimeEndTime2" name="TimeEndTime2" class="easyui-timespinner" style="width:60px;" required="required" value="00:00" />
</td>
<td>
<label><%: Html.Language("TimeSwitchClose3")%></label>
<input id="txtTimeEndTime3" name="TimeEndTime3" class="easyui-timespinner" style="width:60px;" required="required" value="00:00" />
</td>
</tr>
</table>
</div>
</div>
</div>
</form>
</div>

View File

@@ -0,0 +1,62 @@
<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/MasterPage.Master" Inherits="System.Web.Mvc.ViewPage<dynamic>" %>
<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
<%: Html.Language("AirConditioningControl")%>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
<div title='<%: Html.Language("AirConditioningControl")%>' class="easyui-panel" data-options="fit:true,border:false">
<div class="easyui-layout" data-options="fit:true">
<div data-options="region:'north',border:false">
<div class="datagrid-toolbar" style="padding:5px 0px 5px 10px;">
<label><%: Html.Language("AccordingToRoomNumber")%></label>
<input id="cbxRoomNumber" class="easyui-combobox" style="width:80px;"
data-options="
url: '/Host/LoadDataForRoomNumberCombobox/',
editable: false,
valueField: 'ID',
textField: 'RoomNumber',
onSelect: cbxRoomNumberOnSelect
" />
<label><%: Html.Language("AccordingToPressFloor")%></label>
<input id="cbtGroup" class="easyui-combotree" style="width:110px;"
data-options="
url:'/Group/LoadDataForGroupComboTree/',
editable:false,
lines:true
" />
<label><%: Html.Language("AccordingToRoomStatus")%></label>
<input id="cbxRoomStatus" class="easyui-combobox" style="width:80px;"
data-options="
url:'/RoomStatus/LoadDataForRoomStatusCombobox/',
editable:false,
panelHeight:'auto',
valueField:'ID',
textField:'Name'
" />
<label><%: Html.Language("AccordingToRoomType")%></label>
<input id="cbxRoomType" class="easyui-combobox" style="width:80px;"
data-options="
url:'/RoomType/LoadDataForRoomTypeCombobox/',
editable:false,
panelHeight:'auto',
valueField:'ID',
textField:'Name',
onSelect: cbxRoomTypeOnSelect
" />
</div>
</div>
<div region="center" border="false">
<% Html.RenderPartial("AirConditionControl"); %>
</div>
</div>
</div>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ScriptContent" runat="server">
</asp:Content>

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,77 @@
<%@ 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("AirConditioningControl")%>
</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">
<label><%: Html.Language("AccordingToRoomNumber")%></label>
<input id="cbxRoomNumber" class="easyui-combobox" style="width:80px;"
data-options="
url: '/Host/LoadDataForRoomNumberCombobox/',
editable: false,
valueField: 'ID',
textField: 'RoomNumber',
panelHeight:'200',
onSelect: cbxRoomNumberOnSelect
" />
<label><%: Html.Language("AccordingToPressFloor")%></label>
<input id="cbtGroup" class="easyui-combotree" style="width:110px;"
data-options="
url:'/Group/LoadDataForGroupComboTree/',
editable:false,
lines:true,
panelHeight:'auto',
onLoadSuccess: cbtGroupOnLoadSuccess
" />
<label><%: Html.Language("AccordingToRoomStatus")%></label>
<input id="cbxRoomStatus" class="easyui-combobox" style="width:80px;"
data-options="
url:'/RoomStatus/LoadDataForRoomStatusCombobox/',
editable:false,
panelHeight:'auto',
valueField:'ID',
textField:'Name'
" />
<label><%: Html.Language("AccordingToRoomType")%></label>
<input id="cbxRoomType" class="easyui-combobox" style="width:80px;"
data-options="
url:'/RoomType/LoadDataForRoomTypeCombobox/',
editable:false,
panelHeight:'auto',
valueField:'ID',
textField:'Name',
onSelect: cbxRoomTypeOnSelect
" />
</div>
</div>
<div region="center" border="false">
<% Html.RenderPartial("SeasonControl"); %>
</div>
</div>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ScriptContent" runat="server">
<style type="text/css">
.partbox .container{
border:1px solid #00A2EA;
}
/* 修改 easyui-linkbutton 默认样式 */
.l-btn,
.l-btn:hover {
opacity: 0.8;
filter: alpha(opacity=80);
background: #00A2EA;
border:1px solid #00A2EA;
}
.l-btn:hover {
opacity: 1.0;
filter: alpha(opacity=100);
}
</style>
</asp:Content>

View File

@@ -0,0 +1,178 @@
<%@ 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("AirConditioningRecord")%>
</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">
<div class="toolbar" style="height:65px;">
<div>
<%--<a href="javascript:void(0)" class="toolbar-button tb-icon-refresh" onclick="$('#dg').datagrid('reload')"><%: Html.Language("Refresh") %></a>--%>
<label><%: Html.Language("RoomNumber")%></label>
<input id="txtRoomNumber" class="easyui-validatebox" style="width: 60px;" />
<label><%: Html.Language("AirConditionerSerialNumber")%></label>
<select id="cbxAirNo" class="easyui-combobox" style="width:80px;" data-options="
panelHeight: 'auto',
valueField: 'Value',
textField: 'Name',
editable: false,
url: '/AirConditionStatus/LoadAirNos/',
onLoadSuccess: function() {
var data = $('#cbxAirNo').combobox('getData');
$('#cbxAirNo').combobox('select',data[0].Value);
},
">
</select>
<label><%: Html.Language("StartDate")%></label>
<input id="txtStartTime" type="text" class="easyui-datetimebox" style="width: 130px;" data-options="showSeconds:false" />
<label><%: Html.Language("Deadline")%></label>
<input id="txtEndTime" type="text" class="easyui-datetimebox" style="width: 130px;" data-options="showSeconds:false" />
<a href="javascript:void(0)" class="toolbar-button tb-icon-search" onclick="query();"><%: Html.Language("Query")%></a>
</div>
<div>
<input type="radio" name="type" value="AirCircuit" checked="checked" onchange="typeOnChanged('AirCircuit')" />
<label><%: Html.Language("AirConditioningCircuit")%></label>
<select id="cbxAirCircuit" class="easyui-combogrid" style="width:130px;"
data-options="
url: '/AirConditionStatus/LoadACDeviceSubtypes/',
multiple: true,
panelHeight: 'auto',
idField: 'Value',
valueField: 'Value',
textField: 'Name',
editable: false,
columns:[[
{ field: 'ck',checkbox: true },
{ field: 'Name', title: '<%: Html.Language("AirConditioningCircuit")%>' }
]]
">
</select>
<input type="radio" name="type" value="RoomTemp" onchange="typeOnChanged('RoomTemp')" />
<label><%: Html.Language("RoomTemp")%></label>
<select id="cbxRoomTemp" class="easyui-combogrid" style="width:130px;" disabled="disabled"
data-options="
url: '/AirConditionStatus/LoadTempTypes/',
multiple: true,
panelHeight: 'auto',
idField: 'Value',
valueField: 'Value',
textField: 'Name',
editable: false,
columns:[[
{ field: 'ck',checkbox: true },
{ field: 'Name', title: '<%: Html.Language("RoomTemp")%>' }
]]
">
</select>
</div>
</div>
</div>
<div data-options="region:'center',border:false">
<table id="dg" class="easyui-datagrid" style="width: 100%; height: auto;" data-options="
border: false,
singleSelect: true,
pagination: true,
pageSize: 50,
rownumbers: true,
striped: true,
sortName: 'RoomNumber',
sortOrder: 'asc',
fit: true,
fitColumns: true,
method: 'POST'
">
<thead>
<tr>
<th data-options="field:'RoomNumber',sortable:true,resizable:false">
<%: Html.Language("RoomNumber")%>
</th>
<th data-options="field:'SubtypeName',sortable:true,resizable:false">
<%: Html.Language("AirConditioningFan")%>
</th>
<th data-options="field:'TempType',sortable:true,resizable:false,hidden:true,formatter:tempTypeFormatter">
<%: Html.Language("RoomTemp")%>
</th>
<th data-options="field:'Temp',sortable:true,resizable:false,hidden:true,formatter:function(val){return val+'℃';}">
<%: Html.Language("TemperatureValues")%>
</th>
<th data-options="field:'StartTime',sortable:true,resizable:false">
<%: Html.Language("StartDate")%>
</th>
<th data-options="field:'EndTime',sortable:true,resizable:false">
<%: Html.Language("Deadline")%>
</th>
<th data-options="field:'Time',sortable:true,resizable:false,formatter:timeFormatter">
<%: Html.Language("Time")%>
</th>
</tr>
</thead>
</table>
</div>
</div>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ScriptContent" runat="server">
<script type="text/javascript">
function tempTypeFormatter(val) {
if (val == <%: (int)Domain.TempType.RoomTemp %>) {
return '<%: Html.Language(Domain.TempType.RoomTemp.ToString()) %>';
} else if (val == <%: (int)Domain.TempType.SettingTemp %>) {
return '<%: Html.Language(Domain.TempType.SettingTemp.ToString()) %>';
}
}
function timeFormatter(val) {
var hour = Math.floor(val / 60);
var minute = Math.ceil(val % 60);
return hour + lang.Hour + minute + lang.Minute;
}
function typeOnChanged(type) {
if (type === 'AirCircuit') {
$('#cbxAirCircuit').combobox('enable');
$('#cbxRoomTemp').combobox('disable');
$('#dg').datagrid('loadData', { total: 0, rows: [] });
$('#dg').datagrid('showColumn', 'SubtypeName');
$('#dg').datagrid('hideColumn', 'TempType');
$('#dg').datagrid('hideColumn', 'Temp');
} else if(type === 'RoomTemp') {
$('#cbxAirCircuit').combobox('disable');
$('#cbxRoomTemp').combobox('enable');
$('#dg').datagrid('loadData', { total: 0, rows: [] });
$('#dg').datagrid('hideColumn', 'SubtypeName');
$('#dg').datagrid('showColumn', 'TempType');
$('#dg').datagrid('showColumn', 'Temp');
}
}
function query() {
var params = {
RoomNumber: $('#txtRoomNumber').val(),
AirNo: $('#cbxAirNo').combobox('getValue'),
StartTime: $('#txtStartTime').datetimespinner('getValue'),
EndTime: $('#txtEndTime').datetimespinner('getValue'),
AirRecordType: $('input:radio[name="type"]:checked').val(),
DeviceSubtypes: $('#cbxAirCircuit').combogrid('getValues').join(','),
TempTypes: $('#cbxRoomTemp').combobox('getValues').join(',')
};
if(params.RoomNumber == '') {
$.tools.alert(lang.PleaseEnterRoomNumber);
return;
}
if(params.AirNo == '') {
$.tools.alert(lang.PleaseSelectAirNo);
return;
}
$('#dg').datagrid({ url: '/AirConditionStatus/LoadHostAirRecords/', queryParams: params });
}
$(function () {
var curTime = new Date();
var startTime = new Date(curTime.getTime() - 7 * 24 * 60 * 60 * 1000);
$("#txtStartTime").datetimebox("setValue", startTime.format('yyyy-MM-dd hh:mm:ss'));
$("#txtEndTime").datetimebox("setValue", curTime.format('yyyy-MM-dd hh:mm:ss'));
});
</script>
</asp:Content>

View File

@@ -0,0 +1,286 @@
<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<IList<Domain.AlarmSetting>>" %>
<link type="text/css" rel="stylesheet" href="/Styles/partbox.css" />
<style type="text/css">
#container
{
width: 620px;
margin: 10px;
}
#col1
{
float: left;
width: 50%;
}
#col2
{
float: right;
width: 50%;
}
.numberbox .textbox-text
{
text-align: right;
}
</style>
<div id="container">
<div id="col1">
<div class="partbox" style="width: 300px;">
<div class="title">
<%: Html.Language("DoorAlarmSettings")%></div>
<div class="container">
<div class="content">
<table style="margin: 20px auto;">
<col style="width: 160px;" />
<tr>
<td>
<%: Html.Language("EnableGuestsAtTheDoorOpenAlarm")%>
</td>
<td class="align-right">
<input type="checkbox" id="A01" />
</td>
</tr>
<tr>
<td class="align-right">
<%: Html.Language("AlarmDelayTime")%>
</td>
<td class="align-right">
<input id="A02" class="easyui-numberbox" style="width: 100px;" data-options="required:true,min:0"
value="0" />
</td>
</tr>
<tr>
<td>
<%: Html.Language("NoOneInTheDoorOpenAlarm")%>
</td>
<td class="align-right">
<input id="A03" type="checkbox" />
</td>
</tr>
<tr>
<td class="align-right">
<%: Html.Language("AlarmDelayTime")%>
</td>
<td class="align-right">
<input id="A04" class="easyui-numberbox" style="width: 100px;" data-options="required:true,min:0"
value="0" />
</td>
</tr>
<tr>
<td>
<%: Html.Language("TheGuestsAtTheDoorAlarmEnableNon")%>
</td>
<td class="align-right">
<input id="A05" type="checkbox" />
</td>
</tr>
<tr>
<td class="align-right">
<%: Html.Language("AlarmDelayTime")%>
</td>
<td class="align-right">
<input id="A06" class="easyui-numberbox" style="width: 100px;" data-options="required:true,min:0"
value="0" />
</td>
</tr>
</table>
</div>
</div>
</div>
<div class="partbox" style="width: 300px;">
<div class="title">
<%: Html.Language("TemperatureAnomaliesAlarmSettings")%></div>
<div class="container">
<div class="content">
<table style="margin: 20px auto;">
<tr>
<td>
<%: Html.Language("EnableTheAbnormalTemperatureAlarm")%>
</td>
<td class="align-right">
<input id="A09" type="checkbox" />
</td>
</tr>
<tr>
<td class="align-right">
<%: Html.Language("HighTemperatureAlarmTemperature")%>℃
</td>
<td class="align-right">
<input id="A10" class="easyui-numberbox" style="width: 100px;" data-options="required:true,min:-100,max:100"
value="0" />
</td>
</tr>
<tr>
<td class="align-right">
<%: Html.Language("HighTemperatureAlarmTemperatureDeviation")%>℃
</td>
<td class="align-right">
<input id="A11" class="easyui-numberbox" style="width: 100px;" data-options="required:true,min:-100,max:100"
value="0" />
</td>
</tr>
<tr>
<td class="align-right">
<%: Html.Language("LowTemperatureAlarmTemperature")%>℃
</td>
<td class="align-right">
<input id="A12" class="easyui-numberbox" style="width: 100px;" data-options="required:true,min:-100,max:100"
value="0" />
</td>
</tr>
<tr>
<td class="align-right">
<%: Html.Language("LowTemperatureDeviationAlarm")%>℃
</td>
<td class="align-right">
<input id="A13" class="easyui-numberbox" style="width: 100px;" data-options="required:true,min:-100,max:100"
value="0" />
</td>
</tr>
</table>
</div>
</div>
</div>
<!-- col1 end -->
</div>
<div id="col2">
<div class="partbox" style="width: 300px;">
<div class="title">
<%: Html.Language("SafeExceptionAlarmSettings")%></div>
<div class="container">
<div class="content">
<table style="margin: 20px auto;">
<tr>
<td>
<%: Html.Language("EnableNonGuestsInTheSafeOpenAlarm")%>
</td>
<td class="align-right">
<input id="A07" type="checkbox" />
</td>
</tr>
<tr>
<td>
<%: Html.Language("CheckOutTheSafeAlarmOffEnabled")%>
</td>
<td class="align-right">
<input id="A08" type="checkbox" />
</td>
</tr>
</table>
</div>
</div>
</div>
<div class="partbox" style="width: 300px;">
<div class="title">
<%: Html.Language("ServicePromptSettings")%></div>
<div class="container">
<div class="content">
<table style="margin: 20px auto;">
<tr>
<td>
SOS
</td>
<td class="align-right">
<input type="checkbox" id="B01" />
</td>
</tr>
<tr>
<td>
<%: Html.Language("NoDisturb")%>
</td>
<td class="align-right">
<input type="checkbox" id="B02" />
</td>
</tr>
<tr>
<td>
<%: Html.Language("CleanUp")%>
</td>
<td class="align-right">
<input type="checkbox" id="B03" />
</td>
</tr>
<tr>
<td>
<%: Html.Language("Call")%>
</td>
<td class="align-right">
<input type="checkbox" id="B04" />
</td>
</tr>
<tr>
<td>
<%: Html.Language("CheckOut")%>
</td>
<td class="align-right">
<input type="checkbox" id="B05" />
</td>
</tr>
<tr>
<td>
<%: Html.Language("Washing")%>
</td>
<td class="align-right">
<input type="checkbox" id="B06" />
</td>
</tr>
<tr>
<td>
<%: Html.Language("GuestsAtTheDoorOpen")%>
</td>
<td class="align-right">
<input type="checkbox" id="C01" />
</td>
</tr>
<tr>
<td>
<%: Html.Language("NoOneDoorOpen")%>
</td>
<td class="align-right">
<input type="checkbox" id="C02" />
</td>
</tr>
<tr>
<td>
<%: Html.Language("NonGuestInTheBoxSwitch")%>
</td>
<td class="align-right">
<input type="checkbox" id="C03" />
</td>
</tr>
<tr>
<td>
<%: Html.Language("CheckOutTheSafeDepositBox")%>
</td>
<td class="align-right">
<input type="checkbox" id="C04" />
</td>
</tr>
<tr>
<td>
<%: Html.Language("RoomTemperatureAnomaly")%>
</td>
<td class="align-right">
<input type="checkbox" id="C05" />
</td>
</tr>
<tr>
<td>
<%: Html.Language("NonGuestAtTheDoor")%>
</td>
<td class="align-right">
<input type="checkbox" id="C06" />
</td>
</tr>
<tr>
<td>
<%: Html.Language("TheThermostatDropped")%>
</td>
<td class="align-right">
<input type="checkbox" id="C07" />
</td>
</tr>
</table>
</div>
</div>
</div>
</div>
</div>

View File

@@ -0,0 +1,227 @@
<%@ Page Language="C#" MasterPageFile="~/Views/Shared/MasterPage.Master" Inherits="System.Web.Mvc.ViewPage<dynamic>" %>
<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
<%:Html.Language("AlarmSetting")%>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
<div title='<%:Html.Language("AlarmSetting")%>' class="easyui-panel" data-options="fit:true,border:false">
<div class="easyui-layout" data-options="fit:true">
<div region="north" data-options="border:false">
<div class="datagrid-toolbar">
<a href="javascript:void(0)" class="easyui-linkbutton" data-options="plain:true,iconCls:'icon-reload'" data-bind="click: load"><%: Html.Language("Refresh")%></a>
<a href="javascript:void(0)" class="easyui-linkbutton" data-options="plain:true,iconCls:'icon-save'" data-bind="click: save"><%: Html.Language("Save")%></a>
</div>
</div>
<div region="center" data-options="border:false" style="overflow:hidden;">
<div data-bind="with: settings">
<div id="col1">
<div class="partbox">
<div class="title"><%: Html.Language("DoorAlarmSettings")%></div>
<div class="container">
<div class="content">
<ul data-bind="foreach: A">
<!-- ko if: Code==='A01' -->
<li data-bind="with: $data">
<label data-bind="text: Name"></label>
<input type="checkbox" data-bind="checked: Value, event: { change: $root.a01Change }" />
</li>
<!-- /ko -->
<!-- ko if: Code=== 'A02' -->
<li data-bind="with: $data">
<label data-bind="text: Name"></label>
<input type="text" data-bind="enable: $root.a01Enable, value: Value" />
</li>
<!-- /ko -->
<!-- ko if: Code=== 'A03' -->
<li data-bind="with: $data">
<label data-bind="text: Name"></label>
<input type="checkbox" data-bind="checked: Value, event: { change: $root.a03Change }" />
</li>
<!-- /ko -->
<!-- ko if: Code=== 'A04' -->
<li data-bind="with: $data">
<label data-bind="text: Name"></label>
<input type="text" data-bind="enable: $root.a03Enable, value: Value" />
</li>
<!-- /ko -->
<!-- ko if: Code=== 'A05' -->
<li data-bind="with: $data">
<label data-bind="text: Name"></label>
<input type="checkbox" data-bind="checked: Value, event: { change: $root.a05Change }" />
</li>
<!-- /ko -->
<!-- ko if: Code=== 'A06' -->
<li data-bind="with: $data">
<label data-bind="text: Name"></label>
<input type="text" data-bind="enable: $root.a05Enable, value: Value" />
</li>
<!-- /ko -->
</ul>
</div>
</div>
</div>
<div class="partbox">
<div class="title"><%: Html.Language("TemperatureAnomaliesAlarmSettings")%></div>
<div class="container">
<div class="content">
<ul data-bind="foreach: A">
<!-- ko if: Code==='A09' -->
<li data-bind="with: $data">
<label data-bind="text: Name"></label>
<input type="checkbox" data-bind="checked: Value, event: { change: $root.a09Change }" />
</li>
<!-- /ko -->
<!-- ko if: Code=== 'A10' -->
<li data-bind="with: $data">
<label data-bind="text: Name"></label>
<input type="text" data-bind="value: Value, enable: $root.a09Enable" />
</li>
<!-- /ko -->
<!-- ko if: Code=== 'A11' -->
<li data-bind="with: $data">
<label data-bind="text: Name"></label>
<input type="text" data-bind="value: Value, enable: $root.a09Enable" />
</li>
<!-- /ko -->
<!-- ko if: Code=== 'A12' -->
<li data-bind="with: $data">
<label data-bind="text: Name"></label>
<input type="text" data-bind="value: Value, enable: $root.a09Enable" />
</li>
<!-- /ko -->
</ul>
</div>
</div>
</div>
<div class="partbox">
<div class="title"><%: Html.Language("SafeExceptionAlarmSettings")%></div>
<div class="container">
<div class="content">
<ul data-bind="foreach: A">
<!-- ko if: Code==='A07' -->
<li data-bind="with: $data">
<label data-bind="text: Name"></label>
<input type="checkbox" data-bind="checked: Value" />
</li>
<!-- /ko -->
<!-- ko if: Code=== 'A08' -->
<li data-bind="with: $data">
<label data-bind="text: Name"></label>
<input type="checkbox" data-bind="checked: Value" />
</li>
<!-- /ko -->
</ul>
</div>
</div>
</div>
</div><!-- col1 end -->
<div id="col2">
<div class="partbox">
<div class="title"><%: Html.Language("ServicePromptSettings")%></div>
<div class="container">
<div class="content">
<ul data-bind="foreach: B">
<li>
<label data-bind="text: Name"></label>
<input type="checkbox" data-bind="checked: Value" />
</li>
</ul>
</div>
</div>
</div>
<div class="partbox">
<div class="title"><%: Html.Language("AbnormalPromptSettings")%></div>
<div class="container">
<div class="content">
<ul data-bind="foreach: C">
<li>
<label data-bind="text: Name"></label>
<input type="checkbox" data-bind="checked: Value" />
</li>
</ul>
</div>
</div>
</div>
</div><!-- col2 end -->
</div>
</div>
</div>
</div>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ScriptContent" runat="server">
<link type="text/css" rel="stylesheet" href="/Styles/partbox.css" />
<style type="text/css">
#container{
width:640px;
margin:10px;
}
#col1 {
float:left;
width:48%;
padding: 5px;
}
#col2 {
float:right;
width:48%;
padding: 5px;
}
.numberbox .textbox-text {
text-align:right;
}
ul {
padding: 0;
margin: 0;
list-style-type: none;
}
ul li {
margin: 2px;
}
ul li label {
display: inline-block;
vertical-align: middle;
width: 210px;
}
ul li input {
display: inline-block;
vertical-align: middle;
}
ul li input[type='text'] {
width:100px;
text-align: right;
}
#col1 {
width: 350px;
float: left;
padding: 5px;
}
#col2 {
width: 350px;
float: left;
padding: 5px;
}
</style>
<script type="text/javascript" src="/Scripts/knockout-3.3.0.js"></script>
<script type="text/javascript" src="/Scripts/knockout.mapping-latest.js"></script>
<script type="text/javascript" src="/Scripts/alarm-setting-index.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; } %>
</asp:Content>

View File

@@ -0,0 +1,237 @@
<%@ 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("AlarmSetting")%>
</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="overflow:hidden;height:30px;">
<div class="toolbar">
<a href="javascript:void(0)" class="toolbar-button tb-icon-refresh" data-bind="click: load"><%: Html.Language("Refresh")%></a>
<a href="javascript:void(0)" class="toolbar-button tb-icon-save" data-bind="click: save"><%: Html.Language("Save")%></a>
</div>
</div>
<div data-options="region:'center',border:false">
<div data-bind="with: settings">
<div id="col1">
<div class="partbox">
<div class="title"><%: Html.Language("DoorAlarmSettings")%></div>
<div class="container">
<div class="content">
<ul data-bind="foreach: A">
<!-- ko if: Code==='A01' -->
<li data-bind="with: $data">
<label data-bind="text: Name"></label>
<input type="checkbox" data-bind="checked: Value, event: { change: $root.a01Change }" />
</li>
<!-- /ko -->
<!-- ko if: Code=== 'A02' -->
<li data-bind="with: $data">
<label data-bind="text: Name"></label>
<input type="text" data-bind="enable: $root.a01Enable, value: Value" />
</li>
<!-- /ko -->
<!-- ko if: Code=== 'A03' -->
<li data-bind="with: $data">
<label data-bind="text: Name"></label>
<input type="checkbox" data-bind="checked: Value, event: { change: $root.a03Change }" />
</li>
<!-- /ko -->
<!-- ko if: Code=== 'A04' -->
<li data-bind="with: $data">
<label data-bind="text: Name"></label>
<input type="text" data-bind="enable: $root.a03Enable, value: Value" />
</li>
<!-- /ko -->
<!-- ko if: Code=== 'A05' -->
<li data-bind="with: $data">
<label data-bind="text: Name"></label>
<input type="checkbox" data-bind="checked: Value, event: { change: $root.a05Change }" />
</li>
<!-- /ko -->
<!-- ko if: Code=== 'A06' -->
<li data-bind="with: $data">
<label data-bind="text: Name"></label>
<input type="text" data-bind="enable: $root.a05Enable, value: Value" />
</li>
<!-- /ko -->
</ul>
</div>
</div>
</div>
<div class="partbox">
<div class="title"><%: Html.Language("TemperatureAnomaliesAlarmSettings")%></div>
<div class="container">
<div class="content">
<ul data-bind="foreach: A">
<!-- ko if: Code==='A09' -->
<li data-bind="with: $data">
<label data-bind="text: Name"></label>
<input type="checkbox" data-bind="checked: Value, event: { change: $root.a09Change }" />
</li>
<!-- /ko -->
<!-- ko if: Code=== 'A10' -->
<li data-bind="with: $data">
<label data-bind="text: Name"></label>
<input type="text" data-bind="value: Value, enable: $root.a09Enable" />
</li>
<!-- /ko -->
<!-- ko if: Code=== 'A11' -->
<li data-bind="with: $data">
<label data-bind="text: Name"></label>
<input type="text" data-bind="value: Value, enable: $root.a09Enable" />
</li>
<!-- /ko -->
<!-- ko if: Code=== 'A12' -->
<li data-bind="with: $data">
<label data-bind="text: Name"></label>
<input type="text" data-bind="value: Value, enable: $root.a09Enable" />
</li>
<!-- /ko -->
<!-- ko if: Code=== 'A13' -->
<li data-bind="with: $data">
<label data-bind="text: Name"></label>
<input type="text" data-bind="value: Value, enable: $root.a09Enable" />
</li>
<!-- /ko -->
</ul>
</div>
</div>
</div>
<div class="partbox">
<div class="title"><%: Html.Language("SafeExceptionAlarmSettings")%></div>
<div class="container">
<div class="content">
<ul data-bind="foreach: A">
<!-- ko if: Code==='A07' -->
<li data-bind="with: $data">
<label data-bind="text: Name"></label>
<input type="checkbox" data-bind="checked: Value" />
</li>
<!-- /ko -->
<!-- ko if: Code=== 'A08' -->
<li data-bind="with: $data">
<label data-bind="text: Name"></label>
<input type="checkbox" data-bind="checked: Value" />
</li>
<!-- /ko -->
</ul>
</div>
</div>
</div>
</div><!-- col1 end -->
<div id="col2">
<div class="partbox">
<div class="title"><%: Html.Language("ServicePromptSettings")%></div>
<div class="container">
<div class="content">
<ul data-bind="foreach: B">
<li>
<label data-bind="text: Name"></label>
<input type="checkbox" data-bind="checked: Value" />
<!-- ko if: Code==='B01' -->
<%: Html.Language("VoicePrompts")%>
<input type="checkbox" data-bind="checked: Beep" />
<!-- /ko -->
</li>
</ul>
</div>
</div>
</div>
<div class="partbox">
<div class="title"><%: Html.Language("AbnormalPromptSettings")%></div>
<div class="container">
<div class="content">
<ul data-bind="foreach: C">
<li>
<label data-bind="text: Name"></label>
<input type="checkbox" data-bind="checked: Value" />
</li>
</ul>
</div>
</div>
</div>
</div><!-- col2 end -->
</div>
</div>
</div>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ScriptContent" runat="server">
<link type="text/css" rel="stylesheet" href="/Styles/partbox.css" />
<style type="text/css">
.partbox .container{
border:1px solid #00A2EA;
}
#container{
width:640px;
margin:10px;
}
#col1 {
float:left;
width:48%;
padding: 5px;
}
#col2 {
float:right;
width:48%;
padding: 5px;
}
.numberbox .textbox-text {
text-align:right;
}
ul {
padding: 0;
margin: 0;
list-style-type: none;
}
ul li {
margin: 2px;
}
ul li label {
display: inline-block;
vertical-align: middle;
width: 308px;
}
ul li input {
display: inline-block;
vertical-align: middle;
}
ul li input[type='text'] {
width:100px;
text-align: right;
}
#col1 {
width: 450px;
float: left;
padding: 5px;
}
#col2 {
width: 473px;
float: left;
padding: 5px;
}
</style>
<script type="text/javascript" src="/Scripts/knockout-3.3.0.js"></script>
<script type="text/javascript" src="/Scripts/knockout.mapping-latest.js"></script>
<script type="text/javascript" src="/Scripts/alarm-setting-index.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; } %>
</asp:Content>

View File

@@ -0,0 +1,351 @@
<%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage<dynamic>" %>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width,user-scalable=no,initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0" />
<title>BLW API</title>
<style type="text/css">
body {
font-size: 10pt;
}
</style>
<script type="text/javascript" src="/Scripts/jquery.min.js"></script>
<script type="text/javascript">
$(function () {
$('#a1').click(function () {
var code = $('#txtCode').val();
var creatDate = $('#txtCreatDate').val();
var roomNumber = $('#txtRoomNumber').val();
for (var i = 0; i < 30; i++) {
$.ajax({
url: '/api/GetRCUStatus/',
type: 'POST',
dataType: 'JSON',
data: { jsonData: "{code: '" + code + "', creatDate: '" + creatDate + "', roomNumber: '" + roomNumber + "'}" },
error: function (XMLHttpRequest, textStatus, errorThrown) {
alert('访问失败。');
},
success: function (r) {
if (r.IsSuccess) {
//alert(JSON.stringify(r.Result));
$("#result").html(JSON.stringify(r.Result));
} else {
//alert(r.Result);
$("#result").html(i.toString());
}
}
});
}
});
$('#a6').click(function () {
var code = $('#txtCode').val();
var creatDate = $('#txtCreatDate').val();
var roomNumber = $('#txtRoomNumber').val();
$.ajax({
url: '/api/GetRoomServiceList/',
type: 'POST',
dataType: 'JSON',
data: { jsonData: "{code: '" + code + "', creatDate: '" + creatDate + "', roomNumber: '" + roomNumber + "'}" },
error: function (XMLHttpRequest, textStatus, errorThrown) {
alert('访问失败。');
},
success: function (r) {
if (r.IsSuccess) {
alert(JSON.stringify(r.Result));
} else {
alert(r.Result);
}
}
});
});
$('#a7').click(function () {
var code = $('#txtCode').val();
var creatDate = $('#txtCreatDate').val();
var roomNumber = $('#txtRoomNumber').val();
$.ajax({
url: '/api/GetRoomSceneList/',
type: 'POST',
dataType: 'JSON',
data: { jsonData: "{code: '" + code + "', creatDate: '" + creatDate + "', roomNumber: '" + roomNumber + "'}" },
error: function (XMLHttpRequest, textStatus, errorThrown) {
alert('访问失败。');
},
success: function (r) {
if (r.IsSuccess) {
alert(JSON.stringify(r.Result));
} else {
alert(r.Result);
}
}
});
});
$('#a2').click(function () {
var code = $('#txtCode').val();
var creatDate = $('#txtCreatDate').val();
var roomNumber = $('#txtRoomNumber').val();
$.ajax({
url: '/api/GetRoomLightList/',
type: 'POST',
dataType: 'JSON',
data: { jsonData: "{code: '" + code + "', creatDate: '" + creatDate + "', roomNumber: '" + roomNumber + "'}" },
error: function (XMLHttpRequest, textStatus, errorThrown) {
alert('访问失败。');
},
success: function (r) {
if (r.IsSuccess) {
alert(JSON.stringify(r.Result));
} else {
alert(r.Result);
}
}
});
});
$('#a3').click(function () {
var code = $('#txtCode').val();
var creatDate = $('#txtCreatDate').val();
var roomNumber = $('#txtRoomNumber').val();
var modalAddress = $('#txtModalAddress').val();
var status = $('#txtStatus').val();
var brightness = $('#txtBrightness').val();
$.ajax({
url: '/api/SetRCULight/',
type: 'POST',
dataType: 'JSON',
data: { jsonData: "{code: '" + code + "', creatDate: '" + creatDate + "', roomNumber: '" + roomNumber +
"',modalAddress:'" + modalAddress + "',status:" + status + ", brightness:" + brightness + "}"
},
error: function (XMLHttpRequest, textStatus, errorThrown) {
alert('访问失败。');
},
success: function (r) {
if (r.IsSuccess) {
alert(r.Result);
} else {
alert(r.Result);
}
}
});
});
$('#a4').click(function () {
var code = $('#txtCode').val();
var creatDate = $('#txtCreatDate').val();
var roomNumber = $('#txtRoomNumber').val();
$.ajax({
url: '/api/GetRoomAirList/',
type: 'POST',
dataType: 'JSON',
data: { jsonData: "{code: '" + code + "', creatDate: '" + creatDate + "', roomNumber: '" + roomNumber + "'}" },
error: function (XMLHttpRequest, textStatus, errorThrown) {
alert('访问失败。');
},
success: function (r) {
if (r.IsSuccess) {
alert(JSON.stringify(r.Result));
} else {
alert(r.Result);
}
}
});
});
$('#a5').click(function () {
var code = $('#txtCode').val();
var creatDate = $('#txtCreatDate').val();
var roomNumber = $('#txtRoomNumber').val();
var modalAddress = $('#txtModalAddress1').val();
var onOff = $('#txtOnOff').val();
var temperature = $('#txtTemperature').val();
var fanSpeed = $('#txtFanSpeed').val();
var mode = $('#txtMode').val();
var valve = $('#txtValve').val();
$.ajax({
url: '/api/SetRCUAir/',
type: 'POST',
dataType: 'JSON',
data: { jsonData: "{code: '" + code + "', creatDate: '" + creatDate + "', roomNumber: '" + roomNumber +
"',modalAddress:'" + modalAddress + "',onOff:" + onOff + ", temperature:" + temperature +
", fanSpeed:" + fanSpeed + ", mode:" + mode + ", valve:" + valve + "}"
},
error: function (XMLHttpRequest, textStatus, errorThrown) {
alert('访问失败。');
},
success: function (r) {
if (r.IsSuccess) {
alert(r.Result);
} else {
alert(r.Result);
}
}
});
});
$('#a8').click(function () {
var code = $('#txtCode').val();
var creatDate = $('#txtCreatDate').val();
var roomNumber = $('#txtRoomNumber').val();
var sceneID = $('#txtSceneID').val();
$.ajax({
url: '/api/SetRCUScene/',
type: 'POST',
dataType: 'JSON',
data: { jsonData: "{code: '" + code + "', creatDate: '" + creatDate + "', roomNumber: '" + roomNumber + "',sceneID:" + sceneID + "}"
},
error: function (XMLHttpRequest, textStatus, errorThrown) {
alert('访问失败。');
},
success: function (r) {
if (r.IsSuccess) {
alert(r.Result);
} else {
alert(r.Result);
}
}
});
});
$('#a9').click(function () {
var code = $('#txtCode').val();
var creatDate = $('#txtCreatDate').val();
var roomNumber = $('#txtRoomNumber').val();
var modalAddress = $('#txtModalAddress2').val();
var status = $('#txtStatus2').val();
$.ajax({
url: '/api/SetRCUService/',
type: 'POST',
dataType: 'JSON',
data: { jsonData: "{code: '" + code + "', creatDate: '" + creatDate + "', roomNumber: '" + roomNumber +
"',modalAddress:'" + modalAddress + "',status:" + status + "}"
},
error: function (XMLHttpRequest, textStatus, errorThrown) {
alert('访问失败。');
},
success: function (r) {
if (r.IsSuccess) {
alert(r.Result);
} else {
alert(r.Result);
}
}
});
});
$('#a10').click(function () {
var code = $('#txtCode').val();
var creatDate = $('#txtCreatDate').val();
var roomNumber = $('#txtRoomNumber').val();
$.ajax({
url: '/api/GetHotelInfo/',
type: 'POST',
dataType: 'JSON',
data: { jsonData: "{code: '" + code + "', creatDate: '" + creatDate + "', roomNumber: '" + roomNumber + "'}" },
error: function (XMLHttpRequest, textStatus, errorThrown) {
alert('访问失败。');
},
success: function (r) {
if (r.IsSuccess) {
$("#result").html(JSON.stringify(r.Result));
} else {
alert(r.Result);
}
}
});
});
$('#a11').click(function () {
var code = $('#txtCode').val();
var creatDate = $('#txtCreatDate').val();
var roomNumber = $('#txtRoomNumber').val();
$.ajax({
url: '/api/GetRoomTypeAndModalsList/',
type: 'POST',
dataType: 'JSON',
data: { jsonData: "{code: '" + code + "', creatDate: '" + creatDate + "', roomNumber: '" + roomNumber + "'}" },
error: function (XMLHttpRequest, textStatus, errorThrown) {
alert('访问失败。');
},
success: function (r) {
if (r.IsSuccess) {
$("#result").html(JSON.stringify(r.Result));
} else {
alert(r.Result);
}
}
});
});
$('#a12').click(function () {
var phone = $('#txtPhone').val();
$.ajax({
url: '/api/GetHotelInfoForWX/',
type: 'POST',
dataType: 'JSON',
data: { jsonData: "{phone: '" + phone + "'}" },
error: function (XMLHttpRequest, textStatus, errorThrown) {
alert('访问失败。');
},
success: function (r) {
if (r.IsSuccess) {
$("#result").html(JSON.stringify(r.Result));
} else {
alert(r.Result);
}
}
});
});
$('#a13').click(function () {
var code = $('#txtCode').val();
var creatDate = $('#txtCreatDate').val();
$.ajax({
url: '/api/GetOperationLog/',
type: 'POST',
dataType: 'JSON',
data: { jsonData: "{code: '" + code + "', creatDate: '" + creatDate + "'}" },
error: function (XMLHttpRequest, textStatus, errorThrown) {
alert('访问失败。');
},
success: function (r) {
if (r.IsSuccess) {
$("#result").html(JSON.stringify(r.Result));
} else {
alert(r.Result);
}
}
});
});
});
</script>
</head>
<body>
<div>
code:&nbsp;<input id="txtCode" type="text" value="1001" style="width:80px;" />&nbsp;
creatDate:&nbsp;<input id="txtCreatDate" type="text" value="2016-09-05" style="width:80px;" />&nbsp;
roomNumber:&nbsp;<input id="txtRoomNumber" type="text" value="001201" style="width:80px;" /><br />
</div>
<div>
<a id="a1" href="javascript:void(0)">1.获取RCU状态</a><br /><br />
<a id="a6" href="javascript:void(0)">2.获取服务列表</a><br />
回路地址:&nbsp;<input id="txtModalAddress2" type="text" value="004000002" style="width:80px;" />&nbsp;
开关(1开2关):&nbsp;<input id="txtStatus2" type="text" value="1" style="width:80px;" /><br />
<a id="a9" href="javascript:void(0)">3.设置服务</a><br /><br />
<a id="a2" href="javascript:void(0)">4.获取灯光列表</a><br />
回路地址:&nbsp;<input id="txtModalAddress" type="text" value="001000002" style="width:80px;" />&nbsp;
开关(1开2关):&nbsp;<input id="txtStatus" type="text" value="1" style="width:80px;" />&nbsp;
亮度(0~100):&nbsp;<input id="txtBrightness" type="text" value="100" style="width:80px;" /><br />
<a id="a3" href="javascript:void(0)">5.设置灯光</a><br /><br />
<a id="a7" href="javascript:void(0)">6.获取场景列表</a><br />
场景ID:&nbsp;<input id="txtSceneID" type="text" value="1" style="width:80px;" /><br />
<a id="a8" href="javascript:void(0)">7.设置场景</a><br /><br />
<a id="a4" href="javascript:void(0)">8.获取空调列表</a><br />
回路地址:&nbsp;<input id="txtModalAddress1" type="text" value="007001000" style="width:80px;" />&nbsp;
开关(1开2关):&nbsp;<input id="txtOnOff" type="text" value="1" style="width:30px;" />&nbsp;
温度(16~32):&nbsp;<input id="txtTemperature" type="text" value="26" style="width:30px;" />&nbsp;
风速(1低速2中速3高速):&nbsp;<input id="txtFanSpeed" type="text" value="1" style="width:30px;" /><br />
模式(1制冷2制热3送风):&nbsp;<input id="txtMode" type="text" value="1" style="width:30px;" />&nbsp;
阀门(1开2关):&nbsp;<input id="txtValve" type="text" value="2" style="width:30px;" /><br />
<a id="a5" href="javascript:void(0)">9.设置空调</a><br /><br />
<a id="a10" href="javascript:void(0)">10.获取酒店信息</a><br /><br />
<a id="a11" href="javascript:void(0)">11.获取房型及其回路列表</a><br /><br />
手机号:&nbsp;<input id="txtPhone" type="text" value="" style="width:80px;" /><br />
<a id="a12" href="javascript:void(0)">12.获取酒店信息(微信使用)</a><br /><br />
<a id="a13" href="javascript:void(0)">13.获取操作日志</a><br />
</div>
<div id="result"></div>
</body>
</html>

View File

@@ -0,0 +1,46 @@
<%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage<dynamic>" %>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width,user-scalable=no,initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0" />
<title>BLW TEST</title>
<style type="text/css">
body
{
font-size: 10pt;
}
</style>
<script type="text/javascript" src="/Scripts/jquery.min.js"></script>
<script type="text/javascript">
$(function () {
$('#a1').click(function () {
$.ajax({
url: '/api/TestUrl/',
type: 'POST',
dataType: 'JSON',
data: { url: 'https://lflt-vkk.site/kj/3/2024.html' },
error: function (XMLHttpRequest, textStatus, errorThrown) {
alert('访问失败。');
},
success: function (r) {
if (r.IsSuccess) {
$("#result").html(JSON.stringify(r.Data));
} else {
alert(r.Data);
}
}
});
});
});
</script>
</head>
<body>
<div>
<a id="a1" href="javascript:void(0)">获取数据</a><br />
<br />
</div>
<div id="result"></div>
</body>
</html>

View File

@@ -0,0 +1,16 @@
<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<dynamic>" %>
<link type="text/css" rel="stylesheet" href="/Styles/app/About.css" />
<div style="width: 100%; height: 100%; padding-top: 24%; width: 100%;">
<%--<dl class="About-dl">
<dd class="About-dd">
<span class="About-strong" style="font-size: 26px;">
<%: Html.AppLanguage("HotelRoomsIntelligentControlSystem", (Request.Cookies["isCN"].Value == "zh-cn"))%>
<%: ViewData["Version"]%><%: Html.AppLanguage("Version", (Request.Cookies["isCN"].Value == "zh-cn"))%>
</span>
</dd>
<dd class="About-dd">
<span class="About-strong">
<%: Html.AppLanguage("SimonElectric", (Request.Cookies["isCN"].Value == "zh-cn"))%></span>
</dd>
</dl>--%>
</div>

View File

@@ -0,0 +1,184 @@
<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<dynamic>" %>
<link type="text/css" rel="stylesheet" href="/Styles/app/air.css" />
<script type="text/javascript" src="/Scripts/jquery.min.js"></script>
<script type="text/javascript" src="/Scripts/avalon.mobile.min.js"></script>
<%@ Import Namespace="WebSite.Controllers" %>
<script type="text/javascript">
function setAirCondition(HostId, AirId, Type, Status, callback) {
showLoading();
$.ajax({
url: RoomConfig.AirConditionControlUrl,
type: 'POST',
async: false,
dataType: 'JSON',
data: {
roomNumber: RoomConfig.RoomNumber,
hostId: HostId,
airId: AirId,
property: Type,
status: Status
},
success: callback
});
}
var vm = avalon.define({
$id: 'air-panel',
air: [],
hostId: '',
airId: '',
currentIndex: -1,
Running: false, /*空调运行状态0/停止1/运行*/
SettingTemp: 0, /*设定温度*/
Speed: 0, /*风速0/停止, 1/低速, 2/中速, 3/高速, 4/自动*/
HightTemp: 35, /*最高温度*/
LowerTemp: 16, /*最低温度*/
Mode: 5, /*模式: 1/制冷模式2/制热模式4/送风模式8/除湿模式*/
hostAir: null,
airClick: function (index) {
if (vm.currentIndex == index) {
return;
}
vm.airId = vm.air[index].RoomTypeAirID;
vm.hostId = vm.air[index].HostID;
vm.currentIndex = index;
LoadAirControl(vm.hostId, vm.airId, function (r) {
if (r != null) {
vm.Running = r.Running;
vm.SettingTemp = r.SettingTemp;
vm.Speed = r.Speed;
vm.HightTemp = r.HightTemp;
vm.LowerTemp = r.LowerTemp;
vm.Mode = r.Mode;
}
});
}, settingAirClick: function (type, val) {
if (vm.currentIndex == -1) {
return;
}
var status = 0;
if (type == 'OnOff') {
vm.Running = !vm.Running;
status = vm.Running ? 1 : 0;
} else if (type == 'SettingTemp') {
if (val == '+') {
if (vm.HightTemp >= vm.SettingTemp) {
vm.SettingTemp = vm.SettingTemp + 1;
} else {
return;
}
} else if (val == '-') {
if (vm.LowerTemp <= vm.SettingTemp) {
vm.SettingTemp = vm.SettingTemp - 1;
} else {
return;
}
}
status = vm.SettingTemp;
} else if (type == 'Mode') {
vm.Mode = val;
status = vm.Mode;
} else if (type == 'Speed') {
vm.Speed = val;
status = vm.Speed;
}
setAirCondition(vm.hostId, vm.airId, type, status, function (r) {
if (!r.IsSuccess) {
showTip(r.Message);
}
hideLoading();
});
}
});
function LoadAirControl(hostID, roomTypeAirID, callback) {
showLoading();
$.ajax({
url: '/App/LoadAirSetting/',
data: { hostId: hostID, airId: roomTypeAirID },
type: "POST",
dataType: "JSON",
success: callback
});
}
$(function () {
showLoading();
$.ajax({
url: "/App/LoadAirCondition/",
data: { roomNumber: RoomConfig.RoomNumber },
type: "POST",
dataType: "JSON",
success: function (r) {
vm.air = r;
if (vm.air.length > 0) {
vm.airId = vm.air[0].RoomTypeAirID;
vm.hostId = vm.air[0].HostID;
vm.currentIndex = 0;
LoadAirControl(vm.hostId, vm.airId, function (r) {
if (r != null) {
vm.Running = r.Running;
vm.SettingTemp = r.SettingTemp;
vm.Speed = r.Speed;
vm.HightTemp = r.HightTemp;
vm.LowerTemp = r.LowerTemp;
vm.Mode = r.Mode;
}
hideLoading();
});
}
hideLoading();
}
});
});
</script>
<div class="air-panel" ms-controller="air-panel">
<div>
<ul class="air-list-panel clearfix">
<li ms-repeat="air"><a href="javascript:void(0)" class="air-btn air-btn-air" ms-class="{{$index == currentIndex? 'selected':''}}"
ms-click='airClick($index)'>{{el.Name}}</a></li>
</ul>
</div>
<div class="temp-panel">
<div class="top clearfix">
<a href="javascript:void(0)" class="air-btn air-btn-power " ms-class="{{Running ? 'selected':''}}"
ms-click="settingAirClick('OnOff','')"><span class="air-btn-icon air-btn-icon-power">
</span></a>
</div>
<a href="javascript:void(0)" class="air-btn air-btn-temp-down" ms-click="settingAirClick('SettingTemp','-')">
&lt;</a>
<div class="air-temp">
<div style="position: absolute;right: 42%;"><em>℃</em> </div>
<span><i>SET</i> <strong>{{SettingTemp}}</strong></span>
</div>
<a href="javascript:void(0)" class="air-btn air-btn-temp-up" ms-click="settingAirClick('SettingTemp','+')">
&gt;</a>
<div class="air-mode-panel">
<a href="javascript:void(0)" class="air-btn air-btn-mode-cold" ms-class="{{Mode == 1 ? 'selected':''}}"
ms-click="settingAirClick('Mode','1')"><span class="air-btn-icon air-btn-icon-mode-cold">
</span></a><a href="javascript:void(0)" class="air-btn air-btn-mode-hot" ms-class="{{Mode == 2 ? 'selected':''}}"
ms-click="settingAirClick('Mode','2')"><span class="air-btn-icon air-btn-icon-mode-hot">
</span></a>
</div>
</div>
<div class="air-divbtn clearfix">
<a href="javascript:void(0)" ms-class="{{Speed == 4 ? 'air-auto-open':'air-auto-close'}}">
<span ms-click="settingAirClick('Speed','4')" style=" position: relative;">
<i style="position: absolute;bottom: 0;font-style: normal;">AUTO</i>
</span> </a>
<a href="javascript:void(0)">
<span ms-class="{{Speed == 1 ? 'air-low-open':'air-low-close'}}" ms-click="settingAirClick('Speed','1')">
</span></a>
<a href="javascript:void(0)"><span ms-class="{{Speed == 2 ? 'air-middle-open':'air-middle-close'}}"
ms-click="settingAirClick('Speed','2')"></span></a><a href="javascript:void(0)"><span
ms-class="{{Speed == 3 ? 'air-high-open':'air-high-close'}}" ms-click="settingAirClick('Speed','3')">
</span></a>
</div>
</div>

View File

@@ -0,0 +1,102 @@
<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<dynamic>" %>
<link type="text/css" rel="stylesheet" href="/Styles/app/control.css" />
<script type="text/javascript" src="/Scripts/jquery.min.js"></script>
<script type="text/javascript" src="/Scripts/avalon.mobile.min.js"></script>
<script type="text/javascript">
var vm = avalon.define({
$id: 'curtain',
curtainMsg: [],
gauzeMsg: [],
groupAddress: '',
Status: '',
curtainClick: function (curtainModal, curtain) {
if (curtainModal.Status != 0) {
curtain.CurtainOpen.Status = 0;
curtain.CurtainClose.Status = 0;
} else {
curtain.CurtainOpen.Status = 0;
curtain.CurtainClose.Status = 0;
curtainModal.Status = 1;
}
setCurtain(curtain.CurtainOpen.Address, 0);
setCurtain(curtain.CurtainClose.Address, 0);
setCurtain(curtainModal.Address, curtainModal.Status);
}
});
function setCurtain(groupAddress, status, callback) {
$.ajax({
url: '/App/CurtainControl/',
type: 'POST',
async: false,
dataType: 'JSON',
data: {
roomNumber: RoomConfig.RoomNumber,
GroupAddress: groupAddress,
Status: status
},
success: callback || function (r) {
hideLoading();
}
});
}
$(function () {
showLoading();
$.ajax({
url: "/App/LoadCurtain/",
data: { roomNumber: RoomConfig.RoomNumber, deviceType: 'Curtain' },
type: "POST",
dataType: "JSON",
success: function (r) {
hideLoading();
if (r.IsSuccess) {
vm.curtainMsg = r.Data;
} else {
showTip(r.Message);
}
}
});
$.ajax({
url: "/App/LoadCurtain/",
data: { roomNumber: RoomConfig.RoomNumber, deviceType: 'Gauze' },
type: "POST",
dataType: "JSON",
success: function (r) {
if (r.IsSuccess) {
vm.gauzeMsg = r.Data;
} else {
showTip(r.Message);
}
}
});
});
</script>
<div id="cmain" ms-controller="curtain">
<dl id="curtain" class="curtain cmain-list clearfix">
<dd ms-repeat="curtainMsg">
<a href="javascript:void(0)" class="btn-curtain-open" ms-class="active:(el.CurtainOpen.Status!=0)"
ms-click='curtainClick(el.CurtainOpen,el)'>
<label class="curtain-span">
{{el.CurtainOpen.Name}}</label></a><a href="javascript:void(0)" class="btn-curtain-close"
ms-class="active:(el.CurtainClose.Status!=0)" ms-click='curtainClick(el.CurtainClose,el)'><label
class="curtain-span">
{{el.CurtainClose.Name}}</label>
</a>
</dd>
</dl>
<dl id="Gauze" class="curtain cmain-list clearfix">
<dd ms-repeat="gauzeMsg">
<a href="javascript:void(0)" class="btn-windowScreening-open" ms-class="active:(el.CurtainOpen.Status!=0)"
ms-click='curtainClick(el.CurtainOpen,el)'>
<label class="curtain-span">
{{el.CurtainOpen.Name}}</label></a> <a href="javascript:void(0)" class="btn-windowScreening-close"
ms-class="active:(el.CurtainClose.Status!=0)" ms-click='curtainClick(el.CurtainClose,el)'>
<label class="curtain-span">
{{el.CurtainClose.Name}}</label></a>
</dd>
</dl>
</div>

View File

@@ -0,0 +1,21 @@
<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<dynamic>" %>
<div id="logo">
</div>
<div class="info">
<div id="room-number"> <%: ViewData["RoomNumber"] %></div>
<hr />
<div id="datetime">
<div id="txtTime" class="time">
</div>
<div class="date">
<i><%: ViewData["Date"]%></i>
<em><%: ViewData["Week"]%></em>
</div>
</div>
<hr />
<div id="temp">
<i>&nbsp;</i>
<em>℃</em>
<strong><%: ViewData["Temp"]%></strong>
</div>
</div>

View File

@@ -0,0 +1,15 @@
<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<dynamic>" %>
<link type="text/css" rel="stylesheet" href="/Styles/app/hotel.css" />
<div style=" width: 100%;height: 100%;padding-top: 10%; /* width: 90%; */overflow: auto;overflow-y: auto;">
<dl class="hotel-dl">
<dt class="hotel-dt"><strong class="hotel-strong" style="margin-left: 15px;">
<%: ViewData["HoteName"] %></strong></dt>
<dd class="hotel-dt">
<hr />
</dd>
<dd class="hotel-dd">
<%-- <textarea name="textarea" class="hotel-strong" disabled="disabled"><%: ViewData["Introduction"]%></textarea>--%>
<%-- <span class="hotel-strong">--%><%: ViewData["Introduction"]%><%--</span>--%>
</dd>
</dl>
</div>

View File

@@ -0,0 +1,197 @@
<%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage<dynamic>" %>
<%@ Import Namespace="Domain" %>
<%
List<AppMenu> AppMenus = ViewData["AppMenuControl"] as List<AppMenu>;
%>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0" />
<title>App</title>
<style type="text/css">
html, body
{
width: 100%;
height: 100%;
margin: 0;
padding: 0;
}
.align-center
{
position: fixed;
width: 100%;
height: 100%;
}
</style>
<link type="text/css" rel="stylesheet" href="/Styles/app/common.css" />
<link type="text/css" rel="stylesheet" href="/Styles/app/header.css" />
<script type="text/javascript" src="/Scripts/jquery.min.js"></script>
<script type="text/javascript" src="/Scripts/app/common.js"></script>
<script type="text/javascript">
var isCloseLoading = 0;
var RoomConfig = {
RoomNumber: '<%: ViewData["RoomNumber"] %>',
ServiceControlUrl: '/App/ServiceControl/?RoomNumber=<%: ViewData["RoomNumber"] %>',
LightControlUrl: '/App/LightControl/?RoomNumber=<%: ViewData["RoomNumber"] %>',
AirConditionControlUrl: '/App/AirConditionControl/?RoomNumber=<%: ViewData["RoomNumber"] %>',
CurtainControlUrl: '/App/CurtainControl/?RoomNumber=<%: ViewData["RoomNumber"] %>',
SceneUrl: '/App/Scene/?RoomNumber=<%: ViewData["RoomNumber"] %>',
TelevisionUrl: '/App/Television/?RoomNumber=<%: ViewData["RoomNumber"] %>',
HotelUrl: '/App/HotelIntroduction/',
AboutUrl: '/App/About/'
};
function sendServiceStatus(groupAddress, status) {
$.ajax({
url: RoomConfig.ServiceControlUrl,
data: { GroupAddress: groupAddress, Status: status },
type: "POST",
dataType: "JSON",
success: function (r) {
if (!r.IsSuccess) {
showMsg("", "操作失败," + r.Message);
}
//hideLoading();
isCloseLoading = 1;
},
error: function () {
hideLoading();
}
});
}
function ServiceSetClick(code, status) {
showLoading();
isCloseLoading = 0;
//$("#" + code).attr("class", code + " " + (status ? "" : "active"));
sendServiceStatus(code, (status ? '0' : "1"));
}
function timeRefreshService() {
$.ajax({
url: "/App/LoadAlarm/",
data: { roomNumber: RoomConfig.RoomNumber },
type: "POST",
dataType: "JSON",
success: function (r) {
$('#services').html("");
var strHtml = "";
for (var i = 0; i < r.length; i++) {
var active = (r[i].Status ? "active" : "");
strHtml += "<li><a id='" + r[i].Code + "' onclick=ServiceSetClick('" + r[i].Code + "'," + r[i].Status + ") ";
strHtml += "class='" + r[i].Code + " " + active + "' href='javascript:void(0);'></a><span>" + r[i].Name + "</span></li>";
}
$('#services').html(strHtml);
strHtml = null;
if (isCloseLoading) { hideLoading(); }
setTimeout('timeRefreshService()', 1000);
},
error: function () {
setTimeout('timeRefreshService()', 1000);
}
});
}
function showLoading() {
$('#loading').show();
}
function hideLoading() {
$('#loading').hide();
}
function showMsg(title, content) {
$('#msg')
.find(".dialog-content-title").html(title || "").end()
.find(".dialog-content-text").html(content || "").end()
.fadeIn("fast");
setTimeout(function () { hideMsg(); }, 3000);
}
function hideMsg() {
$("#msg").fadeOut("fast");
}
function go(obj, roomNumber) {
$("#content").html("").load(obj + "?RoomNumber=" + roomNumber);
}
$(function () {
$("#nav-menu li").click(function () {
$("#nav-menu li").removeClass("active");
$(this).addClass("active");
});
$("#content").load(RoomConfig.HotelUrl);
timeRefreshService();
});
</script>
</head>
<body onload="startTime()">
<section id="main">
<header><% Html.RenderPartial("Header"); %></header>
<nav id="nav">
<ul id="nav-menu">
<% foreach (var item in AppMenus) { %>
<li>
<a href="javascript:void(0)" onclick='go("<%=item.Url %>","<%: ViewData["RoomNumber"] %>")'>
<i style='background: url(../../<%=item.Icon %>) no-repeat center center;'></i>
<% if (Request.Cookies["isCN"].Value == "zh-cn") { %>
<em class="text"> <%=item.Name %></em>
<% } else { %>
<em class="text"> <%=item.EnglishName %></em>
<% } %>
</a>
</li>
<% } %>
</ul>
</nav>
<section id="content" class="content"></section>
<footer>
<div>
<a id="CN" href="javascript:void(0)" onclick="switchLanuage('cn')">
<% if (Request.Cookies["isCN"].Value == "zh-cn") { %>
<span class="CLanguageActive">中文</span>
<% } else { %>
<span class="CLanguage">中文</span>
<%} %>
</a>
<a id="EN" href="javascript:void(0)" onclick="switchLanuage('en')">
<% if (Request.Cookies["isCN"].Value == "zh-cn") { %>
<span class="ELanguage">English</span>
<% } else { %>
<span class="ELanguageActive">English</span>
<% } %>
</a>
</div>
<ul id="services" class="clearfix">
<%--<li ms-repeat="Alarm">
<a id='{{el.Code}}' ms-click="ServiceSetClick($index)" ms-class='{{el.Code}} {{el.Status ? "active" : ""}}' href="javascript:void(0)"></a>
<span>{{el.Name}}</span>
</li>--%>
</ul>
</footer>
<div id="loading" class="loading" style="display:none;">
<div class="mask"></div>
<div class="content"></div>
</div>
<%--<div id="tip" class="tip">
<div class="mask"></div>
<span class="content">aaaaaa</span>
</div>--%>
<div id="msg" class="dialog" style="display:none;">
<div class="dialog-inner">
<a href="javascript:void(0)" class="dialog-close" onclick="$('#msg').fadeOut('fast');">×</a>
<div class="dialog-content">
<h1 class="dialog-content-title"></h1>
<p class="dialog-content-text"></p>
</div>
</div>
</div>
</section>
</body>
</html>

View File

@@ -0,0 +1,165 @@
<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<dynamic>" %>
<%@ Import Namespace="WebSite.Controllers" %>
<%
List<Light> lightList = ViewData["LightList"] as List<Light>;
List<Light> LightDimmerList = ViewData["LightDimmerList"] as List<Light>;
%>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width,user-scalable=no,initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0" />
<meta http-equiv="cache-control" content="max-age=0" />
<meta http-equiv="cache-control" content="no-cache" />
<meta http-equiv="expires" content="0" />
<meta http-equiv="expires" content="Tue, 01 Jan 1980 1:00:00 GMT" />
<meta http-equiv="pragma" content="no-cache" />
<link type="text/css" rel="stylesheet" href="/Styles/app/control.css" />
<script type="text/javascript" src="/Scripts/jquery.min.js"></script>
<script type="text/javascript" src="/Scripts/avalon.mobile.min.js"></script>
<script type="text/javascript">
function setBrightness(groupAddress, status, callback) {
showLoading();
$.ajax({
url: RoomConfig.LightControlUrl,
type: 'POST',
async: false,
dataType: 'JSON',
data: { GroupAddress: groupAddress, Status: status },
success: callback || function (r) {
hideLoading();
}
});
}
var vm = avalon.define({
$id: 'Dimmer',
setStatus: '0',
status: 0,
groupAddress: '',
lightDimmer: [],
currentIndex: 0,
BrightnessClick: function (index) {
vm.currentIndex = index;
vm.setStatus = vm.lightDimmer[index].Status + '%';
vm.status = vm.lightDimmer[index].Status;
vm.groupAddress = vm.lightDimmer[index].GroupAddress;
$("#trackBar").val(vm.status);
var status = $(this).hasClass("active") ? 1 : 0;
$("#divYS dd a").removeClass("active");
if (status == 0) {
$("#divYS dt").removeClass("no-active");
$(this).toggleClass("active");
//var groupAddress = $(this).attr("group-address");
} else {
$("#divYS dt").toggleClass("no-active");
}
},
LightDimmerClick: function (val) {
if (val == 'minus') {
if (vm.status == 0) {
return;
}
if ((vm.status - 1) < 0) {
return;
}
vm.status = parseInt(vm.status) - 1;
} else if (val == 'add') {
if (vm.status == 100) {
return;
}
if ((vm.status + 1) > 100) {
return;
}
vm.status = parseInt(vm.status) + 1;
}
$("#trackBar").val(vm.status);
vm.setStatus = vm.status + '%';
vm.lightDimmer[vm.currentIndex].Status = vm.status;
setBrightness(vm.groupAddress, vm.status, function (r) {
hideLoading();
if (!r.IsSuccess) {
showTip(r.Message);
}
});
}
});
trackBar.addEventListener("change", function () {
vm.status = this.value;
vm.setStatus = vm.status + '%';
vm.lightDimmer[vm.currentIndex].Status = vm.status;
setBrightness(vm.groupAddress, vm.status, function (r) {
hideLoading();
if (!r.IsSuccess) {
showTip(r.Message);
}
});
});
function setLightStatus(groupAddress, status) {
showLoading();
$.ajax({
url: RoomConfig.LightControlUrl,
data: { GroupAddress: groupAddress, Status: status },
type: "POST",
dataType: "JSON",
success: function (r) {
hideLoading();
if (!r.IsSuccess) {
showTip(r.Message);
}
}
});
}
$(function () {
$("#divWS dd a").click(function () {
$(this).toggleClass("active");
var groupAddress = $(this).attr("group-address");
var status = $(this).hasClass("active") ? 1 : 0;
setLightStatus(groupAddress, status);
});
showLoading();
$.ajax({
url: "/App/LoadLightDimmer/",
data: { roomNumber: RoomConfig.RoomNumber },
type: "POST",
dataType: "JSON",
success: function (r) {
vm.lightDimmer = r;
hideLoading();
}
});
});
</script>
<div id="cmain">
<dl id="divWS" class="cmain-list light-list clearfix">
<% foreach (var item in lightList)
{ %>
<dd>
<a href="javascript:void(0)" group-address='<%=item.ModalAddress %>' class='light-deng <%=item.Status != 0 ? "active":"" %>'>
</a> <span class="light-deng-ptspan">
<%=item.Name %></span></dd>
<% } %>
</dl>
<dl id="divYS" class="cmain-list light-list clearfix" ms-controller="Dimmer">
<div class="fd">
<dt class="light-tiaoguan-bj no-active">
<div>
<a class="tiaoguang-minus" href="javascript:void(0)" ms-click="LightDimmerClick('minus')"><span>-</span></a>
<div class="Bar">
<input type="range" id="trackBar" min="0" max="100" step="1" />
<span>{{ setStatus }} </span>
</div>
<a class="tiaoguang-add" href="javascript:void(0)" ms-click="LightDimmerClick('add')"><span>+</span></a>
</div>
</dt>
</div>
<dd ms-repeat="lightDimmer">
<a href="javascript:void(0)" ms-click='BrightnessClick($index)' class='light-tiaoguang'>
<span class="light-deng-count">{{el.Status}}</span></a> <span class="light-deng-span">{{el.Name}}</span></dd>
</dl>
</div>

View File

@@ -0,0 +1,56 @@
<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<dynamic>" %>
<%@ Import Namespace="Domain" %>
<%
List<RoomTypeScene> AppScenes = ViewData["AppSceneControl"] as List<RoomTypeScene>;
%>
<link type="text/css" rel="stylesheet" href="/Styles/app/control.css" />
<script type="text/javascript">
function setScene(scene) {
showLoading();
$.ajax({
url: RoomConfig.SceneUrl,
data: { SceneID: scene },
type: "POST",
dataType: "JSON",
success: function (r) {
hideLoading();
if (!r.IsSuccess) {
showTip(r.Message);
}
}
});
}
$(function () {
$("#sence dd a").click(function () {
$("#sence dd").removeClass("active");
$(this).parent().addClass("active");
$("#sence dt").html($(this).attr("title") + "模式已开启");
setScene($(this).attr("scene"));
});
})
</script>
<div id="cmain">
<dl id="sence" class="cmain-list clearfix">
<% foreach (var item in AppScenes)
{
%>
<dd>
<a href="javascript:void(0)" style='background-image: url(../../<%= item.Icon %>);background-size: 100% 100%;'
scene='<%=item.ID %>'>
<% if (Request.Cookies["isCN"].Value.ToString() == "zh-cn")
{ %>
<span>
<%=item.Name %> </span>
<% }
else
{ %>
<span>
<%=item.EnglishName %></span>
<% } %>
</a>
</dd>
<% } %>
</dl>
</div>

View File

@@ -0,0 +1,9 @@
<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<dynamic>" %>
<link type="text/css" rel="stylesheet" href="/Styles/app/control.css" />
<script type="text/javascript">
</script>
<div id="cmain">
系统设置
</div>

View File

@@ -0,0 +1,64 @@
<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<dynamic>" %>
<%@ Import Namespace="Domain" %>
<link type="text/css" rel="stylesheet" href="/Styles/app/tv.css" />
<script type="text/javascript">
$(function () {
$('#tv-panel a').click(function () {
$.ajax({
url: '/App/Television',
type: 'POST',
dataType: 'JSON',
data: {
RoomNumber: RoomConfig.RoomNumber,
TvModalId: $('#hfTvModalId').val(),
Key: $(this).attr('key')
},
success: function (r) {
if (!r.IsSuccess) {
showTip(r.Message);
}
}
});
});
$('#menu li a').click(function () {
$(this).parents('ul').find('.selected').removeClass('selected');
$(this).addClass('selected');
});
});
</script>
<div id="tv-panel">
<div class="top clearfix">
<a href="javascript:void(0)" class="tv-key tv-key-power" key='<%: TvKey.Power.ToString() %>'></a>
<a href="javascript:void(0)" class="tv-key tv-key-mute" key='<%: TvKey.Mute.ToString() %>'></a>
</div>
<div class="middle clearfix">
<div class="tv-key-channel-panel">
<a href="javascript:void(0)" class="tv-key tv-key-channel-inc" key='<%: TvKey.ChannelInc.ToString() %>'>+</a>
CH
<a href="javascript:void(0)" class="tv-key tv-key-channel-dec" key='<%: TvKey.ChannelDec.ToString() %>'>-</a>
</div>
<div class="tv-key-dir-panel">
<a href="javascript:void(0)" class="tv-key tv-key-dir-left" key='<%: TvKey.Left.ToString() %>'></a>
<a href="javascript:void(0)" class="tv-key tv-key-dir-up" key='<%: TvKey.Up.ToString() %>'></a>
<a href="javascript:void(0)" class="tv-key tv-key-dir-ok" key='<%: TvKey.Ok.ToString() %>'>OK</a>
<a href="javascript:void(0)" class="tv-key tv-key-dir-right" key='<%: TvKey.Right.ToString() %>'></a>
<a href="javascript:void(0)" class="tv-key tv-key-dir-bottom" key='<%: TvKey.Down.ToString() %>'></a>
</div>
<div class="tv-key-voice-panel">
<a href="javascript:void(0)" class="tv-key tv-key-voice-inc" key='<%: TvKey.VoiceInc.ToString() %>'>+</a>
VOL
<a href="javascript:void(0)" class="tv-key tv-key-voice-dec" key='<%: TvKey.VoiceDec.ToString() %>'>-</a>
</div>
</div>
<ul class="bottom clearfix">
<li><a href="javascript:void(0)" class="tv-key tv-key-home" key='<%: TvKey.Home.ToString() %>'></a></li>
<li><a href="javascript:void(0)" class="tv-key tv-key-menu" key='<%: TvKey.Menu.ToString() %>'></a></li>
<li><a href="javascript:void(0)" class="tv-key tv-key-source" key='<%: TvKey.Source.ToString() %>'></a></li>
<li><a href="javascript:void(0)" class="tv-key tv-key-replay" key='<%: TvKey.Replay.ToString() %>'></a></li>
</ul>
</div>

View File

@@ -0,0 +1,75 @@
<%@ 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">
<div class="easyui-layout" data-options="fit:true">
<div data-options="region:'north',border:false" style="overflow: hidden; height: 30px;">
<div class="toolbar" style="position: relative;">
<span style="padding-left: 5px;">
<a href="javascript:void(0)" class="toolbar-button tb-icon-search" onclick="query()">
查询</a> </span><span style="position: absolute; right: 10px;">
</span>
</div>
</div>
<div data-options="region:'center',border:false">
<table id="dg" class="easyui-datagrid" style="width: 100%; height: auto;" data-options="
toolbar: '#tb',
border: false,
singleSelect: false,
pagination: true,
pageSize: 50,
rownumbers: true,
striped: true,
sortName: 'CreatedDate',
sortOrder: 'desc',
fit: true,
fitColumns: true,
idField: 'ID',
nowrap:true,
frozenColumns: [[
{ field: 'ID', checkbox: true }
]],
method: 'post'
">
<thead>
<tr>
<th data-options="field:'Name',sortable:true">
姓名
</th>
<th data-options="field:'CompanyName',sortable:true">
公司名
</th>
<th data-options="field:'PhoneNumber',sortable:true">
手机号
</th>
<th data-options="field:'ValidateCode',sortable:true">
验证码
</th>
<th data-options="field:'CreatedDate',sortable:true,formatter:$.tools.formatDateTime">
创建日期
</th>
</tr>
</thead>
</table>
</div>
</div>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ScriptContent" runat="server">
<style type="text/css">
.toolbar label
{
font-size: 12px;
}
</style>
<script type="text/javascript">
function query() {
var params = {};
$('#dg').datagrid({ url: '/Cache/LoadAllByPage/', queryParams: params });
}
$(function () {
});
</script>
</asp:Content>

View File

@@ -0,0 +1,93 @@
<%@ 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("EnergyStatistics")%>
</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">
<div class="toolbar" style="height: 65px;">
<div>
<label for="cbxRoomNumber"><%: Html.Language("RoomNumber")%></label>
<select id="cbxRoomNumber" class="easyui-combogrid" style="width:100px;"
data-options="
panelWidth: 100,
multiple: true,
idField: 'Value',
valueField: 'Value',
textField: 'Name',
editable: false,
url: '/CoulometricStatistics/LoadRoomNumbers/',
columns:[[
{ field: 'ck',checkbox: true },
{ field: 'Value', title: '<%: Html.Language("RoomNumber")%>' }
]],
onHidePanel: cbxRoomNumberOnHidePanel
">
</select>
<label><%: Html.Language("DateUnit")%></label>
<select id="cbxDateTimeUnit" class="easyui-combobox" style="width:60px;"
data-options="
panelHeight: 'auto',
editable: false
">
<option value='<%: (int)Domain.DateTimeUnit.Month %>'><%: Html.Language(Domain.DateTimeUnit.Month.ToString())%></option>
<option value='<%: (int)Domain.DateTimeUnit.Day %>' selected="selected"><%: Html.Language(Domain.DateTimeUnit.Day.ToString())%></option>
</select>
<label><%: Html.Language("StartDate")%></label>
<input id="txtStartDate" type="text" class="easyui-datebox" style="width:100px;" />
<label><%: Html.Language("Deadline")%></label>
<input id="txtEndDate" type="text" class="easyui-datebox" style="width:100px;" />
<a id="query" href="javascript:void(0)" class="toolbar-button tb-icon-search"><%: Html.Language("Query")%></a>
</div>
<div>
<label><%: Html.Language("LoopType")%></label>
<select id="cbxDeviceType" class="easyui-combobox" style="width:80px;" data-options="
panelWidth: 100,
panelHeight: 'auto',
valueField: 'Value',
textField: 'Name',
editable: false,
url: '/RoomType/LoadDeviceTypes/',
onSelect: cbxDeviceTypeOnSelect
">
</select>
<label><%: Html.Language("Circuit")%></label>
<select id="cbdRoomTypeModals" class="easyui-combogrid" style="width:100px;"
data-options="
panelWidth: 270,
multiple: true,
idField: 'Outlet',
textField: 'Outlet',
editable: false,
fitColumns: true,
columns: [[
{ field: 'ck',checkbox: true },
{ field: 'RoomType', title: '<%: Html.Language("RoomType")%>' },
{ field: 'ModalAddress', title: '<%: Html.Language("ReturnAddress")%>' },
{ field: 'Outlet', title: '<%: Html.Language("DeliveryOutlet")%>' },
{ field: 'Name', title: '<%: Html.Language("LoopName")%>' }
]]
">
</select>
</div>
</div>
</div>
<div data-options="region:'center',border:false" style="position:relative">
<div id="chart" style="width:100%;"></div>
</div>
</div>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ScriptContent" runat="server">
<script type="text/javascript" src="/Scripts/libs/echarts/echarts.js"></script>
<script type="text/javascript" src="/Scripts/libs/esl/esl.js"></script>
<script type="text/javascript" src="/Scripts/coulometric-statistics-index.js"></script>
<!--[if lt IE 9]>
<script src="/Scripts/libs/html5shiv.min.js"></script>
<script src="/Scripts/libs/respond.min.js"></script>
<![endif]-->
</asp:Content>

View File

@@ -0,0 +1,289 @@
<%@ 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("FailureRegistration")%>
</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="overflow: hidden; height: 30px;">
<div class="toolbar">
<a href="javascript:void(0)" class="toolbar-button tb-icon-refresh" onclick="$('#dg').datagrid('load',{});">
<%: Html.Language("Refresh")%></a> <a href="javascript:void(0)" class="toolbar-button tb-icon-register"
onclick="add()">
<%: Html.Language("New")%></a> <a href="javascript:void(0)" class="toolbar-button tb-icon-edit"
onclick="edit()">
<%: Html.Language("Edit")%></a> <a href="javascript:void(0)" class="toolbar-button tb-icon-cancel"
onclick="cancel()">
<%: Html.Language("Logout")%></a> <a href="javascript:void(0)" class="toolbar-button tb-icon-remove"
onclick="del()">
<%: Html.Language("Delete")%></a>
</div>
</div>
<div data-options="region:'center',border:false">
<table id="dg" class="easyui-datagrid" style="width: 100%; height: auto;" data-options="
border: false,
pagination: true,
pageSize: 20,
rownumbers: true,
striped: true,
sortName: 'Number',
sortOrder: 'asc',
fit: true,
fitColumns: true,
idField: 'ID',
frozenColumns: [[ { field: 'ID', checkbox: true } ]],
method: 'post',
url: '/FaultRecords/LoadAllByPage/',
onDblClickRow: function(index, row) { edit(row); }
">
<thead>
<tr>
<th data-options="field:'Status',sortable:true,resizable:false,formatter: function(value){ return value == 0 ? lang.NoMaintenance : lang.HaveMaintenance; }">
<%: Html.Language("MaintenanceState")%>
</th>
<th data-options="field:'IsCancel',sortable:true,resizable:false,formatter: function(value){ return value ? lang.HasBeenCancelled : ''; }">
<%: Html.Language("Logout")%>
</th>
<th data-options="field:'Number',sortable:true,resizable:false">
<%: Html.Language("ID")%>
</th>
<th data-options="field:'RoomNumber',sortable:true,resizable:false">
<%: Html.Language("RoomNumber")%>
</th>
<th data-options="field:'FaultTypeCode',sortable:true,resizable:false">
<%: Html.Language("FaultCode")%>
</th>
<th data-options="field:'FaultType',sortable:true,resizable:false">
<%: Html.Language("FaultName")%>
</th>
<th data-options="field:'FaultTime',sortable:true,resizable:false">
<%: Html.Language("FaultDate")%>
</th>
<th data-options="field:'Description',sortable:true,resizable:false">
<%: Html.Language("Remark")%>
</th>
<th data-options="field:'RepairPerson',sortable:true,resizable:false">
<%: Html.Language("MaintenanceMan")%>
</th>
<th data-options="field:'RepairTime',sortable:true,resizable:false">
<%: Html.Language("MaintenanceTime")%>
</th>
<th data-options="field:'RepairContent',sortable:true,resizable:false">
<%: Html.Language("MaintenanceContent")%>
</th>
<th data-options="field:'CancelPerson',sortable:true,resizable:false">
<%: Html.Language("CancellationPersonnel")%>
</th>
<th data-options="field:'CancelTime',sortable:true,resizable:false">
<%: Html.Language("CancellationTime")%>
</th>
<th data-options="field:'CancelReason',sortable:true,resizable:false">
<%: Html.Language("CancellationReason")%>
</th>
<th data-options="field:'RegisteredPerson',sortable:true,resizable:false">
<%: Html.Language("Registrant")%>
</th>
<th data-options="field:'RegisteredTime',sortable:true,resizable:false,formatter:$.tools.formatDateTime">
<%: Html.Language("FaultBookDate")%>
</th>
</tr>
</thead>
</table>
</div>
</div>
<div id="faultRecordDlg" class="easyui-window" title='<%: Html.Language("FailureRegistration")%>' style="width: 430px;
height: 400px; padding: 5px;" closed="true" modal="true" collapsible="false"
minimizable="false" maximizable="false">
<div class="easyui-layout" fit="true">
<div data-options="region:'center'">
<form id="faultRecordForm" class="easyui-form" method="post" data-options="novalidate:true">
<input name="ID" type="hidden" value="0" />
<table style="margin: 20px auto;" cellpadding="3">
<tr>
<td class="align-right">
<%: Html.Language("ID")%>
</td>
<td>
<input id="txtNumber" name="Number" class="easyui-validatebox textbox text" readonly="readonly"
data-options="required:true,validType:'length[1,20]'" />
</td>
</tr>
<tr>
<td class="align-right">
<%: Html.Language("FaultTime")%>
</td>
<td>
<input id="txtFaultTime" name="FaultTime" class="easyui-datetimebox textbox text"
data-options="required:true,editable:false" />
</td>
</tr>
<tr>
<td class="align-right">
<%: Html.Language("RoomNumber")%>
</td>
<td>
<input id="cbxRoomNumber" name="RoomNumber" class="easyui-combobox textbox text"
data-options="
required:true,
editable:false,
panelHeight: 150,
valueField: 'RoomNumber',
textField: 'RoomNumber',
url:'/Host/LoadDataForRoomNumberCombobox/'" />
</td>
</tr>
<tr>
<td class="align-right">
<%: Html.Language("FaultType")%>
</td>
<td>
<input id="cbxFaultType" name="FaultTypeID" class="easyui-combobox textbox text"
data-options="
required:true,
editable:false,
panelHeight: 'auto',
valueField: 'ID',
textField: 'Code',
formatter: function(row) { return row.Code + ''+ row.Name + ''; },
url:'/FaultType/LoadAllForCombobox/'
" />
</td>
</tr>
<tr>
<td class="align-right">
<%: Html.Language("FaultInstructions")%>
</td>
<td>
<textarea id="txtDescription" name="Description" class="easyui-validatebox textbox text"
data-options="validType:length[0,200]" cols="30" rows="5"></textarea>
</td>
</tr>
</table>
</form>
</div>
<div data-options="region:'south',border:false" style="text-align: right; padding: 5px 0 0;">
<a class="easyui-linkbutton" data-options="iconCls:'icon-save'" href="javascript:void(0)"
onclick="save();">
<%: Html.Language("Save")%></a> <a class="easyui-linkbutton" data-options="iconCls:'icon-cancel'"
href="javascript:void(0)" onclick="$('#faultRecordDlg').window('close');">
<%: Html.Language("Cancel")%></a>
</div>
</div>
</div>
<div id="cancelFaultDlg" class="easyui-window" title='<%: Html.Language("FaultCanceled") %>' style="width: 450px;
height: 270px; padding: 5px;" closed="true" modal="true" collapsible="false"
minimizable="false" maximizable="false">
<div class="easyui-layout" fit="true">
<div data-options="region:'center'">
<form id="cancelFaultForm" class="easyui-form" method="post" data-options="novalidate:true">
<input name="ID" type="hidden" value="0" />
<table style="margin: 20px auto;" cellpadding="3">
<tr>
<td class="align-right">
<%: Html.Language("CancellationTime")%>
</td>
<td>
<input id="txtCancelTime" name="CancelTime" class="easyui-datetimebox textbox text"
data-options="required:true" />
</td>
</tr>
<tr>
<td class="align-right">
<%: Html.Language("CancellationReason")%>
</td>
<td>
<textarea id="txtCancelReason" name="CancelReason" class="easyui-validatebox textbox text"
data-options="validType:length[0,200]" cols="30" rows="5"></textarea>
</td>
</tr>
</table>
</form>
</div>
<div data-options="region:'south',border:false" style="text-align: right; padding: 5px 0 0;">
<a class="easyui-linkbutton" data-options="iconCls:'icon-save'" href="javascript:void(0)"
onclick="cancelFault();">
<%: Html.Language("Save")%></a> <a class="easyui-linkbutton" data-options="iconCls:'icon-cancel'"
href="javascript:void(0)" onclick="$('#cancelFaultDlg').window('close');">
<%: Html.Language("Cancel")%></a>
</div>
</div>
</div>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ScriptContent" runat="server">
<script type="text/javascript">
function add() {
$.tools.post(null, "/FaultRecords/GenerateFaultNumber/", function (r) {
$("#faultRecordForm").form("reset").form("load", { ID: 0, Number: r.Data.Number });
$("#faultRecordDlg").window("open");
}, this, true);
}
function edit(row) {
if (row == null) {
row = $("#dg").datagrid("getSelected");
}
if (row) {
$("#faultRecordForm").form("reset").form("load", row);
$("#faultRecordDlg").window({ title: lang.EditTheNumbersFor + "【" + row.Number + "】" + lang.TheFailureOf }).window("open");
} else {
$.tools.alert(lang.PleaseSelectTheData);
}
}
function cancel() {
var row = $('#dg').datagrid('getSelected');
if (row) {
$("#cancelFaultForm").form("reset").form("load", row);
$("#cancelFaultDlg").window({ title: lang.TCNI+"【" + row.Number + "】" + lang.TheFailureOf }).window("open");
} else {
$.tools.alert(lang.PleaseSelectTheData);
}
}
function del() {
var rows = $('#dg').datagrid('getSelections');
if (!rows || rows.length == 0) {
$.tools.alert(lang.PleaseSelectTheData);
return;
}
var param;
$.each(rows, function (i, n) {
if (i == 0) {
param = "idList=" + n.ID + "&numberList=" + n.Number;
}
else {
param += "&idList=" + n.ID + "&numberList=" + n.Number;
}
});
$.tools.delPost(param, "/FaultRecords/Delete/", function () {
$('#dg').datagrid("clearSelections");
$('#dg').datagrid("reload");
}, this);
}
function save() {
if ($("#faultRecordForm").form("enableValidation").form("validate")) {
var entity = $("#faultRecordForm").serializeJson();
entity.FaultType = { ID: entity.FaultTypeID };
$.tools.post({ jsonData: JSON.stringify(entity) }, "/FaultRecords/Save/", function (r) {
$("#dg").datagrid("reload");
$("#faultRecordDlg").window("close");
});
}
}
function cancelFault() {
if ($("#cancelFaultForm").form("enableValidation").form("validate")) {
var entity = $("#cancelFaultForm").serializeJson();
$.tools.post(entity, "/FaultRecords/Cancel/", function (r) {
$("#dg").datagrid("reload");
$("#cancelFaultDlg").window("close");
});
}
}
</script>
</asp:Content>

View File

@@ -0,0 +1,198 @@
<%@ 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("RepairRecord")%>
</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="overflow: hidden; height: 30px;">
<div class="toolbar">
<a href="javascript:void(0)" class="toolbar-button tb-icon-refresh" onclick="$('#dg').datagrid('load',{});">
<%: Html.Language("Refresh")%></a> <a href="javascript:void(0)" class="toolbar-button tb-icon-register"
onclick="add()">
<%: Html.Language("RepairRecord")%></a>
</div>
</div>
<div data-options="region:'center',border:false">
<table id="dg" class="easyui-datagrid" style="width: 100%; height: auto;" data-options="
border: false,
pagination: true,
pageSize: 20,
rownumbers: true,
striped: true,
sortName: 'Number',
sortOrder: 'asc',
fit: true,
fitColumns: true,
idField: 'ID',
frozenColumns: [[ { field: 'ID', checkbox: true } ]],
method: 'post',
url: '/FaultRecords/LoadAllByPage/',
onDblClickRow: function(index, row) { edit(row); }
">
<thead>
<tr>
<th data-options="field:'Status',sortable:true,resizable:false,formatter: function(value){ return value == 0 ? lang.NoMaintenance : lang.HaveMaintenance; }">
<%: Html.Language("MaintenanceState")%>
</th>
<th data-options="field:'IsCancel',sortable:true,resizable:false,formatter: function(value){ return value ? lang.HasBeenCancelled : ''; }">
<%: Html.Language("Logout")%>
</th>
<th data-options="field:'Number',sortable:true,resizable:false">
<%: Html.Language("ID")%>
</th>
<th data-options="field:'RoomNumber',sortable:true,resizable:false">
<%: Html.Language("RoomNumber")%>
</th>
<th data-options="field:'FaultTypeCode',sortable:true,resizable:false">
<%: Html.Language("FaultCode")%>
</th>
<th data-options="field:'FaultType',sortable:true,resizable:false">
<%: Html.Language("FaultName")%>
</th>
<th data-options="field:'FaultTime',sortable:true,resizable:false">
<%: Html.Language("FaultDate")%>
</th>
<th data-options="field:'Description',sortable:true,resizable:false">
<%: Html.Language("Remark")%>
</th>
<th data-options="field:'RepairPerson',sortable:true,resizable:false">
<%: Html.Language("MaintenanceMan")%>
</th>
<th data-options="field:'RepairTime',sortable:true,resizable:false">
<%: Html.Language("MaintenanceTime")%>
</th>
<th data-options="field:'RepairContent',sortable:true,resizable:false">
<%: Html.Language("MaintenanceContent")%>
</th>
<th data-options="field:'CancelPerson',sortable:true,resizable:false">
<%: Html.Language("CancellationPersonnel")%>
</th>
<th data-options="field:'CancelTime',sortable:true,resizable:false">
<%: Html.Language("CancellationTime")%>
</th>
<th data-options="field:'CancelReason',sortable:true,resizable:false">
<%: Html.Language("CancellationReason")%>
</th>
<th data-options="field:'RegisteredPerson',sortable:true,resizable:false">
<%: Html.Language("Registrant")%>
</th>
<th data-options="field:'RegisteredTime',sortable:true,resizable:false,formatter:$.tools.formatDateTime">
<%: Html.Language("FaultBookDate")%>
</th>
</tr>
</thead>
</table>
</div>
</div>
<div id="addRepairDlg" class="easyui-window" title='<%: Html.Language("RepairRecord")%>' style="width: 400px; height: 420px;
padding: 5px;" closed="true" modal="true" collapsible="false" minimizable="false"
maximizable="false">
<div class="easyui-layout" fit="true">
<div data-options="region:'center'">
<form id="ff" class="easyui-form" method="post" data-options="novalidate:true">
<input name="ID" type="hidden" value="0" />
<table style="margin: 20px auto;" cellpadding="3">
<tr>
<td class="align-right">
<%: Html.Language("FaultID")%>
</td>
<td>
<input id="txtNumber" name="Number" class="easyui-validatebox textbox text" readonly="readonly" />
</td>
</tr>
<tr>
<td class="align-right">
<%: Html.Language("FaultType")%>
</td>
<td>
<input id="txtFaultTime" name="FaultTime" class="easyui-validatebox textbox text"
readonly="readonly" />
</td>
</tr>
<tr>
<td class="align-right">
<%: Html.Language("RoomNumber")%>
</td>
<td>
<input name="RoomNumber" class="easyui-validatebox textbox text" readonly="readonly" />
</td>
</tr>
<tr>
<td class="align-right">
<%: Html.Language("FaultTime")%>
</td>
<td>
<input name="FaultType" class="easyui-validatebox textbox text" readonly="readonly" />
</td>
</tr>
<tr>
<td class="align-right">
<%: Html.Language("MaintenanceTime")%>
</td>
<td>
<input id="txtRepairTime" name="RepairTime" class="easyui-datetimebox textbox text"
data-options="required:true,editable:false" />
</td>
</tr>
<tr>
<td class="align-right">
<%: Html.Language("MaintenanceMan")%>
</td>
<td>
<input id="txtRepairPerson" name="RepairPerson" class="easyui-validatebox textbox text"
data-options="required:true,validType:'length[1,20]'" />
</td>
</tr>
<tr>
<td class="align-right">
<%: Html.Language("MaintenanceContent")%>
</td>
<td>
<textarea id="txtRepairContent" name="RepairContent" class="easyui-validatebox textbox text"
data-options="validType:length[0,200]" cols="30" rows="5"></textarea>
</td>
</tr>
</table>
</form>
</div>
<div data-options="region:'south',border:false" style="text-align: right; padding: 5px 0 0;">
<a class="easyui-linkbutton" data-options="iconCls:'icon-save'" href="javascript:void(0)"
onclick="save();">
<%: Html.Language("Save")%></a> <a class="easyui-linkbutton" data-options="iconCls:'icon-cancel'"
href="javascript:void(0)" onclick="$('#addRepairDlg').window('close');">
<%: Html.Language("Cancel")%></a>
</div>
</div>
</div>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ScriptContent" runat="server">
<script type="text/javascript">
function add() {
var row = $('#dg').datagrid('getSelected');
if (row) {
if (row.Status != 0 || row.IsCancel) {
$.tools.alert(lang.ORNMANCB);
return;
}
$("#ff").form("reset").form("load", row);
$("#addRepairDlg").window("open");
} else {
$.tools.alert(lang.PleaseSelectTheData);
}
}
function save() {
if ($("#ff").form("enableValidation").form("validate")) {
var entity = $("#ff").serializeJson();
$.tools.post(entity, "/FaultRecords/Repair/", function (r) {
$("#dg").datagrid("reload");
$("#addRepairDlg").window("close");
});
}
}
</script>
</asp:Content>

View File

@@ -0,0 +1,165 @@
<%@ 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("FaultCategorySetting")%>
</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="overflow:hidden;height:30px;">
<div class="toolbar">
<a href="javascript:void(0)" class="toolbar-button tb-icon-refresh" onclick="$('#dg').datagrid('load',{});"><%: Html.Language("Refresh")%></a>
<a href="javascript:void(0)" class="toolbar-button tb-icon-add" onclick="add()"><%: Html.Language("New")%></a>
<a href="javascript:void(0)" class="toolbar-button tb-icon-edit" onclick="edit()"><%: Html.Language("Edit")%></a>
<a href="javascript:void(0)" class="toolbar-button tb-icon-remove" onclick="del()"><%: Html.Language("Delete")%></a>
</div>
</div>
<div data-options="region:'center',border:false">
<table id="dg" class="easyui-datagrid" style="width:100%; height:auto;"
data-options="
border: false,
pagination: true,
pageSize: 20,
rownumbers: true,
striped: true,
sortName: 'Code',
sortOrder: 'asc',
fit: true,
fitColumns: true,
idField: 'ID',
frozenColumns: [[
{ field: 'ID', checkbox: true }
]],
method: 'post',
url: '/FaultType/LoadAllByPage/',
onDblClickRow: function(index, row) { edit(row); }
">
<thead>
<tr>
<th data-options="field:'Code',sortable:true,resizable:false">
<%: Html.Language("FaultID")%>
</th>
<th data-options="field:'Name',sortable:true,resizable:false">
<%: Html.Language("Name")%>
</th>
<th data-options="field:'Remark',sortable:true,width:200,resizable:false">
<%: Html.Language("FaultInstructions")%>
</th>
</tr>
</thead>
</table>
</div>
</div>
<div id="editFaultType" class="easyui-window" title='<%: Html.Language("NewFaultType")%>' style="width:350px; height: 220px;padding: 5px;"
closed="true" modal="true" collapsible="false" minimizable="false" maximizable="false">
<div class="easyui-layout" fit="true">
<div data-options="region:'center'">
<form id="ff" class="easyui-form" method="post" data-options="novalidate:true">
<table style="margin: 20px auto;" cellpadding="3">
<tr>
<td class="align-right">
<%: Html.Language("FaultID")%>
</td>
<td>
<input id="txtCode" name="Code" class="easyui-validatebox textbox text" data-options="required:true,validType:'length[1,20]'" />
</td>
</tr>
<tr>
<td class="align-right">
<%: Html.Language("Name")%>
</td>
<td>
<input id="txtName" name="Name" class="easyui-validatebox textbox text" data-options="required:true,validType:'length[1,50]'" />
</td>
</tr>
<tr>
<td class="align-right">
<%: Html.Language("FaultInstructions")%>
</td>
<td>
<input id="txtRemark" name="Remark" class="easyui-validatebox textbox text" data-options="required:true,validType:'length[1,200]'" />
</td>
</tr>
</table>
</form>
</div>
<div data-options="region:'south',border:false" style="text-align: right; padding: 5px 0 0;">
<a class="easyui-linkbutton" data-options="iconCls:'icon-save'" href="javascript:void(0)" onclick="save();"><%: Html.Language("Save")%></a>
<a class="easyui-linkbutton" data-options="iconCls:'icon-cancel'" href="javascript:void(0)" onclick="$('#editFaultType').window('close');"><%: Html.Language("Cancel")%></a>
</div>
</div>
</div>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ScriptContent" runat="server">
<script type="text/javascript">
var selectedRow = null;
function add() {
selectedRow = null;
$('#ff').form('reset');
$('#editFaultType').window({ title: lang.NewFaultCategory }).window('open');
}
function edit(row) {
if (row !== null && typeof (row) === "object") {
selectedRow = row;
} else {
selectedRow = $("#dg").datagrid("getSelected");
}
if (selectedRow) {
$('#ff').form('load', selectedRow);
$('#editFaultType').window({ title: lang.EditFaultCategory + selectedRow.Name }).window('open');
} else {
$.tools.alert(lang.PleaseSelectTheData);
}
}
function del() {
var rows = $('#dg').datagrid('getSelections');
if (!rows || rows.length == 0) {
$.tools.alert(lang.PleaseSelectTheData);
return;
}
var param;
$.each(rows, function (i, n) {
if (i == 0) {
param = "idList=" + n.ID + "&nameList=" + n.Name;
}
else {
param += "&idList=" + n.ID + "&nameList=" + n.Name;
}
});
$.tools.delPost(param, "/FaultType/Delete/", function () {
$('#dg').datagrid("clearSelections");
$('#dg').datagrid("reload");
}, this);
}
function save() {
if ($("#ff").form("enableValidation").form("validate")) {
var entry = {};
entry.ID = (null != selectedRow) ? selectedRow.ID : 0
entry.Code = $("#txtCode").val();
entry.Name = $("#txtName").val();
entry.Remark = $("#txtRemark").val();
var param = { jsonData: JSON.stringify(entry) };
$.tools.post(param, "/FaultType/Save/", function () {
$("#dg").datagrid("reload");
$("#editFaultType").window("close");
}, this);
}
}
</script>
</asp:Content>

View File

@@ -0,0 +1,16 @@
<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<Domain.Group>" %>
<form class="easyui-form form" method="post" data-options="novalidate:true">
<input type="hidden" name="ID" value="<%=Model.ID %>" />
<input type="hidden" name="ParentID" value="<%=(Model.Parent != null) ? Model.Parent.ID : 0 %>" />
<table style="margin: 20px auto;" cellpadding="3">
<tr>
<td class="align-right"><%: Html.Language("Name")%></td>
<td><input id="txtGroupName" name="Name" class="easyui-validatebox textbox text" data-options="required:true,validType:'blwtext'" value="<%=Model.Name %>" /></td>
</tr>
<tr>
<td class="align-right"><%: Html.Language("Sort")%></td>
<td><input id="txtGroupSort" name="Sort" class="easyui-numberspinner text" style="width:60px;" data-options="required:true,min:1" value="<%=Model.Sort %>" /></td>
</tr>
</table>
</form>

View File

@@ -0,0 +1,28 @@
<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<dynamic>" %>
<table id="dgActiveUsers" class="easyui-datagrid" style="width:100%; height:360px;"
data-options="
border: false,
singleSelect: false,
pagination: false,
rownumbers: true,
sortName: 'Account',
sortOrder: 'desc',
fit: false,
fitColumns: true,
singleSelect: true,
showFooter: true,
url: '/Home/ActiveUsers/',
method: 'post'
">
<thead>
<tr>
<th data-options="field:'Account',width:100,sortable:true,resizable:false">
<%: Html.Language("Account")%>
</th>
<th data-options="field:'LoginIP',width:120,sortable:true,resizable:false,">
IP
</th>
</tr>
</thead>
</table>

View File

@@ -0,0 +1,352 @@
<%@ Page Language="C#" MasterPageFile="~/Views/Shared/MasterPage.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">
<div class="easyui-layout" data-options="fit:true" id="cc">
<div region="north" border="false" class="l-topmenu">
<div class="l-topmenu-logo">
<img src="/images/logo.png" alt="酒店客房控制系统" height="24px" style="margin:16px 10px;" />
</div>
<div class="l-topmenu-welcome">
<span class="space" style="font-weight: bold; color: rgb(42,100,166);">
<%= ((dynamic)ViewData["Account"]) %></span>| <span class="space" onclick="$('#divChangePassword').window('open');">
修改密码</span>| <span id='logOut' class="space">注销</span>| <span class="space" onclick="window.location.href='/Home/MenuMain/'">
首页</span>| <span class="space" onclick="about();">关于</span>
<br />
<div id="divAlarm" style="margin-right: 6px;"></div>
</div>
</div>
<div region="west" split="true" title="功能模块" collapsed="true" style="width: 180px;">
<div class="easyui-accordion" fit="true" border="false" style="background-color: #E0ECFF;
background-repeat: repeat-x;">
<ul id="menuTree" data-options="animate:true"></ul>
</div>
</div>
<div region="south" border="false" style="height: 20px; line-height: 20px; font-weight:bold;
background-image: url(/Images/bg_bottom.gif);">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td style="text-align:center;">COPYRIGHT &copy; 2014-2015 ALL RIGHT RESERVED</td>
<td id="tdDate" style="width:186px; text-align:right;"></td>
</tr>
</table>
</div>
<div region="center" data-options="border:true">
<div id="tab" class="easyui-tabs" fit="true" border="false">
<iframe id="home" name="home" style="width: 100%; height: 100%; border: none;" scrolling="auto" frameborder="none"></iframe>
</div>
</div>
<div id="divChangePassword" class="easyui-window" title="修改密码" style="width: 400px;
height: 200px; padding: 5px;" closed="true" modal="true" collapsible="false"
minimizable="false" maximizable="false">
<div class="easyui-layout" fit="true">
<div data-options="region:'center'">
<table style="margin: 20px 60px;">
<tr>
<td>
旧密码:
</td>
<td>
<input type="password" id="iptOldPassword" />
</td>
</tr>
<tr>
<td>
新密码:
</td>
<td>
<input type="password" id="iptPassword" />
</td>
</tr>
<tr>
<td>
确认密码:
</td>
<td>
<input type="password" id="iptNewPassword" />
</td>
</tr>
</table>
</div>
<div data-options="region:'south',border:false" style="text-align: right; margin: 5px 0 0;">
<a class="easyui-linkbutton" iconcls="icon-ok" href="javascript:void(0)" onclick="changePassword()">
确定</a> <a class="easyui-linkbutton" iconcls="icon-cancel" href="javascript:void(0)"
onclick="$('#divChangePassword').window('close');">取消</a>
</div>
</div>
</div>
<div id="divAbout" class="easyui-window" title="关于" closed="true" modal="true" collapsible="false" minimizable="false" maximizable="false"
style="width:400px;height:230px;">
<table>
<tr>
<th colspan="2" style="text-align:center;height:40px;font-size:14px;">酒店客房控制系统</th>
</tr>
<tr>
<th>软件版本:</th>
<td><span class="Version"></span></td>
</tr>
<tr>
<th>产品序号:</th>
<td><span class="SerialNumber"></span></td>
</tr>
<tr>
<th>授权数量:</th>
<td><span class="Limit"></span></td>
</tr>
<tr>
<th>使用时限:</th>
<td><span class="Expires"></span></td>
</tr>
<tr>
<th>主机授权:</th>
<td>
<input id="txtAuthorizationPassword" type="password" class="easyui-validatebox textbox text" style="width:100px;" />
<a href="javascript:void(0)" class="easyui-linkbutton" data-options="iconCls:'icon-ok'" onclick="accreditOk()">确定</a>
</td>
</tr>
</table>
</div>
<div id="divAlarm2" class="easyui-window" title="服务提醒" style="width: 400px; height: 500px;"
data-options="
closed: true,
modal: true,
collapsible: false,
minimizable: false,
maximizable: false,
tools: [
{ iconCls: 'icon-reload', handler: function(){ $('#dgAlarm').datagrid('reload'); } }
]
">
<table id="dgAlarm" style="width:300px"></table>
</div>
<div id="dialog2" class="easyui-window"
data-options="
closed: true,
modal: true,
collapsible: false,
minimizable: false,
maximizable: false
">
<div class="easyui-panel dlg-content"></div>
</div>
</div>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ScriptContent" runat="server">
<style type="text/css">
.space
{
padding: 5px;
cursor: pointer;
}
.l-topmenu
{
margin: 0;
padding: 0;
height: 60px;
line-height: 30px;
position: relative;
border-top: 1px solid #1D438B;
background-color: #E0ECFF;
overflow:hidden;
}
.l-topmenu-logo {
font-size: 30px;
width:500px;
height: 59px;
line-height: 59px;
}
.l-topmenu-welcome
{
top: 2px;
right: 1px;
position: absolute;
height: 28px;
line-height: 28px;
text-align: right;
}
#divAbout table {
margin:15px auto 0 auto;
}
</style>
<script type="text/javascript" language="javascript">
function groupFormatter(value, rows) {
return value + "(" + rows.length + ")";
}
function operationFormatter(val, row) {
if (row.Name != "SOS" &&
row.Name != "客人在房门开" &&
row.Name != "无人房门开" &&
row.Name != "非客人在房门关") {
var btn = "<a href='javascript:void(0)' onclick=clearMsg(" + row.ID + ",'" + row.RoomNumber + "','" + row.Name + "')>清除</a>";
return btn;
}
return "";
}
function openCurrentMsg() {
if (!$('#divAlarm2').is(":visible")) {
$('#dgAlarm').propertygrid({
url: "/RoomService/LoadCurrentRoomServices/",
border: false,
fit: true,
method: 'post',
showGroup: true,
scrollbarSize: 0,
groupField: 'Name',
groupFormatter: groupFormatter,
columns: [[
{ field: 'RoomNumber', title: '房号', width: 100, align: 'center', sortable: true },
{ field: 'Time', title: '时间', width: 100, align: 'center', sortable: true, formatter: $.tools.formatDateTime },
{ field: 'Operation', title: '操作', width: 100, align: 'center', sortable: true, formatter: operationFormatter }
]]
});
$('#divAlarm2').window('open');
}
}
//获取当前服务信息
function loadCurrentMsg() {
$.tools.post(null, "/RoomService/LoadCurrentMsg/", function (r) {
if (r.IsSuccess) {
var html = "";
for (var i = 0; i < r.Data.length; i++) {
html += "<span class='space' onclick='openCurrentMsg();' title='点击查看详情'>" + r.Data[i].Name + "<font style='font-weight: bold;color: red;'>(" + r.Data[i].Count + ")</font></span>";
if (r.Data[i].Name == "SOS" &&
r.Data[i].Count > 0) {
openCurrentMsg();
}
}
$("#divAlarm").html(html);
}
}, this, true);
}
function clearMsg(id, roomNumber, name) {
var param = { id: id, roomNumber: roomNumber, name: name };
$.tools.confrimPost("确认清除当前服务提醒吗?", param, "/RoomService/ClearRoomService/", function (r) {
if (r.IsSuccess) {
$('#dgAlarm').datagrid("reload");
}
}, this);
}
//初始化
$(function () {
//装载日期时间
setInterval(function () {
today = new Date();
$("#tdDate").html("今天:" + today.format("yyyy-MM-dd hh:mm:ss&nbsp;"));
}, 1000);
$('#menuTree').tree({
url: "/Home/LoadMenu",
attributes: ['text', 'url'],
onSelect: function (node) {
node.url && $('#home').attr('src', node.url);
}
});
//注销
$("#logOut").click(function () {
$.messager.confirm("提示", '确认注销登录吗?', function (r) {
if (r) window.location.href = '/Home/LogOut/';
});
});
$("#home").attr("src", "/RoomStatus/Index/");
loadCurrentMsg();
setInterval(loadCurrentMsg, 5000);
var myurl = GetQueryString("url");
var Returnurl = GetQueryString();
if (Returnurl != null && Returnurl.toString().length > 1) {
//$('#cc').layout('collapse', 'west');
$('#home').attr('src', Returnurl);
}
});
//修改密码
function changePassword() {
var oldPassword = $("#iptOldPassword").val();
if (oldPassword == "") {
$("#iptOldPassword").focus();
$.tools.alert('请输入旧密码!');
return;
}
var password = $("#iptPassword").val();
if (password == "") {
$("#iptPassword").focus();
$.tools.alert('请输入新密码!');
return;
}
var newPassword = $("#iptNewPassword").val();
if (newPassword == "") {
$("#iptNewPassword").focus();
$.tools.alert('请输入确认密码!');
return;
}
if (newPassword != password) {
$("#iptNewPassword").focus();
$.tools.alert('两次密码不一致,请重新输入!');
return;
}
var parm = { password: password, oldPassword: oldPassword };
$.tools.post(parm, "/Home/ChangedPassword/", function () {
$("#iptOldPassword").val("");
$("#iptPassword").val("");
$("#iptNewPassword").val("");
$('#divChangePassword').window('close');
}, this);
}
function about() {
$.tools.post(null, "/Home/ProductInfo/", function (r) {
$("#divAbout .Version").html(r.Data.Version);
$("#divAbout .SerialNumber").html(r.Data.SerialNumber);
$("#divAbout .Limit").html(r.Data.Limit);
$("#divAbout .Expires").html(r.Data.Expires);
$('#divAbout').window('open');
}, this, true);
}
function GetQueryString() {
var reg = new RegExp("(^|&)" + "url" + "=([^&]*)(&|$)");
var r = window.location.search.substr(1).match(reg);
if (r != null) return unescape(r[2]); return null;
}
function accreditOk() {
$('#dialog2')
.find('.dlg-content').css({ height: '500px' })
.panel({ border: false, fit: true, href: '/Host/HostAuthorization/', queryParams: { password: $('#txtAuthorizationPassword').val()} }).end()
.dialog({ title: '主机授权', width: 600, height: 400 })
.dialog('open');
$('#divAbout').window('close').find('input[type=password]').val('');
}
</script>
</asp:Content>

View File

@@ -0,0 +1,123 @@
<%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage<dynamic>" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>License</title>
<link href="/Styles/login.css" rel="stylesheet" type="text/css" />
<link href="/Styles/filebox.css" rel="stylesheet" type="text/css" />
<link href="/Styles/button.css" rel="stylesheet" type="text/css" />
<script src="/easyui-1.4.2/jquery.min.js" type="text/javascript"></script>
<script src="/Scripts/ajaxfileupload.js" type="text/javascript"></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; } %>
<script type="text/javascript">
function upload() {
var filename = $("#file").val();
if (filename == "") {
$("#msg").html(lang.PleaseSelectALicenseFile);
return;
}
$.ajaxFileUpload({
url: "/Home/UploadLicense/",
type: "POST",
secureuri: false,
fileElementId: "file",
dataType: "json",
success: function (data, status) {
if (status == "success" && typeof (data) == "object") {
if (data.IsSuccess) {
location.reload();
} else {
$("#msg").html(data.Message);
}
}
},
error: function (data, status, e) {
$("#msg").html(e);
}
});
}
$(function () {
$("input[type=file]").change(function () {
var file = $(this).val();
var mime = file.toLowerCase().substr(file.lastIndexOf("."));
if (mime !== ".lic") {
$("#msg").html(lang.CUOLLFF);
return;
}
$(this).parents(".uploader").find(".filename").val(file);
});
$("input[type=file]").each(function () {
if ($(this).val() == "") { $(this).parents(".uploader").find(".filename").val(lang.PleaseSelectALicenseFile); }
});
$.ajax({
type: "POST",
url: "/Home/GetMachineCode/",
success: function (msg) {
if (msg) {
if (msg.IsSuccess) {
$("#txtMachineCode").val(msg.Message);
}
else {
$("#txtMachineCode").val("获取机器码失败");
}
}
else {
$("#txtMachineCode").val("获取机器码失败");
}
}
});
});
</script>
</head>
<body>
<div class="container" style="background:transparent;">
<div id="licensebox">
<form id="uploadForm" method="post" action="#" enctype="application/x-www-form-urlencoded">
<table>
<tr>
<td style="height:25%;">
<div>
机器码:<input type="text" id="txtMachineCode" disabled="disabled" style="width:180px; height:28px; font-weight:bold;" />
</div>
</td>
</tr>
<tr>
<td style="height:25%;">
<div class="uploader blue">
<input type="text" class="filename" readonly="readonly" />
<input type="button" class="button" value='<%: Html.Language("Browse")%>'/>
<input type="file" id="file" name="file" size="30"/>
</div>
</td>
</tr>
<tr>
<td style="height:25%;background:#;">
<input type="button" value='<%: Html.Language("Upload")%>' class="button blue" style="width:100px;" onclick="upload();" />
</td>
</tr>
<tr>
<td style="height:25%;background:#;">
<span id="msg" style="color:#f00;"><%: ViewData["Msg"] %></span>
</td>
</tr>
</table>
</form>
</div>
</div>
</body>
</html>

View File

@@ -0,0 +1,69 @@
<%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage<dynamic>" %>
<%--<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">--%>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>酒店客房控制系统--用户登录</title>
<link href="/Styles/login.css" rel="stylesheet" type="text/css" />
<script src="/easyui-1.4.2/jquery.min.js" type="text/javascript"></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; } %>
<script src="/Scripts/login.js" type="text/javascript"></script>
<script type="text/javascript" src="/easyui-1.4.2/jquery.easyui.min.js"></script>
</head>
<body>
<div class="container">
<div class="header">
<%--<img src="/images/logo_actop.png" alt="宝来威智能科技有限公司" />--%>
</div>
<div id="loginbox">
<table cellspacing="5">
<tr>
<td><label><%: Html.Language("Account")%></label></td>
<td colspan="2"><input type="text" id="txtAccount" name="account" class="text" style="width:210px;" /></td>
</tr>
<tr>
<td><label><%: Html.Language("Password")%></label></td>
<td colspan="2"><input type="password" id="txtPassword" name="password" class="text" style="width:210px;" /></td>
</tr>
<tr>
<td><label><%: Html.Language("VerificationCode")%></label></td>
<td style="width:90px;"><input type="text" id="txtCode" name="code" class="text" style="width:88px;" /></td>
<td style="text-align:left;">
<img src="/Home/ValidateCode/" style="cursor:pointer;" alt="点击刷新" title="点击刷新" onclick="this.src=this.src+'?';" />
</td>
</tr>
<tr>
<td colspan="3" style="height:50px;text-align:center">
<a class="button" href="javascript:void(0);" onclick="logOn();"> <%: Html.Language("Login") %></a>&nbsp;
<a class="button" href="javascript:void(0);" onclick="reset();"><%: Html.Language("Reset")%></a>
</td>
</tr>
<tr>
<td colspan="3">
<div id="msg" style="color:red;line-height:30px;height:30px;"></div>
</td>
</tr>
</table>
</div>
<div class="footer">
<div class="copyright">
深圳市宝来威智能科技有限公司<br />
COPYRIGHT &copy; 2014-2016 ALL RIGHT RESERVED
</div>
</div>
</div>
</body>
</html>

View File

@@ -0,0 +1,123 @@
<%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage<dynamic>" %>
<%@ Import Namespace="WebSite.Controllers" %>
<%
var roomManager = ViewData["RoomManager"] as IList<Mune>;
var setting = ViewData["Setting"] as IList<Mune>;
var deviceManager = ViewData["DeviceManager"] as IList<Mune>;
var queryStatistics = ViewData["QueryStatistics"] as IList<Mune>;
var sysMaintenance = ViewData["SysMaintenance"] as IList<Mune>;
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>酒店客房控制系统</title>
<link rel="stylesheet" href="/Styles/metro.css" />
<script type="text/javascript" src="/Scripts/jquery-1.4.4.min.js"></script>
<script type="text/javascript" src="/easyui-1.4.2/jquery.min.js"></script>
<script type="text/javascript" src="/easyui-1.4.2/jquery.easyui.min.js"></script>
</head>
<body>
<!--头部导航开始-->
<%-- <div style="position: absolute; top: 50px; left: 20px; width: 105px; height: 20px;
background: url(../images/newMain/LOGO.png); -moz-background-size: cover; -o-background-size: cover;">
</div>--%>
<div class="l-topmenu-welcome" style="color: white;">
<span class="space">
<%= ((dynamic)ViewData["Account"]) %></span>|<span id='logOut' class="space" onclick="logOutClick();">注销</span>
<br />
<div id="divAlarm" style="margin-right: 6px;">
</div>
</div>
<div id='pageBase_Div' style='display: none; z-index: 12001; background-color: White;
text-align: center; position: absolute; padding: 20px 100px 40px; left: 38%;
top: 30%;'>
确认注销登录吗?
<div style="padding-top: 20px;">
<input id="BtnOk" type="button" value="确定" onclick="OK();" style="width: 70px; height: 25px;" />&nbsp;<input
id="BtnCancel" type="button" value="取消" onclick="Cancel();" style="width: 70px;
height: 25px;" />
</div>
</div>
<!--头部导航结束-->
<!--logo区开始-->
<div id="metro_box">
<%--第一列 客房管理--%>
<div style="width: 155px; float: left;">
<% foreach (var mune in roomManager)
{ %>
<ul>
<li><a href="/Home/MenuIndex?url=<%: mune.Url %>" style='display:block;width:145px;height:86px;' class='<%: mune.Icon %>'">
</a></li>
</ul>
<% } %>
</div>
<%--第二列 设备管理 --%>
<div style="width: 155px; float: left;">
<% foreach (var mune in deviceManager)
{ %>
<ul>
<li><a href="/Home/MenuIndex?url=<%: mune.Url %>" style='display:block;width:145px;height:117px;' class='<%: mune.Icon %>'">
</a></li>
</ul>
<% } %>
</div>
<%--第三列 参数设置--%>
<div style="width: 155px; float: left;">
<% foreach (var mune in setting)
{ %>
<ul>
<li><a href="/Home/MenuIndex?url=<%: mune.Url %>" style='display:block;width:145px;height:179px;' class='<%: mune.Icon %>'">
</a></li>
</ul>
<% } %>
</div>
<%--第四列 查询统计--%>
<div style="width: 155px; float: left;">
<% foreach (var mune in queryStatistics)
{ %>
<ul>
<li><a href="/Home/MenuIndex?url=<%: mune.Url %>" style='display:block;width:145px;height:80px;' class='<%: mune.Icon %>'">
</a></li>
</ul>
<% } %>
</div>
<%--第五列 系统管理--%>
<div style="width: 155px; float: left;">
<% foreach (var mune in sysMaintenance)
{ %>
<ul>
<li><a href="/Home/MenuIndex?url=<%: mune.Url %>" style='display:block;width:145px;height:86px;' class='<%: mune.Icon %>'">
</a></li>
</ul>
<% } %>
</div>
</div>
<div style="left: 0; bottom: 0; position: absolute; width: 100%; height: 30px; z-index: 100;
text-align: center; background: url(../images/newMain/底部半透明条.png); -moz-background-size: cover;
-webkit-background-size: cover; -o-background-size: cover; background-size: cover;">
<font style="line-height: 30px;" color="white">COPYRIGHT &copy; 2015 ALL RIGHT RESERVED</font>
</div>
</body>
<script type="text/javascript" language="javascript">
function logOutClick() {
whichEl = document.getElementById("pageBase_Div") //获得指定ID值的对象
if (whichEl.style.display == 'none') { //block是默认值为显示,none为隐藏
whichEl.style.display = 'block';
} else {
whichEl.style.display = 'none';
}
}
function OK() {
window.location.href = '/Home/LogOut/';
}
function Cancel() {
document.getElementById("pageBase_Div").style.display = 'none';
}
</script>
</html>

View File

@@ -0,0 +1,326 @@
<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/SimonMasterPage.Master"
Inherits="System.Web.Mvc.ViewPage" %>
<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
<% if (Request.Url.Host.IndexOf("boonlive") > -1){ %><%: Html.Language("Company")%><% } else { %><%: Html.Language("ProductName")%><% }%>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
<div class="easyui-layout" data-options="fit:true">
<div id="sidebar" region="west" data-options="split:true" title="<%: Html.Language("ProductName") %>">
<div data-bind="template: { name: 'statisticsTemplate', data: Statistics }">
</div>
</div>
<div region="center">
<div class="easyui-layout" data-options="fit:true">
<div id="head" region="north" data-options="border:false">
<div id="logo">
</div>
<div id="user">
<%: Html.Language("CurrentHotel")%><a id="curHotel" href="javascript:void(0)" data-bind="click: showHotels"></a>&nbsp;&nbsp;|&nbsp;&nbsp;
<%: User.Identity.Name %>&nbsp;&nbsp;|&nbsp;&nbsp; <a href="javascript:void(0)" data-bind="click: showChangePassword">
<%: Html.Language("ChangePassword") %></a>&nbsp;&nbsp;|&nbsp;&nbsp; <a href="javascript:void(0)"
data-bind="click: logout">
<%: Html.Language("Logout") %></a>&nbsp;&nbsp;|&nbsp;&nbsp; <a href="javascript:void(0)"
data-bind="click: showAbout">
<%: Html.Language("About") %></a>
</div>
<div id="menu">
<ul>
</ul>
<div class="panel">
<ul>
</ul>
</div>
</div>
</div>
<div region="center" data-options="border:false" style="background: #EFEFEF;">
<iframe id="home" name="main" style="width: 100%; height: 99.5%; border: none; overflow-y: hidden"
scrolling="auto" frameborder="0"></iframe>
</div>
</div>
</div>
</div>
<script id="statisticsTemplate" type="text/html">
<div id="room-statistics" class="box">
<h1><span> <%: Html.Language("RoomsStatistics") %></span></h1>
<ul>
{{each Room}}
<li>${ Name }<span class="value" data-bind="text: Value"></span></li>
{{/each}}
</ul>
</div>
<div id="decive-alert" class="box">
<h1><span><%: Html.Language("FailureAlarm") %></span></h1>
<ul>
{{each Peripheral}}
<li data-bind="style: { background: Color }">
<a href="javascript:void(0)" data-bind="click: $root.showPeripheral">${ Name }<span class="value" data-bind="text: Value"></span></a>
</li>
{{/each}}
</ul>
</div>
<div id="service-alert" class="box">
<h1><span><%: Html.Language("ServiceAlarm") %></span></h1>
<ul>
{{each Services}}
<li data-bind="style: { background: Color }">
<a href="javascript:void(0)" data-bind="click: $root.showServiceMsg">${ Name }<span class="value" data-bind="text: Value"></span></a>
</li>
{{/each}}
</ul>
</div>
<%--<div id="room-abnormity" class="box">
<h1><span><%: Html.Language("RoomAbnormity") %></span></h1>
<ul>
{{each Abnormities}}
<li>
<a href="javascript:void(0)" data-bind="click: $root.showAbnormityMsg">${ Name }<span class="value" data-bind="text: Value"></span></a>
</li>
{{/each}}
</ul>
</div>--%>
</script>
<div style="display: none;">
<div id="changePasswordDlg" class="easyui-window" title="<%: Html.Language("ChangePassword") %>"
style="width: 400px; height: 220px; padding: 5px;" data-options="
closed: true,
modal: true,
collapsible: false,
minimizable: false,
maximizable: false">
<div class="easyui-layout" fit="true">
<div data-options="region:'center'">
<table style="margin: 20px 0; width: 370px;">
<tr>
<th>
<label for="iptOldPassword">
<%: Html.Language("CurrentPassword") %></label>
</th>
<td>
<input type="password" id="iptOldPassword" />
</td>
</tr>
<tr>
<th>
<label for="iptPassword">
<%: Html.Language("NewPassword")%></label>
</th>
<td>
<input type="password" id="iptPassword" />
</td>
</tr>
<tr>
<th>
<label for="iptNewPassword">
<%: Html.Language("ConfirmNewPassword")%></label>
</th>
<td>
<input type="password" id="iptNewPassword" />
</td>
</tr>
</table>
</div>
<div style="text-align: right; margin: 5px 0 0;" data-options="region:'south',border:false">
<a class="easyui-linkbutton" iconcls="icon-ok" href="javascript:void(0)" onclick="changePassword()">
<%: Html.Language("OK") %></a> <a class="easyui-linkbutton" iconcls="icon-cancel"
href="javascript:void(0)" onclick="$('#changePasswordDlg').window('close');">
<%: Html.Language("Cancel") %></a>
</div>
</div>
</div>
<div id="aboutDlg" class="easyui-window" title="<%: Html.Language("About") %>" style="width: 400px;
height: 280px; display: none;" data-options="
closed: true,
modal: true,
collapsible: false,
minimizable: false,
maximizable: false
">
<table>
<tr>
<th colspan="2" style="text-align: center; height: 40px; font-size: 14px;">
<%: Html.Language("ProductName") %>
</th>
</tr>
<tr>
<th>
<%: Html.Language("ProductVersion") %>
</th>
<td>
<span class="Version"></span>
</td>
</tr>
<tr>
<th>
<%: Html.Language("SerialNumber") %>
</th>
<td>
<span class="SerialNumber"></span>
</td>
</tr>
<%--<tr>
<th>
<%: Html.Language("AuthorizedNumber")%>
</th>
<td>
<span class="Limit"></span>
</td>
</tr>--%>
<tr>
<th>
<%: Html.Language("CurrentHotel")%>
</th>
<td>
<span class="CurrentHotel"></span>
</td>
</tr>
<tr>
<th>
<%: Html.Language("UseTimeLimit")%>
</th>
<td>
<span class="Expires"></span>
</td>
</tr>
<%--<tr>
<th><%: Html.Language("HostAuthorization")%></th>
<td>
<input id="txtAuthorizationPassword" type="password" class="easyui-validatebox textbox text" style="width:100px;" />
<a href="javascript:void(0)" class="easyui-linkbutton" data-options="iconCls:'icon-ok'" onclick="accreditOk()">确定</a>
</td>
</tr>
<tr>
<td colspan="2" style="text-align: center;">
<a href="/Help/Help.pdf" target="_blank">
<%: Html.Language("Help") %></a>
</td>
</tr>--%>
</table>
</div>
<div id="peripheralDlg" class="easyui-window" title='<%: Html.Language("FailureAlarm") %>'
style="width: 400px; height: 400px;" data-options="
closed: true,
modal: true,
collapsible: false,
minimizable: false,
maximizable: false,
tools:[
{ iconCls: 'icon-reload', handler: function(){ $('#dgPeripheral').datagrid('reload'); }}
]
">
<table id="dgPeripheral" class="easyui-propertygrid" style="width: 300px" data-options="
border: false,
fit: true,
method: 'post',
showGroup: true,
scrollbarSize: 0,
groupField: 'Name',
groupFormatter: groupFormatter,
columns: [[
{ field: 'RoomNumber', title: '<%: Html.Language("RoomNumber") %>', width:100, align: 'center', sortable:true }
]]
">
</table>
</div>
<div id="serviceAlertDlg" class="easyui-window" title='<%: Html.Language("ServiceAlarm") %>'
style="width: 400px; height: 400px;" data-options="
closed: true,
modal: true,
collapsible: false,
minimizable: false,
maximizable: false,
tools:[
{ iconCls: 'icon-reload', handler: function(){ $('#dgAlarm').datagrid('reload'); }}
]
">
<table id="dgAlarm" class="easyui-propertygrid" style="width: 300px" data-options="
border: false,
fit: true,
method: 'post',
showGroup: true,
scrollbarSize: 0,
groupField: 'Name',
groupFormatter: groupFormatter,
columns: [[
{ field: 'RoomNumber', title: '<%: Html.Language("RoomNumber") %>', width:80, align: 'center', sortable:true },
{ field: 'Time', title: '<%: Html.Language("Time") %>',width:150, align: 'center', sortable: true, formatter: $.tools.formatDateTime },
{ field: 'Operation', title: '<%: Html.Language("Operation") %>', width:70, align: 'center', sortable: true, formatter: operationFormatter }
]]
">
</table>
</div>
<div id="hotelDlg" class="easyui-window" title='<%: Html.Language("Hotel") %>' style="width: 660px;
height: 450px;" data-options="closed:true,modal: true,collapsible: false,minimizable: false,maximizable: false">
<div data-options="region:'north',border:false" style="overflow: hidden; height: 30px;">
<div class="toolbar">
<label>
<%: Html.Language("QueryContent")%></label>
<input id="txtQueryContent" class="easyui-validatebox" style="width: 120px;" />
<a href="javascript:void(0)" class="toolbar-button tb-icon-search" onclick="groupTreeOnSelect();">
<%: Html.Language("Query")%></a>
</div>
</div>
<table style="width: 100%; height: 380px;">
<tr>
<td style="width: 75%;">
<table id="dgHotel" class="easyui-propertygrid" style="width: 100%;" data-options="
border: false,
fit: true,
method: 'post',
showGroup: false,
scrollbarSize: 0,
loadMsg: 'load......',
columns: [[
{ field: 'Operation', title: '<%: Html.Language("Operation") %>', align: 'center', sortable: true, formatter: toggleHotelFormatter },
{ field: 'Code', title: '<%: Html.Language("Code") %>', align: 'center', sortable:true },
{ field: 'Name', title: '<%: Html.Language("Name") %>', sortable: true },
{ field: 'GroupName', title: '<%: Html.Language("Group") %>', sortable: true }
]]
">
</table>
</td>
<td>
<table id="groupTree" class="easyui-treegrid" data-options="
url: '/SysHotel/LoadSysHotelGroupTree/',
method: 'post',
idField: 'ID',
treeField: 'Name',
fit: true,
fitColumns: true,
animate: true,
border: false,
loadMsg: 'load......',
bodyCls: 'easyui-treegrid-no-icon',
onLoadSuccess: function (row, data) {if (data[0] != null) {$('#groupTree').treegrid('select', data[0].ID);}},
onSelect: groupTreeOnSelect
">
<thead>
<tr>
<th data-options="field:'Name',width:160">
<%: Html.Language("Name")%>
</th>
</tr>
</thead>
</table>
</td>
</tr>
</table>
</div>
</div>
<div id="jplayer">
</div>
<div id="jplayer1">
</div>
<div id="jplayer2">
</div>
<div id="jplayer3">
</div>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ScriptContent" runat="server">
<link href="/Styles/simon-home-index.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="/Scripts/jquery.tmpl.min.js"></script>
<script type="text/javascript" src="/Scripts/knockout-3.3.0.js"></script>
<script type="text/javascript" src="/Scripts/knockout.mapping-latest.js"></script>
<script type="text/javascript" src="/Scripts/jplayer/jquery.jplayer.min.js"></script>
<script type="text/javascript" src="/Scripts/simon-home-index.js"></script>
</asp:Content>

View File

@@ -0,0 +1,112 @@
<%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage<dynamic>" %>
<%--<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">--%>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no"/>
<title><% if (Request.Url.Host.IndexOf("boonlive") > -1){ %><%: Html.Language("Company")%><% } else { %><%: Html.Language("ProductName")%><% }%></title>
<% if (Request.Url.Host.IndexOf("hogood") > -1)
{ %><link href="/Styles/login_zhuhao.css" rel="stylesheet" type="text/css" /><% }
else if (Request.Url.Host.IndexOf("szactop") > -1)
{ %><link href="/Styles/login_zhuohao.css" rel="stylesheet" type="text/css" /><% }
else if (Request.Url.Host.IndexOf("blv") > -1 || Request.Url.Host.IndexOf("boo-sys") > -1)
{ %><link href="/Styles/login_blv.css" rel="stylesheet" type="text/css" /><% }
else if (Request.Url.Host.IndexOf("xuanzhu") > -1)
{ %><link href="/Styles/login_xuanzhu.css" rel="stylesheet" type="text/css" /><% }
else
{ %><link href="/Styles/login_blw.css" rel="stylesheet" type="text/css" /><% } %>
<script src="/Scripts/jquery.min.js" type="text/javascript"></script>
<script src="/Scripts/login.js" type="text/javascript"></script>
<% switch ((Domain.Language)ViewData["Language"])
{
case Domain.Language.EN: %><script type="text/javascript" src="/Scripts/en-US.js"></script><% break;
case Domain.Language.ZH_TW: %><script type="text/javascript" src="/Scripts/zh-TW.js"></script><% break;
default: %><script type="text/javascript" src="/Scripts/zh-CN.js"></script><% break;
} %>
</head>
<body>
<div id="container">
<%--<div>
<%: ViewData["HotelName"] %>
</div>--%>
<div class="login-box">
<form id="loginForm" method="post" action="/Home/LogOnByAndPassword/">
<table>
<col style="width: 80px;" />
<tr>
<th>
<label for="txtAccount">
<%: Html.Language("Account")%></label>
</th>
<td>
<input id="txtAccount" name="Account" type="text" value="<%: ViewData["Account"] %>" />
</td>
</tr>
<tr>
<th>
<label for="txtPassword">
<%: Html.Language("Password")%></label>
</th>
<td>
<input id="txtPassword" name="Password" type="password" />
</td>
</tr>
<tr>
<th>
<label for="txtCode">
<%: Html.Language("VerificationCode")%></label>
</th>
<td>
<input id="txtCode" name="Code" type="text" maxlength="4" />
<img class="verify-code" src="/Home/ValidateCode/" alt='<%: Html.Language("ClickRefresh")%>'
title='<%: Html.Language("ClickRefresh")%>' onclick="this.src=this.src+'?';" />
</td>
</tr>
<tr>
<td colspan="2" style="text-align: center;">
<a id="btnLogin" href="javascript:void(0);" onclick="logOn();">
<%: Html.Language("Login") %></a>
</td>
</tr>
<tr>
<td colspan="2">
<div id="lanuagebar">
<select id="selLanguage" onchange="switchLanuage(this.value)" style="width: 241px;
height: 36px; font-size: 15px; border: 1px solid #C7D9E7; color: black; background: #EBEBEB;">
<option value="zh-cn" <%: (((Domain.Language)ViewData["Language"]) == Domain.Language.CN) ? "selected='selected'" : "" %>>
简体中文</option><% if (Request.Url.Host.IndexOf("boonlive") > -1){ %>
<option value="zh-tw" <%: (((Domain.Language)ViewData["Language"]) == Domain.Language.ZH_TW) ? "selected='selected'" : "" %>>
繁体中文</option>
<option value="en" <%: (((Domain.Language)ViewData["Language"]) == Domain.Language.EN) ? "selected='selected'" : "" %>>
ENGLISH</option><% } %>
</select>
</div>
</td>
</tr>
<tr>
<td colspan="2">
<input type="checkbox" id="isSaveMsg" name="RememberMe" <%: (ViewData["RememberMe"] as bool?).Value ? "checked='checked'" : "" %>
style="vertical-align: middle" />
<label dir="ltr" for="checkbox" style="font-size: 14px; line-height: 14px">
<%: Html.Language("RememberMe")%></label>
</td>
</tr>
<tr>
<td colspan="2">
<label id="msg">
</label>
</td>
</tr>
</table>
</form>
</div>
</div>
<div id="footer"><% if (Request.Url.Host.IndexOf("boonlive") > -1){ %>
Copyright 2015 - 宝来威智能(广东)有限公司 版权所有&nbsp;&nbsp;<a href="http://beian.miit.gov.cn" target="_blank">粤ICP备17103944号</a>
<%}else if (Request.Url.Host.IndexOf("hogood") > -1) { %>
Copyright 2015 - 住好智能科技(深圳)有限公司 版权所有&nbsp;&nbsp;<a href="http://beian.miit.gov.cn" target="_blank">粤ICP备20063828号-3</a>
<%}%>
</div>
</body>
</html>

View File

@@ -0,0 +1,98 @@
<%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage<dynamic>" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>系统配置</title>
<link type="text/css" rel="stylesheet" href="/easyui-1.4.2/themes/default/easyui.css" />
<link type="text/css" rel="stylesheet" href="/easyui-1.4.2/themes/icon.css" />
<link type="text/css" rel="stylesheet" href="/Styles/simon-common.css" />
<script type="text/javascript" src="/Scripts/jquery.min.js"></script>
<script type="text/javascript" src="/easyui-1.4.2/jquery.easyui.min.js"></script>
<script type="text/javascript" src="/Scripts/zh-CN.js"></script>
<script type="text/javascript" src="/Scripts/common.js"></script>
<script type="text/javascript" src="/Scripts/tools.js"></script>
<style type="text/css">
form {
font-size: 12px;
margin-top: 100px;
}
fieldset {
width: 500px;
margin: 0 auto;
border: 1px solid #00A2EA;
}
fieldset legend {
font-size: 13px;
font-weight: bold;
}
fieldset table {
margin: 0 auto;
}
fieldset table th {
text-align: left;
font-weight: normal;
cursor: pointer;
}
</style>
<script type="text/javascript">
function saveConfig() {
var form = $('#configForm');
if (form.form('enableValidation').form('validate')) {
var entry = form.serializeJson();
$.tools.post({ jsonData: JSON.stringify(entry) }, '/Home/SaveSystemConfig/', function (r) {
$.tools.alert(r.Message);
}, this);
}
}
</script>
</head>
<body>
<form id="configForm" class="easyui-form" method="post" action="javascript:void(0)">
<fieldset>
<legend>系统配置</legend>
<table>
<tr>
<th><label>服务器IP</label></th>
<td>
<select id="cbxServiceIp" name="MessageIP" class="easyui-combobox" style="width:130px;"
data-optinos="
required: true,
panelHeight: 'auto',
editable: false
">
<% foreach (var ip in Common.Tools.GetLocalIPList()) { %>
<option value="<%: ip %>"><%: ip %></option>
<% } %>
</select>
</td>
</tr>
<tr>
<th><label>服务器端口:</label></th>
<td>
<input name="MessagePort" class="easyui-numberbox" style="width:130px;"
value="3339"
data-options="
required: true,
min: 1,
max: 65535,
precision: 0"
/>
</td>
</tr>
<tr>
<td colspan="2" style="text-align:center;">
<a href="javascript:void(0)" onclick="saveConfig()" class="easyui-linkbutton" data-options="iconCls:'icon-save'">保存</a>
</td>
</tr>
</table>
</fieldset>
</form>
</body>
</html>

View File

@@ -0,0 +1,14 @@
<%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage<dynamic>" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Test</title>
</head>
<body>
<div>
<a href="/Home/Test?test=test">Test</a>
</div>
</body>
</html>

View File

@@ -0,0 +1,61 @@
<%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage<dynamic>" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
</head>
<body>
<div style="padding: 20px;">
<table cellspacing="1" cellpadding="3" width="98%" align="center" bgcolor="#ffffff"
border="0">
<tbody>
<tr bgcolor="gray">
<td align="center" colspan="2" style="height: 25px; font-weight:bold;">
<%: Html.Language("ServerParameter")%>
</td>
</tr>
<tr bgcolor="#f9fbf0">
<td width="50%" style="height: 24px">
&nbsp;<b> <%: Html.Language("ServerName")%></b><%=System.Environment.MachineName%>
</td>
<td width="50%" style="height: 24px">
&nbsp;<b> <%: Html.Language("ServerPort")%></b><%= HttpContext.Current.Request.ServerVariables["Server_Port"].ToString() %>
</td>
</tr>
<tr bgcolor="#f9fbf0">
<td width="50%" style="height: 23px">
&nbsp;<b> <%: Html.Language("ScriptExplainingEngine")%></b><%=System.Environment.Version%>
</td>
<td width="50%" style="height: 23px">
<b>&nbsp; <%: Html.Language("SitePhysicalPath")%></b><%=HttpContext.Current.Request.PhysicalApplicationPath.ToString() %>
</td>
</tr>
<tr bgcolor="#f9fbf0">
<td width="50%" style="height: 23px">
&nbsp;<b> <%: Html.Language("ServerCPUNumber")%></b><%=System.Environment.ProcessorCount %>
</td>
<td width="50%" style="height: 23px">
&nbsp;<b> <%: Html.Language("IISServerVersion")%></b><%=Request.ServerVariables["SERVER_SOFTWARE"]%>
</td>
</tr>
<tr bgcolor="#f9fbf0">
<td width="50%">
&nbsp;<b> <%: Html.Language("TheBootOperationTime")%></b><%=(System.Environment.TickCount/3600000).ToString("N2")%>
<%: Html.Language("Hour")%>
</td>
<td width="50%">
<b>&nbsp; <%: Html.Language("ServerTime")%></b><%=DateTime.Now.ToString() %>
</td>
</tr>
<tr bgcolor="#f9fbf0">
<td colspan="2">
&nbsp;<b> <%: Html.Language("TheServerOperatingSystem")%></b><span>
<%=System.Environment.OSVersion.ToString()%></span>
</td>
</tr>
</tbody>
</table>
</div>
</body>
</html>

View File

@@ -0,0 +1,230 @@
<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<Domain.Host>" %>
<style type="text/css">
#editHostForm table th
{
font-weight: normal;
text-align: right;
}
</style>
<input type="hidden" id="txtAccount" value="<%: ViewData["Account"] %>" />
<form id="editHostForm" class="easyui-form" method="post" data-options="novalidate:true">
<input type="hidden" name="ID" value="<%: Model.ID %>" />
<input type="hidden" name="HostNumber" value="<%: Model.HostNumber %>" />
<table style="margin: 1px auto;" cellpadding="3">
<tr>
<th>
<label for="txtRoomNumber">
<%: Html.Language("RoomNumber") %></label>
</th>
<td>
<input id="txtRoomNumber" name="RoomNumber" class="easyui-validatebox textbox text"
data-options="required:true,validType:'blwtext'" value="<%: Model.RoomNumber %>" />
</td>
<th>
</th>
<td>
<input type="checkbox" name="IsSyncRoomNumber" style="vertical-align: top;" value="true" <%: Model.IsSyncRoomNumber ? "checked='checked'" : "" %> /><%: Html.Language("IsSyncRoomNumber")%>&nbsp;
<input type="checkbox" name="IsAutoUpdate" style="vertical-align: top;" value="true" <%: Model.IsAutoUpdate ? "checked='checked'" : "" %> /><%: Html.Language("IsAutoUpdate")%>
</td>
</tr>
<tr>
<th>
<label for="txtMAC">
MAC</label>
</th>
<td>
<input id="txtMAC" name="MAC" class="easyui-validatebox textbox text" data-options="validType:'length[17,17]'" value="<%: Model.MAC %>" />
</td>
<th>
<label for="cbxHotels">
<%: Html.Language("Hotel")%></label>
</th>
<td>
<select id="cbxHotels" name="HotelID" class="easyui-combobox" style="width: 180px;"
data-options="
valueField: 'ID',
textField: 'Name',
required: true,
panelHeight: '180px',
editable: false,
onSelect: cbxHotelsOnSelect,
url: '/SysHotel/LoadAll',
value: <%: Model.SysHotel != null ? Model.SysHotel.ID.ToString() : "''" %>
">
</select>
</td>
</tr>
<tr>
<th>
<label for="cbxGroup1">
<%: Html.Language("Group") %></label>
</th>
<td>
<select id="cbxGroup1" name="GroupID" class="easyui-combotree" style="width: 180px;"
data-options="
required:true,
editable:false,
panelHeight: '180px',
lines:true,
url:'/Group/LoadGroupTree2/',
value:<%: Model.Group != null ? Model.Group.ID.ToString() : "''" %>
">
</select>
</td>
<th>
<label for="cbxRoomType1">
<%: Html.Language("RoomType") %></label>
</th>
<td>
<select id="cbxRoomType1" name="RoomTypeID" class="easyui-combobox" style="width: 180px;"
data-options="
valueField: 'ID',
textField: 'Name',
required: true,
panelHeight: '180px',
editable: false,
url: '/RoomType/LoadRoomType',
value: <%: Model.RoomType != null ? Model.RoomType.ID.ToString() : "''" %>
">
</select>
</td>
</tr>
<tr>
<th>
<label for="txtServerIP">
<%: Html.Language("ServerIP") %></label>
</th>
<td>
<input id="txtServerIP" name="ServerIP" class="easyui-validatebox textbox text" data-options="required:true" validType="ip" readonly="readonly" value="<%: string.IsNullOrEmpty(Model.ServerIP)?"106.75.37.225":Model.ServerIP %>" />
</td>
<th>
<label for="txtServerPort">
<%: Html.Language("ServerPort") %></label>
</th>
<td>
<input id="txtServerPort" name="ServerPort" class="easyui-numberbox" data-options="required:true" readonly="readonly" value="<%: Model.ServerPort==0?3339:Model.ServerPort %>" />
</td>
</tr>
<tr>
<th>
<label for="cbxIPType">
<%: Html.Language("IPType") %></label>
</th>
<td colspan="3">
<select id="cbxIPType" name="IPType" class="easyui-combobox" style="width: 60px;"
data-options="panelHeight: 'auto',editable: false,onSelect:cbxIPTypeSelect,value:<%: Model.IPType != 0 ? Model.IPType : 2 %>">
<option value='1'><%: Html.Language("Auto")%></option>
<option value='2'><%: Html.Language("Manual")%></option>
</select>
</td>
</tr>
<tr>
<th>
<label for="txtLanIP">
<%: Html.Language("LanIP") %></label>
</th>
<td>
<input id="txtLanIP" name="LanIP" class="easyui-validatebox textbox text" validType="ip" disabled="disabled" value="<%: Model.LanIP %>" />
</td>
<th>
<label for="txtLanPort">
<%: Html.Language("LanPort") %></label>
</th>
<td>
<input id="txtLanPort" name="LanPort" class="easyui-numberbox" disabled="disabled" value="<%: Model.LanPort %>" />
</td>
</tr>
<tr>
<th>
<label for="txtSubnetMask">
<%: Html.Language("SubnetMask")%></label>
</th>
<td>
<input id="txtSubnetMask" name="SubnetMask" class="easyui-validatebox textbox text" validType="ip" disabled="disabled" value="<%: Model.SubnetMask %>" />
</td>
<th>
<label for="txtGateway">
<%: Html.Language("Gateway")%></label>
</th>
<td>
<input id="txtGateway" name="Gateway" class="easyui-validatebox textbox text" validType="ip" disabled="disabled" value="<%: Model.Gateway %>" />
</td>
</tr>
<tr>
<th>
<label for="txtDNS">
DNS</label>
</th>
<td>
<input id="txtDNS" name="DNS" class="easyui-validatebox textbox text" validType="ip" disabled="disabled" value="<%: Model.DNS %>" />
</td>
<th>
<label for="txtRemark">
<%: Html.Language("Remark") %></label>
</th>
<td>
<input id="txtRemark" name="Remark" class="easyui-validatebox textbox text" data-options="validType:length[0,200]" value="<%: Model.Remark %>" />
</td>
</tr>
<tr>
<th>
<label for="txtDNS">
FCS_location_uuid</label>
</th>
<td>
<input id="txtlocationuuid" name="FCS_locationUUID" class="textbox text" value="<%: Model.FCS_locationUUID %>" />
</td>
</tr>
<%--<tr>
<th>
<label for="txtXiaoDuCUID">
XiaoDu CUID</label>
</th>
<td colspan="3">
<input id="txtXiaoDuCUID" name="XiaoDuCUID" class="easyui-validatebox textbox text"
data-options="validType:length[0,200]" value="<%: Model.XiaoDuCUID %>" placeholder="<%: Html.Language("Flag1")%>" style="width:416px;" />
</td>
</tr>
<tr>
<th>
<label for="txtTCLCUID">
TCL CUID</label>
</th>
<td colspan="3">
<input id="txtTCLCUID" name="TCLCUID" class="easyui-validatebox textbox text"
data-options="validType:length[0,200]" value="<%: Model.TCLCUID %>" placeholder="<%: Html.Language("Flag1")%>" style="width:416px;" />
</td>
</tr>
<tr>
<th>
<label for="txtTCLCUID">
HuaWei CUID</label>
</th>
<td colspan="3">
<input id="txtHuaWeiCUID" name="HuaWeiCUID" class="easyui-validatebox textbox text"
data-options="validType:length[0,200]" value="<%: Model.HuaWeiCUID %>" placeholder="<%: Html.Language("Flag1")%>" style="width:416px;" />
</td>
</tr>
<tr>
<th>
<label for="txtRokidWebhookUrl">
Rokid Webhook</label>
</th>
<td colspan="3">
<input id="txtRokidWebhookUrl" name="RokidWebhookUrl" class="easyui-validatebox textbox text"
data-options="validType:length[0,200]" value="<%: Model.RokidWebhookUrl %>" style="width:416px;" />
</td>
</tr>--%>
</table>
</form>
<script type="">
$(function () {
if ($("#txtAccount").val() == "admin" || $("#txtAccount").val() == "blw") {
$("#cbxHotels").attr("readonly", false);
}
else {
$("#cbxHotels").attr("readonly", true);
}
});
</script>

View File

@@ -0,0 +1,33 @@
<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<Domain.Host>" %>
<style type="text/css">
#roomCardForm table th
{
font-weight: normal;
text-align: right;
}
</style>
<form id="hostForm" class="easyui-form" method="post" data-options="novalidate:true">
<input type="hidden" name="ID" value="<%: Model.ID %>" />
<table style="margin: 1px auto;" cellpadding="1">
<tr>
<th align="right">
<label for="txtRoomNumber">
<%: Html.Language("RoomNumber") %></label>
</th>
<td>
<input id="txtRoomNumber" name="RoomNumber" class="easyui-validatebox textbox text" readonly="readonly"
value="<%: Model.RoomNumber %>" />
</td>
</tr>
<tr>
<th align="right">
<label for="txtExpireTime">
<%: Html.Language("ExpireTime")%></label>
</th>
<td>
<input id="txtExpireTime" name="ExpireTime" class="easyui-datetimebox" data-options="required:true,editable:false"
value="<%: Model.ExpireTime == null ? "" : Convert.ToDateTime(Model.ExpireTime).ToString("yyyy-MM-dd HH:mm:ss") %>" />
</td>
</tr>
</table>
</form>

View File

@@ -0,0 +1,202 @@
<%@ 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("HostManagement") %>
</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">
<div class="toolbar">
<div>
<label>
<%: Html.Language("RoomNumber")%></label>
<input id="txtRoomNumber" class="easyui-validatebox" style="width: 60px;" />
<select id="cbxIsSyncRoomNumber" class="easyui-combobox" style="width: 60px;" data-options="panelHeight: 'auto',editable: false,onSelect:groupTreeOnSelectForInfo">
<option value='2'>
<%: Html.Language("All")%></option>
<option value='1' selected="selected">
<%: Html.Language("Sync")%></option>
<option value='0'>
<%: Html.Language("NoSync")%></option>
</select>
<label>
MAC</label>
<input id="txtMac" class="easyui-validatebox" style="width: 120px;" />
<label>
<%: Html.Language("RoomType")%></label>
<input id="txtRoomType" class="easyui-validatebox" style="width: 60px;" />
<a href="javascript:void(0)" class="toolbar-button tb-icon-search" onclick="groupTreeOnSelectForInfo();">
<%: Html.Language("Query")%></a>
<%--<a href="javascript:void(0)" class="toolbar-button tb-icon-relation" onclick="syncInfo()">
<%: Html.Language("SyncInfo")%></a>--%>
</div>
</div>
</div>
<div title="" style="border-right: 1px solid #95B8E7;" data-options="region:'center',border:false">
<table id="dg" class="easyui-datagrid" style="width: 100%;" data-options="
border: false,
singleSelect: false,
pagination: true,
pageSize: 200,
pageList: [30, 50, 100, 200],
rownumbers: true,
sortName: 'RegisterDate',
sortOrder: 'desc',
fit: true,
fitColumns: true,
striped: false,
idField: 'ID',
frozenColumns: [[{ field: 'ID', checkbox: true }]],
method: 'POST',
rowStyler:function(index, row){if(row.Flag==0){return 'background-color:LightBlue;color:black;';}}
">
<thead>
<tr>
<th data-options="field:'Type',sortable:true,align:'center'">
类型
</th>
<th data-options="field:'HotelCode',sortable:true,align:'center'">
编码
</th>
<th data-options="field:'RoomType',sortable:true">
<%: Html.Language("RoomType") %>
</th>
<th data-options="field:'RoomNumber',sortable:true,align:'center'">
<%: Html.Language("RoomNumber") %>
</th>
<th data-options="field:'MAC',sortable:true">
MAC
</th>
<th data-options="field:'IPType',sortable:true,align:'center'">
<%: Html.Language("IPType")%>
</th>
<th data-options="field:'LanIP',sortable:true">
主机IP
</th>
<th data-options="field:'RoomStatus'">
<%: Html.Language("RoomStatus")%>
</th>
<th data-options="field:'TypeNumber',sortable:true,align:'center'">
机型编码
</th>
<th data-options="field:'Version',sortable:true">
固件APP版本
</th>
<th data-options="field:'ConfigVersion',sortable:true">
<%: Html.Language("ConfigVersion") %>
</th>
<th data-options="field:'HotelName',sortable:true">
配置酒店名称
</th>
<th data-options="field:'RoomTypeRemark',sortable:true">
配置房型名称
</th>
<th data-options="field:'HostID',sortable:true">
房号ID
</th>
<th data-options="field:'RoomTypeID',sortable:true">
房型ID
</th>
<th data-options="field:'LanPort',sortable:true">
<%: Html.Language("Port")%>
</th>
<th data-options="field:'Gateway',sortable:true">
<%: Html.Language("Gateway")%>
</th>
<th data-options="field:'SubnetMask',sortable:true">
<%: Html.Language("SubnetMask")%>
</th>
<th data-options="field:'DNS',sortable:true">
DNS
</th>
<th data-options="field:'ServerIP',sortable:true">
<%: Html.Language("ServerIP")%>
</th>
<th data-options="field:'RunTime',sortable:true">
主机时间
</th>
<th data-options="field:'Season',sortable:true">
<%: Html.Language("Season")%>
</th>
<th data-options="field:'LockStatus',sortable:true">
锁定
</th>
<th data-options="field:'ExpireTime',sortable:true">
<%: Html.Language("ExpireTime")%>
</th>
<th data-options="field:'SetExpireTime',sortable:true">
<%: Html.Language("SetExpireTime")%>
</th>
<th data-options="field:'Core',sortable:true">
Core
</th>
<th data-options="field:'Model',sortable:true">
<%: Html.Language("Model")%>
</th>
<th data-options="field:'Launcher',sortable:true">
Launcher
</th>
<th data-options="field:'UpdateTime',sortable:true">
同步时间
</th>
<th data-options="field:'Remark'">
<%: Html.Language("Remark") %>
</th>
</tr>
</thead>
</table>
</div>
<div style="width: 270px; border-left: 1px solid #95B8E7;" data-options="
region: 'east',
split: true,
border: false
">
<div class="easyui-layout" data-options="fit:true">
<div data-options="region:'center',border:false">
<table id="groupTree" class="easyui-treegrid" data-options="
url: '/Group/LoadGroupTree/',
method: 'post',
idField: 'ID',
treeField: 'Name',
fit: true,
fitColumns: true,
animate: true,
border: false,
bodyCls: 'easyui-treegrid-no-icon',
loadMsg: '<%: Html.Language("Loading") %>',
onLoadSuccess: function (row, data) {if (data[0] != null) {$('#groupTree').treegrid('select', data[0].ID);}},
onSelect: groupTreeOnSelectForInfo
">
<thead>
<tr>
<th data-options="field:'Name',width:160">
<%: Html.Language("Name") %>
</th>
<th data-options="field:'Sort',align:'center',width:40">
<%: Html.Language("Sort") %>
</th>
</tr>
</thead>
</table>
</div>
</div>
</div>
</div>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ScriptContent" runat="server">
<script src="/Scripts/group.js" type="text/javascript"></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;
} %>
<script src="/Scripts/host-index.js" type="text/javascript"></script>
</asp:Content>

View File

@@ -0,0 +1,248 @@
<%@ Page Language="C#" MasterPageFile="~/Views/Shared/MasterPage.Master" Inherits="System.Web.Mvc.ViewPage<dynamic>" %>
<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
<%: Html.Language("HostManagement") %>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
<div class="easyui-layout" data-options="fit:true">
<div title="<%: Html.Language("HostManagement") %>" style="border-right:1px solid #95B8E7;" data-options="region:'center',border:false">
<table id="dg" class="easyui-datagrid" style="width:100%; height:auto;"
data-options="
toolbar: '#tbHost',
border: false,
singleSelect: false,
pagination: true,
pageSize: 20,
rownumbers: true,
sortName: 'HostNumber',
sortOrder: 'asc',
fit: true,
fitColumns: true,
striped: true,
idField: 'ID',
frozenColumns: [[
{ field: 'ID', checkbox: true }
]],
url: '/Host/LoadAllByPage/',
method: 'post',
onDblClickRow: function(index, row) { edit(row); }
">
<thead>
<tr>
<th data-options="field:'HostNumber',sortable:true,align:'center'">
<%: Html.Language("ID")%>
</th>
<th data-options="field:'RoomNumber',sortable:true,align:'center'">
<%: Html.Language("RoomNumber") %>
</th>
<th data-options="field:'IP',sortable:true">
<%: Html.Language("IP")%>
</th>
<th data-options="field:'MAC',sortable:true">
<%: Html.Language("MAC")%>
</th>
<th data-options="field:'GroupName',sortable:true">
<%: Html.Language("Group") %>
</th>
<th data-options="field:'RoomType',sortable:true">
<%: Html.Language("RoomType") %>
</th>
<th data-options="field:'Version',sortable:true">
<%: Html.Language("Version") %>
</th>
<th data-options="field:'RegisterDate',sortable:true,formatter:$.tools.formatDateTime">
<%: Html.Language("RegistrationDate")%>
</th>
<th data-options="field:'Remark',width:100">
<%: Html.Language("Remark") %>
</th>
</tr>
</thead>
</table>
</div>
<div title=" <%: Html.Language("Group") %>" style="width:200px;border-left:1px solid #95B8E7;" data-options="region:'east',split:true,border:false">
<table id="groupTree" class="easyui-treegrid"
data-options="
toolbar: '#tbGroup',
url: '/Group/LoadGroupTree/',
method: 'post',
idField: 'ID',
treeField: 'Name',
fit: true,
fitColumns: true,
animate: true,
border: false,
bodyCls: 'easyui-treegrid-no-icon',
loadMsg: lang.LoadingData,
onSelect: groupTreeOnSelect
">
<thead>
<tr>
<th data-options="field:'Name',width:160"><%: Html.Language("Name") %></th>
<th data-options="field:'Sort',align:'center',width:40"><%: Html.Language("Sort")%>></th>
</tr>
</thead>
</table>
</div>
</div>
<div id="tbHost">
<a href="javascript:void(0)" class="easyui-linkbutton" data-options="iconCls:'icon-reload',plain:true" onclick="$('#dg').datagrid('reload');"><%: Html.Language("Refresh")%></a>
<a href="javascript:void(0)" class="easyui-linkbutton" data-options="iconCls:'icon-search',plain:true" onclick="hostSearcher.open()"><%: Html.Language("Search")%></a>
<a href="javascript:void(0)" class="easyui-linkbutton" data-options="iconCls:'icon-add',plain:true" onclick="add()"><%: Html.Language("New")%></a>
<a href="javascript:void(0)" class="easyui-linkbutton" data-options="iconCls:'icon-edit',plain:true" onclick="edit()"><%: Html.Language("Edit")%></a>
<a href="javascript:void(0)" class="easyui-linkbutton" data-options="iconCls:'icon-remove',plain:true" onclick="delHost()"><%: Html.Language("Delete")%></a>
<a href="/Host/ExportExcel/" class="easyui-linkbutton" data-options="iconCls:'icon-export',plain:true" target="_blank"><%: Html.Language("Export")%></a>
<a href="javascript:void(0)" class="easyui-linkbutton" data-options="iconCls:'icon-networksetting',plain:true" onclick="networkSetting()"><%: Html.Language("NetworkSettings")%></a>
<% if ((bool)ViewData["EnableDataUpgrade"]) { %>
<a href="javascript:void(0)" class="easyui-linkbutton" data-options="iconCls:'icon-upgrade',plain:true" onclick="updateHost()"><%: Html.Language("DataUpgrade")%></a>
<% } %>
</div>
<div id="editHost" class="easyui-window" title="<%: Html.Language("NewHost") %>" style="width:600px; height:400px;"
data-options="
closed: true,
modal: true,
collapsible: false,
minimizable: false,
maximizable: false
">
<table id="dgSearchHost"></table>
<div id="editHostToolbar">
<a id="searchHost" href="javascript:void(0)" class="easyui-linkbutton" data-options="iconCls:'icon-search',plain:true" onclick="hostSearcher.start()"><%: Html.Language("SearchHost")%></a>
<a href="javascript:void(0)" class="easyui-linkbutton" data-options="iconCls:'icon-add',plain:true" onclick="registerHost()"><%: Html.Language("Registered")%></a>
</div>
</div>
<div id="updateHost" title='<%: Html.Language("HostUpgrade")%>' class="easyui-window" style="width:700px;height:400px;"
data-options="
closed: true,
modal: true,
collapsible: false,
minimizable: false,
maximizable: false
">
<div class="easyui-layout" fit="true">
<div style="border-right:1px solid #95B8E7;" data-options="region:'center',border:false">
<table id="dgUpdateHost" class="easyui-datagrid" style="width:100%; height:auto;"
data-options="
toolbar: '#tbUpdateHost',
border: false,
singleSelect: false,
pagination: true,
pageSize: 20,
rownumbers: true,
sortName: 'UploadTime',
sortOrder: 'desc',
fit: true,
fitColumns: true,
idField: 'ID',
singleSelect: true,
frozenColumns: [[
{ field: 'ID', checkbox: true }
]],
url: '/HostUpdate/LoadAllByPage/',
onSelect: dgUpdateHostOnSelect,
method: 'POST',
">
<thead>
<tr>
<th data-options="field:'FileName',width:100,sortable:true">
<%: Html.Language("UpgradePackageName")%>
</th>
<th data-options="field:'Size',width:40,sortable:true,formatter:function(value){ return (value / 1024.0 / 1024.0).toFixed(2); }">
<%: Html.Language("Size")%>(MB)
</th>
<th data-options="field:'UploadTime',width:60,sortable:true,formatter:$.tools.formatDate">
<%: Html.Language("UploadDate")%>
</th>
<th data-options="field:'Account',width:60,sortable:true">
<%: Html.Language("UploadPeople")%>
</th>
</tr>
</thead>
</table>
</div>
<div title="'<%:Html.Language("RoomHost") %>'" style="width:200px;border-left:1px solid #95B8E7;" data-options="region:'east',border:false,split:true">
<ul id="groupTree2" class="easyui-tree" data-options="checkbox:true,animate:true,lines:true,url:'/HostUpdate/LoadGroupTreeWithRoom/'"></ul>
</div>
</div>
</div>
<div id="tbUpdateHost">
<a href="javascript:void(0)" class="easyui-linkbutton" data-options="iconCls:'icon-upload',plain:true" onclick="$('#uploadForm').form('reset');$('#uploadFile').window('open')"><%: Html.Language("Upload")%></a>
<a href="javascript:void(0)" class="easyui-linkbutton" data-options="iconCls:'icon-remove',plain:true" onclick="delHostUpdate()"><%: Html.Language("Delete")%></a>
<a href="javascript:void(0)" class="easyui-linkbutton" data-options="iconCls:'icon-update',plain:true" onclick="update()"><%: Html.Language("ReleaseUpgrade")%></a>
</div>
<div id="uploadFile" title="'<%: Html.Language("UploadUpdatePackage")%>'" class="easyui-window" style="width:400px;height:150px;padding:5px;"
data-options="
closed: true,
modal: true,
collapsible: false,
minimizable: false,
maximizable: false
">
<div class="easyui-layout" fit="true">
<div style="padding-top:25px;text-align:center;" data-options="region:'center'">
<form id="uploadForm" method="post" enctype="multipart/form-data">
<input class="easyui-filebox" id="uf" name="file" style="width:90%;" data-options="buttonText:'<%: Html.Language("SelectUpgradePack")%>'" />
</form>
</div>
<div data-options="region:'south',border:false" style="text-align: right; padding: 5px 0 0;">
<a class="easyui-linkbutton" data-options="iconCls:'icon-save'" href="javascript:void(0)" onclick="uploadFile();"><%: Html.Language("Upload")%></a>
<a class="easyui-linkbutton" data-options="iconCls:'icon-cancel'" href="javascript:void(0)" onclick="$('#uploadFile').window('close');"><%: Html.Language("Cancel")%></a>
</div>
</div>
</div>
<div id="tbGroup">
<a href="javascript:void(0)" class="easyui-linkbutton" data-options="iconCls:'icon-add',plain:true" onclick="group.add()"><%: Html.Language("New")%></a>
<a href="javascript:void(0)" class="easyui-linkbutton" data-options="iconCls:'icon-edit',plain:true" onclick="group.edit()"><%: Html.Language("Edit")%></a>
<a href="javascript:void(0)" class="easyui-linkbutton" data-options="iconCls:'icon-remove',plain:true" onclick="group.del()"><%: Html.Language("Delete")%></a>
</div>
<div id="dialog" class="easyui-window" style="padding: 5px;"
data-options="
closed: true,
modal: true,
collapsible: false,
minimizable: false,
maximizable: false
">
<div class="easyui-panel dlg-content" style="margin-bottom:5px;"></div>
<div class="dlg-footer" style="text-align:right; padding:5px 5px 0 0;">
<a class="easyui-linkbutton dlg-btn-save" data-options="iconCls:'icon-save'" href="javascript:void(0)"><%: Html.Language("Save")%></a>
<a class="easyui-linkbutton dlg-btn-cancel" data-options="iconCls:'icon-cancel'" href="javascript:void(0)" onclick="$('#dialog').window('close');"><%: Html.Language("Cancel")%></a>
</div>
</div>
<div id="dialog2" class="easyui-window" style="padding: 5px;"
data-options="
closed: true,
modal: true,
collapsible: false,
minimizable: false,
maximizable: false
">
<div class="easyui-panel dlg-content" style="margin-bottom:5px;"></div>
</div>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ScriptContent" runat="server">
<script src="/Scripts/group.js" type="text/javascript"></script>
<script src="/Scripts/host-index.js" type="text/javascript"></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; } %>
</asp:Content>

View File

@@ -0,0 +1,33 @@
<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<dynamic>" %>
<style type="text/css">
#networkSettingForm table {
margin: 10px auto;
}
#networkSettingForm table th {
font-weight: normal;
text-align: right;
cursor: default;
}
</style>
<form id="networkSettingForm">
<table cellpadding="5">
<tr>
<th><%: Html.Language("IP")%></th>
<td><input name="IP" title= '<%: Html.Language("IPAddressFirstTwoDuanYouxiao")%>' class="easyui-validatebox textbox text" style="width:110px;" data-options="required:true" value="192.168.0.0" /></td>
</tr>
<tr>
<th><%: Html.Language("SubnetMask")%></th>
<td><input name="SubnetMask" class="easyui-validatebox textbox text" style="width:110px;" data-options="required:true" value="255.0.0.0" /></td>
</tr>
<tr>
<th><%: Html.Language("Gateway")%></th>
<td><input name="Gateway" class="easyui-validatebox textbox text" style="width:110px;" data-options="required:true" value="192.168.1.1" /></td>
</tr>
<tr>
<th><%: Html.Language("Port")%></th>
<td><input name="Port" class="easyui-validatebox textbox text" style="width:110px;" data-options="required:true" value="3341" /></td>
</tr>
</table>
</form>

View File

@@ -0,0 +1,152 @@
<%@ 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("HostManagement") %>
</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="overflow:hidden;height:30px;">
<div class="toolbar">
<label>
<%: Html.Language("RoomNumber")%></label>
<input id="txtRoomNumber" class="easyui-validatebox" style="width: 60px;" />
<select id="cbxIsSyncRoomNumber" class="easyui-combobox" style="width:60px;" data-options="panelHeight: 'auto',editable: false">
<option value='2'><%: Html.Language("Sync")%></option>
<option value='1' selected="selected"><%: Html.Language("Yes")%></option>
<option value='0'><%: Html.Language("No")%></option>
</select>
<label>MAC</label>
<input id="txtMac" class="easyui-validatebox" style="width: 120px;" />
<label>
<%: Html.Language("RoomType")%></label>
<input id="txtRoomType" class="easyui-validatebox" style="width: 60px;" />
<a href="javascript:void(0)" class="toolbar-button tb-icon-search" onclick="groupTreeOnSelect(null);"><%: Html.Language("Query")%></a>
<a href="javascript:void(0)" class="toolbar-button tb-icon-password" onclick="getKey()"><%: Html.Language("GetKey")%></a>
<a href="javascript:void(0)" class="toolbar-button tb-icon-apply" onclick="publishKey()"><%: Html.Language("PublishKey")%></a>
<a href="javascript:void(0)" class="toolbar-button tb-icon-password" onclick="getHostKey()"><%: Html.Language("GetHostKey")%></a>
</div>
</div>
<div title="" style="border-right:1px solid #95B8E7;" data-options="region:'center',border:false">
<table id="dg" class="easyui-datagrid" style="width:100%;"
data-options="
border: false,
singleSelect: false,
pagination: true,
pageSize: 200,
pageList: [30, 50, 100, 200],
rownumbers: true,
sortName: 'RegisterDate',
sortOrder: 'desc',
fit: true,
fitColumns: true,
striped: true,
idField: 'ID',
frozenColumns: [[
{ field: 'ID', checkbox: true }
]],
method: 'POST',
onDblClickRow: function(index, row) { edit(row); }
">
<thead>
<tr>
<th data-options="field:'HostNumber',sortable:true,align:'center'">
<%: Html.Language("ID") %>
</th>
<th data-options="field:'RoomNumber',sortable:true,align:'center'">
<%: Html.Language("RoomNumber") %>
</th>
<th data-options="field:'DeviceName'">
<%: Html.Language("DeviceName")%>
</th>
<th data-options="field:'DeviceSecret'">
<%: Html.Language("DeviceSecret")%>
</th>
<th data-options="field:'IsPublish',align:'center',formatter:function(val,rec){return val ? lang.Yes : lang.No;}">
<%: Html.Language("Publish")%>
</th>
<th data-options="field:'HostSecret'">
<%: Html.Language("HostSecret")%>
</th>
<th data-options="field:'MAC',sortable:true">
<%: Html.Language("MAC")%>
</th>
<th data-options="field:'GroupName',sortable:true">
<%: Html.Language("Group") %>
</th>
<th data-options="field:'RoomType',sortable:true">
<%: Html.Language("RoomType") %>
</th>
<%--<th data-options="field:'Version',sortable:true">
<%: Html.Language("Version") %>
</th>--%>
<%--<th data-options="field:'ConfigVersion',sortable:true">
<%: Html.Language("ConfigVersion") %>
</th>--%>
<th data-options="field:'RegisterDate',sortable:true">
<%: Html.Language("RegistrationDate")%>
</th>
<%--<th data-options="field:'IP',sortable:true">
<%: Html.Language("IP")%>
</th>--%>
<th data-options="field:'Remark'">
<%: Html.Language("Remark") %>
</th>
<th data-options="field:'ProductKey'">
<%: Html.Language("ProductKey")%>
</th>
<th data-options="field:'IotId'">
IotId
</th>
</tr>
</thead>
</table>
</div>
<div style="width:270px;border-left:1px solid #95B8E7;" data-options="region:'east',split: true,border: false">
<div class="easyui-layout" data-options="fit:true">
<div data-options="region:'center',border:false">
<table id="groupTree" class="easyui-treegrid"
data-options="
url: '/Group/LoadGroupTree/',
method: 'post',
idField: 'ID',
treeField: 'Name',
fit: true,
fitColumns: true,
animate: true,
border: false,
bodyCls: 'easyui-treegrid-no-icon',
loadMsg: '<%: Html.Language("Loading") %>',
onLoadSuccess: function (row, data) {if (data[0] != null) {$('#groupTree').treegrid('select', data[0].ID);}},
onSelect: groupTreeOnSelect
">
<thead>
<tr>
<th data-options="field:'Name',width:160"><%: Html.Language("Name") %></th>
<th data-options="field:'Sort',align:'center',width:40"><%: Html.Language("Sort") %></th>
</tr>
</thead>
</table>
</div>
</div>
</div>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ScriptContent" runat="server">
<style type="text/css">
#uploadForm table th {
font-weight: normal;
cursor: default;
}
</style>
<script src="/Scripts/group.js" type="text/javascript"></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; } %>
<script src="/Scripts/host-index.js" type="text/javascript"></script>
</asp:Content>

View File

@@ -0,0 +1,683 @@
<%@ 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("HostManagement") %>
</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">
<div class="toolbar" style="height: 65px;">
<div>
<label>
<%: Html.Language("RoomNumber")%></label>
<input id="txtRoomNumber" class="easyui-validatebox" style="width: 60px;" />
<select id="cbxIsSyncRoomNumber" class="easyui-combobox" style="width: 60px;" data-options="panelHeight: 'auto',editable: false,onSelect:groupTreeOnSelect">
<option value='2'><%: Html.Language("All")%></option>
<option value='1' selected="selected"><%: Html.Language("Sync")%></option>
<option value='0'><%: Html.Language("NoSync")%></option>
</select>
<label>
MAC</label>
<input id="txtMac" class="easyui-validatebox" style="width: 120px;" />
<label>
<%: Html.Language("RoomType")%></label>
<input id="txtRoomType" class="easyui-validatebox" style="width: 60px;" />
<a href="javascript:void(0)" class="toolbar-button tb-icon-search" onclick="groupTreeOnSelect();">
<%: Html.Language("Query")%></a>
<%--<a href="javascript:void(0)" class="toolbar-button tb-icon-search" onclick="hostSearcher.open()"><%: Html.Language("Search")%></a>--%>
<a href="javascript:void(0)" class="toolbar-button tb-icon-add" onclick="add()">
<%: Html.Language("New") %></a>
<a href="javascript:void(0)" class="toolbar-button tb-icon-edit" onclick="edit()">
<%: Html.Language("Edit") %></a>
<a href="javascript:void(0)" class="toolbar-button tb-icon-remove" onclick="delHost()">
<%: Html.Language("Delete") %></a>
<a href="javascript:void(0)" class="toolbar-button tb-icon-import" onclick="$('#formImportHosts').form('reset');$('#importHosts').window('open')">
<%: Html.Language("Import")%></a>
<a href="/Host/ExportExcel/" class="toolbar-button tb-icon-export" target="_blank"> <%: Html.Language("Export")%></a>
<a href="javascript:void(0)" class="toolbar-button tb-icon-network" onclick="toolSync()">工具同步</a>
</div>
<div>
<%--<a href="javascript:void(0)" class="toolbar-button tb-icon-apply" onclick="publishInfo()"><%: Html.Language("PublishInfo")%></a>--%>
<% if ((bool)ViewData["AUTHORITY_HostAuthority"])
{ %>
<a href="javascript:void(0)" class="toolbar-button tb-icon-password" onclick="hostAuthorization()">
<%: Html.Language("HostAuthorization")%></a>
<% } if ((bool)ViewData["EnableDataUpgrade"])
{ %>
<a href="javascript:void(0)" class="toolbar-button tb-icon-upgrade" onclick="updateHost()">
通用升级</a>
<% } if ((bool)ViewData["AUTHORITY_CHostUpgrade"])
{ %>
<a href="javascript:void(0)" class="toolbar-button tb-icon-upgrade" onclick="updateHostC()">
C系列升级</a>
<% } %>
<a href="javascript:void(0)" class="toolbar-button tb-icon-apply" onclick="smartVoiceBinding()">
<%: Html.Language("SmartVoiceBinding")%></a> <a href="javascript:void(0)" class="toolbar-button tb-icon-network"
onclick="dockingInfo()">
<%: Html.Language("DockingInformation")%></a>
<% if ((bool)ViewData["AUTHORITY_MACAuthority"])
{ %>
<a href="javascript:void(0)" class="toolbar-button tb-icon-search" onclick="macSearch()">
MAC查询</a>
<!--添加一个生成主机编号的功能-->
<a href="javascript:void(0)" class="toolbar-button tb-icon-upgrade" onclick="generichostnumber()"> 生成主机编号</a>
<a href="javascript:void(0)" class="toolbar-button tb-icon-network" onclick="getrcuinfocmd()"> 获取主机信息</a>
<% } %>
</div>
</div>
</div>
<div title="" style="border-right: 1px solid #95B8E7;" data-options="region:'center',border:false">
<table id="dg" class="easyui-datagrid" style="width: 100%;" data-options="
border: false,
singleSelect: true,
pagination: true,
pageSize: 150,
pageList: [100, 150, 200, 500],
rownumbers: true,
sortName: 'RegisterDate',
sortOrder: 'desc',
fit: true,
fitColumns: true,
striped: true,
idField: 'ID',
frozenColumns: [[
{ field: 'ID', checkbox: true }
]],
method: 'POST',
onDblClickRow: function(index, row) { edit(row); }
">
<thead>
<tr>
<th data-options="field:'HostNumber',sortable:true,align:'center'">
<%: Html.Language("ID") %>
</th>
<th data-options="field:'Code',sortable:true,align:'center'">
<%: Html.Language("Code")%>
</th>
<th data-options="field:'RoomNumber',sortable:true,align:'center'">
<%: Html.Language("RoomNumber") %>
</th>
<th data-options="field:'MAC',sortable:true">
<%: Html.Language("MAC")%>
</th>
<th data-options="field:'GroupName',sortable:true">
<%: Html.Language("Group") %>
</th>
<th data-options="field:'RoomType',sortable:true">
<%: Html.Language("RoomType") %>
</th>
<th data-options="field:'IPType',sortable:true,align:'center'">
<%: Html.Language("IPType")%>
</th>
<th data-options="field:'IP',sortable:true">
<%: Html.Language("IP")%>
</th>
<th data-options="field:'Port',sortable:true">
<%: Html.Language("Port")%>
</th>
<th data-options="field:'Version',sortable:true">
固件APP版本
</th>
<th data-options="field:'LanIP',sortable:true">
<%: Html.Language("LanIP")%>
</th>
<th data-options="field:'LanPort',sortable:true">
<%: Html.Language("LanPort")%>
</th>
<th data-options="field:'SubnetMask',sortable:true">
<%: Html.Language("SubnetMask")%>
</th>
<th data-options="field:'Gateway',sortable:true">
<%: Html.Language("Gateway")%>
</th>
<th data-options="field:'DNS',sortable:true">
DNS
</th>
<th data-options="field:'Season',sortable:true">
<%: Html.Language("Season")%>
</th>
<th data-options="field:'ServerIP',sortable:true">
<%: Html.Language("ServerIP")%>
</th>
<th data-options="field:'ServerPort',sortable:true">
<%: Html.Language("ServerPort")%>
</th>
<%-- <th data-options="field:'Version',sortable:true">
固件APP版本
</th>--%>
<th data-options="field:'ConfigVersion',sortable:true">
<%: Html.Language("ConfigVersion") %>
</th>
<th data-options="field:'Model',sortable:true">
<%: Html.Language("Model")%>
</th>
<th data-options="field:'Launcher',sortable:true">
Launcher
</th>
<th data-options="field:'IsSyncRoomNumber',align:'center',formatter:function(val,rec){return val ? lang.Yes : lang.No;}">
<%: Html.Language("IsSyncRoomNumber")%>
</th>
<th data-options="field:'IsAutoUpdate',align:'center',formatter:function(val,rec){return val ? lang.Yes : lang.No;}">
<%: Html.Language("IsAutoUpdate")%>
</th>
<th data-options="field:'RegisterDate',sortable:true">
<%: Html.Language("RegistrationDate")%>
</th>
<th data-options="field:'ExpireTime',sortable:true">
<%: Html.Language("ExpireTime")%>
</th>
<th data-options="field:'SetExpireTime',sortable:true">
<%: Html.Language("SetExpireTime")%>
</th>
<th data-options="field:'Remark'">
<%: Html.Language("Remark") %>
</th>
<th data-options="field:'XiaoDuCUID'">
小度CUID
</th>
<th data-options="field:'TianMaoCUID'">
天猫精灵CUID
</th>
<th data-options="field:'TCLCUID'">
TCL CUID
</th>
<th data-options="field:'HuaWeiCUID'">
华为CUID
</th>
<th data-options="field:'RokidWebhookUrl'">
若琪Webhook Url
</th>
</tr>
</thead>
</table>
</div>
<div style="width: 270px; border-left: 1px solid #95B8E7;" data-options="region: 'east',split: true,border: false">
<div class="easyui-layout" data-options="fit:true">
<div data-options="region:'north',border:false" style="overflow: hidden;">
<div class="toolbar">
<a href="javascript:void(0)" class="toolbar-button tb-icon-add" onclick="group.add()">
<%: Html.Language("New") %></a> <a href="javascript:void(0)" class="toolbar-button tb-icon-edit"
onclick="group.edit()">
<%: Html.Language("Edit") %></a> <a href="javascript:void(0)" class="toolbar-button tb-icon-remove"
onclick="group.del()">
<%: Html.Language("Delete") %></a>
</div>
</div>
<div data-options="region:'center',border:false">
<table id="groupTree" class="easyui-treegrid" data-options="
url: '/Group/LoadGroupTree/',
method: 'post',
idField: 'ID',
treeField: 'Name',
fit: true,
fitColumns: true,
animate: true,
border: false,
bodyCls: 'easyui-treegrid-no-icon',
loadMsg: '<%: Html.Language("Loading") %>',
onLoadSuccess: function (row, data) {if (data[0] != null) {$('#groupTree').treegrid('select', data[0].ID);}},
onSelect: groupTreeOnSelect
">
<thead>
<tr>
<th data-options="field:'Name',width:160">
<%: Html.Language("Name") %>
</th>
<th data-options="field:'Sort',align:'center',width:40">
<%: Html.Language("Sort") %>
</th>
</tr>
</thead>
</table>
</div>
</div>
</div>
</div>
<div id="importHosts" class="easyui-window" title='主机导入'
style="width: 400px; height: 180px; padding: 5px;" data-options="
closed: true,
modal: true,
collapsible: false,
minimizable: false,
maximizable: false
">
<div class="easyui-layout" fit="true">
<div style="padding-top: 25px;" data-options="region:'center'">
<form id="formImportHosts" method="post" enctype="multipart/form-data">
<table style="width: 100%;">
<tr>
<th>
<%: Html.Language("SelectingFiles")%>
</th>
<td>
<input class="easyui-filebox" id="txtImportHostExcelPath" name="file" style="width: 90%;" data-options="buttonText:lang.Browse" />
</td>
</tr>
</table>
</form>
</div>
<div data-options="region:'south',border:false" style="text-align: right; padding: 5px 0 0;">
<a class="easyui-linkbutton" data-options="iconCls:'icon-save'" href="javascript:void(0)"
onclick="importHosts();">
<%: Html.Language("Import")%></a> <a class="easyui-linkbutton" data-options="iconCls:'icon-cancel'"
href="javascript:void(0)" onclick="$('#importHosts').window('close');">
<%: Html.Language("Cancel")%></a>
</div>
</div>
</div>
<div id="divHostAuthorization" class="easyui-window" title='<%: Html.Language("HostAuthorization")%>'
style="width: 880px; height: 500px;" data-options="
closed: true,
modal: true,
collapsible: false,
minimizable: false,
maximizable: false
">
<div class="easyui-layout" fit="true">
<div data-options="region:'north',border:false">
<div class="toolbar">
<label>
<%: Html.Language("RoomType")%></label>
<input id="cbxRoomType1" class="easyui-combobox" style="width: 180px;" data-options="
url:'/RoomType/LoadRoomType/',
editable:false,
panelHeight:'200px',
valueField:'ID',
textField:'Name',
onSelect: cbxRoomTypeOnSelect1
" />
<label>
<%: Html.Language("ExpireTime")%></label>
<input id="txtExpireTime" name="ExpireTime" class="easyui-datetimebox" data-options="required:true,editable:false"
value="<%: DateTime.Now.AddYears(1).ToString("yyyy-MM-dd HH:mm:ss") %>" />
<a href="javascript:void(0)" class="easyui-linkbutton" data-options="iconCls:'icon-register',plain:true"
onclick="secureClick();">
<%: Html.Language("Secure")%></a> <a href="javascript:void(0)" class="easyui-linkbutton"
data-options="iconCls:'icon-upload',plain:true" onclick="saveHostAuthorization();">
<%: Html.Language("HostAuthorization")%></a> <a href="javascript:void(0)" class="easyui-linkbutton"
data-options="iconCls:'icon-update',plain:true" onclick="$('#tbHostAuthorization').datagrid('reload');">
<%: Html.Language("Refresh")%></a>
</div>
</div>
<div style="width: 842px; border-left: 1px solid #95B8E7;" data-options="region:'center',border:false,split:true">
<table id="tbHostAuthorization" class="easyui-datagrid" style="width: 100%;" data-options="
border: false,
singleSelect: false,
pagination: false,
rownumbers: true,
sortName: 'RoomNumber',
sortOrder: 'asc',
fit: true,
fitColumns: true,
striped: true,
idField: 'ID',
frozenColumns: [[
{ field: 'ID', checkbox: true }
]],
method: 'POST'
">
<thead>
<tr>
<th data-options="field:'RoomNumber',sortable:true,align:'center'">
<%: Html.Language("RoomNumber") %>
</th>
<th data-options="field:'Status',sortable:true,align:'center',formatter:function(val,rec){return val ? lang.Online : lang.Offline;}">
<%: Html.Language("Status")%>
</th>
<th data-options="field:'MAC',sortable:true">
<%: Html.Language("MAC")%>
</th>
<th data-options="field:'ExpireTime',sortable:true">
<%: Html.Language("ExpireTime")%>
</th>
<th data-options="field:'SetExpireTime',sortable:true">
<%: Html.Language("SetExpireTime")%>
</th>
</tr>
</thead>
</table>
</div>
</div>
</div>
<div id="updateHostC" class="easyui-window" title='<%: Html.Language("HostUpgrade")%>'
style="width: 1100px; height: 500px;" data-options="
closed: true,
modal: true,
collapsible: false,
minimizable: false,
maximizable: false
">
<div class="easyui-layout" fit="true">
<div data-options="region:'north',border:false">
<div class="toolbar" style="height: 66px;">
<label>
<%: Html.Language("RoomType")%></label>
<input id="cbxRoomType" class="easyui-combobox" style="width: 180px;" data-options="
url:'/RoomType/LoadRoomType/',
editable:false,
panelHeight:'200px',
valueField:'ID',
textField:'Name',
onSelect: cbxRoomTypeOnSelect
" />
<a id="btnGetFiles" href="javascript:void(0)" class="easyui-linkbutton" data-options="iconCls:'icon-excel',plain:true"
onclick="getUpdatedFile()">获取文件</a> <a href="javascript:void(0)" class="easyui-linkbutton"
data-options="iconCls:'icon-register',plain:true" onclick="publishInfo();">房型房号下发</a>
<br />
<label>
文件</label>
<input id="cbxFiles" class="easyui-combobox" style="width: 500px;" data-options="editable:false,panelHeight:'auto',valueField:'id',textField:'text'" />
<a href="javascript:void(0)" class="easyui-linkbutton" data-options="iconCls:'icon-update',plain:true"
onclick="updateC()">升级文件</a>
<a href="javascript:void(0)" class="easyui-linkbutton"
data-options="iconCls:'icon-upload',plain:true" onclick="stopUpgradeC()">停止刷新</a>
<a href="javascript:void(0)" class="easyui-linkbutton" data-options="iconCls:'icon-update',plain:true"
onclick="refreshUpdateStatusC()">强制刷新</a>
</div>
</div>
<!--阿宝添加的RCU升级功能在这里-->
<div style="width: 942px; border-left: 1px solid #95B8E7;" data-options="region:'center',border:false,split:true">
<input type="hidden" value="<%=Session["CurrentHotelID"] %>" id="CurrentHotelID"/>
<table id="tbHosts" class="easyui-datagrid" style="width: 100%;" data-options="
border: false,
singleSelect: false,
pagination: false,
rownumbers: true,
sortName: 'RoomNumber',
sortOrder: 'asc',
fit: true,
fitColumns: true,
striped: true,
idField: 'ID',
frozenColumns: [[
{ field: 'ID', checkbox: true }
]],
method: 'POST',
rowStyler: function(index,row)
{
console.log(row.Status);
if(!row.Status)
{
return 'background-color:#FF0000;color:#fff;font-weight:bold;';
}
}
">
<thead>
<tr>
<th data-options="field:'RoomNumber',sortable:true,align:'center'">
<%: Html.Language("RoomNumber") %>
</th>
<th data-options="field:'Status',sortable:true,align:'center',formatter:function(val,rec){return val ? lang.Online : lang.Offline;}">
<%: Html.Language("Status")%>
</th>
<th data-options="field:'MAC',sortable:true">
<%: Html.Language("MAC")%>
</th>
<th data-options="field:'Model',sortable:true">
<%: Html.Language("Model")%>
</th>
<th data-options="field:'Launcher',sortable:true">
Launcher
</th>
<th data-options="field:'Version',sortable:true">
固件APP版本
</th>
<th data-options="field:'ConfigVersion',sortable:true">
<%: Html.Language("ConfigVersion") %>
</th>
<th data-options="field:'ProgressBar',sortable:true">
下载进度
</th>
<th data-options="field:'UpgradeStatus',sortable:true,formatter:function(val,rec){ switch(val){case 0:return '升级就绪';case 1:return '升级成功';case 2:return '升级失败';default:return val;} }">
<%: Html.Language("UpgradeStatus")%>
</th>
<th data-options="field:'UpgradeTime',sortable:true">
<%: Html.Language("UpgradeTime")%>
</th>
</tr>
</thead>
</table>
</div>
</div>
</div>
<div id="updateHost" class="easyui-window" title='<%: Html.Language("HostUpgrade")%>'
style="width: 950px; height: 500px;" data-options="
closed: true,
modal: true,
collapsible: false,
minimizable: false,
maximizable: false
">
<div class="easyui-layout" fit="true">
<div style="border-right: 1px solid #95B8E7;" data-options="region:'center',border:false">
<table id="dgUpdateHost" class="easyui-datagrid" style="width: 100%; height: auto;"
data-options="
toolbar: '#updateHostToolbar',
border: false,
singleSelect: true,
pagination: true,
pageSize: 50,
rownumbers: true,
sortName: 'UploadTime',
sortOrder: 'desc',
fit: true,
fitColumns: true,
idField: 'ID',
frozenColumns: [[
{ field: 'ID', checkbox: true }
]],
url: '/HostUpdate/LoadAllByPage/',
onSelect: dgUpdateHostOnSelect,
method: 'post'
">
<thead>
<tr>
<th data-options="field:'FileName',width:120,sortable:true,formatter:$.tools.formatCellTooltip">
<%: Html.Language("UpgradePackageName")%>
</th>
<th data-options="field:'FileType',sortable:true,formatter:function(value){ switch(value) { case 0: return lang.FirmwareFile; case 1: return lang.ConfigurationFile; case 2: return lang.RCUFile; default: return ''; } }">
<%: Html.Language("DocumentType")%>
</th>
<th data-options="field:'Size',sortable:true,formatter:function(value){ return (value / 1024.0 / 1024.0).toFixed(2); }">
<%: Html.Language("Size")%>(MB)
</th>
<th data-options="field:'UploadTime',sortable:true,formatter:$.tools.formatDateTime">
<%: Html.Language("UploadDate")%>
</th>
<th data-options="field:'Account',sortable:true">
<%: Html.Language("UploadPeople")%>
</th>
<th data-options="field:'Href',sortable:true,formatter:downloadFile">
<%: Html.Language("Operation")%>
</th>
</tr>
</thead>
</table>
</div>
<div style="width: 250px; border-left: 1px solid #95B8E7;" data-options="region:'east',border:false,split:true">
<ul id="treeRoomType" class="easyui-tree" data-options="checkbox:true,animate:true,lines:true,url:'/HostUpdate/LoadRoomType/',onCheck:treeRoomTypeonCheck">
</ul>
<ul id="treeRoomNumber" class="easyui-tree" data-options="checkbox:true,animate:true,lines:true,url:'/HostUpdate/LoadGroupTreeWithRoom/'">
</ul>
</div>
</div>
<div id="updateHostToolbar" style="vertical-align: middle;">
<a href="javascript:void(0)" class="easyui-linkbutton" data-options="iconCls:'icon-upload',plain:true"
onclick="$('#uploadForm').form('reset');$('#uploadFile').window('open')">
<%: Html.Language("Upload")%></a> <a href="javascript:void(0)" class="easyui-linkbutton"
data-options="iconCls:'icon-remove',plain:true" onclick="delHostUpdate()">
<%: Html.Language("Delete")%></a> <span style="vertical-align: middle;">
<input type="radio" name="rd" value="1" checked="checked" />TFTP</span>
<a href="javascript:void(0)" class="easyui-linkbutton" data-options="iconCls:'icon-update',plain:true"
onclick="update()">
<%: Html.Language("ReleaseUpgrade")%></a>
</div>
</div>
<div id="uploadFile" class="easyui-window" title='<%: Html.Language("UploadUpdatePackage")%>'
style="width: 400px; height: 180px; padding: 5px;" data-options="
closed: true,
modal: true,
collapsible: false,
minimizable: false,
maximizable: false
">
<div class="easyui-layout" fit="true">
<div style="padding-top: 25px;" data-options="region:'center'">
<form id="uploadForm" method="post" enctype="multipart/form-data">
<table style="width: 100%;">
<tr>
<th>
<%: Html.Language("DocumentType")%>
</th>
<td>
<select id="cbxFileType" name="FileType" class="easyui-combobox" data-options="requried:true,editable:false,panelHeight:'auto'">
<option value="0">
<%: Html.Language("FirmwareFile")%>(*.bin)</option>
<option value="1">
<%: Html.Language("ConfigurationFile")%>(*.xml|*.dat)</option>
</select>
</td>
</tr>
<tr>
<th>
<%: Html.Language("SelectingFiles")%>
</th>
<td>
<input class="easyui-filebox" id="uf" name="file" style="width: 90%;" data-options="buttonText:lang.Browse" />
</td>
</tr>
</table>
</form>
</div>
<div data-options="region:'south',border:false" style="text-align: right; padding: 5px 0 0;">
<a class="easyui-linkbutton" data-options="iconCls:'icon-save'" href="javascript:void(0)"
onclick="uploadFile();">
<%: Html.Language("Upload")%></a> <a class="easyui-linkbutton" data-options="iconCls:'icon-cancel'"
href="javascript:void(0)" onclick="$('#uploadFile').window('close');">
<%: Html.Language("Cancel")%></a>
</div>
</div>
</div>
<div id="dialog" class="easyui-window" style="padding: 5px;" data-options="
closed: true,
modal: true,
collapsible: false,
minimizable: false,
maximizable: false
">
<div class="easyui-panel dlg-content" style="margin-bottom: 5px;">
</div>
<div class="dlg-footer" style="text-align: right; padding: 5px 5px 0 0;">
<a class="easyui-linkbutton dlg-btn-save" data-options="iconCls:'icon-save'" href="javascript:void(0)">
<%: Html.Language("Save") %></a> <a class="easyui-linkbutton dlg-btn-cancel" data-options="iconCls:'icon-cancel'"
href="javascript:void(0)" onclick="$('#dialog').window('close');">
<%: Html.Language("Cancel") %></a>
</div>
</div>
<div id="dialog2" class="easyui-window" style="padding: 5px;" data-options="
closed: true,
modal: true,
collapsible: false,
minimizable: false,
maximizable: false
">
<div class="easyui-panel dlg-content" style="margin-bottom: 5px;">
</div>
<div class="dlg-footer" style="text-align: right; padding: 5px 5px 0 0;">
<a class="easyui-linkbutton dlg-btn-save" data-options="iconCls:'icon-save'" href="javascript:void(0)">
<%: Html.Language("Issue")%></a> <a class="easyui-linkbutton dlg-btn-cancel" data-options="iconCls:'icon-cancel'"
href="javascript:void(0)" onclick="FoundDeviceList();">
<%: Html.Language("Cancel") %></a>
</div>
</div>
<div id="macSearch" class="easyui-window" title='MAC查询' style="width: 680px; height: 500px;"
data-options="
closed: true,
modal: true,
collapsible: false,
minimizable: false,
maximizable: false
">
<div class="easyui-layout" fit="true">
<div data-options="region:'north',border:false">
<div class="toolbar" style="height: 32px;">
<label>
MAC</label>
<input id="txtMACSearch" class="easyui-validatebox" style="width: 120px;" />
<a href="javascript:void(0)" class="toolbar-button tb-icon-search" onclick="loadMACSearch();">
<%: Html.Language("Query")%></a>
</div>
</div>
<div style="width: 842px; border-left: 1px solid #95B8E7;" data-options="region:'center',border:false,split:true">
<table id="tbMACSearch" class="easyui-datagrid" style="width: 100%;" data-options="
border: false,
singleSelect: false,
pagination: false,
rownumbers: true,
sortName: 'MAC',
sortOrder: 'asc',
fit: true,
fitColumns: true,
striped: true,
idField: 'ID',
method: 'POST'
">
<thead>
<tr>
<th data-options="field:'ID',sortable:true,align:'center'">
ID
</th>
<th data-options="field:'RoomNumber',sortable:true,align:'center'">
<%: Html.Language("RoomNumber") %>
</th>
<th data-options="field:'MAC',sortable:true">
<%: Html.Language("MAC")%>
</th>
<th data-options="field:'Name',sortable:true">
<%: Html.Language("Hotel1")%>
</th>
<th data-options="field:'Code',sortable:true,align:'center'">
<%: Html.Language("Code")%>
</th>
</tr>
</thead>
</table>
</div>
</div>
</div>
<script src="/Scripts/wssupgrade.js" type="text/javascript"></script>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ScriptContent" runat="server">
<style type="text/css">
#uploadForm table th
{
font-weight: normal;
cursor: default;
}
</style>
<script src="/Scripts/mqtt.min.js" type="text/javascript"></script>
<script src="/Scripts/group.js" type="text/javascript"></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;
} %>
<script src="/Scripts/host-index.js" type="text/javascript"></script>
</asp:Content>

View File

@@ -0,0 +1,137 @@
<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<Domain.Host>" %>
<style type="text/css">
#roomCardForm table th
{
font-weight: normal;
text-align: right;
}
</style>
<form id="hostForm" class="easyui-form" method="post" data-options="novalidate:true">
<input id="robotid" type="hidden" name="ID" value="<%: Model.ID %>" />
<input id="HostNumber" type="hidden" name="HostNumber" value="<%: Model.HostNumber %>" />
<table style="margin: 1px auto;" cellpadding="1">
<tr>
<th>
<label for="txtRoomNumber">
<%: Html.Language("RoomNumber") %></label>
</th>
<td>
<input id="txtRoomNumber" name="RoomNumber" class="easyui-validatebox textbox text"
readonly="readonly" value="<%: Model.RoomNumber %>" />
</td>
<th>
<label for="cbxRoomType1">
<%: Html.Language("RoomType") %></label>
</th>
<td>
<select id="cbxRoomType1" name="RoomTypeID" class="easyui-combobox" style="width: 180px;"
readonly="readonly" data-options="
valueField: 'ID',
textField: 'Name',
required: true,
panelHeight: '180px',
editable: false,
url: '/RoomType/LoadRoomType',
value: <%: Model.RoomType != null ? Model.RoomType.ID.ToString() : "''" %>
">
</select>
</td>
</tr>
<tr>
<th>
<label for="txtXiaoDuCUID">
小度CUID</label>
</th>
<td colspan="3">
<input id="txtXiaoDuCUID" name="XiaoDuCUID" class="easyui-validatebox textbox text"
data-options="validType:length[0,200]" value="<%: Model.XiaoDuCUID %>" placeholder="<%: Html.Language("Flag1")%>"
style="width: 416px;" />
</td>
</tr>
<tr>
<th>
<label for="txtTianMaoCUID">
天猫精灵CUID</label>
</th>
<td colspan="3">
<input id="txtTianMaoCUID" name="TianMaoCUID" class="easyui-validatebox textbox text"
data-options="validType:length[0,200]" value="<%: Model.TianMaoCUID %>" placeholder="<%: Html.Language("Flag1")%>"
style="width: 416px;" />
</td>
</tr>
<tr>
<th>
<label for="txtTCLCUID">
TCL CUID</label>
</th>
<td colspan="3">
<input id="txtTCLCUID" name="TCLCUID" class="easyui-validatebox textbox text" data-options="validType:length[0,200]"
value="<%: Model.TCLCUID %>" placeholder="<%: Html.Language("Flag1")%>" style="width: 416px;" />
</td>
</tr>
<tr>
<th>
<label for="txtTCLSkillID">
TCL SkillID</label>
</th>
<td colspan="3">
<input id="txtTCLSkillID" name="TCLSkillID" class="easyui-validatebox textbox text" data-options="validType:length[0,200]"
value="<%: Model.TCLSkillID %>" style="width: 416px;" />
</td>
</tr>
<tr>
<th>
<label for="txtTCLCUID">
华为CUID</label>
</th>
<td colspan="3">
<input id="txtHuaWeiCUID" name="HuaWeiCUID" class="easyui-validatebox textbox text"
data-options="validType:length[0,200]" value="<%: Model.HuaWeiCUID %>" placeholder="<%: Html.Language("Flag1")%>"
style="width: 416px;" />
</td>
</tr>
<tr>
<th>
<label for="txtHiWeiCUID">
Hi喂 CUID</label>
</th>
<td colspan="3">
<input id="txtHiWeiCUID" name="HiWeiCUID" class="easyui-validatebox textbox text"
data-options="validType:length[0,200]" value="<%: Model.HiWeiCUID %>" placeholder="<%: Html.Language("Flag1")%>"
style="width: 416px;" />
</td>
</tr>
<tr>
<th>
<label for="txtRokidWebhookUrl">
若琪Webhook</label>
</th>
<td colspan="3">
<input id="txtRokidWebhookUrl" name="RokidWebhookUrl" class="easyui-validatebox textbox text"
data-options="validType:length[0,200]" value="<%: Model.RokidWebhookUrl %>" style="width: 416px;" />
</td>
</tr>
<tr>
<th>
<label for="txtRokidWebhookUrl">
禁用欢迎词时段:</label>
</th>
<td colspan="3">
<input style="vertical-align:middle" id="IsWelcomeDisableTime_id" type="checkbox" name="IsWelcomeDisableTime"
<%
if(Model.IsWelcomeDisableTime)
{
%>
checked="checked"
<% } %>
/>
<input style="vertical-align:middle;" id="txtstarttime" name="DisableStartTime" class="easyui-timespinner"
labelposition="left" value="<%= Model.DisableStartTime %>" /> --
<input style="vertical-align:middle;" id="txtendtime" name="DisableEndTime" class="easyui-timespinner"
labelposition="left" value="<%= Model.DisableEndTime %>" />
</td>
</tr>
</table>
</form>

View File

@@ -0,0 +1,81 @@
<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/MasterPage.Master" Inherits="System.Web.Mvc.ViewPage<dynamic>" %>
<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
<%: Html.Language("BrushCardRecord")%>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
<div class="easyui-layout" data-options="fit:true">
<div title='<%: Html.Language("BrushCardRecord")%>' style="border-right:1px solid #95B8E7;" data-options="region:'center',border:false">
<table id="dg" class="easyui-datagrid" style="width:100%; height:auto;"
data-options="
toolbar: '#tb',
border: false,
pagination: true,
pageSize: 20,
rownumbers: true,
striped: true,
sortName: 'ID',
sortOrder: 'asc',
fit: true,
fitColumns: true,
idField: 'ID',
url: '/HostRoomCard/LoadAllByPage/',
method: 'post',
onDblClickRow: function(index, row) { edit(row); }
">
<thead>
<tr>
<th data-options="field:'RoomNumber'">
<%: Html.Language("RoomNumber")%>
</th>
<th data-options="field:'CardNumber',sortable:true">
<%: Html.Language("CardNumber")%>
</th>
<th data-options="field:'CardType',sortable:true">
<%: Html.Language("CardType")%>
</th>
<th data-options="field:'UserNumber',sortable:true">
<%: Html.Language("UserNumber")%>
</th>
<th data-options="field:'UserName',sortable:true">
<%: Html.Language("UserName")%>
</th>
<th data-options="field:'InCardTime',sortable:true,formatter:$.tools.formatDateTime">
<%: Html.Language("InCardTime")%>
</th>
<th data-options="field:'OutCardTime',sortable:true,formatter:$.tools.formatDateTime">
<%: Html.Language("OutCardTime")%>
</th>
<th data-options="field:'Duration',sortable:true">
<%: Html.Language("DurationMinute")%>
</th>
</tr>
</thead>
</table>
</div>
</div>
<div id="tb" style="position:relative;">
<span style="padding-left:5px;">
<%: Html.Language("RoomNumber")%><input id="txtRoomNumber" class="easyui-textbox" style="width:60px;" />
员工姓名:<input id="txtUserName" class="easyui-textbox" style="width:60px;" />
<a href="javascript:void(0)" class="easyui-linkbutton" data-options="iconCls:'icon-search',plain:true" onclick="query()"><%: Html.Language("Query")%></a>
<a href="/HostRoomCard/Export/" class="easyui-linkbutton" data-options="iconCls:'icon-excel',plain:true" target="_blank">导出</a>
</span>
<span style="position:absolute;right:10px;">
<a href="javascript:void(0)" class="easyui-linkbutton" data-options="iconCls:'icon-reload',plain:true" onclick="refresh()"><%: Html.Language("Refresh")%></a>
</span>
</div>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ScriptContent" runat="server">
<script type="text/javascript">
function refresh() {
$('#dg').datagrid('load', {});
$("#txtRoomNumber").textbox("reset");
}
function query() {
$('#dg').datagrid('reload', { roomNumber: $("#txtRoomNumber").val(), userName: $("#txtUserName").val() });
}
</script>
</asp:Content>

View File

@@ -0,0 +1,111 @@
<%@ 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("BrushCardRecord")%>
</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">
<div class="toolbar" style="height: 65px;">
<div>
<span style="padding-left:5px;">
<%: Html.Language("RoomNumber")%><input id="txtRoomNumber" class="easyui-combobox" style="width:80px;"
data-options="
url: '/Host/LoadDataForRoomNumberCombobox/',
editable:false,
panelHeight:'150',
valueField:'ID',
textField:'RoomNumber',
"/>&nbsp;
<%: Html.Language("CardType")%><input id="txtCardType" class="easyui-combobox" style="width:60px;"
data-options="
url:'/HostRoomCard/LoadDataForCardTypeCombobox/',
editable:false,
panelHeight:'auto',
valueField:'ID',
textField:'CardType',
value:-1
" />&nbsp;
<%: Html.Language("CardNumber")%><input id="txtCardNumber" class="easyui-combobox" style="width:80px;"
data-options="
url:'/HostRoomCard/LoadDataForCardNumberCombobox/',
required: false,
editable:false,
panelHeight:'150',
panelWidth:'150',
idField: 'ID',
valueField:'CardNumber',
textField:'Name'
" />&nbsp;
<a href="javascript:void(0)" class="toolbar-button tb-icon-search" onclick="query()"><%: Html.Language("Query")%></a>
<% if ((bool)ViewData["EnableDelData"]){ %>
<a href="javascript:void(0)" class="toolbar-button tb-icon-remove" onclick="dgDelete()"><%: Html.Language("Delete")%></a>
<a href="javascript:void(0)" class="toolbar-button tb-icon-clear" onclick="clearData()"><%: Html.Language("Empty")%></a>
<% } %>
<a href="/HostRoomCard/Export/" class="toolbar-button tb-icon-export" target="_blank"><%: Html.Language("Export")%></a>
</span>
<span style="position:absolute;right:10px;">
<a href="javascript:void(0)" class="toolbar-button tb-icon-refresh" onclick="refresh()"><%: Html.Language("Refresh") %></a>
</span>
</div>
<div>
<label><%: Html.Language("StartDate")%></label>
<input id="txtStartTime" type="text" class="easyui-datebox" style="width: 100px;" />
<label><%: Html.Language("Deadline")%></label>
<input id="txtEndTime" type="text" class="easyui-datebox" style="width: 100px;" />
</div>
</div>
</div>
<div data-options="region:'center',border:false">
<table id="dg" class="easyui-datagrid" style="width:100%; height:auto;"
data-options="
toolbar: '#tb',
border: false,
pagination: true,
pageSize: 50,
rownumbers: true,
striped: true,
sortName: 'ID',
sortOrder: 'asc',
fit: true,
fitColumns: true,
idField: 'ID',
method: 'post'
">
<thead>
<tr>
<th data-options="field:'RoomNumber'">
<%: Html.Language("RoomNumber")%>
</th>
<th data-options="field:'CardType',sortable:true">
<%: Html.Language("CardType")%>
</th>
<th data-options="field:'CardNumber',sortable:true">
<%: Html.Language("CardNumber")%>
</th>
<th data-options="field:'UserNumber',sortable:true">
<%: Html.Language("UserNumber")%>
</th>
<th data-options="field:'UserName',sortable:true">
<%: Html.Language("UserName")%>
</th>
<th data-options="field:'InCardTime',sortable:true">
<%: Html.Language("InCardTime")%>
</th>
<th data-options="field:'OutCardTime',sortable:true">
<%: Html.Language("OutCardTime")%>
</th>
<th data-options="field:'Duration',sortable:true">
<%: Html.Language("DurationMinute")%>
</th>
</tr>
</thead>
</table>
</div>
</div>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ScriptContent" runat="server">
<script type="text/javascript" src="/Scripts/host-roomcard.js"></script>
</asp:Content>

View File

@@ -0,0 +1,105 @@
<%@ 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">
<div class="easyui-layout" data-options="fit:true">
<div data-options="region:'north',border:false" style="overflow: hidden; height: 30px;">
<div class="toolbar" style="position: relative;">
<span style="padding-left: 5px;"><a href="javascript:void(0)" class="toolbar-button tb-icon-search"
onclick="query()">
<%: Html.Language("Query")%></a> </span><span style="position: absolute; right: 10px;">
<a href="javascript:void(0)" class="toolbar-button tb-icon-refresh" onclick="refresh()">
<%: Html.Language("Refresh")%></a>
<%--<a href="javascript:void(0)" class="toolbar-button tb-icon-remove" onclick="delData()"><%: Html.Language("Delete")%></a>--%>
<%--<a href="javascript:void(0)" class="toolbar-button tb-icon-clear" onclick="clearData()"><%: Html.Language("Empty")%></a>--%>
</span>
</div>
</div>
<div data-options="region:'center',border:false">
<table id="dg" class="easyui-datagrid" style="width: 100%; height: auto;" data-options="
toolbar: '#tb',
border: false,
singleSelect: false,
pagination: true,
pageSize: 50,
rownumbers: true,
striped: true,
sortName: 'CreatedDate',
sortOrder: 'desc',
fit: true,
fitColumns: true,
idField: 'ID',
nowrap:true,
frozenColumns: [[
{ field: 'ID', checkbox: true }
]],
method: 'post'
">
<thead>
<tr>
<th data-options="field:'RoomNumber',sortable:true">
<%: Html.Language("RoomNumber")%>
</th>
<th data-options="field:'ModalAddress',sortable:true">
<%: Html.Language("ReturnAddress")%>
</th>
<th data-options="field:'Type',sortable:true,formatter:checkType">
<%: Html.Language("Type")%>
</th>
<th data-options="field:'Sentence',sortable:true">
<%: Html.Language("Sentence")%>
</th>
<th data-options="field:'CreatedDate',sortable:true,resizable:false,formatter:$.tools.formatDateTime">
<%: Html.Language("Time")%>
</th>
</tr>
</thead>
</table>
</div>
</div>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ScriptContent" runat="server">
<style type="text/css">
.toolbar label
{
font-size: 12px;
}
</style>
<script type="text/javascript">
function checkType(val, row) {
switch (val) {
case 1:
return "客需服务";
case 2:
return "电视控制";
default:
return "RCU异常信息";
}
}
function refresh() {
$('#dg').datagrid('load', {});
}
function query() {
var params = {
roomNumber: ""
};
$('#dg').datagrid({ url: '/HostWordsReport/LoadAllByPage/', queryParams: params });
}
</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;
} %>
</asp:Content>

View File

@@ -0,0 +1,19 @@
<%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage<dynamic>" %>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width,user-scalable=no,initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0" />
<title>BLW IOT</title>
<style type="text/css">
body {
font-size: 14pt;
}
</style>
</head>
<body>
<div>BLW IOT</div>
</body>
</html>

View File

@@ -0,0 +1,71 @@
<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/MasterPage.Master" Inherits="System.Web.Mvc.ViewPage<dynamic>" %>
<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
<%: Html.Language("LightControl")%>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
<div title="<%: Html.Language("LightControl")%>" class="easyui-panel" data-options="fit:true,border:false">
<div class="easyui-layout" data-options="fit:true">
<div data-options="region:'north',border:false">
<div class="datagrid-toolbar" style="padding:5px 0px 5px 10px;">
<label><%: Html.Language("AccordingToRoomNumber")%></label>
<input id="cbxRoomNumber" class="easyui-combobox" style="width:80px;"
data-options="
url: '/Host/LoadDataForRoomNumberCombobox/',
editable: false,
valueField: 'ID',
textField: 'RoomNumber',
onSelect: cbxRoomNumberOnSelect
" />
<label><%: Html.Language("AccordingToPressFloor")%></label>
<input id="cbtGroup" class="easyui-combotree" style="width:110px;"
data-options="
url:'/Group/LoadDataForGroupComboTree/',
editable:false,
lines:true
" />
<label><%: Html.Language("AccordingToRoomStatus")%></label>
<input id="cbxRoomStatus" class="easyui-combobox" style="width:80px;"
data-options="
url:'/RoomStatus/LoadDataForRoomStatusCombobox/',
editable:false,
panelHeight:'auto',
valueField:'ID',
textField:'Name'
" />
<label><%: Html.Language("AccordingToRoomType")%></label>
<input id="cbxRoomType" class="easyui-combobox" style="width:80px;"
data-options="
url:'/RoomType/LoadDataForRoomTypeCombobox/',
editable:false,
panelHeight:'auto',
valueField:'ID',
textField:'Name',
onSelect: cbxRoomTypeOnSelect
" />
</div>
</div>
<div region="center" border="false">
<% Html.RenderPartial("LightControl"); %>
</div>
</div>
</div>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ScriptContent" runat="server">
<script type="text/javascript" src="/Scripts/light-control-index.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; } %>
</asp:Content>

View File

@@ -0,0 +1,122 @@
<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<dynamic>" %>
<link rel="stylesheet" type="text/css" href="/Styles/partbox.css" />
<style type="text/css">
form fieldset {
border:1px solid #95B8E7;
}
form table th {
font-weight: normal;
text-align: right;
}
.reload {
display: inline-block;
width: 16px;
height: 16px;
margin-left: 5px;
}
</style>
<div class="partbox" style="width:1000px;margin:5px;">
<div class="title"><%: Html.Language("SceneControl")%></div>
<div class="container">
<div class="content" style="height:35px;">
<form id="form1" method="post" action="#">
<input type="hidden" name="Type" value="0" />
<input type="hidden" name="OnOff" value="true" />
<div style="line-height:35px;height:35px;">
<label><%: Html.Language("Scene")%></label>
<input id="cbxScene1" name="SceneID" class="easyui-combobox" style="width:120px;"
data-options="
method: 'post',
editable: false,
required: true,
valueField: 'ID',
textField: 'Name',
panelHeight: 'auto',
url: '/RoomTypeScene/LoadAll/'
" />
<a href="javascript:void(0)" class="easyui-linkbutton" data-options="iconCls:'icon-send'" onclick="send1(0)"><%: Html.Language("Issue")%></a>
<a href="javascript:void(0)" class="easyui-linkbutton" data-options="iconCls:'icon-send'" onclick="send1(1)"><%: Html.Language("TakeInverseIssue")%></a>
</div>
</form>
</div>
</div>
</div>
<div class="partbox" style="width:1000px;margin:5px;">
<div class="title"><%: Html.Language("DeviceControl")%><a href="javascript:void(0)" onclick="$('#dgLights').datagrid('reload');" class="reload icon-reload"></a></div>
<div class="container">
<div class="content" style="height:480px;">
<table id="dgLights" class="easyui-datagrid"
data-options="
border: true,
singleSelect: true,
rownumbers: true,
striped: true,
fit: true,
fitColumns: true,
idField: 'HostID',
method: 'post',
sortName: 'Number',
sortOrder: 'asc'
">
<thead>
<tr>
<th data-options="field:'TypeName',resizable:false">
<%: Html.Language("Type")%>
</th>
<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:'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:'Time',resizable:false,formatter:timeFormatter">
<%: Html.Language("WhenTheDayOfOpenLong")%>
</th>--%>
<!--这里的operationFormatter 是JS中的一个函数这个函数非常地重要-->
<th data-options="field:'Operation',align:'center',resizable:false,formatter:operationFormatter"> <%: Html.Language("Operation")%></th>
</tr>
</thead>
</table>
</div>
</div>
</div>
<% 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,83 @@
<%@ 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("LightControl")%>
</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">
<label><%: Html.Language("AccordingToRoomNumber")%></label>
<input id="cbxRoomNumber" class="easyui-combobox" style="width:80px;"
data-options="
url: '/Host/LoadDataForRoomNumberCombobox/',
editable: false,
valueField: 'ID',
textField: 'RoomNumber',
panelHeight:'200',
onSelect: cbxRoomNumberOnSelect
" />
<label><%: Html.Language("AccordingToPressFloor")%></label>
<input id="cbtGroup" class="easyui-combotree" style="width:110px;"
data-options="
url:'/Group/LoadDataForGroupComboTree/',
editable:false,
lines:true,
panelHeight:'auto',
onLoadSuccess: cbtGroupOnLoadSuccess
" />
<label><%: Html.Language("AccordingToRoomStatus")%></label>
<input id="cbxRoomStatus" class="easyui-combobox" style="width:80px;"
data-options="
url:'/RoomStatus/LoadDataForRoomStatusCombobox/',
editable:false,
panelHeight:'auto',
valueField:'ID',
textField:'Name'
" />
<label><%: Html.Language("AccordingToRoomType")%></label>
<input id="cbxRoomType" class="easyui-combobox" style="width:80px;"
data-options="
url:'/RoomType/LoadDataForRoomTypeCombobox/',
editable:false,
panelHeight:'auto',
valueField:'ID',
textField:'Name',
onSelect: cbxRoomTypeOnSelect
" />
</div>
</div>
<div region="center" border="false">
<% Html.RenderPartial("LightControl"); %>
</div>
</div>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ScriptContent" runat="server">
<style type="text/css">
/* 修改 easyui-linkbutton 默认样式 */
.l-btn,
.l-btn:hover {
opacity: 0.8;
filter: alpha(opacity=80);
background: #00A2EA;
border:1px solid #00A2EA;
}
.l-btn:hover {
opacity: 1.0;
filter: alpha(opacity=100);
}
</style>
<script type="text/javascript" src="/Scripts/light-control-index.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; } %>
</asp:Content>

View File

@@ -0,0 +1,83 @@
<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/MasterPage.Master"
Inherits="System.Web.Mvc.ViewPage<dynamic>" %>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
<div id="tb" style="">
<span style="padding-left: 5px;">
<%: Html.Language("RoomNumber")%><input id="txtRoomNumber" class="easyui-textbox"
style="width: 60px;" />
员工姓名:<input id="txtUserName" class="easyui-textbox" style="width: 60px;" />
<a href="javascript:void(0)" class="easyui-linkbutton" data-options="iconCls:'icon-search',plain:true"
onclick="query()">
<%: Html.Language("Query")%></a> </span>
</div>
<div>
<label>
<%: Html.Language("StartDate")%></label>
<input id="Text1" type="text" class="easyui-datetimebox" style="width: 130px;" data-options="showSeconds:false" />
<label>
<%: Html.Language("Deadline")%></label>
<input id="Text2" type="text" class="easyui-datetimebox" style="width: 130px;" data-options="showSeconds:false" />
<a href="javascript:void(0)" class="toolbar-button tb-icon-search" onclick="query();">
<%: Html.Language("Query")%>
</a>
</div>
<div class="easyui-layout" data-options="fit:true">
<table id="dg" class="easyui-datagrid" style="width: 100%; height: auto;" data-options="
toolbar: '#tb',
border: false,
pagination: true,
pageSize: 20,
rownumbers: true,
striped: true,
sortName: 'ID',
sortOrder: 'asc',
fit: true,
fitColumns: true,
idField: 'ID',
url: '/HostRoomCard/LoadAllByPage/',
method: 'post',
onDblClickRow: function(index, row) { edit(row); }
">
<thead>
<tr>
<th data-options="field:'RoomNumber'">
<%: Html.Language("RoomNumber")%>
</th>
<th data-options="field:'CardNumber',sortable:true">
<%: Html.Language("CardNumber")%>
</th>
<th data-options="field:'CardType',sortable:true">
<%: Html.Language("CardType")%>
</th>
<th data-options="field:'UserNumber',sortable:true">
<%: Html.Language("UserNumber")%>
</th>
<th data-options="field:'UserName',sortable:true">
<%: Html.Language("UserName")%>
</th>
<th data-options="field:'InCardTime',sortable:true,formatter:$.tools.formatDateTime">
<%: Html.Language("InCardTime")%>
</th>
<th data-options="field:'OutCardTime',sortable:true,formatter:$.tools.formatDateTime">
<%: Html.Language("OutCardTime")%>
</th>
<th data-options="field:'Duration',sortable:true">
<%: Html.Language("DurationMinute")%>
</th>
</tr>
</thead>
</table>
</div>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ScriptContent" runat="server">
<script type="text/javascript">
function refresh() {
$('#dg').datagrid('load', {});
$("#txtRoomNumber").textbox("reset");
}
function query() {
$('#dg').datagrid('reload', { roomNumber: $("#txtRoomNumber").val(), userName: $("#txtUserName").val() });
}
</script>
</asp:Content>

View File

@@ -0,0 +1,167 @@
<%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage<dynamic>" %>
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no" />
<meta http-equiv="X-UA-Compatible" content="ie=edge" />
<title></title>
<%--<link rel="stylesheet" href="/Styles/manualvisit.css"/>--%>
<script type="text/javascript" src="/Scripts/WeiXin/tip.js"></script>
<script type="text/javascript" src="/Scripts/jquery.min.js"></script>
<script type="text/javascript">
$(function () {
$('#getValidateCode').click(function () {
var name = $('#txtName').val().trim();
if (name === '') {
alert('请输入姓名');
return;
}
var companyName = $('#txtCompanyName').val().trim();
if (companyName === '') {
alert('请输入公司名');
return;
}
var phoneNumber = $('#txtPhoneNumber').val().trim();
if (phoneNumber === '') {
alert('请输入手机号');
return;
}
$.ajax({
url: '/ManualVisit/GetValidateCode/',
type: 'POST',
dataType: 'JSON',
data: { name: name, companyName: companyName, phoneNumber: phoneNumber },
success: function (r) {
//showTip(r.Message);
alert(r.Message);
},
error: function (XMLHttpRequest, textStatus, errorThrown) {
alert('操作失败');
}
});
});
$('#getManual').click(function () {
var phoneNumber = $('#txtPhoneNumber').val().trim();
if (phoneNumber === '') {
alert('请输入手机号');
return;
}
var validateCode = $('#txtValidateCode').val().trim();
if (validateCode === '') {
alert('请输入验证码');
return;
}
$.ajax({
url: '/ManualVisit/GetManual/',
type: 'POST',
dataType: 'JSON',
data: { phoneNumber: phoneNumber, validateCode: validateCode },
success: function (r) {
if (r.IsSuccess) {
window.location.href = r.Target;
} else {
alert(r.Message);
}
},
error: function (XMLHttpRequest, textStatus, errorThrown) {
alert('操作失败');
}
});
});
});
</script>
<style type="text/css">
.weixin-tip
{
display: none;
background: rgba(38,55,92,0.7);
border-radius: 20px;
padding: 5px 50px;
font-size: 12pt;
color: #FFF;
text-align: center;
position: absolute;
top: 0.1%;
z-index: 9999;
background-color: transparent;
}
body
{
background-image: url(../images/manual/bg.png);
}
.block
{
margin: 0px 10%;
text-align: center;
color: White;
font-size: 22px;
}
.block input
{
width: 60%;
margin: 10px 0;
border: 0;
font-size: 20px;
padding: 4px 0;
border-radius: 4px;
text-indent: 5px;
}
.block button
{
padding: 8px;
font-size: 18px;
width: 100%;
}
#getValidateCode
{
background-image: url(../images/manual/btnValidateCode.png);
background-size: 100% 100%;
background-position: center center;
display: block;
width: 140px;
height:112px;
}
#getManual
{
background-image: url(../images/manual/btnManual.png);
background-size: 100% 100%;
background-position: center center;
display: block;
width: 140px;
height:112px;
}
</style>
</head>
<body>
<div class="block" style="height: 50px;">
&nbsp;</div>
<div style="text-align: center;">
<img alt="" src='../images/manual/title.png' width="314px" /></div>
<div class="block" style="height: 30px;">
&nbsp;</div>
<div class="block">
姓&nbsp;&nbsp;&nbsp;名:
<input type="text" id="txtName" name="Name" maxlength="10" />
</div>
<div class="block">
公司名:
<input type="text" id="txtCompanyName" name="CompanyName" maxlength="20" />
</div>
<div class="block">
手机号:
<input type="text" id="txtPhoneNumber" name="PhoneNumber" maxlength="20" />
</div>
<div class="block">
验证码:
<input type="text" id="txtValidateCode" name="ValidateCode" maxlength="4" />
</div>
<br />
<table style=" width:100%; text-align:center;">
<tr align="center">
<td><a id="getValidateCode" href="javascript:void(0)"></a></td>
<td><a id="getManual" href="javascript:void(0)"></a></td>
</tr>
</table>
</body>

View File

@@ -0,0 +1,111 @@
<%@ 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">
<div class="easyui-layout" data-options="fit:true">
<div data-options="region:'north',border:false" style="overflow: hidden; height: 30px;">
<div class="toolbar" style="position: relative;">
<span style="padding-left: 5px;">
<label>
开始时间:</label><input id="txtStartDate" type="text" class="easyui-datebox" style="width: 100px;"
data-options="editable:false" />
<label>
截止时间:</label><input id="txtEndDate" type="text" class="easyui-datebox" style="width: 100px;"
data-options="editable:false" />
<a href="javascript:void(0)" class="toolbar-button tb-icon-search" onclick="query()">
查询</a> </span><span style="position: absolute; right: 10px;">
<%--<a href="javascript:void(0)"class="toolbar-button tb-icon-refresh" onclick="refresh()">刷新</a>--%>
<%--<a href="javascript:void(0)" class="toolbar-button tb-icon-remove" onclick="delData()"><%: Html.Language("Delete")%></a>--%>
<%--<a href="javascript:void(0)" class="toolbar-button tb-icon-clear" onclick="clearData()"><%: Html.Language("Empty")%></a>--%>
</span>
</div>
</div>
<div data-options="region:'center',border:false">
<table id="dg" class="easyui-datagrid" style="width: 100%; height: auto;" data-options="
toolbar: '#tb',
border: false,
singleSelect: false,
pagination: true,
pageSize: 50,
rownumbers: true,
striped: true,
sortName: 'CreatedDate',
sortOrder: 'desc',
fit: true,
fitColumns: true,
idField: 'ID',
nowrap:true,
frozenColumns: [[
{ field: 'ID', checkbox: true }
]],
method: 'post'
">
<thead>
<tr>
<th data-options="field:'Name',sortable:true">
姓名
</th>
<th data-options="field:'CompanyName',sortable:true">
公司名
</th>
<th data-options="field:'PhoneNumber',sortable:true">
手机号
</th>
<th data-options="field:'ValidateCode',sortable:true">
验证码
</th>
<th data-options="field:'CreatedDate',sortable:true,formatter:$.tools.formatDateTime">
创建日期
</th>
</tr>
</thead>
</table>
</div>
</div>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ScriptContent" runat="server">
<style type="text/css">
.toolbar label
{
font-size: 12px;
}
</style>
<script type="text/javascript">
function query() {
var startDate = $("#txtStartDate").datebox("getValue");
var endDate = $("#txtEndDate").datebox("getValue");
if (startDate == "" && endDate != "") {
$.tools.alert(lang.PEASD);
return;
}
if (startDate != "" && endDate == "") {
$.tools.alert(lang.PETED);
return;
}
if (startDate != "" && endDate != "") {
startDate += " 00:00:00";
endDate += " 23:59:59";
var start = new Date(startDate.replace("-", "/"));
var end = new Date(endDate.replace("-", "/"));
if (end < start) {
$.tools.alert(lang.EDMBGTOETSD);
return;
}
}
var params = {
startDate: startDate != "" ? startDate : undefined,
endDate: endDate != "" ? endDate : undefined
};
$('#dg').datagrid({ url: '/ManualVisit/LoadAllByPage/', queryParams: params });
}
$(function () {
var curTime = new Date();
var startTime = new Date(curTime.getTime() - 1 * 24 * 60 * 60 * 1000);
$("#txtStartDate").datebox("setValue", startTime.format('yyyy-MM-dd hh:mm:ss'));
$("#txtEndDate").datebox("setValue", curTime.format('yyyy-MM-dd hh:mm:ss'));
});
</script>
</asp:Content>

View File

@@ -0,0 +1,71 @@
<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<dynamic>" %>
<style type="text/css">
#appHotelForm table th
{
width: 75px;
font-weight: normal;
text-align: right;
}
</style>
<div class="easyui-panel" data-options="fit:true,border:false">
<div class="datagrid-toolbar">
<a href="javascript:void(0)" class="easyui-linkbutton" data-options="iconCls:'icon-reload',plain:true"
onclick="loadAppHotel();">
<%: Html.Language("Refresh")%></a> <a href="javascript:void(0)" class="easyui-linkbutton"
data-options="iconCls:'icon-save',plain:true" onclick="saveAppHotel();">
<%: Html.Language("Save")%></a>
</div>
<form id="appHotelForm" class="easyui-form" method="post" action="#">
<table cellpadding="5px">
<tr>
<th>
<label for="txtHotelName"><%: Html.Language("HotelName")%></label>
</th>
<td>
<input id="txtHotelName" name="H01" class="easyui-validatebox textbox text" data-options="validType:'length[0,30]'" style="width: 350px;" />
</td>
<th><label for="txtHotelEnglishName"><%: Html.Language("HotelEnglishName")%></label></th>
<td>
<input id="txtHotelEnglishName" name="H03" class="easyui-validatebox textbox text" data-options="validType:'length[0,30]'" style="width: 350px;" />
</td>
</tr>
<tr>
<th style="vertical-align: top">
<label for="txtHotelIntroduce">
<%: Html.Language("IntroductionContent")%>
</label>
</th>
<td>
<textarea id="txtHotelIntroduce" name="H02" class="easyui-validatebox textbox text" data-options="validType:'length[0,4000]'" rows="50" cols="25" maxlength="4000" style="width:350px;height:300px;white-space:normal;overflow-y:auto;"></textarea>
</td>
<th style="vertical-align: top">
<label for="txtHotelEnglishIntroduce"><%: Html.Language("HotelEnglishIntroduce")%></label>
</th>
<td>
<textarea id="txtHotelEnglishIntroduce" name="H04" class="easyui-validatebox textbox text" data-options="validType:'length[0,4000]'" rows="50" cols="25" maxlength="4000" style="width:350px;height:300px;white-space:normal;overflow-y:auto;"></textarea>
</td>
</tr>
</table>
</form>
</div>
<script type="text/javascript">
$(function () { loadAppHotel() });
function loadAppHotel() {
$('#appHotelForm').form('load', '/MobileApp/LoadAppHotel/');
}
function saveAppHotel() {
var form = $('#appHotelForm');
if (form.form('enableValidation').form('validate')) {
var entry = $("#appHotelForm").serializeJson();
var params = { jsonData: JSON.stringify(entry) };
$.tools.post(params, '/MobileApp/SaveAppHotel/');
}
}
</script>

View File

@@ -0,0 +1,177 @@
<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<dynamic>" %>
<style type="text/css">
#appMenuForm table
{
margin: 0 auto;
}
#appMenuForm table th
{
font-weight: normal;
}
</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; } %>
<table id="dgAppMenu" class="easyui-datagrid" style="width: 100%; height: auto;"
data-options="
toolbar: '#tbAppMenu',
border: false,
singleSelect: true,
rownumbers: true,
striped: true,
fit: true,
fitColumns: true,
idField: 'ID',
method: 'POST',
url: '/MobileApp/LoadMenus/',
queryParams: { type:0},
onDblClickRow: function(index, row) { editAppMenu(row); }
">
<thead>
<tr>
<th data-options="field:'Name',sortable:true,width:30,resizable:false">
<%: Html.Language("MenuName")%>
</th>
<th data-options="field:'EnglishName',sortable:true,width:100,resizable:false">
<%: Html.Language("EnglishName")%>
</th>
<th data-options="field:'Icon',sortable:true,align:'center',formatter:iconFormatter,resizable:false">
<%: Html.Language("Icon")%>
</th>
<th data-options="field:'Sort',sortable:true,align:'center',resizable:false">
<%: Html.Language("Sort")%>
</th>
<th data-options="field:'ActiveIndicator',sortable:true,align:'center',resizable:false,formatter:function(val){return val ? '<%: Html.Language("Yes")%>':'<%: Html.Language("No")%>';}">
<%: Html.Language("StartUsing")%>
</th>
</tr>
</thead>
</table>
<div id="tbAppMenu">
<a href="javascript:void(0)" class="easyui-linkbutton" data-options="iconCls:'icon-reload',plain:true"
onclick="$('#dgAppMenu').datagrid('reload')">
<%: Html.Language("Refresh")%></a>
<a href="javascript:void(0)" class="easyui-linkbutton"
data-options="iconCls:'icon-edit',plain:true" onclick="editAppMenu();">
<%: Html.Language("Edit")%></a>
</div>
<div id="dialog" class="easyui-window" style="padding: 5px; width: 300px; height: 250px;"
data-options="
closed: true,
modal: true,
collapsible: false,
minimizable: false,
maximizable: false
">
<div class="easyui-panel dlg-content" style="margin-bottom: 5px;">
<form id="appMenuForm" class="easyui-form" method="post" data-options="novalidate:true"
enctype="multipart/form-data">
<input type="hidden" id="hfID" name="ID" value="0" />
<table cellspacing="5px">
<tr>
<th>
<label for="txtName">
<%: Html.Language("MenuName")%></label>
</th>
<td>
<input class="easyui-validatebox textbox text" id="txtName" name="Name" data-options="required:true" />
</td>
</tr>
<tr>
<th>
<label for="txtEnglishName">
<%: Html.Language("EnglishName")%></label>
</th>
<td>
<input class="easyui-validatebox textbox text" id="txtEnglishName" name="EnglishName"
data-options="required:false" />
</td>
</tr>
<tr>
<th>
<label for="txtIcon">
<%: Html.Language("Icon")%></label>
</th>
<td>
<input class="easyui-filebox" name="Icon" data-options="buttonText:lang.Browse" />
</td>
</tr>
<tr>
<th>
<label for="txtSort">
<%: Html.Language("Sort")%></label>
</th>
<td>
<input class="easyui-numberspinner textbox text" id="txtSort" name="Sort" data-options="min:1"
value="1" data-options="required:true" />
</td>
</tr>
<tr>
<th>
<label for="chkActiveIndicator">
<%: Html.Language("StartUsing")%></label>
</th>
<td>
<label>
<input type="radio" id="rad1" name="ActiveIndicator" value="true" />
<%: Html.Language("Yes")%></label>&nbsp;<label><input id="rad2" type="radio" name="ActiveIndicator"
value="false" /><%: Html.Language("No")%></label>
</td>
</tr>
</table>
</form>
</div>
<div class="dlg-footer" style="text-align: right; padding: 5px 5px 0 0;">
<a class="easyui-linkbutton dlg-btn-save" data-options="iconCls:'icon-save'" href="javascript:void(0)"
onclick="saveAppMenu();">
<%: Html.Language("Save")%></a> <a class="easyui-linkbutton dlg-btn-cancel" data-options="iconCls:'icon-cancel'"
href="javascript:void(0)" onclick="$('#dialog').window('close');">
<%: Html.Language("Cancel")%></a>
</div>
</div>
<script type="text/javascript">
function iconFormatter(val) {
if (val && val != '') {
return '<img src="/' + val + '" height="25px" />';
}
return '';
}
function editAppMenu(row) {
var row = row || $('#dgAppMenu').datagrid('getSelected');
if (row) {
$('#appMenuForm').form('reset');
$('#hfID').val(row.ID);
$('#txtName').val(row.Name);
$('#txtEnglishName').val(row.EnglishName);
$('#txtSort').numberspinner('setValue', row.Sort);
if (row.ActiveIndicator) {
$('#appMenuForm input[name=ActiveIndicator][value=false]').removeAttr('checked');
$('#appMenuForm input[name=ActiveIndicator][value=true]').attr('checked', 'checked');
} else {
$('#appMenuForm input[name=ActiveIndicator][value=true]').removeAttr('checked');
$('#appMenuForm input[name=ActiveIndicator][value=false]').attr('checked', 'checked');
}
$('#dialog').window({ title: lang.EditMenu }).window('open');
} else {
$.tools.alert(lang.PleaseSelectTheData);
}
}
function saveAppMenu() {
$('#appMenuForm').form('submit', {
url: '/MobileApp/SaveAppMenu/',
success: function (r) {
r = $.parseJSON(r);
if (r.IsSuccess) {
$('#dgAppMenu').datagrid('reload');
$('#dialog').window('close');
}
$.tools.alert(r.Message);
}
});
}
</script>

View File

@@ -0,0 +1,153 @@
<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<dynamic>" %>
<style type="text/css">
#appRoomForm table
{
margin: 0 auto;
}
#appRoomForm table th
{
font-weight: normal;
}
</style>
<table id="dgAppRoom" class="easyui-datagrid" style="width: 100%; height: auto;"
data-options="
toolbar: '#tbAppRoom',
border: false,
singleSelect: true,
pagination: true,
pageSize: 20,
rownumbers: true,
striped: true,
sortName: 'ID',
sortOrder: 'asc',
fit: true,
fitColumns: true,
idField: 'ID',
method: 'POST',
url: '/MobileApp/LoadAppRoomsByPage/',
onDblClickRow: function(index, row) { editAppRoom(row); }
">
<thead>
<tr>
<th data-options="field:'ID',sortable:true,align:'center',resizable:false">
<%: Html.Language("ID") %>
</th>
<th data-options="field:'MAC',sortable:true,width:100,resizable:false">
MAC
</th>
<th data-options="field:'RoomNumber',sortable:true,width:20,resizable:false">
<%: Html.Language("RoomNumber")%>
</th>
</tr>
</thead>
</table>
<div id="tbAppRoom">
<a href="javascript:void(0)" class="easyui-linkbutton" data-options="iconCls:'icon-reload',plain:true"
onclick="$('#dgAppRoom').datagrid('reload')">
<%: Html.Language("Refresh")%></a> <a href="javascript:void(0)" class="easyui-linkbutton"
data-options="iconCls:'icon-add',plain:true" onclick="addAppRoom()">
<%: Html.Language("New")%></a> <a href="javascript:void(0)" class="easyui-linkbutton"
data-options="iconCls:'icon-edit',plain:true" onclick="editAppRoom()">
<%: Html.Language("Edit")%></a> <a href="javascript:void(0)" class="easyui-linkbutton"
data-options="iconCls:'icon-remove',plain:true" onclick="delAppRoom()">
<%: Html.Language("Delete")%></a>
</div>
<div id="AppRoomdialog" class="easyui-window" style="padding: 5px; width: 300px; height: 160px;" data-options="
closed: true,
modal: true,
collapsible: false,
minimizable: false,
maximizable: false
">
<div class="easyui-panel dlg-content" style="margin-bottom: 5px;">
<form id="appRoomForm" class="easyui-form" method="post" data-options="novalidate:true"
enctype="multipart/form-data">
<input type="hidden" id="RID" name="ID" value="0" />
<table cellspacing="5px">
<tr>
<th>
<label for="txtMAC">
MAC</label>
</th>
<td>
<input class="easyui-validatebox textbox text" id="txtMAC" name="MAC" data-options="required:true,validType:'length[3,20]'" />
</td>
</tr>
<tr>
<th>
<label for="txtRoomNumber">
<%: Html.Language("RoomNumber")%></label>
</th>
<td>
<input class="easyui-validatebox textbox text" id="txtRoomNumber" name="RoomNumber"
data-options="required:false" />
</td>
</tr>
</table>
</form>
</div>
<div class="dlg-footer" style="text-align: right; padding: 5px 5px 0 0;">
<a class="easyui-linkbutton dlg-btn-save" data-options="iconCls:'icon-save'" href="javascript:void(0)"
onclick="saveAppRoom();">
<%: Html.Language("Save")%></a> <a class="easyui-linkbutton dlg-btn-cancel" data-options="iconCls:'icon-cancel'"
href="javascript:void(0)" onclick="$('#AppRoomdialog').window('close');">
<%: Html.Language("Cancel")%></a>
</div>
</div>
<script type="text/javascript">
function addAppRoom() {
$('#appRoomForm').form('reset');
$('#AppRoomdialog').window({ title: lang.NewPADRoomNumberSetting }).window('open');
}
function editAppRoom(row) {
var row = row || $('#dgAppRoom').datagrid('getSelected');
if (row) {
$('#appRoomForm').form('reset');
$('#RID').val(row.ID);
$('#txtMAC').val(row.MAC);
$('#txtRoomNumber').val(row.RoomNumber);
$('#AppRoomdialog').window({ title: lang.EditPADRoomNumberSetting }).window('open');
} else {
$.tools.alert(lang.PleaseSelectTheData);
}
}
function saveAppRoom() {
var params = $('#appRoomForm').serialize();
$.tools.post(params, '/MobileApp/SaveAppRoom/', function (r) {
if (r.IsSuccess) {
$('#dgAppRoom').datagrid('reload');
$('#AppRoomdialog').window('close');
}
$.tools.alert(r.Message);
});
}
function delAppRoom() {
var rows = $('#dgAppRoom').datagrid('getSelections');
if (!rows || rows.length == 0) {
$.tools.alert(lang.PleaseSelectTheData);
return;
}
var param;
$.each(rows, function (i, n) {
if (i == 0) {
param = "idList=" + n.ID;
}
else {
param += "&idList=" + n.ID;
}
});
$.tools.delPost(param, "/MobileApp/DeleteAppRoom/", function () {
$('#dgAppRoom').datagrid("clearSelections");
$('#dgAppRoom').datagrid("reload");
}, this);
}
</script>

View File

@@ -0,0 +1,28 @@
<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<dynamic>" %>
<style type="text/css">
#tbHotel {
width: 100%;
}
#tbHotel th {
width: 60px;
font-weight: normal;
}
#tbHotel th,
#tbHotel td {
/*border:1px solid red;*/
}
</style>
<table id="tbHotel" cellpadding="5px">
<tr>
<th><label for="txtHotelName">酒店名称</label></th>
<td><input id="txtHotelName" class="easyui-validatebox textbox text" style="width:500px;" /></td>
</tr>
<tr>
<th style="vertical-align:top"><label for="txtHotelIntroduce">介绍内容</label></th>
<td>
<textarea id="txtHotelIntroduce" class="easyui-validatebox textbox text" style="width:500px;height:500px;"></textarea>
</td>
</tr>
</table>

View File

@@ -0,0 +1,41 @@
<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<dynamic>" %>
<table id="dg" class="easyui-datagrid" style="width:100%; height:auto;"
data-options="
toolbar: '#tb',
border: false,
singleSelect: true,
pagination: true,
pageSize: 20,
rownumbers: true,
striped: true,
sortName: 'ID',
sortOrder: 'asc',
fit: true,
fitColumns: true,
idField: 'ID',
method: 'POST'
">
<thead>
<tr>
<th data-options="field:'Name',sortable:true">
菜单名称
</th>
<th data-options="field:'Icon',sortable:true">
LOGO
</th>
<th data-options="field:'Sort',sortable:true">
排序
</th>
<th data-options="field:'ActiveIndicator',sortable:true">
启用
</th>
</tr>
</thead>
</table>
<div id="tb">
<a href="javascript:void(0)" class="easyui-linkbutton" data-options="iconCls:'icon-reload',plain:true" onclick="$('#dg').datagrid('reload')">刷新</a>
<a href="javascript:void(0)" class="easyui-linkbutton" data-options="iconCls:'icon-add',plain:true" onclick="">新增</a>
<a href="javascript:void(0)" class="easyui-linkbutton" data-options="iconCls:'icon-edit',plain:true" onclick="">编辑</a>
<a href="javascript:void(0)" class="easyui-linkbutton" data-options="iconCls:'icon-remove',plain:true" onclick="">删除</a>
</div>

View File

@@ -0,0 +1,19 @@
<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/MasterPage.Master" Inherits="System.Web.Mvc.ViewPage<dynamic>" %>
<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
<%: Html.Language("MobileClientManagement")%>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
<div class="easyui-tabs" data-options="plain:true,fit:true">
<div title='<%: Html.Language("MenuSettings")%>' data-options="href:'/MobileApp/AppMenu/'"></div>
<div title='<%: Html.Language("HotelIntroduction")%>' data-options="href:'/MobileApp/AppHotel/'"></div>
<div title='<%: Html.Language("ServiceInformation")%>' data-options="href:'/MobileApp/Service/'"></div>
<div title='<%: Html.Language("LightControl")%>' data-options="href:'/MobileApp/Light/'"></div>
<div title='<%: Html.Language("SceneControl")%>' data-options="href:'/MobileApp/Scene/'"></div>
<div title='<%: Html.Language("PADRoomNumberSetting")%>' data-options="href:'/MobileApp/AppRoom/'"></div>
</div>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ScriptContent" runat="server">
</asp:Content>

View File

@@ -0,0 +1,79 @@
<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<dynamic>" %>
<table id="dgLight" class="easyui-datagrid" style="width: 100%; height: auto;" data-options="
toolbar: '#tbLight',
border: false,
singleSelect: true,
pagination: true,
pageSize: 20,
rownumbers: true,
striped: true,
sortName: 'ID',
sortOrder: 'asc',
fit: true,
fitColumns: true,
idField: 'ID',
method: 'POST',
url: '/MobileApp/LoadLightsByPage/'
">
<thead>
<tr>
<th data-options="field:'Outlet',resizable:false">
<%: Html.Language("DeliveryOutlet")%>
</th>
<th data-options="field:'Name',width:30,resizable:false">
<%: Html.Language("Name")%>
</th>
<th data-options="field:'EnglishName',width:100,resizable:false">
<%: Html.Language("EnglishName")%>
</th>
<th data-options="field:'Type',resizable:false">
<%: Html.Language("Type")%>
</th>
<th data-options="
field: 'AppApply',
align: 'center',
formatter: lightAppApplyFormatter,
resizable:false
">
<%: Html.Language("Display")%>
</th>
</tr>
</thead>
</table>
<div id="tbLight">
<a href="javascript:void(0)" class="easyui-linkbutton" data-options="iconCls:'icon-reload',plain:true"
onclick="$('#dgLight').datagrid('reload')">
<%: Html.Language("Refresh")%></a>
<label>
<%: Html.Language("RoomType")%></label>
<select id="cbxLightRoomType" class="easyui-combobox" style="width: 100px;" data-options="
valueField: 'ID',
textField: 'Name',
required: true,
panelHeight: 'auto',
editable: false,
url: '/RoomType/LoadRoomType/',
onSelect: cbxLightRoomTypeOnSelect
">
</select>
</div>
<script type="text/javascript">
function cbxLightRoomTypeOnSelect(r) {
$("#dgLight").datagrid('reload', { RoomTypeID: r.ID });
}
function lightAppApplyFormatter(val, row) {
if (val) {
return '<input type="checkbox" checked="checked" onchange="lightAppApplyOnChange(this,\'' + row.ID + '\')" />';
} else {
return '<input type="checkbox" onchange="lightAppApplyOnChange(this,\'' + row.ID + '\')" />';
}
}
function lightAppApplyOnChange(sender, id) {
var params = { ID: id, AppApply: $(sender).is(":checked") };
$.tools.post(params, '/MobileApp/SaveLight/');
}
</script>

View File

@@ -0,0 +1,177 @@
<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<dynamic>" %>
<table id="dgScene" class="easyui-datagrid" style="width: 100%; height: auto;" data-options="
toolbar: '#tbScene',
border: false,
singleSelect: true,
pagination: true,
pageSize: 20,
rownumbers: true,
striped: true,
sortName: 'ID',
sortOrder: 'asc',
fit: true,
fitColumns: true,
idField: 'ID',
method: 'POST',
url: '/MobileApp/LoadScenesByPage/'
">
<thead>
<tr>
<th data-options="field:'Name',width:30,resizable:false">
<%: Html.Language("Name")%>
</th>
<th data-options="field:'EnglishName',width:100,resizable:false">
<%: Html.Language("EnglishName")%>
</th>
<th data-options="field:'Icon',sortable:true,align:'center',resizable:false,formatter:iconFormatter">
<%: Html.Language("Icon")%>
</th>
<th data-options="
field: 'AppApply',
align: 'center',
resizable:false,
formatter: sceneAppApplyFormatter
">
<%: Html.Language("Display")%>
</th>
</tr>
</thead>
</table>
<div id="tbScene">
<a href="javascript:void(0)" class="easyui-linkbutton" data-options="iconCls:'icon-reload',plain:true"
onclick="$('#dgScene').datagrid('reload')">
<%: Html.Language("Refresh")%></a>
<label>
<%: Html.Language("RoomType")%></label>
<select id="cbxSceneRoomType" class="easyui-combobox" style="width: 100px;" data-options="
valueField: 'ID',
textField: 'Name',
required: true,
panelHeight: 'auto',
editable: false,
url: '/RoomType/LoadRoomType/',
onSelect: cbxSceneRoomTypeOnSelect
">
</select>
<a href="javascript:void(0)" class="easyui-linkbutton" data-options="iconCls:'icon-edit',plain:true"
onclick="editScene();">
<%: Html.Language("Edit")%></a>
</div>
<div id="Scenedialog" class="easyui-window" style="padding: 5px; width: 300px; height: 210px;"
data-options="
closed: true,
modal: true,
collapsible: false,
minimizable: false,
maximizable: false
">
<div class="easyui-panel dlg-content" style="margin-bottom: 5px;">
<form id="SceneForm" class="easyui-form" method="post" data-options="novalidate:true"
enctype="multipart/form-data">
<input type="hidden" id="SID" name="ID" value="0" />
<table cellspacing="5px">
<tr>
<th>
<label for="txtSceneName">
<%: Html.Language("Name")%></label>
</th>
<td>
<input class="easyui-validatebox textbox text" id="txtSceneName" name="Name" readonly="true"
data-options="required:true" />
</td>
</tr>
<tr>
<th>
<label for="txtEnglishName">
<%: Html.Language("EnglishName")%></label>
</th>
<td>
<input class="easyui-validatebox textbox text" id="txtSceneEnglishName" readonly="true"
name="EnglishName" data-options="required:false" />
</td>
</tr>
<tr>
<th>
<label for="txtIcon">
<%: Html.Language("Icon")%></label>
</th>
<td>
<input class="easyui-filebox" name="Icon" data-options="buttonText:lang.Browse" />
</td>
</tr>
<tr>
<th>
<label for="chkAppApply">
<%: Html.Language("Visible")%></label>
</th>
<td>
<label>
<input type="radio" id="rad1" name="AppApply" value="true" />
<%: Html.Language("Yes")%></label>&nbsp;
<label>
<input id="rad2" type="radio" name="AppApply" value="false" /><%: Html.Language("No")%></label>
</td>
</tr>
</table>
</form>
</div>
<div class="dlg-footer" style="text-align: right; padding: 5px 5px 0 0;">
<a class="easyui-linkbutton dlg-btn-save" data-options="iconCls:'icon-save'" href="javascript:void(0)"
onclick="saveScene();">
<%: Html.Language("Save")%></a> <a class="easyui-linkbutton dlg-btn-cancel" data-options="iconCls:'icon-cancel'"
href="javascript:void(0)" onclick="$('#Scenedialog').window('close');">
<%: Html.Language("Cancel")%></a>
</div>
</div>
<script type="text/javascript">
function cbxSceneRoomTypeOnSelect(r) {
$("#dgScene").datagrid('reload', { RoomTypeID: r.ID });
}
function sceneAppApplyFormatter(val, row) {
if (val) {
return '<input type="checkbox" checked="checked" onchange="sceneAppApplyOnChange(this,\'' + row.ID + '\')" />';
} else {
return '<input type="checkbox" onchange="sceneAppApplyOnChange(this,\'' + row.ID + '\')" />';
}
}
function sceneAppApplyOnChange(sender, id) {
var params = { ID: id, AppApply: $(sender).is(":checked") };
$.tools.post(params, '/MobileApp/SaveScene/');
}
function editScene() {
var row = row || $('#dgScene').datagrid('getSelected');
if (row) {
$('#SceneForm').form('reset');
$('#SID').val(row.ID);
$('#txtSceneName').val(row.Name);
$('#txtSceneEnglishName').val(row.EnglishName);
if (row.AppApply) {
$('#SceneForm input[name=AppApply][value=false]').removeAttr('checked');
$('#SceneForm input[name=AppApply][value=true]').attr('checked', 'checked');
} else {
$('#SceneForm input[name=AppApply][value=true]').removeAttr('checked');
$('#SceneForm input[name=AppApply][value=false]').attr('checked', 'checked');
}
$('#Scenedialog').window({ title: lang.EditScene }).window('open');
} else {
$.tools.alert(lang.PleaseSelectTheData);
}
}
function saveScene() {
$('#SceneForm').form('submit', {
url: '/MobileApp/SaveEditScene/',
success: function (r) {
r = $.parseJSON(r);
if (r.IsSuccess) {
$('#dgScene').datagrid('reload');
$('#Scenedialog').window('close');
}
$.tools.alert(r.Message);
}
});
}
</script>

View File

@@ -0,0 +1,46 @@
<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<dynamic>" %>
<table id="dgAppService" class="easyui-datagrid" style="width:100%; height:auto;"
data-options="
toolbar: '#tbAppService',
border: false,
singleSelect: true,
rownumbers: true,
striped: true,
fit: true,
fitColumns: true,
method: 'POST',
url: '/MobileApp/LoadServices/'
">
<thead>
<tr>
<th data-options="field:'Name',width:100,resizable:false">
<%: Html.Language("ServiceName")%>
</th>
<th data-options="
field: 'AppApply',
align: 'center',
resizable:false,
formatter: appApplyFormatter
">
<%: Html.Language("Display")%>
</th>
</tr>
</thead>
</table>
<div id="tbAppService">
<a href="javascript:void(0)" class="easyui-linkbutton" data-options="iconCls:'icon-reload',plain:true" onclick="$('#dgAppService').datagrid('reload')"><%: Html.Language("Refresh")%></a>
</div>
<script type="text/javascript">
function appApplyFormatter(val,row) {
if (val) {
return '<input type="checkbox" checked="checked" onchange="appApplyOnChange(this,\'' + row.Type + '\',\'' + row.Code + '\')" />';
} else {
return '<input type="checkbox" onchange="appApplyOnChange(this,\'' + row.Type + '\',\'' + row.Code + '\')" />';
}
}
function appApplyOnChange(sender,type,code) {
var params = { Type: type, Code: code, AppApply: $(sender).is(":checked") };
$.tools.post(params, '/MobileApp/SaveService/');
}
</script>

View File

@@ -0,0 +1,20 @@
<%@ 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("MobileClientManagement")%>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
<div class="easyui-tabs" data-options="plain:true,fit:true">
<div title='<%: Html.Language("MenuSettings")%>' data-options="href:'/MobileApp/AppMenu/'"></div>
<div title='<%: Html.Language("HotelIntroduction")%>' data-options="href:'/MobileApp/AppHotel/'"></div>
<div title='<%: Html.Language("ServiceInformation")%>' data-options="href:'/MobileApp/Service/'"></div>
<div title='<%: Html.Language("LightControl")%>' data-options="href:'/MobileApp/Light/'"></div>
<div title='<%: Html.Language("SceneControl")%>' data-options="href:'/MobileApp/Scene/'"></div>
<div title='<%: Html.Language("PADRoomNumberSetting")%>' data-options="href:'/MobileApp/AppRoom/'"></div>
<%--<div title='<%: Html.Language("WXMenu")%>' data-options="href:'/MobileApp/WXMenu/'"></div>--%>
</div>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ScriptContent" runat="server">
</asp:Content>

View File

@@ -0,0 +1,51 @@
<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<dynamic>" %>
<table id="dgWXMenu" class="easyui-datagrid" style="width:100%; height:auto;"
data-options="
toolbar: '#tbWXMenu',
border: false,
singleSelect: true,
rownumbers: true,
striped: true,
fit: true,
fitColumns: true,
idField: 'ID',
method: 'POST',
url: '/MobileApp/LoadMenus/',
queryParams: { type:1}
">
<thead>
<tr>
<th data-options="field:'Name',width:100,resizable:false">
<%: Html.Language("MenuName")%>
</th>
<th data-options="field:'Sort',sortable:true,align:'center',resizable:false">
<%: Html.Language("Sort")%>
</th>
<th data-options="
field: 'ActiveIndicator',
align: 'center',
resizable:false,
formatter: appApplyWXFormatter
">
<%: Html.Language("Display")%>
</th>
</tr>
</thead>
</table>
<div id="tbWXMenu">
<a href="javascript:void(0)" class="easyui-linkbutton" data-options="iconCls:'icon-reload',plain:true" onclick="$('#dgWXMenu').datagrid('reload')"><%: Html.Language("Refresh")%></a>
</div>
<script type="text/javascript">
function appApplyWXFormatter(val, row) {
if (val) {
return '<input type="checkbox" checked="checked" onchange="appApplyWXOnChange(this,\'' + row.ID + '\',\'' + row.Name + '\')" />';
} else {
return '<input type="checkbox" onchange="appApplyWXOnChange(this,\'' + row.ID + '\',\'' + row.Name + '\')" />';
}
}
function appApplyWXOnChange(sender, id, name) {
var params = { id: id, activeIndicator: $(sender).is(":checked") };
$.tools.post(params, '/MobileApp/SaveWXMenu/');
}
</script>

View File

@@ -0,0 +1,504 @@
<%@ Page Language="C#" MasterPageFile="~/Views/Shared/MasterPage.Master" Inherits="System.Web.Mvc.ViewPage<dynamic>" %>
<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
<%: Html.Language("AirConditioningMgmt")%>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
<div class="easyui-layout" data-options="fit:true">
<div title='<%: Html.Language("AirConditioningMgmt")%>' style="border-right:1px solid #95B8E7;" data-options="region:'center',border:false">
<table id="dg" class="easyui-datagrid" style="width:100%; height:auto;"
data-options="
toolbar: '#tb',
border: false,
singleSelect: true,
pagination: true,
pageSize: 20,
rownumbers: true,
sortName: 'Name',
sortOrder: 'asc',
fit: true,
fitColumns: true,
striped: true,
idField: 'ID',
frozenColumns: [[
{ field: 'ID', checkbox: true }
]],
url: '/Model/LoadAllByPage/',
method: 'post',
onDblClickRow: function(rowIndex, rowData) { editModel(rowData); },
onSelect: dgOnSelect
">
<thead>
<tr>
<th data-options="field:'Name',width:60,sortable:true">
<%: Html.Language("Name")%>
</th>
<th data-options="field:'CorrectedTemp',sortable:true">
<%: Html.Language("CorrectedTemp")%>
</th>
<th data-options="field:'ModifiedDate',sortable:true,formatter:$.tools.formatDateTime">
<%: Html.Language("ModifiedDate")%>
</th>
<th data-options="field:'ApplyDate',sortable:true,formatter:$.tools.formatDateTime">
<%: Html.Language("ApplyDate")%>
</th>
<th data-options="field:'ApplyUser',sortable:true">
<%: Html.Language("ApplyUser")%>
</th>
</tr>
</thead>
</table>
<div id="tb">
<a href="javascript:void(0)" class="easyui-linkbutton" data-options="iconCls:'icon-reload',plain:true" onclick="$('#dg').datagrid('reload');"><%: Html.Language("Refresh")%></a>
<a href="javascript:void(0)" class="easyui-linkbutton" data-options="iconCls:'icon-add',plain:true" onclick="addModel()"><%: Html.Language("New")%></a>
<a href="javascript:void(0)" class="easyui-linkbutton" data-options="iconCls:'icon-edit',plain:true" onclick="editModel()"><%: Html.Language("Edit")%></a>
<a href="javascript:void(0)" class="easyui-linkbutton" data-options="iconCls:'icon-remove',plain:true" onclick="delModel()"><%: Html.Language("Delete")%></a>
<a href="javascript:void(0)" class="easyui-linkbutton" data-options="iconCls:'icon-update',plain:true" onclick="apply()"><%: Html.Language("Apply")%></a>
</div>
</div>
<div id="editModel" class="easyui-window" title='<%: Html.Language("EditEnergySavingMode")%>' style="width:620px; height:500px;padding: 5px;"
closed="true" modal="true" collapsible="false" minimizable="false" maximizable="false">
<div class="easyui-layout" fit="true">
<div data-options="region:'center'">
<div style="height:240px;padding:10px;">
<form id="editModelForm" method="post" action="#">
<input type="hidden" name="ID" value="0" />
<ul id="ulModel">
<li>
<span><%: Html.Language("Name")%>&nbsp;</span>
<input name="Name" class="easyui-validatebox textbox text" data-options="required:true" />
</li>
<li>
<span><%: Html.Language("CorrectedTemp")%>&nbsp;</span>
<input id="txtCorrectedTemp" name="CorrectedTemp" class="easyui-numberbox textbox text" style="width:80px;" data-options="required:true" value="0" />
</li>
<li><hr /></li>
<li>
<span></span>
<input name="FanRunStatus" type="checkbox" value="true" /><%: Html.Language("RTSTATFKRALSP")%>
</li>
<li><hr /></li>
<li>
<span><%: Html.Language("WTNOITRFS")%>&nbsp;</span>
<input name="ExhaustFanStatus" type="radio" value="0" /><%: Html.Language("Close")%>
<input name="ExhaustFanStatus" type="radio" value="1" checked="checked" /><%: Html.Language("Open")%>
<input name="ExhaustFanStatus" type="radio" value="2" /><%: Html.Language("TimedOpening")%>&nbsp;
<%: Html.Language("TimingLength")%><input id="txtExhausFanTime" name="ExhausFanTime" class="easyui-numberbox textbox text" disabled="disabled" style="width:80px;" value="0" /><%: Html.Language("MinutesHour")%>
</li>
<li><hr /></li>
<li>
<span><%: Html.Language("InfraredDelayPowerOffTime")%></span>
<input id="txtInfraredDelayPO" name="InfraredDelayPO" class="easyui-numberbox textbox text" style="width:80px;" value="0" />
<span><%: Html.Language("MagneticDelayPowerOffTime")%></span>
<input id="txtDoorDelayPO" name="DoorDelayPO" class="easyui-numberbox textbox text" style="width:80px;" value="0" />
</li>
<li>
<span><%: Html.Language("PullTheCardDelayedPowerOffTime")%></span>
<input id="txtPullCardDelayPO" name="PullCardDelayPO" class="easyui-numberbox textbox text" style="width:80px;" value="0" />
</li>
</ul>
</form>
</div>
<div style="height:160px;">
<table id="dgModelDetail" title='<%: Html.Language("FanStatus")%>' class="easyui-datagrid" style="width:100%;border-top:1px solid #95B8E7;"
data-options="
border: true,
singleSelect: true,
fit: true,
striped: true,
idField: 'ID',
method: 'post'
">
<thead>
<tr>
<th data-options="field:'ModelStatus',width:50,align:'center'">
<%: Html.Language("Status")%>
</th>
<th data-options="field:'OnOff',width:50,align:'center',
formatter: function(val) { return val == 0 ?lang.Close : lang.Open; },
editor: {
type: 'combobox',
options: {
panelHeight: 'auto',
data: [
{ value: 0, text: lang.Close },
{ value: 1, text: lang.Open }
]
}
}">
<%: Html.Language("Switch")%>
</th>
<th data-options="field:'ModelType',width:50,align:'center',
formatter: function(val) { return val == 0 ? lang.Manually : lang.Automatic; },
editor: {
type: 'combobox',
options: {
panelHeight: 'auto',
data: [
{ value: 1, text: lang.Automatic },
{ value: 0, text: lang.Manually}
]
}
}
">
<%: Html.Language("Type")%>
</th>
<th data-options="field:'Speed',width:50,align:'center',
formatter: function(val) {
if(val == 0) {
return lang.Stop;
} else if(val == 1) {
return lang.low;
} else if(val == 2) {
return lang.Middle;
} else if(val == 3) {
return lang.HighSpeed;
}
return '';
},
editor: {
type: 'combobox',
options: {
panelHeight: 'auto',
data: [
{ value: 0, text: lang.Stop },
{ value: 1, text: lang.low },
{ value: 2, text: lang.Middle },
{ value: 3, text: lang.HighSpeed },
]
}
}
">
<%: Html.Language("Speed")%>
</th>
<th data-options="field:'SummerTemp',width:60,align:'center',
editor: {
type: 'numberbox'
}
">
<%: Html.Language("SummerTemp")%>
</th>
<th data-options="field:'WinterTemp',width:60,align:'center',
editor: {
type: 'numberbox'
}
">
<%: Html.Language("WinterTemp")%>
</th>
<th data-options="field:'TimingControl',width:60,align:'center',
formatter: function(val) {
if(typeof val === 'string') {
val = eval(val.toLowerCase());
}
return val ? lang.Yes : lang.No;
},
editor: {
type: 'checkbox',
options: {
on: true,
off: false,
}
}">
<%: Html.Language("TimingControl")%>
</th>
<th data-options="field:'Timer',width:150,align:'center',
editor: {
type: 'numberbox',
options: {
min:0,
}
}
">
<%: Html.Language("TimeLength")%>
</th>
<th data-options="field:'AllowElectric',width:60,align:'center',
formatter: function(val) {
if(typeof val === 'string') {
val = eval(val.toLowerCase());
}
return val ? lang.Yes : lang.No;
},
editor: {
type: 'checkbox',
options: {
on: true,
off: false,
}
}
">
<%: Html.Language("AllowElectric")%>
</th>
</tr>
</thead>
</table>
</div>
</div>
<div data-options="region:'south',border:false" style="text-align: right; padding: 5px 0 0;">
<a class="easyui-linkbutton" data-options="iconCls:'icon-save'" href="javascript:void(0)" onclick="saveModel()"><%: Html.Language("Save")%></a>
<a class="easyui-linkbutton" data-options="iconCls:'icon-cancel'" href="javascript:void(0)" onclick="$('#editModel').window('close')"><%: Html.Language("Cancel")%></a>
</div>
</div>
</div>
<div style="width:200px;border-left:1px solid #95B8E7;" data-options="region:'east',title:lang.GuestRoom,split:true,border:false">
<ul id="groupTree" class="easyui-tree" data-options="checkbox:true,animate:true,lines:true,url:'/Model/LoadGroupTreeWithRoom/'"></ul>
</div>
<div id="editGroup" class="easyui-window" title='<%: Html.Language("NewGroup")%>' style="width: 300px; height: 200px;padding: 5px;"
closed="true" modal="true" collapsible="false" minimizable="false" maximizable="false">
<div class="easyui-layout" fit="true">
<div data-options="region:'center'">
<form id="groupForm" class="easyui-form" method="post" data-options="novalidate:true">
<table style="margin: 20px auto;" cellpadding="3">
<tr>
<td class="align-right">
<%: Html.Language("Name")%>
</td>
<td>
<input id="txtGroupName" name="Name" class="easyui-validatebox textbox text" data-options="required:true,validType:'length[3,20]'" />
</td>
</tr>
<tr>
<td class="align-right">
<%: Html.Language("Sort")%>
</td>
<td>
<input id="txtGroupSort" name="Sort" class="easyui-numberspinner text" value="1" style="width:60px;" data-options="required:true,min:1" />
</td>
</tr>
</table>
</form>
</div>
<div data-options="region:'south',border:false" style="text-align: right; padding: 5px 0 0;">
<a class="easyui-linkbutton" data-options="iconCls:'icon-save'" href="javascript:void(0)" onclick="group.save();"><%: Html.Language("Save")%></a>
<a class="easyui-linkbutton" data-options="iconCls:'icon-cancel'" href="javascript:void(0)" onclick="$('#editGroup').window('close');"><%: Html.Language("Cancel")%></a>
</div>
</div>
</div>
</div>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ScriptContent" runat="server">
<script type="text/javascript" language="javascript">
function addModel() {
$("#editModelForm").form("reset");
$("#dgModelDetail").datagrid({ url: "/Model/LoadModelDetail/", queryParams: {} });
$("#editModel").window({ title: lang.NewEnergySavingMode }).window("open");
}
function editModel(row) {
var selectedRow = null;
if (row !== null && typeof (row) === "object") {
selectedRow = row;
} else {
selectedRow = $('#dg').datagrid('getSelected');
}
if (selectedRow) {
$("#editModelForm").form("load", selectedRow);
$("#dgModelDetail").datagrid({
url: "/Model/LoadModelDetail/",
queryParams: { modelId: selectedRow.ID }
});
$("#editModel").window({ title: lang.EditEnergySavingMode+"" + selectedRow.Name }).window("open");
} else {
$.tools.alert(lang.PleaseSelectTheData);
}
}
function delModel() {
var rows = $('#dg').datagrid('getSelections');
if (!rows || rows.length == 0) {
$.tools.alert(lang.PleaseSelectTheData);
return;
}
var param;
$.each(rows, function (i, n) {
if (i == 0) {
param = "idList=" + n.ID + "&nameList=" + n.Name;
} else {
param += "&idList=" + n.ID + "&nameList=" + n.Name;
}
});
$.tools.delPost(param, "/Model/Delete/", function () {
$('#dg').datagrid("clearSelections");
$('#dg').datagrid("reload");
}, this);
}
function saveModel() {
if ($("#editModelForm").form("enableValidation").form("validate")) {
var entry = {};
entry.ID = $("#editModelForm input[name='ID']").val();
entry.Name = $("#editModelForm input[name='Name']").val();
entry.CorrectedTemp = $("#txtCorrectedTemp").numberbox("getValue");
entry.FanRunStatus = $("#editModelForm input[name='FanRunStatus']").is(":checked");
entry.ExhaustFanStatus = $("#editModelForm input[name='ExhaustFanStatus']:checked").val();
entry.ExhausFanTime = $("#txtExhausFanTime").numberbox("getValue");
entry.InfraredDelayPO = $("#txtInfraredDelayPO").numberbox("getValue");
entry.DoorDelayPO = $("#txtDoorDelayPO").numberbox("getValue");
entry.PullCardDelayPO = $("#txtPullCardDelayPO").numberbox("getValue");
entry.Details = $("#dgModelDetail").datagrid("getRows");
var param = { jsonData: JSON.stringify(entry) };
$.tools.post(param, "/Model/Save/", function () {
$('#dg').datagrid("reload");
$('#editModel').window('close');
}, this);
}
}
function apply() {
var row = $("#dg").datagrid("getSelected");
if (row == null) {
$.tools.alert(lang.PCACCS);
return;
}
var nodes = $("#groupTree").tree("getChecked");
if (nodes.length == 0) {
$.tools.alert(lang.PleaseSelectRoom);
return;
}
var hostIDs = [];
for (var i in nodes) {
if (nodes[i].attributes.isHost) {
hostIDs.push(nodes[i].id);
}
}
var param = { modelID: row.ID, hostIDs: JSON.stringify(hostIDs) };
$.tools.confrimPost(lang.CAACCS, param, "/Model/Apply/");
}
//扩展 easyui-datagrid 单击单元格时进入编辑状态
$.extend($.fn.datagrid.methods, {
editCell: function (jq, param) {
return jq.each(function () {
var opts = $(this).datagrid('options');
var fields = $(this).datagrid('getColumnFields', true).concat($(this).datagrid('getColumnFields'));
for (var i = 0; i < fields.length; i++) {
var col = $(this).datagrid('getColumnOption', fields[i]);
col.editor1 = col.editor;
if (fields[i] != param.field) {
col.editor = null;
}
}
$(this).datagrid('beginEdit', param.index);
var ed = $(this).datagrid('getEditor', param);
if (ed) {
if ($(ed.target).hasClass('textbox-f')) {
$(ed.target).textbox('textbox').focus();
} else {
$(ed.target).focus();
}
}
for (var i = 0; i < fields.length; i++) {
var col = $(this).datagrid('getColumnOption', fields[i]);
col.editor = col.editor1;
}
});
},
enableCellEditing: function (jq) {
return jq.each(function () {
var dg = $(this);
var opts = dg.datagrid('options');
opts.oldOnClickCell = opts.onClickCell;
opts.onClickCell = function (index, field) {
if (opts.editIndex != undefined) {
if (dg.datagrid('validateRow', opts.editIndex)) {
dg.datagrid('endEdit', opts.editIndex);
opts.editIndex = undefined;
} else {
return;
}
}
dg.datagrid('selectRow', index).datagrid('editCell', {
index: index,
field: field
});
opts.editIndex = index;
opts.oldOnClickCell.call(this, index, field);
}
});
}
});
function dgOnSelect(index, row) {
$("#groupTree").tree({ url: "/Model/LoadGroupTreeWithRoom/", queryParams: { modelID: row.ID} });
}
$(function () {
$("#dgModelDetail").datagrid("enableCellEditing");
$("#editModelForm input[name='ExhaustFanStatus']").on("change", function () {
if (this.value == 2) {
$("#txtExhausFanTime").numberbox("enable");
} else {
$("#txtExhausFanTime").numberbox("disable");
}
});
});
</script>
<style type="text/css">
#ulModel {
list-style-type:none;
margin:0px;
padding:0px;
}
#ulModel li {
/*background:pink;*/
padding:5px 0;
}
#ulModel li hr{
border:none;
border-top:1px solid #ccc;
height:0px;
margin:0px;
padding:0px;
}
#ulModel li span {
display:inline-block;
text-align:right;
width:150px;
}
</style>
</asp:Content>

View File

@@ -0,0 +1,515 @@
<%@ 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("AirConditioningMgmt")%>
</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="overflow: hidden; height: 30px;">
<div class="toolbar">
<a href="javascript:void(0)" class="toolbar-button tb-icon-refresh" onclick="$('#dg').datagrid('reload');">
<%: Html.Language("Refresh")%></a> <a href="javascript:void(0)" class="toolbar-button tb-icon-add"
onclick="addModel()">
<%: Html.Language("New")%></a> <a href="javascript:void(0)" class="toolbar-button tb-icon-edit"
onclick="editModel()">
<%: Html.Language("Edit")%></a> <a href="javascript:void(0)" class="toolbar-button tb-icon-remove"
onclick="delModel()">
<%: Html.Language("Delete")%></a> <a href="javascript:void(0)" class="toolbar-button tb-icon-apply"
onclick="apply()">
<%: Html.Language("Apply")%></a>
</div>
</div>
<div style="border-right: 1px solid #95B8E7;" data-options="region:'center',border:false">
<table id="dg" class="easyui-datagrid" style="width: 100%; height: auto;" data-options="
toolbar: '#tb',
border: false,
singleSelect: true,
pagination: true,
pageSize: 20,
rownumbers: true,
sortName: 'Name',
sortOrder: 'asc',
fit: true,
fitColumns: true,
striped: true,
idField: 'ID',
frozenColumns: [[
{ field: 'ID', checkbox: true }
]],
url: '/Model/LoadAllByPage/',
method: 'post',
onDblClickRow: function(rowIndex, rowData) { editModel(rowData); },
onSelect: dgOnSelect
">
<thead>
<tr>
<th data-options="field:'Name',width:60,sortable:true">
<%: Html.Language("Name")%>
</th>
<th data-options="field:'CorrectedTemp',sortable:true">
<%: Html.Language("CorrectedTemp")%>
</th>
<th data-options="field:'ModifiedDate',sortable:true,formatter:$.tools.formatDateTime">
<%: Html.Language("ModifiedDate")%>
</th>
<th data-options="field:'ApplyDate',sortable:true,formatter:$.tools.formatDateTime">
<%: Html.Language("ApplyDate")%>
</th>
<th data-options="field:'ApplyUser',sortable:true">
<%: Html.Language("ApplyUser")%>
</th>
</tr>
</thead>
</table>
</div>
<div id="editModel" class="easyui-window" title='<%: Html.Language("EditEnergySavingMode")%>'
style="width: 620px; height: 500px; padding: 5px;" closed="true" modal="true"
collapsible="false" minimizable="false" maximizable="false">
<div class="easyui-layout" fit="true">
<div data-options="region:'center'">
<div style="height: 240px; padding: 10px;">
<form id="editModelForm" method="post" action="#">
<input type="hidden" name="ID" value="0" />
<ul id="ulModel">
<li><span>
<%: Html.Language("Name")%>&nbsp;</span>
<input name="Name" class="easyui-validatebox textbox text" data-options="required:true" />
</li>
<li><span>
<%: Html.Language("CorrectedTemp")%>&nbsp;</span>
<input id="txtCorrectedTemp" name="CorrectedTemp" class="easyui-numberbox textbox text"
style="width: 80px;" data-options="required:true" value="0" />
</li>
<li>
<hr />
</li>
<li><span></span>
<input name="FanRunStatus" type="checkbox" value="true" /><%: Html.Language("RTSTATFKRALSP")%>
</li>
<li>
<hr />
</li>
<li><span>
<%: Html.Language("WTNOITRFS")%>
&nbsp;</span>
<input name="ExhaustFanStatus" type="radio" value="0" /><%: Html.Language("Close")%>
<input name="ExhaustFanStatus" type="radio" value="1" checked="checked" /><%: Html.Language("Open")%>
<input name="ExhaustFanStatus" type="radio" value="2" /><%: Html.Language("TimedOpening")%>&nbsp;
<%: Html.Language("TimingLength")%><input id="txtExhausFanTime" name="ExhausFanTime"
class="easyui-numberbox textbox text" disabled="disabled" style="width: 80px;"
value="0" /><%: Html.Language("MinutesHour")%>
</li>
<li>
<hr />
</li>
<li><span>
<%: Html.Language("InfraredDelayPowerOffTime")%></span>
<input id="txtInfraredDelayPO" name="InfraredDelayPO" class="easyui-numberbox textbox text"
style="width: 80px;" value="0" />
<span>
<%: Html.Language("MagneticDelayPowerOffTime")%></span>
<input id="txtDoorDelayPO" name="DoorDelayPO" class="easyui-numberbox textbox text"
style="width: 80px;" value="0" />
</li>
<li><span>
<%: Html.Language("PullTheCardDelayedPowerOffTime")%></span>
<input id="txtPullCardDelayPO" name="PullCardDelayPO" class="easyui-numberbox textbox text"
style="width: 80px;" value="0" />
</li>
</ul>
</form>
</div>
<div style="height: 160px;">
<table id="dgModelDetail" title='<%: Html.Language("FanStatus")%>' class="easyui-datagrid"
style="width: 100%; border-top: 1px solid #95B8E7;" data-options="
border: true,
singleSelect: true,
fit: true,
striped: true,
idField: 'ID',
method: 'post'
">
<thead>
<tr>
<th data-options="field:'ModelStatus',width:50,align:'center'">
<%: Html.Language("Status")%>
</th>
<th data-options="field:'OnOff',width:50,align:'center',
formatter: function(val) { return val == 0 ? lang.Close : lang.Open; },
editor: {
type: 'combobox',
options: {
panelHeight: 'auto',
data: [
{ value: 0, text: lang.Close },
{ value: 1, text: lang.Open }
]
}
}">
<%: Html.Language("Switch")%>
</th>
<th data-options="field:'ModelType',width:50,align:'center',
formatter: function(val) { return val == 0 ? lang.Manually : lang.Automatic; },
editor: {
type: 'combobox',
options: {
panelHeight: 'auto',
data: [
{ value: 1, text: lang.Automatic },
{ value: 0, text: lang.Manually' }
]
}
}
">
<%: Html.Language("Type")%>
</th>
<th data-options="field:'Speed',width:50,align:'center',
formatter: function(val) {
if(val == 0) {
return lang.Stop;
} else if(val == 1) {
return lang.low;
} else if(val == 2) {
return lang.Middle;
} else if(val == 3) {
return lang.HighSpeed;
}
return '';
},
editor: {
type: 'combobox',
options: {
panelHeight: 'auto',
data: [
{ value: 0, text: lang.Stop },
{ value: 1, text: lang.low },
{ value: 2, text: lang.Middle },
{ value: 3, text: lang.HighSpeed },
]
}
}
">
<%: Html.Language("Speed")%>
</th>
<th data-options="field:'SummerTemp',width:60,align:'center',
editor: {
type: 'numberbox'
}
">
<%: Html.Language("SummerTemp")%>
</th>
<th data-options="field:'WinterTemp',width:60,align:'center',
editor: {
type: 'numberbox'
}
">
<%: Html.Language("WinterTemp")%>
</th>
<th data-options="field:'TimingControl',width:60,align:'center',
formatter: function(val) {
if(typeof val === 'string') {
val = eval(val.toLowerCase());
}
return val ? lang.Yes : lang.No;
},
editor: {
type: 'checkbox',
options: {
on: true,
off: false,
}
}">
<%: Html.Language("TimingControl")%>
</th>
<th data-options="field:'Timer',width:150,align:'center',
editor: {
type: 'numberbox',
options: {
min:0,
}
}
">
<%: Html.Language("TimeLength")%>
</th>
<th data-options="field:'AllowElectric',width:60,align:'center',
formatter: function(val) {
if(typeof val === 'string') {
val = eval(val.toLowerCase());
}
return val ? lang.Yes : lang.No;
},
editor: {
type: 'checkbox',
options: {
on: true,
off: false,
}
}
">
<%: Html.Language("AllowElectric")%>
</th>
</tr>
</thead>
</table>
</div>
</div>
<div data-options="region:'south',border:false" style="text-align: right; padding: 5px 0 0;">
<a class="easyui-linkbutton" data-options="iconCls:'icon-save'" href="javascript:void(0)"
onclick="saveModel()">
<%: Html.Language("Save")%></a> <a class="easyui-linkbutton" data-options="iconCls:'icon-cancel'"
href="javascript:void(0)" onclick="$('#editModel').window('close')">
<%: Html.Language("Cancel")%></a>
</div>
</div>
</div>
<div style="width: 200px; border-left: 1px solid #95B8E7;" data-options="region:'east',title:lang.GuestRoom,split:true,border:false">
<ul id="groupTree" class="easyui-tree" data-options="checkbox:true,animate:true,lines:true,url:'/Model/LoadGroupTreeWithRoom/'">
</ul>
</div>
<div id="editGroup" class="easyui-window" title='<%: Html.Language("NewGroup")%>'
style="width: 300px; height: 200px; padding: 5px;" closed="true" modal="true"
collapsible="false" minimizable="false" maximizable="false">
<div class="easyui-layout" fit="true">
<div data-options="region:'center'">
<form id="groupForm" class="easyui-form" method="post" data-options="novalidate:true">
<table style="margin: 20px auto;" cellpadding="3">
<tr>
<td class="align-right">
<%: Html.Language("Name")%>
</td>
<td>
<input id="txtGroupName" name="Name" class="easyui-validatebox textbox text" data-options="required:true,validType:'length[3,20]'" />
</td>
</tr>
<tr>
<td class="align-right">
<%: Html.Language("Sort")%>
</td>
<td>
<input id="txtGroupSort" name="Sort" class="easyui-numberspinner text" value="1"
style="width: 60px;" data-options="required:true,min:1" />
</td>
</tr>
</table>
</form>
</div>
<div data-options="region:'south',border:false" style="text-align: right; padding: 5px 0 0;">
<a class="easyui-linkbutton" data-options="iconCls:'icon-save'" href="javascript:void(0)"
onclick="group.save();">
<%: Html.Language("Save")%></a> <a class="easyui-linkbutton" data-options="iconCls:'icon-cancel'"
href="javascript:void(0)" onclick="$('#editGroup').window('close');">
<%: Html.Language("Cancel")%></a>
</div>
</div>
</div>
</div>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ScriptContent" runat="server">
<script type="text/javascript" language="javascript">
function addModel() {
$("#editModelForm").form("reset");
$("#dgModelDetail").datagrid({ url: "/Model/LoadModelDetail/", queryParams: {} });
$("#editModel").window({ title: lang.NewEnergySavingMode }).window("open");
}
function editModel(row) {
var selectedRow = null;
if (row !== null && typeof (row) === "object") {
selectedRow = row;
} else {
selectedRow = $('#dg').datagrid('getSelected');
}
if (selectedRow) {
$("#editModelForm").form("load", selectedRow);
$("#dgModelDetail").datagrid({
url: "/Model/LoadModelDetail/",
queryParams: { modelId: selectedRow.ID }
});
$("#editModel").window({ title: lang.EditEnergySavingMode + "" + selectedRow.Name }).window("open");
} else {
$.tools.alert(lang.PleaseSelectTheData);
}
}
function delModel() {
var rows = $('#dg').datagrid('getSelections');
if (!rows || rows.length == 0) {
$.tools.alert(lang.PleaseSelectTheData);
return;
}
var param;
$.each(rows, function (i, n) {
if (i == 0) {
param = "idList=" + n.ID + "&nameList=" + n.Name;
} else {
param += "&idList=" + n.ID + "&nameList=" + n.Name;
}
});
$.tools.delPost(param, "/Model/Delete/", function () {
$('#dg').datagrid("clearSelections");
$('#dg').datagrid("reload");
}, this);
}
function saveModel() {
if ($("#editModelForm").form("enableValidation").form("validate")) {
var entry = {};
entry.ID = $("#editModelForm input[name='ID']").val();
entry.Name = $("#editModelForm input[name='Name']").val();
entry.CorrectedTemp = $("#txtCorrectedTemp").numberbox("getValue");
entry.FanRunStatus = $("#editModelForm input[name='FanRunStatus']").is(":checked");
entry.ExhaustFanStatus = $("#editModelForm input[name='ExhaustFanStatus']:checked").val();
entry.ExhausFanTime = $("#txtExhausFanTime").numberbox("getValue");
entry.InfraredDelayPO = $("#txtInfraredDelayPO").numberbox("getValue");
entry.DoorDelayPO = $("#txtDoorDelayPO").numberbox("getValue");
entry.PullCardDelayPO = $("#txtPullCardDelayPO").numberbox("getValue");
entry.Details = $("#dgModelDetail").datagrid("getRows");
var param = { jsonData: JSON.stringify(entry) };
$.tools.post(param, "/Model/Save/", function () {
$('#dg').datagrid("reload");
$('#editModel').window('close');
}, this);
}
}
function apply() {
var row = $("#dg").datagrid("getSelected");
if (row == null) {
$.tools.alert(lang.PCACCS);
return;
}
var nodes = $("#groupTree").tree("getChecked");
if (nodes.length == 0) {
$.tools.alert(lang.PleaseSelectRoom);
return;
}
var hostIDs = [];
for (var i in nodes) {
if (nodes[i].attributes.isHost) {
hostIDs.push(nodes[i].id);
}
}
var param = { modelID: row.ID, hostIDs: JSON.stringify(hostIDs) };
$.tools.confrimPost(lang.CAACCS, param, "/Model/Apply/");
}
//扩展 easyui-datagrid 单击单元格时进入编辑状态
$.extend($.fn.datagrid.methods, {
editCell: function (jq, param) {
return jq.each(function () {
var opts = $(this).datagrid('options');
var fields = $(this).datagrid('getColumnFields', true).concat($(this).datagrid('getColumnFields'));
for (var i = 0; i < fields.length; i++) {
var col = $(this).datagrid('getColumnOption', fields[i]);
col.editor1 = col.editor;
if (fields[i] != param.field) {
col.editor = null;
}
}
$(this).datagrid('beginEdit', param.index);
var ed = $(this).datagrid('getEditor', param);
if (ed) {
if ($(ed.target).hasClass('textbox-f')) {
$(ed.target).textbox('textbox').focus();
} else {
$(ed.target).focus();
}
}
for (var i = 0; i < fields.length; i++) {
var col = $(this).datagrid('getColumnOption', fields[i]);
col.editor = col.editor1;
}
});
},
enableCellEditing: function (jq) {
return jq.each(function () {
var dg = $(this);
var opts = dg.datagrid('options');
opts.oldOnClickCell = opts.onClickCell;
opts.onClickCell = function (index, field) {
if (opts.editIndex != undefined) {
if (dg.datagrid('validateRow', opts.editIndex)) {
dg.datagrid('endEdit', opts.editIndex);
opts.editIndex = undefined;
} else {
return;
}
}
dg.datagrid('selectRow', index).datagrid('editCell', {
index: index,
field: field
});
opts.editIndex = index;
opts.oldOnClickCell.call(this, index, field);
}
});
}
});
function dgOnSelect(index, row) {
$("#groupTree").tree({ url: "/Model/LoadGroupTreeWithRoom/", queryParams: { modelID: row.ID} });
}
$(function () {
$("#dgModelDetail").datagrid("enableCellEditing");
$("#editModelForm input[name='ExhaustFanStatus']").on("change", function () {
if (this.value == 2) {
$("#txtExhausFanTime").numberbox("enable");
} else {
$("#txtExhausFanTime").numberbox("disable");
}
});
});
</script>
<style type="text/css">
#ulModel
{
list-style-type: none;
margin: 0px;
padding: 0px;
}
#ulModel li
{
/*background:pink;*/
padding: 5px 0;
}
#ulModel li hr
{
border: none;
border-top: 1px solid #ccc;
height: 0px;
margin: 0px;
padding: 0px;
}
#ulModel li span
{
display: inline-block;
text-align: right;
width: 150px;
}
</style>
</asp:Content>

View File

@@ -0,0 +1,78 @@
<%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage<dynamic>" %>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width,user-scalable=no,initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0" />
<title>宝来威智能设备授权</title>
<style type="text/css">
body
{
font-size: 16pt;
}
</style>
<script type="text/javascript" src="/Scripts/jquery.min.js"></script>
<script type="text/javascript">
$(function () {
$('#login').click(function () {
var account = $("#txtAccount").val().trim();
if (account === '') {
$("#msg").html('请输入用户名');
return;
}
var password = $("#txtPassword").val().trim();
if (password === '') {
$("#msg").html('请输入密码');
return;
}
$('#login').attr("disabled", true);
$.ajax({
dataType: 'JSON',
type: "POST",
url: "/Oauth2/LoginOn/",
data: { jsonData: "{account: '" + account + "', password: '" + password + "', client_id: '" + $('#client_id').val() + "', redirect_uri: '" + $('#redirect_uri').val() + "', state: '" + $('#state').val() + "'}" },
success: function (r) {
$('#login').attr("disabled", false);
if (r && r.IsSuccess) {
window.location = r.Message;
} else {
$("#msg").html(r.Message);
}
}
});
});
});
</script>
</head>
<body>
<input id="client_id" type="hidden" value='<%=ViewData["client_id"] %>' />
<input id="redirect_uri" type="hidden" value='<%=ViewData["redirect_uri"] %>' />
<input id="state" type="hidden" value='<%=ViewData["state"] %>' />
<div style="margin:0 auto; text-align:center; margin-top:200px;">
<table cellpadding="10" style="width:100%;">
<tr>
<td>宝来威智能设备授权</td>
</tr>
<tr>
<td>
<input id="txtAccount" name="Account" type="text" style="height:30px; font-weight:bold;" placeholder="请输入用户名" />
</td>
</tr>
<tr>
<td>
<input id="txtPassword" name="Password" type="password" style="height:30px; font-weight:bold;" placeholder="请输入密码" />
</td>
</tr>
<tr>
<td>
<a id="login" href="javascript:void(0)">登 录</a>
</td>
</tr>
<tr>
<td id="msg"></td>
</tr>
</table>
</div>
</body>
</html>

View File

@@ -0,0 +1,19 @@
<%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage<dynamic>" %>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width,user-scalable=no,initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0" />
<title>Oauth2.0授权</title>
<style type="text/css">
body {
font-size: 14pt;
}
</style>
</head>
<body>
<div>Oauth2.0授权</div>
</body>
</html>

View File

@@ -0,0 +1,90 @@
<%@ 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("LoopStateRecord")%>
</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">
<div class="toolbar" style="height: 35px;">
<label><%: Html.Language("AbnormalType")%></label>
<select id="cbxAbnormalType" class="easyui-combobox" style="width:300px;" data-options="
panelWidth: 300,
valueField: 'Value',
textField: 'Name',
editable: false,
value:1,
url: '/Overview/LoadAbnormalType/'
">
</select>
<%--<select id="cbxHotels" class="easyui-combogrid" style="width: 100px;" data-options="
panelWidth: 270,
multiple: true,
idField: 'ID',
textField: 'Name',
editable: false,
fitColumns: true,
url: '/SysHotel/LoadAll/',
columns:[[
{ field: 'ck',checkbox: true },
{ field: 'ID', title: 'ID' },
{ field: 'Code', title: '<%: Html.Language("Code")%>' },
{ field: 'Name', title: '<%: Html.Language("Name")%>' }
]]
">
</select>--%>
<a href="javascript:void(0)" class="toolbar-button tb-icon-search" onclick="query();">
<%: Html.Language("Query")%>
</a>
</div>
</div>
<div data-options="region:'center',border:false">
<table id="dg" class="easyui-datagrid" style="width: 100%; height: auto;"
data-options="
border: false,
singleSelect: true,
pagination: false,
pageSize: 50,
rownumbers: true,
striped: true,
sortName: 'StartTime',
sortOrder: 'desc',
fit: true,
fitColumns: true,
method: 'POST'
">
<thead>
<tr>
<%--<th data-options="field:'Name',sortable:false,resizable:false">
<%: Html.Language("Hotel")%>
</th>--%>
<th data-options="field:'AbnormalName',sortable:false,resizable:false">
<%: Html.Language("AbnormalName")%>
</th>
<th data-options="field:'RoomNumber',sortable:false,resizable:false">
<%: Html.Language("RoomNumber")%>
</th>
<th data-options="field:'UpdateTime',sortable:false,resizable:false">
<%: Html.Language("Time")%>
</th>
</tr>
</thead>
</table>
</div>
</div>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ScriptContent" runat="server">
<script type="text/javascript">
function query() {
//var hotels = $('#cbxHotels').combogrid('getValues');
var type = $('#cbxAbnormalType').combobox('getValue');
var params = {
type: type
};
$('#dg').datagrid({ url: '/Overview/LoadHostAbnormalRecords/', queryParams: params });
}
$(function () {
});
</script>
</asp:Content>

View File

@@ -0,0 +1,158 @@
<%@ 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("LoopStateRecord")%>
</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">
<div class="toolbar" style="height: 65px;">
<div>
<label><%: Html.Language("RoomNumber")%></label>
<select id="cbxRoomNumber" class="easyui-combobox" style="width:70px;"
data-options="
valueField: 'Value',
textField: 'Name',
editable: false,
url: '/Overview/LoadRoomNumbers/',
onSelect: cbxRoomNumberOnSelect
">
</select>
<label>
<%: Html.Language("StartDate")%></label>
<input id="txtStartTime" type="text" class="easyui-datetimebox" style="width: 130px;"
data-options="showSeconds:false" />
<label>
<%: Html.Language("Deadline")%></label>
<input id="txtEndTime" type="text" class="easyui-datetimebox" style="width: 130px;"
data-options="showSeconds:false" />
<a href="javascript:void(0)" class="toolbar-button tb-icon-search" onclick="query();">
<%: Html.Language("Query")%>
</a>
</div>
<div>
<label>
<%: Html.Language("LoopType")%></label>
<select id="cbxDeviceType" class="easyui-combobox" style="width: 80px;" data-options="
panelWidth: 100,
panelHeight: 'auto',
valueField: 'Value',
textField: 'Name',
editable: false,
url: '/RoomType/LoadDeviceTypes/',
onSelect: cbxDeviceTypeOnSelect
">
</select>
<label>
<%: Html.Language("Circuit")%></label>
<select id="cbdRoomTypeModals" class="easyui-combogrid" style="width: 100px;" data-options="
panelWidth: 270,
multiple: true,
idField: 'ModalAddress',
textField: 'Outlet',
editable: false,
fitColumns: true,
columns:[[
{ field: 'ck',checkbox: true },
{ field: 'RoomType', title: '<%: Html.Language("RoomType")%>' },
{ field: 'ModalAddress', title: '<%: Html.Language("ReturnAddress")%>' },
{ field: 'Outlet', title: '<%: Html.Language("DeliveryOutlet")%>' },
{ field: 'Name', title: '<%: Html.Language("LoopName")%>' }
]]
">
</select>
</div>
</div>
</div>
<div data-options="region:'center',border:false">
<table id="dg" class="easyui-datagrid" style="width: 100%; height: auto;"
data-options="
border: false,
singleSelect: true,
pagination: false,
pageSize: 50,
rownumbers: true,
striped: true,
sortName: 'RoomNumber',
sortOrder: 'asc',
fit: true,
fitColumns: true,
method: 'POST'
">
<thead>
<tr>
<th data-options="field:'RoomNumber',sortable:true,resizable:false">
<%: Html.Language("RoomNumber")%>
</th>
<th data-options="field:'ModalAddress',sortable:true,resizable:false">
<%: Html.Language("ReturnAddress")%>
</th>
<th data-options="field:'Name',sortable:true,resizable:false">
<%: Html.Language("Name")%>
</th>
<th data-options="field:'Type',sortable:true,resizable:false,formatter:formatType">
<%: Html.Language("Type")%>
</th>
<th data-options="field:'Value',sortable:true,resizable:false">
<%: Html.Language("Value")%>
</th>
<th data-options="field:'Date',sortable:true,resizable:false">
<%: Html.Language("Date")%>
</th>
</tr>
</thead>
</table>
</div>
</div>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ScriptContent" runat="server">
<script type="text/javascript">
function formatType(val) {
switch (val) {
case 1:
return "在线状态";
case 2:
return "电量";
case 3:
return "电流10MA";
case 4:
return "1901故障检测次数";
}
}
function query() {
var roomNumber = $('#cbxRoomNumber').combobox('getValue');
/*if (roomNumber == '') {
$.tools.alert(lang.PleaseEnterRoomNumber);
return;
}*/
var modalAddresses = $('#cbdRoomTypeModals').combogrid('getValues');
var params = {
RoomNumber: roomNumber,
StartTime: $('#txtStartTime').datetimespinner('getValue'),
EndTime: $('#txtEndTime').datetimespinner('getValue'),
DeviceType: $('#cbxDeviceType').combobox('getValue'),
ModalIds: modalAddresses.length > 0 ? "'" + modalAddresses.join("','") + "'" : ""
};
$('#dg').datagrid({ url: '/Overview/LoadHostFaultRecords/', queryParams: params });
}
function cbxDeviceTypeOnSelect(row) {
var roomNumber = $('#cbxRoomNumber').combobox('getValue');
if (roomNumber == '') {
$.tools.alert(lang.PleaseEnterRoomNumber);
return;
}
$('#cbdRoomTypeModals').combogrid({ url: '/RoomType/LoadRoomTypeModals', queryParams: { roomNumber: roomNumber, deviceType: row.Value} });
}
function cbxRoomNumberOnSelect(r) {
//$('#cbdRoomTypeModals').combogrid({ url: '/HostModalRecord/LoadModals', queryParams: { roomNumber: r.Value} });
$('#cbdRoomTypeModals').combogrid({ url: '/RoomType/LoadRoomTypeModals', queryParams: { roomNumber: r.Value, deviceType: $('#cbxDeviceType').combobox('getValue')} });
}
$(function () {
var curTime = new Date();
var startTime = new Date(curTime.getTime() - 1 * 24 * 60 * 60 * 1000);
$("#txtStartTime").datetimebox("setValue", startTime.format('yyyy-MM-dd hh:mm:ss'));
$("#txtEndTime").datetimebox("setValue", curTime.format('yyyy-MM-dd hh:mm:ss'));
});
</script>
</asp:Content>

View File

@@ -0,0 +1,166 @@
<%@ 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("LoopStateRecord")%>
</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">
<div class="toolbar" style="height: 65px;">
<div>
<label><%: Html.Language("RoomNumber")%></label>
<select id="cbxRoomNumber" class="easyui-combobox" style="width:70px;"
data-options="
valueField: 'Value',
textField: 'Name',
editable: false,
url: '/HostModalRecord/LoadRoomNumbers/',
onSelect: cbxRoomNumberOnSelect
">
</select>
<label>
<%: Html.Language("StartDate")%></label>
<input id="txtStartTime" type="text" class="easyui-datetimebox" style="width: 130px;"
data-options="showSeconds:false" />
<label>
<%: Html.Language("Deadline")%></label>
<input id="txtEndTime" type="text" class="easyui-datetimebox" style="width: 130px;"
data-options="showSeconds:false" />
<a href="javascript:void(0)" class="toolbar-button tb-icon-search" onclick="query();">
<%: Html.Language("Query")%>
</a>
</div>
<div>
<label>
<%: Html.Language("LoopType")%></label>
<select id="cbxDeviceType" class="easyui-combobox" style="width: 80px;" data-options="
panelWidth: 100,
panelHeight: 'auto',
valueField: 'Value',
textField: 'Name',
editable: false,
url: '/RoomType/LoadDeviceTypes/',
onSelect: cbxDeviceTypeOnSelect
">
</select>
<label>
<%: Html.Language("Circuit")%></label>
<select id="cbdRoomTypeModals" class="easyui-combogrid" style="width: 100px;" data-options="
panelWidth: 270,
multiple: true,
idField: 'ModalAddress',
textField: 'Name',
editable: false,
fitColumns: true,
columns:[[
{ field: 'ck',checkbox: true },
{ field: 'Name', title: '<%: Html.Language("LoopName")%>' },
{ field: 'ModalAddress', title: '<%: Html.Language("ReturnAddress")%>' },
{ field: 'RoomType', title: '<%: Html.Language("RoomType")%>' },
{ field: 'Outlet', title: '<%: Html.Language("DeliveryOutlet")%>' }
]]
">
</select>
</div>
</div>
</div>
<div data-options="region:'center',border:false">
<table id="dg" class="easyui-datagrid" style="width: 100%; height: auto;"
data-options="
border: false,
singleSelect: true,
pagination: false,
pageSize: 50,
rownumbers: true,
striped: true,
sortName: 'StartTime',
sortOrder: 'desc',
fit: true,
fitColumns: true,
method: 'POST'
">
<thead>
<tr>
<th data-options="field:'RoomNumber',sortable:false,resizable:false">
<%: Html.Language("RoomNumber")%>
</th>
<th data-options="field:'ModalAddress',sortable:false,resizable:false">
<%: Html.Language("ReturnAddress")%>
</th>
<th data-options="field:'Outlet',sortable:false,resizable:false">
<%: Html.Language("DeliveryOutlet")%>
</th>
<th data-options="field:'Name',sortable:false,resizable:false">
<%: Html.Language("Name")%>
</th>
<th data-options="field:'StartTime',sortable:false,resizable:false">
<%: Html.Language("Time")%>
</th>
<th data-options="field:'Status',align:'center',sortable:false,resizable:false,
formatter: function(val){
if(val == 1){
return lang.Opened;
} else {
return lang.Closed;
}
}">
<%: Html.Language("Status")%>
</th>
<%--<th data-options="field:'EndTime',sortable:false,resizable:false">
<%: Html.Language("Deadline")%>
</th>
<th data-options="field:'Time',sortable:false,resizable:false,formatter:timeFormatter">
<%: Html.Language("Duration")%>
</th>--%>
</tr>
</thead>
</table>
</div>
</div>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ScriptContent" runat="server">
<script type="text/javascript">
function timeFormatter(val) {
var day = Math.floor(val / (24 * 3600));
var hour = Math.floor((val - day * 24 * 3600) / 3600);
var minute = Math.floor((val - day * 24 * 3600 - hour * 3600) / 60);
var second = val - day * 24 * 3600 - hour * 3600 - minute * 60;
return hour + lang.Hour + minute + lang.Minute + second + lang.Second;
}
function query() {
var roomNumber = $('#cbxRoomNumber').combobox('getValue');
if (roomNumber == '') {
$.tools.alert(lang.PleaseEnterRoomNumber);
return;
}
var modalAddresses = $('#cbdRoomTypeModals').combogrid('getValues');
var params = {
RoomNumber: roomNumber,
StartTime: $('#txtStartTime').datetimespinner('getValue'),
EndTime: $('#txtEndTime').datetimespinner('getValue'),
DeviceType: $('#cbxDeviceType').combobox('getValue'),
ModalIds: modalAddresses.length > 0 ? "'" + modalAddresses.join("','") + "'" : ""
};
$('#dg').datagrid({ url: '/Overview/LoadHostModalRecords/', queryParams: params });
}
function cbxDeviceTypeOnSelect(row) {
var roomNumber = $('#cbxRoomNumber').combobox('getValue');
if (roomNumber == '') {
$.tools.alert(lang.PleaseEnterRoomNumber);
return;
}
$('#cbdRoomTypeModals').combogrid({ url: '/RoomType/LoadRoomTypeModals', queryParams: { roomNumber: roomNumber, deviceType: row.Value} });
}
function cbxRoomNumberOnSelect(r) {
//$('#cbdRoomTypeModals').combogrid({ url: '/HostModalRecord/LoadModals', queryParams: { roomNumber: r.Value} });
$('#cbdRoomTypeModals').combogrid({ url: '/RoomType/LoadRoomTypeModals', queryParams: { roomNumber: r.Value, deviceType: $('#cbxDeviceType').combobox('getValue')} });
}
$(function () {
var curTime = new Date();
var startTime = new Date(curTime.getTime() - 1 * 24 * 60 * 60 * 1000);
$("#txtStartTime").datetimebox("setValue", startTime.format('yyyy-MM-dd hh:mm:ss'));
$("#txtEndTime").datetimebox("setValue", curTime.format('yyyy-MM-dd hh:mm:ss'));
});
</script>
</asp:Content>

View File

@@ -0,0 +1,250 @@
<%@ Page Language="C#" MasterPageFile="~/Views/Shared/MasterPage.Master" Inherits="System.Web.Mvc.ViewPage<dynamic>" %>
<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
<%: Html.Language("InformationOverview")%>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
<div title='<%: Html.Language("InformationOverview")%>' class="easyui-panel" data-options="fit:true,border:false">
<div class="easyui-layout" data-options="fit:true">
<div data-options="region:'north',border:false">
<div class="datagrid-toolbar">
<a href="javascript:void(0)" class="easyui-linkbutton" data-options="iconCls:'icon-reload',plain:true" onclick="loadState()"><%: Html.Language("Refresh")%></a>
</div>
</div>
<div region="center" border="false">
<div id="cc">
<!-- col1 -->
<div style="width:300px;float:left;">
<form id="rcuStateForm" method="post" action="#">
<fieldset>
<legend><%: Html.Language("RCUNetworkCommunicationsStatus")%></legend>
<ul>
<li><label><%: Html.Language("RCUNormalNetworking")%></label><input name="Online" class="easyui-numberbox text" data-options="editable:false" value="0" /></li>
<li><label><%: Html.Language("RCUNetworkInterruption")%></label><input name="Offline" class="easyui-numberbox text" data-options="editable:false" value="0" /></li>
<li><label><%: Html.Language("TotalNumberRCU")%></label><input name="Total" class="easyui-numberbox text" data-options="editable:false" value="0" /></li>
</ul>
</fieldset>
</form>
<form id="roomServiceStateForm" method="post" action="#">
<fieldset>
<legend><%: Html.Language("RequestedServiceStatus")%></legend>
<ul>
<li><label><%: Html.Language("DontDisturbNumberOfRooms")%></label><input name="DND" class="easyui-numberbox text" data-options="editable:false" value="0" /></li>
<li><label><%: Html.Language("RequestToCleanUpTheRooms")%></label><input name="Clean" class="easyui-numberbox text" data-options="editable:false" value="0" /></li>
<li><label><%: Html.Language("RequestCallNumberOfRooms")%></label><input name="Call" class="easyui-numberbox text" data-options="editable:false" value="0" /></li>
<li><label><%: Html.Language("RequestACheckOutRooms")%></label><input name="Checkout" class="easyui-numberbox text" data-options="editable:false" value="0" /></li>
<li><label><%: Html.Language("EmergencyCallNumberOfRooms")%></label><input name="SOS" class="easyui-numberbox text" data-options="editable:false" value="0" /></li>
<li><label><%: Html.Language("LaundryRequestNumberOfRooms")%></label><input name="Laundry" class="easyui-numberbox text" data-options="editable:false" value="0" /></li>
<li><label><%: Html.Language("RequestNumberOfBaggageHandling")%></label><input name="Luggage" class="easyui-numberbox text" data-options="editable:false" value="0" /></li>
<li><label><%: Html.Language("RequestNumberOfDeliverMeals")%></label><input name="MealDelivery" class="easyui-numberbox text" data-options="editable:false" value="0" /></li>
<li><label><%: Html.Language("NumberOfRoomsToCleanUpTheTable")%></label><input name="DrawCloth" class="easyui-numberbox text" data-options="editable:false" value="0" /></li>
</ul>
</fieldset>
</form>
<form id="safeBoxStateForm" method="post" action="#">
<fieldset>
<legend><%: Html.Language("SafeCondition")%></legend>
<ul>
<li><label><%: Html.Language("SafeNormalSwitch")%></label><input name="Field1" class="easyui-numberbox text" data-options="editable:false" value="0" /></li>
<li><label><%: Html.Language("GuestsAreNotSafeSwitch")%></label><input name="Field2" class="easyui-numberbox text" data-options="editable:false" value="0" /></li>
<li><label><%: Html.Language("CheckOutTheSafeShutdown")%></label><input name="Field3" class="easyui-numberbox text" data-options="editable:false" value="0" /></li>
</ul>
</fieldset>
</form>
</div>
<!-- col2 -->
<div style="width:320px;float:left;">
<form id="roomStateForm" method="post" action="#">
<fieldset>
<legend><%: Html.Language("RoomAvailability")%></legend>
<ul>
<li><label><%: Html.Language("ConnectivityNumberOfRooms")%></label><input name="ConnectingRoom" class="easyui-numberbox text" data-options="editable:false" value="0" /></li>
<li><label><%: Html.Language("NonEnergyRoomNumberOfRooms")%></label><input name="NotEnergySavingRoom" class="easyui-numberbox text" data-options="editable:false" value="0" /></li>
<li><label><%: Html.Language("FailureNumberOfRooms")%></label><input name="FaultRoom" class="easyui-numberbox text" data-options="editable:false" value="0" /></li>
<li><label><%: Html.Language("SunnyNumberOfRooms")%></label><input name="SunRoom" class="easyui-numberbox text" data-options="editable:false" value="0" /></li>
<li><label><%: Html.Language("AccommodationRoomNumber")%></label><input name="GroupOrientedLeasingRoom" class="easyui-numberbox text" data-options="editable:false" value="0" /></li>
<li><label><%: Html.Language("SuiteNumberOfRooms")%></label><input name="SuiteRoom" class="easyui-numberbox text" data-options="editable:false" value="0" /></li>
<li><label><%: Html.Language("ReligiousRoomNumberOfRooms")%></label><input name="ReligiousRoom" class="easyui-numberbox text" data-options="editable:false" value="0" /></li>
<li><label><%: Html.Language("DisabilityRoomNumberOfRooms")%></label><input name="AmbulatoryRoom" class="easyui-numberbox text" data-options="editable:false" value="0" /></li>
</ul>
</fieldset>
</form>
<form id="windowStateForm" method="post" action="#">
<fieldset>
<legend><%: Html.Language("GuestRoomWindowsStatus")%></legend>
<ul>
<li><label><%: Html.Language("WindowsAndDoorsNormallyClosed")%></label><input class="easyui-numberbox text" data-options="editable:false" value="0" /></li>
<li><label><%: Html.Language("WindowsAndDoorsNormallyOpen")%></label><input class="easyui-numberbox text" data-options="editable:false" value="0" /></li>
</ul>
</fieldset>
</form>
<form id="doorStateForm" method="post" action="#">
<fieldset>
<legend><%: Html.Language("GuestRoomDoorSwitchStatus")%></legend>
<ul>
<li><label><%: Html.Language("DoorClosesProperly")%></label><input class="easyui-numberbox text" data-options="editable:false" value="0" /></li>
<li><label><%: Html.Language("TheDoorOpened")%></label><input class="easyui-numberbox text" data-options="editable:false" value="0" /></li>
<li><label><%: Html.Language("DoorOpenForTooLongAlarm")%></label><input class="easyui-numberbox text" data-options="editable:false" value="0" /></li>
<li><label><%: Html.Language("DoorCloseForTooLongAlarm")%></label><input class="easyui-numberbox text" data-options="editable:false" value="0" /></li>
<li class="empty"></li>
</ul>
</fieldset>
</form>
</div>
<!-- col3 -->
<div style="width:300px;float:left;">
<form id="roomRentStateForm" method="post" action="#">
<fieldset>
<legend><%: Html.Language("GuestRoomRentalSituation")%></legend>
<ul>
<li><label><%: Html.Language("VIPRoomNumberOfRooms")%></label><input name="VIPRoom" class="easyui-numberbox text" data-options="editable:false" value="0" /></li>
<li><label><%: Html.Language("NumberOfRentalRooms")%></label><input name="RentedRoom" class="easyui-numberbox text" data-options="editable:false" value="0" /></li>
<li><label><%: Html.Language("NumberOfRoomsForRent")%></label><input name="RoomForRent" class="easyui-numberbox text" data-options="editable:false" value="0" /></li>
<li><label><%: Html.Language("RoomsForCheckOut")%></label><input name="CheckoutRoom" class="easyui-numberbox text" data-options="editable:false" value="0" /></li>
<li><label><%: Html.Language("VacantRooms")%></label><input name="EmptyRoom" class="easyui-numberbox text" data-options="editable:false" value="0" /></li>
<li><label><%: Html.Language("TotalRooms")%></label><input name="RoomTotal" class="easyui-numberbox text" data-options="editable:false" value="0" /></li>
<li><label><%: Html.Language("RentalRoomsProportion")%></label><input name="RentPercent" class="easyui-numberbox text" data-options="editable:false,suffix:'%'" value="0" /></li>
<li><label><%: Html.Language("RentalRoomsWithGuest")%></label><input name="SomeoneRentRoom" class="easyui-numberbox text" data-options="editable:false" value="0" /></li>
<li><label><%: Html.Language("RentalRoomsWithoutGuest")%></label><input name="NoOneRentRoom" class="easyui-numberbox text" data-options="editable:false" value="0" /></li>
<li><label><%: Html.Language("NotRentRoomsWithGuest")%></label><input name="SomeoneNotRentRoom" class="easyui-numberbox text" data-options="editable:false" value="0" /></li>
<li><label><%: Html.Language("NotRentRoomsWithoutGuest")%></label><input name="NoOneNotRentRoom" class="easyui-numberbox text" data-options="editable:false" value="0" /></li>
<li class="empty"></li>
<li class="empty"></li>
</ul>
</fieldset>
</form>
<form id="balconyDoorStateForm" method="post" action="#">
<fieldset>
<legend><%: Html.Language("RoomsBalconyDoorState")%></legend>
<ul>
<li><label><%: Html.Language("BalconyDoorClosedNormal")%></label><input class="easyui-numberbox text" data-options="editable:false" value="0" /></li>
<li><label><%: Html.Language("BalconyDoorOpenNormal")%></label><input class="easyui-numberbox text" data-options="editable:false" value="0" /></li>
<li class="empty"></li>
<li class="empty"></li>
</ul>
</fieldset>
</form>
</div>
<!-- col4 -->
<div style="width:230px;float:right;">
<form id="airConditionStateForm" method="post" action="#">
<fieldset>
<legend><%: Html.Language("AirConditionOperatingCondition")%></legend>
<ul>
<li><label><%: Html.Language("AirConditionRunning")%></label><input name="Running" class="easyui-numberbox text" data-options="editable:false" value="0" /></li>
<li><label><%: Html.Language("AirConditionClosed")%></label><input name="NoRunning" class="easyui-numberbox text" data-options="editable:false" value="0" /></li>
<li><label><%: Html.Language("FanSpeedLow")%></label><input name="SpeedLow" class="easyui-numberbox text" data-options="editable:false" value="0" /></li>
<li><label><%: Html.Language("FanSpeedMidRange")%></label><input name="SpeedMedium" class="easyui-numberbox text" data-options="editable:false" value="0" /></li>
<li><label><%: Html.Language("FanSpeedHighGrade")%></label><input name="SpeedHigh" class="easyui-numberbox text" data-options="editable:false" value="0" /></li>
<li><label><%: Html.Language("AirConditionerCoolingValveOpen")%></label><input name="ColdValveOn" class="easyui-numberbox text" data-options="editable:false" value="0" /></li>
<li><label><%: Html.Language("AirConditioningHeatValveOpen")%></label><input name="ThermalValveOn" class="easyui-numberbox text" data-options="editable:false" value="0" /></li>
<li><label><%: Html.Language("LockModeRooms")%></label><input name="LockModeRoom" class="easyui-numberbox text" data-options="editable:false" value="0" /></li>
<li><label>已定时房数</label><input name="TimingRoom" class="easyui-numberbox text" data-options="editable:false" value="0" /></li>
<li><label><%: Html.Language("ManualModeRooms")%></label><input name="ManualModeRoom" class="easyui-numberbox text" data-options="editable:false" value="0" /></li>
<li><label><%: Html.Language("TimeSettledRooms")%></label><input name="" class="easyui-numberbox text" data-options="editable:false" value="0" /></li>
<li><label><%: Html.Language("ForbidSpeedHighGradeRooms")%></label><input name="DisableSpeedHighRoom" class="easyui-numberbox text" data-options="editable:false" value="0" /></li>
<li><label><%: Html.Language("StartRoomStateFunctionRooms")%></label><input name="EnableRoomStatusRoom" class="easyui-numberbox text" data-options="editable:false" value="0" /></li>
<li><label><%: Html.Language("StartSleepModeRooms")%></label><input name="EnableSleepModeRoom" class="easyui-numberbox text" data-options="editable:false" value="0" /></li>
<li class="empty"></li>
<li class="empty"></li>
<li class="empty"></li>
<li class="empty"></li>
<li class="empty"></li>
</ul>
</fieldset>
</form>
</div>
</div>
</div>
</div>
</div>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ScriptContent" runat="server">
<style type="text/css">
#cc {
/*background:pink;*/
height:560px;
width:920px;
}
#cc form {
margin:5px;
}
#cc form fieldset {
border:1px solid #95B8E7;
}
#cc form ul {
/*background:pink;*/
padding-left:20px;
}
#cc form ul li{
/*background:yellowgreen;*/
height:25px;
line-height:25px;
margin-bottom:1px;
}
#cc form ul li.empty{
list-style-type:none;
}
#cc form ul li label{
/*background:red;*/
display:inline-block;
width:175px;
}
#cc form ul li .text {
width:50px;
}
</style>
<script type="text/javascript" language="javascript">
function loadState() {
$.tools.ajaxLoading(lang.LoadingData);
$("#rcuStateForm").form("load", "/Overview/LoadRCUState/");
$("#roomServiceStateForm").form("load", "/Overview/LoadRoomServiceState/");
$("#safeBoxStateForm").form("load", "/Overview/LoadSafeBoxState/");
$("#roomStateForm").form("load", "/Overview/LoadRoomState/");
$("#windowStateForm").form("load", "/Overview/LoadWindowState/");
$("#doorStateForm").form("load", "/Overview/LoadDoorState/");
$("#roomRentStateForm").form("load", "/Overview/LoadRoomRentState/");
$("#balconyDoorStateForm").form("load", "/Overview/LoadBalconyDoorState/");
$("#airConditionStateForm").form("load", "/Overview/LoadAirConditionState/");
$.tools.ajaxLoadEnd();
}
$(function () { loadState(); });
</script>
</asp:Content>

View File

@@ -0,0 +1,256 @@
<%@ 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("InformationOverview")%>
</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="overflow:hidden;height:30px;">
<div class="toolbar">
<a href="javascript:void(0)" class="toolbar-button tb-icon-refresh" onclick="loadState()"><%: Html.Language("Refresh")%></a>
</div>
</div>
<div data-options="region:'center',border:false">
<div id="cc">
<!-- col1 -->
<div style="width: 350px; float: left;">
<form id="rcuStateForm" method="post" action="#">
<fieldset>
<legend>
<%: Html.Language("RCUNetworkCommunicationsStatus")%></legend>
<ul>
<li>
<label>
<%: Html.Language("RCUNormalNetworking")%></label><input name="Online" class="easyui-numberbox text"
data-options="editable:false" value="0" /></li>
<li>
<label>
<%: Html.Language("RCUNetworkInterruption")%></label><input name="Offline" class="easyui-numberbox text"
data-options="editable:false" value="0" /></li>
<li>
<label>
<%: Html.Language("TotalNumberRCU")%></label><input name="Total" class="easyui-numberbox text"
data-options="editable:false" value="0" /></li>
</ul>
</fieldset>
</form>
<%--<form id="safeBoxStateForm" method="post" action="#">
<fieldset>
<legend>
<%: Html.Language("SafeCondition")%></legend>
<ul>
<li>
<label>
<%: Html.Language("SafeNormalSwitch")%></label><input name="SafeNormalSwitch" class="easyui-numberbox text"
data-options="editable:false" value="0" /></li>
<li>
<label>
<%: Html.Language("GuestsAreNotSafeOpen")%></label><input name="GuestsAreNotSafeOpen" class="easyui-numberbox text"
data-options="editable:false" value="0" /></li>
<li>
<label>
<%: Html.Language("CheckOutTheSafeShutdown")%></label><input name="CheckOutTheSafeShutdown" class="easyui-numberbox text"
data-options="editable:false" value="0" /></li>
</ul>
</fieldset>
</form>--%>
<form id="doorStateForm" method="post" action="#">
<fieldset>
<legend>
<%: Html.Language("GuestRoomDoorSwitchStatus")%></legend>
<ul>
<li>
<label>
<%: Html.Language("TheDoorOpened")%></label><input name="RoonOpen" class="easyui-numberbox text"
data-options="editable:false" value="0" /></li>
<li>
<label>
<%: Html.Language("TheDoorClosed")%></label><input name="RoomClose" class="easyui-numberbox text"
data-options="editable:false" value="0" /></li>
<%--<li class="empty"></li>--%>
</ul>
</fieldset>
</form>
<form id="airConditionStateForm" method="post" action="#">
<fieldset>
<legend>
<%: Html.Language("AirConditionOperatingCondition")%></legend>
<ul>
<li>
<label>
<%: Html.Language("AirConditionRunning")%></label><input name="Running" class="easyui-numberbox text"
data-options="editable:false" value="0" /></li>
<li>
<label>
<%: Html.Language("AirConditionClosed")%></label><input name="NoRunning" class="easyui-numberbox text"
data-options="editable:false" value="0" /></li>
</ul>
</fieldset>
</form>
</div>
<!-- col2 -->
<%--<div style="width: 350px; float: left;">
<form id="roomStateForm" method="post" action="#">
<fieldset>
<legend>
<%: Html.Language("RoomAvailability")%></legend>
<ul>
<li>
<label>
<%: Html.Language("ConnectivityNumberOfRooms")%></label><input name="ConnectingRoom"
class="easyui-numberbox text" data-options="editable:false" value="0" /></li>
<li>
<label>
<%: Html.Language("NonEnergyRoomNumberOfRooms")%></label><input name="NotEnergySavingRoom"
class="easyui-numberbox text" data-options="editable:false" value="0" /></li>
<li>
<label>
<%: Html.Language("FailureNumberOfRooms")%></label><input name="FaultRoom" class="easyui-numberbox text"
data-options="editable:false" value="0" /></li>
<li>
<label>
<%: Html.Language("SunnyNumberOfRooms")%></label><input name="SunRoom" class="easyui-numberbox text"
data-options="editable:false" value="0" /></li>
<li>
<label>
<%: Html.Language("AccommodationRoomNumber")%></label><input name="GroupOrientedLeasingRoom"
class="easyui-numberbox text" data-options="editable:false" value="0" /></li>
<li>
<label>
<%: Html.Language("SuiteNumberOfRooms")%></label><input name="SuiteRoom" class="easyui-numberbox text"
data-options="editable:false" value="0" /></li>
<li>
<label>
<%: Html.Language("ReligiousRoomNumberOfRooms")%></label><input name="ReligiousRoom"
class="easyui-numberbox text" data-options="editable:false" value="0" /></li>
<li>
<label>
<%: Html.Language("DisabilityRoomNumberOfRooms")%></label><input name="AmbulatoryRoom"
class="easyui-numberbox text" data-options="editable:false" value="0" /></li>
<li>
<label>
<%: Html.Language("VIPRoom")%></label><input name="VIPRoom"
class="easyui-numberbox text" data-options="editable:false" value="0" /></li>
</ul>
</fieldset>
</form>
</div>--%>
<!-- col3 -->
<div style="width: 350px; float: left;">
<form id="roomRentStateForm" method="post" action="#">
<fieldset>
<legend>
<%: Html.Language("GuestRoomRentalSituation")%></legend>
<ul>
<li>
<label>
<%: Html.Language("NumberOfRentalRooms")%></label><input name="RentedRoom" class="easyui-numberbox text"
data-options="editable:false" value="0" /></li>
<li>
<label>
<%: Html.Language("NumberOfRoomsForRent")%></label><input name="RoomForRent" class="easyui-numberbox text"
data-options="editable:false" value="0" /></li>
<li>
<label>
<%: Html.Language("RoomsForCheckOut")%></label><input name="CheckoutRoom" class="easyui-numberbox text"
data-options="editable:false" value="0" /></li>
<li>
<label>
<%: Html.Language("VacantRooms")%></label><input name="EmptyRoom" class="easyui-numberbox text"
data-options="editable:false" value="0" /></li>
<li>
<label>
<%: Html.Language("TotalRooms")%></label><input name="RoomTotal" class="easyui-numberbox text"
data-options="editable:false" value="0" /></li>
<li>
<label>
<%: Html.Language("RentalRoomsProportion")%></label><input name="RentPercent" class="easyui-numberbox text"
data-options="editable:false,suffix:'%'" value="0" /></li>
<li>
<label>
<%: Html.Language("RentalRoomsWithGuest")%></label><input name="SomeoneRentRoom"
class="easyui-numberbox text" data-options="editable:false" value="0" /></li>
<li>
<label>
<%: Html.Language("RentalRoomsWithoutGuest")%></label><input name="NoOneRentRoom"
class="easyui-numberbox text" data-options="editable:false" value="0" /></li>
<li>
<label>
<%: Html.Language("NotRentRoomsWithGuest")%></label><input name="SomeoneNotRentRoom"
class="easyui-numberbox text" data-options="editable:false" value="0" /></li>
<li>
<label>
<%: Html.Language("NotRentRoomsWithoutGuest")%></label><input name="NoOneNotRentRoom"
class="easyui-numberbox text" data-options="editable:false" value="0" /></li>
<%--<li class="empty"></li>--%>
</ul>
</fieldset>
</form>
</div>
</div>
</div>
</div>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ScriptContent" runat="server">
<style type="text/css">
#cc
{
font-size: 12px;
height: 560px;
width: 1100px;
}
#cc form
{
margin: 5px;
}
#cc form fieldset
{
border: 1px solid #00A2EA;
}
#cc form ul
{
padding-left: 20px;
}
#cc form ul li
{
height: 25px;
line-height: 25px;
margin-bottom: 1px;
}
#cc form ul li.empty
{
list-style-type: none;
}
#cc form ul li label
{
display: inline-block;
width: 230px;
}
#cc form ul li .text
{
width: 50px;
}
</style>
<script type="text/javascript" language="javascript">
function loadState() {
$.tools.ajaxLoading(lang.LoadingData);
$("#rcuStateForm").form("load", "/Overview/LoadRCUState/");
$("#doorStateForm").form("load", "/Overview/LoadDoorState/");
$("#airConditionStateForm").form("load", "/Overview/LoadAirConditionState/");
$("#roomRentStateForm").form("load", "/Overview/LoadRoomRentState/");
//$("#roomServiceStateForm").form("load", "/Overview/LoadRoomServiceState/");
//$("#safeBoxStateForm").form("load", "/Overview/LoadSafeBoxState/");
//$("#roomStateForm").form("load", "/Overview/LoadRoomState/");
//$("#windowStateForm").form("load", "/Overview/LoadWindowState/");
//$("#balconyDoorStateForm").form("load", "/Overview/LoadBalconyDoorState/");
$.tools.ajaxLoadEnd();
}
$(function () { loadState(); });
</script>
</asp:Content>

View File

@@ -0,0 +1,45 @@
<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<Domain.RoomCard>" %>
<style type="text/css">
#roomCardForm table th {
font-weight: normal;
text-align: right;
}
</style>
<form id="roomCardForm" class="easyui-form" method="post" data-options="novalidate:true">
<input type="hidden" name="ID" value="<%: Model.ID %>" />
<table style="margin: 20px auto;" cellpadding="3">
<tr>
<th><label for="txtCardNumber"><%: Html.Language("CardNumber")%></label></th>
<td><input id="txtCardNumber" name="CardNumber" class="easyui-validatebox textbox text" data-options="required:true,validType:'length[1,20]'" value="<%: Model.CardNumber %>" /></td>
</tr>
<tr>
<th><label for="cbxCardType"><%: Html.Language("CardType")%></label></th>
<td>
<select id="cbxCardType" name="CardTypeID" class="easyui-combobox" style="width:180px;"
data-options="
valueField:'ID',
textField:'Name',
required:true,
panelHeight:'auto',
editable:false,
url:'/RoomCard/LoadRoomCardTypes/',
value:<%: Model.RoomCardType != null ? Model.RoomCardType.ID.ToString() : "''" %>
">
</select>
</td>
</tr>
<tr>
<th><label for="txtUserNumber"><%: Html.Language("UserNumber")%></label></th>
<td><input id="txtUserNumber" name="UserNumber" class="easyui-validatebox textbox text" value="<%: Model.UserNumber %>" /></td>
</tr>
<tr>
<th><label for="txtUserName"><%: Html.Language("UserName")%></label></th>
<td><input id="txtUserName" name="UserName" class="easyui-validatebox textbox text" value="<%: Model.UserName %>" /></td>
</tr>
<tr>
<th><label for="txtSort"><%: Html.Language("Sort")%></label></th>
<td><input id="txtSort" name="Sort" class="easyui-numberspinner text" value="1" style="width:60px;" data-options="required:true,min:1,value:<%: Model.Sort %>" /></td>
</tr>
</table>
</form>

View File

@@ -0,0 +1,81 @@
<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/MasterPage.Master" Inherits="System.Web.Mvc.ViewPage<dynamic>" %>
<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
<%: Html.Language("RoomCardMgmt")%>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
<div class="easyui-layout" data-options="fit:true">
<div title='<%: Html.Language("RoomCardMgmt")%>' style="border-right:1px solid #95B8E7;" data-options="region:'center',border:false">
<table id="dg" class="easyui-datagrid" style="width:100%; height:auto;"
data-options="
toolbar: '#tb',
border: false,
pagination: true,
pageSize: 20,
rownumbers: true,
striped: true,
sortName: 'ID',
sortOrder: 'asc',
fit: true,
fitColumns: true,
idField: 'ID',
frozenColumns: [[ { field: 'ID', checkbox: true } ]],
url: '/RoomCard/LoadAllByPage/',
method: 'post',
onDblClickRow: function(index, row) { edit(row); }
">
<thead>
<tr>
<th data-options="field:'CardNumber',sortable:true">
<%: Html.Language("CardNumber")%>
</th>
<th data-options="field:'CardType',sortable:true">
<%: Html.Language("CardType")%>
</th>
<th data-options="field:'UserNumber',sortable:true">
<%: Html.Language("UserNumber")%>
</th>
<th data-options="field:'UserName',sortable:true">
<%: Html.Language("UserName")%>
</th>
<th data-options="field:'Sort',sortable:true">
<%: Html.Language("Sort")%>
</th>
</tr>
</thead>
</table>
</div>
</div>
<div id="tb">
<a href="javascript:void(0)" class="easyui-linkbutton" data-options="iconCls:'icon-reload',plain:true" onclick="$('#dg').datagrid('load',{});"><%: Html.Language("Refresh")%></a>
<a href="javascript:void(0)" class="easyui-linkbutton" data-options="iconCls:'icon-add',plain:true" onclick="add()"><%: Html.Language("New")%></a>
<a href="javascript:void(0)" class="easyui-linkbutton" data-options="iconCls:'icon-edit',plain:true" onclick="edit()"><%: Html.Language("Edit")%></a>
<a href="javascript:void(0)" class="easyui-linkbutton" data-options="iconCls:'icon-remove',plain:true" onclick="del()"><%: Html.Language("Delete")%></a>
</div>
<div id="dialog" class="easyui-window" style="padding: 5px;"
data-options="
closed: true,
modal: true,
collapsible: false,
minimizable: false,
maximizable: false
">
<div class="easyui-panel dlg-content" style="margin-bottom:5px;"></div>
<div class="dlg-footer" style="text-align:right; padding:5px 5px 0 0;">
<a class="easyui-linkbutton dlg-btn-save" data-options="iconCls:'icon-save'" href="javascript:void(0)"><%: Html.Language("Save")%></a>
<a class="easyui-linkbutton dlg-btn-cancel" data-options="iconCls:'icon-cancel'" href="javascript:void(0)" onclick="$('#dialog').window('close');"><%: Html.Language("Cancel")%></a>
</div>
</div>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ScriptContent" runat="server">
<script type="text/javascript" src="/Scripts/room-card-index.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; } %>
</asp:Content>

View File

@@ -0,0 +1,84 @@
<%@ 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("RoomCardMgmt")%>
</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="overflow:hidden;height:30px;">
<div class="toolbar">
<a href="javascript:void(0)" class="toolbar-button tb-icon-refresh" onclick="$('#dg').datagrid('load',{});"><%: Html.Language("Refresh") %></a>
<a href="javascript:void(0)" class="toolbar-button tb-icon-add" onclick="add()"><%: Html.Language("New") %></a>
<a href="javascript:void(0)" class="toolbar-button tb-icon-edit" onclick="edit()"><%: Html.Language("Edit") %></a>
<a href="javascript:void(0)" class="toolbar-button tb-icon-remove" onclick="del()"><%: Html.Language("Delete") %></a>
</div>
</div>
<div data-options="region:'center',border:false">
<table id="dg" class="easyui-datagrid" style="width:100%; height:auto;"
data-options="
toolbar: '#tb',
border: false,
pagination: true,
pageSize: 50,
rownumbers: true,
striped: true,
sortName: 'ID',
sortOrder: 'asc',
fit: true,
fitColumns: true,
idField: 'ID',
frozenColumns: [[ { field: 'ID', checkbox: true } ]],
url: '/RoomCard/LoadAllByPage/',
method: 'post',
onDblClickRow: function(index, row) { edit(row); }
">
<thead>
<tr>
<th data-options="field:'CardNumber',sortable:true">
<%: Html.Language("CardNumber")%>
</th>
<th data-options="field:'CardType',sortable:true">
<%: Html.Language("CardType")%>
</th>
<th data-options="field:'UserNumber',sortable:true">
<%: Html.Language("UserNumber")%>
</th>
<th data-options="field:'UserName',sortable:true">
<%: Html.Language("UserName")%>
</th>
<th data-options="field:'Sort',sortable:true">
<%: Html.Language("Sort")%>
</th>
</tr>
</thead>
</table>
</div>
</div>
<div id="dialog" class="easyui-window" style="padding: 5px;"
data-options="
closed: true,
modal: true,
collapsible: false,
minimizable: false,
maximizable: false
">
<div class="easyui-panel dlg-content" style="margin-bottom:5px;"></div>
<div class="dlg-footer" style="text-align:right; padding:5px 5px 0 0;">
<a class="easyui-linkbutton dlg-btn-save" data-options="iconCls:'icon-save'" href="javascript:void(0)"><%: Html.Language("Save")%></a>
<a class="easyui-linkbutton dlg-btn-cancel" data-options="iconCls:'icon-cancel'" href="javascript:void(0)" onclick="$('#dialog').window('close');"><%: Html.Language("Cancel")%></a>
</div>
</div>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ScriptContent" runat="server">
<script type="text/javascript" src="/Scripts/room-card-index.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; } %>
</asp:Content>

View File

@@ -0,0 +1,154 @@
<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<Domain.HostTimingControl>" %>
<script type="text/javascript" src="/Scripts/room-type-index.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; } %>
<div id="roomControlDlg" class="easyui-layout" fit="true">
<div data-options="region:'north',border:false" style="height:230px;">
<form id="roomControlForm" method="post" action="#">
<input type="hidden" name="ID" value="<%: Model.ID %>" />
<input type="hidden" name="GroupID" value="<%: Model.GroupID %>" />
<input type="hidden" name="RoomTypeID" value="<%: Model.RoomTypeID %>" />
<div style=" text-align:center;">
<%--<div style=" margin-top:15px;">
<label><%: Html.Language("Floor")%></label>
<input id="cbxGroup" name="GroupID" class="easyui-combotree" style="width: 150px;" value=" <%: Model.GroupID %>"
data-options="
valueField: 'ID',
textField: 'Name',
lines:true,
required: true,
editable:false,
panelHeight: 'auto',
url: '/Group/LoadCurrentUserGroupTree/',
onSelect:cbtFloorOnSelect
"/>
</div>--%>
<div style=" margin-top:15px;">
<label><%: Html.Language("RoomType")%></label>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<input id="cbxRoomType" name="RoomTypeID" class="easyui-combobox" style="width:150px;" value="<%: Model.RoomTypeID %>"
data-options="
editable:false,
panelHeight:'auto',
valueField:'ID',
textField:'Name',
onSelect: cbxRoomTypeOnSelect,
url:'/RoomType/LoadDataForRoomTypeCombobox/'
" />
</div>
<div style=" margin-top:5px;">
<label> <%: Html.Language("RoomNumber")%></label>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<input id="cbxRoomNumber" name="HostIDs" class="easyui-combogrid" style="width: 150px;" value="<%: Model.HostIDs %>"
data-options="
multiple: true,
panelHeight:'300',
panelWidth:'220',
required: true,
idField: 'ID',
valueField: 'ID',
textField: 'RoomNumber',
editable: true,
columns:[[
{ field: 'ck',checkbox: true },
{ field: 'RoomNumber', title: '<%: Html.Language("RoomNumber")%>' },
{ field: 'GroupName', title: '<%: Html.Language("Floor")%>' },
{ field: 'RoomTypeName', title: '<%: Html.Language("RoomType")%>' }
]],
url:'/RoomControl/LoadRoomNumberCombobox/?roomTypeID='+<%: Model.RoomTypeID %>
"/>
</div>
<div style=" margin-top:5px;">
<label><%: Html.Language("RoomStatus")%></label>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<input id="cbxRoomStatus" name="RoomStatusID" class="easyui-combobox" style="width:150px;" value="<%: Model.RoomStatusID %>"
data-options="
editable:false,
panelHeight:'auto',
valueField:'ID',
textField:'Name',
url:'/RoomStatus/LoadDataForRoomStatusCombobox/'
" />
</div>
<div style=" margin-top:5px;">
<label><%: Html.Language("CardType")%></label>
<input id="cbxRoomCard" name="RoomCardTypeID" class="easyui-combobox" style="width: 150px;" value="<%:Model.RoomCardTypeID %>"
data-options="
editable:false,
panelHeight:'auto',
valueField: 'ID',
textField: 'CardType',
url: '/HostRoomCard/LoadDataForCardTypeCombobox/'
"/>
</div>
<div id="Scene" style=" margin-top:5px;">
<label><%: Html.Language("Scene")%></label>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<input id="cbxSceneName" name="RoomTypeSceneID" class="easyui-combobox" style="width:150px;" value="<%:Model.RoomTypeSceneID %>"
data-options="
editable:false,
panelHeight: '120',
required: true,
valueField: 'ID',
textField: 'Name',
method: 'post',
url: '/RoomControl/LoadRoomTypeScene/?roomTypeID='+<%: Model.RoomTypeID %>
" />
</div>
<div style=" margin-top:5px;">
<label><%: Html.Language("TimingType")%></label>
<input id="cbxTimingType" name="TimingType" class="easyui-combobox" style="width:150px;" value="<%:Model.TimingType %>"
data-options="
editable:false,
panelHeight: 'auto',
onSelect: cbxTimingTypeOnSelect,
data:[
{ value: 0, text: lang.EveryDay },
{ value: 1, text: lang.EveryWeek },
{ value: 2, text: lang.EveryMonth }
]"/>
</div>
<div style=" margin-top:5px;">
<label><%: Html.Language("Date")%></label>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<input id="cbxTimeDay" name="TimingDay" class="easyui-combogrid" style="width: 150px;" value="<%: Model.TimingDay %>"
data-options="
editable: true,
multiple: true,
panelHeight:'120',
required: true,
idField: 'ID',
valueField: 'ID',
textField: 'Name',
method: 'post',
columns:[[
{ field: 'ck',checkbox: true },
{ field: 'Name', title: '<%: Html.Language("Name")%>' }
]],
url:'/RoomControl/LoadTimeDay/?timeType='+<%:Model.TimingType %>
"/>
</div>
<div style=" margin-top:5px;">
<label><%: Html.Language("Time")%></label>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<input id="cbxTiming" name="Timing" class="easyui-combogrid" style="width:150px;" value="<%:Model.Timing %>"
data-options="
editable:true,
multiple: true,
panelHeight: '120',
required: true,
idField: 'Value',
valueField: 'Value',
textField: 'Value',
method: 'post',
columns:[[
{ field: 'ck',checkbox: true },
{ field: 'Value', title: '<%: Html.Language("Time")%>' }
]],
url: '/RoomControl/LoadTiming/'
" />
</div>
</div>
</form>
</div>
</div>

View File

@@ -0,0 +1,449 @@
<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/MasterPage.Master" Inherits="System.Web.Mvc.ViewPage<dynamic>" %>
<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
<%: Html.Language("RoomControl")%>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
<div title='<%: Html.Language("RoomControl")%>' class="easyui-panel" data-options="fit:true,border:false">
<div class="easyui-layout" data-options="fit:true">
<div data-options="region:'north',border:false">
<div class="datagrid-toolbar" style="padding:5px 0px 5px 10px;">
<label><%: Html.Language("RoomNumber")%></label>
<input id="cbxRoomNumber" class="easyui-combobox" style="width:80px;"
data-options="
editable: false,
valueField: 'ID',
textField: 'RoomNumber',
onSelect: cbxRoomNumberOnSelect
" />
<label><%: Html.Language("Floor")%></label>
<input id="cbtGroup" class="easyui-combotree" style="width:110px;"
data-options="
editable:false,
lines:true
" />
<label><%: Html.Language("RoomStatus")%></label>
<input id="cbxRoomStatus" class="easyui-combobox" style="width:80px;"
data-options="
editable:false,
panelHeight:'auto',
valueField:'ID',
textField:'Name'
" />
<label><%: Html.Language("RoomType")%></label>
<input id="cbxRoomType" class="easyui-combobox" style="width:80px;"
data-options="
editable:false,
panelHeight:'auto',
valueField:'ID',
textField:'Name'
" />
</div>
</div>
<div region="center" border="false">
<div id="content">
<form method="post" action="#">
<input type="hidden" name="type" value="RoomStatus" />
<fieldset>
<legend><%:Html.Language("ChooseTheRoomStatus")%></legend>
<ul>
<% foreach (var item in ViewData["RoomStatus"] as IList<Domain.RoomStatus>) { %>
<li><input type="radio" name="status" value="<%=item.ID %>" /><%=item.Name %></li>
<% } %>
<li class="button">
<a href="javascript:void(0)" class="easyui-linkbutton" data-options="iconCls:'icon-send'" onclick="sendRoomStatus(this)"><%: Html.Language("Issue")%></a>
</li>
</ul>
</fieldset>
</form>
<fieldset>
<legend><%: Html.Language("GuestRoomDisplayAndSettings")%></legend>
<!-- col1 -->
<div style="width:350px;float:left;">
<form method="post" action="#">
<fieldset>
<input type="hidden" name="type" value="DND" />
<legend><%: Html.Language("DoNotDisturb")%></legend>
<ul>
<li><input type="radio" name="status" value="0" /><%: Html.Language("Issue")%> <%: Html.Language("Cancel")%> </li>
<li><input type="radio" name="status" value="1" /><%: Html.Language("Issue")%> <%: Html.Language("Setting")%></li>
<li><input type="radio" name="status" value="2" checked="checked" /><%:Html.Language("Invariability")%></li>
<li class="button">
<a href="javascript:void(0)" class="easyui-linkbutton" data-options="iconCls:'icon-send'" onclick="send(this)"><%: Html.Language("Issue")%></a>
</li>
</ul>
</fieldset>
</form>
<form method="post" action="#">
<input type="hidden" name="type" value="Clean" />
<fieldset>
<legend><%: Html.Language("PleaseClean")%></legend>
<ul>
<li><input type="radio" name="status" value="0" /><%: Html.Language("Issue")%> <%: Html.Language("Cancel")%> </li>
<li><input type="radio" name="status" value="1" /><%: Html.Language("Issue")%> <%: Html.Language("Setting")%></li>
<li><input type="radio" name="status" value="2" checked="checked" /><%:Html.Language("Invariability")%></li>
<li class="button"><a href="javascript:void(0)" class="easyui-linkbutton" data-options="iconCls:'icon-send'" onclick="send(this)"><%: Html.Language("Issue")%></a></li>
</ul>
</fieldset>
</form>
<form method="post" action="#">
<input type="hidden" name="type" value="Call" />
<fieldset>
<legend><%: Html.Language("RequestACall")%></legend>
<ul>
<li><input type="radio" name="status" value="0" /><%: Html.Language("Issue")%> <%: Html.Language("Cancel")%> </li>
<li><input type="radio" name="status" value="1" /><%: Html.Language("Issue")%> <%: Html.Language("Setting")%></li>
<li><input type="radio" name="status" value="2" checked="checked" /><%:Html.Language("Invariability")%></li>
<li class="button"><a href="javascript:void(0)" class="easyui-linkbutton" data-options="iconCls:'icon-send'" onclick="send(this)"><%: Html.Language("Issue")%></a></li>
</ul>
</fieldset>
</form>
<form method="post" action="#">
<input type="hidden" name="type" value="Laundry" />
<fieldset>
<legend><%: Html.Language("LaundryService")%></legend>
<ul>
<li><input type="radio" name="status" value="0" /><%: Html.Language("Issue")%> <%: Html.Language("Cancel")%> </li>
<li><input type="radio" name="status" value="1" /><%: Html.Language("Issue")%> <%: Html.Language("Setting")%></li>
<li><input type="radio" name="status" value="2" checked="checked" /><%:Html.Language("Invariability")%></li>
<li class="button"><a href="javascript:void(0)" class="easyui-linkbutton" data-options="iconCls:'icon-send'" onclick="send(this)"><%: Html.Language("Issue")%></a></li>
</ul>
</fieldset>
</form>
<form method="post" action="#">
<input type="hidden" name="type" value="Checkout" />
<fieldset>
<legend><%: Html.Language("CheckOutRequest")%></legend>
<ul>
<li><input type="radio" name="status" value="0" /><%: Html.Language("Issue")%> <%: Html.Language("Cancel")%> </li>
<li><input type="radio" name="status" value="1" /><%: Html.Language("Issue")%> <%: Html.Language("Setting")%></li>
<li><input type="radio" name="status" value="2" checked="checked" /><%:Html.Language("Invariability")%></li>
<li class="button"><a href="javascript:void(0)" class="easyui-linkbutton" data-options="iconCls:'icon-send'" onclick="send(this)"><%: Html.Language("Issue")%></a></li>
</ul>
</fieldset>
</form>
<form method="post" action="#">
<input type="hidden" name="type" value="SOS" />
<fieldset>
<legend>SOS</legend>
<ul>
<li><input type="radio" name="status" value="0" /><%: Html.Language("Issue")%> <%: Html.Language("Cancel")%> </li>
<li><input type="radio" name="status" value="1" /><%: Html.Language("Issue")%> <%: Html.Language("Setting")%></li>
<li><input type="radio" name="status" value="2" checked="checked" /><%:Html.Language("Invariability")%></li>
<li class="button"><a href="javascript:void(0)" class="easyui-linkbutton" data-options="iconCls:'icon-send'" onclick="send(this)"><%: Html.Language("Issue")%></a></li>
</ul>
</fieldset>
</form>
<form method="post" action="#">
<input type="hidden" name="type" value="Luggage" />
<fieldset>
<legend><%: Html.Language("BaggageHandling")%></legend>
<ul>
<li><input type="radio" name="status" value="0" /><%: Html.Language("Issue")%> <%: Html.Language("Cancel")%> </li>
<li><input type="radio" name="status" value="1" /><%: Html.Language("Issue")%> <%: Html.Language("Setting")%></li>
<li><input type="radio" name="status" value="2" checked="checked" /><%:Html.Language("Invariability")%></li>
<li class="button"><a href="javascript:void(0)" class="easyui-linkbutton" data-options="iconCls:'icon-send'" onclick="send(this)"><%: Html.Language("Issue")%></a></li>
</ul>
</fieldset>
</form>
<form method="post" action="#">
<input type="hidden" name="type" value="MealDelivery" />
<fieldset>
<legend><%: Html.Language("MealDeliveryService")%></legend>
<ul>
<li><input type="radio" name="status" value="0" /><%: Html.Language("Issue")%> <%: Html.Language("Cancel")%> </li>
<li><input type="radio" name="status" value="1" /><%: Html.Language("Issue")%> <%: Html.Language("Setting")%></li>
<li><input type="radio" name="status" value="2" checked="checked" /><%:Html.Language("Invariability")%></li>
<li class="button"><a href="javascript:void(0)" class="easyui-linkbutton" data-options="iconCls:'icon-send'" onclick="send(this)"><%: Html.Language("Issue")%></a></li>
</ul>
</fieldset>
</form>
<form method="post" action="#">
<input type="hidden" name="type" value="MealDelivery" />
<fieldset>
<legend><%: Html.Language("TidyUpThePlate")%></legend>
<ul>
<li><input type="radio" name="status" value="0" /><%: Html.Language("Issue")%> <%: Html.Language("Cancel")%> </li>
<li><input type="radio" name="status" value="1" /><%: Html.Language("Issue")%> <%: Html.Language("Setting")%></li>
<li><input type="radio" name="status" value="2" checked="checked" /><%:Html.Language("Invariability")%></li>
<li class="button"><a href="javascript:void(0)" class="easyui-linkbutton" data-options="iconCls:'icon-send'" onclick="send(this)"><%: Html.Language("Issue")%></a></li>
</ul>
</fieldset>
</form>
</div>
<!-- col2 -->
<div style="width:350px;float:left;">
<form method="post" action="#">
<input type="hidden" name="type" value="FreezerDoorContact" />
<fieldset>
<legend><%: Html.Language("TheRefrigeratorDoorMagnet")%></legend>
<ul>
<li><input type="radio" name="status" value="0" /><%: Html.Language("Issue")%> <%: Html.Language("Cancel")%> </li>
<li><input type="radio" name="status" value="1" /><%: Html.Language("Issue")%> <%: Html.Language("Setting")%></li>
<li><input type="radio" name="status" value="2" checked="checked" /><%:Html.Language("Invariability")%></li>
<li class="button"><a href="javascript:void(0)" class="easyui-linkbutton" data-options="iconCls:'icon-send'" onclick="send(this)"><%: Html.Language("Issue")%></a></li>
</ul>
</fieldset>
</form>
<form method="post" action="#">
<input type="hidden" name="type" value="RoomDoorContact" />
<fieldset>
<legend><%: Html.Language("TheRoomDoorMagnet")%></legend>
<ul>
<li><input type="radio" name="status" value="0" /><%: Html.Language("Issue")%> <%: Html.Language("Cancel")%> </li>
<li><input type="radio" name="status" value="1" /><%: Html.Language("Issue")%> <%: Html.Language("Setting")%></li>
<li><input type="radio" name="status" value="2" checked="checked" /><%:Html.Language("Invariability")%></li>
<li class="button"><a href="javascript:void(0)" class="easyui-linkbutton" data-options="iconCls:'icon-send'" onclick="send(this)"><%: Html.Language("Issue")%></a></li>
</ul>
</fieldset>
</form>
<form method="post" action="#">
<input type="hidden" name="type" value="SafeBoxDoorContact" />
<fieldset>
<legend><%: Html.Language("SafeBoxDoorMagnet")%></legend>
<ul>
<li><input type="radio" name="status" value="0" /><%: Html.Language("Issue")%> <%: Html.Language("Cancel")%> </li>
<li><input type="radio" name="status" value="1" /><%: Html.Language("Issue")%> <%: Html.Language("Setting")%></li>
<li><input type="radio" name="status" value="2" checked="checked" /><%:Html.Language("Invariability")%></li>
<li class="button"><a href="javascript:void(0)" class="easyui-linkbutton" data-options="iconCls:'icon-send'" onclick="send(this)"><%: Html.Language("Issue")%></a></li>
</ul>
</fieldset>
</form>
<form method="post" action="#">
<input type="hidden" name="type" value="BalconyDoorContact" />
<fieldset>
<legend><%: Html.Language("BalconyDoorMagnet")%></legend>
<ul>
<li><input type="radio" name="status" value="0" /><%: Html.Language("Issue")%> <%: Html.Language("Cancel")%> </li>
<li><input type="radio" name="status" value="1" /><%: Html.Language("Issue")%> <%: Html.Language("Setting")%></li>
<li><input type="radio" name="status" value="2" checked="checked" /><%:Html.Language("Invariability")%></li>
<li class="button"><a href="javascript:void(0)" class="easyui-linkbutton" data-options="iconCls:'icon-send'" onclick="send(this)"><%: Html.Language("Issue")%></a></li>
</ul>
</fieldset>
</form>
<form method="post" action="#">
<input type="hidden" name="type" value="WindowDoorContact" />
<fieldset>
<legend><%: Html.Language("WindowDoorMagnet")%></legend>
<ul>
<li><input type="radio" name="status" value="0" /><%: Html.Language("Issue")%> <%: Html.Language("Cancel")%> </li>
<li><input type="radio" name="status" value="1" /><%: Html.Language("Issue")%> <%: Html.Language("Setting")%></li>
<li><input type="radio" name="status" value="2" checked="checked" /><%:Html.Language("Invariability")%></li>
<li class="button"><a href="javascript:void(0)" class="easyui-linkbutton" data-options="iconCls:'icon-send'" onclick="send(this)"><%: Html.Language("Issue")%></a></li>
</ul>
</fieldset>
</form>
<form method="post" action="#">
<input type="hidden" name="type" value="ChestDoorContact" />
<fieldset>
<legend><%: Html.Language("ChestDoorMagnet")%></legend>
<ul>
<li><input type="radio" name="status" value="0" /><%: Html.Language("Issue")%> <%: Html.Language("Cancel")%> </li>
<li><input type="radio" name="status" value="1" /><%: Html.Language("Issue")%> <%: Html.Language("Setting")%></li>
<li><input type="radio" name="status" value="2" checked="checked" /><%:Html.Language("Invariability")%></li>
<li class="button"><a href="javascript:void(0)" class="easyui-linkbutton" data-options="iconCls:'icon-send'" onclick="send(this)"><%: Html.Language("Issue")%></a></li>
</ul>
</fieldset>
</form>
<form method="post" action="#">
<input type="hidden" name="type" value="RoomDoorLock" />
<fieldset>
<legend><%: Html.Language("GuestRoomDoorMagnet")%></legend>
<ul>
<li><input type="radio" name="status" value="0" /><%: Html.Language("Issue")%> <%: Html.Language("Cancel")%> </li>
<li><input type="radio" name="status" value="1" /><%: Html.Language("Issue")%> <%: Html.Language("Setting")%></li>
<li><input type="radio" name="status" value="2" checked="checked" /><%:Html.Language("Invariability")%></li>
<li class="button"><a href="javascript:void(0)" class="easyui-linkbutton" data-options="iconCls:'icon-send'" onclick="send(this)"><%: Html.Language("Issue")%></a></li>
</ul>
</fieldset>
</form>
<form method="post" action="#">
<input type="hidden" name="type" value="SmokeDetector" />
<fieldset>
<legend><%: Html.Language("SmokeDetector")%></legend>
<ul>
<li><input type="radio" name="status" value="0" /><%: Html.Language("Issue")%> <%: Html.Language("Cancel")%> </li>
<li><input type="radio" name="status" value="1" /><%: Html.Language("Issue")%> <%: Html.Language("Setting")%></li>
<li><input type="radio" name="status" value="2" checked="checked" /><%:Html.Language("Invariability")%></li>
<li class="button"><a href="javascript:void(0)" class="easyui-linkbutton" data-options="iconCls:'icon-send'" onclick="send(this)"><%: Html.Language("Issue")%></a></li>
</ul>
</fieldset>
</form>
<form method="post" action="#">
<input type="hidden" name="type" value="FloorHeating" />
<fieldset>
<legend><%: Html.Language("FloorHeating")%></legend>
<ul>
<li><input type="radio" name="status" value="0" /><%: Html.Language("Issue")%> <%: Html.Language("Cancel")%> </li>
<li><input type="radio" name="status" value="1" /><%: Html.Language("Issue")%> <%: Html.Language("Setting")%></li>
<li><input type="radio" name="status" value="2" checked="checked" /><%:Html.Language("Invariability")%></li>
<li class="button"><a href="javascript:void(0)" class="easyui-linkbutton" data-options="iconCls:'icon-send'" onclick="send(this)"><%: Html.Language("Issue")%></a></li>
</ul>
</fieldset>
</form>
<form method="post" action="#">
<input type="hidden" name="type" value="Sink" />
<fieldset>
<legend><%: Html.Language("WaterPan")%></legend>
<ul>
<li><input type="radio" name="status" value="0" /><%: Html.Language("Issue")%> <%: Html.Language("Cancel")%> </li>
<li><input type="radio" name="status" value="1" /><%: Html.Language("Issue")%> <%: Html.Language("Setting")%></li>
<li><input type="radio" name="status" value="2" checked="checked" /><%:Html.Language("Invariability")%></li>
<li class="button"><a href="javascript:void(0)" class="easyui-linkbutton" data-options="iconCls:'icon-send'" onclick="send(this)"><%: Html.Language("Issue")%></a></li>
</ul>
</fieldset>
</form>
</div>
<!-- col3 -->
<div style="width:350px;float:left;">
<form method="post" action="#">
<input type="hidden" name="type" value="BathroomInfrared" />
<fieldset>
<legend><%: Html.Language("BathroomInfrared")%></legend>
<ul>
<li><input type="radio" name="status" value="0" /><%: Html.Language("Issue")%> <%: Html.Language("Cancel")%> </li>
<li><input type="radio" name="status" value="1" /><%: Html.Language("Issue")%> <%: Html.Language("Setting")%></li>
<li><input type="radio" name="status" value="2" checked="checked" /><%:Html.Language("Invariability")%></li>
<li class="button"><a href="javascript:void(0)" class="easyui-linkbutton" data-options="iconCls:'icon-send'" onclick="send(this)"><%: Html.Language("Issue")%></a></li>
</ul>
</fieldset>
</form>
<form method="post" action="#">
<input type="hidden" name="type" value="DrawingRoomInfrared" />
<fieldset>
<legend><%: Html.Language("DrawingRoomInfrared")%></legend>
<ul>
<li><input type="radio" name="status" value="0" /><%: Html.Language("Issue")%> <%: Html.Language("Cancel")%> </li>
<li><input type="radio" name="status" value="1" /><%: Html.Language("Issue")%> <%: Html.Language("Setting")%></li>
<li><input type="radio" name="status" value="2" checked="checked" /><%:Html.Language("Invariability")%></li>
<li class="button"><a href="javascript:void(0)" class="easyui-linkbutton" data-options="iconCls:'icon-send'" onclick="send(this)"><%: Html.Language("Issue")%></a></li>
</ul>
</fieldset>
</form>
<form method="post" action="#">
<input type="hidden" name="type" value="BalconyInfrared" />
<fieldset>
<legend><%: Html.Language("BalconyInfrared")%></legend>
<ul>
<li><input type="radio" name="status" value="0" /><%: Html.Language("Issue")%> <%: Html.Language("Cancel")%> </li>
<li><input type="radio" name="status" value="1" /><%: Html.Language("Issue")%> <%: Html.Language("Setting")%></li>
<li><input type="radio" name="status" value="2" checked="checked" /><%:Html.Language("Invariability")%></li>
<li class="button"><a href="javascript:void(0)" class="easyui-linkbutton" data-options="iconCls:'icon-send'" onclick="send(this)"><%: Html.Language("Issue")%></a></li>
</ul>
</fieldset>
</form>
<form method="post" action="#">
<input type="hidden" name="type" value="ChestInfrared" />
<fieldset>
<legend><%: Html.Language("ChestInfrared")%></legend>
<ul>
<li><input type="radio" name="status" value="0" /><%: Html.Language("Issue")%> <%: Html.Language("Cancel")%> </li>
<li><input type="radio" name="status" value="1" /><%: Html.Language("Issue")%> <%: Html.Language("Setting")%></li>
<li><input type="radio" name="status" value="2" checked="checked" /><%:Html.Language("Invariability")%></li>
<li class="button"><a href="javascript:void(0)" class="easyui-linkbutton" data-options="iconCls:'icon-send'" onclick="send(this)"><%: Html.Language("Issue")%></a></li>
</ul>
</fieldset>
</form>
<form method="post" action="#">
<fieldset>
<input type="hidden" name="type" value="RoomStatusAid" />
<legend><%: Html.Language("AssistRoomStatus")%></legend>
<div style="text-align:left;padding-left:130px;">
<% foreach (var item in ViewData["RoomStatusAid"] as IList<Domain.RoomStatusAid>) { %>
<input type="checkbox" name="roomStatusAids" <%=item.ActiveIndicator ? "" : "disabled=\"disabled\"" %> value="<%=item.ID %>" /><%=item.Name %><br />
<% } %>
</div>
<div style="text-align:center;">
<a href="javascript:void(0)" class="easyui-linkbutton" data-options="iconCls:'icon-send'" onclick="sendRoomStatusAid(this)"><%: Html.Language("Issue")%></a>
</div>
</fieldset>
</form>
</div>
</fieldset>
</div>
</div>
</div>
</div>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ScriptContent" runat="server">
<style type="text/css">
#content {
width:1100px;
margin:7px;
}
#content form{
margin:1px;
}
#content fieldset {
border:1px solid #95B8E7;
}
#content form ul {
margin:0px;
padding:0px;
list-style-type:none;
}
#content form ul li {
float:left;
height:25px;
line-height:25px;
width:80px;
}
</style>
<script type="text/javascript" src="/Scripts/room-control-index.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; } %>
</asp:Content>

View File

@@ -0,0 +1,110 @@
<%@ 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("RoomControl")%>
</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="overflow:hidden;height:30px;">
<div class="toolbar">
<a href="javascript:void(0)" class="toolbar-button tb-icon-refresh" onclick="$('#dg').datagrid('reload');"><%: Html.Language("Refresh")%></a>
<a href="javascript:void(0)" class="toolbar-button tb-icon-add" onclick="addRoomControrl()"><%: Html.Language("New")%></a>
<a href="javascript:void(0)" class="toolbar-button tb-icon-edit" onclick="editRoomControrl()"><%: Html.Language("Edit")%></a>
<a href="javascript:void(0)" class="toolbar-button tb-icon-remove" onclick="del()"><%: Html.Language("Delete")%></a>
<a href="javascript:void(0)" class="toolbar-button tb-icon-apply" onclick="setActiveIndicator()"><%: Html.Language("StartAndStop")%></a>
</div>
</div>
<div data-options="region:'center',border:false">
<table id="dg" class="easyui-datagrid" style="width:100%; height:auto;"
data-options="
border: false,
pagination: true,
pageSize: 20,
rownumbers: true,
sortName: 'ID',
sortOrder: 'desc',
fit: true,
fitColumns: true,
striped: true,
idField: 'ID',
url: '/RoomControl/LoadByRoomControl/',
method: 'POST',
frozenColumns: [[ { field: 'ID', checkbox: true } ]],
onDblClickRow: function(index, row) { editRoomControrl(row); },
">
<thead>
<tr>
<th data-options="field:'ActiveIndicator',align:'center',resizable:false,formatter:function(val,rec){return val==true ? lang.Yes : lang.No;}">
<%: Html.Language("StartAndStop")%>
</th>
<%--<th data-options="field:'GroupName',sortable:true,resizable:false">
<%: Html.Language("Floor")%>
</th>--%>
<th data-options="field:'RoomTypeName',sortable:true,resizable:false">
<%: Html.Language("RoomType")%>
</th>
<th data-options="field:'RoomNumbers',sortable:true,resizable:false,width:200">
<%: Html.Language("RoomNumber")%>
</th>
<th data-options="field:'RoomStatusID',align:'center',sortable:true,resizable:false,formatter:function(val){
switch(val){
case 2: return lang.Rented;
case 4: return lang.NoRented;
case 8: return lang.CheckOut;
case 16: return lang.EmptyRoom;
default: return ''
}
}">
<%: Html.Language("RoomStatus")%>
</th>
<th data-options="field:'RoomCardTypeName',sortable:true,resizable:false">
<%: Html.Language("CardType")%>
</th>
<th data-options="field:'RoomTypeSceneName',sortable:true,resizable:false">
<%: Html.Language("SceneName")%>
</th>
<th data-options="field:'TimingType',align:'center',sortable:true,resizable:false,formatter:function(val){
switch(val){
case 1: return lang.EveryWeek;
case 2: return lang.EveryMonth;
default: return lang.EveryDay;
}
}">
<%: Html.Language("TimingType")%>
</th>
<th data-options="field:'TimingDay',align:'center',sortable:true,resizable:false">
<%: Html.Language("Date")%>
</th>
<th data-options="field:'Timing',align:'center',sortable:true,resizable:false">
<%: Html.Language("Time")%>
</th>
<th data-options="field:'ExecStatus',align:'center',sortable:true,resizable:false,formatter: function(val) { return val == true ? lang.Executed : lang.NonExecution; }">
<%: Html.Language("ExecStatus")%>
</th>
<th data-options="field:'ExecTime',sortable:true,resizable:false">
<%: Html.Language("ExecTime")%>
</th>
</tr>
</thead>
</table>
</div>
</div>
<div id="dialog" class="easyui-window" style="padding: 5px;" data-options="closed: true,modal: true,collapsible: false,minimizable: false,maximizable: false">
<div class="easyui-panel dlg-content" style="margin-bottom:5px;"></div>
<div class="dlg-footer" style="text-align:right; padding:5px 5px 0 0;">
<a class="easyui-linkbutton dlg-btn-save" data-options="iconCls:'icon-save'" href="javascript:void(0)"><%: Html.Language("Save")%></a>
<a class="easyui-linkbutton dlg-btn-cancel" data-options="iconCls:'icon-cancel'" href="javascript:void(0)" onclick="$('#dialog').window('close');"><%: Html.Language("Cancel")%></a>
</div>
</div>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ScriptContent" runat="server">
<script type="text/javascript" src="/Scripts/room-control-index.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; } %>
</asp:Content>

View File

@@ -0,0 +1,20 @@
<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<Domain.RoomModal>" %>
<style type="text/css">
#roomModalForm table th {
font-weight: normal;
text-align: right;
}
</style>
<form id="roomModalForm" method="post" data-options="novalidate:true">
<input type="hidden" name="ID" value="<%: Model.ModalAddress %>" />
<table style="margin: 20px auto;">
<tr>
<th><label for="txtName"><%: Html.Language("CustomName")%></label></th>
<td>
<input id="txtName" name="Name" class="easyui-validatebox textbox text" data-options="required:true" value="<%: Model.Name %>" />
</td>
</tr>
</table>
</form>

View File

@@ -0,0 +1,120 @@
<%@ 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("ServiceQuery")%>
</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="overflow: hidden; height: 30px;">
<div class="toolbar">
<%--<a href="javascript:void(0)" class="toolbar-button tb-icon-refresh" onclick="$('#dg').datagrid('reload')">
<%: Html.Language("Refresh") %></a>--%>
<label>
<%: Html.Language("RoomNumber")%></label>
<input id="txtRoomNumber" class="easyui-validatebox" style="width: 60px;" />
<label>
<%: Html.Language("StartDate")%></label>
<input id="txtStartTime" type="text" class="easyui-datetimebox" style="width: 130px;"
data-options="showSeconds:false" />
<label>
<%: Html.Language("Deadline")%></label>
<input id="txtEndTime" type="text" class="easyui-datetimebox" style="width: 130px;"
data-options="showSeconds:false" />
<label>
<%: Html.Language("ServiceType")%></label>
<select id="cbxServiceType" class="easyui-combogrid" style="width: 100px;" data-options="
panelWidth: 260,
multiple: true,
idField: 'Code',
textField: 'Name',
editable: false,
fitColumns: true,
url: '/AlarmSetting/LoadServicesAndAbnormities/',
columns:[[
{ field: 'ck',checkbox: true },
{ field: 'Name', title: '<%: Html.Language("ServiceName")%>', width: 100 }
]]
">
</select>
<a href="javascript:void(0)" class="toolbar-button tb-icon-search" onclick="query();">
<%: Html.Language("Query")%></a>
<a href="/RoomService/ExportExcel/" class="toolbar-button tb-icon-export" target="_blank"><%: Html.Language("Export")%></a>
</div>
</div>
<div data-options="region:'center',border:false">
<table id="dg" class="easyui-datagrid" style="width: 100%; height: auto;" data-options="
border: false,
singleSelect: true,
pagination: true,
pageSize: 20,
rownumbers: true,
striped: true,
sortName: 'ID',
sortOrder: 'asc',
fit: true,
fitColumns: true,
idField: 'ID',
method: 'POST'
">
<thead>
<tr>
<th data-options="field:'RoomNumber',sortable:true,resizable:false">
<%: Html.Language("RoomNumber")%>
</th>
<th data-options="field:'Name',sortable:true,resizable:false">
<%: Html.Language("ServiceType")%>
</th>
<th data-options="field:'StartTime',sortable:true,resizable:false,formatter:$.tools.formatDateTime">
<%: Html.Language("StartDate")%>
</th>
<th data-options="field:'EndTime',resizable:false,formatter:$.tools.formatDateTime,sortable:true">
<%: Html.Language("Deadline")%>
</th>
<th data-options="field:'Time',sortable:true,resizable:false,formatter:timeFormatter">
<%: Html.Language("TotalTime")%>
</th>
</tr>
</thead>
</table>
</div>
</div>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ScriptContent" runat="server">
<script type="text/javascript">
function timeFormatter(val) {
var hour = Math.floor(val / 60);
var minute = Math.ceil(val % 60);
return hour + lang.Hour + minute + lang.Minute;
}
function query() {
var services = $('#cbxServiceType').combogrid('grid').datagrid('getChecked');
if (services.length <= 0) {
$.tools.alert(lang.PleaseSelectAtLeastOneService);
return;
}
var codes = [];
for (var i in services) {
codes.push(services[i].Code);
}
var params = {
RoomNumber: $('#txtRoomNumber').val(),
StartTime: $('#txtStartTime').datetimespinner('getValue'),
EndTime: $('#txtEndTime').datetimespinner('getValue'),
AlarmCodes: codes.join(',')
};
$('#dg').datagrid({ url: '/RoomService/LoadServiceRecords/', queryParams: params });
}
$(function () {
var curTime = new Date();
var startTime = new Date(curTime.getTime() - 7 * 24 * 60 * 60 * 1000);
$("#txtStartTime").datetimebox("setValue", startTime.format('yyyy-MM-dd hh:mm:ss'));
$("#txtEndTime").datetimebox("setValue", curTime.format('yyyy-MM-dd hh:mm:ss'));
});
</script>
</asp:Content>

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>

View File

@@ -0,0 +1,54 @@
<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<Domain.RoomType>" %>
<style type="text/css">
#roomTypeForm table th {
font-weight: normal;
text-align: right;
}
</style>
<form id="roomTypeForm" class="easyui-form" method="post" data-options="novalidate:true">
<input type="hidden" name="ID" value="<%: Model.ID %>" />
<table style="margin: 20px auto;" cellpadding="3">
<tr>
<th><label for="txtCode"> <%: Html.Language("ID")%></label></th>
<td>
<input id="txtCode" name="Code" class="easyui-numberbox textbox text" data-options="required:true,min:1" value="<%: Model.Code %>" />
</td>
</tr>
<tr>
<th><label for="txtHostName"><%: Html.Language("Name")%></label></th>
<td>
<input id="txtHostName" name="HostName" class="easyui-validatebox textbox text" data-options="required:true,validType:'blwtext'" value="<%: Model.HostName %>" />
</td>
</tr>
<tr>
<th><label for="txtName"><%: Html.Language("CustomName")%></label></th>
<td>
<input id="txtName" name="Name" class="easyui-validatebox textbox text" data-options="required:true,validType:'blwtext'" value="<%: Model.Name %>" />
</td>
</tr>
<!-- 碳达人新添加的-->
<tr>
<th><label for="txtName"><%: Html.Language("RoomHeight")%></label></th>
<td>
<input id="txtName" name="Name" class="easyui-validatebox textbox text" data-options="required:true,validType:'blwtext'" value="<%: Model.RoomHeight %>" />
</td>
</tr>
<tr>
<th><label for="txtName"><%: Html.Language("RoomHotLossRatio")%></label></th>
<td>
<input id="txtName" name="Name" class="easyui-validatebox textbox text" data-options="required:true,validType:'blwtext'" value="<%: Model.RoomHotLossRatio %>" />
</td>
</tr>
<%--<tr>
<th><label for="txtName"><%: Html.Language("AirConditioningControls")%></label></th>
<td>
<select id="cbxControlType" name="ControlType" class="easyui-combobox" data-options="editable:false,required:true,panelHeight:'auto',value:<%: (int)Model.ControlType %>">
<option value="0"><%: Html.Language("TwoControl")%></option>
<option value="1"><%: Html.Language("FourControl")%></option>
</select>
</td>
</tr>--%>
</table>
</form>

View File

@@ -0,0 +1,20 @@
<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<Domain.RoomType>" %>
<style type="text/css">
#configFileForm {
padding: 20px 0 20px 20px;
}
</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; } %>
<form id="configFileForm" class="easyui-form" data-options="novalidate:true" method="post" enctype="multipart/form-data">
<input type="hidden" name="ID" value="<%: Model.ID %>" />
<input type="hidden" name="Name" value="<%: Model.Name %>" />
<input class="easyui-filebox" id="uf" name="file" style="width:90%;" data-options="required:true,buttonText:lang.SelectTheProfile" />
</form>

View File

@@ -0,0 +1,90 @@
<%@ Page Language="C#" MasterPageFile="~/Views/Shared/MasterPage.Master" Inherits="System.Web.Mvc.ViewPage<dynamic>" %>
<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
<%: Html.Language("RoomTypeSetting")%>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
<div class="easyui-layout" data-options="fit:true">
<div title='<%: Html.Language("RoomTypeSetting")%>' style="border-right:1px solid #95B8E7;" data-options="region:'center',border:false">
<table id="dg" class="easyui-datagrid" style="width:100%; height:auto;"
data-options="
toolbar: '#tb',
border: false,
singleSelect: true,
pagination: true,
pageSize: 20,
rownumbers: true,
striped: true,
sortName: 'ID',
sortOrder: 'asc',
fit: true,
fitColumns: true,
idField: 'ID',
url: '/RoomType/LoadAllByPage/',
method: 'post',
onDblClickRow: function(index, row) { edit(row); }
">
<thead>
<tr>
<th data-options="field:'ID',sortable:true">
<%: Html.Language("ID")%>
</th>
<th data-options="field:'HostName',sortable:true">
<%: Html.Language("Name")%>
</th>
<th data-options="field:'Name',sortable:true">
<%: Html.Language("CustomName")%>
</th>
<th data-options="field:'Uploader',sortable:true">
<%: Html.Language("UploadPerson")%>
</th>
<th data-options="field:'UploadTime',width:200,formatter:$.tools.formatDate,sortable:true">
<%: Html.Language("UploadTime")%>
</th>
</tr>
</thead>
</table>
</div>
</div>
<div id="tb">
<a href="javascript:void(0)" class="easyui-linkbutton" data-options="iconCls:'icon-reload',plain:true" onclick="$('#dg').datagrid('load',{});"><%: Html.Language("Refresh")%></a>
<a href="javascript:void(0)" class="easyui-linkbutton" data-options="iconCls:'icon-add',plain:true" onclick="add()"><%: Html.Language("New")%></a>
<a href="javascript:void(0)" class="easyui-linkbutton" data-options="iconCls:'icon-edit',plain:true" onclick="edit()"><%: Html.Language("Edit")%></a>
<a href="javascript:void(0)" class="easyui-linkbutton" data-options="iconCls:'icon-remove',plain:true" onclick="delData()"><%: Html.Language("Delete")%></a>
<a href="javascript:void(0)" class="easyui-linkbutton" data-options="iconCls:'icon-tip',plain:true" onclick="roomTypeModal()"><%: Html.Language("LoopManagement")%></a>
<a href="javascript:void(0)" class="easyui-linkbutton" data-options="iconCls:'icon-import',plain:true" onclick="airSetting()"><%: Html.Language("AirConditioningSetting")%></a>
<%-- <a href="javascript:void(0)" class="easyui-linkbutton" data-options="iconCls:'icon-tip',plain:true" onclick="relationDevice()">设备查看</a>
<a href="javascript:void(0)" class="easyui-linkbutton" data-options="iconCls:'icon-import',plain:true" onclick="importConfigFile()">配置文件导入</a>--%>
</div>
<div id="dialog" class="easyui-window" style="padding: 5px;"
data-options="
closed: true,
modal: true,
collapsible: false,
minimizable: false,
maximizable: false
">
<div class="easyui-panel dlg-content" style="margin-bottom:5px;"></div>
<div class="dlg-footer" style="text-align:right; padding:5px 5px 0 0;">
<a class="easyui-linkbutton dlg-btn-save" data-options="iconCls:'icon-save'" href="javascript:void(0)"><%: Html.Language("Save")%></a>
<a class="easyui-linkbutton dlg-btn-cancel" data-options="iconCls:'icon-cancel'" href="javascript:void(0)" onclick="$('#dialog').window('close');"><%: Html.Language("Cancel")%></a>
</div>
</div>
<div id="dialog2" class="easyui-window"
data-options="
closed: true,
modal: true,
collapsible: false,
minimizable: false,
maximizable: false
">
<div class="easyui-panel dlg-content" style="margin-bottom:5px;"></div>
</div>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ScriptContent" runat="server">
<script type="text/javascript" src="/Scripts/room-type-index.js"></script>
</asp:Content>

View File

@@ -0,0 +1,47 @@
<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<dynamic>" %>
<table id="dgRoomTypeAir" class="easyui-datagrid" style="width:100%; height:auto;"
data-options="
url: '/RoomType/LoadRoomTypeAirs/',
queryParams: { roomTypeID: <%: Model %> },
toolbar: '#tbRoomTypeAir',
border: false,
singleSelect: false,
checkOnSelect: true,
selectOnCheck: true,
pagination: true,
pageSize: 20,
rownumbers: true,
striped: true,
sortName: 'ID',
sortOrder: 'asc',
fit: true,
fitColumns: true,
idField: 'ID',
frozenColumns: [[ { field: 'ID', checkbox: true } ]],
method: 'POST',
onDblClickRow: function(index, row) { editRoomTypeAir(row); }
">
<thead>
<tr>
<th data-options="field:'ModalTypeName',resizable:false">
<%: Html.Language("ConfigurationName")%>
</th>
<th data-options="field:'CustomerName',resizable:false">
<%: Html.Language("CustomName")%>
</th>
<th data-options="field:'EnglishName',resizable:false">
<%: Html.Language("EnglishName")%>
</th>
<th data-options="field:'Sort',resizable:false">
<%: Html.Language("Sort")%>
</th>
</tr>
</thead>
</table>
<div id="tbRoomTypeAir">
<a href="javascript:void(0)" class="easyui-linkbutton" data-options="iconCls:'icon-reload',plain:true" onclick="$('#dgRoomTypeAir').datagrid('reload');"><%: Html.Language("Refresh")%></a>
<a href="javascript:void(0)" class="easyui-linkbutton" data-options="iconCls:'icon-add',plain:true" onclick="addRoomTypeAir(<%: Model %>)"><%: Html.Language("New")%></a>
<a href="javascript:void(0)" class="easyui-linkbutton" data-options="iconCls:'icon-edit',plain:true" onclick="editRoomTypeAir()"><%: Html.Language("Edit")%></a>
<a href="javascript:void(0)" class="easyui-linkbutton" data-options="iconCls:'icon-remove',plain:true" onclick="delRoomTypeAir()"><%: Html.Language("Delete")%></a>
</div>

View File

@@ -0,0 +1,46 @@
<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<dynamic>" %>
<style type="text/css">
#roomTypeAirForm table {
margin: 10px auto;
}
#roomTypeAirForm table th {
font-weight: normal;
cursor: default;
}
</style>
<form id="roomTypeAirForm">
<input type="hidden" name="ID" value="<%: Model.ID %>" />
<input type="hidden" name="RoomTypeID" value="<%: Model.RoomType == null ? 0 : Model.RoomType.ID %>" />
<table cellpadding="5px">
<tr>
<th><%: Html.Language("ConfigurationName")%></th>
<td>
<select id="cbxModalType" name="ModalTypeID" class="easyui-combobox" style="width:60px;"
data-options="
required: true,
editable: false,
panelHeight: 'auto',
url: '/RoomType/LoadModalTypes/',
valueField: 'ID',
textField: 'Name',
value: <%: Model.ModalType != null ? Model.ModalType.ID.ToString() : "''" %>
">
</select>
</td>
</tr>
<tr>
<th><label for="txtCustomName"><%: Html.Language("CustomName")%></label></th>
<td><input id="txtCustomName" name="CustomName" class="easyui-validatebox textbox text" data-options="required:true" style="width:100px;" value='<%: Model.CustomerName ?? "" %>' /></td>
</tr>
<tr>
<th><label for="txtEnglishName"><%: Html.Language("EnglishName")%></label></th>
<td><input id="txtEnglishName" name="EnglishName" class="easyui-validatebox textbox text" style="width:100px;" value='<%: Model.EnglishName ?? "" %>' /></td>
</tr>
<tr>
<th><label for="txtSort"><%: Html.Language("Sort")%></label></th>
<td><input id="txtSort" name="Sort" class="easyui-numberspinner textbox text" data-options="required:true" style="width:100px;" value='<%: Model.Sort %>' /></td>
</tr>
</table>
</form>

View File

@@ -0,0 +1,8 @@
<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<dynamic>" %>
<div class="easyui-tabs" data-options="plain:true,fit:true">
<div title='宝易上传回路' data-options="href:'/RoomType/RoomTypeModalBY?id=<%: Model.ID %>'">
</div>
<div title='自定义回路' data-options="href:'/RoomType/RoomTypeModalZDY?id=<%: Model.ID %>'">
</div>
</div>

View File

@@ -0,0 +1,106 @@
<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<dynamic>" %>
<table id="dgRoomModalBY" class="easyui-datagrid" style="width: 100%; height: auto;"
data-options="
url: '/RoomType/LoadRoomTypeModalsBY/',
queryParams: { roomTypeID: <%: Model %>,deviceType:1},
toolbar: '#tbRelationDeviceBY',
border: false,
singleSelect: true,
checkOnSelect: true,
selectOnCheck: true,
pagination: false,
pageSize: 50,
rownumbers: true,
striped: true,
sortName: 'Sort',
sortOrder: 'asc',
fit: true,
fitColumns: true,
idField: 'ID',
method: 'POST',
onDblClickRow: function(index, row) { editRoomTypeModalBY(row); }
">
<thead>
<tr>
<th data-options="field:'TypeName',sortable:true,resizable:false">
<%: Html.Language("Type")%>
</th>
<th data-options="field:'Outlet',sortable:true,resizable:false">
<%: Html.Language("Device")%>
</th>
<th data-options="field:'ModalAddress',sortable:true,resizable:false">
<%: Html.Language("ReturnAddress")%>
</th>
<th data-options="field:'Circuit',sortable:true,resizable:false">
<%: Html.Language("Circuit")%>
</th>
<%--<th data-options="field:'SceneNo',sortable:true,resizable:false">
<%: Html.Language("SceneNo")%>
</th>--%>
<th data-options="field:'Name',sortable:true,resizable:false">
<%: Html.Language("ChineseName")%>
</th>
<th data-options="field:'EnglishName',sortable:true,resizable:false">
<%: Html.Language("EnglishName")%>
</th>
<th data-options="field:'TWName',sortable:true,resizable:false">
<%: Html.Language("TWName")%>
</th>
<th data-options="field:'AliasName',sortable:true,resizable:false">
<%: Html.Language("AliasName")%>
</th>
<th data-options="field:'ActiveIndicator',align:'center',resizable:false,formatter:deviceCheck">
<%: Html.Language("Display")%>
</th>
<th data-options="field:'WXActiveIndicator',align:'center',resizable:false,formatter:deviceCheckWX">
API
</th>
<th data-options="field:'Beep',align:'center',resizable:false,formatter:beepCheck">
<%: Html.Language("SoundAlarm")%>
</th>
<th data-options="field:'Power',sortable:true,resizable:false">
<%: Html.Language("PowerWatt")%>
</th>
<th data-options="field:'Sort',align:'center',sortable:true,resizable:false">
<%: Html.Language("Sort")%>
</th>
</tr>
</thead>
</table>
<div id="tbRelationDeviceBY">
<a href="javascript:void(0)" class="easyui-linkbutton" data-options="iconCls:'icon-reload',plain:true"
onclick="$('#dgRoomModalBY').datagrid('reload');">
<%: Html.Language("Refresh")%></a> <a href="javascript:void(0)" class="easyui-linkbutton"
data-options="iconCls:'icon-edit',plain:true" onclick="editRoomTypeModalBY()">
<%: Html.Language("Edit")%></a>
</div>
<script type="text/javascript">
//回路是否显示
function deviceCheck(val, row) {
var url = '/RoomType/SaveDeviceDisplayChange/';
if (val) {
return '<input type="checkbox" checked="checked" onchange="updateDisplay(this,\'' + row.ID + '\',\'' + url + '\')" />';
} else {
return '<input type="checkbox" onchange="updateDisplay(this,\'' + row.ID + '\',\'' + url + '\')" />';
}
}
//微信是否能控制
function deviceCheckWX(val, row) {
var url = '/RoomType/SaveRoomTypeWXDevice/';
if (val) {
return '<input type="checkbox" checked="checked" onchange="updateDisplay(this,\'' + row.ID + '\',\'' + url + '\')" />';
} else {
return '<input type="checkbox" onchange="updateDisplay(this,\'' + row.ID + '\',\'' + url + '\')" />';
}
}
//是否报警
function beepCheck(val, row) {
var url = '/RoomType/SaveBeepDisplayChange/';
var disabled = row.Type == 4 ? "" : "disabled";
if (val) {
return '<input type="checkbox" ' + disabled + ' checked="checked" onchange="updateDisplay(this,\'' + row.ID + '\',\'' + url + '\')" />';
} else {
return '<input type="checkbox" ' + disabled + ' onchange="updateDisplay(this,\'' + row.ID + '\',\'' + url + '\')" />';
}
}
</script>

View File

@@ -0,0 +1,133 @@
<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<dynamic>" %>
<style type="text/css">
#roomTypeModalForm table {
margin: 10px auto;
}
#roomTypeModalForm table th{
font-weight: normal;
text-align: right;
cursor: default;
}
#roomTypeModalForm table th,
#roomTypeModalForm table td{
/*background:pink;*/
}
</style>
<form id="roomTypeModalForm">
<input type="hidden" name="ID" value="<%: Model.ID %>" id="txtRoomTypeModalID" />
<input type="hidden" name="RoomTypeID" value="<%: Model.RoomType == null ? 0 : Model.RoomType.ID %>" />
<input type="hidden" name="Color" value="<%: Model.Color == null ? "" : Model.Color %>" />
<input type="hidden" name="Outlet" value="<%: Model.Outlet == null ? "" : Model.Outlet %>" />
<table cellpadding="3">
<tr>
<th><%: Html.Language("Type")%></th>
<td>
<select name="Type" class="easyui-combobox"
data-options="
required:true,
editable:false,
panelHeight:'auto',
value: '<%: Model.Type %>',
onSelect:cbxDeviceTypeOnSelect
">
<%--阿宝修改的---设备类型--%>
<% foreach (var name in Enum.GetNames(typeof(Domain.DeviceType))) { %>
<option value="<%: name %>"><%: Html.Language(name) %></option>
<% } %>
</select>
</td>
<%--<th><%: Html.Language("Subtype") %></th>
<td>
<select id="subtype" name="Subtype" class="easyui-combobox" style="width:65px;"
data-options="
url: '/RoomType/LoadDeviceSubtypes?deviceType=<%: Model.Type %>',
editable: false,
panelHeight: 'auto',
valueField: 'Value',
textField: 'Name',
value: '<%: Model.Subtype != null ? Model.Subtype : "" %>'
">
</select>
</td>--%>
</tr>
<tr>
<th> <%: Html.Language("ReturnAddress")%></th>
<td colspan="4"><input class="easyui-validatebox textbox text" id="txtModalAddress" name="ModalAddress" <%: Model.Default ? "readonly='readonly'" : "" %> data-options="required:true,validType:'length[9,9]'" value="<%: Model.ModalAddress %>" /></td>
</tr>
<%--<tr>
<th> <%: Html.Language("DeliveryOutlet")%></th>
<td colspan="4"><input class="easyui-validatebox textbox text" name="Outlet" data-options="required:true" value="<%: Model.Outlet %>" /></td>
</tr>--%>
<tr>
<th> <%: Html.Language("Name")%></th>
<td colspan="4"><input class="easyui-validatebox textbox text" name="Name" data-options="required:true" value='<%= Model.Name ?? "" %>' /></td>
</tr>
<tr>
<th> <%: Html.Language("EnglishName")%></th>
<td colspan="4"><input class="easyui-validatebox textbox text" name="EnglishName" value='<%= Model.EnglishName ?? "" %>' /></td>
</tr>
<tr>
<th> <%: Html.Language("TWName")%></th>
<td colspan="4"><input class="easyui-validatebox textbox text" name="TWName" value='<%= Model.TWName ?? "" %>' /></td>
</tr>
<tr>
<th> <%: Html.Language("AliasName")%></th>
<td colspan="4"><input class="easyui-validatebox textbox text" name="AliasName" value='<%= Model.AliasName ?? "" %>' /></td>
</tr>
<tr>
<th><%: Html.Language("PowerWatt")%></th>
<td colspan="4"><input class="easyui-numberbox textbox text" name="Power" data-options="required:true" value="<%: Model.Power %>" /></td>
</tr>
<%--<tr>
<th><%: Html.Language("LowElectricityValue")%></th>
<td colspan="4"><input class="easyui-numberbox textbox text" name="LowPower" data-options="required:true" value="<%: Model.LowPower %>" /></td>
</tr>--%>
<tr>
<th><%: Html.Language("Sort")%></th>
<td colspan="4"><input name="Sort" class="easyui-numberspinner text" value="1" style="width:60px;" data-options="required:true,min:1,value:<%: Model.Sort %>" /></td>
</tr>
<tr>
<th>
TCL设备名
</th>
<td colspan="4">
<select id="cmbMode11TCLDeviceName" name="TCLDeviceName" class="easyui-combobox" style="width: 60px;" data-options="
required:true,
editable:false,
panelHeight:'auto',
value: '<%: Model.TCLDeviceName %>',
">
<option value="">--请选择--</option>
<option value="红">R-红</option>
<option value="绿">G-绿</option>
<option value="蓝">B-蓝</option>
</select>
</td>
</tr>
<tr>
<th>
组设备编号
</th>
<td colspan="4">
<input name="MultipleGroupID" class="easyui-numberspinner text" value="<%: Model.MultipleGroupID %>" style="width: 60px;" />
</td>
</tr>
<tr>
<th>组设备</th>
<td colspan="4">
<select id="selectMultipleTCLName" name="MultipleTCLName" class="easyui-combobox" data-options="
required:true,
editable:false,
panelHeight:'auto',
value: '<%: Model.MultipleTCLName %>'">
<option value="">--请选择--</option>
<option value="氛围灯">氛围灯</option>
</select>
</td>
</tr>
</table>
</form>

View File

@@ -0,0 +1,164 @@
<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<dynamic>" %>
<table id="dgRoomModal" class="easyui-datagrid" style="width: 100%; height: auto;"
data-options="
url: '/RoomType/LoadRoomTypeModalsWithPage/',
queryParams: { roomTypeID: <%: Model %>,deviceType:1},
toolbar: '#tbRelationDevice',
border: false,
singleSelect: true,
checkOnSelect: true,
selectOnCheck: true,
pagination: false,
pageSize: 50,
rownumbers: true,
striped: true,
sortName: 'Sort',
sortOrder: 'asc',
fit: true,
fitColumns: true,
idField: 'ID',
method: 'POST',
onDblClickRow: function(index, row) { editRoomTypeModal(row); }
">
<thead>
<tr>
<th data-options="field:'TypeName',sortable:true,resizable:false">
<%: Html.Language("Type")%>
</th>
<th data-options="field:'ModalAddress',sortable:true,resizable:false">
<%: Html.Language("ReturnAddress")%>
</th>
<%--<th data-options="field:'Outlet',sortable:true,resizable:false">
<%: Html.Language("DeliveryOutlet")%>
</th>--%>
<th data-options="field:'Name',sortable:true,resizable:false">
<%: Html.Language("ChineseName")%>
</th>
<th data-options="field:'EnglishName',sortable:true,resizable:false">
<%: Html.Language("EnglishName")%>
</th>
<th data-options="field:'TWName',sortable:true,resizable:false">
<%: Html.Language("TWName")%>
</th>
<th data-options="field:'AliasName',sortable:true,resizable:false">
<%: Html.Language("AliasName")%>
</th>
<th data-options="field:'Power',sortable:true,resizable:false">
<%: Html.Language("PowerWatt")%>
</th>
<th data-options="field:'LowPower',sortable:true,resizable:false">
<%: Html.Language("LowElectricityValue")%>
</th>
<%--<th data-options="field:'Subtype',sortable:true,resizable:false">
<%: Html.Language("Subtype") %>
</th>--%>
<th data-options="field:'ActiveIndicator',align:'center',resizable:false,formatter:deviceCheck">
<%: Html.Language("Display")%>
</th>
<th data-options="field:'OfflineDisplay',align:'center',resizable:false,formatter:offlineCheck">
<%: Html.Language("Offline")%>
</th>
<th data-options="field:'LowPowerDisplay',align:'center',resizable:false,formatter:lowPowerCheck">
<%: Html.Language("LowPower")%>
</th>
<th data-options="field:'Beep',align:'center',resizable:false,formatter:beepCheck">
<%: Html.Language("SoundAlarm")%>
</th>
<th data-options="field:'Abnormal',align:'center',resizable:false,formatter:abnormalCheck">
<%: Html.Language("Abnormal")%>
</th>
<th data-options="field:'Sort',align:'center',sortable:true,resizable:false">
<%: Html.Language("Sort")%>
</th>
<!--阿宝添加的-->
<th data-options="field:'TCLDeviceName',align:'center',sortable:true,resizable:false">
TCL设备名
</th>
<th data-options="field:'MultipleGroupID',align:'center',sortable:true,resizable:false">
组设备编号
</th>
<th data-options="field:'MultipleTCLName',align:'center',sortable:true,resizable:false">
组设备名
</th>
</tr>
</thead>
</table>
<div id="tbRelationDevice">
<a href="javascript:void(0)" class="easyui-linkbutton" data-options="iconCls:'icon-reload',plain:true"
onclick="$('#dgRoomModal').datagrid('reload');">
<%: Html.Language("Refresh")%></a> <a href="javascript:void(0)" class="easyui-linkbutton"
data-options="iconCls:'icon-add',plain:true" onclick="addRoomTypeModal(<%: Model %>)">
<%: Html.Language("New")%></a> <a href="javascript:void(0)" class="easyui-linkbutton"
data-options="iconCls:'icon-edit',plain:true" onclick="editRoomTypeModal()">
<%: Html.Language("Edit")%></a> <a href="javascript:void(0)" class="easyui-linkbutton"
data-options="iconCls:'icon-remove',plain:true" onclick="delRoomTypeModal()">
<%: Html.Language("Delete")%></a>
<%--<label>
<%: Html.Language("Type")%></label>
<select id="cbxDeviceType" class="easyui-combobox" style="width: 120px; text-align: left;"
data-options="required:true,editable:false,panelHeight:'auto',onSelect:cbxDeviceTypeOnSelect">
<% foreach (var name in Enum.GetNames(typeof(Domain.DeviceType)))
{ %><option value="<%: name %>"><%: Html.Language(name) %></option>
<% } %>
</select>--%>
</div>
<script type="text/javascript">
//回路是否显示
function deviceCheck(val, row) {
var url = '/RoomType/SaveDeviceDisplayChange/';
if (val) {
return '<input type="checkbox" checked="checked" onchange="updateDisplay(this,\'' + row.ID + '\',\'' + url + '\')" />';
} else {
return '<input type="checkbox" onchange="updateDisplay(this,\'' + row.ID + '\',\'' + url + '\')" />';
}
}
//离线是否显示
function offlineCheck(val, row) {
var url = '/RoomType/SaveOfflineDisplayChange/';
if (val) {
return '<input type="checkbox" checked="checked" onchange="updateDisplay(this,\'' + row.ID + '\',\'' + url + '\')" />';
} else {
return '<input type="checkbox" onchange="updateDisplay(this,\'' + row.ID + '\',\'' + url + '\')" />';
}
}
//低电是否显示
function lowPowerCheck(val, row) {
var url = '/RoomType/SaveLowPowerDisplayChange/';
if (val) {
return '<input type="checkbox" checked="checked" onchange="updateDisplay(this,\'' + row.ID + '\',\'' + url + '\')" />';
} else {
return '<input type="checkbox" onchange="updateDisplay(this,\'' + row.ID + '\',\'' + url + '\')" />';
}
}
//是否报警
function beepCheck(val, row) {
var url = '/RoomType/SaveBeepDisplayChange/';
var disabled = row.Type == 4 ? "" : "disabled";
if (val) {
return '<input type="checkbox" ' + disabled + ' checked="checked" onchange="updateDisplay(this,\'' + row.ID + '\',\'' + url + '\')" />';
} else {
return '<input type="checkbox" ' + disabled + ' onchange="updateDisplay(this,\'' + row.ID + '\',\'' + url + '\')" />';
}
}
//是否异常判断
function abnormalCheck(val, row) {
var url = '/RoomType/SaveAbnormalChange/';
//var disabled = row.Type == 4 ? "" : "disabled";
var disabled = "";
if (val) {
return '<input type="checkbox" ' + disabled + ' checked="checked" onchange="updateDisplay(this,\'' + row.ID + '\',\'' + url + '\')" />';
} else {
return '<input type="checkbox" ' + disabled + ' onchange="updateDisplay(this,\'' + row.ID + '\',\'' + url + '\')" />';
}
}
//更新显示
function updateDisplay(sender, id, url) {
if (id == 0) {
$(sender).attr("checked", false);
$.tools.alert(lang.PleaseEditLoop);
return;
}
var params = { id: id, activeIndicator: $(sender).is(":checked") };
$.tools.post(params, url, function () { $("#dgRoomModal").datagrid('reload'); });
}
</script>

View File

@@ -0,0 +1,74 @@
<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<dynamic>" %>
<table id="dgScene" class="easyui-datagrid" style="width: 100%; height: auto;" data-options="
toolbar: '#tbRelationScene',
border: false,
singleSelect: true,
pagination: true,
pageSize: 50,
rownumbers: true,
sortName: 'Name',
sortOrder: 'asc',
fit: true,
fitColumns: true,
striped: true,
idField: 'ID',
url: '/RoomTypeScene/LoadAllByPage/',
queryParams: { roomTypeID: <%: Model %>},
method: 'POST',
onDblClickRow: function(index, row) { editRoomTypeScene(row); }
">
<thead>
<tr>
<th data-options="field:'RoomTypeName',sortable:true,resizable:false">
<%: Html.Language("RoomType")%>
</th>
<th data-options="field:'Type',sortable:true,resizable:false">
<%: Html.Language("Type")%>
</th>
<th data-options="field:'Name',sortable:true,resizable:false">
<%: Html.Language("ChineseName")%>
</th>
<th data-options="field:'AliasName',sortable:true,resizable:false">
<%: Html.Language("AliasName")%>
</th>
<th data-options="field:'EnglishName',sortable:true,resizable:false">
<%: Html.Language("EnglishName")%>
</th>
<th data-options="field:'TWName',resizable:false">
<%: Html.Language("TWName")%>
</th>
<th data-options="field:'GroupAddress',sortable:true,resizable:false">
<%: Html.Language("Command")%>
</th>
<th data-options="field:'TakeInverse',align:'center',resizable:false,formatter:takeInverseCheck">
<%: Html.Language("TakeInverse")%>
</th>
<th data-options="field:'Sort',align:'center',sortable:true,resizable:false">
<%: Html.Language("Sort")%>
</th>
</tr>
</thead>
</table>
<div id="tbRelationScene">
<a href="javascript:void(0)" class="easyui-linkbutton" data-options="iconCls:'icon-reload',plain:true" onclick="$('#dgScene').datagrid('reload');"><%: Html.Language("Refresh")%></a>
<a href="javascript:void(0)" class="easyui-linkbutton" data-options="iconCls:'icon-add',plain:true" onclick="addRoomTypeScene(<%: Model %>)"><%: Html.Language("New")%></a>
<a href="javascript:void(0)" class="easyui-linkbutton" data-options="iconCls:'icon-edit',plain:true" onclick="editRoomTypeScene()"><%: Html.Language("Edit")%></a>
<a href="javascript:void(0)" class="easyui-linkbutton" data-options="iconCls:'icon-remove',plain:true" onclick="delRoomTypeScene()"><%: Html.Language("Delete")%></a>
</div>
<script type="text/javascript">
//低电是否显示
function takeInverseCheck(val, row) {
var url = '/RoomTypeScene/SaveTakeInverseChange/';
if (val) {
return '<input type="checkbox" checked="checked" onchange="updateDisplay(this,\'' + row.ID + '\',\'' + url + '\')" />';
} else {
return '<input type="checkbox" onchange="updateDisplay(this,\'' + row.ID + '\',\'' + url + '\')" />';
}
}
//更新显示
function updateDisplay(sender, id, url) {
var params = { id: id, activeIndicator: $(sender).is(":checked") };
$.tools.post(params, url);
}
</script>

View File

@@ -0,0 +1,10 @@
<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<dynamic>" %>
<div class="easyui-tabs" data-options="plain:true,fit:true">
<div title='<%: Html.Language("WXMenu")%>' data-options="href:'/RoomType/RoomTypeWeiXinMenu?roomTypeID=<%: Model.ID %>'">
</div>
<div title='<%: Html.Language("SceneControl")%>' data-options="href:'/RoomType/RoomTypeWeiXinScene?roomTypeID=<%: Model.ID %>'">
</div>
<div title='<%: Html.Language("DeviceControl")%>' data-options="href:'/RoomType/RoomTypeWeiXinDevice?roomTypeID=<%: Model.ID %>'">
</div>
</div>

Some files were not shown because too many files have changed in this diff Show More