CN-627 Dashboard - network overview - 表格组件开发:细节调整(字体,颜色,间距等)

This commit is contained in:
hyx
2022-07-14 17:46:06 +08:00
parent 381a4e1a66
commit 525c44bdd3
3 changed files with 83 additions and 53 deletions

View File

@@ -1,16 +1,16 @@
.tabs {
$blue:#046ECA;
$grey:#353636;
height:100%;
font-size:12px;
.cn-chart__tabs {
height:100%;
background-color:white;
.tab-pane {
height:100%;
border: 1px solid #e4e7ed;
border: 1px solid #E2E5EC;;
padding:1px;
border-radius: 5px;
border-radius: 4px;
.tab-table {
color:#484949;
font-size:12px;
border:0px;
}
.data-total{
@@ -18,93 +18,114 @@
}
.data-total-trend {
display: flex;
margin-left: 10px;
margin-left: 6px;
align-items: center;
justify-content: center;
margin-top: 2px;
border-radius: 10px;
font-weight:500;
}
.data-total-trend-black {
background-color: #ededed;
border-radius: 18px;
background-color: rgba(113,113,113,0.12);
color: #717171;
width: 36px;
height: 18px;
height: 20px;
}
.data-total-trend-green {
background-color: #eef2e8;
border-radius: 25px;
width: 50px;
height: 18px;
color:#94b072;
background-color: rgba(126,159,84,0.12);
width: 52px;
height: 20px;
color:#7E9F54;
}
.data-total-trend-red {
background-color: #fbebe9;
border-radius: 25px;
width: 50px;
height: 18px;
color:#e97367;
background-color: rgba(226,97,84,0.12);
width: 52px;
height: 20px;
color:#E26154;
.cn-icon-rise1{
color: #E44D3E;
}
}
.el-table--group::after,.el-table--border::after, .el-table::before {
height: 0px;
}
.el-table thead {
color: $grey;
}
}
.el-tabs__header {
margin-bottom: 3px;
width: calc(100% - 272px);
}
.el-tabs__nav-wrap::after {
height: 1px;
background-color: white ;
}
&>.el-tabs__header {
margin-bottom: 10px;
}
.el-tabs__nav.is-top {
margin-left:8px;
.el-tabs__active-bar {
display: none;
}
.el-tabs__item {
padding: 0 8px;
font-size:12px;
font-weight: bold;
color:#838383;
margin: 0 20px 0 0;
padding:0px;
font-weight: 400;
color:$grey;
font-size:14px;
}
.el-tabs__item.is-top.is-active {
border-bottom: 2px solid #0091ff;
color:#0091ff;
height: 35px;
border-bottom: 2px solid $blue;
color:$blue;
height: 33px;
margin:0 20px 0 0;
padding:0px;
font-weight:400;
}
}
&>.el-tabs__content {
.el-tabs__content {
height: calc(100% - 40px);
border:none;
}
}
.tab-search {
position:absolute;
right:20px;
height:40px;
top:0px;
display:flex;
font-size:12px;
align-items: center;
right:0px;
.search-select {
margin-right:10px;
color:#575757;
margin-right:20px;
span {
margin-right:3px;
}
.option__select.select-column {
margin-left:3px;
box-shadow: 0 2px 4px 0 rgba(51,51,51,0.10);
border-radius: 2px;
.el-input__inner {
width: 86px;
width: 80px;
height:24px;
padding-left: 8px;
color:#2C72C6;
color:$blue;
font-weight:400;
}
}
.option-popper {
.el-select-dropdown__item {
height: 24px;
line-height: 24px;
font-size: 12px;
.el-select-dropdown__item.selected {
span{
color: $blue !important;
}
}
}
}
.search-customize-tab {
color:#69a7de;
color:$blue;
.icon-gear{
color:#2C72C6;
width:12px;
height:12px;
}
}
}
}

View File

@@ -154,7 +154,7 @@ export const listScrollPath = [
'/detection/securityEvent'
]
export const networkOverviewTable = [
export const networkOverviewTabs = [
'network.categories',
'network.providers',
'network.countries',

View File

@@ -4,7 +4,7 @@
class="cn-chart__tabs"
@tab-click="handleClick"
>
<el-tab-pane v-for="(tab,index) in networkOverviewTable"
<el-tab-pane v-for="(tab,index) in networkOverviewTabs"
:label="$t(tab)"
:name="tab"
:key="index"
@@ -54,11 +54,12 @@
</el-tabs>
<div class="tab-search" >
<div class="search-select" >
<span class="margin-r-10">{{$t('network.metric')}}:</span>
<span>{{$t('network.metric')}}:</span>
<el-select v-model="metric"
class="option__select select-column"
placeholder=""
popper-class="option-popper"
:popper-append-to-body="false"
size="mini">
<el-option
v-for="item in options"
@@ -69,7 +70,7 @@
</el-select>
</div>
<div class="search-customize-tab">
<i class="cn-icon-gear cn-icon"></i> {{$t('network.customizeTabs')}}
<i class="cn-icon-gear cn-icon icon-gear"></i> {{$t('network.customizeTabs')}}
</div>
</div>
@@ -79,10 +80,10 @@
<script>
import _ from 'lodash'
import { ref } from 'vue'
import { networkOverviewTable } from '@/utils/constants'
import { networkOverviewTabs } from '@/utils/constants'
export default {
name: 'NetworkOverviewTable',
name: 'NetworkOverviewTabs',
data () {
return {
metric: '',
@@ -90,6 +91,14 @@ export default {
{
value: 'Bits',
label: 'Bits'
},
{
value: 'Bits2',
label: 'Bits2'
},
{
value: 'Bits3',
label: 'Bits3'
}
],
tableData: [
@@ -221,21 +230,21 @@ export default {
// this.activeTab = tab.paneName
},
tableCellStyle ({ row, column, rowIndex, columnIndex }) {
let style = 'border-right:0px;padding:7px 0 !important;'
let style = 'border-right:0px;font-size:12px;padding:7px 0 !important;border-bottom: 1px solid #ECECEC;'
if (rowIndex === this.tableData.length - 1) {
style = style + 'border-bottom:0px !important;'
}
if (columnIndex === 0) {
style = style + 'color:#69a7de;'
style = style + 'color:#046ECA;'
}
return style
},
tableHeaderCellStyle ({ row, column, rowIndex, columnIndex }) {
return 'border-right:0px;font-size:12px;color:#656565;padding:7px 0 !important;'
return 'border-right:0px;font-size:12px;font-weight:500;padding:4px 0 !important;border-bottom: 1px solid #E2E5EC;'
}
},
setup (props) {
let activeTab = ref(networkOverviewTable[0])
let activeTab = ref(networkOverviewTabs[0])
if (props.chartInfo) {
if (!_.isEmpty(props.chartInfo.children)) {
activeTab = `${props.chartInfo.children[0].id}`
@@ -245,7 +254,7 @@ export default {
return {
activeTab,
networkOverviewTable
networkOverviewTabs
// dataList
}