CN-182 fix: 修复IP详情页活跃APP列表无数据的问题

This commit is contained in:
chenjinsong
2021-09-28 14:34:06 +08:00
parent 050e663c81
commit 238e303dc5
3 changed files with 5 additions and 3 deletions

View File

@@ -4,7 +4,6 @@
</div>
</template>
<script>
import { get } from '@/utils/http'
export default {
name: 'App',

View File

@@ -12,6 +12,10 @@ export const tableTitleMapping = {
label: 'APP ID',
prop: 'appId'
},
app: {
label: 'APP',
prop: 'app'
},
sessions: {
label: i18n.global.t('overall.sessions'),
prop: 'sessions'

View File

@@ -949,7 +949,7 @@ export default {
if (data.length > 0) {
const dataColumns = Object.keys(data[0]) // 返回数据的字段
const columns = dataColumns.map(c => tableTitleMapping[c]) // 展示字段
const keys = ['clientIp', 'serverIp', 'appId', 'domain']
const keys = ['clientIp', 'serverIp', 'appId', 'app', 'domain']
return columns.sort((a, b) => {
if (keys.indexOf(a.prop) > -1) {
return -1
@@ -1467,7 +1467,6 @@ export default {
}
this.table.tableData = response.data.result
this.table.tableColumns = this.getTableTitle(response.data.result)
console.info(this.table.tableColumns)
this.table.currentPageData = this.getTargetPageData(1, this.table.pageSize, this.table.tableData)
} else {
this.isError = true