Skip to content
find-user.component.ts 947 B
Newer Older
wangqinghua's avatar
wangqinghua committed
import {Component, EventEmitter, OnInit, Output} from '@angular/core';
import {AlarmService} from '../../alarm.service';

@Component({
    selector: 'smart-find-user',
    templateUrl: './find-user.component.html',
    styles: []
})
export class FindUserComponent implements OnInit {
    @Output() set = new EventEmitter<any>();

    isVisible = false;
    objList;

    constructor(private alarmSer: AlarmService) {
    }

    ngOnInit() {
        this.getZabbixObj();
    }

    //获取发送对象 zabbix
    getZabbixObj() {
        this.alarmSer.zUserFind({}).subscribe(
            (res) => {
                if (res.errCode == 10000) {
                    this.objList = res.data;
                }
            }
        );
    }

    showModal() {
        this.isVisible = true;
    }

    setUser(item) {
        this.isVisible = false;
        this.set.emit(item);
    }

wangqinghua's avatar
wangqinghua committed
    handleKeyCancel(){
        this.isVisible = false;
    }

wangqinghua's avatar
wangqinghua committed
}