|
@@ -6,9 +6,9 @@
|
|
|
<template>
|
|
|
<div>
|
|
|
<div class='legend-container'>
|
|
|
- <div :class='showView===1?"legend2":"legend"' @click='showTl' v-if='(type==1 || floors.length>0)&& isMessage'>图例</div>
|
|
|
+ <div :class='showView===1?"legend2":"legend"' @click='showTl' v-if='(type==1 || floors.length>0)&& isMessage && legendTable.length>0 '>图例</div>
|
|
|
<!-- 图里展示状态组件 -->
|
|
|
- <el-collapse-transition v-if='(type==1 || floors.length>0)&& isMessage'>
|
|
|
+ <el-collapse-transition v-if='(type==1 || floors.length>0)&& isMessage && legendTable.length>0 '>
|
|
|
<div class='legend-tab' v-if='showView===1'>
|
|
|
<div class='legend-table2' v-if='systemName=="土建系统"'>
|
|
|
<lengend-view @changeSwitch='handleSwich' :remarksText='remarksText' ref='viewLengend' :systemName='systemName'></lengend-view>
|
|
@@ -19,11 +19,11 @@
|
|
|
</div>
|
|
|
</el-collapse-transition>
|
|
|
<!-- 图例编辑状态组件 -->
|
|
|
- <el-collapse-transition @isShow2='isShow2'>
|
|
|
+ <el-collapse-transition>
|
|
|
<div v-if='showView===2'>
|
|
|
<lengend-edit
|
|
|
@handleSwich2='handleSwich2'
|
|
|
- v-if='editTable.length>=0'
|
|
|
+ v-if='editTable.length>0'
|
|
|
:loading='loading1'
|
|
|
ref='editLen'
|
|
|
:editTable='editTable'
|
|
@@ -51,12 +51,12 @@
|
|
|
</el-tooltip>
|
|
|
<!-- 编辑图例 -->
|
|
|
<el-tooltip effect='dark' content='编辑图例' placement='left'>
|
|
|
- <p v-if='systemName != "土建系统" && isMessage' @click='editTl' class='tltk'>
|
|
|
+ <p v-if='systemName != "土建系统" && isMessage' @click='editTl' class='tltk-1'>
|
|
|
<img src='@/assets/imgs/bjtl.png' alt />
|
|
|
</p>
|
|
|
</el-tooltip>
|
|
|
<!-- 新增分布图 -->
|
|
|
- <el-tooltip effect='dark' content='新增分布图' placement='left' v-if='floorSelect.length!=floors.length && !isMessage && type==0'>
|
|
|
+ <el-tooltip effect='dark' content='新增分布图' placement='left' v-if='floorSelect.length!=floors.length && type==0'>
|
|
|
<p class='tltk' style='margin-left: -5px;' @click='addFloor'>
|
|
|
<img src='@/assets/imgs/bjj.png' alt />
|
|
|
</p>
|
|
@@ -64,7 +64,13 @@
|
|
|
<!-- 编辑分布图 -->
|
|
|
|
|
|
<!-- 有修改权限 -->
|
|
|
- <el-tooltip v-if='editPmt' class='bjpmt' effect='dark' :content='editTips' placement='left'>
|
|
|
+ <el-tooltip
|
|
|
+ v-if='editPmt'
|
|
|
+ class='bjpmt'
|
|
|
+ effect='dark'
|
|
|
+ :content='editTips?editTips:`编辑${categoryId=="FZQZL"?"分水器支路分布图":"消防泵房引出管路分布图"}`'
|
|
|
+ placement='left'
|
|
|
+ >
|
|
|
<span class='edit-icon corner-con' @click='goToEditer'>
|
|
|
<img src='@/assets/imgs/bjs.png' alt />
|
|
|
<!-- 角标 -->
|
|
@@ -112,8 +118,6 @@ export default {
|
|
|
'<p>主要设备房包括:冷源机房,热源机房,开闭站,配变电所(室),发电机房,消防水泵房,消防高位水箱间,生活水泵房,慧云机房,垃圾房</p>',
|
|
|
text2: '<p>图例后×的数字,代表此位置的数量</p>',
|
|
|
text2: '',
|
|
|
- show: true,
|
|
|
- show2: false,
|
|
|
loading: true,
|
|
|
loading1: true,
|
|
|
viewTable: [],
|
|
@@ -137,16 +141,18 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
computed: {
|
|
|
- ...mapGetters(['plazaId', 'fmapID', 'floorSelect', 'isMessage', 'ssoToken', 'showView'])
|
|
|
+ ...mapGetters(['plazaId', 'fmapID', 'floorSelect', 'isMessage', 'ssoToken', 'showView', 'legendTable'])
|
|
|
},
|
|
|
props: {
|
|
|
floors: {
|
|
|
+ //原理图中有数据楼层
|
|
|
default: () => {
|
|
|
;[]
|
|
|
},
|
|
|
type: Array
|
|
|
},
|
|
|
type: {
|
|
|
+ // 原理图类型 == 0 ;
|
|
|
default: '1',
|
|
|
type: String
|
|
|
},
|
|
@@ -159,6 +165,7 @@ export default {
|
|
|
type: String
|
|
|
},
|
|
|
editTips: {
|
|
|
+ // 编辑器文案
|
|
|
type: String,
|
|
|
default: ''
|
|
|
}
|
|
@@ -187,14 +194,18 @@ export default {
|
|
|
async getDraftNum() {
|
|
|
let res = null,
|
|
|
// floorId = this.$cookie.get('floorMapId'),
|
|
|
- floorId = this.$store.state.currentFloor.gname,
|
|
|
- data = {
|
|
|
- Distinct: true,
|
|
|
- Filters: `projectId='${this.plazaId}';isPub=false;floorId='${floorId}'`,
|
|
|
- PageNumber: 1,
|
|
|
- PageSize: 500,
|
|
|
- Projection: ['floorId']
|
|
|
- }
|
|
|
+ floorId = this.$store.state.currentFloor.gname || this.$cookie.get('floorMapId')
|
|
|
+ // 增加校验 floorId,防止上传 undefined
|
|
|
+ if (!floorId) {
|
|
|
+ return true
|
|
|
+ }
|
|
|
+ let data = {
|
|
|
+ Distinct: true,
|
|
|
+ Filters: `projectId='${this.plazaId}';isPub=false;floorId='${floorId}'`,
|
|
|
+ PageNumber: 1,
|
|
|
+ PageSize: 500,
|
|
|
+ Projection: ['floorId']
|
|
|
+ }
|
|
|
try {
|
|
|
// 调用接口
|
|
|
res = await queryDraftNum(data)
|
|
@@ -259,14 +270,10 @@ export default {
|
|
|
} else {
|
|
|
this.$store.commit('SETSHOWVIEW', 0)
|
|
|
}
|
|
|
- // this.showView = !this.showView
|
|
|
this.queryView(false)
|
|
|
- // if (this.showView) {
|
|
|
- // this.show2 = false
|
|
|
- // }
|
|
|
},
|
|
|
cance() {
|
|
|
- this.show2 = false
|
|
|
+ // this.show2 = false
|
|
|
},
|
|
|
// 编辑图例
|
|
|
editTl() {
|
|
@@ -275,8 +282,6 @@ export default {
|
|
|
} else {
|
|
|
this.$store.commit('SETSHOWVIEW', 0)
|
|
|
}
|
|
|
- // this.show = false
|
|
|
- // this.show2 = true
|
|
|
this.queryEditNum(true)
|
|
|
},
|
|
|
/**
|
|
@@ -314,6 +319,7 @@ export default {
|
|
|
handleSwich(val) {
|
|
|
this.queryView(!val)
|
|
|
},
|
|
|
+ // 默认隐藏为0的项目
|
|
|
handleSwich2(val) {
|
|
|
this.editSwitch = val
|
|
|
this.queryEditNum(!this.editSwitch)
|
|
@@ -323,16 +329,18 @@ export default {
|
|
|
queryView(flag) {
|
|
|
let postParams = {}
|
|
|
let data = {
|
|
|
+ categoryId: this.$cookie.get('categoryId'),
|
|
|
graphId: this.$cookie.get('graphId'),
|
|
|
projectId: this.$store.state.plazaId,
|
|
|
- flag: flag
|
|
|
+ flag: flag,
|
|
|
+ buildingId: '1',
|
|
|
+ floorId: this.$store.state.currentFloor.gname
|
|
|
}
|
|
|
queryStatis({ data, postParams }).then(res => {
|
|
|
this.loading = false
|
|
|
let viewTable = []
|
|
|
viewTable = res.data.Data ? res.data.Data : []
|
|
|
this.$store.commit('SETLEGENDTABLE', viewTable)
|
|
|
-
|
|
|
if (viewTable.length > 0) {
|
|
|
viewTable.forEach(el => {
|
|
|
if (el.Name == '主要设备房') {
|
|
@@ -354,9 +362,12 @@ export default {
|
|
|
queryEditNum(flag) {
|
|
|
let postParams = {}
|
|
|
let data = {
|
|
|
+ categoryId: this.$cookie.get('categoryId'),
|
|
|
graphId: this.$cookie.get('graphId'),
|
|
|
projectId: this.$store.state.plazaId,
|
|
|
- flag: flag
|
|
|
+ flag: flag,
|
|
|
+ buildingId: '1',
|
|
|
+ floorId: this.$store.state.currentFloor.gname
|
|
|
}
|
|
|
queryStatis({ data, postParams }).then(res => {
|
|
|
//console.log('编辑图例数', res)
|
|
@@ -366,9 +377,24 @@ export default {
|
|
|
},
|
|
|
// 编辑数量
|
|
|
queryEdit(val) {
|
|
|
+ let arr = []
|
|
|
+ if (val.length > 0) {
|
|
|
+ val.forEach(el => {
|
|
|
+ let obj = {
|
|
|
+ BuildingId: '1',
|
|
|
+ FloorId: this.$store.state.currentFloor.gname,
|
|
|
+ ProjectId: this.plazaId,
|
|
|
+ CategoryId: el.GraphCategoryId,
|
|
|
+ GraphId: this.$cookie.get('graphId'),
|
|
|
+ GraphElementId: el.GraphElementId,
|
|
|
+ Num: el.Num
|
|
|
+ }
|
|
|
+ arr.push(obj)
|
|
|
+ })
|
|
|
+ }
|
|
|
let params = {
|
|
|
postParams: {
|
|
|
- Content: val
|
|
|
+ Content: arr
|
|
|
}
|
|
|
}
|
|
|
updateStatis(params).then(res => {
|
|
@@ -378,9 +404,8 @@ export default {
|
|
|
message: '操作成功',
|
|
|
type: 'success'
|
|
|
})
|
|
|
- this.queryEditNum(this.editSwitch)
|
|
|
- this.show2 = false
|
|
|
- this.show = true
|
|
|
+ this.$store.commit('SETSHOWVIEW', 1)
|
|
|
+ // this.queryEditNum(this.editSwitch)
|
|
|
} else {
|
|
|
this.$message({
|
|
|
message: '操作失败',
|
|
@@ -395,9 +420,9 @@ export default {
|
|
|
element.Modify = element.IsModify
|
|
|
})
|
|
|
this.queryEdit(val)
|
|
|
- this.isShow2()
|
|
|
+ // this.isShow2()
|
|
|
} else {
|
|
|
- this.show2 = false
|
|
|
+ // this.show2 = false
|
|
|
// this.isShow2()
|
|
|
// this.queryEditNum(true)
|
|
|
}
|
|
@@ -443,6 +468,7 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
mounted() {
|
|
|
+ console.log('editTips', this.editTips)
|
|
|
this.init()
|
|
|
// 定时查询草稿箱数量
|
|
|
this.getDraftNum() //首次查询
|
|
@@ -602,8 +628,31 @@ export default {
|
|
|
cursor: pointer;
|
|
|
border: 1px solid #eee;
|
|
|
}
|
|
|
+ .tltk-1 {
|
|
|
+ margin-bottom: 10px;
|
|
|
+ display: none;
|
|
|
+ cursor: pointer;
|
|
|
+ border: 1px solid #eee;
|
|
|
+ }
|
|
|
}
|
|
|
.edit_map:hover .tltk {
|
|
|
+ // display: block;
|
|
|
+ // position: fixed;
|
|
|
+ // bottom: 70px;
|
|
|
+ margin-left: -10px;
|
|
|
+ right: 22px;
|
|
|
+ z-index: 1;
|
|
|
+ width: 48px;
|
|
|
+ height: 48px;
|
|
|
+ background: linear-gradient(180deg, rgba(54, 156, 247, 1) 0%, rgba(2, 91, 170, 1) 100%);
|
|
|
+ box-shadow: 0px 2px 8px 0px rgba(31, 36, 41, 0.2);
|
|
|
+ border-radius: 90px;
|
|
|
+ text-align: center;
|
|
|
+ display: flex;
|
|
|
+ justify-content: center;
|
|
|
+ align-items: center;
|
|
|
+}
|
|
|
+.edit_map:hover .tltk-1 {
|
|
|
display: block;
|
|
|
}
|
|
|
.edit_map:hover .bjtk {
|