解决按钮权限覆盖的问题,权限展示所有菜单,角色修改时回显子节点勾选的问题,统计分析生命周期获取数据接口问题

This commit is contained in:
ym1026
2025-11-12 14:13:10 +08:00
parent ac17c41900
commit 450aff0eff
8 changed files with 227 additions and 249 deletions

View File

@@ -53,6 +53,7 @@
:table-info="tableList[activeKey].tableInfo"
:table-data="tableList[activeKey].tableData"
@pagesizeChange="pagesizeChange"
>
</energyEchart>
</a-spin>
@@ -635,20 +636,24 @@ export default {
})
})
},
immediate: true // 添加立即执行
// immediate: true // 添加立即执行
}
},
async mounted() {
mounted() {
console.log('mounted')
// 优先加载第一个页面(activeKey=1)所需的数据
this.btnOptionList = this.$getBtns(['导出'])
await Promise.all([
this.getStationList(),
Promise.all([
this.getStationList()
]).then(()=>{
this.getEchartsListForActiveKey(),
this.getTableListForActiveKey()
])
this.getStatCharts()
this.startRealtimeRefresh()
})
// 初始化实时刷新
this.startRealtimeRefresh()
},
beforeUnmount() {
clearInterval(this.interval) // 组件销毁时清除定时器
@@ -731,6 +736,7 @@ export default {
},
// 专门获取当前激活页面的表格数据
async getTableListForActiveKey() {
console.log( this.stationId,'getTableListForActiveKey')
this.loading.table = true
if (!this.activeKey) return
@@ -771,6 +777,7 @@ export default {
},
async getStationList() {
console.log('getsStationList')
const params = {
page_size: 1000,
page: 1
@@ -807,7 +814,7 @@ export default {
this.paramsDate.start_date = data.time ? data.time[0] : ''
this.paramsDate.end_date = data.time ? data.time[1] : ''
this.tableList[this.activeKey].pageOption.page = 1
this.getStationList(), this.getEchartsListForActiveKey(), this.getTableListForActiveKey()
this.getStationList(), this.getStatCharts(),this.getEchartsListForActiveKey(), this.getTableListForActiveKey()
},
changeStation() {
this.getStatCharts()