Files
dvcp_v2_wxcp_app/src/apps/AppGuardianship/AppGuardianship.vue
aixianling b58e04db84 BUG 29643
2022-05-18 09:40:21 +08:00

64 lines
1.5 KiB
Vue

<template>
<section class="AppGuardianship">
<component ref="currentTab" :is="currentTab.comp"/>
<AiTabbar :active.sync="active" :list="bottomBar"/>
</section>
</template>
<script>
import GsLocation from "./gsLocation";
import WardList from "./wardList";
import EarlyWarning from "./earlyWarning";
export default {
name: "AppGuardianship",
appName: "智慧监护",
provide() {
return {
top: this
}
},
computed: {
bottomBar() {
return [
{text: "定位", iconPath: "bardwn", selectedIconPath: "bardwh", comp: GsLocation},
{text: "人员", iconPath: "barryn", selectedIconPath: "barryh", comp: WardList},
{text: "预警", iconPath: "baryjn", selectedIconPath: "baryjh", comp: EarlyWarning},
].map(e => ({
...e,
iconPath: this.cdn(e.iconPath),
selectedIconPath: this.cdn(e.selectedIconPath)
}))
},
currentTab() {
return this.bottomBar?.[this.active] || {}
}
},
methods: {
cdn(icon) {
return `${this.$cdn}AppGuardianship/${icon}.png`
},
},
data() {
return {
active: 0
}
},
created() {
this.$dict.load("intelligentGuardianshipItem", 'intelligentGuardianshipItem2', 'intelligentGuardianshipAbnormalStatus')
},
onReachBottom() {
if (typeof this.$refs?.currentTab?.reachBottom == 'function') this.$refs?.currentTab.reachBottom()
}
}
</script>
<style lang="scss" scoped>
.AppGuardianship {
position: absolute;
width: 100%;
top: 0;
bottom: 0;
}
</style>