fix: detection列表加上分页、顶部柱状图时区解决;实体列表--ip下拉的地图查询参数修正

This commit is contained in:
chenjinsong
2022-03-05 20:25:03 +08:00
parent 3af81d28a3
commit f4daaa8e75
5 changed files with 21 additions and 17 deletions

View File

@@ -84,6 +84,7 @@ export const api = {
victimLocation: '/interface/detection/security/filter/victimLocation', victimLocation: '/interface/detection/security/filter/victimLocation',
eventSeverity: '/interface/detection/security/filter/severity', eventSeverity: '/interface/detection/security/filter/severity',
listBasic: '/interface/detection/security/list/basic', listBasic: '/interface/detection/security/list/basic',
listCount: '/interface/detection/security/list/count',
overviewBasic: '/interface/detection/security/detail/overview/basic', overviewBasic: '/interface/detection/security/detail/overview/basic',
overviewEvent: '/interface/detection/security/detail/overview/event' overviewEvent: '/interface/detection/security/detail/overview/event'
}, },
@@ -93,6 +94,7 @@ export const api = {
eventSeverity: '/interface/detection/performance/filter/severity', eventSeverity: '/interface/detection/performance/filter/severity',
activeEntity: '/interface/detection/performance/filter/activeEntity', activeEntity: '/interface/detection/performance/filter/activeEntity',
listBasic: '/interface/detection/performance/list/basic', listBasic: '/interface/detection/performance/list/basic',
listCount: '/interface/detection/performance/list/count',
overviewBasic: '/interface/detection/performance/detail/overview/basic' overviewBasic: '/interface/detection/performance/detail/overview/basic'
} }
} }

View File

@@ -40,8 +40,7 @@ export function getNowTime (interval) {
endTime endTime
} }
} }
//日期格式转换 // 日期格式转换
export function rTime(date) { export function rTime (date) {
let json_date = new Date(date).toJSON(); return window.$dayJs.tz(new Date(date)).format('YYYY-MM-DD HH:mm:ss')
return new Date(new Date(json_date) + 8 * 3600 * 1000).toISOString().replace(/T/g, ' ').replace(/\.[\d]{3}Z/, '')
} }

View File

@@ -45,8 +45,7 @@
<script> <script>
import ChartHeader from './ChartHeader' import ChartHeader from './ChartHeader'
import Chart from '@/views/charts/Chart' import Chart from '@/views/charts/Chart'
import testData from './charts/testData' import { dnsServerRole, chartPieTableTopOptions, chartTableDefaultPageSize, chartTableTopOptions } from '@/utils/constants'
import { dnsServerRole } from '@/utils/constants'
import { import {
isEcharts, isEcharts,
isSingleValue, isSingleValue,
@@ -79,7 +78,7 @@ import {
import { tableTitleMapping, legendMapping } from '@/views/charts/charts/chart-table-title' import { tableTitleMapping, legendMapping } from '@/views/charts/charts/chart-table-title'
import { replaceUrlPlaceholder } from '@/utils/tools' import { replaceUrlPlaceholder } from '@/utils/tools'
import { getNowTime, getSecond } from '@/utils/date-util' import { getNowTime, getSecond } from '@/utils/date-util'
import { chartPieTableTopOptions, chartTableDefaultPageSize, chartTableTopOptions } from '@/utils/constants'
import { get } from '@/utils/http' import { get } from '@/utils/http'
import { ref } from 'vue' import { ref } from 'vue'
import _ from 'lodash' import _ from 'lodash'
@@ -208,16 +207,16 @@ export default {
data: { data: {
result: [ result: [
{ {
"dnsServerRole":"TLDNS", dnsServerRole: 'TLDNS',
"ipLocationCountry":"China", ipLocationCountry: 'China',
"ipLocationId":"CN", ipLocationId: 'CN',
"count":161 count: 161
}, },
{ {
"dnsServerRole":"RTDNS", dnsServerRole: 'RTDNS',
"ipLocationCountry":"Japan", ipLocationCountry: 'Japan',
"ipLocationId":"JP", ipLocationId: 'JP',
"count":222 count: 222
} }
] ]
} }

View File

@@ -1016,6 +1016,11 @@ export default {
this.listData = data this.listData = data
}).catch(error => { }).catch(error => {
})
getData(api.detection[this.pageType].listCount, params).then(data => {
this.pageObj.total = data
}).catch(error => {
}) })
}, },
timeRefreshChange () { timeRefreshChange () {

View File

@@ -257,8 +257,7 @@ export default {
const queryParams = { const queryParams = {
startTime: parseInt(this.timeFilter.startTime / 1000), startTime: parseInt(this.timeFilter.startTime / 1000),
endTime: parseInt(this.timeFilter.endTime / 1000), endTime: parseInt(this.timeFilter.endTime / 1000),
ip: this.entityData.ipAddr, ip: this.entityData.ipAddr
country: this.entityData.ipLocationCountry
} }
return queryParams return queryParams
}, },