CN-182 fix: 修复IP详情页活跃APP列表无数据的问题
This commit is contained in:
@@ -4,7 +4,6 @@
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import { get } from '@/utils/http'
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'App',
|
name: 'App',
|
||||||
|
|||||||
@@ -12,6 +12,10 @@ export const tableTitleMapping = {
|
|||||||
label: 'APP ID',
|
label: 'APP ID',
|
||||||
prop: 'appId'
|
prop: 'appId'
|
||||||
},
|
},
|
||||||
|
app: {
|
||||||
|
label: 'APP',
|
||||||
|
prop: 'app'
|
||||||
|
},
|
||||||
sessions: {
|
sessions: {
|
||||||
label: i18n.global.t('overall.sessions'),
|
label: i18n.global.t('overall.sessions'),
|
||||||
prop: 'sessions'
|
prop: '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', 'appId', 'domain']
|
const keys = ['clientIp', 'serverIp', 'appId', 'app', '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,7 +1467,6 @@ 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