| | |
| | | import { DeviceService } from '@business/services/http/device.service'; |
| | | import { Component, OnInit } from '@angular/core'; |
| | | import { Device, MonitorPoint} from '@business/entity/data'; |
| | | import { _Validators } from '@delon/abc'; |
| | | import { PageBean, ResultBean } from '@business/entity/grid'; |
| | | import { _HttpClient } from '@delon/theme'; |
| | | import { environment } from '@env/environment'; |
| | |
| | | const validates: Device = { |
| | | name: [data.name, [Validators.required]], |
| | | mac: [data.mac, [Validators.required], [this.macAsyncValidator]], |
| | | deviceVersionId: [data.deviceVersionId], |
| | | monitorPointId: [data.monitorPointId], |
| | | deviceVersionId: [data.deviceVersionId, [Validators.required]], |
| | | monitorPointId: [data.monitorPointId, [Validators.required]], |
| | | professionId: [data.professionId], |
| | | operateUserId: [data.operateUserId], |
| | | address: [data.address], |
| | |
| | | const pageBean: PageBean = {pageIndex: 0, pageSize: 100}; |
| | | const orgId = this.configMap.orgId; |
| | | const example = new ExampleService(); |
| | | text = !!text && !!text.trim() ? text : null; |
| | | text = !!text && !!text.trim() ? '%' + text + '%' : null; |
| | | example.or() |
| | | .andEqualTo({name: 'organizationId', value: this.configMap.orgId}) |
| | | .andEqualTo({name: 'name', value: text}); |
| | | .andLike({name: 'name', value: text}); |
| | | this.monitorPointService.getPageByExample(pageBean, example).subscribe( |
| | | (res: PageBean) => { |
| | | if (res != null && res.data != null) { |