初始化CRICS
This commit is contained in:
71
WebSite/Views/LightControl/Index.aspx
Normal file
71
WebSite/Views/LightControl/Index.aspx
Normal 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>
|
||||
122
WebSite/Views/LightControl/LightControl.ascx
Normal file
122
WebSite/Views/LightControl/LightControl.ascx
Normal 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; } %>
|
||||
83
WebSite/Views/LightControl/SimonIndex.aspx
Normal file
83
WebSite/Views/LightControl/SimonIndex.aspx
Normal 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>
|
||||
Reference in New Issue
Block a user