Browse Source

[修改]隐藏首页上海总队的统计

tangshan
chenjingyu 4 years ago
parent
commit
37ef7da2e9
  1. 8
      src/app/plan-management/create-plan-online-five/create-plan-online-five.component.html
  2. 16
      src/app/plan-management/create-plan-online-five/create-plan-online-five.component.scss
  3. 7
      src/app/statistic-analysis/home/home.component.ts
  4. 40
      src/app/ui/plan-template/plan-template.component.html
  5. 16
      src/app/ui/plan-template/plan-template.component.scss
  6. 174
      src/app/ui/plan-template/plan-template.component.ts
  7. BIN
      src/assets/images/downpaixu.png
  8. BIN
      src/assets/images/routleft.png
  9. BIN
      src/assets/images/toppaixu.png

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

@ -442,7 +442,7 @@
flex-direction: column;">
<div class="boxBodyHead" style="width: 100%;
height: 40pt;
background-color: #FFD91D;
background-color: #FFFBE8;
text-align: center;">
<span style="font-size: 16px;
text-align: center;
@ -811,7 +811,7 @@
<div *ngFor="let attack of element.attinf;let attacki=index">
<div class="attackhead" style=" width: 100%;
height: 40px;
background-color: #ffd91d;
background-color: #FFFBE8;
text-align: center;">
<span style="font-size: 16px;
text-align: center;
@ -924,7 +924,7 @@
<div *ngIf="attack.completed">
<div class="fileHead" style="height: 40px;
width: 100%;
background-color: #ffd91d;
background-color: #FFFBE8;
text-align: center;">
<span style="font-size: 16px;
text-align: center;
@ -1007,7 +1007,7 @@
<div *ngFor="let parts of element.attinf;let infoi=index">
<div class="partsHead" style="width: 100%;
height: 40px;
background-color: #ffd91d;
background-color: #FFFBE8;
text-align: center;">
<input type="text" placeholder="请输入内容" [(ngModel)]="parts.heafName" *ngIf="pattern == 'edit'">
<textarea [(ngModel)]="parts.heafName" *ngIf="pattern == 'look'" style="width: 100%;height: 100%;color: #b99a00;" disabled></textarea>

16
src/app/plan-management/create-plan-online-five/create-plan-online-five.component.scss

