import { Component, OnInit } from '@angular/core';
import { FormBuilder, Validators } from '@angular/forms';
import { BsModalRef } from 'ngx-bootstrap/modal';
import { FrameDetailComponent } from '../../../../frame/core/detail/frame.detail';

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

  constructor(bsModalRef: BsModalRef, fb: FormBuilder) { 
    super(bsModalRef);
    this.detailForm = fb.group({
      'judge_score': [null, Validators.compose([Validators.required])]
    });
  }

  ngOnInit(): void {
  }


  //修改分数
  editScore() {
    this.MsgService.confirmAlert('确定要修改评委已经提交后的分数吗？分数属于敏感信息，请慎重修改！', () => {
      this.AjaxService.request('ex/judge/score/edit.htm', this.currentEntity, () => {
        this.MsgService.successToastr('修改成功！');
        this.closeWindow();
      });
    });
  }

}
