fix:修改 terminalLog 表格的下滑框的相关问题

This commit is contained in:
zhangyu
2021-05-12 19:36:51 +08:00
parent cd505a0d05
commit 55920adeb5
9 changed files with 40 additions and 24 deletions

View File

@@ -2,7 +2,7 @@
<div>
<div class="top-tools top-tools--sub">
<div class="top-tool-left">
<div class="sub-list-title">Name<slot name="title"></slot></div>
<div class="sub-list-title">{{title}}<slot name="title"></slot></div>
<div class="sub-list-tabs">
<div v-for="tab in tabs" :key="tab.prop" :class="{'sub-list-tab--active': tab.active || tab.prop=== targetTab}" class="sub-list-tab" @click="changeTab(tab.prop)">{{tab.name}}</div>
</div>
@@ -80,6 +80,10 @@ export default {
showPagination: {
type: Boolean,
default: true
},
title: {
type: String,
default: 'Name'
}
},
data () {

View File

@@ -3,8 +3,9 @@
:layout="[]"
:tabs="tabs"
@changeTab="changeTab"
:title="'Session ID'"
>
<template v-slot:title><span :title="obj.name">{{obj.name}}</span></template>
<template v-slot:title><span :title="obj.uuid.substring(0, 8).toUpperCase()">{{obj.uuid.substring(0, 8).toUpperCase()}}</span></template>
<template v-slot>
<div class="record-container">
<div class="record-container--record-tip">

View File

@@ -3,16 +3,17 @@
:layout="[]"
:tabs="tabs"
@changeTab="changeTab"
:title="'Session ID'"
>
<template v-slot:title><span :title="obj.name">{{obj.name}}</span></template>
<template v-slot:title><span :title="obj.uuid.substring(0, 8).toUpperCase()">{{obj.uuid.substring(0, 8).toUpperCase()}}</span></template>
<template v-slot>
<div ref="replayTab" class="replay-tab">
<div class="sub-top-tools">
<div class="sub-list-tabs">
<div class="sub-list-tab-title">ID{{obj.id}}</div>
<div class="sub-list-tab sub-list-tab-active">{{$t("config.terminallog.monitor.monitor")}}</div>
</div>
</div>
<!-- <div class="sub-top-tools">-->
<!-- <div class="sub-list-tabs">-->
<!-- <div class="sub-list-tab-title">ID{{obj.id}}</div>-->
<!-- <div class="sub-list-tab sub-list-tab-active">{{$t("config.terminallog.monitor.monitor")}}</div>-->
<!-- </div>-->
<!-- </div>-->
<div class="replay-container">
<div ref="recordConsole" class="record-console">
<div :id="obj.uuid" class="record-terminal"></div>
@@ -112,12 +113,11 @@ export default {
}
// 登录后,你输入的内容从后台服务返回
this.terminal.on('data', function (data) {
/*
let code = data.charCodeAt(0);
if(code==13){
}else {
//that.term.write(data);
} */
// let code = data.charCodeAt(0);
// if(code==13){
// }else {
// that.term.write(data);
// }
})
// 返回
this.terminalSocket.onmessage = function (evt) {
@@ -301,13 +301,13 @@ export default {
}
.replay-container {
height: calc(100% - 40px);
height: 100%;
}
.record-console {
padding: 10px 4px 10px 10px;
background-color: black;
height: calc(100% - 80px);
height: 100%;
}
.terminal-replay-progress {

View File

@@ -3,8 +3,9 @@
:layout="[]"
:tabs="tabs"
@changeTab="changeTab"
:title="'Session ID'"
>
<template v-slot:title><span :title="obj.name">{{obj.name}}</span></template>
<template v-slot:title><span :title="obj.uuid.substring(0, 8).toUpperCase()">{{obj.uuid.substring(0, 8).toUpperCase()}}</span></template>
<template v-slot>
<div class="replay-container">
<div class="replay-operate">

View File

@@ -34,8 +34,9 @@ export default {
this.$emit('del', row)
break
}
case 'record': {
this.$emit('showBottomBox', 'record', row)
case 'recordTab': {
console.log(command, row)
this.$emit('showBottomBox', 'recordTab', row)
break
}
case 'cli': {
@@ -50,6 +51,11 @@ export default {
this.$emit('copy', row)
break
}
case 'shutdown': {
// this.$emit('copy', row)
this.$emit('shutdown', row)
break
}
default:
break
}

View File

@@ -2,7 +2,7 @@
<div v-clickoutside="{obj:editPanel,func:clickOutside}" class="right-box right-box-panel">
<!-- begin--标题-->
<div class="right-box__header">
<div class="header__title">{{editPanel.id ? ($t("config.dc.editPanel")) : $t("config.dc.createDc")}}</div>
<div class="header__title">{{editPanel.id ? ($t("config.dc.editPanel")) : $t("config.dc.createPanel")}}</div>
<div class="header__operation">
<span v-cancel="{obj: editPanel, func: esc}"><i class="nz-icon nz-icon-close"></i></span>
</div>

View File

@@ -131,7 +131,7 @@ export default {
bottomBoxWindow.listResize(vm, e)
},
showBottomBox (targetTab, row) {
// console.log(targetTab, row)
console.log(targetTab, row)
this.bottomBox.targetTab = targetTab
this.bottomBox.object = JSON.parse(JSON.stringify(row))
this.bottomBox.showSubList = true

View File

@@ -69,7 +69,7 @@
<div slot="header" class="table-operation-title">{{$t('overall.option')}}</div>
<div slot-scope="scope" class="table-operation-items">
<template v-if="scope.row.status == 0">
<button :title="$t('config.terminallog.monitor.monitor')" class="table-operation-item" @click="$refs.dataList.showBottomBox('monitorTab', scope.row)"><i class="nz-icon nz-icon-JC"></i></button>
<button :title="$t('config.terminallog.monitor.monitor')" class="table-operation-item" @click="showBottomBox('monitorTab', scope.row)"><i class="nz-icon nz-icon-JC"></i></button>
<el-dropdown size="medium" trigger="hover" @command="tableOperation">
<div class="table-operation-item table-operation-item--more">
<span></span><i class="nz-icon nz-icon-arrow-down"></i>
@@ -102,6 +102,9 @@ import table from '@/components/common/mixin/table'
export default {
name: 'roleTable',
mixins: [table],
props: {
nowTime: {}
},
data () {
return {
tableTitle: [

View File

@@ -21,6 +21,7 @@
@edit="edit"
@orderBy="tableDataSort"
@reload="getTableData"
@shutdown="shutdown"
@selectionChange="selectionChange"
@showBottomBox="(targetTab, object) => { $refs.dataList.showBottomBox(targetTab, object) }"></terminal-log-table>
</template>
@@ -129,7 +130,7 @@ export default {
this.$put('/terminal/kill', { uuid: record.uuid }).then(res => {
if (res.code === 200) {
this.$message.success(this.$t('config.terminallog.success'))
this.bottomBox.showSubList = false
this.$refs.dataList.bottomBox.showSubList = false
this.getTableData()
} else {
this.$message.error(this.$t('config.terminallog.killErrorTip'))