Browse Source

[修改]一到五级预案新建权限添加

zhuzhou
chenjingyu 4 years ago
parent
commit
9f62d443d9
  1. 6
      src/app/plan-management/entry-plan-look/entry-plan-look.component.ts
  2. 16
      src/app/plan-management/entry-plan/entry-plan.component.ts
  3. 2
      src/app/plan-management/meet-plan/meet-plan.component.html
  4. 11
      src/app/plan-management/meet-plan/meet-plan.component.ts
  5. 4
      src/app/plan-management/onetwo-entry-plan/onetwo-entry-plan.component.html
  6. 13
      src/app/plan-management/onetwo-entry-plan/onetwo-entry-plan.component.ts
  7. 2
      src/app/plan-management/type-plan/type-plan.component.html
  8. 15
      src/app/plan-management/type-plan/type-plan.component.ts
  9. 56
      src/app/statistic-analysis/buildingType/building-type-one/building-type-one.component.ts
  10. 133
      src/app/statistic-analysis/buildingType/building-type-two-reverse/building-type-two-reverse.component.ts
  11. 8
      src/app/statistic-analysis/echarts-data.service.ts

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

@ -735,7 +735,7 @@ export class AddPlanone {
onlineedit:boolean = false //在线编辑
website:boolean = false //网页地址
next(formdata){
// console.log(formdata.value.firstCtrltwo)
//console.log(formdata.value.firstCtrlthree)
//console.log(this.file)
this.psw=false
this.selectedPLanName = formdata.value.firstCtrlone
@ -772,7 +772,7 @@ export class AddPlanone {
this.psw=false
}
closediv(){
console.log(this.file)
//console.log(this.file)
if(this.file!=undefined){
this.cancel();
}
@ -852,6 +852,7 @@ export class AddPlanone {
url: this.webaddress,
attachmentUrls: null
}
//console.log(body)
this.http.post("/api/PlanComponents",body,{params:{
companyId : this.data.companyId
}}).subscribe(data=>{
@ -928,6 +929,7 @@ export class AddPlanone {
url: this.webaddress,
attachmentUrls: null
}
//console.log(body)
this.http.post("/api/PlanComponents2D",body,{params:{
companyId : this.data.companyId
}}).subscribe(data=>{

16
src/app/plan-management/entry-plan/entry-plan.component.ts

@ -168,13 +168,14 @@ export class EntryPlanComponent implements OnInit {
style.width = (width/zong)*100 +'%';
return style
}
level
ngOnInit(): void {
this.getunitdata();
this.getOrganizations();
this.getUnittype();
this.getAllPlanInfo();
let level = sessionStorage.getItem("level");
if(level == "0"){//如果是总队
this.level = sessionStorage.getItem("level");
if(this.level == "0"){//如果是总队
this.preparelevels = [
{name:"总队",value:"1"},
{name:"支队",value:"2"},
@ -182,20 +183,20 @@ export class EntryPlanComponent implements OnInit {
{name:"中队",value:"8"}
]
}
if(level == "1"){//如果是支队
if(this.level == "1"){//如果是支队
this.preparelevels = [
{name:"支队",value:"2"},
{name:"大队",value:"4"},
{name:"中队",value:"8"}
]
}
if(level == "2"){//如果是大队
if(this.level == "2"){//如果是大队
this.preparelevels = [
{name:"大队",value:"4"},
{name:"中队",value:"8"}
]
}
if(level == "3"){//如果是中队
if(this.level == "3"){//如果是中队
this.preparelevels = [
{name:"中队",value:"8"}
]
@ -316,12 +317,13 @@ export class EntryPlanComponent implements OnInit {
})
}
operation=true
//查看预案按钮跳转
routerTo(element){
// console.log(element)
this.level=='0'?this.operation=false:true
sessionStorage.setItem("companyName",element.company.name)
window.open(`/planManagement/entryPlandetail?unitId=${element.company.id}&unitTypeId=${element.company.buildingTypes.length == 0 ? null :element.company.buildingTypes[0].id}&operation=true&pagetype=entryplan&unitName=${element.company.name}&orName=${element.company.organizationName}&unitType=${element.company.buildingTypes.length == 0 ? null :element.company.buildingTypes[0].name}&unitAdd=${element.company.address}`);
window.open(`/planManagement/entryPlandetail?unitId=${element.company.id}&unitTypeId=${element.company.buildingTypes.length == 0 ? null :element.company.buildingTypes[0].id}&operation=${this.operation}&pagetype=entryplan&unitName=${element.company.name}&orName=${element.company.organizationName}&unitType=${element.company.buildingTypes.length == 0 ? null :element.company.buildingTypes[0].name}&unitAdd=${element.company.address}`);
}
//查询
onSubmit (value) {

2
src/app/plan-management/meet-plan/meet-plan.component.html

@ -83,7 +83,7 @@
<mat-divider></mat-divider>
<div class="newadd">
<div>
<button mat-raised-button color="primary" (click)='addunit()'><img style="margin-bottom: 3px;" src="../../../assets/images/newadd.png"> 新增</button>
<button *ngIf="levels=='0'" mat-raised-button color="primary" (click)='addunit()'><img style="margin-bottom: 3px;" src="../../../assets/images/newadd.png"> 新增</button>
</div>
<div class="progressBox" style="margin-left: 100px;" *ngIf="downloadisLoading">

11
src/app/plan-management/meet-plan/meet-plan.component.ts

@ -20,8 +20,8 @@ export class MeetPlanComponent implements OnInit {
constructor(private http:HttpClient,private router:Router,private route:ActivatedRoute,private tree: TreeService,public dialog: MatDialog,public snackBar: MatSnackBar) { }
ngOnInit(): void {
let level = sessionStorage.getItem("level");
if(level == "0"){//如果是总队
this.levels = sessionStorage.getItem("level");
if(this.level == "0"){//如果是总队
this.preparelevels = [
{name:"总队",value:"1"},
{name:"支队",value:"2"},
@ -29,26 +29,27 @@ export class MeetPlanComponent implements OnInit {
{name:"中队",value:"8"}
]
}
if(level == "1"){//如果是支队
if(this.levels == "1"){//如果是支队
this.preparelevels = [
{name:"支队",value:"2"},
{name:"大队",value:"4"},
{name:"中队",value:"8"}
]
}
if(level == "2"){//如果是大队
if(this.levels == "2"){//如果是大队
this.preparelevels = [
{name:"大队",value:"4"},
{name:"中队",value:"8"}
]
}
if(level == "3"){//如果是中队
if(this.levels == "3"){//如果是中队
this.preparelevels = [
{name:"中队",value:"8"}
]
}
this.getAlltabledate()
}
levels
preparelevels:any
plcheck:boolean //编制级别勾选框

4
src/app/plan-management/onetwo-entry-plan/onetwo-entry-plan.component.html

@ -4,7 +4,7 @@
* @Author: sueRimn
* @Date: 2020-12-24 14:15:10
* @LastEditors: sueRimn
* @LastEditTime: 2021-01-27 16:55:08
* @LastEditTime: 2021-02-05 15:09:48
-->
<div style="height: 100%;overflow-y: auto;">
<div class="header" >
@ -83,7 +83,7 @@
<mat-divider></mat-divider>
<div class="newadd">
<div>
<button mat-raised-button color="primary" (click)="addunit()"><img style="margin-bottom: 3px;" src="../../../assets/images/newadd.png"> 新增</button>
<button *ngIf="levels=='0'||levels=='1'" mat-raised-button color="primary" (click)="addunit()"><img style="margin-bottom: 3px;" src="../../../assets/images/newadd.png"> 新增</button>
</div>
<div class="progressBox" style="margin-left: 100px;" *ngIf="downloadisLoading">

13
src/app/plan-management/onetwo-entry-plan/onetwo-entry-plan.component.ts

@ -4,7 +4,7 @@
* @Author: sueRimn
* @Date: 2020-12-24 14:15:10
* @LastEditors: sueRimn
* @LastEditTime: 2021-02-04 10:01:46
* @LastEditTime: 2021-02-05 14:52:32
*/
import { Component, OnInit, ViewChild, Inject } from '@angular/core';
import { HttpClient } from '@angular/common/http'
@ -33,8 +33,8 @@ export class OnetwoEntryPlanComponent implements OnInit {
constructor(private http:HttpClient,private router:Router,private route:ActivatedRoute,private tree: TreeService,public dialog: MatDialog,public snackBar: MatSnackBar) { }
ngOnInit(): void {
let level = sessionStorage.getItem("level");
if(level == "0"){//如果是总队
this.levels = sessionStorage.getItem("level");
if(this.levels == "0"){//如果是总队
this.preparelevels = [
{name:"总队",value:"1"},
{name:"支队",value:"2"},
@ -42,20 +42,20 @@ export class OnetwoEntryPlanComponent implements OnInit {
{name:"中队",value:"8"}
]
}
if(level == "1"){//如果是支队
if(this.levels == "1"){//如果是支队
this.preparelevels = [
{name:"支队",value:"2"},
{name:"大队",value:"4"},
{name:"中队",value:"8"}
]
}
if(level == "2"){//如果是大队
if(this.levels == "2"){//如果是大队
this.preparelevels = [
{name:"大队",value:"4"},
{name:"中队",value:"8"}
]
}
if(level == "3"){//如果是中队
if(this.levels == "3"){//如果是中队
this.preparelevels = [
{name:"中队",value:"8"}
]
@ -64,6 +64,7 @@ export class OnetwoEntryPlanComponent implements OnInit {
this.getAlltabledate()
}
levels
url
preparelevels:any
plcheck:boolean //编制级别勾选框

2
src/app/plan-management/type-plan/type-plan.component.html

@ -62,7 +62,7 @@
<mat-divider></mat-divider>
<div class="newadd">
<div>
<button mat-raised-button color="primary" (click)='addunit()'><img style="margin-bottom: 3px;" src="../../../assets/images/newadd.png"> 新增</button>
<button mat-raised-button color="primary" (click)='addunit()' *ngIf="level=='0'"><img style="margin-bottom: 3px;" src="../../../assets/images/newadd.png"> 新增</button>
</div>
<div class="progressBox" style="margin-left: 100px;" *ngIf="downloadisLoading">

15
src/app/plan-management/type-plan/type-plan.component.ts

@ -4,7 +4,7 @@
* @Author: sueRimn
* @Date: 2021-01-06 09:47:43
* @LastEditors: sueRimn
* @LastEditTime: 2021-02-04 10:40:16
* @LastEditTime: 2021-02-05 14:43:41
*/
import { Component, OnInit, ViewChild, Inject } from '@angular/core';
import { HttpClient } from '@angular/common/http'
@ -29,8 +29,8 @@ export class TypePlanComponent implements OnInit {
constructor(private http:HttpClient,private router:Router,private route:ActivatedRoute,private tree: TreeService,public dialog: MatDialog,public snackBar: MatSnackBar) { }
ngOnInit(): void {
let level = sessionStorage.getItem("level");
if(level == "0"){//如果是总队
this.level = sessionStorage.getItem("level");
if(this.level == "0"){//如果是总队
this.preparelevels = [
{name:"总队",value:"1"},
{name:"支队",value:"2"},
@ -38,27 +38,28 @@ export class TypePlanComponent implements OnInit {
{name:"中队",value:"8"}
]
}
if(level == "1"){//如果是支队
if(this.level == "1"){//如果是支队
this.preparelevels = [
{name:"支队",value:"2"},
{name:"大队",value:"4"},
{name:"中队",value:"8"}
]
}
if(level == "2"){//如果是大队
if(this.level == "2"){//如果是大队
this.preparelevels = [
{name:"大队",value:"4"},
{name:"中队",value:"8"}
]
}
if(level == "3"){//如果是中队
if(this.level == "3"){//如果是中队
this.preparelevels = [
{name:"中队",value:"8"}
]
}
this.getAlltabledate()
}
level
preparelevels:any
plcheck:boolean //编制级别勾选框
displayedColumns: string[] = ['unitname','addname','addtime', 'plantype', 'passstate','isopen','projectlevel','operation'];

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

@ -1,5 +1,6 @@
import { Component, OnInit } from '@angular/core';
import { Router } from '@angular/router';
import { HttpClient } from '@angular/common/http'
import {EchartsDataService,} from '../../echarts-data.service'
declare var echarts: any;
@Component({
@ -9,7 +10,7 @@ declare var echarts: any;
})
export class BuildingTypeOneComponent implements OnInit {
constructor(private router: Router,public echartsData:EchartsDataService) { }
constructor(private http:HttpClient,private router: Router,public echartsData:EchartsDataService) { }
ngOnInit(): void {
window.setTimeout(()=>{
@ -22,11 +23,23 @@ export class BuildingTypeOneComponent implements OnInit {
}
/* 首页饼状图 */
indexBzt
lengthdata=[]//提示数据
count=0//总数
indexData=[]//所有数据
initCharts(){
this.indexBzt = echarts.init(document.getElementById('indexBzt'),'walden');
this.http.get("/api/StatisticsAnalysis").subscribe((data:any)=>{
for(var i=0;i<data.companyStatistics.buildingTypeStatistics.buildingTypes.length;i++){
this.lengthdata.push(data.companyStatistics.buildingTypeStatistics.buildingTypes[i].buildingTypeName)
this.count=this.count+data.companyStatistics.buildingTypeStatistics.buildingTypes[i].count
this.indexData.push(data.companyStatistics.buildingTypeStatistics.buildingTypes[i])
}
//JSON.parse(JSON.stringify(this.indexData).replace(/buildingTypeName/g, 'name'))
this.indexData=this.indexData.map(v=>{return {name: v.buildingTypeName,value:v.count}})
console.log(this.indexData)
this.indexBzt = echarts.init(document.getElementById('indexBzt'),'walden');
let options={
title: {
text: '建筑类型统计(8900家)',
text: `建筑类型统计(${this.count}家)`,
left: 'center',
top: "7%",
textStyle: {
@ -48,7 +61,7 @@ export class BuildingTypeOneComponent implements OnInit {
fontSize:18,
color:"#000000"
},
data: ['高层', '地下', '轨道交通', '化工生产', '储罐类' , '厂房','古建筑', '商市场', '医院', '学校', '宾馆' , '娱乐场所','餐饮业', '影剧院', '展览建筑' , '隧道']
data: this.lengthdata
},
series: [
{
@ -67,24 +80,24 @@ export class BuildingTypeOneComponent implements OnInit {
}
},
},
data: [
{value: 500, name: '高层'},
{value: 800, name: '地下'},
{value: 900, name: '轨道交通'},
{value: 800, name: '化工生产'},
{value: 1200, name: '储罐类'},
{value: 1500, name: '厂房'},
{value: 1400, name: '古建筑'},
{value: 600, name: '商市场'},
{value: 568, name: '医院'},
{value: 888, name: '学校'},
{value: 485, name: '宾馆'},
{value: 966, name: '娱乐场所'},
{value: 789, name: '餐饮业'},
data:/* [
{value: this.indexData[0].count, name: this.indexData[0].buildingTypeName},
{value: this.indexData[1].count, name: this.indexData[1].buildingTypeName},
{value: this.indexData[2].count, name: this.indexData[2].buildingTypeName},
{value: this.indexData[3].count, name: this.indexData[3].buildingTypeName},
{value: this.indexData[4].count, name: this.indexData[4].buildingTypeName},
{value: this.indexData[5].count, name: this.indexData[5].buildingTypeName},
{value: this.indexData[6].count, name: this.indexData[6].buildingTypeName},
{value: this.indexData[7].count, name: this.indexData[7].buildingTypeName},
{value: this.indexData[8].count, name: this.indexData[8].buildingTypeName},
{value: this.indexData[9].count, name: this.indexData[9].buildingTypeName},
{value: this.indexData[10].count, name: this.indexData[0].buildingTypeName},
{value: this.indexData[0].count, name: this.indexData[0].buildingTypeName},
{value: this.indexData[0].count, name: this.indexData[0].buildingTypeName},
{value: 500, name: '影剧院'},
{value: 1025, name: '展览建筑'},
{value: 600, name: '隧道'}
],
{value: 600, name: '隧道'}
] */this.indexData,
emphasis: {
itemStyle: {
shadowBlur: 10,
@ -99,6 +112,9 @@ export class BuildingTypeOneComponent implements OnInit {
this.router.navigate(['/statisticanalysis/buildingType_one/buildingType_two_reverse'],{queryParams:{'level':params.name}});
});
this.indexBzt.setOption(options);
})
}
biaogeTishi(biaotou:string){
var shuju='[{"name":"浦东支队","number":"156","zhanbi":"3%"},{"name":"黄浦支队","number":"144","zhanbi":"2.8%"},'

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

@ -1,6 +1,7 @@
import { Component, OnInit } from '@angular/core';
import { ActivatedRoute, Router } from '@angular/router';
import {EchartsDataService} from '../../echarts-data.service';
import { HttpClient } from '@angular/common/http'
declare var echarts: any;
@Component({
selector: 'app-building-type-two-reverse',
@ -9,7 +10,7 @@ declare var echarts: any;
})
export class BuildingTypeTwoReverseComponent implements OnInit {
constructor(private router: Router,public data:EchartsDataService,private route:ActivatedRoute) { }
constructor(private http:HttpClient,private router: Router,public data:EchartsDataService,private route:ActivatedRoute) { }
forward(){
this.router.navigate(['/statisticanalysis/buildingType_one/buildingType_two_forward'])
@ -149,6 +150,7 @@ export class BuildingTypeTwoReverseComponent implements OnInit {
/* 顶部饼状图 */
indexBzt
initCharts(){
this.indexBzt = echarts.init(document.getElementById('pie'),'walden');
let options={
title: {
@ -227,71 +229,86 @@ export class BuildingTypeTwoReverseComponent implements OnInit {
this.indexBzt.setOption(options);
}
//柱状图
lengthdata=[]//提示数据
count=0//总数
indexData=[]//所有数据
barEcharts(){
this.forArr.forEach(item=>{
let _this = this
item.echart = echarts.init(document.getElementById('gaoceng'),'walden');
let option = {
title: {
text: this.headname+':总数(1024)',
left: "center",
top: "15",
//bottom: '80',
textStyle: {
fontSize: 30
}
},
xAxis: {
type: 'category',
data: this.zhiNameData,
axisLabel:{
//this.axisLabel,
interval: 0,
textStyle:{
fontSize :18,
color:'#000000'
}
this.http.get("/api/StatisticsAnalysis").subscribe((data:any)=>{
for(var i=0;i<data.companyStatistics.buildingTypeStatistics.buildingTypes.length;i++){
this.lengthdata.push(data.companyStatistics.buildingTypeStatistics.buildingTypes[i].buildingTypeName)
this.count=this.count+data.companyStatistics.buildingTypeStatistics.buildingTypes[i].count
this.indexData.push(data.companyStatistics.buildingTypeStatistics.buildingTypes[i])
}
//JSON.parse(JSON.stringify(this.indexData).replace(/buildingTypeName/g, 'name'))
this.indexData=this.indexData.map(v=>{return {name: v.buildingTypeName,value:v.count}})
console.log(data)
this.forArr.forEach(item=>{
let _this = this
item.echart = echarts.init(document.getElementById('gaoceng'),'walden');
let option = {
title: {
text: this.headname+':总数(1024)',
left: "center",
top: "15",
//bottom: '80',
textStyle: {
fontSize: 30
}
},
yAxis: {
type: 'value',
axisLabel:{
//this.axisLabel,
textStyle:{
fontSize :16,
color:'#000000'
},
xAxis: {
type: 'category',
data: this.zhiNameData,
axisLabel:{
//this.axisLabel,
interval: 0,
textStyle:{
fontSize :18,
color:'#000000'
}
}
}
},
tooltip: {
trigger: 'item',
formatter: (params)=>{
return this.tableTooltip(this.tableDataZhong,params.name)
},
position: this.data.tableTooltipNoShow2
},
series: [{
data: this.zhiNumData,
type: 'bar',
markPoint: {
data: this.tiaoshiPao
yAxis: {
type: 'value',
axisLabel:{
//this.axisLabel,
textStyle:{
fontSize :16,
color:'#000000'
}
}
},
//showBackground: true,
backgroundStyle: {
color: 'rgba(220, 220, 220, 0.8)'
tooltip: {
trigger: 'item',
formatter: (params)=>{
return this.tableTooltip(this.tableDataZhong,params.name)
},
barWidth :'38',
//label: this.topTextlabel
}]
};
item.echart.setOption(option);
item.echart.on('click', (params) => {
this.router.navigate(['/statisticanalysis/buildingType_one/buildingType_three_details'],{queryParams:{'organizationName':params.name,'buildingTypeName':this.headname}})
});
position: this.data.tableTooltipNoShow2
},
series: [{
data: this.zhiNumData,
type: 'bar',
markPoint: {
data: this.tiaoshiPao
},
//showBackground: true,
backgroundStyle: {
color: 'rgba(220, 220, 220, 0.8)'
},
barWidth :'38',
//label: this.topTextlabel
}]
};
item.echart.setOption(option);
item.echart.on('click', (params) => {
this.router.navigate(['/statisticanalysis/buildingType_one/buildingType_three_details'],{queryParams:{'organizationName':params.name,'buildingTypeName':this.headname}})
});
})
})
}
//提示框表格
tableTooltip(dataArr,title:string){
let data = dataArr

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

@ -1,11 +1,17 @@
import { Injectable, EventEmitter} from '@angular/core';
import { Observable, ReplaySubject } from 'rxjs';
import { HttpClient } from '@angular/common/http'
@Injectable({
providedIn: 'root'
})
export class EchartsDataService {
constructor() { }
constructor(private http:HttpClient) { }
echartsApi(){
this.allEcharts=this.http.get("/api/StatisticsAnalysis")
//return this.allEcharts.data
}
allEcharts
//计划首页
tableShow=false//控制首页表格显隐
buildingName="" //建筑类型

Loading…
Cancel
Save