Browse Source

[新增]合并分支

zhuzhou
chenjingyu 4 years ago committed by SHAOJIAHAO
parent
commit
b8d8b7ab9a
  1. 8
      src/app/plan-management/entry-plan-look/entry-plan-look.component.html
  2. 4
      src/app/statistic-analysis/all-plan/all-plan.component.html
  3. 47
      src/app/statistic-analysis/all-plan/all-plan.component.scss
  4. 62
      src/app/statistic-analysis/all-plan/all-plan.component.ts
  5. 29
      src/app/statistic-analysis/all-plan/previewImg.html
  6. 2
      src/app/statistic-analysis/real-monitoring/real-monitoring.component.ts
  7. 10
      src/app/statistic-analysis/state/page-one/page-one.component.ts
  8. 3
      src/app/statistic-analysis/statistic-analysis.module.ts

8
src/app/plan-management/entry-plan-look/entry-plan-look.component.html

@ -4,7 +4,7 @@
* @Author: sueRimn
* @Date: 2020-12-24 10:59:48
* @LastEditors: sueRimn
* @LastEditTime: 2021-03-25 14:48:39
* @LastEditTime: 2021-05-31 09:40:59
-->
<!-- <p>录入预案</p> -->
<div style="overflow: auto;height: 100%;">
@ -76,8 +76,8 @@
<th mat-header-cell *matHeaderCellDef>操作</th>
<td mat-cell *matCellDef="let element">
<span (click)="changeName(element)" *ngIf="element.auditStatus==8">改名</span>
<span (click)="editPlan(element)" [ngClass]="{'grey': !(element.auditStatus!='16' && element.auditStatus != '1')}">编辑</span>
<span (click)="lookPlan(element)">查看</span>
<!-- <span (click)="editPlan(element)" [ngClass]="{'grey': !(element.auditStatus!='16' && element.auditStatus != '1')}">编辑</span> -->
<span (click)="lookPlan(element)" *ngIf="element.planType!=16">查看</span>
<span (click)="readFile(element)" [ngClass]="{'grey': element.planMode == '1' || element.planMode == '2' || element.planMode == '3'}">下载</span>
<span (click)="deletePlan(element)" *ngIf="element.auditStatus==8">删除</span>
<span (click)="auditResult(element)">审批结果</span>
@ -88,7 +88,7 @@
<ng-container *ngIf="isoperation == 'false'" matColumnDef="operation">
<th mat-header-cell *matHeaderCellDef>操作</th>
<td mat-cell *matCellDef="let element">
<span (click)="lookPlan(element)">查看</span>
<span (click)="lookPlan(element)" *ngIf="element.planType!=16">查看</span>
<span (click)="readFile(element)" [ngClass]="{'grey': element.planMode == '1' || element.planMode == '2' || element.planMode == '3'}">下载</span>
</td>
</ng-container>

4
src/app/statistic-analysis/all-plan/all-plan.component.html

@ -4,7 +4,7 @@
* @Author: sueRimn
* @Date: 2021-03-05 15:57:08
* @LastEditors: sueRimn
* @LastEditTime: 2021-03-24 14:19:05
* @LastEditTime: 2021-05-31 10:18:47
-->
<div class="body">
<div class="topbox">
@ -38,7 +38,7 @@
<ng-container matColumnDef="operation">
<th mat-header-cell *matHeaderCellDef style="width: 10%;">操作</th>
<td mat-cell *matCellDef="let element" style="white-space: nowrap;cursor: pointer;">
<span style="color: blue;" (click)='lookPlan(element)'>详情</span>
<span style="color: blue;" (click)='lookPlan(element)'>详情</span>
</td>
</ng-container>
<tr mat-header-row *matHeaderRowDef="displayedColumns"></tr>

47
src/app/statistic-analysis/all-plan/all-plan.component.scss

@ -73,4 +73,51 @@
text-decoration:underline
}
}
}
//预览图片旋转角度
.rotateA {transform: rotate(90deg) scale(0.75);}
.rotateB {transform: rotate(180deg)}
.rotateC {transform: rotate(270deg) scale(0.75);}
@media screen and (max-width:1200px){
.bigimgbox{
width: 880px;
height: 580px;
//预览图片
.previewImgBox {
width: 800px;
height: 475px;
text-align: center;
}
}
}
@media screen and (min-width:1200px) and (max-width:1400px){
.bigimgbox{
width:880px;
height: 610px;
//预览图片
.previewImgBox {
width: 800px;
height: 500px;
text-align: center;
}
}
}
@media screen and (min-width:1400px){
.bigimgbox{
width:1110px;
height: 860px;
//预览图片
.previewImgBox {
width: 900px;
height: 100%;
text-align: center;
}
.previewImgBottom {
text-align: center;
height: 30px;
margin: 20px auto;
}
}
}

