| | |
| | | styles: [] |
| | | }) |
| | | export class DeviceEditComponent implements OnInit { |
| | | private monitorPoints:any [] = []; |
| | | private deviceVersions:any [] = []; |
| | | private operateUsers:any [] = []; |
| | | private isSaving = false; |
| | | public monitorPoints:any [] = []; |
| | | public deviceVersions:any [] = []; |
| | | public operateUsers:any [] = []; |
| | | public isSaving = false; |
| | | constructor( |
| | | private subject: NzModalSubject, |
| | | private formBuilder: FormBuilder, |
| | |
| | | } |
| | | const validates:Device = { |
| | | name:[data.name,[Validators.required]], |
| | | mac:[data.mac], |
| | | mac:[data.mac,[Validators.required]], |
| | | deviceVersionId:[data.deviceVersionId], |
| | | monitorPointId:[data.monitorPointId], |
| | | operateUserId:[data.operateUserId], |
| | |
| | | const pageBean: PageBean = {pageIndex: 0, pageSize: 20}; |
| | | this.monitorPointService.getPagingList(pageBean, text).subscribe( |
| | | (res: PageBean) => { |
| | | if (res != null && res.data != null) { |
| | | if (res != null && res.data != null) { |
| | | this.monitorPoints = res.data; |
| | | } |
| | | const monitorPoint = this.data.monitorPoint; |
| | |
| | | ); |
| | | if ( hasSelectedValue ) { |
| | | this.monitorPoints.push(monitorPoint); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | ); |
| | |
| | | const pageBean: PageBean = {pageIndex: 0, pageSize: 20}; |
| | | this.versionService.getPagingList(pageBean, text).subscribe( |
| | | (res: PageBean) => { |
| | | if (res != null && res.data != null) { |
| | | if (res != null && res.data != null) { |
| | | this.deviceVersions = res.data; |
| | | } |
| | | const deviceVersion = this.data.deviceVersion; |
| | |
| | | ); |
| | | if ( hasSelectedValue ) { |
| | | this.monitorPoints.push(deviceVersion); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | ); |
| | |
| | | const pageBean: PageBean = {pageIndex: 0, pageSize: 20}; |
| | | this.operateUserService.getPagingList(pageBean, text).subscribe( |
| | | (res: PageBean) => { |
| | | if (res != null && res.data != null) { |
| | | if (res != null && res.data != null) { |
| | | this.operateUsers = res.data; |
| | | } |
| | | const operateUser = this.data.operateUser; |
| | |
| | | ); |
| | | if ( hasSelectedValue ) { |
| | | this.monitorPoints.push(operateUser); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | ); |