|
|
|
@ -917,6 +917,7 @@ export class AddPlanone {
|
|
|
|
|
inputword: boolean = false //导入文档
|
|
|
|
|
onlineedit: boolean = false //在线编辑
|
|
|
|
|
website: boolean = false //网页地址
|
|
|
|
|
inputNew :boolean=false //自定义编辑
|
|
|
|
|
next(formdata) { |
|
|
|
|
//console.log(formdata.value.firstCtrlthree)
|
|
|
|
|
//console.log(this.file)
|
|
|
|
@ -935,16 +936,26 @@ export class AddPlanone {
|
|
|
|
|
this.inputword = true |
|
|
|
|
this.onlineedit = false |
|
|
|
|
this.website = false |
|
|
|
|
this.inputNew=false |
|
|
|
|
} |
|
|
|
|
if (formdata.value.firstCtrltwo == '16' && formdata.value.firstCtrlthree != '4') {//&& formdata.value.firstCtrlthree != '4'
|
|
|
|
|
this.localup = true |
|
|
|
|
this.inputword = true |
|
|
|
|
this.inputNew=true |
|
|
|
|
this.onlineedit = false |
|
|
|
|
this.website = false |
|
|
|
|
} |
|
|
|
|
if (formdata.value.firstCtrltwo == '1') { //如果是2D预案
|
|
|
|
|
this.localup = true |
|
|
|
|
this.inputword = false |
|
|
|
|
this.onlineedit = true |
|
|
|
|
this.website = true |
|
|
|
|
this.inputNew=false |
|
|
|
|
} |
|
|
|
|
if (formdata.value.firstCtrltwo == '2' || formdata.value.firstCtrltwo == '4') { |
|
|
|
|
this.localup = true |
|
|
|
|
this.inputword = false |
|
|
|
|
this.inputNew=false |
|
|
|
|
this.onlineedit = false |
|
|
|
|
this.website = true |
|
|
|
|
this.pswShow = true |
|
|
|
@ -972,7 +983,7 @@ export class AddPlanone {
|
|
|
|
|
//文本预案在线编制跳转
|
|
|
|
|
newleftTabledata |
|
|
|
|
planData |
|
|
|
|
createWord() { |
|
|
|
|
createWord(haveNew) { |
|
|
|
|
const config = new MatSnackBarConfig(); |
|
|
|
|
config.verticalPosition = 'top'; |
|
|
|
|
config.duration = 3000 |
|
|
|
@ -1008,12 +1019,12 @@ export class AddPlanone {
|
|
|
|
|
let open = this.newleftTabledata.filter((value, index, array) => { |
|
|
|
|
return value.unitname == this.data.unitType && value.planCategory == this.selectedPLanLevel |
|
|
|
|
}) |
|
|
|
|
if (open.length > 0) { |
|
|
|
|
if(haveNew==true){ |
|
|
|
|
this.http.post('/api/PlanComponents', { |
|
|
|
|
id: "", |
|
|
|
|
name: this.selectedPLanName, |
|
|
|
|
planType: Number(this.selectedPLanType), |
|
|
|
|
planMode: Number(this.defaultisshow), |
|
|
|
|
planMode: 2, |
|
|
|
|
planLevel: PlanLevel, |
|
|
|
|
planCategory: Number(this.selectedPLanLevel), |
|
|
|
|
url: "", |
|
|
|
@ -1026,11 +1037,34 @@ export class AddPlanone {
|
|
|
|
|
this.planData = plandata |
|
|
|
|
this.dialogRef.close(plandata); |
|
|
|
|
//console.log(plandata)
|
|
|
|
|
window.open(`/planManagement/createplanonlinefive?navIsOpen=false&companyId=${this.data.companyId}&planName=${this.planData.name}&unitName=${this.data.unitName}&planCategory=${this.selectedPLanLevel}&planId=${this.planData.id}`) |
|
|
|
|
window.open(`/planManagement/createplanonlinefive?navIsOpen=false&companyId=${this.data.companyId}&planName=${this.planData.name}&unitName=${this.data.unitName}&planCategory=${this.selectedPLanLevel}&planId=${this.planData.id}&haveNew=${haveNew}`) |
|
|
|
|
}) |
|
|
|
|
} else { |
|
|
|
|
this.snackBar.open('请先创建模板!', '确定', config); |
|
|
|
|
}else{ |
|
|
|
|
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}&unitName=${this.data.unitName}&planCategory=${this.selectedPLanLevel}&planId=${this.planData.id}&haveNew=${haveNew}`) |
|
|
|
|
}) |
|
|
|
|
} else { |
|
|
|
|
this.snackBar.open('请先创建模板!', '确定', config); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -1087,7 +1121,10 @@ export class AddPlanone {
|
|
|
|
|
config.verticalPosition = 'top'; |
|
|
|
|
config.duration = 3000 |
|
|
|
|
//this.snackBar.open('暂不支持导入','确定',config);
|
|
|
|
|
this.createWord() |
|
|
|
|
this.createWord(false) |
|
|
|
|
} |
|
|
|
|
if(this.defaultisshow == '4'){ |
|
|
|
|
this.createWord(true) |
|
|
|
|
} |
|
|
|
|
if (this.defaultisshow == '3' && (this.webaddress == "" || this.webaddress == null)) { //如果是填写网址
|
|
|
|
|
const config = new MatSnackBarConfig(); |
|
|
|
|