From cca7eb69cb8ac5ac9343a0696bff3b935bae6f47 Mon Sep 17 00:00:00 2001 From: Sjh <55341701@qq.com> Date: Mon, 6 Jan 2025 16:03:55 +0800 Subject: [PATCH] =?UTF-8?q?[=E5=AE=8C=E5=96=84]=E9=A6=96=E9=A1=B5bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- angular.json | 32 ++--- .../statistic-analysis/home/home.component.ts | 126 +++--------------- .../plan-analysis-by-synthesis.component.html | 3 +- src/index.html | 4 +- 4 files changed, 36 insertions(+), 129 deletions(-) diff --git a/angular.json b/angular.json index 46e73e8..00007c3 100644 --- a/angular.json +++ b/angular.json @@ -18,15 +18,13 @@ "builder": "@angular-devkit/build-angular:browser", "options": { "outputPath": "dist/anxin119", + "sourceMap": false, "index": "src/index.html", "main": "src/main.ts", "polyfills": "src/polyfills.ts", "tsConfig": "tsconfig.app.json", "aot": true, - "assets": [ - "src/favicon.ico", - "src/assets" - ], + "assets": ["src/favicon.ico", "src/assets"], "styles": [ "src/styles.scss", "./node_modules/swiper/css/swiper.min.css", @@ -46,10 +44,12 @@ }, "configurations": { "production": { - "fileReplacements": [{ - "replace": "src/environments/environment.ts", - "with": "src/environments/environment.prod.ts" - }], + "fileReplacements": [ + { + "replace": "src/environments/environment.ts", + "with": "src/environments/environment.prod.ts" + } + ], "optimization": true, "outputHashing": "all", "sourceMap": false, @@ -58,7 +58,8 @@ "extractLicenses": true, "vendorChunk": false, "buildOptimizer": true, - "budgets": [{ + "budgets": [ + { "type": "initial", "maximumWarning": "18mb", "maximumError": "18mb" @@ -97,13 +98,8 @@ "polyfills": "src/polyfills.ts", "tsConfig": "tsconfig.spec.json", "karmaConfig": "karma.conf.js", - "assets": [ - "src/favicon.ico", - "src/assets" - ], - "styles": [ - "src/styles.scss" - ], + "assets": ["src/favicon.ico", "src/assets"], + "styles": ["src/styles.scss"], "scripts": [] } }, @@ -115,9 +111,7 @@ "tsconfig.spec.json", "e2e/tsconfig.json" ], - "exclude": [ - "**/node_modules/**" - ] + "exclude": ["**/node_modules/**"] } }, "e2e": { diff --git a/src/app/statistic-analysis/home/home.component.ts b/src/app/statistic-analysis/home/home.component.ts index eef7df3..46822f8 100644 --- a/src/app/statistic-analysis/home/home.component.ts +++ b/src/app/statistic-analysis/home/home.component.ts @@ -39,7 +39,6 @@ export class HomeComponent implements OnInit { this.http .get("/api/StatisticsAnalysis/Companies/YearlyCompleteProgress") .subscribe((data) => { - // console.log('获得年度完成情况', data) this.completeProgress = data; }); } @@ -64,7 +63,6 @@ export class HomeComponent implements OnInit { async getechartsdata() { let paramsdata: any = { OrganizationId: this.orid || "", - //organizationId:'1' }; //获取组织机构数据 await this.emitService.getData( @@ -72,7 +70,6 @@ export class HomeComponent implements OnInit { `/api/StatisticsAnalysis/Companies` ); this.ordata = JSON.parse(JSON.stringify(this.emitService.allDate)); - console.log(this.ordata); this.keyUnitNum = this.ordata[0].organizationStatistics.totalCount; this.unitData(); //获取预案状态统计数据 @@ -220,7 +217,17 @@ export class HomeComponent implements OnInit { ); } - /* */ + let arr = this.pagedata[0].planStatusStatistics.planStatuses.map((item) => { + let obj = { + value: item.count || 0, + name: PlanStatusType[item.planStatusName], + type: item.planStatusValue, + planStatusName: item.planStatusName || "", + }; + + return obj; + }); + let planStateOptionsZhi = { title: { text: `预案状态统计(${this.pagedata[0].planStatusStatistics.totalCount}份)`, @@ -242,7 +249,6 @@ export class HomeComponent implements OnInit { center: ["50%", "58%"], label: { show: true, - //fontSize:10, formatter: "{b}\n{d|{c}份}", rich: { d: { @@ -250,83 +256,7 @@ export class HomeComponent implements OnInit { }, }, }, - data: [ - { - value: - this.pagedata[0].planStatusStatistics.planStatuses[0] != - undefined - ? this.pagedata[0].planStatusStatistics.planStatuses[0].count - : 0, - name: "预案新增", - type: 1, - planStatusName: - this.pagedata[0].planStatusStatistics.planStatuses[0] != - undefined - ? this.pagedata[0].planStatusStatistics.planStatuses[0] - .planStatusName - : "", - }, - { - value: - this.pagedata[0].planStatusStatistics.planStatuses[2] != - undefined - ? this.pagedata[0].planStatusStatistics.planStatuses[2].count - : 0, - name: "预案审核通过", - type: 3, - planStatusName: - this.pagedata[0].planStatusStatistics.planStatuses[2] != - undefined - ? this.pagedata[0].planStatusStatistics.planStatuses[2] - .planStatusName - : "", - }, - { - value: - this.pagedata[0].planStatusStatistics.planStatuses[4] != - undefined - ? this.pagedata[0].planStatusStatistics.planStatuses[4].count - : 0, - name: "预案编制", - type: 5, - planStatusName: - this.pagedata[0].planStatusStatistics.planStatuses[4] != - undefined - ? this.pagedata[0].planStatusStatistics.planStatuses[4] - .planStatusName - : "", - }, - { - value: - this.pagedata[0].planStatusStatistics.planStatuses[3] != - undefined - ? this.pagedata[0].planStatusStatistics.planStatuses[3].count - : 0, - name: "预案审核退回", - type: 4, - planStatusName: - this.pagedata[0].planStatusStatistics.planStatuses[3] != - undefined - ? this.pagedata[0].planStatusStatistics.planStatuses[3] - .planStatusName - : "", - }, - { - value: - this.pagedata[0].planStatusStatistics.planStatuses[1] != - undefined - ? this.pagedata[0].planStatusStatistics.planStatuses[1].count - : 0, - name: "预案审核中", - type: 2, - planStatusName: - this.pagedata[0].planStatusStatistics.planStatuses[1] != - undefined - ? this.pagedata[0].planStatusStatistics.planStatuses[1] - .planStatusName - : "", - }, - ], + data: arr, emphasis: { itemStyle: { shadowBlur: 10, @@ -491,13 +421,6 @@ export class HomeComponent implements OnInit { right: 0, bottom: 30, }, - //图例 - /* legend: { - top: 0, - data: ['新增单位' ], - icon: 'circle', - itemGap: 20, - }, */ //提示框 tooltip: { trigger: "axis", @@ -555,17 +478,6 @@ export class HomeComponent implements OnInit { }, barMaxWidth: "20%", }, - /* , { - name: '删除单位', - type: 'bar', - data: [300, 202, 101, 134, 290, 430, 220, 490, 430, 490, 430, 202, 101, 134 ], - label: { - show: false, - position: "top", - formatter: '{c}', - color: "#fff", - } - } */ ], }; this.chartDwsjcj = echarts.init( @@ -611,12 +523,6 @@ export class HomeComponent implements OnInit { trigger: "item", formatter: "{b} : {c}家 ({d}%)", }, - // legend: { - // orient: 'vertical', - // right: 150, - // top:80, - // data: ['高层', '地下', '轨道交通', '化工生产', '储罐类' , '厂房','古建筑', '商市场', '医院', '学校', '宾馆' , '娱乐场所','餐饮业', '影剧院', '展览建筑' , '隧道'] - // }, series: [ { name: "访问来源", @@ -659,3 +565,11 @@ export class HomeComponent implements OnInit { this.isNumList = !this.isNumList; } } + +enum PlanStatusType { + "New" = "预案新增", + "Auditing" = "预案审核中", + "Approved" = "预案审核通过", + "Rejected" = "预案审核退回", + "Editing" = "预案编制", +} diff --git a/src/app/statistic-analysis/plan-analysis-by-synthesis/plan-analysis-by-synthesis.component.html b/src/app/statistic-analysis/plan-analysis-by-synthesis/plan-analysis-by-synthesis.component.html index 329f4e5..26c9660 100644 --- a/src/app/statistic-analysis/plan-analysis-by-synthesis/plan-analysis-by-synthesis.component.html +++ b/src/app/statistic-analysis/plan-analysis-by-synthesis/plan-analysis-by-synthesis.component.html @@ -170,8 +170,7 @@ {{url=='1'?'审核预案':'查看预案'}} - +