|
|
@ -61,9 +61,11 @@ export class CreatePlanOnlineFiveComponent implements OnInit { |
|
|
|
zaixianDr=false |
|
|
|
zaixianDr=false |
|
|
|
haveNew=false |
|
|
|
haveNew=false |
|
|
|
planMode//预案类型
|
|
|
|
planMode//预案类型
|
|
|
|
|
|
|
|
xiazai//是否点击下载按钮进来的
|
|
|
|
//index
|
|
|
|
//index
|
|
|
|
ngOnInit() { |
|
|
|
ngOnInit() { |
|
|
|
//this.index = this.getArrayIndex(this.planTemplateData,'单位概况')
|
|
|
|
//this.index = this.getArrayIndex(this.planTemplateData,'单位概况')
|
|
|
|
|
|
|
|
this.xiazai=this.route.snapshot.queryParams.xiazai |
|
|
|
this.haveNew=this.route.snapshot.queryParams.haveNew |
|
|
|
this.haveNew=this.route.snapshot.queryParams.haveNew |
|
|
|
this.planMode=this.route.snapshot.queryParams.planMode |
|
|
|
this.planMode=this.route.snapshot.queryParams.planMode |
|
|
|
console.log(this.route.snapshot.queryParams.wordChange) |
|
|
|
console.log(this.route.snapshot.queryParams.wordChange) |
|
|
@ -82,7 +84,7 @@ export class CreatePlanOnlineFiveComponent implements OnInit { |
|
|
|
if(this.route.snapshot.queryParams.xiazai=='true'){ |
|
|
|
if(this.route.snapshot.queryParams.xiazai=='true'){ |
|
|
|
window.setTimeout(()=>{ |
|
|
|
window.setTimeout(()=>{ |
|
|
|
this.generatingDoc() |
|
|
|
this.generatingDoc() |
|
|
|
},2500) |
|
|
|
},5000) |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
@ -167,7 +169,7 @@ export class CreatePlanOnlineFiveComponent implements OnInit { |
|
|
|
|
|
|
|
|
|
|
|
//获得单位信息
|
|
|
|
//获得单位信息
|
|
|
|
unitData: any |
|
|
|
unitData: any |
|
|
|
getUnitData() { |
|
|
|
async getUnitData() { |
|
|
|
let paramsdata: any = { |
|
|
|
let paramsdata: any = { |
|
|
|
Name: this.route.snapshot.queryParams.unitName || '', |
|
|
|
Name: this.route.snapshot.queryParams.unitName || '', |
|
|
|
} |
|
|
|
} |
|
|
@ -559,7 +561,7 @@ export class CreatePlanOnlineFiveComponent implements OnInit { |
|
|
|
this.http.get('/api/RealityImages', { params: data }).subscribe((data: any) => { |
|
|
|
this.http.get('/api/RealityImages', { params: data }).subscribe((data: any) => { |
|
|
|
element.realityImages = data.items |
|
|
|
element.realityImages = data.items |
|
|
|
element.realityImages.forEach(item => { //每张图片设置选中状态为false
|
|
|
|
element.realityImages.forEach(item => { //每张图片设置选中状态为false
|
|
|
|
item.newImageUrl = `/api/Objects/PlanPlatform/${item.imageUrl}?x-oss-process=image/resize,m_fill,h_100,w_100` //处理图片URL地址
|
|
|
|
item.newImageUrl = `/api/Objects/PlanPlatform/${item.imageUrl}` //处理图片URL地址?x-oss-process=image/resize,m_fill,h_100,w_100
|
|
|
|
item.nameStart = item.name.substring(0, item.name.lastIndexOf(".")); //图片名称前缀
|
|
|
|
item.nameStart = item.name.substring(0, item.name.lastIndexOf(".")); //图片名称前缀
|
|
|
|
item.nameEnd = item.name.substring(item.name.lastIndexOf("."), item.name.length); //图片名称后缀
|
|
|
|
item.nameEnd = item.name.substring(item.name.lastIndexOf("."), item.name.length); //图片名称后缀
|
|
|
|
resolve(data) |
|
|
|
resolve(data) |
|
|
@ -1616,6 +1618,7 @@ export class CreatePlanOnlineFiveComponent implements OnInit { |
|
|
|
preview() { |
|
|
|
preview() { |
|
|
|
this.pattern = 'look' |
|
|
|
this.pattern = 'look' |
|
|
|
this.clickTitleItem('单位概况') |
|
|
|
this.clickTitleItem('单位概况') |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
quitPreview() { |
|
|
|
quitPreview() { |
|
|
|
this.pattern = 'edit' |
|
|
|
this.pattern = 'edit' |
|
|
@ -1674,14 +1677,16 @@ export class CreatePlanOnlineFiveComponent implements OnInit { |
|
|
|
|
|
|
|
|
|
|
|
this.planTemplateData.forEach(element => { |
|
|
|
this.planTemplateData.forEach(element => { |
|
|
|
if(element.groupName=='交通水源'||element.groupName=='重点图示'){ |
|
|
|
if(element.groupName=='交通水源'||element.groupName=='重点图示'){ |
|
|
|
console.log(element.attribute[0].imgArr.length) |
|
|
|
if(element.attribute[0].imgArr.length>0){ |
|
|
|
for(let i=0;i<element.attribute[0].imgArr.length;i++){ |
|
|
|
for(let i=0;i<element.attribute[0].imgArr.length;i++){ |
|
|
|
String(element.attribute[0].imgArr[i]) +'?x-image-process=image/format,png' |
|
|
|
console.log(element.attribute[0].imgArr[i]) |
|
|
|
|
|
|
|
element.attribute[0].imgArr[i]= String(element.attribute[0].imgArr[i]) +'?x-image-process=image/format,jpg' |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
|
console.log(this.planTemplateData) |
|
|
|
console.log(this.planTemplateData) |
|
|
|
|
|
|
|
|
|
|
|
$(".mainbox").wordExport('word文档'); |
|
|
|
$(".mainbox").wordExport('word文档'); |
|
|
|
} |
|
|
|
} |
|
|
|
//原数据点击
|
|
|
|
//原数据点击
|
|
|
@ -1822,7 +1827,7 @@ export class CreatePlanOnlineFiveComponent implements OnInit { |
|
|
|
if(value.groupName=='交通水源'||value.groupName=='重点图示'){ |
|
|
|
if(value.groupName=='交通水源'||value.groupName=='重点图示'){ |
|
|
|
value.attribute.forEach(element => { |
|
|
|
value.attribute.forEach(element => { |
|
|
|
if(element.imgArr!=undefined&&element.imgArr.length>0){ |
|
|
|
if(element.imgArr!=undefined&&element.imgArr.length>0){ |
|
|
|
element.imgArr[0]=element.imgArr[0].slice(25,element.imgArr[0].length)+'?x-image-process=image/format,png' |
|
|
|
element.imgArr[0]=element.imgArr[0].slice(25,element.imgArr[0].length) //+'?x-image-process=image/format,png'
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
}); |
|
|
|
}); |
|
|
@ -2145,6 +2150,7 @@ export class disaster{ |
|
|
|
close(){ |
|
|
|
close(){ |
|
|
|
this.dialogRef.close(); |
|
|
|
this.dialogRef.close(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
//确定按钮
|
|
|
|
//确定按钮
|
|
|
|
newdisaster(){ |
|
|
|
newdisaster(){ |
|
|
|
const config = new MatSnackBarConfig(); |
|
|
|
const config = new MatSnackBarConfig(); |
|
|
@ -2155,9 +2161,9 @@ export class disaster{ |
|
|
|
}else if(this.headName==undefined||this.headName==''){ |
|
|
|
}else if(this.headName==undefined||this.headName==''){ |
|
|
|
this.snackBar.open('请输入表头名称!','确定',config); |
|
|
|
this.snackBar.open('请输入表头名称!','确定',config); |
|
|
|
}else if(this.level==2&& (this.lieNumber==undefined||this.lieNumber=='')){ |
|
|
|
}else if(this.level==2&& (this.lieNumber==undefined||this.lieNumber=='')){ |
|
|
|
this.snackBar.open('请输入列数!','确定',config); |
|
|
|
this.snackBar.open('列数不许为空,并且列数大于0!','确定',config); |
|
|
|
}else if(this.level==2&& (this.hNumber==undefined||this.hNumber=='')){ |
|
|
|
}else if(this.level==2&& (this.hNumber==undefined||this.hNumber=='')){ |
|
|
|
this.snackBar.open('请输入行数!','确定',config); |
|
|
|
this.snackBar.open('行数不许为空,并且行数大于0!!','确定',config); |
|
|
|
} |
|
|
|
} |
|
|
|
else{ |
|
|
|
else{ |
|
|
|
let tree={ |
|
|
|
let tree={ |
|
|
@ -2193,21 +2199,46 @@ export class updataHl{ |
|
|
|
} |
|
|
|
} |
|
|
|
level//类型
|
|
|
|
level//类型
|
|
|
|
headName=this.data.headName//表头名称
|
|
|
|
headName=this.data.headName//表头名称
|
|
|
|
lieNumber=this.data.zdy!=undefined?0:this.data.lieNumber//最小列数
|
|
|
|
lieNumber=this.data.tableth[0].length//最小列数
|
|
|
|
hNumber=this.data.zdy!=undefined?0:this.data.hNumber//行数
|
|
|
|
hNumber=this.data.tableth.length//行数
|
|
|
|
//取消按钮
|
|
|
|
//取消按钮
|
|
|
|
close(){ |
|
|
|
close(){ |
|
|
|
this.dialogRef.close(); |
|
|
|
this.dialogRef.close(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
inputChange(){ |
|
|
|
|
|
|
|
const config = new MatSnackBarConfig(); |
|
|
|
|
|
|
|
config.verticalPosition = 'top'; |
|
|
|
|
|
|
|
config.duration = 3000 |
|
|
|
|
|
|
|
if(this.level==2&& (this.lieNumber==undefined||this.lieNumber=='')){ |
|
|
|
|
|
|
|
this.snackBar.open('请输入列数,并且列数大于0!','确定',config); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}else if(this.level==2&& (this.hNumber==undefined||this.hNumber=='')){ |
|
|
|
|
|
|
|
this.snackBar.open('请输入行数,并且行数大于0!!','确定',config); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
//确定按钮
|
|
|
|
//确定按钮
|
|
|
|
newdisaster(){ |
|
|
|
newdisaster(){ |
|
|
|
console.log(this.data) |
|
|
|
console.log(this.data) |
|
|
|
let result={ |
|
|
|
let result={ |
|
|
|
lieNumber:this.level==2? this.data.tableth[0].length:this.data.tableth.length, |
|
|
|
lieNumber:this.level==2? this.lieNumber:this.data.tableth.length, |
|
|
|
hNumber:this.data.tableth.length |
|
|
|
hNumber:this.hNumber |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
const config = new MatSnackBarConfig(); |
|
|
|
|
|
|
|
config.verticalPosition = 'top'; |
|
|
|
|
|
|
|
config.duration = 3000 |
|
|
|
|
|
|
|
if(this.level==undefined||this.level==''){ |
|
|
|
|
|
|
|
this.snackBar.open('请选择类型!','确定',config); |
|
|
|
|
|
|
|
}else if(this.headName==undefined||this.headName==''){ |
|
|
|
|
|
|
|
this.snackBar.open('请输入表头名称!','确定',config); |
|
|
|
|
|
|
|
}else if(this.level==2&& (this.lieNumber==undefined||this.lieNumber=='')){ |
|
|
|
|
|
|
|
this.snackBar.open('列数不许为空,并且列数大于0!','确定',config); |
|
|
|
|
|
|
|
}else if(this.level==2&& (this.hNumber==undefined||this.hNumber=='')){ |
|
|
|
|
|
|
|
this.snackBar.open('行数不许为空,并且行数大于0!!','确定',config); |
|
|
|
|
|
|
|
}else{ |
|
|
|
this.dialogRef.close(result); |
|
|
|
this.dialogRef.close(result); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
//建筑跟消防设施添加模板数据
|
|
|
|
//建筑跟消防设施添加模板数据
|
|
|
|
@Component({ |
|
|
|
@Component({ |
|
|
|