CN-167 fix: 修复APP活跃列表无数据的问题
This commit is contained in:
@@ -8,9 +8,9 @@ export const tableTitleMapping = {
|
|||||||
label: i18n.global.t('overall.serverIp'),
|
label: i18n.global.t('overall.serverIp'),
|
||||||
prop: 'serverIp'
|
prop: 'serverIp'
|
||||||
},
|
},
|
||||||
appName: {
|
appId: {
|
||||||
label: i18n.global.t('overall.appName'),
|
label: 'APP ID',
|
||||||
prop: 'appName'
|
prop: 'appId'
|
||||||
},
|
},
|
||||||
sessions: {
|
sessions: {
|
||||||
label: i18n.global.t('overall.sessions'),
|
label: i18n.global.t('overall.sessions'),
|
||||||
|
|||||||
@@ -949,7 +949,7 @@ export default {
|
|||||||
if (data.length > 0) {
|
if (data.length > 0) {
|
||||||
const dataColumns = Object.keys(data[0]) // 返回数据的字段
|
const dataColumns = Object.keys(data[0]) // 返回数据的字段
|
||||||
const columns = dataColumns.map(c => tableTitleMapping[c]) // 展示字段
|
const columns = dataColumns.map(c => tableTitleMapping[c]) // 展示字段
|
||||||
const keys = ['clientIp', 'serverIp', 'appName', 'domain']
|
const keys = ['clientIp', 'serverIp', 'appId', 'domain']
|
||||||
return columns.sort((a, b) => {
|
return columns.sort((a, b) => {
|
||||||
if (keys.indexOf(a.prop) > -1) {
|
if (keys.indexOf(a.prop) > -1) {
|
||||||
return -1
|
return -1
|
||||||
@@ -1467,6 +1467,7 @@ export default {
|
|||||||
}
|
}
|
||||||
this.table.tableData = response.data.result
|
this.table.tableData = response.data.result
|
||||||
this.table.tableColumns = this.getTableTitle(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)
|
this.table.currentPageData = this.getTargetPageData(1, this.table.pageSize, this.table.tableData)
|
||||||
} else {
|
} else {
|
||||||
this.isError = true
|
this.isError = true
|
||||||
|
|||||||
Reference in New Issue
Block a user