123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109 |
- @using WeOnlineApp.Configuration
- @using WeOnlineApp.Views.Shared.Table
- @{
- Layout = "~/Views/Shared/Layout/_Layout.Play.cshtml";
- ViewBag.PageId = "history";
- ViewBag.Title = "演练历史";
- var table = new TableViewModel(IwbConsts.ApiAppUrl + "CampPlay/GetHistoryPlay", hasBox: false)
- .SetFields(new List<FieldItem>()
- {
- new FieldItem("name", "演练名称",isSort:false),
- new FieldItem("campName", "培训营名称",isSort:false),
- new FieldItem("packageName", "演练主题",isSort:false),
- new FieldItem("playModel", "演练模式","PlayModelFormatter",isSort:false),
- new FieldItem("startDate", "演练日期","DateFormatter",isSort:false),
- //new FieldItem("endDate", "开始时间","DateTimeFormatter"),
- new FieldItem("trainingMinute", "演练时长","MinuteFormatter",isSort:false),
- new FieldItem("id", "","ActionFormatter",isSort:false),
- });
- }
- <style>
- .bs-checkbox .iwb-checkbox > span {
- top: -5px;
- left: 3px;
- height: 17px;
- width: 17px;
- color: #008080;
- }
- .bootstrap-table .table thead > tr > th {
- padding: 0;
- margin: 0;
- background: #008080;
- color: #fff;
- }
- .bootstrap-table .fixed-table-container {
- border: 1px solid #008080;
- border-top: none;
- }
- .fixed-table-container tbody tr td {
- color: #008080;
- }
- .fixed-table-container tbody tr.selected td {
- background: #008080;
- color: #fff;
- }
- .fixed-table-container tbody tr.selected .iwb-checkbox > span {
- background: #fff;
- }
- .fixed-table-pagination .pagination-info {
- color: #008080;
- }
- .table-action {
- cursor: pointer;
- }
- </style>
- @Html.Partial("Table/_Table", table)
- @section scripts
- {
- <script>
- $(function() {
- LoadTable({
- height: $(window).height() - 10
- });
- })
- </script>
- <script>
- function Report(id) {
- window.open('/Play/Report/' + id, '_blank');
- }
- function ActionFormatter(v, r) {
- return '<span class="table-action" onclick="Report(\'{0}\')" target="_blank">{1}查看报告</span>'.format(r.id,icon);
- }
- function MinuteFormatter(v) {
- return v + "分钟";
- }
- function PlayModelFormatter(v) {
- var name = $('#hid-play-model option[value="' + v + '"]').text();
- switch (v) {
- case @(CampPlayModelDefinition.Team):
- return '<span class="label label-success">' + name + '</span>';
- default:
- return '<span class="label label-danger">' + name + '</span>';
- }
- }
- </script>
- }
- <section style="display: none">
- @*<select id="hid-state">
- @Html.Raw(state)
- </select>*@
- <select id="hid-play-model" class="float-label required" autocomplete="off">
- <option value="@(CampPlayModelDefinition.Team)">团队合作演练</option>
- <option value="@(CampPlayModelDefinition.Single)">单人演练</option>
- </select>
- @*@Html.DropDownList("hid-type", type)*@
- </section>
|