NEZ-2779 fix:opo 点击 module 上方蜂窝详情弹出二级列表,显示路径有误

This commit is contained in:
zhangyu
2023-04-17 16:59:42 +08:00
parent bd8c624a03
commit 1c7c14933e
4 changed files with 20 additions and 7 deletions

View File

@@ -53,7 +53,7 @@
<!-- </div>-->
<div class="alert-label-box">
<div class="alert-label-title">{{$t('alert.config.expr')}}</div>
<div class="alert-label-value">{{alertRuleData.expr ? (alertRuleData.expr + alertRuleData.operator + formatThreshold(alertRuleData.threshold,alertRuleData.unit)) : '--'}}</div>
<div class="alert-label-value">{{alertRuleData.expr ? alertRuleData.expr : '--'}}</div>
</div>
<div class="alert-label-box">
<div class="alert-label-title">{{$t('alert.alertNum')}}</div>

View File

@@ -180,7 +180,9 @@ export default {
if (this.trendPromiseIndex < this.trendPromise.length) {
Promise.all(this.trendPromise[this.trendPromiseIndex]).then(response => {
response.forEach((res, index) => {
const item = this.tableData[index + this.trendPromiseIndex * 10]
const arr = res.responseURL.split('=')
const id = arr[arr.length - 1]
const item = this.tableData.find(row => row.id == id)
if (!res.data) {
return
}
@@ -194,8 +196,10 @@ export default {
}
})
})
if (item) {
item.alertDaysData = newWeekDays
item.trendLoading = false
}
})
this.trendPromiseIndex++
this.renderTrend()
@@ -247,7 +251,7 @@ export default {
dimension: 'priority',
step: 'd'
}
params[this.trendKey] = item.id
params[this.trendKey] = item.id // 添加其他参数 这个要放在最后 用于获取对应的id
trendArr.push(this.$get('/stat/alertMessage/trend', params))
if (trendArr.length > 9) {
this.trendPromise.push(trendArr)

View File

@@ -73,7 +73,7 @@ export default {
nodesArr: [],
offsetX: 0,
offsetY: 0,
moduleId: '',
moduleId: ''
}
},
mixins: [topoUtil],
@@ -510,8 +510,14 @@ export default {
},
// 具体内容点击
nodeTools (node, tool) {
const findItem = this.allModules.find(item => item.id == node.moduleId)
if (findItem) {
this.moduleName = findItem.name
} else {
this.$message.error(this.$t('MODULE_NOTFOUND'))
return
}
this.moduleId = node.moduleId
this.moduleName = node.moduleName
if (tool.id === 'total') {
this.popDataShowUpdate('', false, node)
return

View File

@@ -139,6 +139,9 @@ export function get (url, params, responseType) {
headers: response.headers
})
}
if (url.indexOf('/stat/alertMessage/trend') !== -1) {
response.data.responseURL = response.request.responseURL
}
resolve(response.data)
}).catch(err => {
if (err.response) {