Newer
Older
import {Component, OnInit} from '@angular/core';
import {SystemService} from '../system.service';
import {pageSize} from '../../app.constants';
import {NzMessageService} from 'ng-zorro-antd';
import {CommonService} from '../../shared/common/common.service';
import {LayoutService} from '../../layouts/layout.service';
selector: 'jhi-examine',
templateUrl: './examine.component.html',
styles: []
//已审批
pageNoAlready = 1;
totalNumAlready;
areadyList = [];
//未审批
pageNoNo = 1;
totalNumNo;
noList = [];
allChecked = false;
indeterminate = false;
displayData: Array<{ id: string; checked: boolean }> = [];
selectList = [];
menuList = [];
roleType; //1.系统管理员 2.安全管理员 3。二者都有
constructor(private systemSer: SystemService, private message: NzMessageService, private commonSer: CommonService,
private layoutSer: LayoutService) {
currentPageDataChange($event: Array<{ id: string; checked: boolean }>): void {
const allChecked = this.displayData.every(value => value.checked === true);
const allUnChecked = this.displayData.every(value => !value.checked);
this.allChecked = allChecked;
this.indeterminate = (!allChecked) && (!allUnChecked);
}
checkAll(value: boolean): void {
this.displayData.forEach(data => {
};
this.systemSer.getApproveOfDone(data).subscribe(
(res) => {
this.areadyList = res.data.data;
this.totalNumAlready = res.data.totalCount;
this.noList = res.data.data;
this.totalNumNo = res.data.totalCount;
changeNoPage(e) {
if (e > 0) {
this.pageNoNo = e;
this.getListNo();
}
let arr = [];
this.displayData.forEach(e => {
if (e.checked) {
arr.push(e.id);
}
});
(res) => {
if (res.errCode == 10000) {
this.message.success('已通过');
let arr = [];
this.displayData.forEach(e => {
if (e.checked) {
arr.push(e.id);
}
});
(res) => {
if (res.errCode == 10000) {
this.message.success('退回成功');
let arr = [];
this.displayData.forEach(e => {
if (e.checked) {
arr.push(e.id);
}
});
(res) => {
if (res.errCode == 10000) {
this.message.success('撤回成功');