<div class="box box-primary">
    <div class="box-header with-border">
        <h3 class="box-title">筛选</h3>
        <div class="box-tools pull-right">
            <button type="button" class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-minus"></i>
                </button>
        </div>
    </div>
    <!-- /.box-header -->
    <!-- form start -->
    <form class="form-horizontal">
        <div class="box-body">
            <div class="form-group">
                <rt-datetime ng-model="vm.sYm" rt-type="date" rt-title="开始时间" rt-col="3" rt-label-col="2">
                </rt-datetime>
                <rt-datetime ng-model="vm.eYm" rt-type="date" rt-title="结束时间" rt-col="3" rt-label-col="2">
                </rt-datetime>
            </div>
            <div class="form-group">
                <label class="col-sm-2 control-label">任务状态<span style="color:red;">*</span></label>
                <div class="col-sm-3">
                    <ui-select allow-clear ng-model="vm.doneTypeSelected" theme="bootstrap">
                        <ui-select-match>{{$select.selected.Name}}</ui-select-match>
                        <ui-select-choices repeat="item in vm.doneTypeList | filter: $select.search">
                            <span ng-bind-html="item.Name| highlight: $select.search"></span>
                        </ui-select-choices>
                    </ui-select>
                </div>
                <rt-input rt-type="text" rt-title="任务名称" rt-col="3" rt-label-col="2" ng-model="vm.taskName"></rt-input>
            </div>
        </div>
        <!-- /.box-body -->
        <div class="box-footer">
            <div class="btn-group pull-right">
                <button type="button" class="btn btn-primary" ng-click="vm.actions.getData()">查询</button>
            </div>
        </div>
        <!-- /.box-footer -->
    </form>
</div>

<div class="nav-tabs-custom">
    <div class="tab-content">
        <rt-data-grid rt-page-record-count="vm.page.recordCount" rt-page-index="vm.page.index" rt-page-size="vm.page.size" rt-get-data="vm.actions.getData()"
            rt-sort-field="vm.view.sortField" rt-rows="vm.data" rt-selected-ids="vm.view.selectedIds" rt-auto-height="vm.view.autoHeight">
            <table class="table table-hover">
                <thead>
                    <tr>
                        <th rowspan="3" class="rt-text-align" style="white-space: nowrap;">
                            任务名称
                        </th>
                        <th rowspan="3" class="rt-datetime-align" style="white-space: nowrap;">
                            创建时间
                        </th>
                        <th rowspan="3" class="rt-datetime-align" style="white-space: nowrap;">
                            上次开始时间
                        </th>
                        <th rowspan="3" class="rt-datetime-align" style="white-space: nowrap;">
                            上次结束时间
                        </th>
                        <th rowspan="3" class="rt-number-align" style="white-space: nowrap;">
                            重试次数
                        </th>
                        <th rowspan="3" class="rt-text-align" style="white-space: nowrap;">
                            错误消息
                        </th>
                    </tr>
                </thead>
                <tbody>
                    <tr ng-repeat="row in vm.data ">
                        <td class="rt-text-align" style="white-space: nowrap;">
                            <a id="{{row.Id}}" data-toggle="sidebar" data-target=".sidebar-right" ui-sref=".edit({id:row.Id})" ui-sref-opts="{location:true}">{{row.name}}</a>
                        </td>
                        <td class="rt-datetime-align" style="white-space: nowrap;">{{row.task_CreatedOn | date:'yyyy-MM-dd HH:mm'}}</td>
                        <td class="rt-datetime-align" style="white-space: nowrap;">{{row.last_Start_Time | date:'yyyy-MM-dd HH:mm'}}</td>
                        <td class="rt-datetime-align" style="white-space: nowrap;">{{row.last_End_Time | date:'yyyy-MM-dd HH:mm'}}</td>
                        <td class="rt-number-align" style="white-space: nowrap;">{{row.retry_Count}}</td>
                        <td class="rt-text-align">{{row.errorMessage}}</td>
                    </tr>
                </tbody>
            </table>
        </rt-data-grid>
    </div>
</div>
<div class="sidebar sidebar-right sidebar-animate rt-shadow-border-left content-wrapper" ng-if="vm.view.type=='default'">
    <div ui-view class="content"></div>
</div>