CN-240 feat: 实体列表、详情细节完善
This commit is contained in:
@@ -50,6 +50,7 @@
|
|||||||
display: flex;
|
display: flex;
|
||||||
overflow: hidden auto;
|
overflow: hidden auto;
|
||||||
height: calc(100% - 120px);
|
height: calc(100% - 120px);
|
||||||
|
position: relative;
|
||||||
}
|
}
|
||||||
.explorer-foot {
|
.explorer-foot {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
.entity-list {
|
.entity-list {
|
||||||
width: calc(100% - 290px);
|
width: calc(100% - 290px);
|
||||||
|
height: calc(100% - 42px);
|
||||||
flex: 1;
|
flex: 1;
|
||||||
position: relative;
|
position: relative;
|
||||||
|
|
||||||
@@ -21,8 +22,8 @@
|
|||||||
.entity-list--list {
|
.entity-list--list {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
height: calc(100% - 40px);
|
height: 100%;
|
||||||
overflow: inherit;
|
overflow: auto;
|
||||||
|
|
||||||
.cn-entity__shadow {
|
.cn-entity__shadow {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
|
|||||||
@@ -19,7 +19,8 @@
|
|||||||
@search="search"
|
@search="search"
|
||||||
></explorer-search>
|
></explorer-search>
|
||||||
<!-- 内容区 -->
|
<!-- 内容区 -->
|
||||||
<div class="explorer-container" v-if="showList" style="height: calc(100% - 120px);">
|
<div class="explorer-container" v-if="showList" style="height: calc(100% - 20px); flex-direction: column">
|
||||||
|
<div style="display: flex; height: 100%;">
|
||||||
<entity-filter
|
<entity-filter
|
||||||
:filter-data="filterData"
|
:filter-data="filterData"
|
||||||
:search-params="searchParams"
|
:search-params="searchParams"
|
||||||
@@ -36,6 +37,19 @@
|
|||||||
:loading="listLoading"
|
:loading="listLoading"
|
||||||
></entity-list>
|
></entity-list>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="entity__pagination" style="position: absolute; bottom: 0; width: 100%;">
|
||||||
|
<pagination
|
||||||
|
ref="pagination"
|
||||||
|
:page-obj="pageObj"
|
||||||
|
@pageNo='pageNo'
|
||||||
|
@pageSize='pageSize'
|
||||||
|
@size-change="pageSize"
|
||||||
|
@prev-click="prev"
|
||||||
|
@next-click="next"
|
||||||
|
>
|
||||||
|
</pagination>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<div class="explorer-foot" v-else>
|
<div class="explorer-foot" v-else>
|
||||||
<div>
|
<div>
|
||||||
<el-divider direction="vertical"></el-divider>
|
<el-divider direction="vertical"></el-divider>
|
||||||
@@ -112,6 +126,7 @@ import { get } from '@/utils/http'
|
|||||||
import { api } from '@/utils/api'
|
import { api } from '@/utils/api'
|
||||||
import { getNowTime } from '@/utils/date-util'
|
import { getNowTime } from '@/utils/date-util'
|
||||||
import { ref } from 'vue'
|
import { ref } from 'vue'
|
||||||
|
import pagination from '@/components/common/Pagination'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'entity-explorer',
|
name: 'entity-explorer',
|
||||||
@@ -120,7 +135,8 @@ export default {
|
|||||||
DateTimeRange,
|
DateTimeRange,
|
||||||
TimeRefresh,
|
TimeRefresh,
|
||||||
EntityFilter,
|
EntityFilter,
|
||||||
EntityList
|
EntityList,
|
||||||
|
pagination: pagination
|
||||||
},
|
},
|
||||||
data () {
|
data () {
|
||||||
return {
|
return {
|
||||||
@@ -449,6 +465,25 @@ export default {
|
|||||||
this.pageObj.pageNo = val
|
this.pageObj.pageNo = val
|
||||||
this.search()
|
this.search()
|
||||||
},
|
},
|
||||||
|
// 点击上一页箭头
|
||||||
|
prev () {
|
||||||
|
this.scrollbarToTop()
|
||||||
|
},
|
||||||
|
// 点击下一页箭头
|
||||||
|
next () {
|
||||||
|
this.scrollbarToTop()
|
||||||
|
},
|
||||||
|
// currentPage 改变时会触发
|
||||||
|
current (val) {
|
||||||
|
this.$emit('pageNo', val)
|
||||||
|
this.scrollbarToTop()
|
||||||
|
},
|
||||||
|
scrollbarToTop () {
|
||||||
|
this.$nextTick(() => {
|
||||||
|
const wraps = document.querySelector('#entityList')
|
||||||
|
wraps.scrollTop = 0
|
||||||
|
})
|
||||||
|
},
|
||||||
/* filter组件内点击后查询 */
|
/* filter组件内点击后查询 */
|
||||||
filter (name, topData) {
|
filter (name, topData) {
|
||||||
const params = {}
|
const params = {}
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="entity-list">
|
<div class="entity-list" id="entityList">
|
||||||
<div class="entity__loading" v-show="loading">
|
<div class="entity__loading" v-show="loading">
|
||||||
<i class="el-icon-loading"></i>
|
<i class="el-icon-loading"></i>
|
||||||
</div>
|
</div>
|
||||||
@@ -34,9 +34,6 @@
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</div>
|
</div>
|
||||||
<div class="entity__pagination" >
|
|
||||||
<pagination ref="pagination" :table-id="tableId" :page-obj="pageObj" @pageNo='current' @pageSize='size'></pagination><!-- :table-id="entityList" -->
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -78,28 +75,6 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
size (val) {
|
|
||||||
this.$emit('pageSize', val)
|
|
||||||
},
|
|
||||||
// 点击上一页箭头
|
|
||||||
prev () {
|
|
||||||
this.scrollbarToTop()
|
|
||||||
},
|
|
||||||
// 点击下一页箭头
|
|
||||||
next () {
|
|
||||||
this.scrollbarToTop()
|
|
||||||
},
|
|
||||||
// currentPage 改变时会触发
|
|
||||||
current (val) {
|
|
||||||
this.$emit('pageNo', val)
|
|
||||||
this.scrollbarToTop()
|
|
||||||
},
|
|
||||||
scrollbarToTop () {
|
|
||||||
this.$nextTick(() => {
|
|
||||||
const wraps = document.querySelectorAll('.el-table__body-wrapper')
|
|
||||||
wraps.scrollTop = 0
|
|
||||||
})
|
|
||||||
},
|
|
||||||
entityDetail (params) {
|
entityDetail (params) {
|
||||||
this.$emit('showDetail', { ...params, icon: this.iconClass })
|
this.$emit('showDetail', { ...params, icon: this.iconClass })
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -156,6 +156,7 @@ export default {
|
|||||||
unitType: 'number',
|
unitType: 'number',
|
||||||
valueColumn: 'sessions'
|
valueColumn: 'sessions'
|
||||||
},
|
},
|
||||||
|
id: props.entity.ipAddr,
|
||||||
type: 2
|
type: 2
|
||||||
},
|
},
|
||||||
entityCopy,
|
entityCopy,
|
||||||
|
|||||||
Reference in New Issue
Block a user