社会资源
This commit is contained in:
@@ -0,0 +1,91 @@
|
||||
<template>
|
||||
<ai-list class="resourceList">
|
||||
<template slot="title">
|
||||
<ai-title title="社会资源" :isShowBottomBorder="true" :isShowArea="true" v-model="areaId" @change="changeAreaId" :instance="instance">
|
||||
<template slot="sub">
|
||||
<div>方便成员能够快速找到指定区域内的社区资源</div>
|
||||
</template>
|
||||
</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 :is="tab.comp" v-if="currIndex === String(i)" :ref="tab.name" v-on="$listeners" :areaId="areaId" v-bind="$props"/>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</template>
|
||||
</ai-list>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import resourceMap from "./resourceMap.vue"
|
||||
import resourceManagement from "./resourceManagement.vue"
|
||||
import resourceClassification from './resourceClassification.vue'
|
||||
import {mapState} from 'vuex'
|
||||
|
||||
export default {
|
||||
name: 'resourceList',
|
||||
components: {
|
||||
resourceMap,
|
||||
resourceManagement,
|
||||
resourceClassification
|
||||
},
|
||||
props: {
|
||||
instance: Function,
|
||||
dict: Object,
|
||||
permissions: Function,
|
||||
},
|
||||
|
||||
data() {
|
||||
return {
|
||||
currIndex: "0",
|
||||
areaId: '',
|
||||
}
|
||||
},
|
||||
|
||||
computed: {
|
||||
...mapState(['user']),
|
||||
tabs() {
|
||||
return [
|
||||
{
|
||||
label: "资源地图",
|
||||
name: "resourceMap",
|
||||
comp: resourceMap,
|
||||
permission: "",
|
||||
},
|
||||
{
|
||||
label: "资源管理",
|
||||
name: "resourceManagement",
|
||||
comp: resourceManagement,
|
||||
permission: "",
|
||||
},
|
||||
{
|
||||
label: "资源分类",
|
||||
name: "resourceClassification",
|
||||
comp: resourceClassification,
|
||||
permission: "",
|
||||
},
|
||||
]
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.areaId = this.user.info.areaId
|
||||
},
|
||||
|
||||
methods: {
|
||||
changeArea() {
|
||||
this.$nextTick(() => {
|
||||
// this.$refs[this.tabs[Number(this.currIndex)].name][0].getList()
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.resourceList {
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user