Browse Source

[修改]重点单位删除审核流程修改

zhuzhou
chenjingyu 4 years ago
parent
commit
360ed6ead9
  1. 4
      src/app/key-unit/key-unit-management/key-unit-management.component.html
  2. 78
      src/app/key-unit/key-unit-management/key-unit-management.component.ts
  3. 9
      src/app/statistic-analysis/addUnit/add-unit-one/add-unit-one.component.ts
  4. 2
      src/app/statistic-analysis/addUnit/add-unit-three-bar-details/add-unit-three-bar-details.component.ts
  5. 3
      src/app/statistic-analysis/addUnit/add-unit-two-type-details/add-unit-two-type-details.component.ts
  6. 15
      src/app/statistic-analysis/addUnit/add-unit-two-type-statistics/add-unit-two-type-statistics.component.ts
  7. 13
      src/app/statistic-analysis/buildingType/building-type-one/building-type-one.component.ts
  8. 2
      src/app/statistic-analysis/buildingType/building-type-three-details/building-type-three-details.component.ts
  9. 5
      src/app/statistic-analysis/echarts-data.service.ts
  10. 4
      src/app/statistic-analysis/state/page-one/page-one.component.ts

4
src/app/key-unit/key-unit-management/key-unit-management.component.html

@ -95,7 +95,7 @@
<div class="buttonbox"> <div class="buttonbox">
<button type="button" mat-raised-button color="primary" (click)="createunit()">新增</button> <button type="button" mat-raised-button color="primary" (click)="createunit()">新增</button>
<button type="button" mat-raised-button color="primary" (click)="editunit()">修改</button> <button type="button" mat-raised-button color="primary" (click)="editunit()">修改</button>
<button type="button" mat-raised-button color="warn" (click)="deleteunit()">删除</button> <button type="button" mat-raised-button color="warn" (click)="deleteunit()">删除审核</button>
</div> </div>
<div class="tablebox"> <div class="tablebox">
@ -104,7 +104,7 @@
<th mat-header-cell *matHeaderCellDef> <th mat-header-cell *matHeaderCellDef>
</th> </th>
<td mat-cell *matCellDef="let element"> <td mat-cell *matCellDef="let element">
<mat-checkbox color="primary" (change)="checkChange($event,element)" [disabled]="element.contentVerify!=null&&(element.contentVerify.verifyState==0||element.contentVerify.verifyState==3)" (click)='checkClick(element)'></mat-checkbox> <mat-checkbox color="primary" (change)="checkChange($event,element)" [disabled]="element.contentVerify!=null&&(element.contentVerify.verifyState==0||element.contentVerify.verifyState==3)" (click)='checkClick(element,$event)'></mat-checkbox>
</td> </td>
</ng-container> </ng-container>
<ng-container matColumnDef="Follow"> <ng-container matColumnDef="Follow">

78
src/app/key-unit/key-unit-management/key-unit-management.component.ts

