Commit fdd27234 authored by wangqinghua's avatar wangqinghua

update

parent 39663e5e
...@@ -20,9 +20,10 @@ ...@@ -20,9 +20,10 @@
</div> </div>
<div nz-row [nzGutter]="4" class="search-form"> <div nz-row [nzGutter]="4" class="search-form">
<div nz-col nzSpan="3"> <div nz-col nzSpan="3">
<nz-select style="width: 100%;" [(ngModel)]="obj.type" nzPlaceHolder="选择分类"> <nz-select style="width: 100%;" [(ngModel)]="obj.type" nzPlaceHolder="选择分类" (ngModelChange)="changeType($event)">
<nz-option nzLabel="告警" nzValue="告警"></nz-option> <ng-container *ngFor="let item of parentList">
<nz-option nzLabel="严重" nzValue="严重"></nz-option> <nz-option [nzLabel]="item.name" [nzValue]="item.id"></nz-option>
</ng-container>
</nz-select> </nz-select>
</div> </div>
<div nz-col nzSpan="3"> <div nz-col nzSpan="3">
...@@ -38,7 +39,7 @@ ...@@ -38,7 +39,7 @@
</div> </div>
</div> </div>
<nz-table #nzTable [nzData]="eventList" [nzFrontPagination]="false" [nzTotal]="totalNum" [nzPageIndex]="pageNum" [nzPageSize]="pageCount" (nzPageIndexChange)="change($event)"> <nz-table #nzTable [nzData]="childrenList">
<thead> <thead>
<tr> <tr>
<th>子分类</th> <th>子分类</th>
...@@ -53,25 +54,25 @@ ...@@ -53,25 +54,25 @@
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
<tr *ngFor="let data of eventList"> <tr *ngFor="let data of childrenList">
<td class="round-tag tag-form"> <td class="round-tag tag-form">
{{data.description}} {{data.name}}
</td> </td>
<td> <td>
{{data.title}} {{data.inventorycount}}
</td> </td>
<td>{{data.createTime | date:"yyyy-MM-dd HH:mm:ss"}}</td> <td>{{data.stock}}</td>
<td> <td>
事件来源 {{data.usedcount}}
</td> </td>
<td>时间分类</td> <td>{{data.lendcount}}</td>
<td> <td>
{{data.operators[0].username}} {{data.repaircount}}
</td> </td>
<td> <td>
<span *ngIf="data.status == 0">待处理</span> {{data.scrapcount}}
<span *ngIf="data.status == 1">已结束</span>
</td> </td>
<td>关联事件</td>
<td class="handle text-center"> <td class="handle text-center">
<span (click)="showEditModal(data)">编辑</span> <span (click)="showEditModal(data)">编辑</span>
<span (click)="deleteSend(data)">删除</span> <span (click)="deleteSend(data)">删除</span>
......
...@@ -10,7 +10,8 @@ import {pageSize} from '../../app.constants'; ...@@ -10,7 +10,8 @@ import {pageSize} from '../../app.constants';
export class AssetPartComponent implements OnInit { export class AssetPartComponent implements OnInit {
timeFormat = 'yyyy-MM-dd'; timeFormat = 'yyyy-MM-dd';
partList; parentList;
childrenList;
timeBegin; timeBegin;
timeEnd; timeEnd;
pageCount = pageSize; pageCount = pageSize;
...@@ -34,21 +35,10 @@ export class AssetPartComponent implements OnInit { ...@@ -34,21 +35,10 @@ export class AssetPartComponent implements OnInit {
} }
getList(){ getList(){
const obj = { this.workSer.findByParentType().subscribe(
pageCount:this.pageCount,
pageNum:this.pageNum,
searchStr:this.obj.searchStr,
type:this.obj.type,
status:this.obj.status,
source:this.obj.source,
startTime:this.obj.startTime,
endTime:this.obj.endTime,
};
this.workSer.find(obj).subscribe(
(res)=>{ (res)=>{
if(res.errCode == 10000){ if(res.errCode == 10000){
this.partList = res.data.data; this.parentList = res.data;
this.totalNum = res.data.totalNum;
}else{ }else{
} }
...@@ -56,6 +46,14 @@ export class AssetPartComponent implements OnInit { ...@@ -56,6 +46,14 @@ export class AssetPartComponent implements OnInit {
) )
} }
changeType(e){
this.workSer.findByParentidCount(e).subscribe(
(res)=>{
this.childrenList = res.data;
}
)
}
change(e){ change(e){
this.pageNum = e; this.pageNum = e;
this.getList(); this.getList();
......
...@@ -42,7 +42,7 @@ ...@@ -42,7 +42,7 @@
</div> </div>
</div> </div>
<nz-table #nzTable [nzData]="eventList" [nzFrontPagination]="false" [nzTotal]="totalNum" [nzPageIndex]="pageNum" [nzPageSize]="pageCount" (nzPageIndexChange)="change($event)"> <nz-table #nzTable [nzData]="planList" [nzFrontPagination]="false" [nzTotal]="totalNum" [nzPageIndex]="pageNum" [nzPageSize]="pageCount" (nzPageIndexChange)="change($event)">
<thead> <thead>
<tr> <tr>
<th>计划名称</th> <th>计划名称</th>
......
...@@ -22,8 +22,8 @@ export class InspectPlanComponent implements OnInit { ...@@ -22,8 +22,8 @@ export class InspectPlanComponent implements OnInit {
pageNum:'', pageNum:'',
pageCount:'', pageCount:'',
searchStr:"", searchStr:"",
typeId:"", typeId:null,
status:"", status:null,
}; };
constructor(private workSer:WorkService,private message:NzMessageService) { } constructor(private workSer:WorkService,private message:NzMessageService) { }
......
...@@ -80,8 +80,8 @@ export class WorkService { ...@@ -80,8 +80,8 @@ export class WorkService {
} }
//查询所有父级资产类型 //查询所有父级资产类型
findByParentType(params): Observable<any>{ findByParentType(): Observable<any>{
return this.http.get(SERVER_API_URL + '/inventory/findByParentType' +params); return this.http.get(SERVER_API_URL + '/inventory/findByParentType' );
} }
//根据父级类型查询子级 //根据父级类型查询子级
......
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