import { Component, ViewChild, OnInit } from '@angular/core';
import {DomSanitizer} from '@angular/platform-browser';
import { BsModalService } from 'ngx-bootstrap/modal';
import { AjaxService } from '../../../../../core/service/ajax.service';
import { MsgService } from '../../../../../core/service/msg.service';
import { FramePageComponent } from '../../../../frame/core/page/frame.page';
import {FrameUpload} from "../../../../../core/frame/upload/frame-upload/frame-upload";

@Component({
  selector: 'app-conf-impdata-page',
  templateUrl: './conf-impdata-page.component.html',
  styleUrls: ['./conf-impdata-page.component.scss']
})
export class ConfImpdataPageComponent extends FramePageComponent implements OnInit {

  FrameUpload = FrameUpload;
  currAgentId : number;
  agentArr : [];//考点列表

  constructor(private modalService: BsModalService, private san: DomSanitizer) {
    super(modalService, san);
  }
  ngOnInit(): void {
    AjaxService.requestArray('conf/agent/all.htm', {}, (array) => {
      this.agentArr = array;
    });
  }

  requestData() {
    this.pager.reload();
  }

  uploadCallback(ajax) {
    MsgService.successAlert('导入成功!');
  }

}
