Browse Source

[修改]新增单位统计首页跳转最后一级页面传参修改

zhuzhou
chenjingyu 4 years ago
parent
commit
15727a778b
  1. 1
      src/app/key-unit/key-site-look/key-site.component.scss
  2. 12
      src/app/key-unit/key-unit-management/key-unit-management.component.ts
  3. 6
      src/app/plan-management/entry-plan-look/entry-plan-look.component.html
  4. 9
      src/app/statistic-analysis/addUnit/add-unit-one/add-unit-one.component.ts
  5. 7
      src/app/statistic-analysis/addUnit/add-unit-three-bar-details/add-unit-three-bar-details.component.ts
  6. 2
      src/app/statistic-analysis/addUnit/add-unit-three-line-details/add-unit-three-line-details.component.ts
  7. 8
      src/app/statistic-analysis/addUnit/add-unit-two-time/add-unit-two-time.component.ts
  8. 5
      src/app/statistic-analysis/addUnit/add-unit-two-type-details/add-unit-two-type-details.component.ts
  9. 6
      src/app/statistic-analysis/addUnit/add-unit-two-type-statistics/add-unit-two-type-statistics.component.ts
  10. 4
      src/app/statistic-analysis/all-plan/all-plan.component.ts
  11. 6
      src/app/statistic-analysis/buildingType/building-type-one/building-type-one.component.ts
  12. 7
      src/app/statistic-analysis/buildingType/building-type-three-details/building-type-three-details.component.ts
  13. 3
      src/app/statistic-analysis/buildingType/building-type-two-reverse/building-type-two-reverse.component.ts

1
src/app/key-unit/key-site-look/key-site.component.scss

