<div class="content-heading  justify-content-between">
  <div>预编排-时段定义<span *ngIf="group && group.time_group"> - {{group.time_group}}</span></div>
  <div class="float-right">
    <div class="row">
      <div *ngIf="group && groupArray && groupArray.length > 1">
        <select class="form-control mt-1" [(ngModel)]="group.time_group" (change)="requestData()">
          <option [value]="g.time_group" *ngFor="let g of groupArray">{{g.time_group}}</option>
        </select>
      </div>
      <div class="btn-group mb-1 mr-1 ml-3" dropdown>
        <button class="btn dropdown-toggle btn-secondary btn-lg" type="button" dropdownToggle>分组管理
          <span class="caret"></span>
        </button>
        <div *dropdownMenu class="dropdown-menu modal-lg" role="menu">
          <a class="dropdown-item" href="#" (click)="showModal()">新建分组</a>
          <div class="dropdown-divider"></div>
          <a class="dropdown-item" href="#" *ngIf="group.time_group"
             (click)="showModal({ResponseEntity:group, arrayUrl:'layout/plan/time/list.htm', arrayParam:group})">编辑分组</a>
          <div class="dropdown-divider" *ngIf="group.time_group"></div>
          <a class="dropdown-item" href="#" *ngIf="group.time_group" (click)="deleteGroup()">删除分组</a>

        </div>
      </div>
    </div>
  </div>
</div>
<div class="table-responsive bg-white table-full">
  <table class="table table-striped table-hover table-bordered">
    <thead>
    <tr>
      <th class="th-index"></th>
      <th>时段名称</th>
      <th>考试时段</th>
      <th>时长（单位分）</th>
      <th>类型</th>
    </tr>
    </thead>
    <tbody>
    <tr *ngFor="let v of timeGroupArray; let i = index">
      <td>{{i+1}}</td>
      <td>{{v.time_name}}</td>
      <td>{{v.exam_start_time}} - {{v.exam_end_time}}</td>
      <td>{{v.exam_minutes}}</td>
      <td>{{v.time_type | frameDict:'ExamTimeType'}}</td>
    </tr>
    <tr *ngIf="timeGroupArray.length > 0">
      <td></td>
      <td>合计</td>
      <td>{{timeGroupArray[0].exam_start_time}} - {{timeGroupArray[timeGroupArray.length-1].exam_end_time}}</td>
      <td>{{timeGroupArray | frameSum : 'exam_minutes'}}</td>
      <td></td>
    </tr>
    </tbody>
  </table>
</div>