@ -430,16 +430,30 @@ export class KeyUnitManagementComponent implements OnInit {
//勾选框事件 //勾选框事件
verifyState //判断是否可以修改 verifyState //判断是否可以修改
checkChange(e,element){ checkChange(e,element){
console.log(e)
console.log(element) console.log(element)
if(element.contentVerify!=null){ if(element.contentVerify!=null){
this.verifyState=element.contentVerify.verifyState this.verifyState=element.contentVerify.verifyState
}else{ }else{
this.verifyState=null this.verifyState=null
} }
if(e.checked){
//this.deleteArr=element
this.deleteAll.push(element)
}else{
for(var i=0;i<this.deleteAll.length;i++ ){
if(this.deleteAll[i].id==element.id){
this.deleteAll.splice(i,1)
}
}
}
element.checked = e.checked element.checked = e.checked
} }
checkClick(element){ deleteArr//单个删除
deleteAll=[]//批量删除
checkClick(element,e){
if(element.contentVerify!=null){ if(element.contentVerify!=null){
if(element.contentVerify.verifyState==0||element.contentVerify.verifyState==3){ if(element.contentVerify.verifyState==0||element.contentVerify.verifyState==3){
const config = new MatSnackBarConfig(); const config = new MatSnackBarConfig();
@ -448,6 +462,9 @@ export class KeyUnitManagementComponent implements OnInit {
this.snackBar.open('该单位正在审核不能选中','确定',config); this.snackBar.open('该单位正在审核不能选中','确定',config);
} }
}else{
this.deleteArr=element
} }
} }
//编辑单位信息 //编辑单位信息
@ -510,11 +527,14 @@ export class KeyUnitManagementComponent implements OnInit {
}) })
} }
//删除单位信息 //删除单位信息
deleteAudia=[]//批量删除提交数组
deleteunit(){ deleteunit(){
if(this.verifyState==0||this.verifyState==3){ this.deleteAudia=[]
const config = new MatSnackBarConfig(); const config = new MatSnackBarConfig();
config.verticalPosition = 'top'; config.verticalPosition = 'top';
config.duration = 3000 config.duration = 3000
console.log(this.deleteAll)
if(this.verifyState==0||this.verifyState==3){
this.snackBar.open('审核中,不能删除','确定',config); this.snackBar.open('审核中,不能删除','确定',config);
}else{ }else{
let selectedunitArr = [] let selectedunitArr = []
@ -525,29 +545,54 @@ export class KeyUnitManagementComponent implements OnInit {
}); });
if(selectedunitArr.length == 0){ if(selectedunitArr.length == 0){
const config = new MatSnackBarConfig();
config.verticalPosition = 'top';
config.duration = 3000
this.snackBar.open('请先选择要删除的单位','确定',config); this.snackBar.open('请先选择要删除的单位','确定',config);
} }
if(selectedunitArr.length != 1 && selectedunitArr.length != 0){ /* if(selectedunitArr.length != 1 && selectedunitArr.length != 0){
const config = new MatSnackBarConfig(); const config = new MatSnackBarConfig();
config.verticalPosition = 'top'; config.verticalPosition = 'top';
config.duration = 3000 config.duration = 3000
this.snackBar.open('只能选择一个单位删除','确定',config); this.snackBar.open('只能选择一个单位删除','确定',config);
} } */
if(selectedunitArr.length == 1){ //带着id跳到删除页面 if(this.deleteAll.length == 1){ //带着id跳到删除页面
let isTrue = confirm('您确定要删除吗') let isTrue = confirm('您确定要提交删除审核吗')
if(isTrue){ if(isTrue){
this.http.delete(`/api/Companies/${selectedunitArr[0]}`).subscribe(data=>{ let body:any = {
const config = new MatSnackBarConfig(); title:this.deleteAll[0].name,
config.verticalPosition = 'top'; Operation:2,
config.duration = 3000 itemId:this.deleteAll[0].id,
this.snackBar.open('删除成功','确定',config); verifyState:3,
this.getAllKeyUnit(); contentType:11
}
this.http.post(`/api/ContentVerifies`,body).subscribe(data=>{
this.snackBar.open('操作成功','确定',config);
this.getAllKeyUnit()
},err=>{
this.snackBar.open(err,'确定',config);
}) })
} }
}else if(this.deleteAll.length > 1){
let isTrue = confirm('您确定要提交删除审核吗')
if(isTrue){
for(var i=0;i<this.deleteAll.length;i++ ){
let body:any = {
title:this.deleteAll[i].name,
Operation:2,
itemId:this.deleteAll[i].id,
verifyState:3,
contentType:11
}
this.deleteAudia.push(body)
}
console.log(this.deleteAudia)
this.http.post(`/api/ContentVerifies/Batch`,this.deleteAudia).subscribe(data=>{
this.snackBar.open('操作成功','确定',config);
this.getAllKeyUnit()
},err=>{
this.snackBar.open(err,'确定',config);
})
}
} }
} }
@ -844,7 +889,7 @@ export class companyAuditResult{
createTime='' createTime=''
organizationName=this.data.element.organizationName organizationName=this.data.element.organizationName
verifyTime='' verifyTime=''
remark=this.data.element.contentVerify.remark remark=''
verifyOrganizationName verifyOrganizationName
verifyState=100 verifyState=100
ngOnInit(): void { ngOnInit(): void {
@ -855,6 +900,7 @@ export class companyAuditResult{
//this.remark=this.data.element.remark //this.remark=this.data.element.remark
this.verifyState=this.data.element.contentVerify.verifyState this.verifyState=this.data.element.contentVerify.verifyState
this.verifyOrganizationName=this.data.element.contentVerify.verifyOrganizationName this.verifyOrganizationName=this.data.element.contentVerify.verifyOrganizationName
this.remark=this.data.element.contentVerify.remark
} }
} }
onNoClick(): void { onNoClick(): void {

9
src/app/statistic-analysis/addUnit/add-unit-one/add-unit-one.component.ts

@ -120,7 +120,8 @@ export class AddUnitOneComponent implements OnInit {
] ]
}; };
this.indexBzt.on('click', (params) => { this.indexBzt.on('click', (params) => {
if(this.echartsData.level=='0'||this.echartsData.level=='1'||this.echartsData.level=='2'){ tid=="pieone"?this.echartsData.zuzhiorBuilding="zhi":this.echartsData.zuzhiorBuilding="building"
if((this.echartsData.level=='0'||this.echartsData.level=='1'||this.echartsData.level=='2')&&this.tishiData.length>0){
//总队,支队,大队跳转 //总队,支队,大队跳转
this.router.navigate(['/statisticanalysis/addUnit_one/addUnit_two_type'],{queryParams:{'level':params.name,'id':params.data.id}}); this.router.navigate(['/statisticanalysis/addUnit_one/addUnit_two_type'],{queryParams:{'level':params.name,'id':params.data.id}});
}else{ }else{
@ -128,7 +129,7 @@ export class AddUnitOneComponent implements OnInit {
this.router.navigate(['/statisticanalysis/CompangInfo'],{queryParams:{'name':params.name,'type':1}}); this.router.navigate(['/statisticanalysis/CompangInfo'],{queryParams:{'name':params.name,'type':1}});
} }
tid=="pieone"?this.echartsData.zuzhiorBuilding="zhi":this.echartsData.zuzhiorBuilding="building"
}); });
this.indexBzt.setOption(options); this.indexBzt.setOption(options);
} }
@ -179,9 +180,13 @@ export class AddUnitOneComponent implements OnInit {
} }
this.res+='<td style="text-align:center;">'+this.tishiData[i].count+'</td>' this.res+='<td style="text-align:center;">'+this.tishiData[i].count+'</td>'
if(countall==0){
this.res+='<td style="text-align:center;">0%</td></tr>'
}else{
this.res+='<td style="text-align:center;">'+countbi+'%</td></tr>' this.res+='<td style="text-align:center;">'+countbi+'%</td></tr>'
} }
}
this.res+='</tbody>' this.res+='</tbody>'
this.res+='<tfoot style="font-size:18px;"><td style="text-align:center;">总计</td><td style="text-align:center;">'+countall+'</td><td style="text-align:center;">'+allCountbi.toFixed(2)+'%</td></tfoot>' this.res+='<tfoot style="font-size:18px;"><td style="text-align:center;">总计</td><td style="text-align:center;">'+countall+'</td><td style="text-align:center;">'+allCountbi.toFixed(2)+'%</td></tfoot>'
this.res+='</table></div></div>' this.res+='</table></div></div>'

