<div class="modal-header">
  <h4 class="modal-title pull-left">更改专业</h4>
</div>
<div class="modal-body">
  <div class="card card-default">
    <div class="card-body">
      <div class="form-group row">
        <label class="col-lg-2 col-form-label text-lg-right">报考专业</label>
        <div class="col-lg-{{currentEntity.variety_id?6:10}} col-md-{{currentEntity.variety_id?4:8}}">
          <input class="form-control" type="text" [readOnly]="true" [value]="currentEntity.aspect_name"/>
        </div>
        <div class="col-lg-4 col-md-4" *ngIf="currentEntity.variety_id">
          <input class="form-control" type="text" [readOnly]="true" [value]="currentEntity.variety_name"/>
        </div>
      </div>
      <div class="form-group row">
        <label class="col-lg-2 col-form-label text-lg-right">报考考点</label>
        <div class="col-lg-10 col-md-10">
          <input class="form-control" type="text" [readOnly]="true"
                 [value]="currentEntity.agent_name + '（'+currentEntity.agent_addr+'）'"/>
        </div>
      </div>
      <div class="form-group row">
        <label class="col-lg-2 col-form-label text-lg-right">考试科目</label>
        <div class="col-lg-10 col-md-10">
          <table class="table table-striped table-hover table-bordered">
            <thead>
            <tr>
              <th class="th-index"></th>
              <th>科目名称</th>
              <th>科目类型</th>
              <th>乐器/舞种</th>
            </tr>
            </thead>
            <tbody>
            <tr *ngFor="let v of ResponseMap.SubjectArray; let i = index">
              <td>{{ i +1}}</td>
              <td>{{v.subject_name}}</td>
              <td>{{v.subject_type | frameDict :'ConfSubjectType'}}</td>
              <td>{{v.variety_name}}</td>
            </tr>
            </tbody>
          </table>
        </div>
      </div>
      <div class="form-group row" *ngIf="ResponseMap.TracksArray.length>0">
        <label class="col-lg-2 col-form-label text-lg-right">填报曲目</label>
        <div class="col-lg-10 col-md-10">
          <table class="table table-striped table-hover table-bordered">
            <thead>
            <tr>
              <th class="th-index"></th>
              <th>曲目名称</th>
            </tr>
            </thead>
            <tbody>
            <tr *ngFor="let v of ResponseMap.TracksArray; let i = index">
              <td>{{ i +1}}</td>
              <td>{{v.tracks_name}}</td>
            </tr>
            </tbody>
          </table>
        </div>
      </div>

      <div class="form-group row">
        <label class="col-lg-2 col-form-label text-lg-right">新专业</label>
        <div class="col-lg-{{(ResponseMap['VarietyArray'] === undefined || ResponseMap['VarietyArray'].length ==0)?10:6}} col-md-{{(ResponseMap['VarietyArray'] === undefined || ResponseMap['VarietyArray'].length ==0)?10:6}}">
          <ngx-select [items]="ResponseMap.AspectArray" [(ngModel)]="currentEntity.new_aspect_id" (ngModelChange)="changeAspect()"
                      optionValueField="aspect_id" optionTextField="aspect_name"></ngx-select>
          <form-valid [form]="detailForm" fieldName="new_aspect_id"></form-valid>
        </div>
        <div class="col-lg-4 col-md-4" *ngIf="ResponseMap['VarietyArray'] && ResponseMap['VarietyArray'].length>0">
          <ngx-select [disabled]="ResponseMap['VarietyArray'].length === 1" [items]="ResponseMap['VarietyArray']" [(ngModel)]="currentEntity.new_variety_id" (ngModelChange)="changeVariety()"
                      optionValueField="variety_id" optionTextField="variety_name"></ngx-select>
        </div>

      </div>
      <div class="form-group row" *ngIf="ResponseMap.NewSubjectArray && ResponseMap.NewSubjectArray.length>0">
        <label class="col-lg-2 col-form-label text-lg-right">新考试科目</label>
        <div class="col-lg-10 col-md-10">
          <table class="table table-striped table-hover table-bordered">
            <thead>
            <tr>
              <th class="th-index"></th>
              <th>科目名称</th>
              <th>科目类型</th>
              <th>乐器/舞种</th>
            </tr>
            </thead>
            <tbody>
            <tr *ngFor="let v of ResponseMap.NewSubjectArray; let i = index">
              <td>{{ i +1}}</td>
              <td>{{v.subject_name}}</td>
              <td>{{v.subject_type | frameDict :'ConfSubjectType'}}</td>
              <td>{{v.variety_name}}</td>
            </tr>
            </tbody>
          </table>
        </div>
      </div>

      <div class="form-group row" *ngIf="ResponseMap.NewTracksArray && ResponseMap.NewTracksArray.length>0">
        <label class="col-lg-2 col-form-label text-lg-right">填报曲目</label>
        <div class="col-lg-10 col-md-10">
          <table class="table table-striped table-hover table-bordered">
            <thead>
            <tr>
              <th class="th-index"></th>
              <th>曲目名称</th>
            </tr>
            </thead>
            <tbody>
            <tr *ngFor="let v of ResponseMap.NewTracksArray; let i = index">
              <td>{{ i +1}}</td>
              <td><input class="form-control input-group-sm" type="text" [(ngModel)]="v.tracks_name"/></td>
            </tr>
            </tbody>
          </table>
        </div>
      </div>

      <div class="form-group row">
        <label class="col-lg-2 col-form-label text-lg-right">备注信息</label>
        <div class="col-lg-10 col-md-10">
         <textarea class="form-control" type="text"  rows="3"
                   [(ngModel)]="currentEntity.business_note"></textarea>
          <form-valid [form]="detailForm" fieldName="business_note"></form-valid>
        </div>
      </div>


    </div>

  </div>
</div>
<div class="modal-footer">
  <button class="btn btn-primary" type="button"
          (click)="saveAspect()"
          *ngIf="detailMode === 'add'">更改专业信息
  </button>
  <button class="btn btn-secondary" type="button" (click)="closeWindow()">关闭窗口</button>
</div>