@ -1,3 +1,4 @@
.content {
width: 100%;
height: 100%;

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

@ -59,7 +59,7 @@ export class KeyUnitManagementComponent implements OnInit {
//表头排序
sortData (e) {
let data = this.tabledataSource.filteredData;
console.log(data.filteredData)
//console.log(data.filteredData)
// data.filteredData.forEach(element => {
// if(element.key.indexOf(".") != -1){
// let typeArr = element.key.split('.')
@ -431,8 +431,6 @@ export class KeyUnitManagementComponent implements OnInit {
//勾选框事件
verifyState //判断是否可以修改
checkChange(e,element){
console.log(e)
console.log(element)
if(element.contentVerify!=null){
this.verifyState=element.contentVerify.verifyState
@ -534,7 +532,7 @@ export class KeyUnitManagementComponent implements OnInit {
const config = new MatSnackBarConfig();
config.verticalPosition = 'top';
config.duration = 3000
console.log(this.deleteAll)
//console.log(this.deleteAll)
if(this.verifyState==0||this.verifyState==3){
this.snackBar.open('审核中,不能删除','确定',config);
}else{
@ -574,7 +572,7 @@ export class KeyUnitManagementComponent implements OnInit {
}
}else if(this.deleteAll.length > 1){
let isTrue = confirm('您确定要提交删除审核吗')
let isTrue = confirm('重点单位删除需审核员审核,审核通过方可删除')
if(isTrue){
for(var i=0;i<this.deleteAll.length;i++ ){
let body:any = {
@ -586,7 +584,7 @@ export class KeyUnitManagementComponent implements OnInit {
}
this.deleteAudia.push(body)
}
console.log(this.deleteAudia)
this.http.post(`/api/ContentVerifies/Batch`,this.deleteAudia).subscribe(data=>{
this.snackBar.open('操作成功','确定',config);
this.getAllKeyUnit()
@ -748,7 +746,6 @@ export class KeyUnitManagementComponent implements OnInit {
}
//审核结果
auditResult(element){
// console.log(element)
const dialogRef = this.dialog.open(companyAuditResult, {
width:"400px",
//height:"300px",
@ -866,7 +863,6 @@ export class upname{
id:this.oldid,
name: this.unitname
}
console.log(paramsdata)
this.http.put(`/api/Companies/${this.oldid}/UpdateName`,paramsdata).subscribe((data:any)=>{
this.snackBar.open("修改名字成功",'确定',config);
},err => {

6
src/app/plan-management/entry-plan-look/entry-plan-look.component.html

@ -4,7 +4,7 @@
* @Author: sueRimn
* @Date: 2020-12-24 10:59:48
* @LastEditors: sueRimn
* @LastEditTime: 2021-03-20 16:29:51
* @LastEditTime: 2021-03-22 10:56:29
-->
<!-- <p>录入预案</p> -->
<div class="header" style="position: relative;">
@ -74,13 +74,13 @@
<ng-container *ngIf="isoperation == 'true'" matColumnDef="operation">
<th mat-header-cell *matHeaderCellDef>操作</th>
<td mat-cell *matCellDef="let element">
<span (click)="changeName(element)" *ngIf="element.auditStatus == !0||element.auditStatus == !3">改名</span>
<span (click)="changeName(element)" *ngIf="element.auditStatus!=0||element.auditStatus!=3">改名</span>
<span (click)="editPlan(element)" [ngClass]="{'grey': element.planMode == '0' || element.planMode == '3' || element.auditStatus == '1' || element.auditStatus == '2'}">编辑</span>
<span (click)="lookPlan(element)">查看</span>
<span (click)="readFile(element)" [ngClass]="{'grey': element.planMode == '1' || element.planMode == '2' || element.planMode == '3'}">下载</span>
<span (click)="deletePlan(element)">删除</span>
<span (click)="auditResult(element)">审批结果</span>
<span (click)="submitAudit(element)" *ngIf="element.auditStatus == 8 || element.auditStatus == 2 || element.auditStatus == 4" [ngClass]="{'grey': element.auditStatus == '2'}">提交审核</span>
<span (click)="submitAudit(element)" *ngIf="element.auditStatus == 8 || element.auditStatus == 2 || element.auditStatus == 4" >提交审核</span>
<span (click)="cancelAudit(element)" *ngIf="element.auditStatus == 1">撤销审核</span>
</td>
</ng-container>

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

@ -20,7 +20,7 @@ export class AddUnitOneComponent implements OnInit {
this.echartsData.getData(null,`/api/StatisticsAnalysis/Companies`)
this.setTimeoutObj = window.setTimeout(()=>{
this.tabledata=JSON.parse(JSON.stringify(this.echartsData.allDate))
console.log(this.tabledata)
//console.log(this.tabledata)
this.initCharts("pieone")
this.initCharts("pietwo")
},1000)
@ -80,7 +80,6 @@ export class AddUnitOneComponent implements OnInit {
tooltip: {
trigger: 'item',
formatter: (params)=>{
console.log(params)
return tid=="pieone"?this.biaogeTishi(params.data,'one'):this.biaogeTishi(params.data,'two')
//return this.echartsData.tableTooltip(tid=="pieone"?this.echartsData.buildingType:this.echartsData.tableDataZhi,params.name)
},
@ -136,7 +135,7 @@ export class AddUnitOneComponent implements OnInit {
this.router.navigate(['/statisticanalysis/addUnit_one/addUnit_two_type'],{queryParams:{'level':params.name,'id':params.data.id}});
}else{
//中队跳转
this.router.navigate(['/statisticanalysis/CompangInfo'],{queryParams:{'name':params.name,'type':1}});
this.router.navigate(['/statisticanalysis/CompangInfo'],{queryParams:{'name':params.name,'type':1,'buildid':tid!="pieone"?params.data.id:'','jsid':tid=="pieone"?params.data.id:''}});
}
@ -146,7 +145,7 @@ export class AddUnitOneComponent implements OnInit {
res
tishiData
biaogeTishi(datas,type){
console.log(datas)
//console.log(datas)
this.res=''
this.tishiData=''
if(type=='two'){
@ -163,7 +162,7 @@ export class AddUnitOneComponent implements OnInit {
}
}
console.log(this.tishiData)
//console.log(this.tishiData)
var countall=0//总计
var countbi=0//站比
var allCountbi=0//总站比

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

@ -38,7 +38,7 @@ export class AddUnitThreeBarDetailsComponent implements OnInit {
this.serviceData.getData(paramsdata,`/api/StatisticsAnalysis/Companies/BuildingTypes/${this.buildId}`)
this.setTimeoutObj = window.setTimeout(()=>{
this.tabledata=JSON.parse(JSON.stringify(this.serviceData.allDate))
console.log(this.tabledata)
//console.log(this.tabledata)
for(var i=0;i<this.tabledata[0].organizations.length;i++){
this.zhiNameData.push(this.tabledata[0].organizations[i].organizationName)
this.zhiNumData.push(this.tabledata[0].organizations[i].count)
@ -172,10 +172,8 @@ export class AddUnitThreeBarDetailsComponent implements OnInit {
const pointInPixel= [params.offsetX, params.offsetY];
if (this.detailPlanEchart.containPixel('grid',pointInPixel)){
let xIndex=this.detailPlanEchart.convertFromPixel({seriesIndex:0},[params.offsetX, params.offsetY])[0];
console.log(this.organizationId,this.option.xAxis.id)
if(this.serviceData.level=="0"&&this.tiao==false&&this.tabledata[0].organizations[xIndex].subOrganizations.length>=1){
//总队不跳
console.log(params)
this.zhiNameData=[]
this.zhiNumData=[]
this.organizationId=[]
@ -187,7 +185,7 @@ export class AddUnitThreeBarDetailsComponent implements OnInit {
this.serviceData.getData(paramsdata,`/api/StatisticsAnalysis/Companies/BuildingTypes/${this.buildId}`)
this.setTimeoutObj = window.setTimeout(()=>{
this.tabledata=JSON.parse(JSON.stringify(this.serviceData.allDate))
console.log(this.tabledata)
//console.log(this.tabledata)
for(var i=0;i<this.tabledata[0].organizations.length;i++){
this.zhiNameData.push(this.tabledata[0].organizations[i].organizationName)
this.zhiNumData.push(this.tabledata[0].organizations[i].count)
@ -204,7 +202,6 @@ export class AddUnitThreeBarDetailsComponent implements OnInit {
},1000)
this.tiao=true
}else{
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],'buildid':this.buildId}});
}
}

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

@ -53,7 +53,7 @@ export class AddUnitThreeLineDetailsComponent implements OnInit {
this.serviceData.getData(this.serviceData.zuzhiorBuilding=='zhi'?parbuild:parzhi,`/api/StatisticsAnalysis`)
this.setTimeoutObj = window.setTimeout(() => {
this.tabledata=JSON.parse(JSON.stringify(this.serviceData.allDate))
console.log(this.tabledata)
//console.log(this.tabledata)
for(var i=0;i<this.tabledata[0].companyStatistics.trendStatistics.added.length;i++){
if(this.tabledata[0].companyStatistics.trendStatistics.added[i].month>=this.serviceData.selectStartMonth||this.tabledata[0].companyStatistics.trendStatistics.added[i].month<=this.serviceData.selectEndMonth){
this.date.push(this.tabledata[0].companyStatistics.trendStatistics.added[i].month)

8
src/app/statistic-analysis/addUnit/add-unit-two-time/add-unit-two-time.component.ts

@ -19,7 +19,6 @@ export class AddUnitTwoTimeComponent implements OnInit {
tabledata
zongcount=0
ngOnInit(): void {
console.log(this.serviceData.zuzhiorBuilding)
this.serviceData.selectType=0
this.dateInit ()
this.route.queryParams.subscribe(param=>{
@ -53,7 +52,7 @@ export class AddUnitTwoTimeComponent implements OnInit {
this.serviceData.getData(this.serviceData.zuzhiorBuilding=='zhi'?parbuild:parzhi,`/api/StatisticsAnalysis`)
this.setTimeoutObj = window.setTimeout(() => {
this.tabledata=JSON.parse(JSON.stringify(this.serviceData.allDate))
console.log(this.tabledata)
//console.log(this.tabledata)
for(var i=0;i<this.tabledata[0].companyStatistics.trendStatistics.added.length;i++){
if(this.tabledata[0].companyStatistics.trendStatistics.added[i].month>=this.serviceData.selectStartMonth||this.tabledata[0].companyStatistics.trendStatistics.added[i].month<=this.serviceData.selectEndMonth){
this.date.push(this.tabledata[0].companyStatistics.trendStatistics.added[i].month)
@ -95,7 +94,7 @@ export class AddUnitTwoTimeComponent implements OnInit {
monthSubmit (e) {
this.serviceData.selectStartMonth=this.selectStartMonth
this.serviceData.selectEndMonth=this.selectEndMonth
console.log(this.selectStartMonth,this.selectEndMonth)
//console.log(this.selectStartMonth,this.selectEndMonth)
this.date=[]
this.dateNum=[]
this.zongcount=0
@ -109,7 +108,6 @@ export class AddUnitTwoTimeComponent implements OnInit {
this.zongcount=this.zongcount+this.tabledata[0].companyStatistics.trendStatistics.added[i].count
}
}
console.log(this.dateNum)
//this.oneInit (this.date,this.dateNum)
this.tiaoshiPao=this.serviceData.qipao(this.tiaoshiPao,this.dateNum,this.date)
this.twoInit (this.date,this.dateNum,'month')
@ -153,7 +151,7 @@ export class AddUnitTwoTimeComponent implements OnInit {
this.serviceData.getData(paramdata,`/api/StatisticsAnalysis`)
this.setTimeoutObj = window.setTimeout(() => {
this.tabledata=JSON.parse(JSON.stringify(this.serviceData.allDate))
console.log(this.tabledata)
//console.log(this.tabledata)
for(var i=0;i<this.tabledata[0].companyStatistics.trendStatistics.added.length;i++){
this.dateNum2.push(this.tabledata[0].companyStatistics.trendStatistics.added[0].count)
this.zongcount=this.zongcount+this.tabledata[0].companyStatistics.trendStatistics.added[i].count

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

@ -46,7 +46,7 @@ export class AddUnitTwoTypeDetailsComponent implements OnInit {
this.echartsData.getData(paramsdata,`/api/StatisticsAnalysis/Companies/BuildingTypes/${this.echartsData.zuzhiorBuilding=='zhi'?this.canshuId:this.lastId}`)
this.setTimeoutObj = window.setTimeout(()=>{
this.tabledata=JSON.parse(JSON.stringify(this.echartsData.allDate))
console.log(this.tabledata)
//console.log(this.tabledata)
for(var i=0;i<this.tabledata[0].organizations.length;i++){
this.zhongNameData.push(this.tabledata[0].organizations[i].organizationName)
this.zhongNumData.push(this.tabledata[0].organizations[i].count)
@ -76,7 +76,6 @@ export class AddUnitTwoTypeDetailsComponent implements OnInit {
tiaoshiPao:any
//气泡提示数据获取
bianli(){
console.log(this.zhongNumData)
if(this.zhongNumData.length>=1){
var arrshuzu='[';
for(var i=0;i<this.zhongNumData.length;i++){
@ -160,7 +159,7 @@ export class AddUnitTwoTypeDetailsComponent implements OnInit {
//总队和支队跳转
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{
this.router.navigate(['/statisticanalysis/CompangInfo'],{queryParams:{'name':option.xAxis.data[xIndex],'type':1,'jsid':option.xAxis.id[xIndex],'buildid':this.lastId}});
this.router.navigate(['/statisticanalysis/CompangInfo'],{queryParams:{'name':option.xAxis.data[xIndex],'type':1,'jsid':option.xAxis.id[xIndex],'buildid':this.echartsData.zuzhiorBuilding=='zhi'?this.canshuId:this.lastId}});
}
}

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

@ -36,7 +36,7 @@ export class AddUnitTwoTypeStatisticsComponent implements OnInit {
this.data.getData(this.data.zuzhiorBuilding=="zhi"?paramsdata:null,this.data.zuzhiorBuilding=="zhi"?`/api/StatisticsAnalysis/Companies/Organizations/${this.lastId}`:`/api/StatisticsAnalysis/Companies/BuildingTypes/${this.lastId}`)
this.setTimeoutObj = window.setTimeout(()=>{
this.tabledata=JSON.parse(JSON.stringify(this.data.allDate))
console.log(this.tabledata)
//console.log(this.tabledata)
if(this.data.zuzhiorBuilding=="zhi"){
for(var i=0;i<this.tabledata[0].buildingTypes.length;i++){
this.buildingData.push(this.tabledata[0].buildingTypes[i].buildingTypeName)
@ -302,6 +302,10 @@ export class AddUnitTwoTypeStatisticsComponent implements OnInit {
textStyle: {
fontSize: 30
}
},
grid: {
top: 90,
bottom: 30
},
xAxis: {
id:this.data.zuzhiorBuilding=="zhi"?this.buildingTypeId:this.organizationId,

4
src/app/statistic-analysis/all-plan/all-plan.component.ts

@ -4,7 +4,7 @@
* @Author: sueRimn
* @Date: 2021-03-15 11:32:30
* @LastEditors: sueRimn
* @LastEditTime: 2021-03-20 15:56:38
* @LastEditTime: 2021-03-22 10:44:47
*/
import { Component, OnInit, ViewChild, Inject } from '@angular/core';
import { HttpClient } from '@angular/common/http'
@ -79,7 +79,6 @@ export class AllPlanComponent implements OnInit {
//查看详情
lookPlan(e){
if(e.planMode == 0){
console.log(e.attachmentUrls)
var index=e.attachmentUrls[0].indexOf("\/")
if(e.attachmentUrls[0].substr(0,index)=='psw'){
const dialogRef = this.dialog.open(PsViewer, {
@ -156,7 +155,6 @@ export class AllPlanComponent implements OnInit {
export class PsViewer{
constructor(private router:Router,private http: HttpClient,public dialog: MatDialog,public snackBar: MatSnackBar,public dialogRef: MatDialogRef<PsViewer>,@Inject(MAT_DIALOG_DATA) public data: any) {}
ngOnInit(): void {
console.log(this.data)
const viewer = new Viewer({
container: document.querySelector('#viewer'),
panorama:'/api/Objects/PlanPlatform/'+ this.data,

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

@ -32,7 +32,7 @@ export class BuildingTypeOneComponent implements OnInit {
tabledata
initCharts(){
this.tabledata=JSON.parse(JSON.stringify(this.echartsData.allDate))
console.log(this.tabledata)
//console.log(this.tabledata)
for(var i=0;i<this.tabledata[0].buildingTypes.length;i++){
this.lengthdata.push(this.tabledata[0].buildingTypes[i].buildingTypeName)
this.count=this.count+this.tabledata[0].buildingTypes[i].count
@ -40,7 +40,7 @@ export class BuildingTypeOneComponent implements OnInit {
}
//JSON.parse(JSON.stringify(this.indexData).replace(/buildingTypeName/g, 'name'))
this.indexData=this.indexData.map(v=>{return {name: v.buildingTypeName,value:v.count,id:v.buildingTypeId}})
console.log(this.indexData)
//console.log(this.indexData)
this.indexBzt = echarts.init(document.getElementById('indexBzt'),'walden');
let options={
title: {
@ -123,13 +123,11 @@ export class BuildingTypeOneComponent implements OnInit {
tishiData
res:string
biaogeTishiZhi(datas){
console.log(datas,this.tabledata)
for(var a in this.tabledata.buildingTypes){
if(this.tabledata.buildingTypes[a].buildingTypeId==datas.id){
this.tishiData=this.tabledata.buildingTypes[a].organizations
}
}
console.log(this.tishiData)
var countall=0//总计
var countbi=0//站比
var allCountbi=0//总站比

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

@ -43,7 +43,7 @@ export class BuildingTypeThreeDetailsComponent implements OnInit {
this.echartsData.getData(paramsdata,`/api/StatisticsAnalysis/Companies/BuildingTypes/${this.buildingTypeId}`)
window.setTimeout(()=>{
this.tabledata=JSON.parse(JSON.stringify(this.echartsData.allDate))
console.log(this.tabledata)
//console.log(this.tabledata)
for(var i=0;i<this.tabledata[0].organizations.length;i++){
this.zhongNameData.push(this.tabledata[0].organizations[i].organizationName)
this.zhongNumData.push(this.tabledata[0].organizations[i].count)
@ -140,7 +140,6 @@ export class BuildingTypeThreeDetailsComponent implements OnInit {
/*事件处理代码书写位置*/
if(this.echartsData.level=="0"&&this.tiao==false&&this.tabledata[0].organizations[xIndex].subOrganizations.length>=1){
//总队不跳转
console.log(params)
this.zhongNameData=[]
this.zhongNumData=[]
this.organizationId=[]
@ -152,7 +151,7 @@ export class BuildingTypeThreeDetailsComponent implements OnInit {
this.echartsData.getData(paramsdatee,`/api/StatisticsAnalysis/Companies/BuildingTypes/${this.buildingTypeId}`)
window.setTimeout(()=>{
this.tabledata=JSON.parse(JSON.stringify(this.echartsData.allDate))
console.log(this.tabledata)
//console.log(this.tabledata)
for(var i=0;i<this.tabledata[0].organizations.length;i++){
this.zhongNameData.push(this.tabledata[0].organizations[i].organizationName)
this.zhongNumData.push(this.tabledata[0].organizations[i].count)
@ -184,13 +183,11 @@ export class BuildingTypeThreeDetailsComponent implements OnInit {
tishiData
res
tableTooltip(datas:any){
console.log(datas)
for(var a in this.echartsData.obdata[0].organizations){
if(this.echartsData.obdata[0].organizations[a].organizationName==datas.name){
this.tishiData=this.echartsData.obdata[0].organizations[a].subOrganizations
}
}
console.log(this.tishiData)
var countall=0//总计
var countbi=0//站比
var allCountbi=0//总站比

3
src/app/statistic-analysis/buildingType/building-type-two-reverse/building-type-two-reverse.component.ts

@ -296,7 +296,6 @@ export class BuildingTypeTwoReverseComponent implements OnInit {
tooltip: {
trigger: 'item',
formatter: (params)=>{
console.log(params)
return this.tableTooltip(params)
},
position: this.data.tableTooltipNoShow2
@ -341,13 +340,11 @@ export class BuildingTypeTwoReverseComponent implements OnInit {
res
tishiData
tableTooltip(datas){
console.log(datas)
for(var a in this.data.obdata[0].organizations){
if(this.data.obdata[0].organizations[a].organizationName==datas.name){
this.tishiData=this.data.obdata[0].organizations[a].subOrganizations
}
}
console.log(this.tishiData)
var countall=0//总计
var countbi=0//站比
var allCountbi=0//总站比

Loading…
Cancel
Save