2
src/app/statistic-analysis/addUnit/add-unit-three-bar-details/add-unit-three-bar-details.component.ts

@ -205,7 +205,7 @@ export class AddUnitThreeBarDetailsComponent implements OnInit {
this.tiao=true this.tiao=true
}else{ }else{
console.log(this.organizationId,this.option.xAxis.id) console.log(this.organizationId,this.option.xAxis.id)
this.router.navigate(['/statisticanalysis/CompangInfo'],{queryParams:{'name':this.option.xAxis.data[xIndex],'type':1,'jsid':this.option.xAxis.id[xIndex]}}); this.router.navigate(['/statisticanalysis/CompangInfo'],{queryParams:{'name':this.option.xAxis.data[xIndex],'type':1,'jsid':this.option.xAxis.id[xIndex],'buildid':this.buildId}});
} }
} }
/* if(this.serviceData.level == "1"){// /* if(this.serviceData.level == "1"){//

3
src/app/statistic-analysis/addUnit/add-unit-two-type-details/add-unit-two-type-details.component.ts

@ -155,11 +155,12 @@ export class AddUnitTwoTypeDetailsComponent implements OnInit {
const pointInPixel= [params.offsetX, params.offsetY]; const pointInPixel= [params.offsetX, params.offsetY];
if (this.detailPlanEchart.containPixel('grid',pointInPixel)){ if (this.detailPlanEchart.containPixel('grid',pointInPixel)){
let xIndex=this.detailPlanEchart.convertFromPixel({seriesIndex:0},[params.offsetX, params.offsetY])[0]; let xIndex=this.detailPlanEchart.convertFromPixel({seriesIndex:0},[params.offsetX, params.offsetY])[0];
if((this.echartsData.level=='0'||this.echartsData.level=='1')&&this.tabledata[0].organizations[xIndex].subOrganizations.length>=1){ if((this.echartsData.level=='0'||this.echartsData.level=='1')&&this.tabledata[0].organizations[xIndex].subOrganizations.length>=1){
//总队和支队跳转 //总队和支队跳转
this.router.navigate(['/statisticanalysis/addUnit_one/addUnit_two_time/three_barDetails'],{queryParams:{'time':'','buildingTpye':option.xAxis.data[xIndex]+this.organizationName,'zhuid':option.xAxis.id[xIndex],'id':this.echartsData.zuzhiorBuilding=='zhi'?this.canshuId:this.lastId}}); this.router.navigate(['/statisticanalysis/addUnit_one/addUnit_two_time/three_barDetails'],{queryParams:{'time':'','buildingTpye':option.xAxis.data[xIndex]+this.organizationName,'zhuid':option.xAxis.id[xIndex],'id':this.echartsData.zuzhiorBuilding=='zhi'?this.canshuId:this.lastId}});
}else{ }else{
this.router.navigate(['/statisticanalysis/CompangInfo'],{queryParams:{'name':option.xAxis.data[xIndex],'type':1,'jsid':option.xAxis.id[xIndex]}}); this.router.navigate(['/statisticanalysis/CompangInfo'],{queryParams:{'name':option.xAxis.data[xIndex],'type':1,'jsid':option.xAxis.id[xIndex],'buildid':this.lastId}});
} }
} }

15
src/app/statistic-analysis/addUnit/add-unit-two-type-statistics/add-unit-two-type-statistics.component.ts

@ -353,13 +353,24 @@ export class AddUnitTwoTypeStatisticsComponent implements OnInit {
const pointInPixel= [params.offsetX, params.offsetY]; const pointInPixel= [params.offsetX, params.offsetY];
if (item.echart.containPixel('grid',pointInPixel)){ if (item.echart.containPixel('grid',pointInPixel)){
let xIndex=item.echart.convertFromPixel({seriesIndex:0},[params.offsetX, params.offsetY])[0]; let xIndex=item.echart.convertFromPixel({seriesIndex:0},[params.offsetX, params.offsetY])[0];
if(this.data.level=='0'||this.data.level=='1'){ if(this.data.zuzhiorBuilding=='zhi'){
if((this.data.level=='0'||this.data.level=='1')&&this.tabledata[0].buildingTypes[xIndex].organizations.length>=1){
//总队,支队跳转 //总队,支队跳转
this.router.navigate(['/statisticanalysis/addUnit_one/addUnit_two_typeDetails'],{queryParams:{'organizationName':option.xAxis.data[xIndex],'buildingTypeName':this.headname,'id':this.lastId,'zhuId':option.xAxis.id[xIndex]}}) this.router.navigate(['/statisticanalysis/addUnit_one/addUnit_two_typeDetails'],{queryParams:{'organizationName':option.xAxis.data[xIndex],'buildingTypeName':this.headname,'id':this.lastId,'zhuId':option.xAxis.id[xIndex]}})
} }
else{ else{
this.router.navigate(['/statisticanalysis/CompangInfo'],{queryParams:{'name':params.name,'type':1}}); this.router.navigate(['/statisticanalysis/CompangInfo'],{queryParams:{'name':option.xAxis.data[xIndex],'type':1,'jsid':this.lastId,'buildid':option.xAxis.id[xIndex]}});
} }
}else{
if((this.data.level=='0'||this.data.level=='1')&&this.tabledata[0].organizations[xIndex].subOrganizations.length>=1){
//总队,支队跳转
this.router.navigate(['/statisticanalysis/addUnit_one/addUnit_two_typeDetails'],{queryParams:{'organizationName':option.xAxis.data[xIndex],'buildingTypeName':this.headname,'id':this.lastId,'zhuId':option.xAxis.id[xIndex]}})
}
else{
this.router.navigate(['/statisticanalysis/CompangInfo'],{queryParams:{'name':option.xAxis.data[xIndex],'type':1,'jsid':option.xAxis.id[xIndex],'buildid':this.lastId}});
}
}
} }

13
src/app/statistic-analysis/buildingType/building-type-one/building-type-one.component.ts

@ -99,14 +99,21 @@ export class BuildingTypeOneComponent implements OnInit {
] ]
}; };
this.indexBzt.on('click', (params) => { this.indexBzt.on('click', (params) => {
if(this.echartsData.level=='0'||this.echartsData.level=='1'||this.echartsData.level=='2'){ var index=0
for(var i=0;i<this.tabledata[0].buildingTypes.length;i++){
if(this.tabledata[0].buildingTypes[i].buildingTypeName==params.name){
if((this.echartsData.level=='0'||this.echartsData.level=='1'||this.echartsData.level=='2')&&this.tabledata[0].buildingTypes[i].organizations.length>0){
//总队,支队,大队跳转 //总队,支队,大队跳转
this.router.navigate(['/statisticanalysis/buildingType_one/buildingType_two_reverse'],{queryParams:{'level':params.name,'id':params.data.id}}); this.router.navigate(['/statisticanalysis/buildingType_one/buildingType_two_reverse'],{queryParams:{'level':params.name,'id':params.data.id}});
}else if(this.echartsData.level=='3'){ }else {
//中队跳转 //中队跳转
this.router.navigate(['/statisticanalysis/CompangInfo'],{queryParams:{'name':params.name,'type':1,'buildid':params.id}}); this.router.navigate(['/statisticanalysis/CompangInfo'],{queryParams:{'name':params.name,'type':1,'buildid':params.data.id}});
}
}
} }
}); });
this.indexBzt.setOption(options); this.indexBzt.setOption(options);

2
src/app/statistic-analysis/buildingType/building-type-three-details/building-type-three-details.component.ts

@ -173,7 +173,7 @@ export class BuildingTypeThreeDetailsComponent implements OnInit {
this.tiao=true this.tiao=true
} }
else{ else{
this.router.navigate(['/statisticanalysis/CompangInfo'],{queryParams:{'name':option.xAxis.data[xIndex],'type':1,'jsid':option.xAxis.id[xIndex]}}); this.router.navigate(['/statisticanalysis/CompangInfo'],{queryParams:{'name':option.xAxis.data[xIndex],'type':1,'jsid':option.xAxis.id[xIndex],'buildid':this.buildingTypeId}});
} }
} }

5
src/app/statistic-analysis/echarts-data.service.ts

@ -407,7 +407,7 @@ export class EchartsDataService {
tishiData tishiData
localData localData
biaogeTishiZhi(datas){ biaogeTishiZhi(datas){
console.log(datas) //console.log(datas)
for(var a in this.obdata[0].buildingTypes){ for(var a in this.obdata[0].buildingTypes){
if(this.obdata[0].buildingTypes[a].buildingTypeName==datas.name){ if(this.obdata[0].buildingTypes[a].buildingTypeName==datas.name){
this.tishiData=this.obdata[0].buildingTypes[a].organizations this.tishiData=this.obdata[0].buildingTypes[a].organizations
@ -436,7 +436,6 @@ export class EchartsDataService {
this.res+='<td style="text-align:center;">'+this.tishiData[i].count+'</td>' this.res+='<td style="text-align:center;">'+this.tishiData[i].count+'</td>'
this.res+='<td style="text-align:center;">'+countbi+'%</td></tr>' this.res+='<td style="text-align:center;">'+countbi+'%</td></tr>'
} }
this.res+='</tbody>' this.res+='</tbody>'
this.res+='<tfoot style="font-size:18px;"><td style="text-align:center;">总计</td><td style="text-align:center;">'+countall+'</td><td style="text-align:center;">'+allCountbi.toFixed(2)+'%</td></tfoot>' this.res+='<tfoot style="font-size:18px;"><td style="text-align:center;">总计</td><td style="text-align:center;">'+countall+'</td><td style="text-align:center;">'+allCountbi.toFixed(2)+'%</td></tfoot>'
this.res+='</table></div></div>' this.res+='</table></div></div>'
@ -526,7 +525,7 @@ export class EchartsDataService {
}) })
} }
this.localData=localStorage.getItem('yuansuccesstishi') this.localData=localStorage.getItem('yuansuccesstishi')
}else{ }else if(datas.name='预案编制'){
this.localData='' this.localData=''
if(localStorage.getItem('yuanbiantishi')==undefined){ if(localStorage.getItem('yuanbiantishi')==undefined){
this.http.get(`/api/StatisticsAnalysis/Plans/Status`,{params:paramdata}).subscribe((data:any)=>{ this.http.get(`/api/StatisticsAnalysis/Plans/Status`,{params:paramdata}).subscribe((data:any)=>{

4
src/app/statistic-analysis/state/page-one/page-one.component.ts

@ -4,7 +4,7 @@
* @Author: sueRimn * @Author: sueRimn
* @Date: 2020-09-01 15:24:39 * @Date: 2020-09-01 15:24:39
* @LastEditors: sueRimn * @LastEditors: sueRimn
* @LastEditTime: 2021-03-17 10:30:24 * @LastEditTime: 2021-03-19 14:06:41
*/ */
import { Component, OnInit } from '@angular/core'; import { Component, OnInit } from '@angular/core';
import { Router } from '@angular/router'; import { Router } from '@angular/router';
@ -116,7 +116,7 @@ export class PageOneComponent implements OnInit {
let rawJwt = CryptoJS.enc.Base64.parse(jwt.split('.')[1]); let rawJwt = CryptoJS.enc.Base64.parse(jwt.split('.')[1]);
let identityJson = CryptoJS.enc.Utf8.stringify(rawJwt); let identityJson = CryptoJS.enc.Utf8.stringify(rawJwt);
let identityJsonparse=JSON.parse(identityJson) */ let identityJsonparse=JSON.parse(identityJson) */
if(this.echartsData.level=='0'||this.echartsData.level=='1'||this.echartsData.level=='2'){ if((this.echartsData.level=='0'||this.echartsData.level=='1'||this.echartsData.level=='2')&&this.echartsData.localData.length>0){
window.setTimeout(()=>{ window.setTimeout(()=>{
this.router.navigate(['/statisticanalysis/statePageOne/time'],{queryParams:{'level':params.name,'type':params.data.type}}); this.router.navigate(['/statisticanalysis/statePageOne/time'],{queryParams:{'level':params.name,'type':params.data.type}});
}) })

Loading…
Cancel
Save