2021-12-15 18:07:16 +08:00
|
|
|
<template>
|
|
|
|
|
<div class="AppGridManagement">
|
2022-01-13 09:21:45 +08:00
|
|
|
<component v-if="refresh" :is="component" @change="onChange" :params="params"> </component>
|
|
|
|
|
<div class="tabs" v-if="isTab">
|
|
|
|
|
<div class="item" @click="tabClick(index, item.component)" v-for="(item, index) in tabs" :key="index">
|
|
|
|
|
<img :src="tabIndex == index ? item.activeImg : item.img" alt="" />
|
|
|
|
|
<p :class="tabIndex == index ? 'color-3267F0' : ''">{{ item.text }}</p>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
2021-12-15 18:07:16 +08:00
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script>
|
2022-01-13 09:21:45 +08:00
|
|
|
import Statistics from './Statistics.vue'
|
|
|
|
|
import Organization from './Organization.vue'
|
|
|
|
|
import Map from './Map.vue'
|
2021-12-15 18:07:16 +08:00
|
|
|
|
|
|
|
|
export default {
|
|
|
|
|
name: 'AppGridManagement',
|
|
|
|
|
appName: '网格管理',
|
|
|
|
|
|
|
|
|
|
data() {
|
|
|
|
|
return {
|
2022-01-13 11:13:06 +08:00
|
|
|
component: 'Organization',
|
2022-01-13 09:21:45 +08:00
|
|
|
params: {},
|
|
|
|
|
refresh: true,
|
|
|
|
|
tabIndex: 0,
|
|
|
|
|
tabs: [
|
|
|
|
|
{
|
|
|
|
|
img: require('./components/img/handle-icon.png'),
|
|
|
|
|
activeImg: require('./components/img/handle-icon-active.png'),
|
|
|
|
|
text: '统计',
|
|
|
|
|
component: 'Statistics',
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
img: require('./components/img/statistics-icon.png'),
|
|
|
|
|
activeImg: require('./components/img/statistics-icon-active.png'),
|
|
|
|
|
text: '组织',
|
|
|
|
|
component: 'Organization',
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
img: require('./components/img/set-icon.png'),
|
|
|
|
|
activeImg: require('./components/img/set-icon-active.png'),
|
|
|
|
|
text: '地图',
|
|
|
|
|
component: 'Map'
|
|
|
|
|
}
|
|
|
|
|
],
|
|
|
|
|
isTab: true,
|
2021-12-15 18:07:16 +08:00
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
|
2022-01-13 09:21:45 +08:00
|
|
|
components: {
|
|
|
|
|
Organization,
|
|
|
|
|
Statistics,
|
|
|
|
|
Map,
|
|
|
|
|
},
|
2021-12-15 18:07:16 +08:00
|
|
|
|
|
|
|
|
methods: {
|
|
|
|
|
onChange(e) {
|
|
|
|
|
this.params = e.params
|
|
|
|
|
this.component = e.type
|
2022-01-13 09:21:45 +08:00
|
|
|
},
|
|
|
|
|
tabClick(index, component) {
|
|
|
|
|
this.tabIndex = index
|
|
|
|
|
this.component = component
|
|
|
|
|
this.refresh = false
|
|
|
|
|
this.$nextTick(() => {
|
|
|
|
|
this.refresh = true
|
|
|
|
|
})
|
|
|
|
|
},
|
2021-12-15 18:07:16 +08:00
|
|
|
},
|
2021-12-24 19:57:02 +08:00
|
|
|
onShow() {
|
2022-01-13 09:21:45 +08:00
|
|
|
document.title = '网格管理'
|
|
|
|
|
uni.$on('hideTab', () => {
|
|
|
|
|
this.isTab = false
|
|
|
|
|
})
|
|
|
|
|
uni.$on('showTab', () => {
|
|
|
|
|
this.isTab = true
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
onReachBottom() {
|
|
|
|
|
if(!this.tabIndex) {
|
|
|
|
|
uni.$emit('nextList')
|
|
|
|
|
}
|
|
|
|
|
},
|
2021-12-15 18:07:16 +08:00
|
|
|
}
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<style lang="scss" scoped>
|
2022-01-13 09:21:45 +08:00
|
|
|
.AppGridManagement {
|
2021-12-15 18:07:16 +08:00
|
|
|
height: 100%;
|
|
|
|
|
}
|
2022-01-13 09:21:45 +08:00
|
|
|
.tabs {
|
|
|
|
|
width: 100%;
|
|
|
|
|
height: 98px;
|
|
|
|
|
background: #fff;
|
|
|
|
|
border-top: 1px solid #ddd;
|
|
|
|
|
position: fixed;
|
|
|
|
|
bottom: 0;
|
|
|
|
|
left: 0;
|
|
|
|
|
display: flex;
|
|
|
|
|
.item {
|
|
|
|
|
flex: 1;
|
|
|
|
|
text-align: center;
|
|
|
|
|
img {
|
|
|
|
|
width: 56px;
|
|
|
|
|
height: 56px;
|
|
|
|
|
margin-top: 8px;
|
|
|
|
|
}
|
|
|
|
|
p {
|
|
|
|
|
font-size: 22px;
|
|
|
|
|
font-family: PingFangSC-Medium, PingFang SC;
|
|
|
|
|
font-weight: 500;
|
|
|
|
|
color: #c4cad4;
|
|
|
|
|
line-height: 8px;
|
|
|
|
|
}
|
|
|
|
|
.color-3267F0 {
|
|
|
|
|
color: #3267f0;
|
|
|
|
|
}
|
|
|
|
|
}
|
2021-12-15 18:07:16 +08:00
|
|
|
}
|
2022-01-13 09:21:45 +08:00
|
|
|
</style>
|