Commit b7058d04 authored by xch666's avatar xch666

Merge remote-tracking branch 'origin/master'

parents 85d9ce60 c3eee9c4
......@@ -547,7 +547,7 @@ export class BasicComponent implements OnInit {
} else {
type = 'server';
}
this.router.navigate([type], {
this.router.navigate([`app/main/${type}`], {
queryParams: {
hostId: item.hostid,
equipmentType: item.equipmentType
......
<nz-modal [nzMaskClosable]="false" [nzWidth]="620" [(nzVisible)]="modal.isVisible"
<nz-modal [nzMaskClosable]="false" [nzWidth]="620" [(nzVisible)]="modal.isVisible" [nzOkLoading]="modal.isOkLoading"
[nzTitle]="modal.title"
(nzOnCancel)="handleCancel()"
(nzOnOk)="handleOk()">
......
......@@ -7,13 +7,18 @@ import {fakeAsync} from '@angular/core/testing';
@Component({
selector: 'smart-module-config',
templateUrl: './module-config.component.html',
styles: []
styles: [
`
`
]
})
export class ModuleConfigComponent implements OnInit {
@Output() done = new EventEmitter();
modal = {
isVisible: false,
isOkLoading: false,
title: '',
list: []
};
......@@ -34,6 +39,7 @@ export class ModuleConfigComponent implements OnInit {
handleCancel() {
this.modal.isVisible = false;
this.modal.isOkLoading = false;
}
handleOk() {
......@@ -42,6 +48,7 @@ export class ModuleConfigComponent implements OnInit {
e.status = e.status == false ? 0 : 1;
e.orders = index;
});
this.modal.isOkLoading = true;
this.overviewSer.updateWorkModule(this.modal.list).subscribe(
(res) => {
if (res.errCode == 10000) {
......@@ -49,6 +56,7 @@ export class ModuleConfigComponent implements OnInit {
this.modal.isVisible = false;
this.done.emit();
}
this.modal.isOkLoading = false;
}
);
// this.modal.isVisible = false;
......
......@@ -25,9 +25,13 @@
</div>
</div>
<nz-row [nzGutter]="4">
<div nz-col nzSpan="12">
<div nz-col nzSpan="12" *ngIf="page.lookModule.includes('运维事件')">
<p class="title">运维事件
<span (click)="goMore('workHandle')">更多</span>
</p>
<!-- 运维事件-->
<nz-table #nzTable1 [nzData]="table.eventList" [nzPageSize]="5" [nzLoading]="loading.eventLoading" [nzFrontPagination]="true">
<nz-table #nzTable1 [nzData]="table.eventList" [nzPageSize]="5" [nzLoading]="loading.eventLoading"
[nzFrontPagination]="true">
<thead>
<tr>
<th>事件编号</th>
......@@ -58,9 +62,11 @@
</tbody>
</nz-table>
</div>
<div nz-col nzSpan="12">
<div nz-col nzSpan="12" *ngIf="page.lookModule.includes('巡检计划')">
<p class="title">巡检计划 <span (click)="goMore('inspectPlan')">更多</span></p>
<!-- 巡检计划-->
<nz-table #nzTable2 [nzData]="table.planList" [nzLoading]="loading.planLoading" [nzPageSize]="5" [nzFrontPagination]="true">
<nz-table #nzTable2 [nzData]="table.planList" [nzLoading]="loading.planLoading" [nzPageSize]="5"
[nzFrontPagination]="true">
<thead>
<tr>
<th nzWidth="30%">计划名称</th>
......@@ -96,9 +102,8 @@
</tbody>
</nz-table>
</div>
</nz-row>
<nz-row [nzGutter]="4">
<div nz-col nzSpan="12">
<div nz-col nzSpan="12" *ngIf="page.lookModule.includes('资产管理')">
<p class="title">资产管理 <span (click)="goMore('assetPart')">更多</span></p>
<!-- 资产管理-->
<nz-table #nzTable3 [nzData]="table.childrenList" [nzFrontPagination]="true" [nzPageSize]="5"
[nzLoading]="loading.childrenLoading">
......@@ -128,9 +133,11 @@
</tbody>
</nz-table>
</div>
<div nz-col nzSpan="12">
<div nz-col nzSpan="12" *ngIf="page.lookModule.includes('备件管理')">
<p class="title">备件管理 <span (click)="goMore('SparePartsManagement')">更多</span></p>
<!-- 备件管理-->
<nz-table #nzTable4 [nzPageSize]="5" [nzData]="table.spareList" [nzFrontPagination]="true" [nzLoading]="loading.spareLoading">
<nz-table #nzTable4 [nzPageSize]="5" [nzData]="table.spareList" [nzFrontPagination]="true"
[nzLoading]="loading.spareLoading">
<thead>
<tr>
<th>编号</th>
......@@ -151,11 +158,11 @@
</tbody>
</nz-table>
</div>
</nz-row>
<nz-row [nzGutter]="4">
<div nz-col nzSpan="12">
<div nz-col nzSpan="12" *ngIf="page.lookModule.includes('系统变更')">
<p class="title">系统变更 <span (click)="goMore('changeManage')">更多</span></p>
<!-- 系统变更-->
<nz-table #nzTable5 [nzPageSize]="5" [nzData]="table.changeList" [nzLoading]="loading.changeLoading" [nzFrontPagination]="true" >
<nz-table #nzTable5 [nzPageSize]="5" [nzData]="table.changeList" [nzLoading]="loading.changeLoading"
[nzFrontPagination]="true">
<thead>
<tr>
<th>变更编号</th>
......@@ -190,9 +197,11 @@
</tbody>
</nz-table>
</div>
<div nz-col nzSpan="12">
<div nz-col nzSpan="12" *ngIf="page.lookModule.includes('运维项目')">
<p class="title">运维项目 <span (click)="goMore('oprProject')">更多</span></p>
<!-- 运维项目-->
<nz-table #nzTable6 [nzPageSize]="5" [nzData]="table.projectList" [nzLoading]="loading.projectLoading" [nzFrontPagination]="true">
<nz-table #nzTable6 [nzPageSize]="5" [nzData]="table.projectList" [nzLoading]="loading.projectLoading"
[nzFrontPagination]="true">
<thead>
<tr>
<th nzWidth="30%">项目名称</th>
......@@ -219,11 +228,11 @@
</tbody>
</nz-table>
</div>
</nz-row>
<nz-row [nzGutter]="4">
<div nz-col nzSpan="12">
<div nz-col nzSpan="12" *ngIf="page.lookModule.includes('运维公司')">
<p class="title">运维公司 <span (click)="goMore('oprCompany')">更多</span></p>
<!-- 运维公司-->
<nz-table #nzTable7 [nzPageSize]="5" [nzData]="table.companyList" [nzLoading]="loading.companyLoading" [nzFrontPagination]="true">
<nz-table #nzTable7 [nzPageSize]="5" [nzData]="table.companyList" [nzLoading]="loading.companyLoading"
[nzFrontPagination]="true">
<thead>
<tr>
<th nzWidth="30%">维护公司名称</th>
......@@ -249,9 +258,11 @@
</tbody>
</nz-table>
</div>
<div nz-col nzSpan="12">
<div nz-col nzSpan="12" *ngIf="page.lookModule.includes('运维团队')">
<p class="title">运维团队 <span (click)="goMore('oprTeam')">更多</span></p>
<!-- 运维团队-->
<nz-table #nzTable8 [nzPageSize]="5" [nzData]="table.teamList" [nzLoading]="loading.teamLoading" [nzFrontPagination]="true">
<nz-table #nzTable8 [nzPageSize]="5" [nzData]="table.teamList" [nzLoading]="loading.teamLoading"
[nzFrontPagination]="true">
<thead>
<tr>
<th nzWidth="30%">团队名称</th>
......@@ -275,11 +286,11 @@
</tbody>
</nz-table>
</div>
</nz-row>
<nz-row [nzGutter]="4">
<div nz-col nzSpan="12">
<div nz-col nzSpan="12" *ngIf="page.lookModule.includes('运维费用')">
<p class="title">运维费用 <span (click)="goMore('oprCost')">更多</span></p>
<!-- 运维费用-->
<nz-table #nzTable9 [nzPageSize]="5" [nzData]="table.costList" [nzLoading]="loading.costLoading" [nzFrontPagination]="true">
<nz-table #nzTable9 [nzPageSize]="5" [nzData]="table.costList" [nzLoading]="loading.costLoading"
[nzFrontPagination]="true">
<thead>
<tr>
<th nzWidth="30%">维护项目</th>
......@@ -300,9 +311,11 @@
</tbody>
</nz-table>
</div>
<div nz-col nzSpan="12">
<div nz-col nzSpan="12" *ngIf="page.lookModule.includes('资源预警')">
<p class="title">资源预警 <span (click)="goMore('resource-warning')">更多</span></p>
<!-- 资源预警-->
<nz-table #nzTable10 [nzPageSize]="5" [nzData]="table.resourceList" [nzLoading]="loading.resourceLoading" [nzFrontPagination]="true">
<nz-table #nzTable10 [nzPageSize]="5" [nzData]="table.resourceList" [nzLoading]="loading.resourceLoading"
[nzFrontPagination]="true">
<thead>
<tr>
<th>预警时间</th>
......@@ -322,11 +335,11 @@
</tbody>
</nz-table>
</div>
</nz-row>
<nz-row [nzGutter]="4">
<div nz-col nzSpan="12">
<div nz-col nzSpan="12" *ngIf="page.lookModule.includes('业务预警')">
<p class="title">业务预警 <span (click)="goMore('business-warning')">更多</span></p>
<!-- 业务预警-->
<nz-table #nzTable11 [nzPageSize]="5" [nzData]="table.businessList" [nzLoading]="loading.businessLoading" [nzFrontPagination]="true">
<nz-table #nzTable11 [nzPageSize]="5" [nzData]="table.businessList" [nzLoading]="loading.businessLoading"
[nzFrontPagination]="true">
<thead>
<tr>
<th>预警时间</th>
......@@ -346,9 +359,11 @@
</tbody>
</nz-table>
</div>
<div nz-col nzSpan="12">
<div nz-col nzSpan="12" *ngIf="page.lookModule.includes('工作预警')">
<p class="title">工作预警 <span (click)="goMore('work-warning')">更多</span></p>
<!-- 工作预警-->
<nz-table #nzTable12 [nzPageSize]="5" [nzData]="table.workList" [nzLoading]="loading.workLoading" [nzFrontPagination]="true">
<nz-table #nzTable12 [nzPageSize]="5" [nzData]="table.workList" [nzLoading]="loading.workLoading"
[nzFrontPagination]="true">
<thead>
<tr>
<th>预警时间</th>
......
......@@ -5,15 +5,31 @@ import {EarlyWarningService} from '../../early-warning/earlyWarning.service';
import {ProjectService} from '../../project-manager/project.service';
import {SystemChangeService} from '../../system-change/system-change.service';
import {WorkService} from '../../work/work.service';
import {Router} from '@angular/router';
@Component({
selector: 'smart-my-follow',
templateUrl: './my-follow.component.html',
styles: [
`
:host ::ng-deep .ant-table-body{
`
:host ::ng-deep .ant-table-body {
min-height: 380px;
}
.title {
padding: 10px 15px;
background: #fff;
border-top: 5px solid #ddd;
font-size: 14px;
font-weight: bold;
}
.title span {
font-size: 12px;
color: #1a6ffb;
float: right;
cursor: pointer;
}
`
]
})
......@@ -23,6 +39,7 @@ export class MyFollowComponent implements OnInit {
page = {
list: null,
isLoading: false,
lookModule: ''
};
table = {
eventList: [],
......@@ -57,6 +74,7 @@ export class MyFollowComponent implements OnInit {
private projectSer: ProjectService,
private workSer: WorkService,
private systemChangeSer: SystemChangeService,
public router: Router,
private earningSer: EarlyWarningService) {
}
......@@ -82,11 +100,20 @@ export class MyFollowComponent implements OnInit {
(res) => {
if (res.errCode == 10000) {
this.page.list = res.data;
res.data.forEach(e => {
if (e.status == 1) {
this.page.lookModule += e.moduleName;
}
});
}
}
);
}
goMore(url) {
this.router.navigate([`/app/main/${url}`]);
}
//运维事件
getEventList() {
this.loading.eventLoading = true;
......
......@@ -106,6 +106,13 @@
</nz-form-control>
</nz-form-item>
<nz-form-item>
<nz-form-label [nzSpan]="7" nzRequired nzFor="name">完成时间</nz-form-label>
<nz-form-control [nzSpan]="15">
<nz-date-picker [(ngModel)]="modal.date" nzFormat="yyyy-MM-dd" [ngModelOptions]="{standalone: true}"></nz-date-picker>
<nz-time-picker [(ngModel)]="modal.time" [ngModelOptions]="{standalone: true}"></nz-time-picker>
</nz-form-control>
</nz-form-item>
<nz-form-item>
<nz-form-label [nzSpan]="7" nzRequired nzFor="name">处理情况</nz-form-label>
<nz-form-control [nzSpan]="12">
<textarea [(ngModel)]="modal.processRemark" [ngModelOptions]="{standalone: true}" row="4" nz-input></textarea>
......
......@@ -5,6 +5,7 @@ import {NzMessageService, NzModalService} from 'ng-zorro-antd';
import {PlanModalComponent} from '../modal/plan-modal/plan-modal.component';
import {LookPlanComponent} from '../modal/look-plan/look-plan.component';
import {CommonService} from '../../shared/common/common.service';
import {DatePipe} from '@angular/common';
@Component({
selector: 'smart-inspect-plan',
......@@ -39,10 +40,13 @@ export class InspectPlanComponent implements OnInit {
isOkLoading: false,
planId: '',
processResult: '0',
date: null,
time: null,
processRemark: ''
};
constructor(private workSer: WorkService, private message: NzMessageService,
private datePipe:DatePipe,
private commonSer: CommonService,
private modalSer: NzModalService) {
}
......@@ -154,14 +158,19 @@ export class InspectPlanComponent implements OnInit {
//确定
handleOk() {
if (!this.modal.date || !this.modal.time) {
this.message.error('请选择完成时间');
return false;
}
if (!this.modal.processRemark) {
this.message.error('请输入必填项');
return
this.message.error('请输入处理情况');
return;
}
const data = {
planId: this.modal.planId,
processResult: this.modal.processResult,
processRemark: this.modal.processRemark,
completeTime: new Date(this.datePipe.transform(this.modal.date, 'yyyy-MM-dd') + ' ' + this.datePipe.transform(this.modal.time, 'HH:mm:ss')).getTime()
};
this.modal.isOkLoading = true;
this.workSer.processPlan(data).subscribe(
......
......@@ -10,7 +10,7 @@
"noImplicitAny": false,
"skipLibCheck": true,
"suppressImplicitAnyIndexErrors": true,
"outDir": "build/www/app",
"outDir": "build/master/app",
"lib": ["es7", "dom"],
"typeRoots": [
"node_modules/@types"
......
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