Merge branch 'dev-3.8' of https://git.mesalab.cn/nezha/nezha-fronted into dev-3.9

This commit is contained in:
zhangyu
2023-08-21 14:19:27 +08:00
8 changed files with 88 additions and 45 deletions

View File

@@ -229,6 +229,14 @@
color: #F0BF84;
}
}
.dashboard-tab-temp {
.el-tabs__item{
width: 175px !important;
}
.el-tabs__active-bar {
width: 175px !important;
}
}
.nz-dashboard-dropdown {
z-index: 3001 !important;
}

View File

@@ -19,7 +19,7 @@
<div class="sub-list-title" v-if="showTitle">{{bottomHeaderTitle}}<slot name="title"></slot></div>
<div class="sub-list-tabs">
<!-- <div v-for="tab in tabs" :key="tab.prop" :class="{'sub-list-tab&#45;&#45;active': tab.active || tab.prop == targetTab }" :title='tab.name' class="sub-list-tab" @click="changeTab(tab.prop)">{{tab.name}}</div>-->
<el-tabs v-model="activeTargetTab" @tab-click="changeTab" class="sub-list-tabs-nz-tabs">
<el-tabs v-model="activeTargetTab" @tab-click="changeTab" class="sub-list-tabs-nz-tabs" :class="customClassName">
<el-tab-pane v-for="tab in tabs" :label="tab.name" :name="tab.prop" :key="tab.prop" class="sub-list-tab"></el-tab-pane>
</el-tabs>
</div>
@@ -62,6 +62,10 @@ export default {
type: String,
default: ''
},
customClassName: {
type: String,
default: ''
},
tableTitle: {
type: Array
},
@@ -106,7 +110,7 @@ export default {
},
computed: {
bottomHeaderTitle () {
return this.title || (this.$t('overall.name') + ':')
return this.title || (this.$t('overall.name'))
},
subContentClass () {
const className = []

View File

@@ -9,6 +9,7 @@
:targetTab="targetTab"
@changeTab="changeTab"
class="full-width-height"
:customClassName="'dashboard-tab-temp'"
:showPagination="false"
>
<template v-slot:title><span :title="obj.name">{{obj.name}}</span></template>

View File

@@ -73,34 +73,38 @@ export default {
zheze_none: true,
searchLabelList: [
{
id: 11,
name: this.$t('config.terminallog.loginHost'),
id: 15,
name: this.$t('config.terminallog.SessionID'),
type: 'input',
label: 'host',
label: 'uuid',
disabled: false
}, {
id: 12,
name: this.$t('config.terminallog.loginUser'),
type: 'input',
label: 'loginUser',
disabled: false
}, {
id: 13,
name: this.$t('ping.sourceIp'),
type: 'input',
label: 'remoteAddr',
disabled: false
}, {
},
{
id: 14,
name: this.$t('config.terminallog.sourceUser'),
type: 'input',
label: 'username',
disabled: false
}, {
id: 15,
name: this.$t('config.terminallog.uuid'),
},
{
id: 13,
name: this.$t('ping.sourceIp'),
type: 'input',
label: 'uuid',
label: 'remoteAddr',
disabled: false
},
{
id: 12,
name: this.$t('config.terminallog.loginUser'),
type: 'input',
label: 'loginUser',
disabled: false
},
{
id: 11,
name: this.$t('config.terminallog.loginHost'),
type: 'input',
label: 'host',
disabled: false
}, {
id: 16,

View File

@@ -906,6 +906,8 @@ export default {
obj.q = ''
this.oldSearchStr = ''
}
this.visible = false
this.$refs.searchStr.blur()
this.$emit('search', obj)
})
}, 100),

View File

@@ -1120,7 +1120,14 @@ export default {
if (findItem) {
item.name = findItem.name
if (item.valString) { // 判断 有valString 显示对应国际化内容 以防中英文出现问题
item.valString = this.selectInfoList[item.type].find(selectInfo => selectInfo.value == item.val).label
let arr = []
if (this.selectInfoList[item.type]) {
arr = this.selectInfoList[item.type]
} else if (this.selectInfoList[item.label]) {
arr = this.selectInfoList[item.label]
}
const find = arr.find(selectInfo => selectInfo.value == item.val)
item.valString = find ? find.label : ''
}
}
})

View File

@@ -153,8 +153,9 @@ export default {
prop: 'uuid',
minWidth: 200,
show: true
}, {
label: this.$t('config.operationlog.username'),
},
{
label: this.$t('config.terminallog.sourceUser'),
prop: 'username',
minWidth: 200,
show: true
@@ -166,6 +167,18 @@ export default {
show: true,
sortable: 'custom'
},
{
label: this.$t('config.terminallog.loginUser'),
prop: 'loginUser',
minWidth: 200,
show: true
},
{
label: this.$t('config.terminallog.loginHost'),
prop: 'host',
minWidth: 200,
show: true
},
{
label: this.$t('config.terminallog.remote'),
prop: 'remote',

View File

@@ -119,34 +119,38 @@ export default {
searchMsg: { // 给搜索框子组件传递的信息
searchLabelList: [
{
id: 11,
name: this.$t('config.terminallog.loginHost'),
id: 15,
name: this.$t('config.terminallog.SessionID'),
type: 'input',
label: 'host',
label: 'uuid',
disabled: false
}, {
id: 12,
name: this.$t('config.terminallog.loginUser'),
type: 'input',
label: 'loginUser',
disabled: false
}, {
id: 13,
name: this.$t('ping.sourceIp'),
type: 'input',
label: 'remoteAddr',
disabled: false
}, {
},
{
id: 14,
name: this.$t('config.terminallog.sourceUser'),
type: 'input',
label: 'username',
disabled: false
}, {
id: 15,
name: this.$t('config.terminallog.uuid'),
},
{
id: 13,
name: this.$t('ping.sourceIp'),
type: 'input',
label: 'uuid',
label: 'remoteAddr',
disabled: false
},
{
id: 12,
name: this.$t('config.terminallog.loginUser'),
type: 'input',
label: 'loginUser',
disabled: false
},
{
id: 11,
name: this.$t('config.terminallog.loginHost'),
type: 'input',
label: 'host',
disabled: false
}, {
id: 16,