62
src/app/statistic-analysis/all-plan/all-plan.component.ts

@ -4,7 +4,7 @@
* @Author: sueRimn
* @Date: 2021-03-15 11:32:30
* @LastEditors: sueRimn
* @LastEditTime: 2021-05-17 17:19:25
* @LastEditTime: 2021-05-31 10:07:51
*/
import { Component, OnInit, ViewChild, Inject } from '@angular/core';
import { HttpClient } from '@angular/common/http'
@ -20,7 +20,7 @@ import { TreeService } from '../../http-interceptors/tree.service'
import { MatTableDataSource } from '@angular/material/table';
import { Viewer } from 'photo-sphere-viewer';
declare var CryptoJS
import Swiper from 'swiper';
@Component({
selector: 'app-all-plan',
templateUrl: './all-plan.component.html',
@ -91,6 +91,13 @@ export class AllPlanComponent implements OnInit {
data: e.attachmentUrls[0]
});
}
else if(e.attachmentUrls[0].substr(e.attachmentUrls[0].length-3,e.attachmentUrls[0].length)=='JPG'||e.attachmentUrls[0].substr(e.attachmentUrls[0].length-3,e.attachmentUrls[0].length)=='png'||e.attachmentUrls[0].substr(e.attachmentUrls[0].length-3,e.attachmentUrls[0].length)=='jpeg'||e.attachmentUrls[0].substr(e.attachmentUrls[0].length-3,e.attachmentUrls[0].length)=='jpg'){
let data = e
const dialogRef = this.dialog.open(ImgDetails, {//调用open方法打开对话框并且携带参数过去
data:data.attachmentUrls,
});
dialogRef.afterClosed().subscribe();
}
else /* if(e.attachmentUrls[0].substr(e.attachmentUrls[0].length-4,e.attachmentUrls[0].length-1)=='docx'||e.attachmentUrls[0].substr(e.attachmentUrls[0].length-3,e.attachmentUrls[0].length)=='pdf'
||e.attachmentUrls[0].substr(e.attachmentUrls[0].length-3,e.attachmentUrls[0].length)=='doc'||e.attachmentUrls[0].substr(e.attachmentUrls[0].length-3,e.attachmentUrls[0].length)=='DOC'
||e.attachmentUrls[0].substr(e.attachmentUrls[0].length-3,e.attachmentUrls[0].length)=='txt'||e.attachmentUrls[0].substr(e.attachmentUrls[0].length-3,e.attachmentUrls[0].length)=='JPG') */{
@ -122,7 +129,11 @@ export class AllPlanComponent implements OnInit {
var stringjson=JSON.stringify(json)
var wordArray = CryptoJS.enc.Utf8.parse(stringjson);
var base64 = CryptoJS.enc.Base64.stringify(wordArray);
window.open(`http://121.5.10.84:80/apps/editor/openPreview?data=${base64}`)
const config = new MatSnackBarConfig();
config.verticalPosition = 'top';
config.duration = 3000
this.snackBar.open('该预案无法查看!','确定',config);
//window.open(`http://10.81.73.39:18080/apps/editor/openPreview?data=${base64}`)
})
}
}
@ -169,4 +180,49 @@ export class PsViewer{
});
}
}
//普通图片弹窗
@Component({
selector: 'imgdetails',
templateUrl: './previewImg.html',
styleUrls: ['./all-plan.component.scss']
})
export class ImgDetails{
constructor(private http:HttpClient,public dialog: MatDialog,public dialogRef: MatDialogRef<ImgDetails>,
@Inject(MAT_DIALOG_DATA) public data) { }
testSwiper: Swiper;
ngOnInit(): void {
//console.log(this.data)
this.allImages = []
this.data.forEach(element => {
element = `/api/Objects/PlanPlatform/${element}?x-oss-process=image/auto-orient,1`
this.allImages.push(element)
});
//this.allImages.push(`${this.data.attachmentUrls[0]}?x-oss-process=image/auto-orient,1`)
}
ngAfterViewInit() {
this.testSwiper = new Swiper('.swiper-container', {
lazy: true,
direction: 'horizontal',
loop: false,
// 如果需要前进后退按钮
navigation: {
nextEl: '.swiper-button-next',
prevEl: '.swiper-button-prev',
}
});
}
allImages:any; //展示所有的图片
rotationAngle:number=0; //旋转角度
//旋转图片
rotate () {
this.rotationAngle = this.rotationAngle+90
if (this.rotationAngle === 360) {this.rotationAngle = 0}
}
}

