From 8570af7c6051c3d9a516f39d597ff49e1e1e2840 Mon Sep 17 00:00:00 2001
From: fengxiang <110431245@qq.com>
Date: Thu, 25 Jan 2018 09:31:37 +0800
Subject: [PATCH] 设备模块 坐标 校准值 配置 等功能
---
src/app/business/services/util/tools.service.ts | 14 +++++++++++++-
1 files changed, 13 insertions(+), 1 deletions(-)
diff --git a/src/app/business/services/util/tools.service.ts b/src/app/business/services/util/tools.service.ts
index b2eb6f8..3afa1b1 100644
--- a/src/app/business/services/util/tools.service.ts
+++ b/src/app/business/services/util/tools.service.ts
@@ -1,6 +1,18 @@
+import { FormGroup, FormArray, AbstractControl } from '@angular/forms';
import { Injectable } from '@angular/core';
@Injectable()
export class ToolsService {
-
+ public static markAsDirty(controlSet:FormGroup|FormArray){
+ const controls = controlSet.controls;
+ Object.values(controls).forEach(
+ (control:AbstractControl) => {
+ if(control instanceof FormGroup || control instanceof FormArray){
+ ToolsService.markAsDirty(control);
+ }else{
+ control.markAsDirty();
+ }
+ }
+ )
+ }
}
--
Gitblit v1.8.0