Browse Source

[完善]首页bug

master
邵佳豪 2 months ago
parent
commit
cca7eb69cb
  1. 32
      angular.json
  2. 126
      src/app/statistic-analysis/home/home.component.ts
  3. 3
      src/app/statistic-analysis/plan-analysis-by-synthesis/plan-analysis-by-synthesis.component.html
  4. 4
      src/index.html

32
angular.json

@ -18,15 +18,13 @@
"builder": "@angular-devkit/build-angular:browser", "builder": "@angular-devkit/build-angular:browser",
"options": { "options": {
"outputPath": "dist/anxin119", "outputPath": "dist/anxin119",
"sourceMap": false,
"index": "src/index.html", "index": "src/index.html",
"main": "src/main.ts", "main": "src/main.ts",
"polyfills": "src/polyfills.ts", "polyfills": "src/polyfills.ts",
"tsConfig": "tsconfig.app.json", "tsConfig": "tsconfig.app.json",
"aot": true, "aot": true,
"assets": [ "assets": ["src/favicon.ico", "src/assets"],
"src/favicon.ico",
"src/assets"
],
"styles": [ "styles": [
"src/styles.scss", "src/styles.scss",
"./node_modules/swiper/css/swiper.min.css", "./node_modules/swiper/css/swiper.min.css",
@ -46,10 +44,12 @@
}, },
"configurations": { "configurations": {
"production": { "production": {
"fileReplacements": [{ "fileReplacements": [
"replace": "src/environments/environment.ts", {
"with": "src/environments/environment.prod.ts" "replace": "src/environments/environment.ts",
}], "with": "src/environments/environment.prod.ts"
}
],
"optimization": true, "optimization": true,
"outputHashing": "all", "outputHashing": "all",
"sourceMap": false, "sourceMap": false,
@ -58,7 +58,8 @@
"extractLicenses": true, "extractLicenses": true,
"vendorChunk": false, "vendorChunk": false,
"buildOptimizer": true, "buildOptimizer": true,
"budgets": [{ "budgets": [
{
"type": "initial", "type": "initial",
"maximumWarning": "18mb", "maximumWarning": "18mb",
"maximumError": "18mb" "maximumError": "18mb"
@ -97,13 +98,8 @@
"polyfills": "src/polyfills.ts", "polyfills": "src/polyfills.ts",
"tsConfig": "tsconfig.spec.json", "tsConfig": "tsconfig.spec.json",
"karmaConfig": "karma.conf.js", "karmaConfig": "karma.conf.js",
"assets": [ "assets": ["src/favicon.ico", "src/assets"],
"src/favicon.ico", "styles": ["src/styles.scss"],
"src/assets"
],
"styles": [
"src/styles.scss"
],
"scripts": [] "scripts": []
} }
}, },
@ -115,9 +111,7 @@
"tsconfig.spec.json", "tsconfig.spec.json",
"e2e/tsconfig.json" "e2e/tsconfig.json"
], ],
"exclude": [ "exclude": ["**/node_modules/**"]
"**/node_modules/**"
]
} }
}, },
"e2e": { "e2e": {

126
src/app/statistic-analysis/home/home.component.ts

@ -39,7 +39,6 @@ export class HomeComponent implements OnInit {
this.http this.http
.get("/api/StatisticsAnalysis/Companies/YearlyCompleteProgress") .get("/api/StatisticsAnalysis/Companies/YearlyCompleteProgress")
.subscribe((data) => { .subscribe((data) => {
// console.log('获得年度完成情况', data)
this.completeProgress = data; this.completeProgress = data;
}); });
} }
@ -64,7 +63,6 @@ export class HomeComponent implements OnInit {
async getechartsdata() { async getechartsdata() {
let paramsdata: any = { let paramsdata: any = {
OrganizationId: this.orid || "", OrganizationId: this.orid || "",
//organizationId:'1'
}; };
//获取组织机构数据 //获取组织机构数据
await this.emitService.getData( await this.emitService.getData(
@ -72,7 +70,6 @@ export class HomeComponent implements OnInit {
`/api/StatisticsAnalysis/Companies` `/api/StatisticsAnalysis/Companies`
); );
this.ordata = JSON.parse(JSON.stringify(this.emitService.allDate)); this.ordata = JSON.parse(JSON.stringify(this.emitService.allDate));
console.log(this.ordata);
this.keyUnitNum = this.ordata[0].organizationStatistics.totalCount; this.keyUnitNum = this.ordata[0].organizationStatistics.totalCount;
this.unitData(); 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 = { let planStateOptionsZhi = {
title: { title: {
text: `预案状态统计(${this.pagedata[0].planStatusStatistics.totalCount}份)`, text: `预案状态统计(${this.pagedata[0].planStatusStatistics.totalCount}份)`,
@ -242,7 +249,6 @@ export class HomeComponent implements OnInit {
center: ["50%", "58%"], center: ["50%", "58%"],
label: { label: {
show: true, show: true,
//fontSize:10,
formatter: "{b}\n{d|{c}份}", formatter: "{b}\n{d|{c}份}",
rich: { rich: {
d: { d: {
@ -250,83 +256,7 @@ export class HomeComponent implements OnInit {
}, },
}, },
}, },
data: [ data: arr,
{
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
: "",
},
],
emphasis: { emphasis: {
itemStyle: { itemStyle: {
shadowBlur: 10, shadowBlur: 10,
@ -491,13 +421,6 @@ export class HomeComponent implements OnInit {
right: 0, right: 0,
bottom: 30, bottom: 30,
}, },
//图例
/* legend: {
top: 0,
data: ['新增单位' ],
icon: 'circle',
itemGap: 20,
}, */
//提示框 //提示框
tooltip: { tooltip: {
trigger: "axis", trigger: "axis",
@ -555,17 +478,6 @@ export class HomeComponent implements OnInit {
}, },
barMaxWidth: "20%", 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( this.chartDwsjcj = echarts.init(
@ -611,12 +523,6 @@ export class HomeComponent implements OnInit {
trigger: "item", trigger: "item",
formatter: "{b} : {c}家 ({d}%)", formatter: "{b} : {c}家 ({d}%)",
}, },
// legend: {
// orient: 'vertical',
// right: 150,
// top:80,
// data: ['高层', '地下', '轨道交通', '化工生产', '储罐类' , '厂房','古建筑', '商市场', '医院', '学校', '宾馆' , '娱乐场所','餐饮业', '影剧院', '展览建筑' , '隧道']
// },
series: [ series: [
{ {
name: "访问来源", name: "访问来源",
@ -659,3 +565,11 @@ export class HomeComponent implements OnInit {
this.isNumList = !this.isNumList; this.isNumList = !this.isNumList;
} }
} }
enum PlanStatusType {
"New" = "预案新增",
"Auditing" = "预案审核中",
"Approved" = "预案审核通过",
"Rejected" = "预案审核退回",
"Editing" = "预案编制",
}

3
src/app/statistic-analysis/plan-analysis-by-synthesis/plan-analysis-by-synthesis.component.html

@ -170,8 +170,7 @@
<!-- <span (click)="lookUnitInfo(element)" style="color: blue;cursor: pointer;">查看单位信息</span> --> <!-- <span (click)="lookUnitInfo(element)" style="color: blue;cursor: pointer;">查看单位信息</span> -->
<span (click)="routerTo(element)" <span (click)="routerTo(element)"
style="color: blue;cursor: pointer;margin-left: 10px;">{{url=='1'?'审核预案':'查看预案'}} </span> style="color: blue;cursor: pointer;margin-left: 10px;">{{url=='1'?'审核预案':'查看预案'}} </span>
<!-- <label style="color: #0000FF;margin-left: 10px;cursor: pointer;" (click)='openReserve(element)' *ngIf="element.auditStatus==2">预案公开</label>
<label style="color: #0000FF;margin-left: 10px;cursor: pointer;" (click)='closeReserve(element)' *ngIf="element.auditStatus==2">预案取消公开</label> -->
</td> </td>
</ng-container> </ng-container>
<tr mat-header-row *matHeaderRowDef="displayedColumns"></tr> <tr mat-header-row *matHeaderRowDef="displayedColumns"></tr>

4
src/index.html

@ -24,9 +24,9 @@
securityJsCode: 'dca2583973d0448116433fd64f97f8f8' securityJsCode: 'dca2583973d0448116433fd64f97f8f8'
} }
</script> </script>
<!-- <script <script
src="http://10.81.73.39:8000/webapi/maps?v=2.0&key=2584e43582b85680d76a515979503538&plugin=AMap.Driving,AMap.MouseTool,AMap.RangingTool"></script> src="http://10.81.73.39:8000/webapi/maps?v=2.0&key=2584e43582b85680d76a515979503538&plugin=AMap.Driving,AMap.MouseTool,AMap.RangingTool"></script>
<script src="http://10.81.73.39:8000/webapi/ui/1.1/main.js"></script> --> <script src="http://10.81.73.39:8000/webapi/ui/1.1/main.js"></script>
<!-- <script <!-- <script
src="https://webapi.amap.com/maps?v=2.0&key=2584e43582b85680d76a515979503538&plugin=AMap.Driving,AMap.MouseTool,AMap.RangingTool"></script> src="https://webapi.amap.com/maps?v=2.0&key=2584e43582b85680d76a515979503538&plugin=AMap.Driving,AMap.MouseTool,AMap.RangingTool"></script>
<script src="https://webapi.amap.com/ui/1.1/main.js"></script> --> <script src="https://webapi.amap.com/ui/1.1/main.js"></script> -->

Loading…
Cancel
Save