Commit 3ead38aa authored by wangqinghua's avatar wangqinghua

运维团队

parent 619abf4b
......@@ -20,7 +20,7 @@
<div nz-row [nzGutter]="4" class="search-form">
<div nz-col nzSpan="14">
类型:
<nz-radio-group [(ngModel)]="obj.status">
<nz-radio-group [(ngModel)]="obj.type">
<label *ngFor="let item of companyType" (click)="search()" nz-radio-button
[nzValue]="item.key">{{item.value}}</label>
</nz-radio-group>
......@@ -31,7 +31,7 @@
</button>
</div>
<div nz-col nzSpan="5">
<input type="text" (keyup.enter)="search()" nz-input [(ngModel)]="obj.keyword" placeholder="公司名称">
<input type="text" (keyup.enter)="search()" nz-input [(ngModel)]="obj.name" placeholder="公司名称">
</div>
<div nz-col nzSpan="2">
<button (click)="search()"
......
......@@ -15,8 +15,6 @@ import {DatePipe} from '@angular/common';
})
export class OprCompanyComponent implements OnInit {
timeFormat = 'yyyy';
companyType = opr_company_type;
page = {
......
<p>
opr-team works!
</p>
<div nz-row class="breadcrumbs">
<div nz-col nzSpan="16">
<nz-breadcrumb class="padding-8-0">
<nz-breadcrumb-item>
首页
</nz-breadcrumb-item>
<nz-breadcrumb-item>
<a>项目管理</a>
</nz-breadcrumb-item>
<nz-breadcrumb-item>
运维团队
</nz-breadcrumb-item>
</nz-breadcrumb>
</div>
<div nz-col nzSpan="8" class="text-right">
<button (click)="ngOnInit()" nz-button nzType="primary"><i class="anticon anticon-sync"></i></button>
<smart-full-screen></smart-full-screen>
</div>
</div>
<div nz-row [nzGutter]="4" class="search-form">
<div nz-col nzSpan="14">
类型:
<nz-radio-group [(ngModel)]="obj.type">
<label *ngFor="let item of teamType" (click)="search()" nz-radio-button
[nzValue]="item.key">{{item.value}}</label>
</nz-radio-group>
</div>
<div nz-col nzSpan="3">
<button (click)="search()"
nz-button nzType="default"><i class="anticon anticon-search" style="color: #6097b7"></i>新增运维团队
</button>
</div>
<div nz-col nzSpan="5">
<input type="text" (keyup.enter)="search()" nz-input [(ngModel)]="obj.name" placeholder="团队名称">
</div>
<div nz-col nzSpan="2">
<button (click)="search()"
nz-button nzType="default"><i class="anticon anticon-search" style="color: #6097b7"></i>搜索
</button>
</div>
</div>
<nz-table #nzTable [nzData]="page.list" [nzLoading]="page.isLoading" [nzFrontPagination]="false"
[nzTotal]="page.totalNum"
[nzPageIndex]="page.pageNum" [nzPageSize]="page.pageCount" (nzPageIndexChange)="change($event)">
<thead>
<tr>
<th>团队名称</th>
<th>团队类型</th>
<th>所在公司</th>
<th>关联项目</th>
<th>团队负责人</th>
<th>操作</th>
</tr>
</thead>
<tbody>
<tr *ngFor="let data of nzTable.data">
<td>{{data.name}}</td>
<td>
<span *ngIf="data.type == 0">驻场团队</span>
<span *ngIf="data.type == 1">非驻场团队</span>
</td>
<td>{{data.companyName}}</td>
<td>{{data.projectName}}</td>
<td>{{data.principal}}</td>
<td class="handle text-center main-color">
<span>编辑</span>
</td>
</tr>
</tbody>
</nz-table>
import { Component, OnInit } from '@angular/core';
import {Component, OnInit} from '@angular/core';
import {opr_company_type, opr_team_type} from '../project.constants';
import {pageSize} from '../../app.constants';
import {WorkService} from '../../work/work.service';
import {NzMessageService} from 'ng-zorro-antd';
import {ProjectService} from '../project.service';
import {Router} from '@angular/router';
import {CommonService} from '../../shared/common/common.service';
import {DatePipe} from '@angular/common';
@Component({
selector: 'app-opr-team',
......@@ -6,10 +14,59 @@ import { Component, OnInit } from '@angular/core';
styleUrls: ['./opr-team.component.css']
})
export class OprTeamComponent implements OnInit {
teamType = opr_team_type;
constructor() { }
page = {
list: [],
isLoading: false,
pageCount: pageSize,
pageNum: 1,
totalNum: null
};
obj = {
name: '',
type: null
};
constructor(private workSer: WorkService, private message: NzMessageService, private projectSer: ProjectService,
private router: Router, private commonSer: CommonService, private datePipe: DatePipe) {
}
ngOnInit() {
this.getList();
}
//获取列表
getList() {
this.page.isLoading = true;
const obj = {
obj: this.obj,
pageNum: this.page.pageNum,
pageCount: this.page.pageCount
};
this.projectSer.selectMaintainTeam(obj).subscribe(
(res) => {
if (res.errCode == 10000) {
this.page.list = res.data.data;
this.page.totalNum = res.data.totalNum;
this.page.isLoading = false;
}
}
);
}
//翻页
change(e) {
this.page.pageNum = e;
this.getList();
}
//搜索
search() {
this.page.pageNum = 1;
this.getList();
}
}
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