Commit e6f0f69c authored by wangqinghua's avatar wangqinghua

update

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