29
src/app/statistic-analysis/all-plan/previewImg.html

@ -0,0 +1,29 @@
<!--
* @Descripttion:
* @version:
* @Author: sueRimn
* @Date: 2021-05-18 15:09:43
* @LastEditors: sueRimn
* @LastEditTime: 2021-05-18 15:25:35
-->
<div class="bigimgbox">
<!-- <div mat-dialog-title>图片详情</div> -->
<div class="swiper-container">
<div class="swiper-wrapper">
<div *ngFor="let item of allImages" class="swiper-slide previewImgBox">
<img [ngClass]="{'rotateA':rotationAngle==90,'rotateB':rotationAngle==180,'rotateC':rotationAngle==270}" class="swiper-lazy"
[attr.data-src]="item">
<div class="swiper-lazy-preloader"></div>
</div>
</div>
<!-- 如果需要导航按钮 -->
<div class="swiper-button-prev"></div>
<div class="swiper-button-next"></div>
</div>
<div class="previewImgBottom">
<button type="button" mat-icon-button (click)='rotate()'><mat-icon>refresh</mat-icon></button>
</div>
</div>

2
src/app/statistic-analysis/real-monitoring/real-monitoring.component.ts

@ -4,7 +4,7 @@
* @Author: sueRimn
* @Date: 2021-05-08 09:42:43
* @LastEditors: sueRimn
* @LastEditTime: 2021-05-19 14:46:30
* @LastEditTime: 2021-05-31 09:47:55
*/
import { Component, OnInit } from '@angular/core';
import { ActivatedRoute, Router } from '@angular/router';

10
src/app/statistic-analysis/state/page-one/page-one.component.ts

