Files
dvcp_v2_webapp/project/qujing/app/AppResidentCredits/AppResidentCredits.vue
yanran200730 c9f8b5939c 居民积分
2023-02-22 15:31:33 +08:00

83 lines
1.9 KiB
Vue

<template>
<ai-list>
<template slot="title">
<ai-title title="居民积分" :isShowArea="currIndex === '0'" :hideLevel="$store.state.user.info.areaList.length - 1" v-model="areaId" :instance="instance" @change="search.current = 1, getList()"></ai-title>
</template>
<template slot="tabs">
<el-tabs v-model="currIndex">
<el-tab-pane v-for="(tab,i) in tabs" :key="i" :label="tab.label">
<component :areaId="areaId" :ref="String(i)" v-if="currIndex == i" :is="tab.comp" @change="onChange" lazy :instance="instance" :dict="dict" :permissions="permissions"/>
</el-tab-pane>
</el-tabs>
</template>
</ai-list>
</template>
<script>
import List from './components/List'
import Rule from './components/Rule'
export default {
name: 'AppResidentCredits',
label: '居民积分',
props: {
instance: Function,
dict: Object,
permissions: Function
},
data () {
return {
component: 'List',
params: {},
currIndex: '0',
areaId: ''
}
},
components: {
List,
Rule
},
computed: {
tabs () {
return [
{label: '居民积分', name: 'List', comp: List, permission: ''},
{label: `积分规则`, name: 'Rule', comp: Rule, permission: ''}
].filter(item => {
return true
})
}
},
created () {
this.areaId = this.$store.state.user.info.areaId
},
methods: {
onChange (data) {
if (data.type === 'List') {
this.component = 'List'
this.params = data.params
this.isShowDetail = false
}
if (data.type === 'Rule') {
this.component = 'Rule'
this.params = data.params
}
}
}
}
</script>
<style lang="scss">
.doc-circulation {
height: 100%;
background: #F3F6F9;
overflow: auto;
}
</style>