Commit e56a9331 authored by van.chen's avatar van.chen

修改传值sn type

parent 550db488
...@@ -68,7 +68,8 @@ export class GatewaySeeComponent implements OnInit { ...@@ -68,7 +68,8 @@ export class GatewaySeeComponent implements OnInit {
} }
toDetail(one) { toDetail(one) {
this.router.navigate(['/app/deviceCenter/sensorMgr/sensorDetail'], {queryParams: {deviceNo: one.deviceNo, name: one.name}}); this.router.navigate(['/app/deviceCenter/sensorMgr/sensorDetail'],
{queryParams: {deviceNo: one.deviceNo, name: one.name, sn: one.sn, type: one.type}});
} }
unbind(one) { unbind(one) {
......
...@@ -36,6 +36,8 @@ export class SensorDetailComponent implements OnInit { ...@@ -36,6 +36,8 @@ export class SensorDetailComponent implements OnInit {
isSaveOther = false; isSaveOther = false;
companyNo = ''; companyNo = '';
try = {}; try = {};
sn;
type;
constructor(private api: ApiService, private message: NzMessageService, private router: Router, private ck: CheckService, constructor(private api: ApiService, private message: NzMessageService, private router: Router, private ck: CheckService,
private ac: ActivatedRoute, private modalService: NzModalService, private translate: TranslateService) { private ac: ActivatedRoute, private modalService: NzModalService, private translate: TranslateService) {
...@@ -49,6 +51,8 @@ export class SensorDetailComponent implements OnInit { ...@@ -49,6 +51,8 @@ export class SensorDetailComponent implements OnInit {
this.ac.queryParams.subscribe((e) => { this.ac.queryParams.subscribe((e) => {
if (e.deviceNo) { if (e.deviceNo) {
this.deviceNo = e.deviceNo; this.deviceNo = e.deviceNo;
this.sn = e.sn;
this.type = e.type;
this.name = e.name; this.name = e.name;
this.companyNo = e.companyNo; this.companyNo = e.companyNo;
this.getTopicData(); this.getTopicData();
...@@ -75,7 +79,7 @@ export class SensorDetailComponent implements OnInit { ...@@ -75,7 +79,7 @@ export class SensorDetailComponent implements OnInit {
this.message.error(data && data.message ? data.message : '获取数据失败'); this.message.error(data && data.message ? data.message : '获取数据失败');
} }
this.isLoading = false; this.isLoading = false;
}; }
getProbsModels() { getProbsModels() {
this.isLoading = true; this.isLoading = true;
...@@ -127,7 +131,7 @@ export class SensorDetailComponent implements OnInit { ...@@ -127,7 +131,7 @@ export class SensorDetailComponent implements OnInit {
getCurrent() { getCurrent() {
this.isLoading = true; this.isLoading = true;
this.api.data.getRealData([{deviceNo: this.deviceNo}, (data) => { this.api.data.getRealData([{sn: this.sn, type: this.type}, (data) => {
if (data && data.constructor === Array) { if (data && data.constructor === Array) {
this.actualData = data; this.actualData = data;
} else { } else {
......
...@@ -228,7 +228,7 @@ export class SensorMgrComponent implements OnInit { ...@@ -228,7 +228,7 @@ export class SensorMgrComponent implements OnInit {
// 跳转详情 // 跳转详情
toSee(e) { toSee(e) {
this.router.navigate(['/app/deviceCenter/sensorMgr/sensorDetail'], this.router.navigate(['/app/deviceCenter/sensorMgr/sensorDetail'],
{queryParams: {deviceNo: e.deviceNo, name: e.name, companyNo: e.companyNo}}); {queryParams: {deviceNo: e.deviceNo, name: e.name, companyNo: e.companyNo, sn: e.sn, type: e.type}});
} }
// 单个的方法 // 单个的方法
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment