CN-643 部署到44.54后,点击第四级菜单下拉列表报错

This commit is contained in:
hanyuxia
2022-08-09 11:02:59 +08:00
parent 4e510eb25d
commit 1889f6b13b

View File

@@ -256,6 +256,7 @@ export default {
}, },
mounted () { mounted () {
this.from = Object.keys(this.entityType)[0] this.from = Object.keys(this.entityType)[0]
this.initDropdownList()
}, },
setup () { setup () {
const dateRangeValue = 60 const dateRangeValue = 60
@@ -291,7 +292,8 @@ export default {
window.location.reload() window.location.reload()
}) })
}, },
initDropdownList (currentValue) { initDropdownList () {
const currentValue = document.getElementById('breadcrumbValue')?document.getElementById('breadcrumbValue').innerText:''
const columnName = this.$store.getters.getBreadcrumbColumnName const columnName = this.$store.getters.getBreadcrumbColumnName
let type = 'ip' let type = 'ip'
const tabObjGroup = networkOverviewTabList.filter(item => item.label == columnName) const tabObjGroup = networkOverviewTabList.filter(item => item.label == columnName)
@@ -312,7 +314,6 @@ export default {
if (response.code === 200) { if (response.code === 200) {
this.breadcrumbColumnValueListShow = response.data.result this.breadcrumbColumnValueListShow = response.data.result
this.$nextTick(() => { this.$nextTick(() => {
setTimeout(() => {
this.breadcrumbColumnValueListShow.forEach(item => { this.breadcrumbColumnValueListShow.forEach(item => {
const selectedDom = document.getElementById(item) const selectedDom = document.getElementById(item)
if (selectedDom) { if (selectedDom) {
@@ -323,17 +324,16 @@ export default {
} }
} }
}) })
}, 250)
}) })
} }
}) })
}, },
showBreadcrumbPopover (valueMenuId) { showBreadcrumbPopover (valueMenuId) {
this.breadcrumbColumnValueListShow.splice(0,this.breadcrumbColumnValueListShow.length)
this.curPageNum = 1 this.curPageNum = 1
this.showBackground = true this.showBackground = true
this.dropDownValue = '' this.dropDownValue = ''
const currentValue = document.getElementById('breadcrumbValue').innerText this.initDropdownList()
this.initDropdownList(currentValue)
this.valueMenuId = 'breadcrumb' + valueMenuId this.valueMenuId = 'breadcrumb' + valueMenuId
}, },
hideBreadcrumbPopover () { hideBreadcrumbPopover () {
@@ -344,9 +344,8 @@ export default {
document.getElementById('breadcrumbValue').innerText = value document.getElementById('breadcrumbValue').innerText = value
document.getElementById('breadcrumbButton').setAttribute('title', value) document.getElementById('breadcrumbButton').setAttribute('title', value)
document.getElementById(this.valueMenuId).setAttribute('title', value) document.getElementById(this.valueMenuId).setAttribute('title', value)
this.$refs.breadcrumbPopover.hide() document.getElementById('breadcrumbButton').click()
const columnName = this.$store.getters.getBreadcrumbColumnName const columnName = this.$store.getters.getBreadcrumbColumnName
const tabObjGroup = networkOverviewTabList.filter(item => item.label == columnName) const tabObjGroup = networkOverviewTabList.filter(item => item.label == columnName)
if (tabObjGroup && tabObjGroup.length > 0) { if (tabObjGroup && tabObjGroup.length > 0) {
const curTab = tabObjGroup[0] const curTab = tabObjGroup[0]