@@ -108,8 +110,17 @@
{{element.creationTime | date:'yyyy-MM-dd'}} |
- 预案类型 |
- {{element.planType | plantype}} |
+ 预案类型 |
+
+ {{element.planType
+ |
+ plantype}}
+
+
+ |
新增审核 |
diff --git a/src/app/plan-management/open-plan/open-plan.component.ts b/src/app/plan-management/open-plan/open-plan.component.ts
index 4cf33ca..a507031 100644
--- a/src/app/plan-management/open-plan/open-plan.component.ts
+++ b/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,39 +202,46 @@ 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)
- var index = e.attachmentUrls[0].indexOf("\/")
- if (e.attachmentUrls[0].substr(0, index) == 'psw') {
- const dialogRef = this.dialog.open(GkhtmlPsViewer, {
- width: '1500px',
- height: '800px',
- data: e.attachmentUrls[0]
- });
- }
- else {
- let fetchUrl = e.attachmentUrls[0]
- let suffix = fetchUrl.split('.')[fetchUrl.split('.').length - 1].toLowerCase()
- if (suffix == 'docx' || suffix == 'doc') {
- let arr = fetchUrl.split('.')
- arr[arr.length - 1] = 'pdf'
- window.open(`/api/Objects/PlanPlatform/` + arr.join('.'))
- } else if (suffix == 'pdf') {
- window.open(`/api/Objects/PlanPlatform/` + fetchUrl)
+ 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(PsViewer, {
+ width: '1500px',
+ height: '800px',
+ 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 {
- let config = new MatSnackBarConfig();
- config.verticalPosition = 'top';
- config.duration = 3000
- this.snackBar.open('该文件类型暂不支持在线查看', '确定', config);
+ 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('.')
+ arr[arr.length - 1] = 'pdf'
+ window.open(`/api/Objects/PlanPlatform/` + arr.join('.'))
+ } else if (suffix == 'pdf') {
+ window.open(`/api/Objects/PlanPlatform/` + fetchUrl)
+ } else {
+ let config = new MatSnackBarConfig();
+ config.verticalPosition = 'top';
+ config.duration = 3000
+ this.snackBar.open('该文件类型暂不支持在线查看', '确定', config);
+ }
+ }
}
}
}
- 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
diff --git a/src/app/plan-management/pass-plan/pass-plan.component.html b/src/app/plan-management/pass-plan/pass-plan.component.html
index af8e821..9d743e5 100644
--- a/src/app/plan-management/pass-plan/pass-plan.component.html
+++ b/src/app/plan-management/pass-plan/pass-plan.component.html
@@ -132,10 +132,12 @@