fengxiang
2018-07-06 8ac3a87733b421c1f1cb3b691f946c05bdae02df
src/app/routes/devices/basic-info/device-edit/device-edit.component.ts
@@ -7,7 +7,6 @@
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';
@@ -67,8 +66,8 @@
    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],
@@ -137,10 +136,10 @@
    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) {