| | |
| | | this.sensorsService.getPageByVersionId(this.record.deviceVersionId) |
| | | ).subscribe( |
| | | ([adjustRes,sensorsRes]) => { |
| | | if(adjustRes!=null && adjustRes.code==1 && sensorsRes != null && sensorsRes.data != null){ |
| | | if (adjustRes != null && adjustRes.code === 1 && sensorsRes != null && sensorsRes.data != null) { |
| | | this.data = { |
| | | deviceId:this.record.id, |
| | | value:{} |
| | |
| | | } |
| | | save($event) { |
| | | // $event.preventDefault(); |
| | | let isModify = Object.keys(this._dataValue).length != Object.keys(this.data.value).length; |
| | | let isModify = Object.keys(this._dataValue).length !== Object.keys(this.data.value).length; |
| | | if(!isModify){ |
| | | isModify = Object.keys(this.data.value).some( |
| | | key => { |
| | |
| | | } |
| | | ); |
| | | } |
| | | debugger; |
| | | if(isModify){ |
| | | this.adjustValueService.save(this.data).subscribe( |
| | | (res:ResultBean<any>) =>{ |
| | | if(res!=null&&res.code==1){ |
| | | if (res != null && res.code === 1) { |
| | | this.subject.destroy(); |
| | | this.msgSrv.success('校准值配置成功'); |
| | | } |