NEZ-2329 fix:修复底部列表插件缺失 tableId参数

This commit is contained in:
zhangyu
2022-10-28 14:07:06 +08:00
parent 8c8e746156
commit 46ace12008
22 changed files with 36 additions and 8 deletions

View File

@@ -3,6 +3,7 @@
<nz-bottom-data-list <nz-bottom-data-list
:showTitle='showTitle' :showTitle='showTitle'
:obj='obj' :obj='obj'
:tableId="tableId"
:targetTab.sync="targetTab" :targetTab.sync="targetTab"
:api="url" :api="url"
style="height: 100%" style="height: 100%"

View File

@@ -3,6 +3,7 @@
<nz-bottom-data-list <nz-bottom-data-list
:showTitle='showTitle' :showTitle='showTitle'
:obj='obj' :obj='obj'
:tableId="tableId"
:api="url" :api="url"
:custom-table-title.sync="tools.customTableTitle" :custom-table-title.sync="tools.customTableTitle"
:layout="['searchInput', 'elementSet']" :layout="['searchInput', 'elementSet']"

View File

@@ -2,6 +2,7 @@
<nz-bottom-data-list <nz-bottom-data-list
:showTitle='showTitle' :showTitle='showTitle'
:obj='obj' :obj='obj'
:tableId="tableId"
:api="url" :api="url"
:custom-table-title.sync="tools.customTableTitle" :custom-table-title.sync="tools.customTableTitle"
:layout="['elementSet']" :layout="['elementSet']"

View File

@@ -3,6 +3,7 @@
<nz-bottom-data-list <nz-bottom-data-list
:showTitle='showTitle' :showTitle='showTitle'
:obj='obj' :obj='obj'
:tableId="tableId"
:api="url" :api="url"
:targetTab="targetTab" :targetTab="targetTab"
style="height: 100%" style="height: 100%"

View File

@@ -9,6 +9,7 @@
:custom-table-title.sync="tools.customTableTitle" :custom-table-title.sync="tools.customTableTitle"
:layout="['searchInput', 'elementSet']" :layout="['searchInput', 'elementSet']"
:search-msg="searchMsg" :search-msg="searchMsg"
:tableId="tableId"
:tabs="tabs" :tabs="tabs"
@search="search" @search="search"
@changeTab="changeTab" @changeTab="changeTab"

View File

@@ -4,6 +4,7 @@
:showTitle='showTitle' :showTitle='showTitle'
:obj='obj' :obj='obj'
:api="url" :api="url"
:tableId="tableId"
:targetTab="targetTab" :targetTab="targetTab"
style="height: 100%" style="height: 100%"
:custom-table-title.sync="tools.customTableTitle" :custom-table-title.sync="tools.customTableTitle"

View File

@@ -2,6 +2,7 @@
<nz-bottom-data-list <nz-bottom-data-list
:showTitle='showTitle' :showTitle='showTitle'
:obj='obj' :obj='obj'
:tableId="tableId"
id="commentBottomTab" id="commentBottomTab"
:api="url" :api="url"
:custom-table-title.sync="tools.customTableTitle" :custom-table-title.sync="tools.customTableTitle"

View File

@@ -4,6 +4,7 @@
:showTitle='showTitle' :showTitle='showTitle'
:obj='obj' :obj='obj'
:api="url" :api="url"
:tableId="tableId"
:layout="['searchInput', 'elementSet']" :layout="['searchInput', 'elementSet']"
:search-msg="searchMsg" :search-msg="searchMsg"
:tabs="tabs" :tabs="tabs"

View File

@@ -4,6 +4,7 @@
:showTitle='showTitle' :showTitle='showTitle'
:obj='obj' :obj='obj'
:api="url" :api="url"
:tableId="tableId"
:custom-table-title.sync="tools.customTableTitle" :custom-table-title.sync="tools.customTableTitle"
:layout="['searchInput', 'elementSet']" :layout="['searchInput', 'elementSet']"
:search-msg="searchMsg" :search-msg="searchMsg"

