Browse Source

[修改]修改查看预案代码:完善icon

tangshan
邵佳豪 3 years ago
parent
commit
428490d145
  1. 31
      src/app/plan-management/entry-plan-look/entry-plan-look.component.html
  2. 3
      src/app/plan-management/entry-plan-look/entry-plan-look.component.scss
  3. 25
      src/app/plan-management/entry-plan-look/entry-plan-look.component.spec.ts
  4. 7
      src/app/plan-management/entry-plan-look/entry-plan-look.component.ts
  5. 4
      src/app/plan-management/entry-plan/entry-plan.component.html
  6. 13
      src/app/plan-management/entry-plan/entry-plan.component.ts
  7. 19
      src/app/plan-management/open-plan/open-plan.component.html
  8. 42
      src/app/plan-management/open-plan/open-plan.component.ts
  9. 19
      src/app/plan-management/pass-plan/pass-plan.component.html
  10. 38
      src/app/plan-management/pass-plan/pass-plan.component.ts
  11. 14
      src/app/statistic-analysis/combined-query/combined-query.component.html
  12. 7
      src/app/statistic-analysis/combined-query/combined-query.component.ts
  13. BIN
      src/assets/images/back.png
  14. BIN
      src/assets/images/custom.png
  15. BIN
      src/assets/images/template.png

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

@ -66,13 +66,24 @@
</ng-container>
<ng-container matColumnDef="planCategory">
<th mat-header-cell *matHeaderCellDef>预案级别</th>
<td mat-cell *matCellDef="let element">{{element.planCategory=='3'?'Ⅲ级预案':element.planCategory=='4'?'Ⅳ级预案':'Ⅴ级预案'}}</td>
<td mat-cell *matCellDef="let element">
{{element.planCategory=='3'?'Ⅲ级预案':element.planCategory=='4'?'Ⅳ级预案':'Ⅴ级预案'}}</td>
</ng-container>
<ng-container matColumnDef="plantype">
<th mat-header-cell *matHeaderCellDef>预案类型</th>
<td mat-cell *matCellDef="let element">{{element.planType | plantype}}</td>
<th mat-header-cell *matHeaderCellDef style="width: 150px;">预案类型</th>
<td mat-cell *matCellDef="let element" style="text-align: left;">
<span
style="margin:0px;margin-left: 31%; color: black;cursor: default;vertical-align: middle;">{{element.planType
|
plantype}}</span>
<img *ngIf="element.planType == 16 && element.attachmentUrls == null && element.planMode == 2"
style="vertical-align: middle;
margin: 2px 0 0 3px;" src="../../../assets/images/template.png" alt="">
<img *ngIf="element.planType == 16 && element.attachmentUrls == null && element.planMode == 4"
style="vertical-align: middle;
margin: 2px 0 0 3px;" src="../../../assets/images/custom.png" alt="">
</td>
</ng-container>
<ng-container matColumnDef="auditstate">
<th mat-header-cell *matHeaderCellDef>新增审核</th>
<td mat-cell *matCellDef="let element">
@ -97,18 +108,20 @@
<th mat-header-cell *matHeaderCellDef>操作</th>
<td mat-cell *matCellDef="let element">
<span (click)="changeName(element)" *ngIf="element.auditStatus==8">改名</span>
<span (click)="upzhuanMb(element)" *ngIf="element.planMode==1&&element.planType==16&&element.planCategory==5">转在线导入</span>
<span (click)="upzhuanMb(element)"
*ngIf="element.planMode==1&&element.planType==16&&element.planCategory==5">转在线导入</span>
<span (click)="editPlan(element)"
[ngClass]="{'grey': !(element.auditStatus!='16' && element.auditStatus != '1' )}">编辑</span>
<span (click)="lookPlan(element)" *ngIf="element.planType == 2 || element.planType == 16 ||element.planType==1">查看</span>
<span (click)="readFile(element)"
[ngClass]="{'grey':element.planMode == '3'}">下载</span>
<span (click)="lookPlan(element)"
*ngIf="element.planType == 2 || element.planType == 16 ||element.planType==1">查看</span>
<span (click)="readFile(element)" [ngClass]="{'grey':element.planMode == '3'}">下载</span>
<span (click)="deletePlan(element)" *ngIf="element.auditStatus==8">删除</span>
<span (click)="auditResult(element)">审批结果</span>
<span (click)="submitAudit(element)"
*ngIf="(element.isNewData && element.newVerifyState=='未提交审核')||(!element.isNewData&&(element.maintenanceVerifyState=='审核通过'||element.maintenanceVerifyState=='未提交审核'))">
提交审核</span>
<span (click)="cancelAudit(element)" *ngIf="element.auditStatus == 1||element.auditStatus == 16">撤销审核</span>
<span (click)="cancelAudit(element)"
*ngIf="element.auditStatus == 1||element.auditStatus == 16">撤销审核</span>
</td>
</ng-container>
<ng-container *ngIf="isoperation == 'false'" matColumnDef="operation">

