Skip to content
warning-rule-look.component.ts 1012 B
Newer Older
wangqinghua's avatar
wangqinghua committed
import {Component, OnInit} from '@angular/core';

import {EarlyWarningService} from '../../earlyWarning.service';
import {WorkService} from '../../../work/work.service';
import {CommonService} from '../../../shared/common/common.service';

@Component({
    selector: 'smart-warning-rule-look',
    templateUrl: './warning-rule-look.component.html',
    styles: []
})
export class WarningRuleLookComponent implements OnInit {

    isVisible = false;
    title;
    msgObj;

    constructor(private workSer: WorkService, private commonSer: CommonService,
                private earlySer: EarlyWarningService) {
    }

    ngOnInit() {
    }

    showLookModal(item) {
        this.title = item.name;
        this.isVisible = true;
        this.earlySer.findWarningRule(item.id).subscribe(
            (res) => {
                if (res.errCode == 10000) {
                    this.msgObj = res.data;
                }
            }
        );
    }

    handleCancel() {
        this.isVisible = false;
    }


}