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

修改传值sn type

parent 550db488
......@@ -68,7 +68,8 @@ export class GatewaySeeComponent implements OnInit {
}
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) {
......
......@@ -36,6 +36,8 @@ export class SensorDetailComponent implements OnInit {
isSaveOther = false;
companyNo = '';
try = {};
sn;
type;
constructor(private api: ApiService, private message: NzMessageService, private router: Router, private ck: CheckService,
private ac: ActivatedRoute, private modalService: NzModalService, private translate: TranslateService) {
......@@ -49,6 +51,8 @@ export class SensorDetailComponent implements OnInit {
this.ac.queryParams.subscribe((e) => {
if (e.deviceNo) {
this.deviceNo = e.deviceNo;
this.sn = e.sn;
this.type = e.type;
this.name = e.name;
this.companyNo = e.companyNo;
this.getTopicData();
......@@ -75,7 +79,7 @@ export class SensorDetailComponent implements OnInit {
this.message.error(data && data.message ? data.message : '获取数据失败');
}
this.isLoading = false;
};
}
getProbsModels() {
this.isLoading = true;
......@@ -127,7 +131,7 @@ export class SensorDetailComponent implements OnInit {
getCurrent() {
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) {
this.actualData = data;
} else {
......
......@@ -228,7 +228,7 @@ export class SensorMgrComponent implements OnInit {
// 跳转详情
toSee(e) {
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