Browse Source

[修改]待审核页面在线编制文本预案预览

tangshan
chenjingyu 4 years ago
parent
commit
0a047a17ff
  1. 4
      src/app/app-routing.module.ts
  2. 6
      src/app/plan-audit/wait-examineer/wait-examineer.component.ts
  3. 2
      src/app/plan-management/create-plan-online-five/create-plan-online-five.component.html
  4. 4
      src/app/plan-management/create-plan-online-five/create-plan-online-five.component.ts
  5. 4
      src/app/plan-management/entry-plan-look/entry-plan-look.component.html
  6. 10
      src/app/plan-management/entry-plan-look/entry-plan-look.component.ts

4
src/app/app-routing.module.ts

@ -4,7 +4,7 @@
* @Author: sueRimn
* @Date: 2021-01-11 14:48:03
* @LastEditors: sueRimn
* @LastEditTime: 2021-03-26 15:18:46
* @LastEditTime: 2021-07-29 10:26:58
*/
import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
@ -19,6 +19,7 @@ import {MTokenK1Component} from './m-token-k1/m-token-k1.component' //K1秘钥
import {ViewUnitDetailsPlanComponent} from './key-unit/view-unit-details-plan/view-unit-details-plan.component'
import { TestComponent } from './test/test.component';
import { ExternalLinksPlanComponent } from './external-links-plan/external-links-plan.component';
import { CreatePlanOnlineFiveComponent } from './plan-management/create-plan-online-five/create-plan-online-five.component'
const routes: Routes = [
@ -42,6 +43,7 @@ const routes: Routes = [
{path:'planAudit/planpass', component: PlanPassComponent , canActivate: [AuthGuard]},
{path:'test', component: TestComponent },
{path:'linksPlan', component: ExternalLinksPlanComponent },
{path:'CreatePlanOnlineFive',component:CreatePlanOnlineFiveComponent}
];
@NgModule({

6
src/app/plan-audit/wait-examineer/wait-examineer.component.ts

@ -4,7 +4,7 @@
* @Author: sueRimn
* @Date: 2020-12-25 16:13:50
* @LastEditors: sueRimn
* @LastEditTime: 2021-07-24 14:34:24
* @LastEditTime: 2021-07-29 10:27:36
*/
import { Component, Inject, OnInit } from '@angular/core';
import { FormControl } from '@angular/forms';
@ -296,8 +296,10 @@ export class WaitExamineerComponent implements OnInit {
this.companyName = data.companyName
if (data.planType != 2 && data.planType != 1) {
if (data.planMode == 2) {
this.showtype = 0
this.bianzhi = true
this.src = `/planManagement/createplanonlinefive?navIsOpen=false&companyId=${data.companyId}&planName=${data.name}&unitName=${data.companyName}&planCategory=${data.planCategory}&planId=${data.id}&unitTypeId=${data.company.buildingTypes[0].id}&orName=${data.company.organizationName}&orId=${data.company.organizationId}&pattern=false`
this.src = `/CreatePlanOnlineFive?navIsOpen=false&companyId=${data.companyId}&planName=${data.name}&unitName=${data.companyName}&planCategory=${data.planCategory}&planId=${data.id}&unitTypeId=${data.company.buildingTypes[0].id}&orName=${data.company.organizationName}&orId=${data.company.organizationId}&pattern=false`
this.iframeSrc = this.sanitizer.bypassSecurityTrustResourceUrl(this.src);
//this.src=`/keyUnit/viewunitinfoplan?id=${data.companyId}&orName=${data.company.organizationId}&orId=${data.company.organizationName}`
} else {
this.bianzhi = false

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

@ -15,7 +15,7 @@
</button>
</div>
</div>
<button mat-stroked-button (click)="quitPreview()" class="quitPreview">
<button mat-stroked-button (click)="quitPreview()" class="quitPreview" *ngIf="blockyl">
<mat-icon>visibility</mat-icon> 退出预览
</button>
<div class="contentbox" [ngClass]="{'noPadding': pattern == 'look'}">

4
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-07-08 09:36:32
* @LastEditTime: 2021-07-29 14:12:18
*/
import { HttpClient } from '@angular/common/http';
import { Component, Inject, OnInit, Renderer2, ViewChild, Input } from '@angular/core';
@ -24,10 +24,12 @@ export class CreatePlanOnlineFiveComponent implements OnInit {
planLevel: string//预案级别
blockyl=true
ngOnInit(): void {
this.planLevel = this.route.snapshot.queryParams.planCategory
if(this.route.snapshot.queryParams.pattern=='false'){
this.pattern='look'
this.blockyl=false
}else{
this.pattern='edit'
}

4
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-07-24 16:58:31
* @LastEditTime: 2021-07-29 10:44:58
-->
<!-- <p>录入预案</p> -->
<div style="overflow: auto;height: 100%;">
@ -86,7 +86,7 @@
<span (click)="deletePlan(element)" *ngIf="element.auditStatus==8">删除</span>
<span (click)="auditResult(element)">审批结果</span>
<span (click)="submitAudit(element)"
*ngIf="element.auditStatus!=1&&element.auditStatus!=16">提交审核</span>
*ngIf="element.auditStatus==8">提交审核</span>
<span (click)="cancelAudit(element)" *ngIf="element.auditStatus == 1||element.auditStatus == 16">撤销审核</span>
</td>
</ng-container>

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

@ -108,6 +108,9 @@ export class EntryPlanLookComponent implements OnInit {
lookPlan(e) {
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=${this.companyId}&planName=${e.name}&unitName=${this.unitdata.unitname}&planCategory=${e.planCategory}&planId=${e.id}&unitTypeId=${this.compantData.buildingTypes[0].id}&orName=${this.compantData.organizationName}&orId=${this.compantData.organizationId}&pattern=false`)
}else{
var index = e.attachmentUrls[0].indexOf("\/")
if (e.attachmentUrls[0].substr(0, index) == 'psw') {
const dialogRef = this.dialog.open(PsViewer, {
@ -123,6 +126,7 @@ export class EntryPlanLookComponent implements OnInit {
dialogRef.afterClosed().subscribe();
} else {
let fetchUrl = e.attachmentUrls[0]
//console.log(fetchUrl)
if (fetchUrl) {
let suffix = fetchUrl.split('.')[fetchUrl.split('.').length - 1].toLowerCase()
if (suffix == 'docx' || suffix == 'doc') {
@ -137,11 +141,11 @@ export class EntryPlanLookComponent implements OnInit {
config.duration = 3000
this.snackBar.open('该文件类型暂不支持在线查看', '确定', config);
}
} else {
window.open(`/planManagement/createplanonlinefive?navIsOpen=false&companyId=${this.companyId}&planName=${e.name}&unitName=${this.unitdata.unitname}&planCategory=${e.planCategory}&planId=${e.id}&unitTypeId=${this.compantData.buildingTypes[0].id}&orName=${this.compantData.organizationName}&orId=${this.compantData.organizationId}`)
}
}
}
}
if (e.planType == 1) { //如果是在线编辑
let id = e.id
sessionStorage.setItem("planId", id)
@ -179,7 +183,7 @@ export class EntryPlanLookComponent implements OnInit {
}
else if (e.planType == 16) {
if (e.attachmentUrls == null) {
window.open(`/planManagement/createplanonlinefive?navIsOpen=false&companyId=${this.companyId}&planName=${e.name}&unitName=${this.unitdata.unitname}&planCategory=${e.planCategory}&planId=${e.id}&unitTypeId=${this.compantData.buildingTypes[0].id}&orName=${this.compantData.organizationName}&orId=${this.compantData.organizationId}`)
window.open(`/planManagement/createplanonlinefive?navIsOpen=false&companyId=${this.companyId}&planName=${e.name}&unitName=${this.unitdata.unitname}&planCategory=${e.planCategory}&planId=${e.id}&unitTypeId=${this.compantData.buildingTypes[0].id}&orName=${this.compantData.organizationName}&orId=${this.compantData.organizationId}&pattern=true`)
}
else {
let body = {};

Loading…
Cancel
Save