import { Component, OnInit } from '@angular/core';
import { BsModalService } from 'ngx-bootstrap/modal';
import { AjaxService } from '../../../../core/service/ajax.service';
import { FramePageComponent } from '../../../frame/core/page/frame.page';
import { MsgService } from 'src/app/core/service/msg.service';

@Component({
  selector: 'app-score-dev-sql',
  templateUrl: './score-dev-sql.component.html',
  styleUrls: ['./score-dev-sql.component.scss']
})
export class ScoreDevSqlComponent extends FramePageComponent implements OnInit {

  sql: any;
  flag : any;

  constructor(modalService: BsModalService) {
    super(modalService);
   }

  ngOnInit(): void {
  }


  saveSql() {
    AjaxService.requestMap('exam/judge/score/sql.htm', {sql : this.sql, flag: this.flag}, (map) => {
      MsgService.successToastr('执行成功！');
      console.log(map);
    });
  }

  cleanSql() {
    this.sql = " ";
  }
}
