|
@@ -11,26 +11,10 @@
|
|
<el-collapse-transition v-if='(type==1 || floors.length>0)&& isMessage'>
|
|
<el-collapse-transition v-if='(type==1 || floors.length>0)&& isMessage'>
|
|
<div class='legend-tab' v-if='show'>
|
|
<div class='legend-tab' v-if='show'>
|
|
<div class='legend-table2' v-if='systemName=="土建系统"'>
|
|
<div class='legend-table2' v-if='systemName=="土建系统"'>
|
|
- <lengend-view
|
|
|
|
- v-if='viewTable.length>=0'
|
|
|
|
- :loading='loading'
|
|
|
|
- :viewTable='viewTable'
|
|
|
|
- @changeSwitch='handleSwich'
|
|
|
|
- :remarksText='remarksText'
|
|
|
|
- ref='viewLengend'
|
|
|
|
- :systemName='systemName'
|
|
|
|
- ></lengend-view>
|
|
|
|
|
|
+ <lengend-view @changeSwitch='handleSwich' :remarksText='remarksText' ref='viewLengend' :systemName='systemName'></lengend-view>
|
|
</div>
|
|
</div>
|
|
<div class='legend-table' v-else>
|
|
<div class='legend-table' v-else>
|
|
- <lengend-view
|
|
|
|
- v-if='viewTable.length>=0'
|
|
|
|
- :loading='loading'
|
|
|
|
- :viewTable='viewTable'
|
|
|
|
- @changeSwitch='handleSwich'
|
|
|
|
- :remarksText='remarksText'
|
|
|
|
- ref='viewLengend'
|
|
|
|
- :systemName='systemName'
|
|
|
|
- ></lengend-view>
|
|
|
|
|
|
+ <lengend-view @changeSwitch='handleSwich' :remarksText='remarksText' ref='viewLengend' :systemName='systemName'></lengend-view>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</el-collapse-transition>
|
|
</el-collapse-transition>
|
|
@@ -105,6 +89,7 @@ import lengendView from '@/components/viewLengend'
|
|
import legendRemarks from '@/components/legendremarks'
|
|
import legendRemarks from '@/components/legendremarks'
|
|
import lengendEdit from '@/components/editLengend'
|
|
import lengendEdit from '@/components/editLengend'
|
|
import { mapGetters } from 'vuex'
|
|
import { mapGetters } from 'vuex'
|
|
|
|
+import bus from '@/utils/bus.js'
|
|
import { queryStatis, updateStatis, queryRead } from '@/api/public.js'
|
|
import { queryStatis, updateStatis, queryRead } from '@/api/public.js'
|
|
|
|
|
|
export default {
|
|
export default {
|
|
@@ -114,7 +99,7 @@ export default {
|
|
remarksText: '', //查询出来的备注
|
|
remarksText: '', //查询出来的备注
|
|
text1:
|
|
text1:
|
|
'<p>1.主要设备房包括:冷源机房,热源机房,开闭站,配变电所(室),发电机房,消防水泵房,消防高位水箱间,生活水泵房,慧云机房,垃圾房。</p>',
|
|
'<p>1.主要设备房包括:冷源机房,热源机房,开闭站,配变电所(室),发电机房,消防水泵房,消防高位水箱间,生活水泵房,慧云机房,垃圾房。</p>',
|
|
- // text2: '<p>2.图例后×的数字,代表此位置的数量。</p>',
|
|
|
|
|
|
+ text2: '<p>2.图例后×的数字,代表此位置的数量。</p>',
|
|
text2: '',
|
|
text2: '',
|
|
show: true,
|
|
show: true,
|
|
show2: false,
|
|
show2: false,
|
|
@@ -176,7 +161,7 @@ export default {
|
|
testClick(data) {},
|
|
testClick(data) {},
|
|
// 编辑备注
|
|
// 编辑备注
|
|
legendClik() {
|
|
legendClik() {
|
|
- this.$refs.EditdMarks.showModal(this.remarksText)
|
|
|
|
|
|
+ this.$refs.EditdMarks.showModal()
|
|
},
|
|
},
|
|
// 查询备注
|
|
// 查询备注
|
|
queryMarks() {
|
|
queryMarks() {
|
|
@@ -184,29 +169,29 @@ export default {
|
|
categoryId: this.categoryId ? this.categoryId : this.$cookie.get('categoryId'),
|
|
categoryId: this.categoryId ? this.categoryId : this.$cookie.get('categoryId'),
|
|
projectId: this.$store.state.plazaId,
|
|
projectId: this.$store.state.plazaId,
|
|
BuildingID: '1',
|
|
BuildingID: '1',
|
|
|
|
+ Pub: true,
|
|
FloorID: this.$cookie.get('floorNow')
|
|
FloorID: this.$cookie.get('floorNow')
|
|
}
|
|
}
|
|
let data = {}
|
|
let data = {}
|
|
queryRead({ data, postParams }).then(res => {
|
|
queryRead({ data, postParams }).then(res => {
|
|
|
|
+ let remarksText = ''
|
|
if (res.data.Data && res.data.Data[0].Note) {
|
|
if (res.data.Data && res.data.Data[0].Note) {
|
|
- let note = res.data.Data[0].Note
|
|
|
|
- if (this.planNum > 0) {
|
|
|
|
- this.remarksText = `${this.text1}${note}`
|
|
|
|
- }
|
|
|
|
- if (this.typeNum > 1) {
|
|
|
|
- this.remarksText = `${this.text2}${note}`
|
|
|
|
- }
|
|
|
|
- if (note.search(this.text1) != -1 && note.search(this.text2) != -1) {
|
|
|
|
- this.remarksText = `${note}`
|
|
|
|
- } else if (note.search(this.text1) != -1) {
|
|
|
|
- this.remarksText = `${this.text2}${note}`
|
|
|
|
- } else if (note.search(this.text2) != -1) {
|
|
|
|
- this.remarksText = `${this.text1}${note}`
|
|
|
|
|
|
+ let Res = res.data ? res.data.Data[0].Note : ''
|
|
|
|
+ if (Res) {
|
|
|
|
+ // 返回有备注
|
|
|
|
+ remarksText = Res
|
|
} else {
|
|
} else {
|
|
- this.remarksText = `${this.text1}${this.text2}${note}`
|
|
|
|
|
|
+ if (this.planNum > 0 && this.typeNum > 1) {
|
|
|
|
+ remarksText = `${this.text1}${this.text2}${Res}`
|
|
|
|
+ } else if (this.planNum > 0) {
|
|
|
|
+ remarksText = `${this.text1}${Res}`
|
|
|
|
+ } else if (this.typeNum > 1) {
|
|
|
|
+ remarksText = `${this.text2}${Res}`
|
|
|
|
+ } else {
|
|
|
|
+ remarksText = ''
|
|
|
|
+ }
|
|
}
|
|
}
|
|
- } else {
|
|
|
|
- this.remarksText = `${this.text1}${this.text2}`
|
|
|
|
|
|
+ this.$store.commit('SETREMARKSTEXT', remarksText)
|
|
}
|
|
}
|
|
})
|
|
})
|
|
},
|
|
},
|
|
@@ -259,6 +244,7 @@ export default {
|
|
this.editSwitch = val
|
|
this.editSwitch = val
|
|
this.queryEditNum(!this.editSwitch)
|
|
this.queryEditNum(!this.editSwitch)
|
|
},
|
|
},
|
|
|
|
+ queryViewMethods() {},
|
|
// 查询图例
|
|
// 查询图例
|
|
queryView(flag) {
|
|
queryView(flag) {
|
|
let postParams = {}
|
|
let postParams = {}
|
|
@@ -269,14 +255,18 @@ export default {
|
|
}
|
|
}
|
|
queryStatis({ data, postParams }).then(res => {
|
|
queryStatis({ data, postParams }).then(res => {
|
|
this.loading = false
|
|
this.loading = false
|
|
- //console.log('图例', res)
|
|
|
|
- this.viewTable = res.data.Data ? res.data.Data : []
|
|
|
|
- if (this.viewTable.length > 0) {
|
|
|
|
- this.viewTable.forEach(el => {
|
|
|
|
- console.log(el)
|
|
|
|
|
|
+ let viewTable = []
|
|
|
|
+ viewTable = res.data.Data ? res.data.Data : []
|
|
|
|
+ this.$store.commit('SETLEGENDTABLE', viewTable)
|
|
|
|
+
|
|
|
|
+ if (viewTable.length > 0) {
|
|
|
|
+ viewTable.forEach(el => {
|
|
if (el.Name == '主要设备房') {
|
|
if (el.Name == '主要设备房') {
|
|
this.planNum = el.Num
|
|
this.planNum = el.Num
|
|
}
|
|
}
|
|
|
|
+ if (el.type == 'Image') {
|
|
|
|
+ this.typeNum = el.Num
|
|
|
|
+ }
|
|
})
|
|
})
|
|
}
|
|
}
|
|
this.$nextTick(() => {
|
|
this.$nextTick(() => {
|
|
@@ -285,7 +275,6 @@ export default {
|
|
}
|
|
}
|
|
})
|
|
})
|
|
})
|
|
})
|
|
- this.queryMarks()
|
|
|
|
},
|
|
},
|
|
// 查询编辑状态图例
|
|
// 查询编辑状态图例
|
|
queryEditNum(flag) {
|
|
queryEditNum(flag) {
|
|
@@ -347,9 +336,37 @@ export default {
|
|
determine() {
|
|
determine() {
|
|
this.isFloor = false
|
|
this.isFloor = false
|
|
this.goToEditer()
|
|
this.goToEditer()
|
|
|
|
+ },
|
|
|
|
+ queryRemarksMethods() {},
|
|
|
|
+ init() {
|
|
|
|
+ // 图例
|
|
|
|
+ bus.$on('queryViewMethods', () => {
|
|
|
|
+ this.queryView(false)
|
|
|
|
+ })
|
|
|
|
+ // 备注
|
|
|
|
+ bus.$on('queryRemarksMethods', res => {
|
|
|
|
+ let remarksText = ''
|
|
|
|
+ if (res) {
|
|
|
|
+ // 返回有备注
|
|
|
|
+ remarksText = res
|
|
|
|
+ } else {
|
|
|
|
+ if (this.planNum > 0 && this.typeNum > 1) {
|
|
|
|
+ remarksText = `${this.text1}${this.text2}${res}`
|
|
|
|
+ } else if (this.planNum > 0) {
|
|
|
|
+ remarksText = `${this.text1}${res}`
|
|
|
|
+ } else if (this.typeNum > 1) {
|
|
|
|
+ remarksText = `${this.text2}${res}`
|
|
|
|
+ } else {
|
|
|
|
+ remarksText = ''
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ this.$store.commit('SETREMARKSTEXT', remarksText)
|
|
|
|
+ })
|
|
}
|
|
}
|
|
},
|
|
},
|
|
- mounted() {}
|
|
|
|
|
|
+ mounted() {
|
|
|
|
+ this.init()
|
|
|
|
+ }
|
|
}
|
|
}
|
|
</script>
|
|
</script>
|
|
<style lang="less" scoped>
|
|
<style lang="less" scoped>
|