| | |
| | | { title: '型号', index: 'deviceVersion.name' }, |
| | | { title: '监控点', index: 'monitorPoint.name' }, |
| | | { title: '维护人', index: 'operateUser.name' }, |
| | | { title: '生产时间',width: '100px', type: 'date', index: 'createTime' }, |
| | | { title: '安装时间', width: '100px',type: 'date', index: 'installTime' }, |
| | | { title: '生产时间', width: '100px', type: 'date', index: 'createTime' }, |
| | | { title: '安装时间', width: '100px', type: 'date', index: 'installTime' }, |
| | | { |
| | | title: '操作区', |
| | | buttons: [ |
| | |
| | | { |
| | | text: `配置校准值`, |
| | | type: 'static', |
| | | component:AdjustConfigComponent, |
| | | component: AdjustConfigComponent, |
| | | format: (record: any) => `<i class="anticon anticon-setting"></i>配置校准值` |
| | | }, |
| | | { |
| | |
| | | ]; |
| | | queryTextStream: Subject<string> = new Subject<string>(); |
| | | constructor( |
| | | private monitorPointService:MonitorPointService, |
| | | private monitorPointService: MonitorPointService, |
| | | private deviceService: DeviceService, |
| | | private confirmServ: NzModalService, |
| | | public msgSrv: NzMessageService, |
| | | private modalHelper: ModalHelper, |
| | | private coorPickerService:CoorPickerService |
| | | private coorPickerService: CoorPickerService |
| | | ) { } |
| | | |
| | | ngOnInit() { |
| | |
| | | }); |
| | | } |
| | | get listUrl() { |
| | | return this.deviceService.getListUrl();; |
| | | return this.deviceService.getListUrl(); |
| | | } |
| | | extraParams = { queryParams: null }; |
| | | queryText: string; |
| | |
| | | ); |
| | | }); |
| | | } |
| | | configCoord(record:Device):void { |
| | | Object.assign(this.coorPickerService.data,record); |
| | | let _data = this.coorPickerService.data; |
| | | configCoord(record: Device): void { |
| | | Object.assign(this.coorPickerService.data, record); |
| | | const _data = this.coorPickerService.data; |
| | | this.monitorPointService.getEntity(record.monitorPointId).subscribe( |
| | | res => { |
| | | if(res!=null && res.code==1 && res.data!=null){ |
| | | if (res != null && res.code === 1 && res.data != null) { |
| | | const areaNames = res.data.areaNames; |
| | | let adress = null; |
| | | if(areaNames != null){ |
| | | adress = areaNames.provinceName+areaNames.cityName+areaNames.areaName+res.data.address; |
| | | if (areaNames != null) { |
| | | adress = areaNames.provinceName + areaNames.cityName + areaNames.areaName + res.data.address; |
| | | } |
| | | this.coorPickerService.data.address = adress; |
| | | this.coorPickerService.data['describe'] = '设备名称'; |
| | | } |
| | | this.modalHelper.static(CoordinatesPickerComponent).subscribe( |
| | | (staticComp) => { |
| | | const data:Device = { |
| | | id:record.id, |
| | | longitude:_data.longitude, |
| | | latitude:_data.latitude, |
| | | } |
| | | const data: Device = { |
| | | id: record.id, |
| | | longitude: _data.longitude, |
| | | latitude: _data.latitude, |
| | | }; |
| | | this.deviceService.save(data).subscribe( |
| | | (res: any) => { |
| | | if (res.code === 1) { |
| | | (resp: any) => { |
| | | if (resp.code === 1) { |
| | | this.load(); |
| | | this.msgSrv.success('坐标配置成功!'); |
| | | } |
| | |
| | | } |
| | | ); |
| | | } |
| | | ) |
| | | ); |
| | | } |
| | | } |