Commit fdd27234 authored by wangqinghua's avatar wangqinghua

update

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