Commit e6f0f69c authored by wangqinghua's avatar wangqinghua

update

parent 9beb87c4
...@@ -30,22 +30,22 @@ ...@@ -30,22 +30,22 @@
<div echarts [options]="leftOneChart" style="height: 250px;width: 100%"></div> <div echarts [options]="leftOneChart" style="height: 250px;width: 100%"></div>
<div class="flex-center"> <div class="flex-center">
<div class="flex-item round-tag tag-form"> <div class="flex-item round-tag tag-form">
<p><nz-tag [nzColor]="color.red"></nz-tag>严重 {{leftOneData?.high}}个,{{(leftOneData?.high / leftOneTotal).toFixed(2)*100}}% </p> <!--<p><nz-tag [nzColor]="color.red"></nz-tag>严重 {{leftOneData?.high}}个,{{(leftOneData?.high / leftOneTotal).toFixed(2)*100}}% </p>-->
<p><nz-tag [nzColor]="color.yellow"></nz-tag>告警 {{leftOneData?.warning}}个,{{(leftOneData?.warning / leftOneTotal).toFixed(2)*100}}% </p> <!--<p><nz-tag [nzColor]="color.yellow"></nz-tag>告警 {{leftOneData?.warning}}个,{{(leftOneData?.warning / leftOneTotal).toFixed(2)*100}}% </p>-->
<p><nz-tag [nzColor]="color.green"></nz-tag>正常 {{leftOneData?.normal}}个,{{(leftOneData?.normal / leftOneTotal).toFixed(2)*100}}% </p> <!--<p><nz-tag [nzColor]="color.green"></nz-tag>正常 {{leftOneData?.normal}}个,{{(leftOneData?.normal / leftOneTotal).toFixed(2)*100}}% </p>-->
<p><nz-tag [nzColor]="color.gray"></nz-tag>禁止 {{leftOneData?.disabled}}个,{{(leftOneData?.disabled / leftOneTotal).toFixed(2)*100}}%</p> <!--<p><nz-tag [nzColor]="color.gray"></nz-tag>禁止 {{leftOneData?.disabled}}个,{{(leftOneData?.disabled / leftOneTotal).toFixed(2)*100}}%</p>-->
</div> </div>
</div> </div>
</div> </div>
<div nz-col nzSpan="12"> <div nz-col nzSpan="12">
<div echarts [options]="leftTwoChart" style="height: 250px;width: 100%"></div> <div echarts [options]="leftTwoChart" style="height: 250px;width: 100%"></div>
<div class="flex-center"> <div class="flex-center">
<div class="flex-item round-tag tag-form"> <!--<div class="flex-item round-tag tag-form">-->
<p><nz-tag [nzColor]="color.red"></nz-tag>严重 {{leftTwoData?.high}}个,{{(leftTwoData?.high / leftTwoTotal).toFixed(2)*100}}% </p> <!--<p><nz-tag [nzColor]="color.red"></nz-tag>严重 {{leftTwoData?.high}}个,{{(leftTwoData?.high / leftTwoTotal).toFixed(2)*100}}% </p>-->
<p><nz-tag [nzColor]="color.yellow"></nz-tag>告警 {{leftTwoData?.warning}}个,{{(leftTwoData?.warning / leftTwoTotal).toFixed(2)*100}}% </p> <!--<p><nz-tag [nzColor]="color.yellow"></nz-tag>告警 {{leftTwoData?.warning}}个,{{(leftTwoData?.warning / leftTwoTotal).toFixed(2)*100}}% </p>-->
<p><nz-tag [nzColor]="color.green"></nz-tag>正常 {{leftTwoData?.normal}}个,{{(leftTwoData?.normal / leftTwoTotal).toFixed(2)*100}}% </p> <!--<p><nz-tag [nzColor]="color.green"></nz-tag>正常 {{leftTwoData?.normal}}个,{{(leftTwoData?.normal / leftTwoTotal).toFixed(2)*100}}% </p>-->
<p><nz-tag [nzColor]="color.gray"></nz-tag>禁止 {{leftTwoData?.disabled}}个,{{(leftTwoData?.disabled / leftTwoTotal).toFixed(2)*100}}%</p> <!--<p><nz-tag [nzColor]="color.gray"></nz-tag>禁止 {{leftTwoData?.disabled}}个,{{(leftTwoData?.disabled / leftTwoTotal).toFixed(2)*100}}%</p>-->
</div> <!--</div>-->
</div> </div>
</div> </div>
</div> </div>
......
...@@ -43,12 +43,22 @@ export class HomeComponent implements OnInit,AfterViewInit { ...@@ -43,12 +43,22 @@ export class HomeComponent implements OnInit,AfterViewInit {
alarmGroupId:null alarmGroupId:null
}; };
leftOneData; leftOneData = {
leftOneTotal; high:<any>null,
leftTwoData; warning:Number,
leftTwoTotal; normal:Number,
disabled:Number,
};
leftOneTotal = <any>null;
leftTwoData =<any> {
high:<any>Number,
warning:<any>Number,
normal:<any>Number,
disabled:<any>Number,
};
leftTwoTotal:Number;
rightTotal; rightTotal = 0;
constructor( constructor(
private overAllSer:OverAllService,private message:NzMessageService, private overAllSer:OverAllService,private message:NzMessageService,
...@@ -99,7 +109,8 @@ export class HomeComponent implements OnInit,AfterViewInit { ...@@ -99,7 +109,8 @@ export class HomeComponent implements OnInit,AfterViewInit {
countGroupItem(){ countGroupItem(){
this.layoutSer.findHostCountByStatusByGroup(this.obj.leftGroupId).subscribe( this.layoutSer.findHostCountByStatusByGroup(this.obj.leftGroupId).subscribe(
(res)=>{ (res)=>{
this.leftOneData = res.data; // this.leftOneData = res.data;
// this.leftOneData.high= ( (this.leftOneData.high / this.leftOneTotal).toFixed(2) )*100;
this.setLeftOne(res.data); this.setLeftOne(res.data);
} }
); );
......
...@@ -64,10 +64,15 @@ export class CommonService implements OnInit { ...@@ -64,10 +64,15 @@ export class CommonService implements OnInit {
return str; return str;
} }
deleteThing(title,callback){ /**
* 删除确认函数
* @param title 提示语
* @param callback 回调函数
*/
confirmThing(title,content,callback){
this.modalSer.confirm({ this.modalSer.confirm({
nzTitle: '删除', nzTitle: title,
nzContent: '<b style="color: red;">'+title+'</b>', nzContent: '<b style="color: red;">'+content+'</b>',
nzOkText: '确定', nzOkText: '确定',
nzOkType: 'danger', nzOkType: 'danger',
nzOnOk: callback, nzOnOk: callback,
......
...@@ -47,7 +47,7 @@ ...@@ -47,7 +47,7 @@
<button nz-button nzType="default"><i class="anticon anticon-search"></i>搜索</button> <button nz-button nzType="default"><i class="anticon anticon-search"></i>搜索</button>
</div> </div>
</div> </div>
<nz-table #basicTable [nzData]="dataSet"> <nz-table #basicTable [nzData]="dataSet" [nzFrontPagination]="false" [nzTotal]="totalNum" [nzPageIndex]="pageNumber" [nzPageSize]="pageSize" (nzPageIndexChange)="changePage($event)">
<thead> <thead>
<tr> <tr>
<th>操作用户</th> <th>操作用户</th>
......
...@@ -22,6 +22,8 @@ export class AuditComponent implements OnInit { ...@@ -22,6 +22,8 @@ export class AuditComponent implements OnInit {
startTime; startTime;
endTime; endTime;
totalNum;
obj = { obj = {
end: null, end: null,
start: null, start: null,
...@@ -58,11 +60,17 @@ export class AuditComponent implements OnInit { ...@@ -58,11 +60,17 @@ export class AuditComponent implements OnInit {
}; };
this.systemSer.logList(data).subscribe( this.systemSer.logList(data).subscribe(
(res) => { (res) => {
this.dataSet = res.data; this.dataSet = res.data.data;
this.totalNum = res.data.totalCount;
} }
); );
} }
changePage(e){
this.pageNumber = e;
this.getList();
}
//时间改变 //时间改变
changeType() { changeType() {
const nowDate = new Date().getTime(); const nowDate = new Date().getTime();
......
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
</div> </div>
<nz-tabset [nzTabPosition]="'top'" [nzType]="'card'"> <nz-tabset [nzTabPosition]="'top'" [nzType]="'card'">
<nz-tab nzTitle="待审批"> <nz-tab nzTitle="待审批">
<nz-table #basicTable [nzData]="noList"> <nz-table #basicTable [nzData]="noList" [nzFrontPagination]="false" [nzTotal]="totalNumNo" [nzPageIndex]="pageNoNo" [nzPageSize]="pageSize" (nzPageIndexChange)="changeNoPage($event)">
<thead> <thead>
<tr> <tr>
<th nzShowCheckbox [(nzChecked)]="allChecked" [nzIndeterminate]="indeterminate" (nzCheckedChange)="checkAll($event)"></th> <th nzShowCheckbox [(nzChecked)]="allChecked" [nzIndeterminate]="indeterminate" (nzCheckedChange)="checkAll($event)"></th>
...@@ -81,7 +81,7 @@ ...@@ -81,7 +81,7 @@
</nz-table> </nz-table>
</nz-tab> </nz-tab>
<nz-tab nzTitle="已审批"> <nz-tab nzTitle="已审批">
<nz-table #basicTable [nzData]="areadyList"> <nz-table #basicTable [nzData]="areadyList" [nzFrontPagination]="false" [nzTotal]="totalNumAlready" [nzPageIndex]="pageNoAlready" [nzPageSize]="pageSize" (nzPageIndexChange)="changeAlreadyPage($event)">
<thead> <thead>
<tr> <tr>
<th>操作用户</th> <th>操作用户</th>
......
...@@ -109,7 +109,8 @@ export class ExamineComponent implements OnInit { ...@@ -109,7 +109,8 @@ export class ExamineComponent implements OnInit {
this.systemSer.getApproveOfDone(data).subscribe( this.systemSer.getApproveOfDone(data).subscribe(
(res) => { (res) => {
if(res.errCode == 10000){ if(res.errCode == 10000){
this.areadyList = res.data; this.areadyList = res.data.data;
this.totalNumAlready = res.data.totalCount;
}else{ }else{
this.message.error(res.errMsg); this.message.error(res.errMsg);
} }
...@@ -117,6 +118,11 @@ export class ExamineComponent implements OnInit { ...@@ -117,6 +118,11 @@ export class ExamineComponent implements OnInit {
); );
} }
changeAlreadyPage(e){
this.pageNoAlready = e;
this.getListAlready()
}
getListNo() { getListNo() {
const data = { const data = {
pageNum: this.pageNoNo, pageNum: this.pageNoNo,
...@@ -126,7 +132,8 @@ export class ExamineComponent implements OnInit { ...@@ -126,7 +132,8 @@ export class ExamineComponent implements OnInit {
this.systemSer.getUnApprove(data).subscribe( this.systemSer.getUnApprove(data).subscribe(
(res) => { (res) => {
if(res.errCode == 10000){ if(res.errCode == 10000){
this.noList = res.data; this.noList = res.data.data;
this.totalNumNo = res.data.totalCount;
}else{ }else{
this.message.error(res.errMsg); this.message.error(res.errMsg);
} }
...@@ -134,13 +141,20 @@ export class ExamineComponent implements OnInit { ...@@ -134,13 +141,20 @@ export class ExamineComponent implements OnInit {
); );
} }
changeNoPage(e){
this.pageNoNo = e;
this.getListNo();
}
//审批通过 //审批通过
approvalPass(){ approvalPass(){
this.commonSer.deleteThing("确定通过所选请求",()=>{ this.commonSer.confirmThing("通过","确定通过所选请求",()=>{
this.systemSer.approvalPass(this.selectList).subscribe( this.systemSer.approvalPass(this.selectList).subscribe(
(res)=>{ (res)=>{
if(res.errCode == 10000){ if(res.errCode == 10000){
this.message.success("已通过"); this.message.success("已通过");
this.getListNo();
this.getListAlready();
}else{ }else{
this.message.error(res.errMsg); this.message.error(res.errMsg);
} }
...@@ -152,11 +166,13 @@ export class ExamineComponent implements OnInit { ...@@ -152,11 +166,13 @@ export class ExamineComponent implements OnInit {
//审批不通过 //审批不通过
approvalUnPass(){ approvalUnPass(){
this.commonSer.deleteThing("确定拒绝所选请求",()=>{ this.commonSer.confirmThing("退回","确定拒绝所选请求",()=>{
this.systemSer.approvCancle(this.selectList).subscribe( this.systemSer.approvCancle(this.selectList).subscribe(
(res)=>{ (res)=>{
if(res.errCode == 10000){ if(res.errCode == 10000){
this.message.success("退回成功"); this.message.success("退回成功");
this.getListNo();
this.getListAlready();
}else{ }else{
this.message.error(res.errMsg); this.message.error(res.errMsg);
} }
......
...@@ -21,12 +21,10 @@ ...@@ -21,12 +21,10 @@
<div nz-row class="search-form"> <div nz-row class="search-form">
<div nz-col nzSpan="16"> <div nz-col nzSpan="16">
<button (click)="selectRoleModal()" nz-button nzType="default"><i class="anticon anticon-search"></i>选择角色</button>
<button (click)="showModal()" nz-button nzType="default"><i class="anticon anticon-search"></i>选择部门</button>
</div> </div>
<div nz-col nzSpan="8" class="text-right"> <div nz-col nzSpan="8" class="text-right">
<input nz-input placeholder="姓名/手机号码" [(ngModel)]="name"> <input nz-input placeholder="姓名/手机号码" [(ngModel)]="name">
<button nz-button nzType="default"><i class="anticon anticon-search"></i>搜索</button> <button (click)="getUser()" nz-button nzType="default"><i class="anticon anticon-search"></i>搜索</button>
</div> </div>
</div> </div>
<div nz-row [nzGutter]="12"> <div nz-row [nzGutter]="12">
...@@ -53,14 +51,16 @@ ...@@ -53,14 +51,16 @@
<button (click)="showUserModal()" nz-button nzType="primary">新增用户</button> <button (click)="showUserModal()" nz-button nzType="primary">新增用户</button>
<button (click)="batchDelete()" nz-button nzType="default">批量删除</button> <button (click)="batchDelete()" nz-button nzType="default">批量删除</button>
<button nz-button nzType="default">批量修改</button> <button nz-button nzType="default">批量修改</button>
<button nz-button nzType="default">导出模版</button> <button nz-button nzType="default">下载模版</button>
<button nz-button nzType="default">导入组织</button> <button nz-button nzType="default">导入组织</button>
<button nz-button nzType="default">导入用户</button> <button nz-button nzType="default">导入用户</button>
</div> </div>
<nz-table #basicTable [nzData]="dataSet" <nz-table #basicTable [nzData]="dataSet"
(nzCurrentPageDataChange)="currentPageDataChange($event)" (nzCurrentPageDataChange)="currentPageDataChange($event)"
(nzPageIndexChange)="refreshStatus()" (nzPageIndexChange)="refreshStatus()"
(nzPageSizeChange)="refreshStatus()"> (nzPageSizeChange)="refreshStatus()"
[nzFrontPagination]="false" [nzTotal]="totalNum" [nzPageIndex]="pageNum" [nzPageSize]="pageSize" (nzPageIndexChange)="changePage($event)"
>
<thead> <thead>
<tr> <tr>
<th nzShowCheckbox [(nzChecked)]="allChecked" [nzIndeterminate]="indeterminate" (nzCheckedChange)="checkAll($event)"></th> <th nzShowCheckbox [(nzChecked)]="allChecked" [nzIndeterminate]="indeterminate" (nzCheckedChange)="checkAll($event)"></th>
......
...@@ -5,6 +5,7 @@ import {UserComponent} from '../modal/user/user.component'; ...@@ -5,6 +5,7 @@ import {UserComponent} from '../modal/user/user.component';
import {GroupModalComponent} from '../modal/group-modal/group-modal.component'; import {GroupModalComponent} from '../modal/group-modal/group-modal.component';
import {SelectRoleComponent} from '../../modal/select-role/select-role.component'; import {SelectRoleComponent} from '../../modal/select-role/select-role.component';
import {CommonService} from '../../shared/common/common.service'; import {CommonService} from '../../shared/common/common.service';
import {pageSize} from '../../app.constants';
@Component({ @Component({
selector: 'jhi-group', selector: 'jhi-group',
...@@ -32,6 +33,10 @@ export class GroupComponent implements OnInit { ...@@ -32,6 +33,10 @@ export class GroupComponent implements OnInit {
organizationId = null; //组织ID organizationId = null; //组织ID
pageNum = 1;
pageSize = pageSize;
totalNum;
constructor(private systemSer: SystemService, private message: NzMessageService, constructor(private systemSer: SystemService, private message: NzMessageService,
private modalSer: NzModalService, private commonSer: CommonService) { private modalSer: NzModalService, private commonSer: CommonService) {
} }
...@@ -79,19 +84,25 @@ export class GroupComponent implements OnInit { ...@@ -79,19 +84,25 @@ export class GroupComponent implements OnInit {
getUser() { getUser() {
const data = { const data = {
'userBo': { 'userBo': {
search:this.name, search:this.name = this.name == ""?null:this.name,
organizationId:this.organizationId organizationId:this.organizationId = this.organizationId == ""?null:this.organizationId
}, },
'pageNum': '1', 'pageNum': this.pageNum,
'pageSize': '10' 'pageSize': this.pageSize
}; };
this.systemSer.user(data).subscribe( this.systemSer.user(data).subscribe(
(res) => { (res) => {
this.dataSet = res.data; this.dataSet = res.data.data;
this.totalNum = res.data.totalCount;
} }
); );
} }
changePage(e){
this.pageNum = e;
this.getUser();
}
getOrg(e){ getOrg(e){
console.log(e); console.log(e);
this.organizationId = e.node.key; this.organizationId = e.node.key;
...@@ -186,7 +197,7 @@ export class GroupComponent implements OnInit { ...@@ -186,7 +197,7 @@ export class GroupComponent implements OnInit {
arr.push(e.user.id); arr.push(e.user.id);
} }
}); });
this.commonSer.deleteThing("确定删除选择的用户",()=>{ this.commonSer.confirmThing("删除","确定删除选择的用户",()=>{
this.systemSer.batchDeleteUser(arr).subscribe( this.systemSer.batchDeleteUser(arr).subscribe(
(res) => { (res) => {
if(res.errCode == 10000){ if(res.errCode == 10000){
...@@ -264,6 +275,4 @@ export class GroupComponent implements OnInit { ...@@ -264,6 +275,4 @@ export class GroupComponent implements OnInit {
this.smartSelectRole.showModal("选择角色",null); this.smartSelectRole.showModal("选择角色",null);
} }
} }
...@@ -103,7 +103,7 @@ export class AssetPartComponent implements OnInit { ...@@ -103,7 +103,7 @@ export class AssetPartComponent implements OnInit {
inventoryTypeIds:[] inventoryTypeIds:[]
}; };
data.inventoryTypeIds.push(this.obj.type); data.inventoryTypeIds.push(this.obj.type);
this.commonSer.deleteThing("确定删除该父级分类",()=>{ this.commonSer.confirmThing("删除","确定删除该父级分类",()=>{
this.workSer.deleteType(data).subscribe( this.workSer.deleteType(data).subscribe(
(res)=>{ (res)=>{
if(res.errCode == 10000){ if(res.errCode == 10000){
...@@ -128,7 +128,7 @@ export class AssetPartComponent implements OnInit { ...@@ -128,7 +128,7 @@ export class AssetPartComponent implements OnInit {
inventoryTypeIds:[] inventoryTypeIds:[]
}; };
data.inventoryTypeIds.push(item.id); data.inventoryTypeIds.push(item.id);
this.commonSer.deleteThing("确定删除该子级分类",()=>{ this.commonSer.confirmThing("删除","确定删除该子级分类",()=>{
this.workSer.deleteType(data).subscribe( this.workSer.deleteType(data).subscribe(
(res)=>{ (res)=>{
if(res.errCode == 10000){ if(res.errCode == 10000){
......
...@@ -45,7 +45,7 @@ export class ChildAssetsComponent implements OnInit { ...@@ -45,7 +45,7 @@ export class ChildAssetsComponent implements OnInit {
inventoryIds:[] inventoryIds:[]
}; };
data.inventoryIds.push(item.id); data.inventoryIds.push(item.id);
this.conmonSer.deleteThing("确定删除该资产?",()=>{ this.conmonSer.confirmThing("删除","确定删除该资产?",()=>{
this.workSer.deleteInventory(data).subscribe( this.workSer.deleteInventory(data).subscribe(
(res)=>{ (res)=>{
if(res.errCode == 10000){ if(res.errCode == 10000){
......
...@@ -59,7 +59,7 @@ export class PararmsComponent implements OnInit { ...@@ -59,7 +59,7 @@ export class PararmsComponent implements OnInit {
//删除分类 //删除分类
deleteItem(item){ deleteItem(item){
this.commomSer.deleteThing("确定删除该分类?",()=>{ this.commomSer.confirmThing("删除","确定删除该分类?",()=>{
const data = { const data = {
ids:[] ids:[]
}; };
......
...@@ -29,6 +29,8 @@ export class EventComponent implements OnInit { ...@@ -29,6 +29,8 @@ export class EventComponent implements OnInit {
} }
initForm() { initForm() {
this.fileList = [];
this.operatorsList = [];
this.validateForm = this.fb.group( this.validateForm = this.fb.group(
{ {
title: [null, [Validators.required]], title: [null, [Validators.required]],
......
...@@ -123,7 +123,7 @@ export class WorkHandleComponent implements OnInit { ...@@ -123,7 +123,7 @@ export class WorkHandleComponent implements OnInit {
ids: [] ids: []
}; };
arr.ids.push(data.id); arr.ids.push(data.id);
this.commonSer.deleteThing('确定删除该事件', () => { this.commonSer.confirmThing("删除",'确定删除该事件', () => {
this.workSer.deleteEvent(arr).subscribe( this.workSer.deleteEvent(arr).subscribe(
(res) => { (res) => {
if (res.errCode == 10000) { if (res.errCode == 10000) {
......
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