import { Component, OnInit } from '@angular/core';
import { FrameDetailComponent } from '../../../frame/core/detail/frame.detail';
import {DomSanitizer} from '@angular/platform-browser';
import {FormBuilder, Validators} from '@angular/forms';
import { BsModalRef } from 'ngx-bootstrap/modal';
import { MsgService } from '../../../../core/service/msg.service';
import { AjaxService } from '../../../../core/service/ajax.service';


@Component({
  selector: 'app-score-final-ym-detail',
  templateUrl: './score-final-ym-detail.component.html',
  styleUrls: ['./score-final-ym-detail.component.scss']
})
export class ScoreFinalYmDetailComponent extends FrameDetailComponent implements OnInit {

  constructor(bsModalRef: BsModalRef, fb: FormBuilder, sanitizer: DomSanitizer) {
    super(bsModalRef);

    this.detailForm = fb.group({
      'aspect_score': [null, Validators.compose([Validators.required])],
      'aspect_level': [null, Validators.compose([Validators.required])],
      'aspect_qualified': [null, Validators.compose([Validators.required])],
      'subject_name_1':[null],
      'subject_score_1':[null],
      'subject_name_2':[null],
      'subject_score_2':[null],
      'subject_name_3':[null],
      'subject_score_3':[null]
    });
  }


  initDefautEntity() {
  }

  ngOnInit() {
  }

  saveScore() {
    MsgService.confirmAlert("确定要更改考生成绩吗？",() => {
      this.submitForm('score/ym/save.htm');
    });
  }


}
