维度类型暴露(使用this.$store.getters.getDimensionType获取)
This commit is contained in:
@@ -400,6 +400,9 @@ export default {
|
|||||||
child.columnName = columnName
|
child.columnName = columnName
|
||||||
this.$store.commit('setBreadcrumbColumnValue', columnValue)
|
this.$store.commit('setBreadcrumbColumnValue', columnValue)
|
||||||
this.$store.commit('setBreadcrumbColumnName', columnName)
|
this.$store.commit('setBreadcrumbColumnName', columnName)
|
||||||
|
const tabObjGroup = networkOverviewTabList.filter(item => item.label == columnName)
|
||||||
|
let type = tabObjGroup&&tabObjGroup[0]?tabObjGroup[0].prop:''
|
||||||
|
this.$store.commit('setDimensionType', type)
|
||||||
this.$store.commit('setPanelName', columnValue)
|
this.$store.commit('setPanelName', columnValue)
|
||||||
} else if (columnName) { // 点击的为列名
|
} else if (columnName) { // 点击的为列名
|
||||||
child.columnValue = ''
|
child.columnValue = ''
|
||||||
@@ -410,6 +413,7 @@ export default {
|
|||||||
const tabList = this.$store.getters.getNetworkOverviewTabList
|
const tabList = this.$store.getters.getNetworkOverviewTabList
|
||||||
const curTab = tabList.filter(item => this.$t(item.label) === columnName)[0]
|
const curTab = tabList.filter(item => this.$t(item.label) === columnName)[0]
|
||||||
this.$store.commit('setNetworkOverviewCurrentTab', curTab)
|
this.$store.commit('setNetworkOverviewCurrentTab', curTab)
|
||||||
|
this.$store.commit('setDimensionType', curTab?curTab.prop:'')
|
||||||
this.$store.commit('setQueryCondition', '')
|
this.$store.commit('setQueryCondition', '')
|
||||||
this.$store.commit('setNetworkOverviewBeforeTab', null)
|
this.$store.commit('setNetworkOverviewBeforeTab', null)
|
||||||
} else {
|
} else {
|
||||||
@@ -417,6 +421,7 @@ export default {
|
|||||||
child.columnValue = ''
|
child.columnValue = ''
|
||||||
this.$store.commit('setBreadcrumbColumnValue', '')
|
this.$store.commit('setBreadcrumbColumnValue', '')
|
||||||
this.$store.commit('setBreadcrumbColumnName', '')
|
this.$store.commit('setBreadcrumbColumnName', '')
|
||||||
|
this.$store.commit('setDimensionType', '')
|
||||||
this.$store.commit('setPanelName', '')
|
this.$store.commit('setPanelName', '')
|
||||||
this.$store.commit('setBreadcrumbColumnValueList', [])
|
this.$store.commit('setBreadcrumbColumnValueList', [])
|
||||||
this.$store.commit('setNetworkOverviewCurrentTab', null)
|
this.$store.commit('setNetworkOverviewCurrentTab', null)
|
||||||
@@ -427,7 +432,7 @@ export default {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
//console.log(this.$store.getters.getDimensionType)
|
||||||
if(opeType===3){
|
if(opeType===3){
|
||||||
this.$router.push({
|
this.$router.push({
|
||||||
params:{...this.$route.params,fourthPanel:''}
|
params:{...this.$route.params,fourthPanel:''}
|
||||||
|
|||||||
@@ -40,6 +40,7 @@ const panel = {
|
|||||||
*/
|
*/
|
||||||
panelName: '', // 网络概况的Panel的名称
|
panelName: '', // 网络概况的Panel的名称
|
||||||
breadcrumbColumnName: '', // 点击tab里的value,都会修改此值,为面包屑的菜单
|
breadcrumbColumnName: '', // 点击tab里的value,都会修改此值,为面包屑的菜单
|
||||||
|
dimensionType: '', // 维度
|
||||||
breadcrumbColumnValue: '', // 点击tab里的value,都会修改此值,为面包屑的菜单
|
breadcrumbColumnValue: '', // 点击tab里的value,都会修改此值,为面包屑的菜单
|
||||||
breadcrumbColumnValueList: [], // 第四级面包屑的下拉列表
|
breadcrumbColumnValueList: [], // 第四级面包屑的下拉列表
|
||||||
networkOverviewCurrentTab: null, // 只代表选中的tab,有时会与面包屑中显示的值不同
|
networkOverviewCurrentTab: null, // 只代表选中的tab,有时会与面包屑中显示的值不同
|
||||||
@@ -106,6 +107,9 @@ const panel = {
|
|||||||
setBreadcrumbColumnName (state, breadcrumbColumnName) {
|
setBreadcrumbColumnName (state, breadcrumbColumnName) {
|
||||||
state.breadcrumbColumnName = breadcrumbColumnName
|
state.breadcrumbColumnName = breadcrumbColumnName
|
||||||
},
|
},
|
||||||
|
setDimensionType (state, dimensionType) {
|
||||||
|
state.dimensionType = dimensionType
|
||||||
|
},
|
||||||
setBreadcrumbColumnValue (state, breadcrumbColumnValue) {
|
setBreadcrumbColumnValue (state, breadcrumbColumnValue) {
|
||||||
state.breadcrumbColumnValue = breadcrumbColumnValue
|
state.breadcrumbColumnValue = breadcrumbColumnValue
|
||||||
},
|
},
|
||||||
@@ -186,6 +190,9 @@ const panel = {
|
|||||||
getBreadcrumbColumnName (state) {
|
getBreadcrumbColumnName (state) {
|
||||||
return state.breadcrumbColumnName
|
return state.breadcrumbColumnName
|
||||||
},
|
},
|
||||||
|
getDimensionType (state) {
|
||||||
|
return state.dimensionType
|
||||||
|
},
|
||||||
getBreadcrumbColumnValue (state) {
|
getBreadcrumbColumnValue (state) {
|
||||||
return state.breadcrumbColumnValue
|
return state.breadcrumbColumnValue
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -20,7 +20,6 @@
|
|||||||
:ref="`dataTable_${index}`"
|
:ref="`dataTable_${index}`"
|
||||||
:data="tableData"
|
:data="tableData"
|
||||||
border
|
border
|
||||||
v-loading="loading"
|
|
||||||
:cell-style="tableCellStyle"
|
:cell-style="tableCellStyle"
|
||||||
:header-cell-style="tableHeaderCellStyle"
|
:header-cell-style="tableHeaderCellStyle"
|
||||||
class="tab-table"
|
class="tab-table"
|
||||||
@@ -149,6 +148,7 @@ import {operationType, unitTypes,networkTable,tableColumnType } from '@/utils/co
|
|||||||
import { get } from '@/utils/http'
|
import { get } from '@/utils/http'
|
||||||
import unitConvert from '@/utils/unit-convert'
|
import unitConvert from '@/utils/unit-convert'
|
||||||
import { getChainRatio } from '@/utils/tools'
|
import { getChainRatio } from '@/utils/tools'
|
||||||
|
import chartMixin from '@/views/charts2/chart-mixin'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'NetworkOverviewTabs',
|
name: 'NetworkOverviewTabs',
|
||||||
@@ -218,6 +218,7 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
mixins: [chartMixin],
|
||||||
methods: {
|
methods: {
|
||||||
changeMetric () {
|
changeMetric () {
|
||||||
const beforeType = this.$store.getters.getTabOperationBeforeType
|
const beforeType = this.$store.getters.getTabOperationBeforeType
|
||||||
@@ -305,7 +306,7 @@ export default {
|
|||||||
q: condition
|
q: condition
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.loading = true
|
this.toggleLoading(true)
|
||||||
this.$emit('getChartData', this.getCurUrl(), queryParams)
|
this.$emit('getChartData', this.getCurUrl(), queryParams)
|
||||||
},
|
},
|
||||||
handleCustomizeButton (status) {
|
handleCustomizeButton (status) {
|
||||||
@@ -495,15 +496,16 @@ export default {
|
|||||||
through: item.through
|
through: item.through
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
this.loading = false
|
|
||||||
|
this.toggleLoading(false)
|
||||||
} else {
|
} else {
|
||||||
this.tableData = tableDataTmp
|
this.tableData = tableDataTmp
|
||||||
this.loading = false
|
this.toggleLoading(false)
|
||||||
}
|
}
|
||||||
}).catch(e => {
|
}).catch(e => {
|
||||||
this.loading = false
|
this.toggleLoading(false)
|
||||||
}).finally(e => {
|
}).finally(e => {
|
||||||
this.loading = false
|
this.toggleLoading(false)
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
tabChange (index) {
|
tabChange (index) {
|
||||||
@@ -547,7 +549,7 @@ export default {
|
|||||||
q: condition
|
q: condition
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.loading = true
|
this.toggleLoading(true)
|
||||||
this.$emit('getChartData', this.getCurUrl(), queryParams)
|
this.$emit('getChartData', this.getCurUrl(), queryParams)
|
||||||
},
|
},
|
||||||
handleTabValue (columnName, columnValue) {
|
handleTabValue (columnName, columnValue) {
|
||||||
@@ -579,6 +581,7 @@ export default {
|
|||||||
menu.columnValue = columnValue
|
menu.columnValue = columnValue
|
||||||
this.$store.commit('setPanelName', columnValue)
|
this.$store.commit('setPanelName', columnValue)
|
||||||
this.$store.commit('setBreadcrumbColumnName', columnName)
|
this.$store.commit('setBreadcrumbColumnName', columnName)
|
||||||
|
this.$store.commit('setDimensionType', tabGroup[0]?tabGroup[0].prop:'')
|
||||||
this.$store.commit('setBreadcrumbColumnValue', columnValue)
|
this.$store.commit('setBreadcrumbColumnValue', columnValue)
|
||||||
}
|
}
|
||||||
} else if (!this.$_.isEmpty(menu.children)) {
|
} else if (!this.$_.isEmpty(menu.children)) {
|
||||||
@@ -588,11 +591,13 @@ export default {
|
|||||||
child.columnValue = columnValue
|
child.columnValue = columnValue
|
||||||
this.$store.commit('setPanelName', columnValue)
|
this.$store.commit('setPanelName', columnValue)
|
||||||
this.$store.commit('setBreadcrumbColumnName', columnName)
|
this.$store.commit('setBreadcrumbColumnName', columnName)
|
||||||
|
this.$store.commit('setDimensionType', tabGroup[0]?tabGroup[0].prop:'')
|
||||||
this.$store.commit('setBreadcrumbColumnValue', columnValue)
|
this.$store.commit('setBreadcrumbColumnValue', columnValue)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
console.log(this.$store.getters.getDimensionType)
|
||||||
let toPanel = null
|
let toPanel = null
|
||||||
this.list.forEach((item, index) => {
|
this.list.forEach((item, index) => {
|
||||||
if (item.label === columnName) {
|
if (item.label === columnName) {
|
||||||
@@ -699,7 +704,7 @@ export default {
|
|||||||
q: condition
|
q: condition
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.loading = true
|
this.toggleLoading(true)
|
||||||
this.$emit('getChartData', this.getCurUrl(), queryParams, queryParams.q)
|
this.$emit('getChartData', this.getCurUrl(), queryParams, queryParams.q)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user