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