事件上报
This commit is contained in:
147
src/project/wuxi/AppHandSnapshot/AppHandSnapshot.vue
Normal file
147
src/project/wuxi/AppHandSnapshot/AppHandSnapshot.vue
Normal file
@@ -0,0 +1,147 @@
|
||||
<template>
|
||||
<div class="AppHandSnapshot">
|
||||
<component v-if="refresh && isGridMember" :is="component" @change="onChange" :params="params"/>
|
||||
<div class="tabs" v-if="isTab && isGridMember">
|
||||
<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>
|
||||
<div v-if="!isGridMember" class="empty">
|
||||
<img src="./components/img/no-admin.png" alt="">
|
||||
<p>没有网格员权限<br/>无法查看事件上报信息哦~</p>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import List from './List.vue'
|
||||
import Statistics from './Statistics.vue'
|
||||
import {mapState} from 'vuex'
|
||||
|
||||
export default {
|
||||
name: 'AppHandSnapshot',
|
||||
appName: '事件上报',
|
||||
data() {
|
||||
return {
|
||||
component: 'List',
|
||||
params: {},
|
||||
refresh: true,
|
||||
tabIndex: 0,
|
||||
tabs: [
|
||||
{
|
||||
img: require('./components/img/handle-icon.png'),
|
||||
activeImg: require('./components/img/handle-icon-active.png'),
|
||||
text: '办理',
|
||||
component: 'List',
|
||||
},
|
||||
{
|
||||
img: require('./components/img/statistics-icon.png'),
|
||||
activeImg: require('./components/img/statistics-icon-active.png'),
|
||||
text: '统计',
|
||||
component: 'Statistics',
|
||||
},
|
||||
],
|
||||
isTab: true,
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapState(['user']),
|
||||
isGridMember() {
|
||||
return this.user.girdCheckType > 0
|
||||
}
|
||||
},
|
||||
components: {
|
||||
List,
|
||||
Statistics,
|
||||
Set,
|
||||
},
|
||||
|
||||
methods: {
|
||||
onChange(e) {
|
||||
this.params = e.params
|
||||
this.component = e.type
|
||||
},
|
||||
tabClick(index, component) {
|
||||
this.tabIndex = index
|
||||
this.component = component
|
||||
this.refresh = false
|
||||
this.$nextTick(() => {
|
||||
this.refresh = true
|
||||
})
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
document.title = '事件上报'
|
||||
uni.$on('hideTab', () => {
|
||||
this.isTab = false
|
||||
})
|
||||
uni.$on('showTab', () => {
|
||||
this.isTab = true
|
||||
})
|
||||
|
||||
},
|
||||
onReachBottom() {
|
||||
if (!this.tabIndex) {
|
||||
uni.$emit('nextList')
|
||||
}
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.AppHandSnapshot {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.empty {
|
||||
text-align: center;
|
||||
|
||||
img {
|
||||
width: 282px;
|
||||
height: 306px;
|
||||
margin: 136px auto 0;
|
||||
}
|
||||
|
||||
p {
|
||||
font-size: 28px;
|
||||
font-family: PingFangSC-Regular, PingFang SC;
|
||||
color: #999;
|
||||
line-height: 40px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user