diff --git a/src/app/plan-management/create-plan-online-five/create-plan-online-five.component.html b/src/app/plan-management/create-plan-online-five/create-plan-online-five.component.html
index 284a9e3..769e37c 100644
--- a/src/app/plan-management/create-plan-online-five/create-plan-online-five.component.html
+++ b/src/app/plan-management/create-plan-online-five/create-plan-online-five.component.html
@@ -807,7 +807,7 @@
-
+
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 e0cca1e..6988466 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
@@ -159,7 +159,7 @@ export class CreatePlanOnlineFiveComponent implements OnInit {
data.items.forEach(element => {
if (element.id == this.route.snapshot.queryParams.companyId) {
this.unitData = element
- if(this.unitData.buildingTypes[0].name=='高层建筑'&&this.planLevel=='5'){
+ if((this.unitData.buildingTypes[0].name=='高层建筑'||this.unitData.buildingTypes[0].name=='居民楼')&&this.planLevel=='5'){
this.zaixianDr=true
}
//console.log('单位列表信息', this.unitData)
@@ -1212,7 +1212,7 @@ export class CreatePlanOnlineFiveComponent implements OnInit {
addNumber = -1
addTd(key, i) {
this.addNumber++
- if (this.planTemplateData[key].attribute[i].tableth == undefined) {
+ if (this.planTemplateData[key].attribute[i].tableth == undefined||this.planTemplateData[key].attribute[i].tableth.length==0) {
//this.planTemplateData[key].attribute[i].tabletr = []
const config = new MatSnackBarConfig();
config.verticalPosition = 'top';
@@ -1368,6 +1368,7 @@ export class CreatePlanOnlineFiveComponent implements OnInit {
this.addNumber++
this.planTemplateData[index].building[attacki].body.forEach((value,bodyi,arr)=>{
if(surveyName==arr[bodyi].surveyName){
+ console.log(bodyi)
if(arr[bodyi].zdy==undefined){
if (surveyName == '进攻通道') {
if (this.planTemplateData[index].building[attacki].body[bodyi].attinf[i].tabletr == undefined) {
@@ -1415,7 +1416,7 @@ export class CreatePlanOnlineFiveComponent implements OnInit {
//单位概况自定义表格新增一行
unitNewadd(...num:number[]){
console.log(num)
- if (this.planTemplateData[num[0]].building[num[1]].body[num[2]].attinf[num[3]].tableth == undefined) {
+ if (this.planTemplateData[num[0]].building[num[1]].body[num[2]].attinf[num[3]].tableth == undefined||this.planTemplateData[num[0]].building[num[1]].body[num[2]].attinf[num[3]].tableth.length==0) {
//this.planTemplateData[key].attribute[i].tabletr = []
const config = new MatSnackBarConfig();
config.verticalPosition = 'top';
@@ -1591,7 +1592,7 @@ export class CreatePlanOnlineFiveComponent implements OnInit {
searchType = '0'
//打开自定义新增具体内容
tuTrue=false
- addAttribute(groupName,attacki?:any, i?:any,fileNum?:any,surveyName?:string){
+ addAttribute(groupName,attacki?:any, bi?:any,fileNum?:any,surveyName?:string){
let index = this.getArrayIndex(this.planTemplateData,'单位概况')
const dialogRef = this.dialog.open(disaster, {//调用open方法打开对话框并且携带参数过去
width: '340px',
@@ -1600,7 +1601,6 @@ export class CreatePlanOnlineFiveComponent implements OnInit {
data:this.planTemplateData
});
dialogRef.afterClosed().subscribe(result => {
- console.log(result)
if(result!=undefined){
if(surveyName==undefined){
this.planTemplateData.forEach((value,index,array)=>{
@@ -1612,10 +1612,10 @@ export class CreatePlanOnlineFiveComponent implements OnInit {
array[index].attribute.push(result)
}
if(result.level==2){
- for(var i=0;i{
+ this.http.post(`/api/OfficeExtract/ExtractWordPlan?type=${type}`,formData).subscribe((data:any)=>{
console.log(data)
if(data==null){
this.snackBar.open('解析失败,请确定好格式再重新上传!', '确定', config);
diff --git a/src/app/statistic-analysis/combined-query/combined-query.component.ts b/src/app/statistic-analysis/combined-query/combined-query.component.ts
index a15b602..c1b1950 100644
--- a/src/app/statistic-analysis/combined-query/combined-query.component.ts
+++ b/src/app/statistic-analysis/combined-query/combined-query.component.ts
@@ -122,6 +122,7 @@ export class CombinedQueryComponent implements OnInit {
let result = await new Promise((resolve, reject)=>{
this.http.get("/api/StatisticsAnalysis/ReportTable", { params:this.preparelevels==0? paramsdata:yuandata }).subscribe((data: any) => {
console.log(data)
+ this.excelData=data
if(data.length==0){
this.tableDataNull=true
}else{
@@ -160,42 +161,42 @@ export class CombinedQueryComponent implements OnInit {
//预案查询
this.yuanColumns=['组织名称', '总数']
this.yuanTable=[{name:[0,0]}]
- if(this.reservePlanType.length!=0){
- this.reservePlanType.forEach(element => {
+ if(this.planCategory.length!=0){
+ this.planCategory.forEach(element=>{
if(element==1){
- this.yuanColumns.push('二维')
+ this.yuanColumns.push('Ⅰ级')
this.yuanTable[0].name.push(0)
}else if(element==2){
- this.yuanColumns.push('三维')
+ this.yuanColumns.push('Ⅱ级')
+ this.yuanTable[0].name.push(0)
+ }else if(element==3){
+ this.yuanColumns.push('Ⅲ级')
this.yuanTable[0].name.push(0)
}else if(element==4){
- this.yuanColumns.push('其他')
+ this.yuanColumns.push('Ⅳ级')
this.yuanTable[0].name.push(0)
- }else if(element==16){
- this.yuanColumns.push('文本')
+ }else if(element==5){
+ this.yuanColumns.push('Ⅴ级')
this.yuanTable[0].name.push(0)
}
- });
+ })
}
- if(this.planCategory.length!=0){
- this.planCategory.forEach(element=>{
+ if(this.reservePlanType.length!=0){
+ this.reservePlanType.forEach(element => {
if(element==1){
- this.yuanColumns.push('Ⅰ级预案')
+ this.yuanColumns.push('二维')
this.yuanTable[0].name.push(0)
}else if(element==2){
- this.yuanColumns.push('Ⅱ级预案')
- this.yuanTable[0].name.push(0)
- }else if(element==3){
- this.yuanColumns.push('Ⅲ级预案')
+ this.yuanColumns.push('三维')
this.yuanTable[0].name.push(0)
}else if(element==4){
- this.yuanColumns.push('Ⅳ级预案')
+ this.yuanColumns.push('其他')
this.yuanTable[0].name.push(0)
- }else if(element==5){
- this.yuanColumns.push('Ⅴ级预案')
+ }else if(element==16){
+ this.yuanColumns.push('文本')
this.yuanTable[0].name.push(0)
}
- })
+ });
}
data.forEach((element,i,value) => {
@@ -243,7 +244,7 @@ export class CombinedQueryComponent implements OnInit {
console.log(this.yuanColumns)
console.log(this.yuanTable)
- this.excelData=data
+
resolve(this.excelData)
}
)
diff --git a/src/app/ui/plan-template/plan-template.component.ts b/src/app/ui/plan-template/plan-template.component.ts
index 9bb15b0..6bc8b7a 100644
--- a/src/app/ui/plan-template/plan-template.component.ts
+++ b/src/app/ui/plan-template/plan-template.component.ts
@@ -227,6 +227,7 @@ export class PlanTemplateComponent implements OnInit {
}
//右侧新增分组点击事件
addGroupClick(){
+ var temp
const config = new MatSnackBarConfig();
config.verticalPosition = 'top';
config.duration = 3000
@@ -246,6 +247,19 @@ export class PlanTemplateComponent implements OnInit {
});
dialogRef.afterClosed().subscribe(result => {
console.log(result,this.newleftTabledata)
+ /* if(result.length>this.newleftTabledata[this.leftclicki].data.length){
+ this.newleftTabledata[this.leftclicki].data.forEach((item,i,value)=>{
+ result.forEach((element,ri,rval) => {
+ if(value[i].groupName==rval[ri].groupName){
+ console.log('000')
+ }
+ });
+ })
+
+ this.newleftTabledata[this.leftclicki].data.push(result)
+ } */
+ //this.newleftTabledata[this.leftclicki].data.push({groupName: '预案附件', completed: false})
+ console.log(result)
this.newleftTabledata.forEach((value,index,array)=>{
if(array[index].buildingTypeId==this.buildingTypeId&&array[index].planCategory==this.planCategory){
if(result!=undefined){
@@ -253,7 +267,8 @@ export class PlanTemplateComponent implements OnInit {
//添加分组名称
if(array[index].data==null||array[index].data.length==0){
array[index].data=result
- }else{
+ }
+ else{
array[index].data[i].completed=rarr[i].completed
}
@@ -298,7 +313,8 @@ export class PlanTemplateComponent implements OnInit {
if(isTrue){
this.group.forEach((element,index,array)=>{
if(array[index].groupName==groupName){
- this.group.splice(index,1)
+ //this.group.splice(index,1)
+ array[index].completed=false
}
})
}