Newer
Older
import {Component, OnInit} from '@angular/core';
import {OverAllService} from '../../overAll/overAll.service';
import { DatePipe } from '@angular/common';
@Component({
selector: 'smart-pause',
templateUrl: './pause.component.html',
styles: []
})
export class PauseComponent implements OnInit {
modalTitle = '临时暂停(服务器时间)';
isShow = false;
data = {
startTime: null,
time: ''
};
hostId; //主机id
constructor(public overAllSer: OverAllService,public datePipe:DatePipe,
public message:NzMessageService) {
}
ngOnInit() {
}
showModal(id) {
this.hostId = id;
this.isShow = true;
}
handleCancel() {
this.isShow = false;
}
handleOk() {
const data = {
startTime: this.datePipe.transform(this.data.startTime,'yyyy-MM-dd HH:MM:ss'),
time: Number(this.data.time)
};
if(res.errCode == 10000){
this.isShow = false;
}
this.message.info(res.errMsg);