社会资源

This commit is contained in:
shijingjing
2022-09-30 11:44:35 +08:00
parent 646902cc53
commit b597eb5916
2 changed files with 97 additions and 4 deletions

View File

@@ -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>