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. 14
      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 * @Author: sueRimn
* @Date: 2021-01-11 14:48:03 * @Date: 2021-01-11 14:48:03
* @LastEditors: sueRimn * @LastEditors: sueRimn
* @LastEditTime: 2021-03-26 15:18:46 * @LastEditTime: 2021-07-29 10:26:58
*/ */
import { NgModule } from '@angular/core'; import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router'; 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 {ViewUnitDetailsPlanComponent} from './key-unit/view-unit-details-plan/view-unit-details-plan.component'
import { TestComponent } from './test/test.component'; import { TestComponent } from './test/test.component';
import { ExternalLinksPlanComponent } from './external-links-plan/external-links-plan.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 = [ const routes: Routes = [
@ -42,6 +43,7 @@ const routes: Routes = [
{path:'planAudit/planpass', component: PlanPassComponent , canActivate: [AuthGuard]}, {path:'planAudit/planpass', component: PlanPassComponent , canActivate: [AuthGuard]},
{path:'test', component: TestComponent }, {path:'test', component: TestComponent },
{path:'linksPlan', component: ExternalLinksPlanComponent }, {path:'linksPlan', component: ExternalLinksPlanComponent },
{path:'CreatePlanOnlineFive',component:CreatePlanOnlineFiveComponent}
]; ];
@NgModule({ @NgModule({

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

@ -4,7 +4,7 @@
* @Author: sueRimn * @Author: sueRimn
* @Date: 2020-12-25 16:13:50 * @Date: 2020-12-25 16:13:50
* @LastEditors: sueRimn * @LastEditors: sueRimn
* @LastEditTime: 2021-07-24 14:34:24 * @LastEditTime: 2021-07-29 10:27:36
*/ */
import { Component, Inject, OnInit } from '@angular/core'; import { Component, Inject, OnInit } from '@angular/core';
import { FormControl } from '@angular/forms'; import { FormControl } from '@angular/forms';
@ -296,8 +296,10 @@ export class WaitExamineerComponent implements OnInit {
this.companyName = data.companyName this.companyName = data.companyName
if (data.planType != 2 && data.planType != 1) { if (data.planType != 2 && data.planType != 1) {
if (data.planMode == 2) { if (data.planMode == 2) {
this.showtype = 0
this.bianzhi = true 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}` //this.src=`/keyUnit/viewunitinfoplan?id=${data.companyId}&orName=${data.company.organizationId}&orId=${data.company.organizationName}`
} else { } else {
this.bianzhi = false this.bianzhi = false

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

@ -15,7 +15,7 @@
</button> </button>
</div> </div>
</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> 退出预览 <mat-icon>visibility</mat-icon> 退出预览
</button> </button>
<div class="contentbox" [ngClass]="{'noPadding': pattern == 'look'}"> <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 * @Author: sueRimn
* @Date: 2021-06-16 13:56:54 * @Date: 2021-06-16 13:56:54
* @LastEditors: sueRimn * @LastEditors: sueRimn
* @LastEditTime: 2021-07-08 09:36:32 * @LastEditTime: 2021-07-29 14:12:18
*/ */
import { HttpClient } from '@angular/common/http'; import { HttpClient } from '@angular/common/http';
import { Component, Inject, OnInit, Renderer2, ViewChild, Input } from '@angular/core'; import { Component, Inject, OnInit, Renderer2, ViewChild, Input } from '@angular/core';
@ -24,10 +24,12 @@ export class CreatePlanOnlineFiveComponent implements OnInit {
planLevel: string//预案级别 planLevel: string//预案级别
blockyl=true
ngOnInit(): void { ngOnInit(): void {
this.planLevel = this.route.snapshot.queryParams.planCategory this.planLevel = this.route.snapshot.queryParams.planCategory
if(this.route.snapshot.queryParams.pattern=='false'){ if(this.route.snapshot.queryParams.pattern=='false'){
this.pattern='look' this.pattern='look'
this.blockyl=false
}else{ }else{
this.pattern='edit' this.pattern='edit'
} }

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

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

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

@ -108,7 +108,10 @@ export class EntryPlanLookComponent implements OnInit {
lookPlan(e) { lookPlan(e) {
console.log(e) console.log(e)
if (e.planType == 16 || e.planType == 4 || e.planType == 8) { if (e.planType == 16 || e.planType == 4 || e.planType == 8) {
var index = e.attachmentUrls[0].indexOf("\/") 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') { if (e.attachmentUrls[0].substr(0, index) == 'psw') {
const dialogRef = this.dialog.open(PsViewer, { const dialogRef = this.dialog.open(PsViewer, {
width: '1500px', width: '1500px',
@ -123,6 +126,7 @@ export class EntryPlanLookComponent implements OnInit {
dialogRef.afterClosed().subscribe(); dialogRef.afterClosed().subscribe();
} else { } else {
let fetchUrl = e.attachmentUrls[0] let fetchUrl = e.attachmentUrls[0]
//console.log(fetchUrl)
if (fetchUrl) { if (fetchUrl) {
let suffix = fetchUrl.split('.')[fetchUrl.split('.').length - 1].toLowerCase() let suffix = fetchUrl.split('.')[fetchUrl.split('.').length - 1].toLowerCase()
if (suffix == 'docx' || suffix == 'doc') { if (suffix == 'docx' || suffix == 'doc') {
@ -137,10 +141,10 @@ export class EntryPlanLookComponent implements OnInit {
config.duration = 3000 config.duration = 3000
this.snackBar.open('该文件类型暂不支持在线查看', '确定', config); 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) { //如果是在线编辑 if (e.planType == 1) { //如果是在线编辑
let id = e.id let id = e.id
@ -179,7 +183,7 @@ export class EntryPlanLookComponent implements OnInit {
} }
else if (e.planType == 16) { else if (e.planType == 16) {
if (e.attachmentUrls == null) { 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 { else {
let body = {}; let body = {};

Loading…
Cancel
Save