fix: 部分接口请求 noData 判断调整
This commit is contained in:
@@ -123,11 +123,8 @@ export default {
|
||||
this.toggleLoading(true)
|
||||
get(api.dnsInsight.activeMaliciousDomain, params).then(res => {
|
||||
if (res.code === 200) {
|
||||
const data = res.data.result
|
||||
if (!data || data.length === 0) {
|
||||
this.isNoData = true
|
||||
}
|
||||
this.tableData = data
|
||||
this.isNoData = res.data.result.length === 0
|
||||
this.tableData = res.data.result
|
||||
} else {
|
||||
this.isNoData = true
|
||||
}
|
||||
|
||||
@@ -208,9 +208,7 @@ export default {
|
||||
this.toggleLoading(true)
|
||||
get(api.dnsInsight.recentEvents, params).then(res => {
|
||||
if (res.code === 200) {
|
||||
if (!res.data.result || res.data.result.length === 0) {
|
||||
this.isNoData = true
|
||||
}
|
||||
this.isNoData = res.data.result.length === 0
|
||||
this.tableData = res.data.result
|
||||
this.tableData.forEach((t, index) => {
|
||||
if (index > 5) {
|
||||
|
||||
@@ -675,13 +675,6 @@ export default {
|
||||
})
|
||||
}
|
||||
},
|
||||
// moreChange (app) {
|
||||
// this.appData.forEach(t => {
|
||||
// if (t.name === app.name && t.type === app.type) {
|
||||
// t.moreOptions = !t.moreOptions
|
||||
// }
|
||||
// })
|
||||
// },
|
||||
resize () {
|
||||
this.myChart.forEach(t => {
|
||||
t.resize()
|
||||
|
||||
@@ -66,12 +66,8 @@ export default {
|
||||
get(api.netWorkOverview.ddosEventAnalysis, params).then(res => {
|
||||
if (res.code === 200) {
|
||||
this.showError = false
|
||||
if (res.data.result.length === 0) {
|
||||
this.isNoData = true
|
||||
} else {
|
||||
this.ddosData = res.data.result[0]
|
||||
this.isNoData = false
|
||||
}
|
||||
this.isNoData = res.data.result.length === 0
|
||||
this.ddosData = res.data.result[0]
|
||||
} else {
|
||||
this.isNoData = false
|
||||
this.showError = true
|
||||
|
||||
@@ -22,7 +22,6 @@ import { get } from '@/utils/http'
|
||||
import { api } from '@/utils/api'
|
||||
import { drillDownPanelTypeMapping } from '@/utils/constants'
|
||||
import { overwriteUrl, urlParamsHandler } from '@/utils/tools'
|
||||
import { useRoute } from 'vue-router'
|
||||
import { ref } from 'vue'
|
||||
export default {
|
||||
name: 'NpmTabs',
|
||||
|
||||
@@ -144,7 +144,6 @@ export default {
|
||||
if (!val) {
|
||||
val = this.metricFilter
|
||||
}
|
||||
// const conditionStr = this.$route.query.queryCondition ? this.$route.query.queryCondition : ''
|
||||
let condition = ''
|
||||
let type = this.dimensionType
|
||||
if (this.queryCondition.indexOf(' OR ') > -1) {
|
||||
|
||||
Reference in New Issue
Block a user