地区选择
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
<div class="AppDataStatistics">
|
||||
<AiTopFixed>
|
||||
<div class="area-content">
|
||||
<AiAreaPicker v-model="areaId" :name.sync="areaName">
|
||||
<AiAreaPicker v-model="areaId" :name.sync="areaName" :area-id="user.areaId" @select="areaSelect">
|
||||
<div flex>
|
||||
<img src="./img/location.png" alt="" class="icon-img">
|
||||
<AiMore v-model="areaName" icon="arrow-down"/>
|
||||
@@ -13,7 +13,7 @@
|
||||
<div class="tab-list">
|
||||
<div :class="index == tabIndex ? 'tab-item active' : 'tab-item'" v-for="(item, index) in tabList" :key="index" @click="tabClick(index)">{{ item.text }}<span></span></div>
|
||||
</div>
|
||||
<component :is="tabList[tabIndex].component" class="component" />
|
||||
<component ref='list' :is="tabList[tabIndex].component" class="component" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -22,6 +22,7 @@ import resident from './components/resident.vue'
|
||||
import update from './components/update'
|
||||
import wechat from './components/wechat'
|
||||
import message from './components/message'
|
||||
import { mapState } from 'vuex'
|
||||
|
||||
export default {
|
||||
name: "AppDataStatistics",
|
||||
@@ -51,11 +52,25 @@ export default {
|
||||
areaName: '',
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapState(['user'])
|
||||
},
|
||||
components: {resident, update, wechat, message},
|
||||
methods: {
|
||||
tabClick(index) {
|
||||
this.tabIndex = index
|
||||
},
|
||||
areaSelect(e) {
|
||||
this.areaId = e
|
||||
this.refreshList()
|
||||
},
|
||||
refreshList() {
|
||||
// this.$nextTick(() => this.$refs.list.getData())
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
this.areaId = this.user.areaId
|
||||
this.areaName = this.user.areaName
|
||||
},
|
||||
onShow() {
|
||||
document.title = "数据统计"
|
||||
|
||||
Reference in New Issue
Block a user