+
diff --git a/src/app/plan-management/create-plan-online-five/create-plan-online-five.component.scss b/src/app/plan-management/create-plan-online-five/create-plan-online-five.component.scss
index b6bfc31..e03f010 100644
--- a/src/app/plan-management/create-plan-online-five/create-plan-online-five.component.scss
+++ b/src/app/plan-management/create-plan-online-five/create-plan-online-five.component.scss
@@ -79,6 +79,22 @@
box-sizing: border-box;
padding-top: 66px;
overflow-y: auto;
+ .shadow{
+ height: 95%;
+ width: 97%;
+ margin: 10px 10px 10px 10px;
+ /* position:absolute;
+ left:0;
+ top:0; */
+ z-index:998;
+ background-color:#FFFFFF;
+ opacity:0.6;
+ mat-spinner{
+ position: relative;
+ top: 40%;
+ left: 45%;
+ }
+ }
.leftbox {
position: fixed;
width: 14%;
@@ -401,6 +417,7 @@
min-height: 97%;
box-sizing: border-box;
padding: 10px 10px 0;
+
.cover {
width: 100%;
min-height: 780px;
diff --git a/src/app/plan-management/create-plan-online-five/create-plan-online-five.component.ts b/src/app/plan-management/create-plan-online-five/create-plan-online-five.component.ts
index 348d3e3..d21a440 100644
--- a/src/app/plan-management/create-plan-online-five/create-plan-online-five.component.ts
+++ b/src/app/plan-management/create-plan-online-five/create-plan-online-five.component.ts
@@ -230,7 +230,7 @@ export class CreatePlanOnlineFiveComponent implements OnInit {
})
this.buData = JSON.parse(JSON.stringify(this.buData))
- console.log(this.buData)
+ //console.log(this.buData)
this.buData.forEach((pvalue, pindex, parr) => {
if (parr[pindex].length > 0) {
parr[pindex].forEach((nval, nindex, narr) => {
@@ -392,7 +392,7 @@ export class CreatePlanOnlineFiveComponent implements OnInit {
//delete this.planTemplateData[this.planTemplateData.length-3]
}
//JSON.parse(JSON.stringify(this.planTemplateData))
- console.log(this.planTemplateData)
+ //console.log(this.planTemplateData)
});
}
}
@@ -420,7 +420,7 @@ export class CreatePlanOnlineFiveComponent implements OnInit {
drop(event: CdkDragDrop) {
moveItemInArray(this.planTemplateData, event.previousIndex, event.currentIndex);
- console.log('拖拽标题', this.planTemplateData)
+ //console.log('拖拽标题', this.planTemplateData)
}
//获取建筑信息
@@ -1117,7 +1117,7 @@ export class CreatePlanOnlineFiveComponent implements OnInit {
})
}
- console.log(this.planTemplateData)
+ //console.log(this.planTemplateData)
}
//单位相关数据
unitId: any = this.route.snapshot.queryParams.companyId
@@ -1340,6 +1340,7 @@ export class CreatePlanOnlineFiveComponent implements OnInit {
pattern: string = 'edit'
preview() {
this.pattern = 'look'
+ this.clickTitleItem('单位概况')
}
quitPreview() {
this.pattern = 'edit'
@@ -1489,7 +1490,58 @@ export class CreatePlanOnlineFiveComponent implements OnInit {
}
//上传
upload() {
- document.getElementById('up').click()
+ let isTrue = confirm('上传新文件后可能会覆盖原有数据,您确定要继续上传吗')
+ if(isTrue){
+ document.getElementById('up').click()
+ }
+ }
+ //在线文档上传接口
+ fileData
+ iftrue=false
+ fileSc(e){
+ this.iftrue=true
+ const config = new MatSnackBarConfig();
+ config.verticalPosition = 'top';
+ config.duration = 3000
+ let formData = new FormData()
+ formData.append("file", e.target.files[0])
+ let fileData={
+ type:1,
+ file:formData
+ }
+ this.http.post(`/api/OfficeExtract/ExtractWordPlan?type=1`,formData).subscribe((data:any)=>{
+ console.log(data)
+ if(data==null){
+ this.snackBar.open('解析失败,请确定好格式再重新上传!', '确定', config);
+ }else{
+ this.fileData=JSON.parse(JSON.stringify(data))
+ this.fileData.forEach((value,index,array) => {
+ if(value.groupName=='交通水源'||value.groupName=='重点图示'){
+ value.attribute.forEach(element => {
+ element.imgArr[0]=element.imgArr[0].slice(25,element.imgArr[0].length)
+ });
+ }
+ this.planTemplateData.forEach((pvalue,pindex,parr) => {
+ if(parr[1].building==undefined){
+ if(array[index].groupName==parr[pindex].groupName){
+ parr[pindex].attribute=array[index].attribute
+ }
+ }else{
+ if(array[index].groupName==parr[pindex].groupName&&pindex!=1){
+ parr[pindex].attribute=array[index].attribute
+ }else if(array[index].groupName==parr[pindex].groupName&&pindex==1){
+ parr[pindex].building[0].body=array[index].attribute
+ }
+ }
+ });
+
+ });
+ //console.log(this.fileData)
+ this.snackBar.open('解析成功!', '确定', config);
+ }
+ this.iftrue=false
+ e.target.value=''
+ })
}
}