CN-733 完成链路页面下钻后的表格
This commit is contained in:
@@ -238,6 +238,13 @@ export const npmSearchUrl = {
|
||||
drilldownCycleUrl: '/interface/application/performance/overview/drilldown/dimensionCycleTrafficAnalysis',
|
||||
drilldownList: '/interface/overview/drilldown/list'
|
||||
}
|
||||
export const linkMonitorUrl = {
|
||||
curUrl: '/interface/link/overview/drilldown/dimension/analysis',
|
||||
cycleUrl: '/interface/link/overview/drilldown/dimension/cycleAnalysis',
|
||||
drilldownCurUrl: '/interface/link/overview/drilldown/dimension/analysis',
|
||||
drilldownCycleUrl: '/interface/link/overview/drilldown/dimension/cycleAnalysis',
|
||||
drilldownList: ''
|
||||
}
|
||||
// dns:接口url(主URL)
|
||||
export const dnsSearchUrl = {
|
||||
curUrl: '/interface/dns/overview/dimensionAnalysis',
|
||||
@@ -366,6 +373,94 @@ export const customTableTitlesForAppPerformance = [
|
||||
isInMainUrl: false
|
||||
}
|
||||
]
|
||||
export const customTableTitlesForLinkMonitor = [
|
||||
{ label: 'network.ips', prop: 'tab', checked: true, tabColumn: true, columnType: tableColumnType.dillDown },
|
||||
{ label: 'network.score', prop: 'score', checked: true, tabColumn: false, columnType: tableColumnType.normal },
|
||||
{
|
||||
label: 'networkAppPerformance.throughput',
|
||||
prop: 'through',
|
||||
checked: true,
|
||||
tabColumn: false,
|
||||
columnType: tableColumnType.chainRatio,
|
||||
cycleDataUrl: linkMonitorUrl.cycleUrl,
|
||||
isInMainUrl: true
|
||||
}, // 此字段当前周期的数据是否在主URL中(npmSearchUrl中的URL为主URL)
|
||||
{
|
||||
label: 'networkAppPerformance.tcpConnectionEstablishLatency',
|
||||
prop: 'tcpConEstLatency',
|
||||
dillDownProp: 'establishLatencyMs',
|
||||
dillDownCycleProp: 'establishLatencyMs',
|
||||
checked: true,
|
||||
tabColumn: false,
|
||||
columnType: tableColumnType.chainRatio,
|
||||
cycleDataUrl: '/interface/link/overview/drilldown/dimension/networkAnalysis',
|
||||
dillDownCycleDataUrl: '/interface/link/overview/drilldown/dimension/networkAnalysis',
|
||||
cycle: cycle.pre,
|
||||
scoreType: 0,
|
||||
isScoreColumn: true,
|
||||
isInMainUrl: false
|
||||
},
|
||||
{
|
||||
label: 'networkAppPerformance.packetLoss',
|
||||
prop: 'packetLoss',
|
||||
dillDownProp: 'tcpLostlenPercent',
|
||||
dillDownCycleProp: 'tcpLostlenPercent',
|
||||
checked: false,
|
||||
tabColumn: false,
|
||||
columnType: tableColumnType.chainRatio,
|
||||
cycleDataUrl: '/interface/link/overview/drilldown/dimension/networkAnalysis',
|
||||
dillDownCycleDataUrl: '/interface/link/overview/drilldown/dimension/networkAnalysis',
|
||||
cycle: cycle.pre,
|
||||
scoreType: 3,
|
||||
isScoreColumn: true,
|
||||
isInMainUrl: false
|
||||
},
|
||||
{
|
||||
label: 'networkAppPerformance.packetRetrans',
|
||||
prop: 'packetRetrans',
|
||||
dillDownProp: 'pktRetransPercent',
|
||||
dillDownCycleProp: 'pktRetransPercent',
|
||||
checked: false,
|
||||
tabColumn: false,
|
||||
columnType: tableColumnType.chainRatio,
|
||||
cycleDataUrl: '/interface/link/overview/drilldown/dimension/networkAnalysis',
|
||||
dillDownCycleDataUrl: '/interface/link/overview/drilldown/dimension/networkAnalysis',
|
||||
cycle: cycle.pre,
|
||||
scoreType: 4,
|
||||
isScoreColumn: true,
|
||||
isInMainUrl: false
|
||||
},
|
||||
{
|
||||
label: 'networkAppPerformance.sslResponseLatency',
|
||||
prop: 'sslResponseLatency',
|
||||
dillDownProp: 'sslConLatency',
|
||||
dillDownCycleProp: 'sslConLatency',
|
||||
checked: false,
|
||||
tabColumn: false,
|
||||
columnType: tableColumnType.chainRatio,
|
||||
cycleDataUrl: '/interface/link/overview/drilldown/dimension/sslConDelay',
|
||||
dillDownCycleDataUrl: '/interface/link/overview/drilldown/dimension/sslConDelay',
|
||||
cycle: cycle.pre,
|
||||
scoreType: 2,
|
||||
isScoreColumn: true,
|
||||
isInMainUrl: false
|
||||
},
|
||||
{
|
||||
label: 'networkAppPerformance.httpResponseLatency',
|
||||
prop: 'httpResponseLatency',
|
||||
dillDownProp: 'httpResponseLatency',
|
||||
dillDownCycleProp: 'httpResponseLatency',
|
||||
checked: false,
|
||||
tabColumn: false,
|
||||
columnType: tableColumnType.chainRatio,
|
||||
cycleDataUrl: '/interface/link/overview/drilldown/dimension/httpResponseDelay',
|
||||
dillDownCycleDataUrl: '/interface/link/overview/drilldown/dimension/httpResponseDelay',
|
||||
cycle: cycle.pre,
|
||||
scoreType: 1,
|
||||
isScoreColumn: true,
|
||||
isInMainUrl: false
|
||||
}
|
||||
]
|
||||
export const customTableTitlesForDns = [
|
||||
{ label: 'dns.dnsServer', prop: 'tab', checked: true, tabColumn: true, columnType: tableColumnType.dillDown },
|
||||
{
|
||||
@@ -675,6 +770,137 @@ export const networkAppPerformanceTabList = [
|
||||
panelId: drillDownPanelTypeMapping.npmOverviewCommon
|
||||
}
|
||||
]
|
||||
export const linkMonitorTabList = [
|
||||
{
|
||||
label: 'network.ips', // tab名称对应的il8n
|
||||
prop: 'ip', // 接口返回数据中,tab第一列对应的属性名
|
||||
queryCycleTotalProp: 'ips', // SQL中查询不同纬度的列名称
|
||||
dillDownProp: ['common_client_ip', 'common_server_ip'], // 下钻时,传递的查询条件,即接口的q参数
|
||||
checked: true, // 自定义设置中,是否默认选中
|
||||
disabled: false, // 自定义设置中,是否可操作(选中或取消选中)
|
||||
panelId: drillDownPanelTypeMapping.linkMonitor// 下钻后展示的panelId
|
||||
}, {
|
||||
label: 'network.countries',
|
||||
prop: 'country',
|
||||
queryCycleTotalProp: 'countries',
|
||||
dillDownProp: ['client_country', 'server_country'],
|
||||
checked: true,
|
||||
disabled: false,
|
||||
panelId: drillDownPanelTypeMapping.linkMonitor
|
||||
}, {
|
||||
label: 'network.asns',
|
||||
prop: 'asn',
|
||||
queryCycleTotalProp: 'asns',
|
||||
dillDownProp: ['client_asn', 'server_asn'],
|
||||
checked: true,
|
||||
disabled: false,
|
||||
panelId: drillDownPanelTypeMapping.linkMonitor
|
||||
}, {
|
||||
label: 'network.applications',
|
||||
prop: 'appLabel',
|
||||
queryCycleTotalProp: 'applications',
|
||||
dillDownProp: ['common_app_label'],
|
||||
checked: true,
|
||||
disabled: false,
|
||||
panelId: drillDownPanelTypeMapping.linkMonitor
|
||||
}, {
|
||||
label: 'network.providers',
|
||||
prop: 'appCompany',
|
||||
queryCycleTotalProp: 'providers',
|
||||
dillDownProp: ['app_company'],
|
||||
checked: true,
|
||||
disabled: false,
|
||||
panelId: drillDownPanelTypeMapping.linkMonitor
|
||||
}, {
|
||||
label: 'network.domains',
|
||||
prop: 'domain',
|
||||
queryCycleTotalProp: 'domains',
|
||||
dillDownProp: ['domain'],
|
||||
checked: true,
|
||||
disabled: false,
|
||||
panelId: drillDownPanelTypeMapping.linkMonitor
|
||||
}, {
|
||||
label: 'network.protocols',
|
||||
prop: 'l7Protocol',
|
||||
queryCycleTotalProp: 'protocols',
|
||||
dillDownProp: ['common_l7_protocol'],
|
||||
checked: true,
|
||||
disabled: false,
|
||||
panelId: drillDownPanelTypeMapping.linkMonitor
|
||||
}, {
|
||||
label: 'network.idcTenants',
|
||||
prop: 'idcRenter',
|
||||
queryCycleTotalProp: 'idcTenants',
|
||||
dillDownProp: ['client_idc_renter', 'server_idc_renter'],
|
||||
checked: true,
|
||||
disabled: false,
|
||||
panelId: drillDownPanelTypeMapping.linkMonitor
|
||||
}, {
|
||||
label: 'network.provinces',
|
||||
prop: 'province',
|
||||
queryCycleTotalProp: 'provinces',
|
||||
dillDownProp: ['client_province', 'server_province'],
|
||||
checked: false,
|
||||
disabled: false,
|
||||
panelId: drillDownPanelTypeMapping.linkMonitor
|
||||
}, {
|
||||
label: 'network.cities',
|
||||
prop: 'city',
|
||||
queryCycleTotalProp: 'cities',
|
||||
dillDownProp: ['client_region', 'server_region'],
|
||||
checked: false,
|
||||
disabled: false,
|
||||
panelId: drillDownPanelTypeMapping.linkMonitor
|
||||
}, {
|
||||
label: 'network.isps',
|
||||
prop: 'isp',
|
||||
queryCycleTotalProp: 'isps',
|
||||
dillDownProp: ['client_isp', 'server_isp'],
|
||||
checked: false,
|
||||
disabled: false,
|
||||
panelId: drillDownPanelTypeMapping.linkMonitor
|
||||
}, {
|
||||
label: 'network.applicationCategories',
|
||||
prop: 'appSubcategory',
|
||||
queryCycleTotalProp: 'applicationCategories',
|
||||
dillDownProp: ['app_subcategory'],
|
||||
checked: false,
|
||||
disabled: false,
|
||||
panelId: drillDownPanelTypeMapping.linkMonitor
|
||||
}, {
|
||||
label: 'network.domainCategories',
|
||||
prop: 'domainCategoryName',
|
||||
queryCycleTotalProp: 'domainCategories',
|
||||
dillDownProp: ['domain_category_name'],
|
||||
checked: false,
|
||||
disabled: false,
|
||||
panelId: drillDownPanelTypeMapping.linkMonitor
|
||||
}, {
|
||||
label: 'network.hosts',
|
||||
prop: 'httpHost',
|
||||
queryCycleTotalProp: 'hosts',
|
||||
dillDownProp: ['http_host'],
|
||||
checked: false,
|
||||
disabled: false,
|
||||
panelId: drillDownPanelTypeMapping.linkMonitor
|
||||
}, {
|
||||
label: 'network.snis',
|
||||
prop: 'sslSni',
|
||||
queryCycleTotalProp: 'snis',
|
||||
dillDownProp: ['ssl_sni'],
|
||||
checked: false,
|
||||
disabled: false,
|
||||
panelId: drillDownPanelTypeMapping.linkMonitor
|
||||
}, {
|
||||
label: 'network.protocolPorts',
|
||||
prop: 'protocolPort',
|
||||
queryCycleTotalProp: 'protocolports',
|
||||
dillDownProp: ['common_l7_protocol', 'common_server_port '],
|
||||
checked: false,
|
||||
disabled: false,
|
||||
panelId: drillDownPanelTypeMapping.linkMonitor
|
||||
}
|
||||
]
|
||||
export const dnsServiceInsightsTabList = [
|
||||
{
|
||||
label: 'dns.dnsServer', // tab名称对应的il8n
|
||||
@@ -896,6 +1122,15 @@ export const networkTable = {
|
||||
bytesColumnNameGroup: bytesColumnNameGroupForDns,
|
||||
bytesCycleColumnNameGroup: bytesCycleColumnNameGroupForDns,
|
||||
defaultOrderBy: 'totalBytes'
|
||||
},
|
||||
linkMonitor:{
|
||||
tabList: linkMonitorTabList,
|
||||
column: customTableTitlesForLinkMonitor,
|
||||
url: linkMonitorUrl,
|
||||
hasMetricSearch: false, // 是否有metric下拉列表
|
||||
panelIdOfThirdMenu: drillDownPanelTypeMapping.linkMonitor,
|
||||
bytesColumnNameGroup: bytesColumnNameGroupForNpm,
|
||||
bytesCycleColumnNameGroup: bytesCycleColumnNameGroupForNmp
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -68,7 +68,8 @@
|
||||
</div>
|
||||
</template>
|
||||
<template v-else-if="item.columnType === tableColumnType.dillDown" >
|
||||
<div class="data-click" @click="handleTabValue(item.label,scope.row['tab'])">{{scope.row['tab']}}</div>
|
||||
<div v-if="isOnlyRead" >{{scope.row['tab']}}</div>
|
||||
<div v-else class="data-click" @click="handleTabValue(item.label,scope.row['tab'])">{{scope.row['tab']}}</div>
|
||||
</template>
|
||||
<template v-else-if="item.columnType === tableColumnType.percent" >
|
||||
<div class="dns-in-ex">
|
||||
@@ -234,6 +235,7 @@ export default {
|
||||
metricsList: [],
|
||||
curTabState: curTabState,
|
||||
curTable: {}, // 当前的表格类型
|
||||
isOnlyRead: false,
|
||||
curTableInCode: {}, // 代码中的配置
|
||||
tableType: '',
|
||||
userId: null,
|
||||
@@ -350,14 +352,22 @@ export default {
|
||||
}
|
||||
},
|
||||
isThirdMenu () { // 当前是否为3级
|
||||
if(this.isOnlyRead){
|
||||
return false
|
||||
}else {
|
||||
const thirdMenu = this.getUrlParam(this.curTabState.thirdMenu, '')
|
||||
const fourthMenu = this.getUrlParam(this.curTabState.fourthMenu, '')
|
||||
return thirdMenu && !fourthMenu
|
||||
}
|
||||
},
|
||||
isFourthMenu () { // 当前是否为4级
|
||||
if(this.isOnlyRead){
|
||||
return false
|
||||
}else {
|
||||
const thirdMenu = this.getUrlParam(this.curTabState.thirdMenu, '')
|
||||
const fourthMenu = this.getUrlParam(this.curTabState.fourthMenu, '')
|
||||
return thirdMenu && fourthMenu
|
||||
}
|
||||
},
|
||||
initState () {
|
||||
console.log('InitState:开始')
|
||||
@@ -400,14 +410,14 @@ export default {
|
||||
|
||||
// 针对network overview – app list 点击标题触发下钻,相关内容处理
|
||||
const thirdMenu = this.getUrlParam(this.curTabState.thirdMenu, '')
|
||||
const fourthMenu = this.getUrlParam(this.curTabState.fourthMenu, '')
|
||||
if (thirdMenu && fourthMenu) {
|
||||
//const fourthMenu = this.getUrlParam(this.curTabState.fourthMenu, '')
|
||||
if (this.isFourthMenu()) {
|
||||
this.list.forEach(item => {
|
||||
if (item.label === thirdMenu) {
|
||||
item.checked = false
|
||||
//item.checked = false
|
||||
}
|
||||
})
|
||||
} else if (thirdMenu && !fourthMenu) {
|
||||
} else if (this.isThirdMenu()) {
|
||||
this.list.forEach(item => {
|
||||
if (item.label === thirdMenu) {
|
||||
item.checked = true
|
||||
@@ -432,7 +442,6 @@ export default {
|
||||
}
|
||||
|
||||
const curOperationType = this.getUrlParam(this.curTabState.tabOperationType, '', true)
|
||||
const beforeOperationType = this.getUrlParam(this.curTabState.tabOperationBeforeType, '', true)
|
||||
if (this.isFourthMenu()) { // 点击的为第四级菜单
|
||||
curTab = this.getCurTab()
|
||||
if (curTab) {
|
||||
@@ -440,7 +449,6 @@ export default {
|
||||
this.urlChangeParams[this.curTabState.curTab] = curTab.prop
|
||||
}
|
||||
this.showCustomizeTabs = true
|
||||
// this.setShowNum(10)
|
||||
} else if (this.isThirdMenu()) { // 点击的为第三级菜单
|
||||
const name = this.getUrlParam(this.curTabState.thirdMenu, '')
|
||||
// const networkTabList = []
|
||||
@@ -448,7 +456,6 @@ export default {
|
||||
if (item.label === name) {
|
||||
item.checked = true
|
||||
}
|
||||
// networkTabList.push(item)
|
||||
})
|
||||
const breadcrumbColumnTab = this.list.find(item => item.label === name)
|
||||
this.urlChangeParams[this.curTabState.curTab] = breadcrumbColumnTab.prop
|
||||
@@ -459,12 +466,11 @@ export default {
|
||||
} else if (curOperationType === operationType.changeTab) { // 切换tab
|
||||
this.showCustomizeTabs = true
|
||||
} else if (curOperationType === operationType.secondMenu || curOperationType === operationType.mainMenu ) { // 点击的为第二级菜单、或者点击菜单进入、
|
||||
// this.list = this.$_.cloneDeep(this.allList)
|
||||
if (curTab) {
|
||||
this.showTab(curTab)
|
||||
this.urlChangeParams[this.curTabState.curTab] = curTab.prop
|
||||
}
|
||||
if (thirdMenu && fourthMenu) {
|
||||
if (this.isFourthMenu()) {
|
||||
this.$nextTick(() => {
|
||||
this.list.forEach(item => {
|
||||
if (item.label === thirdMenu) {
|
||||
@@ -472,7 +478,7 @@ export default {
|
||||
}
|
||||
})
|
||||
})
|
||||
} else if (thirdMenu && !fourthMenu) {
|
||||
} else if (this.isThirdMenu()) {
|
||||
this.list.forEach(item => {
|
||||
if (item.label === thirdMenu) {
|
||||
item.checked = true
|
||||
@@ -515,6 +521,8 @@ export default {
|
||||
this.showCustomizeTabs = true
|
||||
})
|
||||
}
|
||||
}else {
|
||||
this.showCustomizeTabs = true
|
||||
}
|
||||
this.changeUrlTabState()
|
||||
console.log('InitState: 结束')
|
||||
@@ -955,7 +963,7 @@ export default {
|
||||
item.disabled = false
|
||||
if (columnValue) {
|
||||
if (item.label === columnName) {
|
||||
item.disabled = true
|
||||
//item.disabled = true
|
||||
}
|
||||
}
|
||||
})
|
||||
@@ -995,11 +1003,6 @@ export default {
|
||||
},
|
||||
// 配置tab:显示隐藏与顺序
|
||||
tabChange (index) {
|
||||
console.log('NetworkOverview类------tabChange:隐藏或显示tab-开始')
|
||||
console.log(this.list)
|
||||
console.log(this.curTable)
|
||||
console.log(this.drillDownTableConfigs)
|
||||
console.log('NetworkOverview类------tabChange:隐藏或显示tab-开始')
|
||||
this.isNoData = false
|
||||
// 操作类型设置
|
||||
const beforeType = this.getUrlParam(this.curTabState.tabOperationBeforeType, '', true)
|
||||
@@ -1021,7 +1024,7 @@ export default {
|
||||
item.disabled = false
|
||||
if (columnValue) {
|
||||
if (item.label === columnName) {
|
||||
item.disabled = true
|
||||
//item.disabled = true
|
||||
}
|
||||
}
|
||||
})
|
||||
@@ -1067,11 +1070,6 @@ export default {
|
||||
} else {
|
||||
this.changeUrlTabState()
|
||||
}
|
||||
console.log('NetworkOverview类------tabChange:隐藏或显示tab-结束')
|
||||
console.log(this.list)
|
||||
console.log(this.curTable)
|
||||
console.log(this.drillDownTableConfigs)
|
||||
console.log('NetworkOverview类------tabChange:隐藏或显示tab-结束')
|
||||
},
|
||||
setOperationType (operationType) {
|
||||
this.urlChangeParams[this.curTabState.tabOperationBeforeType] = this.getUrlParam(this.curTabState.tabOperationType, '', true)
|
||||
@@ -1089,6 +1087,7 @@ export default {
|
||||
this.urlChangeParams[this.curTabState.networkOverviewBeforeTab] = tab.prop
|
||||
},
|
||||
setQueryCondition (tab, value) {
|
||||
value = value.replaceAll("'","\\\\'")
|
||||
const queryCondition = []
|
||||
const searchProps = tab.dillDownProp
|
||||
if (tab.prop === 'protocolPort') {
|
||||
@@ -1139,7 +1138,6 @@ export default {
|
||||
}
|
||||
})
|
||||
this.list = this.getDrilldownTabList(columnName)
|
||||
// this.combineTabList(this.list)
|
||||
const curTab = this.getCurTab(clickTab)
|
||||
tabList.forEach(tab => {
|
||||
if (tab.label === curTab.label && tab.columns) {
|
||||
@@ -1149,7 +1147,6 @@ export default {
|
||||
} else {
|
||||
const changeTab = tabList.find(item => item.label == columnName)// 下钻的tab
|
||||
this.list = changeTab.drilldownTabs
|
||||
// this.combineTabList(this.list)
|
||||
const curTab = this.getCurTab(clickTab)
|
||||
tabList.forEach(tab => {
|
||||
if (tab.label === curTab.label && tab.columns) {
|
||||
@@ -1158,6 +1155,7 @@ export default {
|
||||
})
|
||||
}
|
||||
this.saveUserLocalConfig()
|
||||
console.log(this.drillDownTableConfigs)
|
||||
this.$store.getters.menuList.forEach(menu => {
|
||||
if (this.$_.isEmpty(menu.children) && menu.route) {
|
||||
if (this.$route.path === menu.route) {
|
||||
@@ -1182,17 +1180,14 @@ export default {
|
||||
}
|
||||
})
|
||||
this.changeUrlTabState()
|
||||
this.$router.push({
|
||||
path: this.$route.path,
|
||||
query: {
|
||||
this.jumpAndCache(this.$route.path, {
|
||||
...this.$route.query,
|
||||
thirdPanel: this.curTable.panelIdOfThirdMenu,
|
||||
fourthPanel: toPanel,
|
||||
t: +new Date()
|
||||
}
|
||||
fourthPanel: toPanel
|
||||
})
|
||||
},
|
||||
handleSearchParams (columnValue) {
|
||||
columnValue = columnValue.replaceAll("'","\\\\'")
|
||||
const queryCondition = []
|
||||
const curTab = this.getCurTab()
|
||||
const searchProps = curTab.dillDownProp
|
||||
@@ -1266,7 +1261,7 @@ export default {
|
||||
this.urlChangeParams = this.$_.omit(this.urlChangeParams, [this.curTabState.tableSortColumn, this.curTabState.tableSortType, this.curTabState.tableSortTab])
|
||||
this.cancleSortArrow()
|
||||
},
|
||||
// 切换tab的时候,只需要修改列即可,但是列需要从indexDB中获取
|
||||
// 切换tab
|
||||
handleClick (tab) {
|
||||
this.tableData = []
|
||||
this.tableDataBackup = []
|
||||
@@ -1447,10 +1442,10 @@ export default {
|
||||
},
|
||||
combineTabList (tabList) {
|
||||
console.log('CombineTabList:开始')
|
||||
const listInCode = this.curTableInCode ? this.curTableInCode.tabList : []
|
||||
let listInCode = this.curTableInCode ? this.curTableInCode.tabList : []
|
||||
tabList.forEach(tab => {
|
||||
const tabName = tab ? (tab.name ? tab.name : tab) : ''
|
||||
const commonTab = this.commonTabList.find(item => item.name === tabName)
|
||||
let tabName = tab ? (tab.name ? tab.name : tab) : ''
|
||||
let commonTab = this.commonTabList.find(item => item.name === tabName)
|
||||
tab.label = commonTab ? commonTab.i18n : ''
|
||||
tab.prop = commonTab ? commonTab.prop : ''
|
||||
if (!tab.hasOwnProperty('checked') || tab.checked === undefined || tab.checked === null) {
|
||||
@@ -1463,37 +1458,34 @@ export default {
|
||||
tab.panelId = tab ? tab.panelIdOfFourthMenu : null
|
||||
}
|
||||
// 代码里写死的
|
||||
const tabInCode = listInCode ? listInCode.find(item => item.label === tab.label) : {}
|
||||
let tabInCode = listInCode ? listInCode.find(item => item.label === tab.label) : {}
|
||||
tab.queryCycleTotalProp = tabInCode ? tabInCode.queryCycleTotalProp : null
|
||||
tab.dillDownProp = tabInCode ? tabInCode.dillDownProp : []
|
||||
})
|
||||
// 设置drilldownTabs:未下钻状态设置,已下钻状态无需设置
|
||||
const thirdMenu = this.getUrlParam(this.curTabState.thirdMenu, '')
|
||||
if (!thirdMenu) {
|
||||
const oldList = this.$_.cloneDeep(tabList)
|
||||
let thirdMenu = this.getUrlParam(this.curTabState.thirdMenu, '')
|
||||
//if (!thirdMenu) {
|
||||
let oldList = this.$_.cloneDeep(tabList)
|
||||
tabList.forEach(tab => {
|
||||
const drilldownTabFull = []
|
||||
const drilldownTabList = tab.drilldownTabs
|
||||
let drilldownTabFull = []
|
||||
let drilldownTabList = tab.drilldownTabs
|
||||
drilldownTabList.forEach(drilldownTab => {
|
||||
if (!drilldownTab.hasOwnProperty('name') || drilldownTab.name === undefined || drilldownTab.name === null) {
|
||||
const drilldownTabName = drilldownTab || ''
|
||||
const fullTab = oldList.find(item => item.name === drilldownTabName)
|
||||
const drilldownTabWithAllInfo = this.$_.cloneDeep(fullTab)
|
||||
let drilldownTabName = drilldownTab || ''
|
||||
let fullTab = oldList.find(item => item.name === drilldownTabName)
|
||||
let drilldownTabWithAllInfo = this.$_.cloneDeep(fullTab)
|
||||
if (drilldownTabWithAllInfo) {
|
||||
const commonTab = this.commonTabList.find(item => item.name === drilldownTabName)
|
||||
let commonTab = this.commonTabList.find(item => item.name === drilldownTabName)
|
||||
drilldownTabWithAllInfo.label = commonTab ? commonTab.i18n : ''
|
||||
drilldownTabWithAllInfo.prop = commonTab ? commonTab.prop : ''
|
||||
/* if (!drilldownTabWithAllInfo.hasOwnProperty('panelId') || drilldownTabWithAllInfo.panelId === undefined || drilldownTabWithAllInfo.panelId === null) {
|
||||
drilldownTabWithAllInfo.panelId = tab ? tab.panelIdOfFourthMenu : ''
|
||||
} */
|
||||
if (!drilldownTabWithAllInfo.hasOwnProperty('checked') || drilldownTabWithAllInfo.checked === undefined || drilldownTabWithAllInfo.checked === null) {
|
||||
//if (!drilldownTabWithAllInfo.hasOwnProperty('checked') || drilldownTabWithAllInfo.checked === undefined || drilldownTabWithAllInfo.checked === null) {
|
||||
drilldownTabWithAllInfo.checked = !((tab.hiddenDrilldownTabs.indexOf(drilldownTabName) >= 0))
|
||||
}
|
||||
if (!drilldownTabWithAllInfo.hasOwnProperty('disabled') || drilldownTabWithAllInfo.disabled === undefined || drilldownTabWithAllInfo.disabled === null) {
|
||||
//}
|
||||
//if (!drilldownTabWithAllInfo.hasOwnProperty('disabled') || drilldownTabWithAllInfo.disabled === undefined || drilldownTabWithAllInfo.disabled === null) {
|
||||
drilldownTabWithAllInfo.disabled = (tab.disabledDrilldownTabs.indexOf(drilldownTabName) >= 0)
|
||||
}
|
||||
//}
|
||||
// 代码里写死的
|
||||
const tabInCode = listInCode ? listInCode.find(item => item.label === fullTab.label) : {}
|
||||
let tabInCode = listInCode ? listInCode.find(item => item.label === fullTab.label) : {}
|
||||
drilldownTabWithAllInfo.queryCycleTotalProp = tabInCode ? tabInCode.queryCycleTotalProp : null
|
||||
drilldownTabWithAllInfo.dillDownProp = tabInCode ? tabInCode.dillDownProp : []
|
||||
drilldownTabFull.push(drilldownTabWithAllInfo)
|
||||
@@ -1504,7 +1496,7 @@ export default {
|
||||
tab.drilldownTabs = drilldownTabFull
|
||||
}
|
||||
})
|
||||
}
|
||||
//}
|
||||
console.log('CombineTabList:结束')
|
||||
},
|
||||
combineColumnList (tabLabel) {
|
||||
@@ -1553,6 +1545,7 @@ export default {
|
||||
async getUserLocalConfig () {
|
||||
const userLocalCongfig = await db[dbDrilldownTableConfig].get({ id: this.userId })
|
||||
if (userLocalCongfig) {
|
||||
console.info(userLocalCongfig.config)
|
||||
return userLocalCongfig.config
|
||||
} else {
|
||||
return null
|
||||
@@ -1683,7 +1676,7 @@ export default {
|
||||
}
|
||||
} else { // 非下钻状态
|
||||
this.list = this.getAllTabList()
|
||||
if (!this.isSetDrilldownTabInfo(this.list)) { // 设否设置了下钻的详细信息
|
||||
if (!this.isSetDrilldownTabInfo(this.list)) { // 是否设置了下钻的详细信息
|
||||
this.combineTabList(this.list)
|
||||
}
|
||||
this.allList = this.$_.cloneDeep(this.list)// 备份所有配置,下钻及返回时使用
|
||||
@@ -1705,6 +1698,7 @@ export default {
|
||||
this.curTable.sessionsCycleColumnNameGroup = this.curTableInCode ? this.curTableInCode.sessionsCycleColumnNameGroup : []
|
||||
this.columnNameGroup = this.curTable.bytesColumnNameGroup
|
||||
this.cycleColumnNameGroup = this.curTable.bytesCycleColumnNameGroup
|
||||
this.isOnlyRead = this.curTable.isOnlyRead ? this.curTable.isOnlyRead : false
|
||||
if (this.curTableInCode.defaultOrderBy) {
|
||||
this.orderBy = this.curTableInCode.defaultOrderBy
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user