邵佳豪 4 years ago
parent
commit
4a48a78a38
  1. 6
      src/app/statistic-analysis/state/page-one/page-one.component.html
  2. 62
      src/app/statistic-analysis/state/page-one/page-one.component.ts
  3. 18
      src/app/ui/collection-tools-building/collection-tools.component.ts
  4. 18
      src/app/ui/collection-tools-plan/collection-tools.component.ts
  5. 18
      src/app/ui/collection-tools/collection-tools.component.ts

6
src/app/statistic-analysis/state/page-one/page-one.component.html

@ -4,13 +4,17 @@
* @Author: sueRimn
* @Date: 2020-09-01 15:24:39
* @LastEditors: sueRimn
* @LastEditTime: 2020-09-02 14:49:05
* @LastEditTime: 2021-07-14 14:13:42
-->
<body>
<!--饼状图 -->
<div id="indexBzt" >
<div id="pieone" class="pieone"></div>
<span (click)='clickhuan()'style="position: relative;top: 7%;right: 10%;cursor: pointer;" >
<mat-icon >autorenew</mat-icon>
</span>
<div id="pietwo" class="pietwo"></div>
</div>

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

@ -4,7 +4,7 @@
* @Author: sueRimn
* @Date: 2020-09-01 15:24:39
* @LastEditors: sueRimn
* @LastEditTime: 2021-07-07 14:07:26
* @LastEditTime: 2021-07-14 14:31:47
*/
import { Component, OnInit } from '@angular/core';
import { Router } from '@angular/router';
@ -55,31 +55,55 @@ export class PageOneComponent implements OnInit {
this.initCharts("pieone")
this.initCharts("pietwo")
}
//级别和类型转换
pieonetype=true//级别
clickhuan(){
this.pieonetype=!this.pieonetype
this.initCharts("pieone")
}
/* 首页饼状图 */
indexBzt
tabledata
count
indexData
planCategoriesData=[]
planStatusesData=[]
planCategoriesData=[]//预案级别
planStatusesData=[]//预案状态
planTypeStatisticsdata=[]//预案类型
initCharts(tid){
this.planTypeStatisticsdata=[]
this.planCategoriesData=[]
this.tabledata=JSON.parse(JSON.stringify(this.echartsData.allDate))
if(tid=='pieone')
{
this.tabledata[0].planCategoryStatistics.planCategories.forEach((value,index,array) => {
if(array[index].planCategoryName=='LevelOne'){
this.planCategoriesData.push({name:'Ⅰ级预案',value:array[index].count,planStatusName:array[index].planCategoryName,type:1})
}else if(array[index].planCategoryName=='LevelTwo'){
this.planCategoriesData.push({name:'Ⅱ级预案',value:array[index].count,planStatusName:array[index].planCategoryName,type:2})
}else if(array[index].planCategoryName=='LevelThree'){
this.planCategoriesData.push({name:'Ⅲ级预案',value:array[index].count,planStatusName:array[index].planCategoryName,type:3})
}else if(array[index].planCategoryName=='LevelFour'){
this.planCategoriesData.push({name:'Ⅳ级预案',value:array[index].count,planStatusName:array[index].planCategoryName,type:4})
}else if(array[index].planCategoryName=='LevelFive'){
this.planCategoriesData.push({name:'Ⅴ级预案',value:array[index].count,planStatusName:array[index].planCategoryName,type:5})
}
});
if(this.pieonetype){
this.tabledata[0].planCategoryStatistics.planCategories.forEach((value,index,array) => {
if(array[index].planCategoryName=='LevelOne'){
this.planCategoriesData.push({name:'Ⅰ级预案',value:array[index].count,planStatusName:array[index].planCategoryName,type:1})
}else if(array[index].planCategoryName=='LevelTwo'){
this.planCategoriesData.push({name:'Ⅱ级预案',value:array[index].count,planStatusName:array[index].planCategoryName,type:2})
}else if(array[index].planCategoryName=='LevelThree'){
this.planCategoriesData.push({name:'Ⅲ级预案',value:array[index].count,planStatusName:array[index].planCategoryName,type:3})
}else if(array[index].planCategoryName=='LevelFour'){
this.planCategoriesData.push({name:'Ⅳ级预案',value:array[index].count,planStatusName:array[index].planCategoryName,type:4})
}else if(array[index].planCategoryName=='LevelFive'){
this.planCategoriesData.push({name:'Ⅴ级预案',value:array[index].count,planStatusName:array[index].planCategoryName,type:5})
}
});
}else{
this.tabledata[0].planTypeStatistics.planTypes.forEach((value,index,array) => {
if(array[index].planTypeName=='Plan2D'){
this.planTypeStatisticsdata.push({name:'二维预案',value:array[index].count,planStatusName:array[index].planCategoryName,type:1})
}else if(array[index].planTypeName=='Plan3D'){
this.planTypeStatisticsdata.push({name:'三维预案',value:array[index].count,planStatusName:array[index].planCategoryName,type:2})
}else if(array[index].planTypeName=='Other'){
this.planTypeStatisticsdata.push({name:'其它预案',value:array[index].count,planStatusName:array[index].planCategoryName,type:3})
}else if(array[index].planTypeName=='PlanText'){
this.planTypeStatisticsdata.push({name:'文本预案',value:array[index].count,planStatusName:array[index].planCategoryName,type:4})
}
});
}
}else{
this.tabledata[0].planStatusStatistics.planStatuses.forEach((value,index,array) => {
if(array[index].planStatusName=='New'){
@ -101,7 +125,7 @@ export class PageOneComponent implements OnInit {
this.indexBzt = ec.init(document.getElementById(tid),'walden');
var options={
title: {
text:tid=='pieone'?`预案级别统计(${this.tabledata[0].planCategoryStatistics.totalCount}份)` :`预案状态统计(${this.tabledata[0].planStatusStatistics.totalCount}份)`,
text:tid=='pieone'&&this.pieonetype?`预案级别统计(${this.tabledata[0].planCategoryStatistics.totalCount}份)` :tid=='pieone'&&!this.pieonetype?`预案类型统计(${this.tabledata[0].planTypeStatistics.totalCount}份)`:`预案状态统计(${this.tabledata[0].planStatusStatistics.totalCount}份)`,
top: "7%",
left: 'center',
textStyle:{
@ -125,7 +149,7 @@ export class PageOneComponent implements OnInit {
fontSize:this.padHw?15: 18,
color:"#000000"
},
data:tid=='pieone'?['Ⅰ级预案', 'Ⅱ级预案', 'Ⅲ级预案', 'Ⅳ级预案', 'Ⅴ级预案'] :['预案新增', '预案审核通过', '预案编制', '预案审核退回', '预案审核中']
data:tid=='pieone'&&this.pieonetype?['Ⅰ级预案', 'Ⅱ级预案', 'Ⅲ级预案', 'Ⅳ级预案', 'Ⅴ级预案']:tid=='pieone'&&!this.pieonetype?['二维预案', '三维预案', '其它预案', '文本预案'] :['预案新增', '预案审核通过', '预案编制', '预案审核退回', '预案审核中']
},
series: [
{
@ -147,7 +171,7 @@ export class PageOneComponent implements OnInit {
},
},
data:tid=='pieone'?this.planCategoriesData:this.planStatusesData,
data:tid=='pieone'&&this.pieonetype?this.planCategoriesData:tid=='pieone'&&!this.pieonetype?this.planTypeStatisticsdata:this.planStatusesData,
emphasis: {
itemStyle: {
shadowBlur: 10,

18
src/app/ui/collection-tools-building/collection-tools.component.ts

@ -894,15 +894,23 @@ export class CollectionToolsBuildingComponent implements OnInit {
if (this.selectingSitePlan && this.selectingSitePlan.id) {
//打开遮罩层
this.maskLayerService.sendMessage(true)
//遍历 建筑数据 删除多余数据
let object = this.canvasData.originalcompanyBuildingData.data
let adjoinArr = [] //毗邻数组
Object.keys(object).forEach(key=>{
let isExist = this.sitePlanData.find(item=>{ return item.id === object[key].FloorId })
if (isExist === undefined) {
console.log(object[key],'当前楼层已被删除')
delete object[key]
}
})
//遍历 建筑数据 删除多余数据
this.saveNum = []
let SitePlanData = JSON.parse(JSON.stringify(this.canvasData.originaleveryStoreyData));
SitePlanData.data = JSON.stringify(SitePlanData.data)
let CompanyData = JSON.parse(JSON.stringify(this.canvasData.originalcompanyBuildingData));
CompanyData.data = JSON.stringify(CompanyData.data)
let object = this.canvasData.originalcompanyBuildingData.data
let adjoinArr = [] //毗邻数组
if (this.pattern) {//如果是基本信息编辑模式
for (const key in object) {
if (object[key].Name == "毗邻") {//如果是相同楼层,则筛选出毗邻
@ -1882,6 +1890,8 @@ export class CollectionToolsBuildingComponent implements OnInit {
deletePlaneData(item) {
const isDelete = confirm('您确定要删除吗');
if (isDelete) {
//打开遮罩层
this.maskLayerService.sendMessage(true)
if (this.checkedBuildingIndex == -1) { //总平面图
let isHave = this.canvasData.allDisposalNode.find(items => { return items.sitePlanId === item.id })
if (isHave == undefined) {
@ -1933,9 +1943,11 @@ export class CollectionToolsBuildingComponent implements OnInit {
if (isCompany === -1) {
this.http.post("/api/CompanyData", newData).subscribe(data => { })
this.getSitePlanStorey(this.selectingSitePlan) //获取 平面图 楼层数据
this.maskLayerService.sendMessage(false)
} else {
this.http.post("/api/BuildingData", newData, { params: this.params }).subscribe(data => { })
this.getBuildingStorey(this.selectingSitePlan) //获取 建筑 楼层数据
this.maskLayerService.sendMessage(false)
}
}

18
src/app/ui/collection-tools-plan/collection-tools.component.ts

@ -804,15 +804,23 @@ export class CollectionToolsPlanComponent implements OnInit {
if (this.selectingSitePlan && this.selectingSitePlan.id) {
//打开遮罩层
this.maskLayerService.sendMessage(true)
//遍历 建筑数据 删除多余数据
let object = this.canvasData.originalcompanyBuildingData.data
let adjoinArr = [] //毗邻数组
Object.keys(object).forEach(key=>{
let isExist = this.sitePlanData.find(item=>{ return item.id === object[key].FloorId })
if (isExist === undefined) {
console.log(object[key],'当前楼层已被删除')
delete object[key]
}
})
//遍历 建筑数据 删除多余数据
this.saveNum = []
let SitePlanData = JSON.parse(JSON.stringify(this.canvasData.originaleveryStoreyData));
SitePlanData.data = JSON.stringify(SitePlanData.data)
let CompanyData = JSON.parse(JSON.stringify(this.canvasData.originalcompanyBuildingData));
CompanyData.data = JSON.stringify(CompanyData.data)
let object = this.canvasData.originalcompanyBuildingData.data
let adjoinArr = [] //毗邻数组
if (this.pattern) {//如果是基本信息编辑模式
for (const key in object) {
if (object[key].Name == "毗邻") {//如果是相同楼层,则筛选出毗邻
@ -1884,6 +1892,8 @@ export class CollectionToolsPlanComponent implements OnInit {
deletePlaneData(item) {
const isDelete = confirm('您确定要删除吗');
if (isDelete) {
//打开遮罩层
this.maskLayerService.sendMessage(true)
if (this.checkedBuildingIndex == -1) { //总平面图
let isHave = this.canvasData.allDisposalNode.find(items => { return items.sitePlanId === item.id })
if (isHave == undefined) {
@ -1935,9 +1945,11 @@ export class CollectionToolsPlanComponent implements OnInit {
if (isCompany === -1) {
this.http.post("/api/CompanyData", newData).subscribe(data => { })
this.getSitePlanStorey(this.selectingSitePlan) //获取 平面图 楼层数据
this.maskLayerService.sendMessage(false)
} else {
this.http.post("/api/BuildingData", newData, { params: this.params }).subscribe(data => { })
this.getBuildingStorey(this.selectingSitePlan) //获取 建筑 楼层数据
this.maskLayerService.sendMessage(false)
}
}

18
src/app/ui/collection-tools/collection-tools.component.ts

@ -917,15 +917,23 @@ export class CollectionToolsComponent implements OnInit {
this.canvasData.updateBuildingData()
if (this.selectingSitePlan && this.selectingSitePlan.id) {
//遍历 建筑数据 删除多余数据
let object = this.canvasData.originalcompanyBuildingData.data
let adjoinArr = [] //毗邻数组
Object.keys(object).forEach(key=>{
let isExist = this.sitePlanData.find(item=>{ return item.id === object[key].FloorId })
if (isExist === undefined) {
console.log(object[key],'当前楼层已被删除')
delete object[key]
}
})
//遍历 建筑数据 删除多余数据
this.saveNum = []
let SitePlanData = JSON.parse(JSON.stringify(this.canvasData.originaleveryStoreyData));
SitePlanData.data = JSON.stringify(SitePlanData.data)
let CompanyData = JSON.parse(JSON.stringify(this.canvasData.originalcompanyBuildingData));
CompanyData.data = JSON.stringify(CompanyData.data)
let object = this.canvasData.originalcompanyBuildingData.data
let adjoinArr = [] //毗邻数组
if (this.pattern) {//如果是基本信息编辑模式
this.maskLayerService.sendMessage(true)
for (const key in object) {
@ -1929,6 +1937,8 @@ export class CollectionToolsComponent implements OnInit {
deletePlaneData(item) {
const isDelete = confirm('您确定要删除吗');
if (isDelete) {
//打开遮罩层
this.maskLayerService.sendMessage(true)
if (this.checkedBuildingIndex == -1) { //总平面图
let isHave = this.canvasData.allDisposalNode.find(items => { return items.sitePlanId === item.id })
if (isHave == undefined) {
@ -1980,9 +1990,11 @@ export class CollectionToolsComponent implements OnInit {
if (isCompany === -1) {
this.http.post("/api/CompanyData", newData).subscribe(data => { })
this.getSitePlanStorey(this.selectingSitePlan) //获取 平面图 楼层数据
this.maskLayerService.sendMessage(false)
} else {
this.http.post("/api/BuildingData", newData, { params: this.params }).subscribe(data => { })
this.getBuildingStorey(this.selectingSitePlan) //获取 建筑 楼层数据
this.maskLayerService.sendMessage(false)
}
}

Loading…
Cancel
Save