初始化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,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>