-
-
-
- 预案编号:
-
-
{{planName}}
-
-
-
-
+
+
+
+
+ 预案编号:
+
+
{{item.attribute.planName}}
+
+
-
+ *ngIf="item.groupName!='单位概况'&&item.groupName!='交通水源'&&item.groupName!='重点图示'&&item.groupName!='预案附件'&&item.groupName!='特别警示'&&item.groupName!='处置要点'&&item.groupName!='封面'">
+
{{item.groupName}}
@@ -284,7 +343,11 @@
-
+
+
+ {{item.groupName}}
+
-
+
add 上传图片
@@ -306,13 +369,16 @@
-
+
+ {{item.groupName}}
+
@@ -330,7 +397,24 @@
+
+
+ {{item.groupName}}
+
+
+
+
+ 单位基本信息
+
{{buildingName}}
@@ -347,13 +431,16 @@
-
-
+
+
@@ -465,7 +552,7 @@
-
+
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 4634be4..b4dec88 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
@@ -42,6 +42,9 @@
box-sizing: border-box;
padding: 0 10px;
font-size: 14px;
+ overflow: hidden; /*超出部分隐藏*/
+ white-space: nowrap; /*不换行*/
+ text-overflow: ellipsis; /*超出部分文字以...显示*/
}
.item:hover {
background: #e8f4fe;
@@ -66,12 +69,12 @@
}
}
}
+
.contentbox {
height: 100%;
box-sizing: border-box;
padding-top: 66px;
overflow-y: auto;
-
.leftbox {
position: fixed;
width: 14%;
@@ -171,24 +174,24 @@
}
}
}
- .leftBuilding{
+ .leftBuilding {
width: 100%;
height: 100%;
display: flex;
flex-direction: column;
}
- .buildingHead{
+ .buildingHead {
height: 40px;
width: 100%;
background-color: #e8f4fe;
text-align: center;
- span{
+ span {
line-height: 40px;
color: #2196f3;
font-size: 16px;
}
}
- .buildingBody{
+ .buildingBody {
width: 100%;
height: 100%;
display: flex;
@@ -196,11 +199,11 @@
.selectedTr {
background-color: #b3d3ee;
}
- .buildName{
+ .buildName {
cursor: pointer;
height: 40px;
width: 100%;
- border-bottom: 1px solid #F2F4F5;
+ border-bottom: 1px solid #f2f4f5;
.example-margin {
width: 14px;
height: 14px;
@@ -209,7 +212,7 @@
position: relative;
bottom: 1px;
}
- span{
+ span {
line-height: 40px;
font-size: 16px;
margin-left: 5px;
@@ -226,6 +229,7 @@
padding: 10px 10px 0;
.cover {
width: 100%;
+ min-height: 780px;
input,
select {
border: 1px solid #ebebeb;
@@ -233,6 +237,9 @@
height: 28px;
line-height: 28px;
}
+ input{
+ width: 140px;
+ }
p {
height: 28px;
line-height: 28px;
@@ -456,13 +463,13 @@
margin: 10px 0;
}
}
- .unit{
+ .unit {
width: 100%;
height: 100%;
display: flex;
flex-direction: column;
overflow-y: auto;
- .unithead{
+ .unithead {
height: 40px;
width: 100%;
background-color: #e8f4fe;
@@ -476,22 +483,22 @@
line-height: 40px;
}
}
- .unitbody{
+ .unitbody {
height: 100%;
width: 100%;
display: flex;
flex-direction: column;
- .unitbodyHead{
+ .unitbodyHead {
width: 100%;
height: 40px;
- background-color: #2196F3;
+ background-color: #2196f3;
text-align: center;
span {
font-size: 16px;
text-align: center;
height: 40px;
line-height: 40px;
- color: #FFFFFF;
+ color: #ffffff;
}
img {
cursor: pointer;
@@ -502,13 +509,13 @@
margin-right: 10px;
}
}
- .body{
+ .body {
width: 100%;
height: 100%;
- .attack{
+ .attack {
width: 100%;
height: 100%;
- .attackhead{
+ .attackhead {
width: 100%;
height: 40px;
background-color: #ffd91d;
@@ -529,7 +536,7 @@
margin-right: 10px;
}
}
- .attackbody{
+ .attackbody {
width: 100%;
height: 100%;
thead {
@@ -734,6 +741,7 @@
}
}
}
+ }
.disposalPoint {
div {
width: 100%;
@@ -782,7 +790,22 @@
margin: 10px 0;
}
}
+ .titleItem{
+ width: 100%;
+ height: 36px;
+ line-height: 36px;
+ background-color: #2196F3;
+ text-align: center;
+ color: white;
+ }
}
}
+ .noPadding{
+ padding-top: 10px;
+ }
+ .quitPreview{
+ position: fixed;
+ top: 10px;
+ right: 15px;
+ }
}
-}
\ No newline at end of file
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 7a2e4db..c749a33 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-06-28 17:09:10
+ * @LastEditTime: 2021-06-29 17:00:09
*/
import { HttpClient } from '@angular/common/http';
import { Component, Inject, OnInit, Renderer2, ViewChild, Input } from '@angular/core';
@@ -22,13 +22,9 @@ export class CreatePlanOnlineFiveComponent implements OnInit {
constructor(private http: HttpClient, private route: ActivatedRoute, public snackBar: MatSnackBar, public dialog: MatDialog) { }
- planName: string //预案名称
planLevel: string//预案级别
ngOnInit(): void {
- this.planName = this.route.snapshot.queryParams.planName
this.planLevel = this.route.snapshot.queryParams.planCategory
- console.log('级别', this.planLevel)
- this.getTemplateData()
this.getUnitData()
//this.getAllBuildings()
this.tree = {
@@ -64,8 +60,8 @@ 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()
}
});
})
@@ -74,7 +70,7 @@ export class CreatePlanOnlineFiveComponent implements OnInit {
selectedItem: string = '封面'
clickTitleItem(item) {
this.addNumber = -1
- item == '封面' ? this.selectedItem = '封面' : this.selectedItem = item.groupName
+ this.selectedItem = item.groupName
if (this.selectedItem == '重点图示') {
this.getAllBuildings()
this.getSitePlan()
@@ -87,21 +83,43 @@ export class CreatePlanOnlineFiveComponent implements OnInit {
this.planTemplateData[0].attribute[0].attinf[3].value=this.unitData.phone
this.planTemplateData[0].attribute[0].attinf[4].value=this.unitData.organizationName
this.planTemplateData[0].attribute[0].attinf[5].value=this.unitData.address
+ } /* else if (this.selectedItem == '单位概况') {
+ //this.getAllBuildings()
+ } */ else if (this.selectedItem == '预案附件') {
+ this.getTwoDPlanList()
}
}
+ //获取当前单位的二维预案
+ TwoDPlanList: any
+ getTwoDPlanList() {
+ let paramsData = {
+ companyId: this.route.snapshot.queryParams.companyId,
+ pageSize: "999"
+ }
+ this.http.get("/api/PlanComponents", { params: paramsData }).subscribe((data: any) => {
+ this.TwoDPlanList = data.items.filter((item) => {
+ return item.planType == 1
+ })
+ })
+ }
+
+
+
+
+
//获取实景图
allRealPicture
getRealPicture() {
let companyId = this.unitId
this.http.get('/api/RealityImageGroups', {
params: {
- companyId: '5e9964caa760a059e84512e9'
+ companyId: this.route.snapshot.queryParams.companyId
}
}).subscribe((data: any) => {
this.allRealPicture = data
this.getAllRealPicture().then(() => {
- console.log('实景图', this.allRealPicture)
+ // console.log('实景图', this.allRealPicture)
})
})
}
@@ -132,24 +150,68 @@ export class CreatePlanOnlineFiveComponent implements OnInit {
planTemplateData: any
//获得模板信息
getTemplateData() {
- this.http.get('/api/PlanTemplate').subscribe(data => {
- this.planTemplateData = JSON.parse(data[2].data).filter(item =>
+ this.http.get(`/api/PlanComponents/${this.route.snapshot.queryParams.planId}/WebText`).subscribe((data: any) => {
+ // console.log('预案内容', data)
+ this.planTemplateData = JSON.parse(data.webTextData).filter(item =>
item.completed == true
)
- console.log(this.planTemplateData)
+ // console.log(this.planTemplateData)
+ if (this.planTemplateData[0].groupName != '封面') {
+ let obj = {
+ completed: true,
+ groupName: "封面",
+ attribute: {
+ planNumber: '',
+ planName: this.route.snapshot.queryParams.planName,
+ objName: this.unitData.name,
+ unitNature: this.unitData.buildingTypes[0].name,
+ planLevel: '',
+ disasterType: '0',
+ fireproofingLevel: '',
+ fireproofingAdminister: this.unitData.organizationName,
+ putOutFireAdminister: '',
+ producer: {
+ name: '',
+ duty: ''
+ },
+ verifier: {
+ name: '',
+ duty: ''
+ },
+ auditTime: ''
+ }
+ }
+ this.planTemplateData.unshift(obj)
+ }
this.planTemplateData.forEach(element => {
if (element.groupName == '重点图示') {
if (!element.attribute) {
element.attribute = [{ name: '', imgArr: [] }]
}
}
+ if (element.groupName == '交通水源') {
+ if (!element.attribute) {
+ element.attribute = [{ name: '', imgArr: [] }]
+ }
+ }
+ if (element.groupName == '预案附件') {
+ if (!element.attribute) {
+ element.attribute = [{ name: '', imgArr: [] }]
+ }
+ }
if (element.groupName == '处置要点') {
if (!element.attribute) {
element.attribute = [{ name: '', content: '' }]
}
}
+ if (element.groupName == '特别警示') {
+ if (!element.attribute) {
+ element.attribute = [{ name: '特别警示', content: '' }]
+ }
+ }
});
})
+
}
@@ -163,7 +225,7 @@ export class CreatePlanOnlineFiveComponent implements OnInit {
}
//通过左侧查看实景图
gallery
- lookkeyImgItemLeft(key1, key2,i) {
+ lookkeyImgItemLeft(key1, key2, i) {
let dom = document.getElementById(`viewerjs`)
let pObjs = dom.childNodes;
let node = document.createElement("img")
@@ -261,11 +323,20 @@ export class CreatePlanOnlineFiveComponent implements OnInit {
})
}
//打开采集工具
- openPlan(item, index) {
+ openPlan(item, index, type?: string) {
sessionStorage.setItem("gisplan", 'look')
sessionStorage.setItem("companyId", this.unitId)
// console.log(item)
- let data = { select: item, key: index, allBuildings: this.allBuildings }
+ if (type == '预案') {
+ sessionStorage.setItem("planId", item.id)
+ sessionStorage.setItem("companyId", this.route.snapshot.queryParams.companyId)
+ sessionStorage.setItem("buildingTypeId", this.route.snapshot.queryParams.unitTypeId)
+ sessionStorage.setItem("editable", "0")
+ sessionStorage.setItem("planName", item.name)
+ sessionStorage.setItem("orName", item.name)
+ sessionStorage.setItem("orId", item.name)
+ }
+ let data = { select: item, key: index, allBuildings: this.allBuildings, type: type }
let width = Math.round(document.body.clientWidth * 0.8) + 'px'
let height = Math.round(document.body.clientHeight * 0.9) + 'px'
// console.log('宽度',width)
@@ -309,7 +380,7 @@ export class CreatePlanOnlineFiveComponent implements OnInit {
this.planTemplateData[key].attribute[i].tabletr[this.addNumber].tabletd.push('')
}
}
- console.log(this.planTemplateData)
+ // console.log(this.planTemplateData)
}
//灾情设定表格删除一行
delTd(key, i) {
@@ -329,7 +400,7 @@ export class CreatePlanOnlineFiveComponent implements OnInit {
}
//单位概况左侧建筑点击事件
buildingName
- clicki=0
+ clicki = 0
group
clickBuilding(item,i){
this.buildingName=item.name
@@ -338,9 +409,9 @@ export class CreatePlanOnlineFiveComponent implements OnInit {
}
//单位概况增加一行
- unitadd(surveyName,attacki){
+ unitadd(surveyName, attacki) {
this.addNumber++
- if(surveyName=='进攻通道'){
+ if (surveyName == '进攻通道') {
if (this.planTemplateData[0].building[this.clicki].body[4].attinf[attacki].tabletr == undefined) {
this.planTemplateData[0].building[this.clicki].body[4].attinf[attacki].tabletr = []
}
@@ -353,8 +424,8 @@ export class CreatePlanOnlineFiveComponent implements OnInit {
this.planTemplateData[0].building[this.clicki].body[4].attinf[attacki].tabletr[this.addNumber].tabletd.push('')
}
}
-
- console.log(this.planTemplateData)
+
+ // console.log(this.planTemplateData)
}
else if(surveyName=='功能分区'){
console.log(this.clicki)
@@ -364,7 +435,7 @@ export class CreatePlanOnlineFiveComponent implements OnInit {
}
}
//单位概况删除一行
- unitDel(surveyName,attacki){
+ unitDel(surveyName, attacki) {
const config = new MatSnackBarConfig();
config.verticalPosition = 'top';
config.duration = 3000
@@ -434,6 +505,15 @@ export class CreatePlanOnlineFiveComponent implements OnInit {
})
})
}
+
+ //预览
+ pattern:string = 'edit'
+ preview(){
+ this.pattern = 'look'
+ }
+ quitPreview(){
+ this.pattern = 'edit'
+ }
}
@@ -451,12 +531,15 @@ export class OpenPlanToolDialog {
@ViewChild('plan') plan: any //子组件
+ type: any//打开的类型 是平面图还是水源
ngOnInit() {
-
+ this.type = this.data.type
}
ngAfterViewInit(): void {
- this.noticePlan()
+ if (this.type != '水源' && this.type != '预案') {
+ this.noticePlan()
+ }
}
//通知 子组件 传递参数
diff --git a/src/app/plan-management/create-plan-online-five/openPlanTool.html b/src/app/plan-management/create-plan-online-five/openPlanTool.html
index 2c411a2..ac9fe02 100644
--- a/src/app/plan-management/create-plan-online-five/openPlanTool.html
+++ b/src/app/plan-management/create-plan-online-five/openPlanTool.html
@@ -1,3 +1,9 @@
-
+
+
+
\ No newline at end of file
diff --git a/src/app/plan-management/entry-plan-look/AddPlanone.html b/src/app/plan-management/entry-plan-look/AddPlanone.html
index d32cdd5..3668d9a 100644
--- a/src/app/plan-management/entry-plan-look/AddPlanone.html
+++ b/src/app/plan-management/entry-plan-look/AddPlanone.html
@@ -62,7 +62,7 @@
(已上传)
- 在线编制
+