@ -4,7 +4,7 @@
* @Author: sueRimn
* @Date: 2020-09-01 15:24:39
* @LastEditors: sueRimn
* @LastEditTime: 2021-04-29 09:11:46
* @LastEditTime: 2021-05-31 09:59:49
*/
import { Component, OnInit } from '@angular/core';
import { Router } from '@angular/router';
@ -116,11 +116,9 @@ export class PageOneComponent implements OnInit {
},
data:tid=='pieone'?[
{value:this.tabledata[0].planCategoryStatistics.planCategories[0]!=undefined? this.tabledata[0].planCategoryStatistics.planCategories[0].count:0, name: 'Ⅰ级预案', planStatusName:this.tabledata[0].planCategoryStatistics.planCategories[0]!=undefined? this.tabledata[0].planCategoryStatistics.planCategories[0].planCategoryName:'',type:1},
{value:this.tabledata[0].planCategoryStatistics.planCategories[1]!=undefined? this.tabledata[0].planCategoryStatistics.planCategories[1].count:0, name: 'Ⅱ级预案', planStatusName:this.tabledata[0].planCategoryStatistics.planCategories[1]!=undefined? this.tabledata[0].planCategoryStatistics.planCategories[1].planCategoryName:'',type:2},
{value:this.tabledata[0].planCategoryStatistics.planCategories[2]!=undefined? this.tabledata[0].planCategoryStatistics.planCategories[2].count:0, name: 'Ⅲ级预案', planStatusName:this.tabledata[0].planCategoryStatistics.planCategories[2]!=undefined? this.tabledata[0].planCategoryStatistics.planCategories[2].planCategoryName:'',type:3},
{value:this.tabledata[0].planCategoryStatistics.planCategories[3]!=undefined? this.tabledata[0].planCategoryStatistics.planCategories[3].count:0, name: 'Ⅳ级预案', planStatusName:this.tabledata[0].planCategoryStatistics.planCategories[3]!=undefined? this.tabledata[0].planCategoryStatistics.planCategories[3].planCategoryName:'',type:4},
{value:this.tabledata[0].planCategoryStatistics.planCategories[4]!=undefined? this.tabledata[0].planCategoryStatistics.planCategories[4].count:0, name: 'Ⅴ级预案', planStatusName:this.tabledata[0].planCategoryStatistics.planCategories[4]!=undefined? this.tabledata[0].planCategoryStatistics.planCategories[4].planCategoryName:'',type:5},
{value:this.tabledata[0].planCategoryStatistics.planCategories[0]!=undefined? this.tabledata[0].planCategoryStatistics.planCategories[0].count:0, name: 'Ⅲ级预案', planStatusName:this.tabledata[0].planCategoryStatistics.planCategories[0]!=undefined? this.tabledata[0].planCategoryStatistics.planCategories[0].planCategoryName:'',type:3},
{value:this.tabledata[0].planCategoryStatistics.planCategories[1]!=undefined? this.tabledata[0].planCategoryStatistics.planCategories[1].count:0, name: 'Ⅳ级预案', planStatusName:this.tabledata[0].planCategoryStatistics.planCategories[1]!=undefined? this.tabledata[0].planCategoryStatistics.planCategories[1].planCategoryName:'',type:4},
{value:this.tabledata[0].planCategoryStatistics.planCategories[2]!=undefined? this.tabledata[0].planCategoryStatistics.planCategories[2].count:0, name: 'Ⅴ级预案', planStatusName:this.tabledata[0].planCategoryStatistics.planCategories[2]!=undefined? this.tabledata[0].planCategoryStatistics.planCategories[2].planCategoryName:'',type:5},
]: [
{value:this.tabledata[0].planStatusStatistics.planStatuses[0]!=undefined? this.tabledata[0].planStatusStatistics.planStatuses[0].count:0, name: '预案新增',type:1,planStatusName:this.tabledata[0].planStatusStatistics.planStatuses[0]!=undefined?this.tabledata[0].planStatusStatistics.planStatuses[0].planStatusName:''},
{value:this.tabledata[0].planStatusStatistics.planStatuses[2]!=undefined? this.tabledata[0].planStatusStatistics.planStatuses[2].count:0, name: '预案审核通过',type:3,planStatusName:this.tabledata[0].planStatusStatistics.planStatuses[2]!=undefined? this.tabledata[0].planStatusStatistics.planStatuses[2].planStatusName:''},

3
src/app/statistic-analysis/statistic-analysis.module.ts

@ -74,9 +74,10 @@ import { PsViewer }from './all-plan/all-plan.component';
import { GkPsViewer2, PlanAnalysisBySynthesisComponent } from './plan-analysis-by-synthesis/plan-analysis-by-synthesis.component'
import { PlanManagementModule } from '../plan-management/plan-management.module';
import { RealMonitoringComponent } from './real-monitoring/real-monitoring.component'
import { ImgDetails } from './all-plan/all-plan.component'
@NgModule({
declarations: [GkPsViewer2,PageOneComponent, PageTwoTimeComponent, PageTwoNameComponent, PageZhongDuiDetailsComponent,echartsComponent, DeleteOneComponent, DeleteTwoComponent, DeleteThereComponent, DeleteFourComponent, BuildingTypeOneComponent, ScheduledUpdatesComponent,publicEchartsComponent,verifiedComponent,notVerifiedComponent,detailedInformationComponent,moreTableComponent,yueDateComponent,yuebuildingDateComponent,indexConditionComponent, BuildingTypeTwoForwardComponent, BuildingTypeTwoReverseComponent, BuildingTypeThreeDetailsComponent, AddUnitOneComponent, AddUnitTwoTypeStatisticsComponent, AddUnitTwoTypeDetailsComponent, AddUnitTwoTimeComponent,AddUnitThreeLineDetailsComponent,AddUnitThreeBarDetailsComponent, HomeComponent, DeleteThereLineDetailsComponent, PageThereComponent, PageThereYearComponent, DeleteTwoNewaddComponent, CompangInfoComponent, AllPlanComponent,PsViewer, RealMonitoringComponent,PlanAnalysisBySynthesisComponent],
declarations: [GkPsViewer2,PageOneComponent, PageTwoTimeComponent, PageTwoNameComponent, PageZhongDuiDetailsComponent,echartsComponent, DeleteOneComponent, DeleteTwoComponent, DeleteThereComponent, DeleteFourComponent, BuildingTypeOneComponent, ScheduledUpdatesComponent,publicEchartsComponent,verifiedComponent,notVerifiedComponent,detailedInformationComponent,moreTableComponent,yueDateComponent,yuebuildingDateComponent,indexConditionComponent, BuildingTypeTwoForwardComponent, BuildingTypeTwoReverseComponent, BuildingTypeThreeDetailsComponent, AddUnitOneComponent, AddUnitTwoTypeStatisticsComponent, AddUnitTwoTypeDetailsComponent, AddUnitTwoTimeComponent,AddUnitThreeLineDetailsComponent,AddUnitThreeBarDetailsComponent, HomeComponent, DeleteThereLineDetailsComponent, PageThereComponent, PageThereYearComponent, DeleteTwoNewaddComponent, CompangInfoComponent, AllPlanComponent,PsViewer, RealMonitoringComponent,PlanAnalysisBySynthesisComponent,ImgDetails],
imports: [
CommonModule,
StatisticAnalysisRoutingModule,

Loading…
Cancel
Save