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-record-list-detail',
  templateUrl: './score-record-list-detail.component.html',
  styleUrls: ['./score-record-list-detail.component.scss']
})
export class ScoreRecordListDetailComponent extends FrameDetailComponent implements OnInit {

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

  ngOnInit(): void {
  }

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

}
