diff --git a/package.json b/package.json
index 65628c7..00ad7bb 100644
--- a/package.json
+++ b/package.json
@@ -5,6 +5,7 @@
"ng": "ng",
"start": "ng serve --proxy-config proxy.config.json --open",
"build": "ng build",
+ "build-prod": "node --max_old_space_size=5048 ./node_modules/@angular/cli/bin/ng build --prod",
"publish": "ng build --prod --verbose",
"test": "ng test",
"lint": "ng lint",
diff --git a/src/app/key-unit/key-unit-management/key-unit-management.component.ts b/src/app/key-unit/key-unit-management/key-unit-management.component.ts
index 15f23fd..5ea3df9 100644
--- a/src/app/key-unit/key-unit-management/key-unit-management.component.ts
+++ b/src/app/key-unit/key-unit-management/key-unit-management.component.ts
@@ -617,6 +617,7 @@ export class KeyUnitManagementComponent implements OnInit {
this.http.post(`/api/ContentVerifies/Batch`,this.deleteAudia).subscribe(data=>{
this.snackBar.open('操作成功','确定',config);
this.getAllKeyUnit()
+ this.deleteAll=[]
},err=>{
this.snackBar.open(err,'确定',config);
})
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 4ad8d73..3eacb0d 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
@@ -188,7 +188,7 @@
-->
{{parts.body[0].value}}
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 dc5c5aa..5218c8c 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
@@ -223,7 +223,7 @@
.leftnew{
position: fixed;
width: 14%;
- height: 85%;
+ height: 90%;
background-color: white;
top: 66px;
min-width: 300px;
@@ -340,6 +340,7 @@
.searImg{
width: 15%;
height: 100%;
+ cursor: pointer;
img{
position: relative;
top: 20%;
@@ -347,6 +348,43 @@
}
}
}
+ .newBodycenter{
+ height: 86%;
+ width: 100%;
+ display: flex;
+ flex-wrap: wrap;
+ align-content: flex-start;
+ overflow-y: auto;
+ //flex-direction: column;
+ .centerfen{
+ //width: 50%;
+ margin: 15px 0 12px 24px;
+ //height: 150px;
+ display: flex;
+ flex-direction: column;
+ .tu{
+ height: 100px;
+ width: 110px;
+ cursor: pointer;
+ img{
+ width: 110px;
+ height: 100px;
+ }
+ }
+ .org{
+ width: 110px;
+ }
+ .lry{
+ width: 110px;
+ }
+ span{
+ display: inline-block;
+ }
+ }
+ }
+ .fenye{
+ width: 100%;
+ }
}
}
.mainbox {
@@ -1017,3 +1055,163 @@
}
}
+.yinrubox{
+ width: 100%;
+ height: 100%;
+ display: flex;
+ flex-direction: column;
+ .yinruboxHead{
+ width: 100%;
+ height:7%;
+ border-bottom:1px solid #8b8c8c;
+ span{
+ font-size: 18px;
+ color: #2196f3;
+ line-height: 40px;
+ }
+ button{
+ float: right;
+ }
+ }
+ .boxBody {
+ //height: 100%;
+ width: 100%;
+ overflow-y: auto;
+ display: flex;
+ flex-direction: column;
+ .boxBodyHead {
+ width: 100%;
+ height: 40px;
+ margin-top: 3%;
+ background-color: #ffd91d;
+ text-align: center;
+ span {
+ font-size: 16px;
+ text-align: center;
+ height: 40px;
+ line-height: 40px;
+ color: #b99a00;
+ }
+ img {
+ cursor: pointer;
+ width: 20px;
+ height: 20px;
+ float: right;
+ margin-top: 10px;
+ margin-right: 10px;
+ }
+ }
+ .body {
+ width: 100%;
+ //height: 100%;
+ thead {
+ width: 100%;
+ background-color: #e8e9e9;
+ }
+ table {
+ width: 100%;
+ border-collapse: collapse;
+ //background-color: #E8E9E9;
+ }
+ th {
+ //background-color: #E8E9E9;
+ border: 1px solid #999;
+ height: 40px;
+ font-size: 16px;
+ text-align: center;
+ input {
+ background-color: #e8e9e9;
+ text-align: center;
+ height: 100%;
+ width: 100%;
+ font-size: 16px;
+ border: none;
+ outline: none;
+ }
+ }
+ td {
+ border: 1px solid #999;
+ height: 40px;
+ font-size: 16px;
+ text-align: center;
+ input {
+ background-color: #ffffff;
+ text-align: center;
+ height: 100%;
+ width: 100%;
+ font-size: 16px;
+ border: none;
+ outline: none;
+ }
+ }
+ .inputtext {
+ width: 100%;
+ height: 100%;
+ display: flex;
+ flex-direction: column;
+ input {
+ //width: 100%;
+ height: 40px;
+ font-size: 16px;
+ border: none;
+ outline: none;
+ }
+ .inputj {
+ width: 100%;
+ //height: 100%;
+ display: flex;
+ }
+ }
+ .keyImg {
+ width: 100%;
+ height: 100%;
+ .keyImgImg {
+ .imgbox {
+ margin-top: 10px;
+ text-align: center;
+ position: relative;
+ img {
+ max-width: 100%;
+ width: auto;
+ height: auto;
+ }
+ .deleteImg {
+ display: none;
+ cursor: pointer;
+ position: absolute;
+ right: 0px;
+ top: 0px;
+ }
+ }
+ .imgbox:hover {
+ .deleteImg {
+ display: block;
+ }
+ }
+ .uploadBtn {
+ display: flex;
+ justify-content: center;
+ margin: 50px 0;
+ position: relative;
+ input {
+ width: 112px;
+ height: 36px;
+ position: absolute;
+ left: 50%;
+ top: 50%;
+ transform: translate(-50%, -50%);
+ opacity: 0;
+ cursor: pointer;
+ }
+ }
+ }
+ .addkeyImgItem {
+ display: flex;
+ justify-content: center;
+ margin: 10px 0;
+ }
+ }
+ }
+ }
+}
+
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 eaddfe7..ab76480 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
@@ -4,7 +4,7 @@
* @Author: sueRimn
* @Date: 2021-06-16 13:56:54
* @LastEditors: sueRimn
- * @LastEditTime: 2021-08-05 16:24:21
+ * @LastEditTime: 2021-08-12 14:14:20
*/
import { HttpClient } from '@angular/common/http';
import { Component, Inject, OnInit, Renderer2, ViewChild, Input } from '@angular/core';
@@ -50,7 +50,7 @@ export class CreatePlanOnlineFiveComponent implements OnInit {
paginator: MatPaginator;
length: any; //共多少条数据
pageSize: any; //每页条数
- pageSizeOptions: number[] = [10] //设置每页条数
+ pageSizeOptions: number[] = [6] //设置每页条数
PageNumber: any; //第几页
planLevel: string//预案级别
@@ -67,7 +67,7 @@ export class CreatePlanOnlineFiveComponent implements OnInit {
this.getOrganizations();
//this.getAllBuildings()
}
- zdysearch
+ zdysearch=''
organizationName: any //当前单位组织机构名称
treedata: 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) => {
this.organizationName = data.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);
}
//获得所有组织机构
@@ -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 => {
if (element.id == this.route.snapshot.queryParams.companyId) {
this.unitData = element
- console.log('单位列表信息', this.unitData)
+ //console.log('单位列表信息', this.unitData)
this.getTemplateData()
}
});
@@ -161,6 +166,89 @@ export class CreatePlanOnlineFiveComponent implements OnInit {
selectedItem: string = '封面'
async clickTitleItem(item) {
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
if (this.selectedItem == '重点图示') {
this.getAllBuildings()
@@ -168,6 +256,8 @@ export class CreatePlanOnlineFiveComponent implements OnInit {
this.getRealPicture()
} else if (this.selectedItem == '单位概况') {
await this.getAllBuildings()
+ await this.getAllBuildingsInfo()
+ console.log(this.buildZong)
this.planTemplateData[1].building.forEach(element => {
element.body[0].attinf[0].olddata = this.unitData.usci
element.body[0].attinf[1].olddata = this.unitData.buildingTypes[0].name
@@ -175,6 +265,18 @@ export class CreatePlanOnlineFiveComponent implements OnInit {
element.body[0].attinf[3].olddata = this.unitData.phone
element.body[0].attinf[4].olddata = this.unitData.organizationName
element.body[0].attinf[5].olddata = this.unitData.address
+ if(element.body[1].attinf!=undefined){
+ element.body[1].attinf.forEach(eBuild => {
+ this.buildZong.forEach(oldBuild => {
+ if(oldBuild.buildingBasicGroups.length>0){
+ oldBuild.buildingBasicGroups[0].propertyInfos.forEach(infodata => {
+ eBuild.olddata=infodata.propertyValue
+ });
+ }
+ });
+ });
+ }
+
});
this.planTemplateData[1].attribute[0].attinf[0].value=this.planTemplateData[1].attribute[0].attinf[0].olddata = this.unitData.usci
@@ -183,6 +285,7 @@ export class CreatePlanOnlineFiveComponent implements OnInit {
this.planTemplateData[1].attribute[0].attinf[3].value=this.planTemplateData[1].attribute[0].attinf[3].olddata = this.unitData.phone
this.planTemplateData[1].attribute[0].attinf[4].value=this.planTemplateData[1].attribute[0].attinf[4].olddata = this.unitData.organizationName
this.planTemplateData[1].attribute[0].attinf[5].value=this.planTemplateData[1].attribute[0].attinf[5].olddata = this.unitData.address
+
console.log(this.planTemplateData)
} /* else if (this.selectedItem == '单位概况') {
//this.getAllBuildings()
@@ -191,6 +294,63 @@ export class CreatePlanOnlineFiveComponent implements OnInit {
}
}
+ //获取建筑信息
+ buildingsData=[]
+ buildDataName
+ buildZong
+ //获得所有建筑信息
+ async getAllBuildingsInfo(){
+ const result = await new Promise((resolve) =>{
+ this.http.get("/api/Buildings",{
+ params:{
+ companyId:this.unitId
+ }
+ }).subscribe(async (data:any)=>{
+ this.buildDataName = data
+ for (let i = 0; i < data.length; i++){
+ this.http.get("/api/BuildingBasicInfos",{ // 循环请求当前单位建筑每一个建筑的信息保存到数组中
+ params:{
+ companyId :this.unitId,
+ buildingId:data[i].id,
+ buildingType:data[i].buildingTypes[0].id
+ }
+ }).subscribe((buildingsData:any)=>{
+ //console.log(buildingsData)
+ this.buildingsData.push(buildingsData[0])
+ resolve(this.buildingsData)
+ })
+ }
+ console.log(this.buildingsData)
+ if (this.planTemplateData[1].building == undefined) {
+ this.planTemplateData[1].building = []
+ if(this.planTemplateData[1].attribute[1].attinf!=undefined){
+ this.planTemplateData[1].attribute[1].attinf.forEach(pData => {
+ this.buildingsData.forEach((bDara,bi,bArr)=>{
+ if(bDara.buildingBasicGroups.length>0){
+ bDara.buildingBasicGroups[0].propertyInfos.forEach(bInfo => {
+ pData.propertyValue=pData.olddata=bInfo.propertyValue
+ });
+ }
+ })
+ });
+ }
+
+ for (var i = 0; i < this.buildDataName.length; i++) {
+ if (i == 0) {
+ this.planTemplateData[1].building.push({ name: this.buildDataName[i].name, body: this.planTemplateData[1].attribute, completed: true })
+ } else {
+ this.planTemplateData[1].building.push({ name: this.buildDataName[i].name, body: this.planTemplateData[1].attribute, completed: false })
+ }
+
+ }
+ }
+ })
+ })
+ //console.log(result)
+ this.buildZong=result
+
+ }
+
//获取当前单位的二维预案
TwoDPlanList: any
getTwoDPlanList() {
@@ -205,10 +365,6 @@ export class CreatePlanOnlineFiveComponent implements OnInit {
})
}
-
-
-
-
//获取实景图
allRealPicture
getRealPicture() {
@@ -252,7 +408,7 @@ export class CreatePlanOnlineFiveComponent implements OnInit {
//获得模板信息
getTemplateData() {
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 =>
item.completed == true
)
@@ -317,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) {
@@ -419,7 +976,7 @@ export class CreatePlanOnlineFiveComponent implements OnInit {
})
})
this.allBuildings = data
- if (this.planTemplateData[1].building == undefined) {
+ /* if (this.planTemplateData[1].building == undefined) {
this.planTemplateData[1].building = []
for (var i = 0; i < this.allBuildings.length; i++) {
if (i == 0) {
@@ -429,10 +986,7 @@ export class CreatePlanOnlineFiveComponent implements OnInit {
}
}
- }
-
- //console.log(this.planTemplateData)
- //this.buildingName=this.planTemplateData[1].building[0].name
+ } */
this.group = this.planTemplateData[1].building
//delete this.planTemplateData[0].attribute
@@ -642,10 +1196,12 @@ export class CreatePlanOnlineFiveComponent implements OnInit {
this.pattern = 'edit'
}
//提交
- submit() {
- console.log('提交信息', this.planTemplateData)
+ async submit() {
+ await this.yinRu(0)
+ //console.log('提交信息', this.planTemplateData)
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 => {
// console.log('提交成功',data)
@@ -748,4 +1304,50 @@ export class OpenPlanToolDialog {
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,
+ @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()
+ }
+
+ }
+
}
\ No newline at end of file
diff --git a/src/app/plan-management/create-plan-online-five/yinyong.html b/src/app/plan-management/create-plan-online-five/yinyong.html
new file mode 100644
index 0000000..5235ab9
--- /dev/null
+++ b/src/app/plan-management/create-plan-online-five/yinyong.html
@@ -0,0 +1,75 @@
+
+
+
+ {{selectedItem}}
+
+
+
+
+ {{element.headName}}
+
+
+
+
+
+
+ {{element.tableth[tablethi]}}
+ |
+
+
+
+
+ {{itemtr.tabletd[tabletdi]}}
+
+ |
+
+
+
+
+
+
+
+
+
+
+
+ ![]()
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/app/plan-management/entry-plan-look/entry-plan-look.component.ts b/src/app/plan-management/entry-plan-look/entry-plan-look.component.ts
index b7977e0..d443744 100644
--- a/src/app/plan-management/entry-plan-look/entry-plan-look.component.ts
+++ b/src/app/plan-management/entry-plan-look/entry-plan-look.component.ts
@@ -106,7 +106,6 @@ export class EntryPlanLookComponent implements OnInit {
}
//查看预案
lookPlan(e) {
- console.log(e)
if (e.planType == 16 || e.planType == 4 || e.planType == 8) {
if (e.planType == 16&&e.attachmentUrls == null){
window.open(`/planManagement/createplanonlinefive?navIsOpen=false&companyId=${this.companyId}&planName=${e.name}&unitName=${this.unitdata.unitname}&planCategory=${e.planCategory}&planId=${e.id}&unitTypeId=${this.compantData.buildingTypes[0].id}&orName=${this.compantData.organizationName}&orId=${this.compantData.organizationId}&pattern=false`)
@@ -161,7 +160,11 @@ export class EntryPlanLookComponent implements OnInit {
window.location.href = e.url
} else {
sessionStorage.setItem("url", e.url)
- window.open(`/planManagement/webLook`)
+ if ((e.url as string).includes('gis/threeDimensionalHome')) { //三维预案
+ window.open(`${e.url}?unitId=${this.companyId}&unitName=${this.unitdata.unitname}&editMode=false`)
+ } else {
+ window.open(`/planManagement/webLook`)
+ }
}
}
}
@@ -203,8 +206,18 @@ export class EntryPlanLookComponent implements OnInit {
}
}
- else {
-
+ else if (e.planType == 2) { //三维预案
+ if (e.url.indexOf('app') == 0) {
+ window.location.href = e.url
+ } else {
+ sessionStorage.setItem("url", e.url)
+ if ((e.url as string).includes('gis/threeDimensionalHome')) { //三维预案
+ window.open(`${e.url}?unitId=${this.companyId}&unitName=${this.unitdata.unitname}&editMode=true`)
+ } else {
+ window.open(`/planManagement/webLook`)
+ }
+ }
+ } else {
this.snackBar.open('只有二维预案和文本预案可以编辑!', '确定', config);
}
} else {
@@ -243,7 +256,18 @@ export class EntryPlanLookComponent implements OnInit {
}
}
- else {
+ else if (e.planType == 2) { //三维预案
+ if (e.url.indexOf('app') == 0) {
+ window.location.href = e.url
+ } else {
+ sessionStorage.setItem("url", e.url)
+ if ((e.url as string).includes('gis/threeDimensionalHome')) { //三维预案
+ window.open(`${e.url}?unitId=${this.companyId}&unitName=${this.unitdata.unitname}&editMode=true`)
+ } else {
+ window.open(`/planManagement/webLook`)
+ }
+ }
+ } else {
this.snackBar.open('只有二维预案和文本预案可以编辑!', '确定', config);
}
diff --git a/src/app/plan-management/plan-management.module.ts b/src/app/plan-management/plan-management.module.ts
index 4037c81..b8bfe71 100644
--- a/src/app/plan-management/plan-management.module.ts
+++ b/src/app/plan-management/plan-management.module.ts
@@ -69,11 +69,12 @@ import { CreatePlanOnlineThreeComponent } from './create-plan-online-three/creat
import { UiModule } from '../ui/ui.module';
import { TreeDiagramModule } from '../ui/ng-tree-diagram/src/ng-tree-diagram';
import { KeyUnitModule } from '../key-unit/key-unit.module';
+import { yinYong } from './create-plan-online-five/create-plan-online-five.component'
@NgModule({
declarations: [EntryPlanComponent, PassPlanComponent, OpenPlanComponent, EntryPlanLookComponent, AddPlanone, PlanType, AuditSatus, PlanLevel, DownloadFile, AuditResult, ChangeName,
WebLookComponent, OnetwoEntryPlanComponent, newunitComponent, MeetPlanComponent, newunitMeet, TypePlanComponent, newunitType, PsViewer, onetwoAuditResult, meetAuditResult,
- typeAuditResult, MaintainUpComponent, GkPsViewer, GkhtmlPsViewer, UnitInfo, ReinforcePlanComponent, state, ImgDetails, CreatePlanOnlineFiveComponent, CreatePlanOnlineThreeComponent, OpenPlanToolDialog],
+ typeAuditResult, MaintainUpComponent, GkPsViewer, GkhtmlPsViewer, UnitInfo, ReinforcePlanComponent, state, ImgDetails, CreatePlanOnlineFiveComponent, CreatePlanOnlineThreeComponent, OpenPlanToolDialog,yinYong],
imports: [
CommonModule,
PlanManagementRoutingModule,
diff --git a/src/app/ui/plan-template/plan-template.component.ts b/src/app/ui/plan-template/plan-template.component.ts
index 2125b63..a3a02ac 100644
--- a/src/app/ui/plan-template/plan-template.component.ts
+++ b/src/app/ui/plan-template/plan-template.component.ts
@@ -4,7 +4,7 @@
* @Author: sueRimn
* @Date: 2021-05-31 10:40:01
* @LastEditors: sueRimn
- * @LastEditTime: 2021-08-04 15:30:24
+ * @LastEditTime: 2021-08-07 15:21:06
*/
import { Component, Inject, OnInit,ViewEncapsulation } from '@angular/core';
@@ -139,7 +139,7 @@ export class PlanTemplateComponent implements OnInit {
width: '340px',
height:'340px',
disableClose:true,
- data:{item:item,plandata:this.newleftTabledata}
+ data:{item:item,plandata:this.newleftTabledata,operation}
});
dialogRef.afterClosed().subscribe(async result => {
console.log(result)
@@ -867,16 +867,23 @@ getattinf(){
})
}else if(value.surveyName=='建筑信息'&&value.attinf!=undefined){
this.addAttinfBuild=value.attinf
- /* console.log(this.addAttinfBuild)
- value.attinf.forEach((datavalue,index,dataarr) => {
- this.addAttinfBuild.forEach((value,i,arr)=>{
- if(dataarr[index].propertyName==arr[i].propertyName){
- if(dataarr[index].completed==true&&arr[i].completed==false){
- arr[i].completed= dataarr[index].completed
+ let paramsdata:any ={
+ categoryId:this.data.newleftTabledata[this.data.leftclicki].basicCategoryId
+ }
+ this.http.get("/api/BasicGroups",{params:paramsdata}).subscribe((data:any)=>{
+ this.addAttinfBuild=data[0].propertyInfos
+ this.addAttinfBuild.forEach((element,ei,earr) => {
+ value.attinf.forEach((elattinf,fi,farr) => {
+ if(earr[ei].propertyName==farr[fi].propertyName){
+ earr[ei].completed=farr[fi].completed
}
- }
- })
- }); */
+
+ });
+
+ element.olddata=element.propertyValue
+ });
+ console.log(this.addAttinfBuild)
+ })
}else if(value.surveyName=='消防设施'&&value.attinf==undefined){
let paramsdata:any ={
categoryId:this.data.newleftTabledata[this.data.leftclicki].facilityCategoryId
diff --git a/src/app/ui/plan-template/upPlan.html b/src/app/ui/plan-template/upPlan.html
index 8370896..18c27bc 100644
--- a/src/app/ui/plan-template/upPlan.html
+++ b/src/app/ui/plan-template/upPlan.html
@@ -4,7 +4,7 @@
* @Author: sueRimn
* @Date: 2021-05-21 10:43:28
* @LastEditors: sueRimn
- * @LastEditTime: 2021-06-15 10:47:09
+ * @LastEditTime: 2021-08-07 15:04:56
-->
- 修改预案模板
+ 修改预案模板
+ 复制预案模板
|