@ -202,7 +202,7 @@ export class EntryPlanLookComponent implements OnInit {
window . open ( ` /keyUnit/editunitinfo?id= ${ companyId } &orName= ${ this . route . snapshot . queryParams . orName } &orId= ${ this . route . snapshot . queryParams . orId } ` ) ;
}
else if ( e . planType == 16 ) {
this . lookPlan ( e )
// let body={
// // id:e.planId,
// // resetAudit:true
@ -218,9 +218,10 @@ export class EntryPlanLookComponent implements OnInit {
} ;
this . http . put ( ` /api/PlanComponents/ ${ e . id } ?resetAudit= ${ resetAudit } ` , body , options ) . subscribe ( data = > {
this . getAllPlanComponents ( )
} , err = > {
this . snackBar . open ( err , '确定' , config ) ;
} )
this . lookPlan ( e )
} / * , err = > {
this . snackBar . open ( err , '确定' , config ) ;
} * / )
}
else {
@ -326,9 +327,9 @@ export class EntryPlanLookComponent implements OnInit {
if ( element . auditStatus == 8 ) {
this . http . put ( ` /api/PlanComponents2D/ ${ element . id } /Commit ` , "" ) . subscribe ( data = > {
this . getAllPlanComponents ( )
} , err = > {
this . snackBar . open ( err , '确定' , config ) ;
} )
} / * , err = > {
this . snackBar . open ( err , '确定' , config ) ;
} * / )
}
else {
this . snackBar . open ( '审核退回的预案需要修改后方可再次提交审核!' , '确定' , config ) ;
@ -336,8 +337,6 @@ export class EntryPlanLookComponent implements OnInit {
} else {
this . http . put ( ` /api/PlanComponents/ ${ element . id } /Commit ` , "" ) . subscribe ( data = > {
this . getAllPlanComponents ( )
} , err = > {
this . snackBar . open ( err , '确定' , config ) ;
} )
}
@ -352,12 +351,12 @@ export class EntryPlanLookComponent implements OnInit {
} else {
this . http . put ( ` /api/PlanComponents/ ${ element . id } /Cancel ` , "" ) . subscribe ( data = > {
this . getAllPlanComponents ( )
} , err = > {
} / * , err = > {
const config = new MatSnackBarConfig ( ) ;
config . verticalPosition = 'top' ;
config . duration = 3000
this . snackBar . open ( err , '确定' , config ) ;
} )
this . snackBar . open ( err , '确定' , config ) ;
} * / )
}
}
//审核结果
@ -490,10 +489,10 @@ export class EntryPlanLookComponent implements OnInit {
//新建预案弹出框
addplan() {
const dialogRef = this . dialog . open ( AddPlanone , {
width : "585px" ,
height : "430px" ,
data : { companyId : this.companyId } ,
disableClose : true
width : "585px" ,
height : "430px" ,
data : { companyId :this.companyId , unitType :this.unitdata.unittype } ,
disableClose :true
} ) ;
dialogRef . afterClosed ( ) . subscribe (
data = > {
@ -547,9 +546,9 @@ export class AddPlanone {
this . dialogRef . close ( ) ;
}
levels //
isup : boolean = true //上传input框是否显示
isweb : boolean = false //web输入框是否显示
isinput : boolean = false //导入 是否显示
isup :boolean = true //上传input框是否显示
isweb :boolean = false //web输入框是否显示
isinput :boolean = false //编制按钮 是否显示
defaultisshow = '0' //默认显示上传input框
pswShow = false //是否为全景图选项默认不显示
psw //是否为全景图
@ -810,8 +809,14 @@ export class AddPlanone {
this . psw = false
this . selectedPLanName = formdata . value . firstCtrlone
this . selectedPLanType = formdata . value . firstCtrltwo
this . selectedPLanLevel = formdata . value . firstCtrlthree
if ( formdata . value . firstCtrltwo == '16' ) { //如果是卡片预案
this . selectedPLanLevel = formdata . value . firstCtrlthree
if ( formdata . value . firstCtrltwo == '16' && formdata . value . firstCtrlthree == '4' ) { //如果是文本预案
this . localup = true
this . inputword = false
this . onlineedit = false
this . website = false
}
if ( formdata . value . firstCtrltwo == '16' && formdata . value . firstCtrlthree != '4' ) {
this . localup = true
this . inputword = true
this . onlineedit = false
@ -850,8 +855,72 @@ export class AddPlanone {
this . dialogRef . close ( ) ;
}
//文本预案在线编制跳转
newleftTabledata
planData
createWord ( ) {
const config = new MatSnackBarConfig ( ) ;
config . verticalPosition = 'top' ;
config . duration = 3000
let level = sessionStorage . getItem ( "level" )
// console.log(level)
let PlanLevel
if ( level == '0' ) {
PlanLevel = 1
}
if ( level == '1' ) {
PlanLevel = 2
}
if ( level == '2' ) {
PlanLevel = 4
}
if ( level == '3' ) {
PlanLevel = 8
}
this . http . get ( "/api/PlanTemplate" ) . subscribe ( ( data :any ) = > {
this . newleftTabledata = data
this . newleftTabledata . forEach ( ( value , index , array ) = > {
value . data = JSON . parse ( value . data )
} )
this . http . get ( "/api/BuildingTypes" ) . subscribe ( ( buildData :any ) = > {
this . newleftTabledata . forEach ( ( value , index , array ) = > {
buildData . forEach ( ( element , i , buildArray ) = > {
if ( value . buildingTypeId == element . id ) {
array [ index ] . unitname = buildArray [ i ] . name
array [ index ] . facilityCategoryId = buildArray [ i ] . facilityCategoryId
}
} ) ;
} )
let open = this . newleftTabledata . filter ( ( value , index , array ) = > {
return value . unitname == this . data . unitType && value . planCategory == this . selectedPLanLevel
} )
if ( open . length > 0 ) {
this . http . post ( '/api/PlanComponents' , {
id : "" ,
name : this.selectedPLanName ,
planType :Number ( this . selectedPLanType ) ,
planMode : Number ( this . defaultisshow ) ,
planLevel : PlanLevel ,
planCategory : Number ( this . selectedPLanLevel ) ,
url : "" ,
//attachmentUrls: [`${this.objectName}`]
} , { params : {
companyId : this.data.companyId
} } ) . subscribe ( plandata = > {
this . planData = plandata
this . dialogRef . close ( plandata ) ;
//console.log(plandata)
window . open ( ` /planManagement/createplanonlinefive?navIsOpen=false&companyId= ${ this . data . companyId } &planName= ${ this . planData . name } ` )
} )
} else {
this . snackBar . open ( '请先创建模板!' , '确定' , config ) ;
}
} )
} )
//window.open('')
}
// 提交创建
onSubmit ( value ) {
@ -901,7 +970,7 @@ export class AddPlanone {
const config = new MatSnackBarConfig ( ) ;
config . verticalPosition = 'top' ;
config . duration = 3000
this . snackBar . open ( '暂不支持导入' , '确定' , config ) ;
//this.snackBar.open('暂不支持导入','确定',config);
}
if ( this . defaultisshow == '3' && ( this . webaddress == "" || this . webaddress == null ) ) { //如果是填写网址
const config = new MatSnackBarConfig ( ) ;