|
@@ -7,6 +7,7 @@ import { MyServiceService } from "../../services/my-service.service";
|
7
|
7
|
import { ToolService } from "../../services/tool.service";
|
8
|
8
|
import { Subject } from "rxjs";
|
9
|
9
|
import { debounceTime } from "rxjs/operators";
|
|
10
|
+import { differenceInCalendarDays } from "date-fns";
|
10
|
11
|
|
11
|
12
|
@Component({
|
12
|
13
|
selector: "app-inspect-active",
|
|
@@ -59,6 +60,10 @@ export class InspectActiveComponent implements OnInit {
|
59
|
60
|
ifSuccess: boolean; //操作成功/失败
|
60
|
61
|
promptInfo: string; //操作结果提示信息
|
61
|
62
|
promptModalShow: boolean; //操作提示框是否展示
|
|
63
|
+ // 只能选择今天之前的日期
|
|
64
|
+ disabledDate = (current: Date): boolean => {
|
|
65
|
+ return differenceInCalendarDays(current, new Date()) > -1;
|
|
66
|
+ };
|
62
|
67
|
|
63
|
68
|
// 初始化增删改按钮
|
64
|
69
|
coopBtns: any = {};
|