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 { ...@@ -547,7 +547,7 @@ export class BasicComponent implements OnInit {
} else { } else {
type = 'server'; type = 'server';
} }
this.router.navigate([type], { this.router.navigate([`app/main/${type}`], {
queryParams: { queryParams: {
hostId: item.hostid, hostId: item.hostid,
equipmentType: item.equipmentType 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" [nzTitle]="modal.title"
(nzOnCancel)="handleCancel()" (nzOnCancel)="handleCancel()"
(nzOnOk)="handleOk()"> (nzOnOk)="handleOk()">
......
...@@ -7,13 +7,18 @@ import {fakeAsync} from '@angular/core/testing'; ...@@ -7,13 +7,18 @@ import {fakeAsync} from '@angular/core/testing';
@Component({ @Component({
selector: 'smart-module-config', selector: 'smart-module-config',
templateUrl: './module-config.component.html', templateUrl: './module-config.component.html',
styles: [] styles: [
`
`
]
}) })
export class ModuleConfigComponent implements OnInit { export class ModuleConfigComponent implements OnInit {
@Output() done = new EventEmitter(); @Output() done = new EventEmitter();
modal = { modal = {
isVisible: false, isVisible: false,
isOkLoading: false,
title: '', title: '',
list: [] list: []
}; };
...@@ -34,6 +39,7 @@ export class ModuleConfigComponent implements OnInit { ...@@ -34,6 +39,7 @@ export class ModuleConfigComponent implements OnInit {
handleCancel() { handleCancel() {
this.modal.isVisible = false; this.modal.isVisible = false;
this.modal.isOkLoading = false;
} }
handleOk() { handleOk() {
...@@ -42,6 +48,7 @@ export class ModuleConfigComponent implements OnInit { ...@@ -42,6 +48,7 @@ export class ModuleConfigComponent implements OnInit {
e.status = e.status == false ? 0 : 1; e.status = e.status == false ? 0 : 1;
e.orders = index; e.orders = index;
}); });
this.modal.isOkLoading = true;
this.overviewSer.updateWorkModule(this.modal.list).subscribe( this.overviewSer.updateWorkModule(this.modal.list).subscribe(
(res) => { (res) => {
if (res.errCode == 10000) { if (res.errCode == 10000) {
...@@ -49,6 +56,7 @@ export class ModuleConfigComponent implements OnInit { ...@@ -49,6 +56,7 @@ export class ModuleConfigComponent implements OnInit {
this.modal.isVisible = false; this.modal.isVisible = false;
this.done.emit(); this.done.emit();
} }
this.modal.isOkLoading = false;
} }
); );
// this.modal.isVisible = false; // this.modal.isVisible = false;
......
...@@ -25,9 +25,13 @@ ...@@ -25,9 +25,13 @@
</div> </div>
</div> </div>
<nz-row [nzGutter]="4"> <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> <thead>
<tr> <tr>
<th>事件编号</th> <th>事件编号</th>
...@@ -58,9 +62,11 @@ ...@@ -58,9 +62,11 @@
</tbody> </tbody>
</nz-table> </nz-table>
</div> </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> <thead>
<tr> <tr>
<th nzWidth="30%">计划名称</th> <th nzWidth="30%">计划名称</th>
...@@ -96,9 +102,8 @@ ...@@ -96,9 +102,8 @@
</tbody> </tbody>
</nz-table> </nz-table>
</div> </div>
</nz-row> <div nz-col nzSpan="12" *ngIf="page.lookModule.includes('资产管理')">
<nz-row [nzGutter]="4"> <p class="title">资产管理 <span (click)="goMore('assetPart')">更多</span></p>
<div nz-col nzSpan="12">
<!-- 资产管理--> <!-- 资产管理-->
<nz-table #nzTable3 [nzData]="table.childrenList" [nzFrontPagination]="true" [nzPageSize]="5" <nz-table #nzTable3 [nzData]="table.childrenList" [nzFrontPagination]="true" [nzPageSize]="5"
[nzLoading]="loading.childrenLoading"> [nzLoading]="loading.childrenLoading">
...@@ -128,9 +133,11 @@ ...@@ -128,9 +133,11 @@
</tbody> </tbody>
</nz-table> </nz-table>
</div> </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> <thead>
<tr> <tr>
<th>编号</th> <th>编号</th>
...@@ -151,11 +158,11 @@ ...@@ -151,11 +158,11 @@
</tbody> </tbody>
</nz-table> </nz-table>
</div> </div>
</nz-row> <div nz-col nzSpan="12" *ngIf="page.lookModule.includes('系统变更')">
<nz-row [nzGutter]="4"> <p class="title">系统变更 <span (click)="goMore('changeManage')">更多</span></p>
<div nz-col nzSpan="12">
<!-- 系统变更--> <!-- 系统变更-->
<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> <thead>
<tr> <tr>
<th>变更编号</th> <th>变更编号</th>
...@@ -190,9 +197,11 @@ ...@@ -190,9 +197,11 @@
</tbody> </tbody>
</nz-table> </nz-table>
</div> </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> <thead>
<tr> <tr>
<th nzWidth="30%">项目名称</th> <th nzWidth="30%">项目名称</th>
...@@ -219,11 +228,11 @@ ...@@ -219,11 +228,11 @@
</tbody> </tbody>
</nz-table> </nz-table>
</div> </div>
</nz-row> <div nz-col nzSpan="12" *ngIf="page.lookModule.includes('运维公司')">
<nz-row [nzGutter]="4"> <p class="title">运维公司 <span (click)="goMore('oprCompany')">更多</span></p>
<div nz-col nzSpan="12">
<!-- 运维公司--> <!-- 运维公司-->
<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> <thead>
<tr> <tr>
<th nzWidth="30%">维护公司名称</th> <th nzWidth="30%">维护公司名称</th>
...@@ -249,9 +258,11 @@ ...@@ -249,9 +258,11 @@
</tbody> </tbody>
</nz-table> </nz-table>
</div> </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> <thead>
<tr> <tr>
<th nzWidth="30%">团队名称</th> <th nzWidth="30%">团队名称</th>
...@@ -275,11 +286,11 @@ ...@@ -275,11 +286,11 @@
</tbody> </tbody>
</nz-table> </nz-table>
</div> </div>
</nz-row> <div nz-col nzSpan="12" *ngIf="page.lookModule.includes('运维费用')">
<nz-row [nzGutter]="4"> <p class="title">运维费用 <span (click)="goMore('oprCost')">更多</span></p>
<div nz-col nzSpan="12">
<!-- 运维费用--> <!-- 运维费用-->
<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> <thead>
<tr> <tr>
<th nzWidth="30%">维护项目</th> <th nzWidth="30%">维护项目</th>
...@@ -300,9 +311,11 @@ ...@@ -300,9 +311,11 @@
</tbody> </tbody>
</nz-table> </nz-table>
</div> </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> <thead>
<tr> <tr>
<th>预警时间</th> <th>预警时间</th>
...@@ -322,11 +335,11 @@ ...@@ -322,11 +335,11 @@
</tbody> </tbody>
</nz-table> </nz-table>
</div> </div>
</nz-row> <div nz-col nzSpan="12" *ngIf="page.lookModule.includes('业务预警')">
<nz-row [nzGutter]="4"> <p class="title">业务预警 <span (click)="goMore('business-warning')">更多</span></p>
<div nz-col nzSpan="12">
<!-- 业务预警--> <!-- 业务预警-->
<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> <thead>
<tr> <tr>
<th>预警时间</th> <th>预警时间</th>
...@@ -346,9 +359,11 @@ ...@@ -346,9 +359,11 @@
</tbody> </tbody>
</nz-table> </nz-table>
</div> </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> <thead>
<tr> <tr>
<th>预警时间</th> <th>预警时间</th>
......
...@@ -5,15 +5,31 @@ import {EarlyWarningService} from '../../early-warning/earlyWarning.service'; ...@@ -5,15 +5,31 @@ import {EarlyWarningService} from '../../early-warning/earlyWarning.service';
import {ProjectService} from '../../project-manager/project.service'; import {ProjectService} from '../../project-manager/project.service';
import {SystemChangeService} from '../../system-change/system-change.service'; import {SystemChangeService} from '../../system-change/system-change.service';
import {WorkService} from '../../work/work.service'; import {WorkService} from '../../work/work.service';
import {Router} from '@angular/router';
@Component({ @Component({
selector: 'smart-my-follow', selector: 'smart-my-follow',
templateUrl: './my-follow.component.html', templateUrl: './my-follow.component.html',
styles: [ styles: [
` `
:host ::ng-deep .ant-table-body{ :host ::ng-deep .ant-table-body {
min-height: 380px; 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 { ...@@ -23,6 +39,7 @@ export class MyFollowComponent implements OnInit {
page = { page = {
list: null, list: null,
isLoading: false, isLoading: false,
lookModule: ''
}; };
table = { table = {
eventList: [], eventList: [],
...@@ -57,6 +74,7 @@ export class MyFollowComponent implements OnInit { ...@@ -57,6 +74,7 @@ export class MyFollowComponent implements OnInit {
private projectSer: ProjectService, private projectSer: ProjectService,
private workSer: WorkService, private workSer: WorkService,
private systemChangeSer: SystemChangeService, private systemChangeSer: SystemChangeService,
public router: Router,
private earningSer: EarlyWarningService) { private earningSer: EarlyWarningService) {
} }
...@@ -82,11 +100,20 @@ export class MyFollowComponent implements OnInit { ...@@ -82,11 +100,20 @@ export class MyFollowComponent implements OnInit {
(res) => { (res) => {
if (res.errCode == 10000) { if (res.errCode == 10000) {
this.page.list = res.data; 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() { getEventList() {
this.loading.eventLoading = true; this.loading.eventLoading = true;
......
...@@ -106,6 +106,13 @@ ...@@ -106,6 +106,13 @@
</nz-form-control> </nz-form-control>
</nz-form-item> </nz-form-item>
<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-label [nzSpan]="7" nzRequired nzFor="name">处理情况</nz-form-label>
<nz-form-control [nzSpan]="12"> <nz-form-control [nzSpan]="12">
<textarea [(ngModel)]="modal.processRemark" [ngModelOptions]="{standalone: true}" row="4" nz-input></textarea> <textarea [(ngModel)]="modal.processRemark" [ngModelOptions]="{standalone: true}" row="4" nz-input></textarea>
......
...@@ -5,6 +5,7 @@ import {NzMessageService, NzModalService} from 'ng-zorro-antd'; ...@@ -5,6 +5,7 @@ import {NzMessageService, NzModalService} from 'ng-zorro-antd';
import {PlanModalComponent} from '../modal/plan-modal/plan-modal.component'; import {PlanModalComponent} from '../modal/plan-modal/plan-modal.component';
import {LookPlanComponent} from '../modal/look-plan/look-plan.component'; import {LookPlanComponent} from '../modal/look-plan/look-plan.component';
import {CommonService} from '../../shared/common/common.service'; import {CommonService} from '../../shared/common/common.service';
import {DatePipe} from '@angular/common';
@Component({ @Component({
selector: 'smart-inspect-plan', selector: 'smart-inspect-plan',
...@@ -39,10 +40,13 @@ export class InspectPlanComponent implements OnInit { ...@@ -39,10 +40,13 @@ export class InspectPlanComponent implements OnInit {
isOkLoading: false, isOkLoading: false,
planId: '', planId: '',
processResult: '0', processResult: '0',
date: null,
time: null,
processRemark: '' processRemark: ''
}; };
constructor(private workSer: WorkService, private message: NzMessageService, constructor(private workSer: WorkService, private message: NzMessageService,
private datePipe:DatePipe,
private commonSer: CommonService, private commonSer: CommonService,
private modalSer: NzModalService) { private modalSer: NzModalService) {
} }
...@@ -154,14 +158,19 @@ export class InspectPlanComponent implements OnInit { ...@@ -154,14 +158,19 @@ export class InspectPlanComponent implements OnInit {
//确定 //确定
handleOk() { handleOk() {
if (!this.modal.date || !this.modal.time) {
this.message.error('请选择完成时间');
return false;
}
if (!this.modal.processRemark) { if (!this.modal.processRemark) {
this.message.error('请输入必填项'); this.message.error('请输入处理情况');
return return;
} }
const data = { const data = {
planId: this.modal.planId, planId: this.modal.planId,
processResult: this.modal.processResult, processResult: this.modal.processResult,
processRemark: this.modal.processRemark, 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.modal.isOkLoading = true;
this.workSer.processPlan(data).subscribe( this.workSer.processPlan(data).subscribe(
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
"noImplicitAny": false, "noImplicitAny": false,
"skipLibCheck": true, "skipLibCheck": true,
"suppressImplicitAnyIndexErrors": true, "suppressImplicitAnyIndexErrors": true,
"outDir": "build/www/app", "outDir": "build/master/app",
"lib": ["es7", "dom"], "lib": ["es7", "dom"],
"typeRoots": [ "typeRoots": [
"node_modules/@types" "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