|
|
@ -4,7 +4,7 @@ |
|
|
|
* @Author: sueRimn |
|
|
|
* @Author: sueRimn |
|
|
|
* @Date: 2021-06-16 13:56:54 |
|
|
|
* @Date: 2021-06-16 13:56:54 |
|
|
|
* @LastEditors: sueRimn |
|
|
|
* @LastEditors: sueRimn |
|
|
|
* @LastEditTime: 2021-08-07 14:29:01 |
|
|
|
* @LastEditTime: 2021-08-12 14:14:20 |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
import { HttpClient } from '@angular/common/http'; |
|
|
|
import { HttpClient } from '@angular/common/http'; |
|
|
|
import { Component, Inject, OnInit, Renderer2, ViewChild, Input } from '@angular/core'; |
|
|
|
import { Component, Inject, OnInit, Renderer2, ViewChild, Input } from '@angular/core'; |
|
|
@ -50,7 +50,7 @@ export class CreatePlanOnlineFiveComponent implements OnInit { |
|
|
|
paginator: MatPaginator; |
|
|
|
paginator: MatPaginator; |
|
|
|
length: any; //共多少条数据
|
|
|
|
length: any; //共多少条数据
|
|
|
|
pageSize: any; //每页条数
|
|
|
|
pageSize: any; //每页条数
|
|
|
|
pageSizeOptions: number[] = [10] //设置每页条数
|
|
|
|
pageSizeOptions: number[] = [6] //设置每页条数
|
|
|
|
PageNumber: any; //第几页
|
|
|
|
PageNumber: any; //第几页
|
|
|
|
|
|
|
|
|
|
|
|
planLevel: string//预案级别
|
|
|
|
planLevel: string//预案级别
|
|
|
@ -67,7 +67,7 @@ export class CreatePlanOnlineFiveComponent implements OnInit { |
|
|
|
this.getOrganizations(); |
|
|
|
this.getOrganizations(); |
|
|
|
//this.getAllBuildings()
|
|
|
|
//this.getAllBuildings()
|
|
|
|
} |
|
|
|
} |
|
|
|
zdysearch |
|
|
|
zdysearch='' |
|
|
|
organizationName: any //当前单位组织机构名称
|
|
|
|
organizationName: any //当前单位组织机构名称
|
|
|
|
treedata: any //组织机构树型数据
|
|
|
|
treedata: any //组织机构树型数据
|
|
|
|
newArr: any = [] |
|
|
|
newArr: any = [] |
|
|
@ -112,7 +112,7 @@ export class CreatePlanOnlineFiveComponent implements OnInit { |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
|
}); |
|
|
|
}); |
|
|
|
this.http.get("/api/Account/Profiles").subscribe( |
|
|
|
/* this.http.get("/api/Account/Profiles").subscribe( |
|
|
|
(data: any) => { |
|
|
|
(data: any) => { |
|
|
|
this.organizationName = data.organizationName |
|
|
|
this.organizationName = data.organizationName |
|
|
|
if (this.organizationName) { |
|
|
|
if (this.organizationName) { |
|
|
@ -125,7 +125,8 @@ export class CreatePlanOnlineFiveComponent implements OnInit { |
|
|
|
this.dataSource.data = this.tree.toTree(this.treedata); |
|
|
|
this.dataSource.data = this.tree.toTree(this.treedata); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
) |
|
|
|
) */ |
|
|
|
|
|
|
|
this.dataSource.data = this.tree.toTree(this.treedata); |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
//获得所有组织机构
|
|
|
|
//获得所有组织机构
|
|
|
@ -138,7 +139,11 @@ export class CreatePlanOnlineFiveComponent implements OnInit { |
|
|
|
} |
|
|
|
} |
|
|
|
) |
|
|
|
) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
//清空查询条件数据
|
|
|
|
|
|
|
|
clearSearch(){ |
|
|
|
|
|
|
|
this.zdysearch='' |
|
|
|
|
|
|
|
this.js='' |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//获得单位信息
|
|
|
|
//获得单位信息
|
|
|
@ -151,7 +156,7 @@ export class CreatePlanOnlineFiveComponent implements OnInit { |
|
|
|
data.items.forEach(element => { |
|
|
|
data.items.forEach(element => { |
|
|
|
if (element.id == this.route.snapshot.queryParams.companyId) { |
|
|
|
if (element.id == this.route.snapshot.queryParams.companyId) { |
|
|
|
this.unitData = element |
|
|
|
this.unitData = element |
|
|
|
console.log('单位列表信息', this.unitData) |
|
|
|
//console.log('单位列表信息', this.unitData)
|
|
|
|
this.getTemplateData() |
|
|
|
this.getTemplateData() |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
@ -161,6 +166,89 @@ export class CreatePlanOnlineFiveComponent implements OnInit { |
|
|
|
selectedItem: string = '封面' |
|
|
|
selectedItem: string = '封面' |
|
|
|
async clickTitleItem(item) { |
|
|
|
async clickTitleItem(item) { |
|
|
|
this.addNumber = -1 |
|
|
|
this.addNumber = -1 |
|
|
|
|
|
|
|
this.yinruData={ |
|
|
|
|
|
|
|
items:[] |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
this.yinJson={ |
|
|
|
|
|
|
|
//组织指挥
|
|
|
|
|
|
|
|
organizationCommands:{ |
|
|
|
|
|
|
|
tableCount: { |
|
|
|
|
|
|
|
totalCount: 0, |
|
|
|
|
|
|
|
tables: [ |
|
|
|
|
|
|
|
] |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
inputCount: { |
|
|
|
|
|
|
|
totalCount: 0, |
|
|
|
|
|
|
|
inputs: [ |
|
|
|
|
|
|
|
] |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
textAreaCount: { |
|
|
|
|
|
|
|
totalCount: 0 |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
treeCount: { |
|
|
|
|
|
|
|
totalCount: 0 |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
//社会联动
|
|
|
|
|
|
|
|
socialLinkages:{ |
|
|
|
|
|
|
|
tableCount: { |
|
|
|
|
|
|
|
totalCount: 0, |
|
|
|
|
|
|
|
tables: [ |
|
|
|
|
|
|
|
] |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
inputCount: { |
|
|
|
|
|
|
|
totalCount: 0, |
|
|
|
|
|
|
|
inputs: [ |
|
|
|
|
|
|
|
] |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
textAreaCount: { |
|
|
|
|
|
|
|
totalCount: 0 |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
treeCount: { |
|
|
|
|
|
|
|
totalCount: 0 |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
//勤务保障
|
|
|
|
|
|
|
|
serviceSupports:{ |
|
|
|
|
|
|
|
tableCount: { |
|
|
|
|
|
|
|
totalCount: 0, |
|
|
|
|
|
|
|
tables: [ |
|
|
|
|
|
|
|
] |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
inputCount: { |
|
|
|
|
|
|
|
totalCount: 0, |
|
|
|
|
|
|
|
inputs: [ |
|
|
|
|
|
|
|
] |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
textAreaCount: { |
|
|
|
|
|
|
|
totalCount: 0 |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
treeCount: { |
|
|
|
|
|
|
|
totalCount: 0 |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
//辅助决策
|
|
|
|
|
|
|
|
decisionSupports:{ |
|
|
|
|
|
|
|
tableCount: { |
|
|
|
|
|
|
|
totalCount: 0, |
|
|
|
|
|
|
|
tables: [ |
|
|
|
|
|
|
|
] |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
inputCount: { |
|
|
|
|
|
|
|
totalCount: 0, |
|
|
|
|
|
|
|
inputs: [ |
|
|
|
|
|
|
|
] |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
textAreaCount: { |
|
|
|
|
|
|
|
totalCount: 0 |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
treeCount: { |
|
|
|
|
|
|
|
totalCount: 0 |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
this.js='' |
|
|
|
|
|
|
|
this.zdysearch='' |
|
|
|
this.selectedItem = item.groupName |
|
|
|
this.selectedItem = item.groupName |
|
|
|
if (this.selectedItem == '重点图示') { |
|
|
|
if (this.selectedItem == '重点图示') { |
|
|
|
this.getAllBuildings() |
|
|
|
this.getAllBuildings() |
|
|
@ -320,7 +408,7 @@ export class CreatePlanOnlineFiveComponent implements OnInit { |
|
|
|
//获得模板信息
|
|
|
|
//获得模板信息
|
|
|
|
getTemplateData() { |
|
|
|
getTemplateData() { |
|
|
|
this.http.get(`/api/PlanComponents/${this.route.snapshot.queryParams.planId}/WebText`).subscribe((data: any) => { |
|
|
|
this.http.get(`/api/PlanComponents/${this.route.snapshot.queryParams.planId}/WebText`).subscribe((data: any) => { |
|
|
|
console.log('预案内容', data) |
|
|
|
//console.log('预案内容', data)
|
|
|
|
this.planTemplateData = JSON.parse(data.webTextData).filter(item => |
|
|
|
this.planTemplateData = JSON.parse(data.webTextData).filter(item => |
|
|
|
item.completed == true |
|
|
|
item.completed == true |
|
|
|
) |
|
|
|
) |
|
|
@ -385,7 +473,408 @@ export class CreatePlanOnlineFiveComponent implements OnInit { |
|
|
|
}) |
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
//引入数据json
|
|
|
|
|
|
|
|
yinJson={ |
|
|
|
|
|
|
|
//组织指挥
|
|
|
|
|
|
|
|
organizationCommands:{ |
|
|
|
|
|
|
|
tableCount: { |
|
|
|
|
|
|
|
totalCount: 0, |
|
|
|
|
|
|
|
tables: [ |
|
|
|
|
|
|
|
] |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
inputCount: { |
|
|
|
|
|
|
|
totalCount: 0, |
|
|
|
|
|
|
|
inputs: [ |
|
|
|
|
|
|
|
] |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
textAreaCount: { |
|
|
|
|
|
|
|
totalCount: 0 |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
treeCount: { |
|
|
|
|
|
|
|
totalCount: 0 |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
//社会联动
|
|
|
|
|
|
|
|
socialLinkages:{ |
|
|
|
|
|
|
|
tableCount: { |
|
|
|
|
|
|
|
totalCount: 0, |
|
|
|
|
|
|
|
tables: [ |
|
|
|
|
|
|
|
] |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
inputCount: { |
|
|
|
|
|
|
|
totalCount: 0, |
|
|
|
|
|
|
|
inputs: [ |
|
|
|
|
|
|
|
] |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
textAreaCount: { |
|
|
|
|
|
|
|
totalCount: 0 |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
treeCount: { |
|
|
|
|
|
|
|
totalCount: 0 |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
//勤务保障
|
|
|
|
|
|
|
|
serviceSupports:{ |
|
|
|
|
|
|
|
tableCount: { |
|
|
|
|
|
|
|
totalCount: 0, |
|
|
|
|
|
|
|
tables: [ |
|
|
|
|
|
|
|
] |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
inputCount: { |
|
|
|
|
|
|
|
totalCount: 0, |
|
|
|
|
|
|
|
inputs: [ |
|
|
|
|
|
|
|
] |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
textAreaCount: { |
|
|
|
|
|
|
|
totalCount: 0 |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
treeCount: { |
|
|
|
|
|
|
|
totalCount: 0 |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
//辅助决策
|
|
|
|
|
|
|
|
decisionSupports:{ |
|
|
|
|
|
|
|
tableCount: { |
|
|
|
|
|
|
|
totalCount: 0, |
|
|
|
|
|
|
|
tables: [ |
|
|
|
|
|
|
|
] |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
inputCount: { |
|
|
|
|
|
|
|
totalCount: 0, |
|
|
|
|
|
|
|
inputs: [ |
|
|
|
|
|
|
|
] |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
textAreaCount: { |
|
|
|
|
|
|
|
totalCount: 0 |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
treeCount: { |
|
|
|
|
|
|
|
totalCount: 0 |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
async yinRu(type){ |
|
|
|
|
|
|
|
if(type==0){ |
|
|
|
|
|
|
|
this.yinJson={ |
|
|
|
|
|
|
|
//组织指挥
|
|
|
|
|
|
|
|
organizationCommands:{ |
|
|
|
|
|
|
|
tableCount: { |
|
|
|
|
|
|
|
totalCount: 0, |
|
|
|
|
|
|
|
tables: [ |
|
|
|
|
|
|
|
] |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
inputCount: { |
|
|
|
|
|
|
|
totalCount: 0, |
|
|
|
|
|
|
|
inputs: [ |
|
|
|
|
|
|
|
] |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
textAreaCount: { |
|
|
|
|
|
|
|
totalCount: 0 |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
treeCount: { |
|
|
|
|
|
|
|
totalCount: 0 |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
//社会联动
|
|
|
|
|
|
|
|
socialLinkages:{ |
|
|
|
|
|
|
|
tableCount: { |
|
|
|
|
|
|
|
totalCount: 0, |
|
|
|
|
|
|
|
tables: [ |
|
|
|
|
|
|
|
] |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
inputCount: { |
|
|
|
|
|
|
|
totalCount: 0, |
|
|
|
|
|
|
|
inputs: [ |
|
|
|
|
|
|
|
] |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
textAreaCount: { |
|
|
|
|
|
|
|
totalCount: 0 |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
treeCount: { |
|
|
|
|
|
|
|
totalCount: 0 |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
//勤务保障
|
|
|
|
|
|
|
|
serviceSupports:{ |
|
|
|
|
|
|
|
tableCount: { |
|
|
|
|
|
|
|
totalCount: 0, |
|
|
|
|
|
|
|
tables: [ |
|
|
|
|
|
|
|
] |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
inputCount: { |
|
|
|
|
|
|
|
totalCount: 0, |
|
|
|
|
|
|
|
inputs: [ |
|
|
|
|
|
|
|
] |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
textAreaCount: { |
|
|
|
|
|
|
|
totalCount: 0 |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
treeCount: { |
|
|
|
|
|
|
|
totalCount: 0 |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
//辅助决策
|
|
|
|
|
|
|
|
decisionSupports:{ |
|
|
|
|
|
|
|
tableCount: { |
|
|
|
|
|
|
|
totalCount: 0, |
|
|
|
|
|
|
|
tables: [ |
|
|
|
|
|
|
|
] |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
inputCount: { |
|
|
|
|
|
|
|
totalCount: 0, |
|
|
|
|
|
|
|
inputs: [ |
|
|
|
|
|
|
|
] |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
textAreaCount: { |
|
|
|
|
|
|
|
totalCount: 0 |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
treeCount: { |
|
|
|
|
|
|
|
totalCount: 0 |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
var orgtableCount=0 |
|
|
|
|
|
|
|
var orginputCount=0 |
|
|
|
|
|
|
|
var orgtextAreaCount=0 |
|
|
|
|
|
|
|
var orgtreeCount=0 |
|
|
|
|
|
|
|
this.planTemplateData[4].attribute.forEach((orgvalue,orgi,orgArr) => { |
|
|
|
|
|
|
|
if(orgArr[orgi].level=='1'){ |
|
|
|
|
|
|
|
orgtableCount++ |
|
|
|
|
|
|
|
this.yinJson.organizationCommands.tableCount.tables.push({itemCount:orgArr[orgi].tableth.length}) |
|
|
|
|
|
|
|
}else if(orgArr[orgi].level=='2'){ |
|
|
|
|
|
|
|
orginputCount++ |
|
|
|
|
|
|
|
this.yinJson.organizationCommands.inputCount.inputs.push({colCount:orgArr[orgi].lieNumber,rowCount:orgArr[orgi].hNumber}) |
|
|
|
|
|
|
|
}else if(orgArr[orgi].level=='3'){ |
|
|
|
|
|
|
|
orgtextAreaCount++ |
|
|
|
|
|
|
|
}else if(orgArr[orgi].level=='4'){ |
|
|
|
|
|
|
|
orgtreeCount++ |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
this.yinJson.organizationCommands.tableCount.totalCount=orgtableCount |
|
|
|
|
|
|
|
this.yinJson.organizationCommands.inputCount.totalCount=orginputCount |
|
|
|
|
|
|
|
this.yinJson.organizationCommands.textAreaCount.totalCount=orgtextAreaCount |
|
|
|
|
|
|
|
this.yinJson.organizationCommands.treeCount.totalCount=orgtreeCount |
|
|
|
|
|
|
|
var shetableCount=0 |
|
|
|
|
|
|
|
var sheinputCount=0 |
|
|
|
|
|
|
|
var shetextAreaCount=0 |
|
|
|
|
|
|
|
var shetreeCount=0 |
|
|
|
|
|
|
|
this.planTemplateData[6].attribute.forEach((orgvalue,orgi,orgArr) => { |
|
|
|
|
|
|
|
if(orgArr[orgi].level=='1'){ |
|
|
|
|
|
|
|
shetableCount++ |
|
|
|
|
|
|
|
//this.yinJson.organizationCommands.tableCount.tables.push({itemCount:orgtableCount})
|
|
|
|
|
|
|
|
}else if(orgArr[orgi].level=='2'){ |
|
|
|
|
|
|
|
sheinputCount++ |
|
|
|
|
|
|
|
this.yinJson.socialLinkages.inputCount.inputs.push({colCount:orgArr[orgi].lieNumber,rowCount:orgArr[orgi].hNumber}) |
|
|
|
|
|
|
|
}else if(orgArr[orgi].level=='3'){ |
|
|
|
|
|
|
|
shetextAreaCount++ |
|
|
|
|
|
|
|
}else if(orgArr[orgi].level=='4'){ |
|
|
|
|
|
|
|
shetreeCount++ |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
this.yinJson.socialLinkages.tableCount.totalCount=shetableCount |
|
|
|
|
|
|
|
this.yinJson.socialLinkages.inputCount.totalCount=sheinputCount |
|
|
|
|
|
|
|
this.yinJson.socialLinkages.textAreaCount.totalCount=shetextAreaCount |
|
|
|
|
|
|
|
this.yinJson.socialLinkages.treeCount.totalCount=shetreeCount |
|
|
|
|
|
|
|
var qintableCount=0 |
|
|
|
|
|
|
|
var qininputCount=0 |
|
|
|
|
|
|
|
var qintextAreaCount=0 |
|
|
|
|
|
|
|
var qintreeCount=0 |
|
|
|
|
|
|
|
this.planTemplateData[7].attribute.forEach((orgvalue,orgi,orgArr) => { |
|
|
|
|
|
|
|
if(orgArr[orgi].level=='1'){ |
|
|
|
|
|
|
|
qintableCount++ |
|
|
|
|
|
|
|
//this.yinJson.organizationCommands.tableCount.tables.push({itemCount:orgtableCount})
|
|
|
|
|
|
|
|
}else if(orgArr[orgi].level=='2'){ |
|
|
|
|
|
|
|
qininputCount++ |
|
|
|
|
|
|
|
this.yinJson.serviceSupports.inputCount.inputs.push({colCount:orgArr[orgi].lieNumber,rowCount:orgArr[orgi].hNumber}) |
|
|
|
|
|
|
|
}else if(orgArr[orgi].level=='3'){ |
|
|
|
|
|
|
|
qintextAreaCount++ |
|
|
|
|
|
|
|
}else if(orgArr[orgi].level=='4'){ |
|
|
|
|
|
|
|
qintreeCount++ |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
this.yinJson.serviceSupports.tableCount.totalCount=qintableCount |
|
|
|
|
|
|
|
this.yinJson.serviceSupports.inputCount.totalCount=qininputCount |
|
|
|
|
|
|
|
this.yinJson.serviceSupports.textAreaCount.totalCount=qintextAreaCount |
|
|
|
|
|
|
|
this.yinJson.serviceSupports.treeCount.totalCount=qintreeCount |
|
|
|
|
|
|
|
var futableCount=0 |
|
|
|
|
|
|
|
var fuinputCount=0 |
|
|
|
|
|
|
|
var futextAreaCount=0 |
|
|
|
|
|
|
|
var futreeCount=0 |
|
|
|
|
|
|
|
this.planTemplateData[9].attribute.forEach((orgvalue,orgi,orgArr) => { |
|
|
|
|
|
|
|
if(orgArr[orgi].level=='1'){ |
|
|
|
|
|
|
|
futableCount++ |
|
|
|
|
|
|
|
//this.yinJson.organizationCommands.tableCount.tables.push({itemCount:orgtableCount})
|
|
|
|
|
|
|
|
}else if(orgArr[orgi].level=='2'){ |
|
|
|
|
|
|
|
fuinputCount++ |
|
|
|
|
|
|
|
this.yinJson.decisionSupports.inputCount.inputs.push({colCount:orgArr[orgi].lieNumber,rowCount:orgArr[orgi].hNumber}) |
|
|
|
|
|
|
|
}else if(orgArr[orgi].level=='3'){ |
|
|
|
|
|
|
|
futextAreaCount++ |
|
|
|
|
|
|
|
}else if(orgArr[orgi].level=='4'){ |
|
|
|
|
|
|
|
futreeCount++ |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
this.yinJson.decisionSupports.tableCount.totalCount=futableCount |
|
|
|
|
|
|
|
this.yinJson.decisionSupports.inputCount.totalCount=fuinputCount |
|
|
|
|
|
|
|
this.yinJson.decisionSupports.textAreaCount.totalCount=futextAreaCount |
|
|
|
|
|
|
|
this.yinJson.decisionSupports.treeCount.totalCount=futreeCount |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if(type==5){ |
|
|
|
|
|
|
|
var orgtableCount=0 |
|
|
|
|
|
|
|
var orginputCount=0 |
|
|
|
|
|
|
|
var orgtextAreaCount=0 |
|
|
|
|
|
|
|
var orgtreeCount=0 |
|
|
|
|
|
|
|
this.planTemplateData[4].attribute.forEach((orgvalue,orgi,orgArr) => { |
|
|
|
|
|
|
|
if(orgArr[orgi].level=='1'){ |
|
|
|
|
|
|
|
orgtableCount++ |
|
|
|
|
|
|
|
this.yinJson.organizationCommands.tableCount.tables.push({itemCount:orgArr[orgi].tableth.length}) |
|
|
|
|
|
|
|
}else if(orgArr[orgi].level=='2'){ |
|
|
|
|
|
|
|
orginputCount++ |
|
|
|
|
|
|
|
this.yinJson.organizationCommands.inputCount.inputs.push({colCount:orgArr[orgi].lieNumber,rowCount:orgArr[orgi].hNumber}) |
|
|
|
|
|
|
|
}else if(orgArr[orgi].level=='3'){ |
|
|
|
|
|
|
|
orgtextAreaCount++ |
|
|
|
|
|
|
|
}else if(orgArr[orgi].level=='4'){ |
|
|
|
|
|
|
|
orgtreeCount++ |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
this.yinJson.organizationCommands.tableCount.totalCount=orgtableCount |
|
|
|
|
|
|
|
this.yinJson.organizationCommands.inputCount.totalCount=orginputCount |
|
|
|
|
|
|
|
this.yinJson.organizationCommands.textAreaCount.totalCount=orgtextAreaCount |
|
|
|
|
|
|
|
this.yinJson.organizationCommands.treeCount.totalCount=orgtreeCount |
|
|
|
|
|
|
|
this.yinJson.decisionSupports=null |
|
|
|
|
|
|
|
this.yinJson.serviceSupports=null |
|
|
|
|
|
|
|
this.yinJson.socialLinkages=null |
|
|
|
|
|
|
|
}if(type==7){ |
|
|
|
|
|
|
|
var orgtableCount=0 |
|
|
|
|
|
|
|
var orginputCount=0 |
|
|
|
|
|
|
|
var orgtextAreaCount=0 |
|
|
|
|
|
|
|
var orgtreeCount=0 |
|
|
|
|
|
|
|
this.planTemplateData[6].attribute.forEach((orgvalue,orgi,orgArr) => { |
|
|
|
|
|
|
|
if(orgArr[orgi].level=='1'){ |
|
|
|
|
|
|
|
orgtableCount++ |
|
|
|
|
|
|
|
//this.yinJson.organizationCommands.tableCount.tables.push({itemCount:orgtableCount})
|
|
|
|
|
|
|
|
}else if(orgArr[orgi].level=='2'){ |
|
|
|
|
|
|
|
orginputCount++ |
|
|
|
|
|
|
|
this.yinJson.socialLinkages.inputCount.inputs.push({colCount:orgArr[orgi].lieNumber,rowCount:orgArr[orgi].hNumber}) |
|
|
|
|
|
|
|
}else if(orgArr[orgi].level=='3'){ |
|
|
|
|
|
|
|
orgtextAreaCount++ |
|
|
|
|
|
|
|
}else if(orgArr[orgi].level=='4'){ |
|
|
|
|
|
|
|
orgtreeCount++ |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
this.yinJson.socialLinkages.tableCount.totalCount=orgtableCount |
|
|
|
|
|
|
|
this.yinJson.socialLinkages.inputCount.totalCount=orginputCount |
|
|
|
|
|
|
|
this.yinJson.socialLinkages.textAreaCount.totalCount=orgtextAreaCount |
|
|
|
|
|
|
|
this.yinJson.socialLinkages.treeCount.totalCount=orgtreeCount |
|
|
|
|
|
|
|
this.yinJson.serviceSupports=null |
|
|
|
|
|
|
|
this.yinJson.organizationCommands=null |
|
|
|
|
|
|
|
this.yinJson.decisionSupports=null |
|
|
|
|
|
|
|
}if(type==8){ |
|
|
|
|
|
|
|
var orgtableCount=0 |
|
|
|
|
|
|
|
var orginputCount=0 |
|
|
|
|
|
|
|
var orgtextAreaCount=0 |
|
|
|
|
|
|
|
var orgtreeCount=0 |
|
|
|
|
|
|
|
this.planTemplateData[7].attribute.forEach((orgvalue,orgi,orgArr) => { |
|
|
|
|
|
|
|
if(orgArr[orgi].level=='1'){ |
|
|
|
|
|
|
|
orgtableCount++ |
|
|
|
|
|
|
|
//this.yinJson.organizationCommands.tableCount.tables.push({itemCount:orgtableCount})
|
|
|
|
|
|
|
|
}else if(orgArr[orgi].level=='2'){ |
|
|
|
|
|
|
|
orginputCount++ |
|
|
|
|
|
|
|
this.yinJson.serviceSupports.inputCount.inputs.push({colCount:orgArr[orgi].lieNumber,rowCount:orgArr[orgi].hNumber}) |
|
|
|
|
|
|
|
}else if(orgArr[orgi].level=='3'){ |
|
|
|
|
|
|
|
orgtextAreaCount++ |
|
|
|
|
|
|
|
}else if(orgArr[orgi].level=='4'){ |
|
|
|
|
|
|
|
orgtreeCount++ |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
this.yinJson.serviceSupports.tableCount.totalCount=orgtableCount |
|
|
|
|
|
|
|
this.yinJson.serviceSupports.inputCount.totalCount=orginputCount |
|
|
|
|
|
|
|
this.yinJson.serviceSupports.textAreaCount.totalCount=orgtextAreaCount |
|
|
|
|
|
|
|
this.yinJson.serviceSupports.treeCount.totalCount=orgtreeCount |
|
|
|
|
|
|
|
this.yinJson.decisionSupports=null |
|
|
|
|
|
|
|
this.yinJson.organizationCommands=null |
|
|
|
|
|
|
|
this.yinJson.socialLinkages=null |
|
|
|
|
|
|
|
}if(type==10){ |
|
|
|
|
|
|
|
var orgtableCount=0 |
|
|
|
|
|
|
|
var orginputCount=0 |
|
|
|
|
|
|
|
var orgtextAreaCount=0 |
|
|
|
|
|
|
|
var orgtreeCount=0 |
|
|
|
|
|
|
|
this.planTemplateData[9].attribute.forEach((orgvalue,orgi,orgArr) => { |
|
|
|
|
|
|
|
if(orgArr[orgi].level=='1'){ |
|
|
|
|
|
|
|
orgtableCount++ |
|
|
|
|
|
|
|
//this.yinJson.organizationCommands.tableCount.tables.push({itemCount:orgtableCount})
|
|
|
|
|
|
|
|
}else if(orgArr[orgi].level=='2'){ |
|
|
|
|
|
|
|
orginputCount++ |
|
|
|
|
|
|
|
this.yinJson.decisionSupports.inputCount.inputs.push({colCount:orgArr[orgi].lieNumber,rowCount:orgArr[orgi].hNumber}) |
|
|
|
|
|
|
|
}else if(orgArr[orgi].level=='3'){ |
|
|
|
|
|
|
|
orgtextAreaCount++ |
|
|
|
|
|
|
|
}else if(orgArr[orgi].level=='4'){ |
|
|
|
|
|
|
|
orgtreeCount++ |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
this.yinJson.decisionSupports.tableCount.totalCount=orgtableCount |
|
|
|
|
|
|
|
this.yinJson.decisionSupports.inputCount.totalCount=orginputCount |
|
|
|
|
|
|
|
this.yinJson.decisionSupports.textAreaCount.totalCount=orgtextAreaCount |
|
|
|
|
|
|
|
this.yinJson.decisionSupports.treeCount.totalCount=orgtreeCount |
|
|
|
|
|
|
|
this.yinJson.organizationCommands=null |
|
|
|
|
|
|
|
this.yinJson.serviceSupports=null |
|
|
|
|
|
|
|
this.yinJson.socialLinkages=null |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
console.log(this.yinJson) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
//查询能引入的预案
|
|
|
|
|
|
|
|
yinruData={ |
|
|
|
|
|
|
|
items:[] |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
searchYuan(){ |
|
|
|
|
|
|
|
this.yinRu(this.selectedItem=='组织指挥'?5:this.selectedItem=='社会联动'?7:this.selectedItem=='勤务保障'?8:10) |
|
|
|
|
|
|
|
//console.log(JSON.stringify(this.yinJson))
|
|
|
|
|
|
|
|
var urlbm=encodeURI(JSON.stringify(this.yinJson)) |
|
|
|
|
|
|
|
let paramsdata:any={ |
|
|
|
|
|
|
|
planCategory:this.planLevel, |
|
|
|
|
|
|
|
buildingTypeId :this.route.snapshot.queryParams.unitTypeId, |
|
|
|
|
|
|
|
OrganizationId:this.searchType=='0'?'':this.jsId, |
|
|
|
|
|
|
|
CustomKeyword:this.searchType=='0'?this.zdysearch:'', |
|
|
|
|
|
|
|
webTextStatistics:urlbm, |
|
|
|
|
|
|
|
PageNumber: this.PageNumber || '1', |
|
|
|
|
|
|
|
PageSize: this.pageSizeOptions[0], |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.http.get("/api/PlanComponents/WebText",{params:paramsdata}).subscribe((data:any)=>{ |
|
|
|
|
|
|
|
this.yinruData=null |
|
|
|
|
|
|
|
this.yinruData=data |
|
|
|
|
|
|
|
if(this.yinruData.items.length==0){ |
|
|
|
|
|
|
|
const config = new MatSnackBarConfig(); |
|
|
|
|
|
|
|
config.verticalPosition = 'top'; |
|
|
|
|
|
|
|
config.duration = 3000 |
|
|
|
|
|
|
|
this.snackBar.open('暂无数据', '确定', config); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
//console.log(this.yinruData)
|
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
//可引入预案点击事件
|
|
|
|
|
|
|
|
clickYinru(clicki){ |
|
|
|
|
|
|
|
const dialogRef = this.dialog.open(yinYong, { |
|
|
|
|
|
|
|
width: '750px', |
|
|
|
|
|
|
|
height: '700px', |
|
|
|
|
|
|
|
//disableClose: true
|
|
|
|
|
|
|
|
data: {selectedItem:this.selectedItem,yinruData:this.yinruData.items[clicki].webTextData} |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
dialogRef.afterClosed().subscribe(result => { |
|
|
|
|
|
|
|
console.log(result) |
|
|
|
|
|
|
|
if(result!=undefined){ |
|
|
|
|
|
|
|
this.planTemplateData.forEach(element => { |
|
|
|
|
|
|
|
if(element.groupName==this.selectedItem){ |
|
|
|
|
|
|
|
element.attribute=result |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
//分页事件
|
|
|
|
|
|
|
|
changePage(e) { |
|
|
|
|
|
|
|
this.PageNumber = e.pageIndex + 1 |
|
|
|
|
|
|
|
this.searchYuan() |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
//重点图示增加分组
|
|
|
|
//重点图示增加分组
|
|
|
|
addkeyImgItem(item) { |
|
|
|
addkeyImgItem(item) { |
|
|
@ -707,10 +1196,12 @@ export class CreatePlanOnlineFiveComponent implements OnInit { |
|
|
|
this.pattern = 'edit' |
|
|
|
this.pattern = 'edit' |
|
|
|
} |
|
|
|
} |
|
|
|
//提交
|
|
|
|
//提交
|
|
|
|
submit() { |
|
|
|
async submit() { |
|
|
|
console.log('提交信息', this.planTemplateData) |
|
|
|
await this.yinRu(0) |
|
|
|
|
|
|
|
//console.log('提交信息', this.planTemplateData)
|
|
|
|
let body = { |
|
|
|
let body = { |
|
|
|
webTextData: JSON.stringify(this.planTemplateData) |
|
|
|
webTextData: JSON.stringify(this.planTemplateData), |
|
|
|
|
|
|
|
webTextStatistics:this.yinJson |
|
|
|
} |
|
|
|
} |
|
|
|
this.http.put(`/api/PlanComponents/${this.route.snapshot.queryParams.planId}`, body).subscribe(data => { |
|
|
|
this.http.put(`/api/PlanComponents/${this.route.snapshot.queryParams.planId}`, body).subscribe(data => { |
|
|
|
// console.log('提交成功',data)
|
|
|
|
// console.log('提交成功',data)
|
|
|
@ -813,4 +1304,50 @@ export class OpenPlanToolDialog { |
|
|
|
this.dialogRef.close() |
|
|
|
this.dialogRef.close() |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
//查看引用
|
|
|
|
|
|
|
|
@Component({ |
|
|
|
|
|
|
|
selector: 'yinYong', |
|
|
|
|
|
|
|
templateUrl: './yinyong.html', |
|
|
|
|
|
|
|
styleUrls: ['./create-plan-online-five.component.scss'] |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
export class yinYong{ |
|
|
|
|
|
|
|
constructor(public http: HttpClient, public snackBar: MatSnackBar, public dialogRef: MatDialogRef<yinYong>, |
|
|
|
|
|
|
|
@Inject(MAT_DIALOG_DATA) public data, public dialog: MatDialog) { } |
|
|
|
|
|
|
|
ngOnInit(){ |
|
|
|
|
|
|
|
this.selectedItem=this.data.selectedItem |
|
|
|
|
|
|
|
this.planTemplateData=JSON.parse(this.data.yinruData) |
|
|
|
|
|
|
|
this.yinData() |
|
|
|
|
|
|
|
console.log(this.planTemplateData) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
selectedItem//传来的组织指挥或者。。。
|
|
|
|
|
|
|
|
planTemplateData//传来的数据
|
|
|
|
|
|
|
|
selectData |
|
|
|
|
|
|
|
xuanze:boolean |
|
|
|
|
|
|
|
//imgUrl
|
|
|
|
|
|
|
|
//看看查的是哪个标题下的内容
|
|
|
|
|
|
|
|
yinData(){ |
|
|
|
|
|
|
|
this.planTemplateData.forEach((pvale,pi,parr) => { |
|
|
|
|
|
|
|
if(pvale.groupName==this.selectedItem){ |
|
|
|
|
|
|
|
this.selectData=pvale.attribute |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
trackByFn(index) { |
|
|
|
|
|
|
|
return index |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
//关闭弹窗
|
|
|
|
|
|
|
|
closeDiv() { |
|
|
|
|
|
|
|
let isTrue = confirm('您确定要引用该条预案吗') |
|
|
|
|
|
|
|
if(isTrue){ |
|
|
|
|
|
|
|
this.xuanze=true |
|
|
|
|
|
|
|
this.dialogRef.close(this.selectData) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
else{ |
|
|
|
|
|
|
|
this.xuanze=false |
|
|
|
|
|
|
|
this.dialogRef.close() |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |