Commit 5a06163d authored by van.chen's avatar van.chen

历史搜索记录(待测试)和四大主页面完工

parent 9a540fe4
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
</div> </div>
<div class="list" [ngClass]="{'heightWithFilter': showFilter, 'heightWithoutFilter': !showFilter}"> <div class="list" [ngClass]="{'heightWithFilter': showFilter, 'heightWithoutFilter': !showFilter}">
<div class="one" *ngFor="let one of list"> <div class="one" *ngFor="let one of list" (click)="toDetail(one)">
<div class="top"> <div class="top">
<div class="left"> <div class="left">
设备名称: {{one.name}} 设备名称: {{one.name}}
......
import { Component, OnInit } from '@angular/core'; import { Component, OnInit } from '@angular/core';
import {TransferService} from '../../service/transfer.service';
@Component({ @Component({
selector: 'app-search-list', selector: 'app-search-list',
...@@ -81,7 +82,7 @@ export class SearchListComponent implements OnInit { ...@@ -81,7 +82,7 @@ export class SearchListComponent implements OnInit {
online: 1, online: 1,
error: 0 error: 0
}]; }];
constructor() { } constructor(private tf: TransferService) { }
ngOnInit() {} ngOnInit() {}
...@@ -98,4 +99,15 @@ export class SearchListComponent implements OnInit { ...@@ -98,4 +99,15 @@ export class SearchListComponent implements OnInit {
this.query = this.req; this.query = this.req;
this.showFilter = !this.showFilter; this.showFilter = !this.showFilter;
} }
toDetail(one) {
const req = {
to: 'app-page-detail',
from: 'app-search-list',
url: '/main/detail',
query: {name: one.name},
hash: ''
};
this.tf.transfer(req);
}
} }
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