View File

@@ -3,6 +3,7 @@
:showTitle='showTitle' :showTitle='showTitle'
:obj='obj' :obj='obj'
id="logBottomTab" id="logBottomTab"
:tableId="tableId"
:custom-tool="true" :custom-tool="true"
:layout="[]" :layout="[]"
:show-pagination="false" :show-pagination="false"
@@ -61,6 +62,7 @@ export default {
}, },
data () { data () {
return { return {
tableId: 'logBottomTab',
logData: null, logData: null,
filterTime: [ filterTime: [
bus.timeFormate(bus.getOffsetTimezoneData(-1)), bus.timeFormate(bus.getOffsetTimezoneData(-1)),

View File

@@ -2,6 +2,7 @@
<nz-bottom-data-list <nz-bottom-data-list
:showTitle='showTitle' :showTitle='showTitle'
:obj='obj' :obj='obj'
:tableId="tableId"
id="networkBottomTab" id="networkBottomTab"
:api="url" :api="url"
:custom-table-title.sync="tools.customTableTitle" :custom-table-title.sync="tools.customTableTitle"

View File

@@ -3,6 +3,7 @@
:showTitle='showTitle' :showTitle='showTitle'
:obj='obj' :obj='obj'
:api="url" :api="url"
:tableId="tableId"
:custom-table-title.sync="tools.customTableTitle" :custom-table-title.sync="tools.customTableTitle"
:layout="['searchInput', 'elementSet']" :layout="['searchInput', 'elementSet']"
:search-msg="searchMsg" :search-msg="searchMsg"

View File

@@ -3,6 +3,7 @@
<nz-bottom-data-list <nz-bottom-data-list
:showTitle='showTitle' :showTitle='showTitle'
:obj='obj' :obj='obj'
:tableId="tableId"
:layout="[]" :layout="[]"
:tabs="tabs" :tabs="tabs"
:targetTab="targetTab" :targetTab="targetTab"
@@ -188,6 +189,7 @@ export default {
data () { data () {
return { return {
fromRoute, fromRoute,
tableId: 'panelTabNew',
pdfId: 'pdfDom', pdfId: 'pdfDom',
htmlTitle: 'panel', htmlTitle: 'panel',
panelTabLoading: false, panelTabLoading: false,

View File

@@ -2,6 +2,7 @@
<nz-bottom-data-list <nz-bottom-data-list
:showTitle='showTitle' :showTitle='showTitle'
:obj='obj' :obj='obj'
:tableId="tableId"
id="processBottomTab" id="processBottomTab"
:api="url" :api="url"
:custom-table-title.sync="tools.customTableTitle" :custom-table-title.sync="tools.customTableTitle"

View File

@@ -2,6 +2,7 @@
<nz-bottom-data-list <nz-bottom-data-list
:showTitle='showTitle' :showTitle='showTitle'
:obj='obj' :obj='obj'
:tableId="tableId"
:api="url" :api="url"
:custom-table-title.sync="tools.customTableTitle" :custom-table-title.sync="tools.customTableTitle"
:layout="['elementSet']" :layout="['elementSet']"

View File

@@ -3,6 +3,7 @@
<nz-bottom-data-list <nz-bottom-data-list
:showTitle='showTitle' :showTitle='showTitle'
:obj='obj' :obj='obj'
:tableId="tableId"
:targetTab.sync="targetTab" :targetTab.sync="targetTab"
:api="url" :api="url"
style="height: 100%" style="height: 100%"

View File

@@ -1,6 +1,7 @@
<template> <template>
<nz-bottom-data-list <nz-bottom-data-list
:showTitle='showTitle' :showTitle='showTitle'
:tableId="tableId"
:obj='obj' :obj='obj'
:layout="[]" :layout="[]"
:tabs="tabs" :tabs="tabs"
@@ -91,7 +92,8 @@ export default {
}, },
records: [ // 加载更多时有多个record否则只有一个 records: [ // 加载更多时有多个record否则只有一个
] ],
tableId: 'terminaLogCMDTab'
} }
}, },
methods: { methods: {

View File

@@ -6,6 +6,7 @@
:tabs="tabs" :tabs="tabs"
:targetTab="targetTab" :targetTab="targetTab"
@changeTab="changeTab" @changeTab="changeTab"
:tableId="tableId"
:title="'Session ID'" :title="'Session ID'"
> >
<template v-slot:title><span :title="obj.uuid.substring(0, 8).toUpperCase()">{{obj.uuid.substring(0, 8).toUpperCase()}}</span></template> <template v-slot:title><span :title="obj.uuid.substring(0, 8).toUpperCase()">{{obj.uuid.substring(0, 8).toUpperCase()}}</span></template>
@@ -36,6 +37,7 @@ export default {
}, },
data () { data () {
return { return {
tableId: 'terminaLogMonitorTab',
filter: { filter: {
size: 1, size: 1,
uuid: '' uuid: ''

View File

@@ -2,6 +2,7 @@
<nz-bottom-data-list <nz-bottom-data-list
:showTitle='showTitle' :showTitle='showTitle'
:obj='obj' :obj='obj'
:tableId="tableId"
:layout="[]" :layout="[]"
:tabs="tabs" :tabs="tabs"
:targetTab="targetTab" :targetTab="targetTab"
@@ -49,6 +50,7 @@ export default {
}, },
data () { data () {
return { return {
tableId: 'terminaLogRecordTab',
filter: { filter: {
size: 1, size: 1,
uuid: '' uuid: ''

View File

@@ -4,6 +4,7 @@
:obj='obj' :obj='obj'
:targetTab="targetTab" :targetTab="targetTab"
:api="url" :api="url"
:tableId="tableId"
:custom-table-title.sync="tools.customTableTitle" :custom-table-title.sync="tools.customTableTitle"
:layout="['searchInput', 'elementSet']" :layout="['searchInput', 'elementSet']"
:search-msg="searchMsg" :search-msg="searchMsg"

View File

@@ -2,6 +2,7 @@
<nz-bottom-data-list <nz-bottom-data-list
:showTitle='showTitle' :showTitle='showTitle'
:obj='obj' :obj='obj'
:tableId="tableId"
id="vsysBottomTab" id="vsysBottomTab"
:api="url" :api="url"
:custom-table-title.sync="tools.customTableTitle" :custom-table-title.sync="tools.customTableTitle"

View File

@@ -1314,10 +1314,12 @@ export default {
if (pageSize && pageSize !== 'undefined') { if (pageSize && pageSize !== 'undefined') {
this.pageObj.pageSize = pageSize this.pageObj.pageSize = pageSize
} }
if (!this.$refs.dataTable && !this.$refs.dataDetail) { let tableTitle = ''
return if (this.$refs.dataTable) {
tableTitle = this.$refs.dataTable.tableTitle
} else if (this.$refs.dataDetail) {
tableTitle = this.$refs.dataDetail.tableTitle
} }
const tableTitle = this.$refs.dataTable ? this.$refs.dataTable.tableTitle : this.$refs.dataDetail.tableTitle
let localStorageTableTitle = localStorage.getItem('nz-tableTitle-' + localStorage.getItem('nz-username') + '-' + this.tableId) let localStorageTableTitle = localStorage.getItem('nz-tableTitle-' + localStorage.getItem('nz-username') + '-' + this.tableId)
localStorageTableTitle = localStorageTableTitle ? JSON.parse(localStorageTableTitle) : tableTitle localStorageTableTitle = localStorageTableTitle ? JSON.parse(localStorageTableTitle) : tableTitle
this.tools.customTableTitle = tableTitle.map((item, index) => { // 修复切换中英文的问题 this.tools.customTableTitle = tableTitle.map((item, index) => { // 修复切换中英文的问题