企微迁移智慧监护(手环)

This commit is contained in:
aixianling
2022-05-17 09:12:29 +08:00
parent 9a3aab86d0
commit f5a1cd7424
10 changed files with 5 additions and 4 deletions

View File

@@ -0,0 +1,66 @@
<template>
<section class="AppGuardianship">
<component ref="currentTab" :is="currentTab.comp"/>
<ai-tabbar :active.sync="active" :list="bottomBar"/>
</section>
</template>
<script>
import AiLoading from "../../components/AiLoading";
import GsLocation from "./gsLocation";
import AiTabbar from "../../components/AiTabbar";
import WardList from "./wardList";
import EarlyWarning from "./earlyWarning";
export default {
name: "AppGuardianship",
appName: "智慧监护",
components: {AiTabbar, AiLoading},
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>