1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
import {Component, Inject, Injectable, OnInit} from '@angular/core';
import {MAT_DIALOG_DATA, MatDialog, MatDialogRef} from '@angular/material';
import {LogService} from '../../app.service';
import {FormControl, Validators} from '@angular/forms';
// import * as layer from 'layui-layer/src/layer.js';
@Injectable()
export class DialogService {
constructor(public _dialog: MatDialog) {
}
open(options: any) {
// layer.open(options);
}
dialog() {
}
confirm() {
}
tip() {
}
loading() {
}
alert(msg: string) {
this._dialog.open(ElementDialogAlertComponent, {
height: '200px',
width: '300px',
data: {msg: msg}
});
}
close(index: any) {
// layer.close(index);
}
}
@Component({
selector: 'app-alert',
templateUrl: 'alert.html',
styleUrls: ['./alert.scss']
})
export class ElementDialogAlertComponent {
constructor(public dialogRef: MatDialogRef<ElementDialogAlertComponent>,
@Inject(MAT_DIALOG_DATA) public data: any,
private _logger: LogService) {
}
onNoClick(): void {
this.dialogRef.close();
}
}