所属站点

This commit is contained in:
白菜
2026-01-21 16:13:13 +08:00
parent feaeb0c7d7
commit b24d930f4f
4 changed files with 252 additions and 218 deletions

View File

@ -66,6 +66,9 @@
</template>
<script>
import {
mapGetters
} from 'vuex'
import DateRangeSelect from './DateRangeSelect.vue'
import {
getAllSites,
@ -156,7 +159,6 @@
children: []
}
],
siteList: [],
siteId: '', //选择的站点ID
baseInfo: {}, //站点基本信息
gridList: [{
@ -193,6 +195,7 @@
}
},
computed: {
...mapGetters(['belongSite']),
siteGirdList() {
return this.gridList.filter(i => this.deviceCategoryOptions.includes(i.categoryName))
}
@ -242,14 +245,18 @@
return {
text: item.siteName,
value: item.siteId,
id: item.id
id: item.id,
disable: !this.belongSite || this.belongSite.length === 0 || this
.belongSite.includes('all') ? false : !this.belongSite.includes(item
.siteId)
}
})
// 设置默认展示的站点
if (data.length > 0) {
this.siteId = data[0].siteId
this.updateSiteInfo()
}
this.siteId = this.siteTypeOptions.find(i => i.children && i.children.length > 0)?.children
.find(
item => !item
.disable)?.value || ''
this.siteId && this.updateSiteInfo()
})
},
getSiteBaseInfo() {