3
src/app/plan-management/entry-plan-look/entry-plan-look.component.scss

@ -86,9 +86,6 @@
margin: 0 3px;
cursor: pointer;
}
span:hover{
text-decoration:underline
}
.grey{
color: grey;
pointer-events: none;

25
src/app/plan-management/entry-plan-look/entry-plan-look.component.spec.ts

@ -1,25 +0,0 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { EntryPlanLookComponent } from './entry-plan-look.component';
describe('EntryPlanLookComponent', () => {
let component: EntryPlanLookComponent;
let fixture: ComponentFixture<EntryPlanLookComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ EntryPlanLookComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(EntryPlanLookComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

7
src/app/plan-management/entry-plan-look/entry-plan-look.component.ts

@ -126,7 +126,6 @@ export class EntryPlanLookComponent implements OnInit {
});
dialogRef.afterClosed().subscribe();
} else {
let fetchUrl = e.attachmentUrls[0]
if (fetchUrl) {
let suffix = fetchUrl.split('.')[fetchUrl.split('.').length - 1].toLowerCase()
@ -145,9 +144,8 @@ export class EntryPlanLookComponent implements OnInit {
}
}
}
}
if (e.planType == 1) { //如果是在线编辑
if (e.planType == 1 && e.planMode == 2) { //如果是在线编辑
let id = e.id
sessionStorage.setItem("planId", id)
sessionStorage.setItem("companyId", this.companyId)
@ -157,7 +155,7 @@ export class EntryPlanLookComponent implements OnInit {
let companyId = sessionStorage.getItem("companyId")
window.open(`/keyUnit/viewunitinfoplan?id=${companyId}&orName=${this.route.snapshot.queryParams.orName}&orId=${this.route.snapshot.queryParams.orId}`);
}
if (e.planType == 2) { //如果是跳转网页
if (e.planType == 2 && e.planMode == 3) { //如果是跳转网页
if (e.url.indexOf('app') == 0) {
window.location.href = e.url
} else {
@ -531,6 +529,7 @@ export class EntryPlanLookComponent implements OnInit {
this.length = data.totalCount
this.allPlanComponents = data
this.tabledataSource = data.items
console.log('预案列表', data.items)
/* if(this.tabledataSource.isNewData){
this.tabledataSource.auditStatus==8?this.audit=true:false
}else{

4
src/app/plan-management/entry-plan/entry-plan.component.html

@ -153,10 +153,10 @@
</mat-form-field>
</div>
<div class="queryField" *ngIf="!padMore&&!pcMore">
<mat-checkbox [(ngModel)]="templatePlan" name="templatePlan">模板录入预案</mat-checkbox>
<mat-checkbox (ngModelChange)="templatePlanChange($event,1)" [(ngModel)]="templatePlan" name="templatePlan">模板录入预案</mat-checkbox>
</div>
<div class="queryField" *ngIf="!padMore&&!pcMore">
<mat-checkbox [(ngModel)]="customPlan" name="customPlan">自定义预案</mat-checkbox>
<mat-checkbox (ngModelChange)="templatePlanChange($event,2)" [(ngModel)]="customPlan" name="customPlan">自定义预案</mat-checkbox>
</div>
</div>
</form>

13
src/app/plan-management/entry-plan/entry-plan.component.ts

@ -366,7 +366,18 @@ export class EntryPlanComponent implements OnInit {
this.pageEvent.pageIndex = 0
this.getAllPlanInfo()
}
templatePlanChange($event, type) {
if (type == 1) {
this.templatePlan = $event
} else if (type == 2) {
this.customPlan = $event
}
if (this.templatePlan || this.customPlan) {
this.reservePlanType = ['16']
} else {
this.reservePlanType = []
}
}
companyName: any //单位名称
js: any //所选组织机构
jsId: any //所选组织机构的id

19
src/app/plan-management/open-plan/open-plan.component.html

@ -67,10 +67,12 @@
</mat-form-field>
</div>
<div class="queryField" *ngIf="!padMore">
<mat-checkbox [(ngModel)]="templatePlan" name="templatePlan">模板录入预案</mat-checkbox>
<mat-checkbox (ngModelChange)="templatePlanChange($event,1)" [(ngModel)]="templatePlan" name="templatePlan">
模板录入预案</mat-checkbox>
</div>
<div class="queryField" *ngIf="!padMore">
<mat-checkbox [(ngModel)]="customPlan" name="customPlan">自定义预案</mat-checkbox>
<mat-checkbox (ngModelChange)="templatePlanChange($event,2)" [(ngModel)]="customPlan" name="customPlan">自定义预案
</mat-checkbox>
</div>
<div class="queryField" *ngIf="pcfind">
<button mat-raised-button color="primary">查询</button>
@ -108,8 +110,17 @@
<td mat-cell *matCellDef="let element">{{element.creationTime | date:'yyyy-MM-dd'}}</td>
</ng-container>
<ng-container matColumnDef="plantype">
<th mat-header-cell *matHeaderCellDef>预案类型</th>
<td mat-cell *matCellDef="let element">{{element.planType | plantype}}</td>
<th mat-header-cell *matHeaderCellDef style="width: 120px;">预案类型</th>
<td mat-cell *matCellDef="let element" style="text-align: left;">
<span
style="margin:0px;margin-left: 26%; color: black;cursor: default;vertical-align: middle;">{{element.planType
|
plantype}}</span>
<img *ngIf="element.planType == 16 && element.attachmentUrls == null && element.planMode == 2" style="vertical-align: middle;
margin: 3px 0 0 3px;" src="../../../assets/images/template.png" alt="">
<img *ngIf="element.planType == 16 && element.attachmentUrls == null && element.planMode == 4" style="vertical-align: middle;
margin: 3px 0 0 3px;" src="../../../assets/images/custom.png" alt="">
</td>
</ng-container>
<ng-container matColumnDef="auditStatus">
<th mat-header-cell *matHeaderCellDef>新增审核</th>

42
src/app/plan-management/open-plan/open-plan.component.ts

@ -10,6 +10,7 @@ import { MatDialogRef, MatDialog, MAT_DIALOG_DATA } from '@angular/material/dial
import { MatSnackBar, MatSnackBarConfig } from '@angular/material/snack-bar';
import { TreeService } from '../../http-interceptors/tree.service'
import { Viewer } from 'photo-sphere-viewer';
import { ImgDetails, PsViewer } from '../entry-plan-look/entry-plan-look.component';
declare var CryptoJS
@Component({
selector: 'app-open-plan',
@ -201,22 +202,27 @@ export class OpenPlanComponent implements OnInit {
}
//跳转查看预案页面 公开预案
routerTo(e) {
/* sessionStorage.setItem("companyName",element.companyName)
window.open(`/planAudit/planpass?id=${element.companyId}&companyName=${element.companyName}&auditPlanId=${element.id}&auditStatus=${element.auditStatus}&type=6&planType=2`); */
// console.log(e)
if (e.planMode == 0 || e.planMode == 1) {
//console.log(e.attachmentUrls)
console.log(e)
if (e.planType == 16 || e.planType == 4 || e.planType == 8) {
if (e.planType == 16 && e.attachmentUrls == null) {
window.open(`/planManagement/createplanonlinefive?navIsOpen=false&companyId=${e.companyId}&planName=${e.name}&unitName=${e.company.name}&planCategory=${e.planCategory}&planId=${e.id}&unitTypeId=${e.company.buildingTypes[0].id}&orName=${e.company.organizationName}&orId=${e.company.organizationId}&pattern=false`)
} else {
var index = e.attachmentUrls[0].indexOf("\/")
if (e.attachmentUrls[0].substr(0, index) == 'psw') {
const dialogRef = this.dialog.open(GkhtmlPsViewer, {
const dialogRef = this.dialog.open(PsViewer, {
width: '1500px',
height: '800px',
data: e.attachmentUrls[0]
});
}
else {
} 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 {
let fetchUrl = e.attachmentUrls[0]
if (fetchUrl) {
let suffix = fetchUrl.split('.')[fetchUrl.split('.').length - 1].toLowerCase()
if (suffix == 'docx' || suffix == 'doc') {
let arr = fetchUrl.split('.')
@ -232,8 +238,10 @@ export class OpenPlanComponent implements OnInit {
}
}
}
}
}
if (e.planMode == 2) { //如果是在线编辑
if (e.planMode == 2 && e.planType == 1) { //如果是在线编辑
let id = e.id
sessionStorage.setItem("planId", id)
sessionStorage.setItem("companyId", e.companyId)
@ -248,6 +256,20 @@ export class OpenPlanComponent implements OnInit {
window.open(`/planManagement/webLook`)
}
}
templatePlanChange($event, type) {
if (type == 1) {
this.templatePlan = $event
} else if (type == 2) {
this.customPlan = $event
}
if (this.templatePlan || this.customPlan) {
this.reservePlanType = ['16']
} else {
this.reservePlanType = []
}
}
//分页事件
chagePage(e) {
this.PageNumber = e.pageIndex + 1

19
src/app/plan-management/pass-plan/pass-plan.component.html

@ -132,10 +132,12 @@
</mat-form-field>
</div>
<div class="queryField" *ngIf="!padMore&&!pcMore">
<mat-checkbox [(ngModel)]="templatePlan" name="templatePlan">模板录入预案</mat-checkbox>
<mat-checkbox (ngModelChange)="templatePlanChange($event,1)" [(ngModel)]="templatePlan" name="templatePlan">
模板录入预案</mat-checkbox>
</div>
<div class="queryField" *ngIf="!padMore&&!pcMore">
<mat-checkbox [(ngModel)]="customPlan" name="customPlan">自定义预案</mat-checkbox>
<mat-checkbox (ngModelChange)="templatePlanChange($event,2)" [(ngModel)]="customPlan" name="customPlan">自定义预案
</mat-checkbox>
</div>
</div>
@ -173,8 +175,17 @@
<td mat-cell *matCellDef="let element">{{element.creationTime | date:'yyyy-MM-dd'}}</td>
</ng-container>
<ng-container matColumnDef="plantype">
<th mat-header-cell *matHeaderCellDef>预案类型</th>
<td mat-cell *matCellDef="let element">{{element.planType | plantype}}</td>
<th mat-header-cell *matHeaderCellDef style="width: 120px;">预案类型</th>
<td mat-cell *matCellDef="let element" style="text-align: left;">
<span
style="margin:0px;margin-left: 26%; color: black;cursor: default;vertical-align: middle;">{{element.planType
|
plantype}}</span>
<img *ngIf="element.planType == 16 && element.attachmentUrls == null && element.planMode == 2" style="vertical-align: middle;
margin: 3px 0 0 3px;" src="../../../assets/images/template.png" alt="">
<img *ngIf="element.planType == 16 && element.attachmentUrls == null && element.planMode == 4" style="vertical-align: middle;
margin: 3px 0 0 3px;" src="../../../assets/images/custom.png" alt="">
</td>
</ng-container>
<ng-container matColumnDef="auditStatus">
<th mat-header-cell *matHeaderCellDef>新增审核</th>

38
src/app/plan-management/pass-plan/pass-plan.component.ts

@ -10,6 +10,7 @@ import { MatDialogRef, MatDialog, MAT_DIALOG_DATA } from '@angular/material/dial
import { MatSnackBar, MatSnackBarConfig } from '@angular/material/snack-bar';
import { TreeService } from '../../http-interceptors/tree.service'
import { Viewer } from 'photo-sphere-viewer';
import { ImgDetails, PsViewer } from '../entry-plan-look/entry-plan-look.component';
declare var CryptoJS
@Component({
selector: 'app-pass-plan',
@ -351,19 +352,27 @@ export class PassPlanComponent implements OnInit {
//跳转查看预案页面 审核通过预案
routerTo(e) {
// console.log(e)
if (e.planMode == 0 || e.planMode == 1) {
//console.log(e.attachmentUrls)
console.log(e)
if (e.planType == 16 || e.planType == 4 || e.planType == 8) {
if (e.planType == 16 && e.attachmentUrls == null) {
window.open(`/planManagement/createplanonlinefive?navIsOpen=false&companyId=${e.companyId}&planName=${e.name}&unitName=${e.company.name}&planCategory=${e.planCategory}&planId=${e.id}&unitTypeId=${e.company.buildingTypes[0].id}&orName=${e.company.organizationName}&orId=${e.company.organizationId}&pattern=false`)
} else {
var index = e.attachmentUrls[0].indexOf("\/")
if (e.attachmentUrls[0].substr(0, index) == 'psw') {
const dialogRef = this.dialog.open(GkPsViewer, {
const dialogRef = this.dialog.open(PsViewer, {
width: '1500px',
height: '800px',
data: e.attachmentUrls[0]
});
}
else {
} 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 {
let fetchUrl = e.attachmentUrls[0]
if (fetchUrl) {
let suffix = fetchUrl.split('.')[fetchUrl.split('.').length - 1].toLowerCase()
if (suffix == 'docx' || suffix == 'doc') {
let arr = fetchUrl.split('.')
@ -379,8 +388,10 @@ export class PassPlanComponent implements OnInit {
}
}
}
}
}
if (e.planMode == 2) { //如果是在线编辑
if (e.planMode == 2 && e.planType == 1) { //如果是在线编辑
let id = e.id
sessionStorage.setItem("planId", id)
sessionStorage.setItem("companyId", e.companyId)
@ -395,7 +406,18 @@ export class PassPlanComponent implements OnInit {
window.open(`/planManagement/webLook`)
}
}
templatePlanChange($event, type) {
if (type == 1) {
this.templatePlan = $event
} else if (type == 2) {
this.customPlan = $event
}
if (this.templatePlan || this.customPlan) {
this.reservePlanType = ['16']
} else {
this.reservePlanType = []
}
}
//预案公开
openReserve(e) {
this.http.put(`/api/PlanAudits/${e.id}/Public`, []).subscribe(data => {

14
src/app/statistic-analysis/combined-query/combined-query.component.html

@ -134,10 +134,9 @@
<div class="tablebox" id="table">
<table cellpadding="0" cellspacing="0" *ngIf="preparelevels==0&&!tableDataNull">
<thead>
<th *ngFor="let item of displayedColumns;let i=index">{{item}}<mat-icon
*ngIf="i == 0 && orRecord.length != 0" style="cursor: pointer;vertical-align: text-top;"
(click)="goBack()">undo
</mat-icon>
<th *ngFor="let item of displayedColumns;let i=index">{{item}}<img *ngIf="i==0 && orRecord.length !=0"
style="cursor: pointer;vertical-align: middle;margin-bottom: 2px;" (click)="goBack()"
src="../../../assets/images/back.png" alt="">
</th>
</thead>
<tbody>
@ -150,10 +149,9 @@
<table cellpadding="0" cellspacing="0" *ngIf="preparelevels==1&&!tableDataNull">
<thead>
<th *ngFor="let item of yuanColumns;let i=index">{{item}}<mat-icon
*ngIf="i == 0 && orRecord.length != 0" style="cursor: pointer;vertical-align: text-top;"
(click)="goBack()">undo
</mat-icon>
<th *ngFor="let item of yuanColumns;let i=index">{{item}}<img *ngIf="i==0 && orRecord.length !=0"
style="cursor: pointer;vertical-align: middle;margin-bottom: 2px;" (click)="goBack()"
src="../../../assets/images/back.png" alt="">
</th>
</thead>
<tbody>

7
src/app/statistic-analysis/combined-query/combined-query.component.ts

@ -277,9 +277,6 @@ export class CombinedQueryComponent implements OnInit {
} else {
this.tabledataSource[i].name.push(bvalue[bi].count)
}
/* this.tabledataSource.forEach((td,ti,tval)=>{
tval[ti].name.push(item.count)
}) */
});
}
@ -369,8 +366,6 @@ export class CombinedQueryComponent implements OnInit {
})
}
}
// console.log(this.yuanColumns)
// console.log(this.yuanTable)
this.isMasklayer = false
resolve(this.excelData)
}
@ -465,7 +460,7 @@ export class CombinedQueryComponent implements OnInit {
let config = new MatSnackBarConfig();
config.verticalPosition = 'top';
config.duration = 3000
if (key == 0) {
if (key == 0 && element != '合计') {
let clickOr
this.allorganizations.forEach(item => {
if (element === item.name) {

BIN
src/assets/images/back.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 313 B

BIN
src/assets/images/custom.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 849 B

BIN
src/assets/images/template.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 927 B

Loading…
Cancel
Save