邵佳豪 4 years ago
parent
commit
63097a89ce
  1. 19
      src/app/plan-management/create-plan-online-five/create-plan-online-five.component.html
  2. 45
      src/app/plan-management/create-plan-online-five/create-plan-online-five.component.ts
  3. 5
      src/app/statistic-analysis/deleteUnit/delete-two-newadd/delete-two-newadd.component.ts
  4. 7
      src/app/statistic-analysis/deleteUnit/delete-two/delete-two.component.ts
  5. 2
      src/app/statistic-analysis/echarts-data.service.ts
  6. 10
      src/app/statistic-analysis/scheduled-updates/publicEcharts.html
  7. 71
      src/app/statistic-analysis/scheduled-updates/scheduled-updates.component.ts
  8. 2
      src/app/statistic-analysis/scheduled-updates/verified.html

19
src/app/plan-management/create-plan-online-five/create-plan-online-five.component.html

@ -373,7 +373,7 @@
<div class="unithead">
<span>{{buildingName}}</span>
</div>
<div class="unitbody" *ngFor="let element of item.building[clicki].body;let i=index">
<div class="unitbody" *ngFor="let element of group;let i=index">
<div *ngIf="element.completed">
<div class="unitbodyHead">
<span>{{element.surveyName}}</span>
@ -381,11 +381,11 @@
<div class="body">
<!-- 进攻通道 -->
<div class="attack" *ngIf="element.surveyName=='进攻通道'">
<div *ngFor="let attack of element.attinf">
<div *ngFor="let attack of element.attinf;let attacki=index">
<div class="attackhead">
<span>{{attack.head}}</span>
<img src="../../../assets/images/deleteblue.png" >
<img src="../../../assets/images/add.png" >
<img src="../../../assets/images/deleteblue.png" (click)='unitDel(element.surveyName,attacki)'>
<img src="../../../assets/images/add.png" (click)='unitadd(element.surveyName,attacki)'>
</div>
<div class="attackbody">
<table>
@ -395,6 +395,15 @@
[(ngModel)]="attack.tableth[tablethi]">
</th>
</thead>
<tbody>
<tr *ngFor="let itemtr of attack.tabletr">
<td
*ngFor="let itemtd of itemtr.tabletd;let tabletdi=index;TrackBy:trackByFn">
<input type="text" placeholder="请输入"
[(ngModel)]="itemtr.tabletd[tabletdi]">
</td>
</tr>
</tbody>
<tbody></tbody>
</table>
</div>
@ -402,6 +411,8 @@
</div>
<!-- 单位和建筑信息 -->
<div class="building"></div>
</div>
</div>

45
src/app/plan-management/create-plan-online-five/create-plan-online-five.component.ts

