|
@@ -116,7 +116,6 @@ export default {
|
|
|
name: 'Legend',
|
|
|
data() {
|
|
|
return {
|
|
|
- // remarksText: '', //查询出来的备注
|
|
|
text1: '主要设备房包括:冷源机房,热源机房,开闭站,配变电所(室),发电机房,消防水泵房,消防高位水箱间,生活水泵房,慧云机房,垃圾房',
|
|
|
text2: '图例后×的数字,代表此位置的数量',
|
|
|
loading: true,
|
|
@@ -134,8 +133,6 @@ export default {
|
|
|
floorSelectAble: [],
|
|
|
floor: '', //传的楼层
|
|
|
floorName: '',
|
|
|
- // planNum: '', //主要设备房
|
|
|
- // typeNum: '',
|
|
|
draftNum: null, //草稿箱数量, 编辑器修改icon右上角显示
|
|
|
interval: 10 * 60 * 1000, //定时器时长,默认 10分钟
|
|
|
timer: null, //保存定时器
|
|
@@ -218,10 +215,8 @@ export default {
|
|
|
*/
|
|
|
async getDraftNum() {
|
|
|
let res = null,
|
|
|
- // floorId = this.$cookie.get('floorMapId'),
|
|
|
floorId = this.$store.state.currentFloor.gname || this.$cookie.get('floorMapId'),
|
|
|
categoryId = this.categoryId || this.$cookie.get('categoryId')
|
|
|
- // console.log('getDraftNum', this.innerLeng, categoryId)
|
|
|
// 增加校验 floorId,防止上传 undefined
|
|
|
if (!floorId) {
|
|
|
return true
|
|
@@ -260,7 +255,6 @@ export default {
|
|
|
},
|
|
|
// 查询备注
|
|
|
queryMarks() {
|
|
|
- // this.remarksText = ''
|
|
|
let postParams = {
|
|
|
categoryId: this.categoryId ? this.categoryId : this.$cookie.get('categoryId'),
|
|
|
projectId: this.$store.state.plazaId,
|
|
@@ -270,27 +264,10 @@ export default {
|
|
|
}
|
|
|
let data = {}
|
|
|
queryRead({ data, postParams }).then(res => {
|
|
|
- console.log(2222222222222222222222222222222222222222222)
|
|
|
if (res.data.Data && res.data.Data[0].Note) {
|
|
|
- console.log('bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb')
|
|
|
-
|
|
|
let Res = res.data ? res.data.Data[0].Note : ''
|
|
|
if (Res) {
|
|
|
this.$store.commit('SETREMARKSTEXT', Res)
|
|
|
- console.log(22222222222222222222)
|
|
|
- // 返回有备注
|
|
|
- // this.remarksText = Res
|
|
|
- // let defaultCom = ''
|
|
|
- // if (this.planNum && this.typeNum) {
|
|
|
- // defaultCom = `${Res}<ol style="padding-left: 1.5em;"><li>${this.text1}</li><li>${this.text2}</li></ol>`
|
|
|
- // } else if (this.planNum) {
|
|
|
- // defaultCom = `${Res}<ol style="padding-left: 1.5em;"><li>${this.text1}</li></ol>`
|
|
|
- // } else if (this.typeNum) {
|
|
|
- // defaultCom = `${Res}<ol style="padding-left: 1.5em;" ><li>${this.text2}</li></ol>`
|
|
|
- // } else {
|
|
|
- // defaultCom = Res
|
|
|
- // }
|
|
|
- // this.$store.commit('SETDEFAULTCOMMENT', defaultCom)
|
|
|
} else {
|
|
|
let marks = ''
|
|
|
if (this.planNum && this.typeNum) {
|
|
@@ -302,15 +279,9 @@ export default {
|
|
|
} else {
|
|
|
marks = ''
|
|
|
}
|
|
|
- console.log(marks)
|
|
|
this.$store.commit('SETREMARKSTEXT', marks)
|
|
|
- console.log(33333333333333333333)
|
|
|
}
|
|
|
- // this.$store.commit('SETREMARKSTEXT', this.remarksText)
|
|
|
}
|
|
|
- // else {
|
|
|
- // this.$store.commit('SETREMARKSTEXT', '')
|
|
|
- // }
|
|
|
})
|
|
|
},
|
|
|
// 点击展示图例框
|
|
@@ -325,9 +296,6 @@ export default {
|
|
|
}
|
|
|
this.queryView(false)
|
|
|
},
|
|
|
- cance() {
|
|
|
- // this.show2 = false
|
|
|
- },
|
|
|
// 编辑图例
|
|
|
editTl() {
|
|
|
if (this.showView != 2) {
|
|
@@ -361,15 +329,6 @@ export default {
|
|
|
let url = editerUrl + 'editer?' + encodeURIComponent(data)
|
|
|
window.open(url, true)
|
|
|
},
|
|
|
- // 编辑状态取消
|
|
|
- isShow2() {
|
|
|
- // if (this.showView != 2) {
|
|
|
- // this.$store.commit('SETSHOWVIEW', 1)
|
|
|
- // } else {
|
|
|
- // this.$store.commit('SETSHOWVIEW', 0)
|
|
|
- // }
|
|
|
- // this.show2 = !this.show2
|
|
|
- },
|
|
|
handleSwich(val) {
|
|
|
this.queryView(!val)
|
|
|
},
|
|
@@ -383,7 +342,6 @@ export default {
|
|
|
queryView(flag) {
|
|
|
let postParams = {}
|
|
|
let categoryId = this.categoryId || this.$cookie.get('categoryId')
|
|
|
- // console.log('queryView', this.innerLeng, categoryId)
|
|
|
let data = {
|
|
|
categoryId,
|
|
|
graphId: this.$cookie.get('graphId'),
|
|
@@ -395,8 +353,6 @@ export default {
|
|
|
queryStatis({ data, postParams }).then(res => {
|
|
|
this.loading = false
|
|
|
let viewTable = []
|
|
|
- // this.planNum = ''
|
|
|
- // this.typeNum = ''
|
|
|
viewTable = res.data.Data ? res.data.Data : []
|
|
|
this.$store.commit('SETLEGENDTABLE', viewTable)
|
|
|
if (viewTable.length > 0) {
|
|
@@ -410,20 +366,6 @@ export default {
|
|
|
})
|
|
|
if (this.remarksText) {
|
|
|
this.$store.commit('SETREMARKSTEXT', this.remarksText)
|
|
|
- console.log()
|
|
|
- // 返回有备注
|
|
|
- // this.remarksText = Res
|
|
|
- // let defaultCom = ''
|
|
|
- // if (this.planNum && this.typeNum) {
|
|
|
- // defaultCom = `${Res}<ol style="padding-left: 1.5em;"><li>${this.text1}</li><li>${this.text2}</li></ol>`
|
|
|
- // } else if (this.planNum) {
|
|
|
- // defaultCom = `${Res}<ol style="padding-left: 1.5em;"><li>${this.text1}</li></ol>`
|
|
|
- // } else if (this.typeNum) {
|
|
|
- // defaultCom = `${Res}<ol style="padding-left: 1.5em;" ><li>${this.text2}</li></ol>`
|
|
|
- // } else {
|
|
|
- // defaultCom = Res
|
|
|
- // }
|
|
|
- // this.$store.commit('SETDEFAULTCOMMENT', defaultCom)
|
|
|
} else {
|
|
|
let marks = ''
|
|
|
if (this.planNum && this.typeNum) {
|
|
@@ -438,23 +380,9 @@ export default {
|
|
|
this.$store.commit('SETREMARKSTEXT', marks)
|
|
|
}
|
|
|
setTimeout(() => {
|
|
|
- this.setLengedHeight()
|
|
|
- },);
|
|
|
+ this.setLengedHeight()
|
|
|
+ })
|
|
|
}
|
|
|
- // let remarksText = ''
|
|
|
- // this.remarksText = ''
|
|
|
- // this.$store.commit('SETREMARKSTEXT', '')
|
|
|
-
|
|
|
- // if (this.planNum && this.typeNum) {
|
|
|
- // this.remarksText = `<ol style="padding-left: 1.5em;"><li>${this.text1}</li><li>${this.text2}</li></ol>`
|
|
|
- // } else if (this.planNum) {
|
|
|
- // this.remarksText = `<ol style="padding-left: 1.5em;"><li>${this.text1}</li></ol>`
|
|
|
- // } else if (this.typeNum) {
|
|
|
- // this.remarksText = `<ol style="padding-left: 1.5em;" ><li>${this.text2}</li></ol>`
|
|
|
- // } else {
|
|
|
- // this.remarksText = ''
|
|
|
- // }
|
|
|
- // this.$store.commit('SETREMARKSTEXT', this.remarksText)
|
|
|
this.$nextTick(() => {
|
|
|
if (this.$refs.viewLengend) {
|
|
|
this.$refs.viewLengend.setSelected()
|
|
@@ -466,7 +394,6 @@ export default {
|
|
|
queryEditNum(flag) {
|
|
|
let postParams = {}
|
|
|
let categoryId = this.categoryId || this.$cookie.get('categoryId')
|
|
|
- // console.log('queryEditNum', categoryId)
|
|
|
let data = {
|
|
|
categoryId,
|
|
|
graphId: this.$cookie.get('graphId'),
|
|
@@ -476,7 +403,6 @@ export default {
|
|
|
floorId: this.$store.state.currentFloor.gname
|
|
|
}
|
|
|
queryStatis({ data, postParams }).then(res => {
|
|
|
- //console.log('编辑图例数', res)
|
|
|
this.loading1 = false
|
|
|
this.editTable = res.data.Data ? res.data.Data : []
|
|
|
})
|
|
@@ -532,11 +458,7 @@ export default {
|
|
|
this.queryEdit(val)
|
|
|
this.$store.commit('SETSHOWVIEW', 1)
|
|
|
this.handleSwich(true)
|
|
|
- // this.isShow2()
|
|
|
} else {
|
|
|
- // this.show2 = false
|
|
|
- // this.isShow2()
|
|
|
- // this.queryEditNum(true)
|
|
|
this.$store.commit('SETSHOWVIEW', 1)
|
|
|
this.handleSwich(true)
|
|
|
}
|
|
@@ -556,7 +478,6 @@ export default {
|
|
|
},
|
|
|
queryRemarksMethods() {},
|
|
|
init() {
|
|
|
- // this.remarksText = ''
|
|
|
// 图例
|
|
|
bus.$off('queryViewMethods') //解决触发多次监听
|
|
|
bus.$on('queryViewMethods', () => {
|
|
@@ -567,31 +488,7 @@ export default {
|
|
|
bus.$on('queryRemarksMethods', res => {
|
|
|
if (res) {
|
|
|
this.$store.commit('SETREMARKSTEXT', res)
|
|
|
- // 返回有备注
|
|
|
- // this.remarksText = res
|
|
|
- // let defaultCom = ''
|
|
|
- // if (this.planNum && this.typeNum) {
|
|
|
- // defaultCom = `${res}<ol style="padding-left: 1.5em;"><li>${this.text1}</li><li>${this.text2}</li></ol>`
|
|
|
- // } else if (this.planNum) {
|
|
|
- // defaultCom = `${res}<ol style="padding-left: 1.5em;"><li>${this.text1}</li></ol>`
|
|
|
- // } else if (this.typeNum) {
|
|
|
- // defaultCom = `${res}<ol style="padding-left: 1.5em;" ><li>${this.text2}</li></ol>`
|
|
|
- // } else {
|
|
|
- // defaultCom = res
|
|
|
- // }
|
|
|
- // this.$store.commit('SETDEFAULTCOMMENT', defaultCom)
|
|
|
} else {
|
|
|
- // if (this.planNum && this.typeNum) {
|
|
|
- // this.remarksText = `<ol style="padding-left: 1.5em;"><li>${this.text1}</li><li>${this.text2}</li></ol>`
|
|
|
- // } else if (this.planNum) {
|
|
|
- // this.remarksText = `<ol style="padding-left: 1.5em;"><li>${this.text1}</li></ol>`
|
|
|
- // } else if (this.typeNum) {
|
|
|
- // this.remarksText = `<ol style="padding-left: 1.5em;" ><li>${this.text2}</li></ol>`
|
|
|
- // } else {
|
|
|
- // this.remarksText = ''
|
|
|
- // }
|
|
|
- // }
|
|
|
- // this.$store.commit('SETREMARKSTEXT', this.remarksText)
|
|
|
let marks = ''
|
|
|
if (this.planNum && this.typeNum) {
|
|
|
marks = `<ol style="padding-left: 1.5em;"><li>${this.text1}</li><li>${this.text2}</li></ol>`
|
|
@@ -602,7 +499,6 @@ export default {
|
|
|
} else {
|
|
|
marks = ''
|
|
|
}
|
|
|
- console.log(marks)
|
|
|
this.$store.commit('SETREMARKSTEXT', marks)
|
|
|
}
|
|
|
})
|
|
@@ -623,12 +519,8 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
mounted() {
|
|
|
- // console.log('lengend mounted')
|
|
|
- // console.log(this.categoryId)
|
|
|
- // console.log('editTips', this.editTips)
|
|
|
this.init()
|
|
|
// 定时查询草稿箱数量
|
|
|
- // TODO: 1
|
|
|
this.getDraftNum() //首次查询
|
|
|
this.timer = setInterval(() => {
|
|
|
this.getDraftNum()
|
|
@@ -746,11 +638,6 @@ export default {
|
|
|
position: relative;
|
|
|
.corner {
|
|
|
position: absolute;
|
|
|
- // right: -8px;
|
|
|
- // top: 0;
|
|
|
- // display: inline-block;
|
|
|
- // width: 18px;
|
|
|
- // height: 18px;
|
|
|
right: 3px;
|
|
|
top: 3px;
|
|
|
display: inline-block;
|
|
@@ -787,7 +674,6 @@ export default {
|
|
|
margin-bottom: 10px;
|
|
|
display: none;
|
|
|
cursor: pointer;
|
|
|
- // border: 1px solid #eee;
|
|
|
}
|
|
|
.tltk-1 {
|
|
|
margin-bottom: 10px;
|
|
@@ -803,9 +689,6 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
.edit_map:hover .tltk {
|
|
|
- // display: block;
|
|
|
- // position: fixed;
|
|
|
- // bottom: 70px;
|
|
|
margin-left: -10px;
|
|
|
right: 22px;
|
|
|
z-index: 1;
|