import { Component, OnInit} from "@angular/core";
import { BsModalService } from "ngx-bootstrap/modal";
import { FlexModalComponent } from "../../../../../shared/common/FlexModal.component";
import { AppComponent } from "../../../../../";


@Component({
  selector: "std-reg-info-modal",
  templateUrl: "./flex-std-reg-info.html",
  styleUrls: ["./flex-std-reg-info.scss"]
})
export class StdRegInfoModal extends FlexModalComponent implements OnInit {
  public query = {
    "std_name": "",
    "cert_no": "",
    "ticket_no": "",
    "belong_city_id": "",
    "real_data":"1"
  };

  QUERY_URL = "std/stdRegInfo/page.htm?loadtrue=1";
  
  constructor(
    public bsModalService: BsModalService,
  ) {
    super(bsModalService);
  }
  ngOnInit() {
    this.query.std_name="";
    this.query.cert_no="";
    this.query.ticket_no="";
    this.query.belong_city_id="";
  }

  queryStd(){
    if (!this.query.std_name && !this.query.cert_no && !this.query.ticket_no) {
      AppComponent.alert({ 'title': '提示', text: '请输入查询条件!' });
      return false;
    }
    this.framePager.reload();
  }
}
