地区选择
This commit is contained in:
@@ -2,7 +2,7 @@
|
|||||||
<div class="AppDataStatistics">
|
<div class="AppDataStatistics">
|
||||||
<AiTopFixed>
|
<AiTopFixed>
|
||||||
<div class="area-content">
|
<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>
|
<div flex>
|
||||||
<img src="./img/location.png" alt="" class="icon-img">
|
<img src="./img/location.png" alt="" class="icon-img">
|
||||||
<AiMore v-model="areaName" icon="arrow-down"/>
|
<AiMore v-model="areaName" icon="arrow-down"/>
|
||||||
@@ -13,7 +13,7 @@
|
|||||||
<div class="tab-list">
|
<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 :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>
|
</div>
|
||||||
<component :is="tabList[tabIndex].component" class="component" />
|
<component ref='list' :is="tabList[tabIndex].component" class="component" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -22,6 +22,7 @@ import resident from './components/resident.vue'
|
|||||||
import update from './components/update'
|
import update from './components/update'
|
||||||
import wechat from './components/wechat'
|
import wechat from './components/wechat'
|
||||||
import message from './components/message'
|
import message from './components/message'
|
||||||
|
import { mapState } from 'vuex'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "AppDataStatistics",
|
name: "AppDataStatistics",
|
||||||
@@ -51,11 +52,25 @@ export default {
|
|||||||
areaName: '',
|
areaName: '',
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
computed: {
|
||||||
|
...mapState(['user'])
|
||||||
|
},
|
||||||
components: {resident, update, wechat, message},
|
components: {resident, update, wechat, message},
|
||||||
methods: {
|
methods: {
|
||||||
tabClick(index) {
|
tabClick(index) {
|
||||||
this.tabIndex = 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() {
|
onShow() {
|
||||||
document.title = "数据统计"
|
document.title = "数据统计"
|
||||||
|
|||||||
Reference in New Issue
Block a user