From f1c42a3f33d601771357b81ca56a5b2c15eb00b6 Mon Sep 17 00:00:00 2001 From: chenjingyu Date: Fri, 16 Jul 2021 09:27:46 +0800 Subject: [PATCH 1/3] =?UTF-8?q?[=E6=96=B0=E5=A2=9E]=E9=A2=84=E6=A1=88?= =?UTF-8?q?=E7=8A=B6=E6=80=81=E7=BB=9F=E8=AE=A1=E9=A6=96=E9=A1=B5=E6=96=B0?= =?UTF-8?q?=E5=A2=9E=E9=A2=84=E6=A1=88=E7=B1=BB=E5=9E=8B=E7=BB=9F=E8=AE=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../state/page-one/page-one.component.html | 6 +- .../state/page-one/page-one.component.ts | 62 +++++++++++++------ 2 files changed, 48 insertions(+), 20 deletions(-) diff --git a/src/app/statistic-analysis/state/page-one/page-one.component.html b/src/app/statistic-analysis/state/page-one/page-one.component.html index ff564e1..5a6f8e0 100644 --- a/src/app/statistic-analysis/state/page-one/page-one.component.html +++ b/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 -->
+ + autorenew + +
diff --git a/src/app/statistic-analysis/state/page-one/page-one.component.ts b/src/app/statistic-analysis/state/page-one/page-one.component.ts index 94e4231..11b472c 100644 --- a/src/app/statistic-analysis/state/page-one/page-one.component.ts +++ b/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, From d2a3ae2018b4e1af38a485e5e2cb89545d3ca1fc Mon Sep 17 00:00:00 2001 From: cpf <1105965053@qq.com> Date: Fri, 16 Jul 2021 15:57:23 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E5=88=A0=E9=99=A4=E6=A5=BC=E5=B1=82?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E9=81=AE=E7=BD=A9=E5=B1=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../collection-tools-building/collection-tools.component.ts | 4 ++++ .../ui/collection-tools-plan/collection-tools.component.ts | 4 ++++ src/app/ui/collection-tools/collection-tools.component.ts | 4 ++++ 3 files changed, 12 insertions(+) diff --git a/src/app/ui/collection-tools-building/collection-tools.component.ts b/src/app/ui/collection-tools-building/collection-tools.component.ts index b2d6591..5dbaa03 100644 --- a/src/app/ui/collection-tools-building/collection-tools.component.ts +++ b/src/app/ui/collection-tools-building/collection-tools.component.ts @@ -1882,6 +1882,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 +1935,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) } } diff --git a/src/app/ui/collection-tools-plan/collection-tools.component.ts b/src/app/ui/collection-tools-plan/collection-tools.component.ts index 22d003d..c089a9c 100644 --- a/src/app/ui/collection-tools-plan/collection-tools.component.ts +++ b/src/app/ui/collection-tools-plan/collection-tools.component.ts @@ -1884,6 +1884,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 +1937,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) } } diff --git a/src/app/ui/collection-tools/collection-tools.component.ts b/src/app/ui/collection-tools/collection-tools.component.ts index 5cd37cb..6ff6466 100644 --- a/src/app/ui/collection-tools/collection-tools.component.ts +++ b/src/app/ui/collection-tools/collection-tools.component.ts @@ -1929,6 +1929,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 +1982,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) } } From 4c5dec0356277a284a260bdd1d86700fe2daf90a Mon Sep 17 00:00:00 2001 From: cpf <1105965053@qq.com> Date: Fri, 16 Jul 2021 16:28:59 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E4=BF=9D=E5=AD=98=E5=89=8D=E6=B8=85?= =?UTF-8?q?=E7=A9=BA=20=E5=B7=B2=E8=A2=AB=E5=88=A0=E9=99=A4=E6=A5=BC?= =?UTF-8?q?=E5=B1=82=E5=86=97=E4=BD=99=E6=95=B0=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../collection-tools.component.ts | 14 +++++++++++--- .../collection-tools.component.ts | 14 +++++++++++--- .../collection-tools/collection-tools.component.ts | 14 +++++++++++--- 3 files changed, 33 insertions(+), 9 deletions(-) diff --git a/src/app/ui/collection-tools-building/collection-tools.component.ts b/src/app/ui/collection-tools-building/collection-tools.component.ts index 5dbaa03..bdd7651 100644 --- a/src/app/ui/collection-tools-building/collection-tools.component.ts +++ b/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 == "毗邻") {//如果是相同楼层,则筛选出毗邻 diff --git a/src/app/ui/collection-tools-plan/collection-tools.component.ts b/src/app/ui/collection-tools-plan/collection-tools.component.ts index c089a9c..f314119 100644 --- a/src/app/ui/collection-tools-plan/collection-tools.component.ts +++ b/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 == "毗邻") {//如果是相同楼层,则筛选出毗邻 diff --git a/src/app/ui/collection-tools/collection-tools.component.ts b/src/app/ui/collection-tools/collection-tools.component.ts index 6ff6466..15ac2a7 100644 --- a/src/app/ui/collection-tools/collection-tools.component.ts +++ b/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) {