企微迁移智慧监护(手环)
This commit is contained in:
66
src/apps/AppGuardianship/AppGuardianship.vue
Normal file
66
src/apps/AppGuardianship/AppGuardianship.vue
Normal 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>
|
||||
Reference in New Issue
Block a user