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

@Component({
  selector: 'app-exam-judge-extract-log-detail',
  templateUrl: './exam-judge-extract-log-detail.component.html',
  styleUrls: ['./exam-judge-extract-log-detail.component.scss']
})
export class ExamJudgeExtractLogDetailComponent extends FrameDetailComponent implements OnInit {

  afterChooseJudge;

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

  ngOnInit() {
  }

  initDefautEntity() {
  }

  applyLog(){
    MsgService.confirmAlert('确定要将本次抽签结果覆盖现有结果吗？将覆盖现有安排' , () => {
      AjaxService.request('exam/judge/extract/log/apply.htm',this.currentEntity, ()=>{
        MsgService.successAlert('操作成功，请到相关功能检查操作结果！');
      });
    })
  }
}
