parent
19daada856
commit
266a65385b
@ -0,0 +1,40 @@
|
||||
@model SearchDataHistoryModel
|
||||
@{
|
||||
var start = (Model.PageIndex - 1) * Model.PageSize;
|
||||
}
|
||||
@Html.EditorForModel("Search")
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<table class="table table-striped projects">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>行号</th>
|
||||
<th>设备编号</th>
|
||||
<th>设备名称</th>
|
||||
<th>数据名称</th>
|
||||
<th>数据值</th>
|
||||
<th>单位</th>
|
||||
<th>时间</th>
|
||||
</tr>
|
||||
@foreach (var item in Model.List)
|
||||
{
|
||||
<tr>
|
||||
<td>@(++start)</td>
|
||||
<td>@item.DeviceNumber</td>
|
||||
<td>@item.DeviceName</td>
|
||||
<td>@item.Name</td>
|
||||
<td>@item.Value</td>
|
||||
<td>@item.Unit</td>
|
||||
<td>@item.Date</td>
|
||||
</tr>
|
||||
}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
@if (Model.PageCount() > 1)
|
||||
{
|
||||
<div class="card-footer clearfix">
|
||||
@(await Html.PartialAsync("_Paged"))
|
||||
</div>
|
||||
}
|
||||
</div>
|
@ -0,0 +1,12 @@
|
||||
@model EditDataModel
|
||||
@{
|
||||
HtmlTitle = "查看" + ViewContext.ViewData.ModelMetadata.ModelType.GetDisplayName();
|
||||
}
|
||||
@if (Model.Type == DeviceDataType.Int || Model.Type == DeviceDataType.Float)
|
||||
{
|
||||
<div class="row col-md-12">
|
||||
<a class="btn btn-info btn-sm" href="@Url.Action("DataHistory","Data",new { id=Model.Id})">查看历史数据</a>
|
||||
</div>
|
||||
}
|
||||
<br />
|
||||
@Html.DisplayForModel()
|
Loading…
Reference in new issue