|
|
|
@ -9,6 +9,10 @@ import { PageEvent } from '@angular/material/paginator';
|
|
|
|
|
import { MatDialogRef, MatDialog, MAT_DIALOG_DATA } from '@angular/material/dialog'; |
|
|
|
|
import { MatSnackBar, MatSnackBarConfig } from '@angular/material/snack-bar'; |
|
|
|
|
import { TreeService } from '../../http-interceptors/tree.service' |
|
|
|
|
import CryptoJS from 'crypto-js/crypto-js' |
|
|
|
|
//import Base64 from 'crypto-js/enc-base64';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Component({ |
|
|
|
|
selector: 'app-meet-plan', |
|
|
|
@ -54,6 +58,7 @@ export class MeetPlanComponent implements OnInit {
|
|
|
|
|
plcheck:boolean //编制级别勾选框
|
|
|
|
|
displayedColumns: string[] = ['unitname','level','addname','addtime', 'plantype', 'passstate','isopen','projectlevel','operation']; |
|
|
|
|
tabledataSource |
|
|
|
|
typePlan//新预案类型
|
|
|
|
|
unitname//预案名称
|
|
|
|
|
level//预案级别
|
|
|
|
|
addname//添加人
|
|
|
|
@ -84,7 +89,8 @@ export class MeetPlanComponent implements OnInit {
|
|
|
|
|
let paramsdata:any = { |
|
|
|
|
Name:this.unitname||'', |
|
|
|
|
planCategories:this.level||[6,7], |
|
|
|
|
PlanType:reservePlanType||'', |
|
|
|
|
//PlanType:reservePlanType||'',
|
|
|
|
|
DisasterType:this.typePlan||'', |
|
|
|
|
CreatorName:this.addname||'', |
|
|
|
|
AuditStatus:this.unitstate|| '', |
|
|
|
|
CreationTimeRangeStart:this.addtime||'', |
|
|
|
@ -158,6 +164,43 @@ export class MeetPlanComponent implements OnInit {
|
|
|
|
|
this.getAlltabledate() |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//查看预案
|
|
|
|
|
openPlan(element){ |
|
|
|
|
let filename:string |
|
|
|
|
let fetchUrl=element.attachmentUrls[0] |
|
|
|
|
this.http.get(`/api/ObjectMetadata/PlanPlatform/${fetchUrl}`).subscribe((data:any)=>{ |
|
|
|
|
filename=data.fileName
|
|
|
|
|
let json={ |
|
|
|
|
doc: { |
|
|
|
|
docId: element.id,
|
|
|
|
|
title: filename, |
|
|
|
|
//title: filename,
|
|
|
|
|
fetchUrl: "http://39.106.78.171:8000/api/Objects/PlanPlatform/"+fetchUrl |
|
|
|
|
}, |
|
|
|
|
user: { |
|
|
|
|
uid: "test", |
|
|
|
|
nickName: "test", |
|
|
|
|
avatar: "", |
|
|
|
|
privilege: [ |
|
|
|
|
'FILE_READ','FILE_DOWNLOAD', 'FILE_PRINT'
|
|
|
|
|
], |
|
|
|
|
}, |
|
|
|
|
} |
|
|
|
|
var stringjson=JSON.stringify(json) |
|
|
|
|
var wordArray = CryptoJS.enc.Utf8.parse(stringjson); |
|
|
|
|
var base64 = CryptoJS.enc.Base64.stringify(wordArray); |
|
|
|
|
|
|
|
|
|
//let base64Date=this.BASE64.encode(stringjson)
|
|
|
|
|
//let filedata= CryptoJS.enc.Base64.stringify(json)
|
|
|
|
|
console.log(base64) |
|
|
|
|
window.open(`http://121.5.10.84/apps/editor/openPreview?data=${base64}`) |
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
//下载↓
|
|
|
|
|
selectDownloadFile:any; //选择下载的文件
|
|
|
|
@ -259,6 +302,7 @@ export class MeetPlanComponent implements OnInit {
|
|
|
|
|
|
|
|
|
|
//重置
|
|
|
|
|
reset(){ |
|
|
|
|
this.typePlan='' |
|
|
|
|
this.unitname='' |
|
|
|
|
this.level='' |
|
|
|
|
this.addname='' |
|
|
|
@ -369,7 +413,7 @@ export class newunitMeet{
|
|
|
|
|
let body:any = { |
|
|
|
|
Name:this.unitname||'', |
|
|
|
|
PlanCategory:Number(this.level)||'', |
|
|
|
|
PlanType: Number(this.reservePlanType), |
|
|
|
|
disasterType: this.reservePlanType, |
|
|
|
|
PlanLevel:PlanLevel, |
|
|
|
|
PlanMode:1, |
|
|
|
|
attachmentUrls:[`${this.objectName}`] |
|
|
|
@ -461,7 +505,7 @@ export class newunitMeet{
|
|
|
|
|
let body:any = { |
|
|
|
|
Name:this.unitname||'', |
|
|
|
|
PlanCategory:Number(this.level)||'', |
|
|
|
|
PlanType: Number(this.reservePlanType), |
|
|
|
|
disasterType: this.reservePlanType, |
|
|
|
|
PlanLevel:PlanLevel, |
|
|
|
|
PlanMode:1, |
|
|
|
|
attachmentUrls:[`${this.objectName}`] |
|
|
|
|