@ -4,7 +4,7 @@
* @Author: sueRimn
* @Date: 2021-06-16 13:56:54
* @LastEditors: sueRimn
* @LastEditTime: 2021-06-22 17:16:01
* @LastEditTime: 2021-06-23 16:26:37
*/
import { HttpClient } from '@angular/common/http';
import { Component, Inject, OnInit, Renderer2, ViewChild, Input } from '@angular/core';
@ -248,6 +248,7 @@ export class CreatePlanOnlineFiveComponent implements OnInit {
this.planTemplateData[0].building.push({name:this.allBuildings[i].name,body:this.planTemplateData[0].attribute})
}
this.buildingName=this.allBuildings[0].name
this.group=this.planTemplateData[0].building[this.clicki].body
console.log(this.planTemplateData)
})
}
@ -291,7 +292,7 @@ export class CreatePlanOnlineFiveComponent implements OnInit {
trackByFn(index) {
return index
}
//表格增加一行
//灾情设定表格增加一行
addNumber = -1
addTd(key, i) {
this.addNumber++
@ -310,7 +311,7 @@ export class CreatePlanOnlineFiveComponent implements OnInit {
}
console.log(this.planTemplateData)
}
//表格删除一行
//灾情设定表格删除一行
delTd(key, i) {
const config = new MatSnackBarConfig();
config.verticalPosition = 'top';
@ -329,14 +330,48 @@ export class CreatePlanOnlineFiveComponent implements OnInit {
//单位概况左侧建筑点击事件
buildingName
clicki=0
group
clickBuilding(item,i){
this.buildingName=item.name
this.clicki=i
this.group=this.planTemplateData[0].building[this.clicki].body
//console.log(this.group)
}
//单位概况增加一行
unitadd(groupName){
if(groupName=='进攻通道'){
unitadd(surveyName,attacki){
this.addNumber++
if(surveyName=='进攻通道'){
if (this.planTemplateData[0].building[this.clicki].body[4].attinf[attacki].tabletr == undefined) {
this.planTemplateData[0].building[this.clicki].body[4].attinf[attacki].tabletr = []
}
this.planTemplateData[0].building[this.clicki].body[4].attinf[attacki].tabletr.push({ tabletd: [] })
for (var j = 0; j < this.planTemplateData[0].building[this.clicki].body[4].attinf[attacki].tableth.length; j++) {
if (this.planTemplateData[0].building[this.clicki].body[4].attinf[attacki].tabletr != undefined) {
this.planTemplateData[0].building[this.clicki].body[4].attinf[attacki].tabletr[this.planTemplateData[0].building[this.clicki].body[4].attinf[attacki].tabletr.length - 1].tabletd.push('')
}
else {
this.planTemplateData[0].building[this.clicki].body[4].attinf[attacki].tabletr[this.addNumber].tabletd.push('')
}
}
console.log(this.planTemplateData)
}
}
//单位概况删除一行
unitDel(surveyName,attacki){
const config = new MatSnackBarConfig();
config.verticalPosition = 'top';
config.duration = 3000
if(surveyName=='进攻通道'){
if (this.planTemplateData[0].building[this.clicki].body[4].attinf[attacki].tabletr != undefined) {
this.planTemplateData[0].building[this.clicki].body[4].attinf[attacki].tabletr.splice(this.planTemplateData[0].building[this.clicki].body[4].attinf[attacki].tabletr.length - 1, 1)
this.addNumber--
if (this.planTemplateData[0].building[this.clicki].body[4].attinf[attacki].tabletr.length == 0) {
this.addNumber = -1
}
} else {
this.snackBar.open('请先增加一行!', '确定', config);
}
}
}

5
src/app/statistic-analysis/deleteUnit/delete-two-newadd/delete-two-newadd.component.ts

@ -185,7 +185,12 @@ export class DeleteTwoNewaddComponent implements OnInit {
if (this.detailPlanEchart.containPixel('grid',pointInPixel)) {
let xIndex=this.detailPlanEchart.convertFromPixel({seriesIndex:0},[params.offsetX, params.offsetY])[0];
/*事件处理代码书写位置*/
if(this.serviceData.level=='0'){
this.router.navigate(['/statisticanalysis/delete_one/delete_there'],{queryParams:{'level':this.option.xAxis.data[xIndex],'headtext':this.buildingTypeName,'zhong':'1'}});
}else if(this.serviceData.level=='1'){
this.router.navigate(['/statisticanalysis/delete_one/delete_four'],{queryParams:{'level':this.option.xAxis.data[xIndex]+this.buildingTypeName}});
}
}
});
}

7
src/app/statistic-analysis/deleteUnit/delete-two/delete-two.component.ts

@ -4,7 +4,7 @@
* @Author: sueRimn
* @Date: 2020-09-02 16:21:18
* @LastEditors: sueRimn
* @LastEditTime: 2021-04-30 15:51:42
* @LastEditTime: 2021-06-24 15:27:13
*/
import { Component, OnInit, ViewChild } from '@angular/core';
import { Router } from '@angular/router';
@ -312,7 +312,12 @@ export class DeleteTwoComponent implements OnInit {
/*事件处理代码书写位置*/
//this.router.navigate(['/statisticanalysis/delete_one/delete_there'],{queryParams:{'level':this.options.xAxis.data[xIndex],'headtext':headtext}});
if(this.echartsData.dezhiorBuinding=="zhi"){
if(this.echartsData.level=='0'){
this.router.navigate(['/statisticanalysis/delete_one/delete_there'],{queryParams:{'level':this.options.xAxis.data[xIndex],'headtext':headtext}});
}else if(this.echartsData.level=='1'){
this.router.navigate(['/statisticanalysis/delete_one/delete_four'],{queryParams:{'level':this.options.xAxis.data[xIndex]+headtext}});
}
}else{
this.router.navigate(['/statisticanalysis/delete_two_newadd'],{queryParams:{'level':this.options.xAxis.data[xIndex],'headtext':headtext}});
}

2
src/app/statistic-analysis/echarts-data.service.ts

@ -14,7 +14,7 @@ export class EchartsDataService {
this.allEcharts=this.http.get("/api/StatisticsAnalysis")
//return this.allEcharts.data
}
level = sessionStorage.getItem("level");
level =String(sessionStorage.getItem("level"));
allEcharts
//计划首页
tableShow=false//控制首页表格显隐

10
src/app/statistic-analysis/scheduled-updates/publicEcharts.html

@ -4,13 +4,13 @@
* @Author: sueRimn
* @Date: 2020-09-05 08:59:24
* @LastEditors: sueRimn
* @LastEditTime: 2021-04-08 16:12:48
* @LastEditTime: 2021-06-24 16:43:49
-->
<div class="content">
<div class="header">
<div style="padding-right: 150px;" *ngIf="echartsData.findShow">
<button mat-raised-button (click)="zhiFind()" [ngClass]="{'selectButton': echartsData.zhiorBuinding=='zhi'}" style="margin:0 10px;" >队查询</button>
<div style="padding-right: 150px;" *ngIf="echartsData.scheduledUpdatesToggle==1">
<button mat-raised-button (click)="zhiFind()" [ngClass]="{'selectButton': echartsData.zhiorBuinding=='zhi'}" style="margin:0 10px;" >查询</button>
<button mat-raised-button (click)="buildingFind()" [ngClass]="{'selectButton': echartsData.zhiorBuinding=='building'}" >建筑类型查询</button>
</div>
@ -76,8 +76,8 @@
<div class="fixedCss">
<button mat-raised-button (click)='goBack()' >返回</button>
<button mat-raised-button (click)='verified()' [ngClass]="{'selectButton': isToggle}" style="margin:0 10px;" *ngIf="echartsData.scheduledUpdatesToggle">已核查</button>
<button mat-raised-button (click)='notVerified()' [ngClass]="{'selectButton': !isToggle}" *ngIf="echartsData.scheduledUpdatesToggle">未核查</button>
<button mat-raised-button (click)='verified()' [ngClass]="{'selectButton': isToggle}" style="margin:0 10px;" *ngIf="echartsData.scheduledUpdatesToggle!=3">已核查</button>
<button mat-raised-button (click)='notVerified()' [ngClass]="{'selectButton': !isToggle}" *ngIf="echartsData.scheduledUpdatesToggle!=3">未核查</button>
</div>
</div>

71
src/app/statistic-analysis/scheduled-updates/scheduled-updates.component.ts

@ -127,10 +127,26 @@ export class ScheduledUpdatesComponent implements OnInit {
if(params.name=="维护删除"){this.router.navigateByUrl('/statisticanalysis/delete_one/delete_two');}
else{
if(pieid=="pie"){
this.echartsData.scheduledUpdatesToggle = 1
this.echartsData.zhuXname=["平均值","维护无需修改","维护修改","维护删除"]
}else{this.echartsData.zhuXname=["平均值","维护中","维护通过审核","未维护"]}
this.router.navigateByUrl('/statisticanalysis/scheduledUpdates/PublicEcharts');
}else{
this.echartsData.zhuXname=["平均值","维护中","维护通过审核","未维护"]
//this.router.navigateByUrl('/statisticanalysis/scheduledUpdates/PublicEcharts');
if(this.echartsData.level=='0'){
//总队跳转
this.echartsData.scheduledUpdatesToggle = 2
this.router.navigateByUrl('/statisticanalysis/scheduledUpdates/PublicEcharts');
this.echartsData.findShow=false
}else if(this.echartsData.level=='1'){
this.echartsData.scheduledUpdatesToggle = 3
this.echartsData.findShow=false
this.router.navigateByUrl('/statisticanalysis/scheduledUpdates/PublicEcharts');
}
}
}
//console.log(this.echartsData.scheduledUpdatesToggle)
});
}
@ -180,7 +196,7 @@ export class publicEchartsComponent implements OnInit {
@ViewChild('verified')verifieds :verifiedComponent; //父组件中获得子组件的引用
ngOnInit(): void {
this.echartsData.scheduledUpdatesToggle = 1
//this.echartsData.scheduledUpdatesToggle = 1
this.dateInit()
}
@ -257,9 +273,10 @@ export class publicEchartsComponent implements OnInit {
//已核查
verified () {
this.isToggle = true
this.echartsData.findShow=true
//this.echartsData.scheduledUpdatesToggle ="one"
this.echartsData.level=='1'? this.echartsData.findShow=true:this.echartsData.findShow=false
this.echartsData.scheduledUpdatesToggle =1
//this.echartsData.scheduledUpdatesToggle ="one"
//this.echartsData.level=='0'? this.echartsData.scheduledUpdatesToggle =1:this.echartsData.level=='1'?this.echartsData.scheduledUpdatesToggle =3:''
}
//未核查
@ -272,7 +289,7 @@ export class publicEchartsComponent implements OnInit {
//返回
goBack () {
if(this.echartsData.scheduledUpdatesToggle==1||this.echartsData.scheduledUpdatesToggle==-3){
/* if(this.echartsData.scheduledUpdatesToggle==1||this.echartsData.scheduledUpdatesToggle==-3){
this.router.navigateByUrl('/statisticanalysis/scheduledUpdates');
}else{
this.echartsData.scheduledUpdatesToggle--
@ -280,7 +297,8 @@ export class publicEchartsComponent implements OnInit {
this.echartsData.findShow=true
//this.router.navigateByUrl('/statisticanalysis/scheduledUpdates');
}
}
} */
window.history.go(-1)
}
//更多 窗口
@ -311,7 +329,7 @@ export class publicEchartsComponent implements OnInit {
})
export class verifiedComponent implements OnInit {
constructor(private router: Router,public echartsData:EchartsDataService) { }
constructor(private router: Router,public echartsData:EchartsDataService,public snackBar: MatSnackBar) { }
ngOnInit(): void {
window.setTimeout(()=>{
@ -460,6 +478,7 @@ export class verifiedComponent implements OnInit {
],
};
this.oneEcharts.getZr().on('click', (params) => {
if(this.echartsData.scheduledUpdatesToggle == 1){
/* const pointInPixel= [params.offsetX, params.offsetY];
if (this.oneEcharts.containPixel('grid',pointInPixel)) {
let xIndex=this.oneEcharts.convertFromPixel({seriesIndex:0},[params.offsetX, params.offsetY])[0];
@ -472,11 +491,31 @@ export class verifiedComponent implements OnInit {
/*事件处理代码书写位置*/
this.echartsData.scheduledUpdatesType = 0
//this.echartsData.scheduledUpdatesName = "ff"
this.echartsData.zhiorBuinding=="zhi"?this.echartsData.scheduledUpdatesToggle = 2:this.echartsData.scheduledUpdatesToggle = -2
this.echartsData.zhiorBuinding!="zhi"?this.echartsData.scheduledUpdatesToggle = -2:this.echartsData.level=='0'? this.echartsData.scheduledUpdatesToggle = 2:this.echartsData.level=='1'?this.echartsData.scheduledUpdatesToggle = 3:''
if(this.echartsData.zhiorBuinding!="zhi"){
this.echartsData.findShow=false
this.echartsData.scheduledUpdatesToggle = -2
if(this.echartsData.level=='0'){
this.echartsData.scheduledUpdatesToggle = 2
}else if(this.echartsData.level=='1'){
this.echartsData.scheduledUpdatesToggle = 3
}
}else{
this.echartsData.findShow=true
const config = new MatSnackBarConfig();
config.verticalPosition = 'top';
config.duration = 3000
if(this.echartsData.level=='2'){
this.snackBar.open('已经是最后一层!','确定',config);
}
}
//this.echartsData.scheduledUpdatesToggle = 2
this.echartsData.scheduledUpdatesXName=option.xAxis.data[xIndex]
this.echartsData.findShow=false
}
}
});
this.oneEcharts.setOption(option);
@ -698,7 +737,8 @@ export class notVerifiedComponent implements OnInit {
color: "#000", //刻度线标签颜色
formatter: '{value}'
},
data: ['浦东支队','黄浦支队','徐汇支队','长宁支队','静安支队','普陀支队','虹口支队','杨浦支队','闵行支队','宝山支队','嘉定支队','崇明支队','金山支队'],
data: this.echartsData.level=='0'? ['浦东支队','黄浦支队','徐汇支队','长宁支队','静安支队','普陀支队','虹口支队','杨浦支队','闵行支队','宝山支队','嘉定支队','崇明支队','金山支队']
:['浦东中队','黄浦中队','徐汇中队','长宁中队','静安中队','普陀中队','虹口中队','杨浦中队','闵行中队','宝山中队','嘉定中队','崇明中队','金山中队'],
},
series: [
{
@ -789,6 +829,7 @@ export class yueDateComponent implements OnInit {
}
},
legend: {
right:10,
data: this.echartsData.zhuXname,
textStyle: { fontSize :16,color: '#000' }
},
@ -1103,7 +1144,12 @@ export class yuebuildingDateComponent implements OnInit {
this.echartsData.scheduledUpdatesType = 0
//console.log(option.xAxis[0].data[xIndex])
this.echartsData.scheduledUpdatesXName+= option.xAxis[0].data[xIndex]
if(this.echartsData.level=='0'){
this.echartsData.scheduledUpdatesToggle = 2
}else if(this.echartsData.level=='1'){
this.echartsData.scheduledUpdatesToggle = 3
}
//this.echartsData.scheduledUpdatesXName=option.xAxis.data[xIndex]
}
@ -1145,7 +1191,7 @@ export class detailedInformationComponent implements OnInit {
if (this.echartsData.scheduledUpdatesType ===0) { //已核查
var option = {
title: {
text: `${this.echartsData.scheduledUpdatesName}${this.echartsData.scheduledUpdatesXName}总数(0)`,
text: `总数(0)`,//${this.echartsData.scheduledUpdatesName}${this.echartsData.scheduledUpdatesXName}
top: -2,
right: 655,
textStyle:{
@ -1163,7 +1209,8 @@ export class detailedInformationComponent implements OnInit {
legend: {
//data: ['平均值','维护无需修改', '维护修改', '维护通过审核'],
data:this.echartsData.zhuXname,
textStyle: { color: '#000',fontSize: 16 }
textStyle: { color: '#000',fontSize: 16 },
right:20
},
xAxis: [{
axisLabel: {

2
src/app/statistic-analysis/scheduled-updates/verified.html

@ -4,7 +4,7 @@
* @Author: sueRimn
* @Date: 2020-09-05 08:59:24
* @LastEditors: sueRimn
* @LastEditTime: 2020-11-14 15:06:08
* @LastEditTime: 2021-06-24 10:42:22
-->
<app-yueDate *ngIf="echartsData.scheduledUpdatesToggle==2"></app-yueDate>
<app-detailedInformation *ngIf="echartsData.scheduledUpdatesToggle==3"></app-detailedInformation>

Loading…
Cancel
Save