From efe936a73370a55d4c3336fb9973a92fcf87efff Mon Sep 17 00:00:00 2001 From: fengxiang <110431245@qq.com> Date: Thu, 08 Mar 2018 09:22:09 +0800 Subject: [PATCH] ts语法修正,报表部分功能实现 --- src/app/routes/devices/basic-info/basic-info.component.ts | 40 ++++++++++++++++++++-------------------- 1 files changed, 20 insertions(+), 20 deletions(-) diff --git a/src/app/routes/devices/basic-info/basic-info.component.ts b/src/app/routes/devices/basic-info/basic-info.component.ts index b468826..5d9b915 100644 --- a/src/app/routes/devices/basic-info/basic-info.component.ts +++ b/src/app/routes/devices/basic-info/basic-info.component.ts @@ -25,8 +25,8 @@ { 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: [ @@ -46,7 +46,7 @@ { text: `���������������`, type: 'static', - component:AdjustConfigComponent, + component: AdjustConfigComponent, format: (record: any) => `<i class="anticon anticon-setting"></i>���������������` }, { @@ -62,12 +62,12 @@ ]; 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() { @@ -80,7 +80,7 @@ }); } get listUrl() { - return this.deviceService.getListUrl();; + return this.deviceService.getListUrl(); } extraParams = { queryParams: null }; queryText: string; @@ -157,30 +157,30 @@ ); }); } - 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('���������������������'); } @@ -190,6 +190,6 @@ } ); } - ) + ); } } -- Gitblit v1.8.0