@ -468,7 +468,7 @@
.boxBodyHead {
width: 100%;
height: 40px;
background-color: #ffd91d;
background-color: #FFFBE8;
text-align: center;
span {
font-size: 16px;
@ -731,7 +731,7 @@
.attackhead {
width: 100%;
height: 40px;
background-color: #ffd91d;
background-color: #FFFBE8;
text-align: center;
span {
font-size: 16px;
@ -833,7 +833,7 @@
.fileHead{
height: 40px;
width: 100%;
background-color: #ffd91d;
background-color: #FFFBE8;
text-align: center;
span {
font-size: 16px;
@ -896,14 +896,14 @@
.partsHead{
width: 100%;
height: 40px;
background-color: #ffd91d;
background-color: #FFFBE8;
text-align: center;
input{
height: 40px;
font-size: 16px;
border: none;
outline: none;
background-color: #ffd91d;
background-color: #FFFBE8;
color: #b99a00;
}
img {
@ -1038,9 +1038,9 @@
.attackleftHead {
width: 100%;
height: 40px;
background-color: #ffd91d;
background-color: #FFFBE8;
input {
background-color: #ffd91d;
background-color: #FFFBE8;
color: #b99a00;
text-align: center;
height: 100%;
@ -1202,7 +1202,7 @@
width: 100%;
height: 40px;
margin-top: 3%;
background-color: #ffd91d;
background-color: #FFFBE8;
text-align: center;
span {
font-size: 16px;

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

@ -350,8 +350,11 @@ export class HomeComponent implements OnInit {
this.addydata = []
this.addtable = JSON.parse(JSON.stringify(this.emitService.allDate))
this.addtable[0].organizationStatistics.organizations.forEach((value, index, array) => {
this.addxdata.push(array[index].organizationName)
this.addydata.push(array[index].count)
if(array[index].organizationId!='5687316efa75479d96c0091a167a3b84'&&array[index].organizationName!='上海总队'){
this.addxdata.push(array[index].organizationName)
this.addydata.push(array[index].count)
}
});
let chartDwsjcjOptionsZhi = {
// 标题

40
src/app/ui/plan-template/plan-template.component.html

@ -4,7 +4,7 @@
* @Author: sueRimn
* @Date: 2021-05-19 15:50:20
* @LastEditors: sueRimn
* @LastEditTime: 2021-09-04 11:13:31
* @LastEditTime: 2021-09-10 10:33:07
-->
<div class="box">
<div class="boxleft">
@ -48,20 +48,24 @@
<div class="rightbody">
<mat-accordion *ngFor="let item of group;let zi=index;TrackBy:trackByFn" multi>
<!-- 基本信息 -->
<mat-expansion-panel expanded (opened)='groupPanle=true' *ngIf="item.completed" style="box-shadow: 0 0 black;border: 1px solid #EEF1F5;" [disabled]='groupPanle==true'>
<mat-expansion-panel (opened)="openpan(zi)" (closed)='closepan()' *ngIf="item.completed" style="box-shadow: 0 0 black;border: 1px solid #EEF1F5;" MatAccordionTogglePosition='after'>
<mat-expansion-panel-header collapsedHeight='40px' expandedHeight='40px' class="panelhead">
<mat-panel-title class="paneltitle">
<div style="width: 100%;height: 100%;display: flex;">
<div class="groupName">
<!-- <img src="../../../assets/images/routleft.png" *ngIf="openKey!=zi">
<img src="../../../assets/images/routdown.png" *ngIf="openKey==zi" style="position: relative;bottom: 2px;"> -->
<span>{{item.groupName}}</span>
</div>
<div class="caozuotwo">
<img src="../../../assets/images/toppaixu.png" alt="" style="height: 15px;position: relative;top: 3px;" (click)='topPai(zi)' *ngIf="zi!=0">
<img src="../../../assets/images/downpaixu.png" alt="" style="height: 15px;position: relative;top: 3px;left: 1px;" (click)='downPai(zi)'*ngIf="zi!=group.length-1">
<div *ngIf="item.groupName!='预案附件'&&item.groupName!='交通水源'&&item.groupName!='重点图示'" class="addinfo" (click)='addAttribute(item.groupName)'>
<img src="../../../assets/images/update.png" style="height: 15px;margin-top: 4px;">
<img src="../../../assets/images/update.png" style="height: 15px;margin-top: 4px;margin-left: 5px;">
<span style="margin-left: 2px;">编辑</span>
</div>
<div class="delinfo" (click)='deleteGroup(item.groupName)'>
<img src="../../../assets/images/deleteblue.png" style="margin-left: 20px;height: 15px;margin-top: 4px;">
<img src="../../../assets/images/deleteblue.png" style="margin-left: 10px;height: 15px;margin-top: 4px;">
<span style="margin-left: 2px;">删除</span>
</div>
</div>
@ -73,7 +77,7 @@
</mat-expansion-panel-header>
<!--单位概况-->
<div class="accordingin" *ngIf="item.groupName=='单位概况'">
<mat-accordion *ngFor="let element of item.attribute">
<mat-accordion *ngFor="let element of item.attribute;let suri=index">
<mat-expansion-panel expanded *ngIf="element.completed" expanded style="box-shadow: 0 0 black;border: 1px solid #EEF1F5;height: 100%;" [disabled]='groupPanle==true'>
<mat-expansion-panel-header collapsedHeight='50px' expandedHeight='50px' class="panelhead" style="background-color: #FFFFFF;">
<mat-panel-title style="font-size: 16px;color:#000000;" class="paneltitle">
@ -85,6 +89,8 @@
<button mat-raised-button color="#ECF6FF" (click)='delAttribute(item.groupName,element.surveyName)'><img src="../../../assets/images/deletehui.png"> 删除</button>
<button mat-raised-button color="primary" style="margin-right: 10px;" (click)='addAttInfo(element.surveyName)'
*ngIf="item.groupName=='单位概况'&&(element.surveyName=='单位基本信息'||element.surveyName=='建筑信息'||element.surveyName=='进攻通道'||element.surveyName=='消防设施')"><img src="../../../assets/images/addbai.png"> 编辑</button>
<img src="../../../assets/images/downpaixu.png" alt="" style="height: 15px;position: relative;top: 15px;left: 1px;margin-right: 5px;float: right;" (click)='zaiDown(zi,suri)'>
<img src="../../../assets/images/toppaixu.png" alt="" style="height: 15px;position: relative;top: 15px;float: right;" (click)='zaiTop(zi,suri)'>
</div>
</div>
@ -131,11 +137,14 @@
<th style="width: 30%;">操作</th>
</thead>
<tbody>
<tr *ngFor="let attinf of element.attinf">
<tr *ngFor="let attinf of element.attinf;let attfi=index">
<td *ngIf="attinf.completed" style="width: 30%;">{{attinf.propertyName}}</td>
<td *ngIf="attinf.completed" style="width: 30%;">
{{attinf.propertyType==0?'单行文本':attinf.propertyType==1?'多行文本':'数值'}}</td>
<td *ngIf="attinf.completed" style="width: 30%;"><span
<td *ngIf="attinf.completed" style="width: 30%;cursor: pointer;">
<img src="../../../assets/images/toppaixu.png" alt="" style="height: 15px;position: relative;top: 3px;" (click)='threeTop(zi,suri,attfi)'>
<img src="../../../assets/images/downpaixu.png" alt="" style="height: 15px;position: relative;top: 3px;left: 1px;margin-right: 1px;" (click)='threeDown(zi,suri,attfi)'>
<span
style="color: #FF5D4A;margin-left: 4px;cursor: pointer;"
(click)='delAttInfo(item.groupName,element.surveyName,attinf.propertyName)'> 删除</span></td>
</tr>
@ -149,7 +158,7 @@
style="box-shadow: 0 0 black;border: 1px solid #EEF1F5;height: 100%;"
[disabled]='groupPanle==true'>
<mat-expansion-panel-header collapsedHeight='50px' expandedHeight='50px' class="panelhead"
style="background-color: #FFD91D;">
style="background-color: #FFFBE8;">
<mat-panel-title class="paneltitle">
<div class="dwgk">
<div class="attname">
@ -162,6 +171,9 @@
<button mat-raised-button color="primary" style="margin-right: 10px;"
(click)='fileAdd(attinf.facilityItems,i)'><img src="../../../assets/images/addbai.png">
编辑</button>
<img src="../../../assets/images/downpaixu.png" alt="" style="height: 15px;margin-right: 8px;float: right;position: relative;top: 17px;" (click)='threeDown(zi,suri,i)'>
<img src="../../../assets/images/toppaixu.png" alt="" style="height: 15px;float: right;position: relative;top: 17px;" (click)='threeTop(zi,suri,i)'>
</div>
</div>
</mat-panel-title>
@ -180,8 +192,10 @@
<td *ngIf="facilityItems.completed!=null&&facilityItems.completed" style="width: 30%;">
文本类型</td>
<td *ngIf="facilityItems.completed!=null&&facilityItems.completed" style="width: 30%;">
<span style="color: #FF5D4A;margin-left: 4px;cursor: pointer;" (click)='fileDel(i,f)'>
删除</span></td>
<img src="../../../assets/images/toppaixu.png" alt="" style="height: 15px;margin-right: 2px;position: relative;top: 2px;" (click)='fileTop(zi,suri,i,f)'>
<img src="../../../assets/images/downpaixu.png" alt="" style="height: 15px;margin-right: 5px;position: relative;top: 2px;" (click)='fileDown(zi,suri,i,f)'>
<span style="color: #FF5D4A;margin-left: 4px;cursor: pointer;" (click)='fileDel(i,f)'>删除</span>
</td>
</tr>
</tbody>
</table>
@ -207,6 +221,8 @@
</div>
<div class="attackRight">
<div class="rightButton">
<img src="../../../assets/images/toppaixu.png" alt="" style="height: 15px;margin-right: 2px;position: relative;top: 2px;" (click)='threeTop(zi,suri,i)'>
<img src="../../../assets/images/downpaixu.png" alt="" style="height: 15px;margin-right: 5px;position: relative;top: 2px;" (click)='threeDown(zi,suri,i)'>
<button mat-raised-button color="primary" (click)='attackAdd(element.surveyName,i,8)'><img
src="../../../assets/images/addbai.png"> 新增</button>
<button mat-raised-button color="#ECF6FF" style="margin-left: 10px;"
@ -257,6 +273,8 @@
</div>
<div class="attackRight">
<div class="rightButton">
<img src="../../../assets/images/toppaixu.png" alt="" style="height: 15px;position: relative;top: 3px;" (click)='zaiTop(zi,attributei)'>
<img src="../../../assets/images/downpaixu.png" alt="" style="height: 15px;position: relative;top: 3px;left: 1px;margin-right: 5px;" (click)='zaiDown(zi,attributei)'>
<button mat-raised-button color="primary" (click)='attackAdd(item.groupName,attributei,element.level)'
*ngIf="element.level==1"><img src="../../../assets/images/addbai.png"> 新增</button>
<button mat-raised-button color="#ECF6FF" style="margin-left: 10px;"
@ -266,7 +284,7 @@
</div>
</div>
</div>
</mat-expansion-panel>
</mat-expansion-panel>
</mat-accordion>
</div>

16
src/app/ui/plan-template/plan-template.component.scss

@ -4,7 +4,7 @@
* @Author: sueRimn
* @Date: 2021-05-19 15:50:20
* @LastEditors: sueRimn
* @LastEditTime: 2021-08-02 09:47:06
* @LastEditTime: 2021-09-08 14:38:47
*/
.box {
height: 100%;
@ -157,6 +157,7 @@
.panelhead {
background-color: #e1f1ff;
height: 50px;
margin-top: 10px;
.paneltitle {
width: 100%;
font-size: 16px;
@ -165,6 +166,9 @@
//justify-content: space-around;
.groupName {
width: 100px;
span{
margin-left: 3px;
}
}
.caozuotwo{
width: 100%;
@ -218,6 +222,7 @@
margin-top: 8px;
}
img {
cursor: pointer;
position: relative;
bottom: 2px;
}
@ -254,10 +259,12 @@
.attackleftHead {
width: 100%;
height: 40px;
background-color: #ffd91d;
//background-color: #ffd91d;
background-color: #FFFBE8;
opacity: 0.7;
input {
background-color: #ffd91d;
color: #b99a00;
background-color: #FFFBE8;
color: #B99A00;
text-align: center;
height: 100%;
width: 100%;
@ -316,6 +323,7 @@
float: right;
margin-top: 20px;
margin-right: 8%;
cursor: pointer;
//margin-left: 40%;
}
}

174
src/app/ui/plan-template/plan-template.component.ts

@ -4,16 +4,16 @@
* @Author: sueRimn
* @Date: 2021-05-31 10:40:01
* @LastEditors: sueRimn
* @LastEditTime: 2021-09-02 14:06:11
* @LastEditTime: 2021-09-09 15:09:39
*/
import { Component, Inject, OnInit,ViewEncapsulation } from '@angular/core';
import { Component, Inject, OnInit,ViewEncapsulation,ViewChild } from '@angular/core';
import { HttpClient } from '@angular/common/http'
import { MatDialogRef, MatDialog, MAT_DIALOG_DATA } from '@angular/material/dialog';
import { MatSnackBar, MatSnackBarConfig } from '@angular/material/snack-bar';
import {FlatTreeControl, NestedTreeControl} from '@angular/cdk/tree';
import {MatTreeFlatDataSource, MatTreeFlattener, MatTreeNestedDataSource} from '@angular/material/tree';
import {MatAccordion} from '@angular/material/expansion';
@Component({
selector: 'app-plan-template',
//encapsulation: ViewEncapsulation.None,
@ -21,7 +21,7 @@ import {MatTreeFlatDataSource, MatTreeFlattener, MatTreeNestedDataSource} from '
styleUrls: ['./plan-template.component.scss']
})
export class PlanTemplateComponent implements OnInit {
@ViewChild(MatAccordion) accordion: MatAccordion;
constructor(private http:HttpClient,public dialog: MatDialog,public snackBar: MatSnackBar) {
@ -345,6 +345,8 @@ export class PlanTemplateComponent implements OnInit {
console.log(this.newleftTabledata)
});
}
this.groupPanle=true
this.accordion.closeAll()
}
//删除具体属性
delAttribute(groupName,surveyName){
@ -555,7 +557,169 @@ export class PlanTemplateComponent implements OnInit {
//单位基本信息和建筑信息表格
displayedColumns: string[] = ['name','level','default','must', 'danwei','operation'];
//展开按钮
openKey=100
openpan(key){
this.openKey=key
}
//展开的内容关闭
closepan(){
this.openKey=100
}
//向上排序
topPai(key){
var temp
if(key==0){
/* for(var i=this.group.length;i>0;i--){
if(this.group[i].completed){
temp=this.group[i]
this.group[i]=this.group[key]
for(var a=i-1;a<=0;a--){
var tempa
tempa=this.group[a-1]
this.group[a-1]=this.group[a]
this.group[a-1]=tempa
}
}
} */
}else if(key!=0){
for(var i=key-1;i>=0;i--){
if(this.group[i].completed){
temp=this.group[i]
this.group[i]=this.group[key]
this.group[key]=temp
return
}
}
}
//this.accordion.openAll()
}
//向下排序
downPai(key){
var temp
/* for (let index = this.group.length-1; index > this.group.length; index--) {
if(this.group[index].completed&&key==index){
return
}else{
}
} */
if(key!=this.group.length-1){
for (let index = key+1; index < this.group.length; index++) {
if(this.group[index].completed){
temp=this.group[index]
this.group[index]=this.group[key]
this.group[key]=temp
return
}
}
}
//this.accordion.openAll()
}
//第二层向上排序
zaiTop(zi,attributei){
var temp
if(attributei!=0){
for (let index = attributei-1; index >=0; index--) {
if(this.group[zi].attribute[index].completed){
temp=this.group[zi].attribute[index]
this.group[zi].attribute[index]=this.group[zi].attribute[attributei]
this.group[zi].attribute[attributei]=temp
return
}
}
}
//this.accordion.openAll()
}
//第二层向下排序
zaiDown(zi,attributei){
var temp
if (attributei!=this.group[zi].attribute.length-1) {
for (let index = attributei+1; index < this.group[zi].attribute.length; index++) {
if(this.group[zi].attribute[index].completed){
temp=this.group[zi].attribute[index]
this.group[zi].attribute[index]=this.group[zi].attribute[attributei]
this.group[zi].attribute[attributei]=temp
return
}
}
}
//this.accordion.openAll()
}
//单位概况第三层向上排序
threeTop(zi,attributei,attfi){
var temp
if(attfi!=0){
for (let index = attfi-1; index >=0; index--) {
if(this.group[zi].attribute[attributei].attinf[index].completed){
temp=this.group[zi].attribute[attributei].attinf[index]
this.group[zi].attribute[attributei].attinf[index]=this.group[zi].attribute[attributei].attinf[attfi]
this.group[zi].attribute[attributei].attinf[attfi]=temp
return
}
}
}
}
//单位概况第三层向下排序
threeDown(zi,attributei,attfi){
var temp
if (attfi!=this.group[zi].attribute[attributei].attinf.length-1) {
for (let index = attfi+1; index < this.group[zi].attribute[attributei].attinf.length; index++) {
if(this.group[zi].attribute[attributei].attinf[index].completed){
temp=this.group[zi].attribute[attributei].attinf[index]
this.group[zi].attribute[attributei].attinf[index]=this.group[zi].attribute[attributei].attinf[attfi]
this.group[zi].attribute[attributei].attinf[attfi]=temp
return
}
}
}
}
//消防设施表格向上排序
fileTop(zi,attributei,attfi,fi){
var temp
if(fi!=0){
for (let index = fi-1; index >=0; index--) {
if(this.group[zi].attribute[attributei].attinf[attfi].facilityItems[index].completed){
temp=this.group[zi].attribute[attributei].attinf[attfi].facilityItems[index]
this.group[zi].attribute[attributei].attinf[attfi].facilityItems[index]=this.group[zi].attribute[attributei].attinf[attfi].facilityItems[fi]
this.group[zi].attribute[attributei].attinf[attfi].facilityItems[fi]=temp
return
}
}
}
}
//消防设施表格向下排序
fileDown(zi,attributei,attfi,fi){
var temp
if (attfi!=this.group[zi].attribute[attributei].attinf[attfi].facilityItems.length-1) {
for (let index = fi+1; index < this.group[zi].attribute[attributei].attinf[attfi].facilityItems.length; index++) {
if(this.group[zi].attribute[attributei].attinf[attfi].facilityItems[index].completed){
temp=this.group[zi].attribute[attributei].attinf[attfi].facilityItems[index]
this.group[zi].attribute[attributei].attinf[attfi].facilityItems[index]=this.group[zi].attribute[attributei].attinf[attfi].facilityItems[fi]
this.group[zi].attribute[attributei].attinf[attfi].facilityItems[fi]=temp
return
}
}
}
}
}
//新建预案
@Component({

BIN
src/assets/images/downpaixu.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 434 B

BIN
src/assets/images/routleft.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 175 B

BIN
src/assets/images/toppaixu.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 427 B

Loading…
Cancel
Save