Browse Source

[完善]首页bug

master
邵佳豪 2 months ago
parent
commit
cca7eb69cb
  1. 28
      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

28
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": [{
"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": {

126
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" = "预案编制",
}

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)="routerTo(element)"
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>
</ng-container>
<tr mat-header-row *matHeaderRowDef="displayedColumns"></tr>

4
src/index.html

@ -24,9 +24,9 @@
securityJsCode: 'dca2583973d0448116433fd64f97f8f8'
}
</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>
<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
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> -->

Loading…
Cancel
Save