Files
dvcp_v2_webapp/project/beta/grid/AppGridMember/AppGridMember.vue

62 lines
1.4 KiB
Vue
Raw Normal View History

2022-05-27 11:51:18 +08:00
<template>
2022-06-06 11:22:15 +08:00
<keep-alive include="GmList">
<component :is="currentPage" v-bind="$props" @change="onChange"/>
</keep-alive>
2022-05-27 11:51:18 +08:00
</template>
<script>
import List from './components/list'
import ApplyList from './components/ApplyList'
import Add from './components/add'
import ApplyDetail from './components/ApplyDetail'
import ApplyAdd from './components/ApplyAdd'
import Family from './components/Family'
import MonitorUser from './components/MonitorUser'
2022-06-06 11:22:15 +08:00
import GmList from "./components/gmList";
2022-05-27 11:51:18 +08:00
export default {
name: "AppGridMember",
label: "网格管理员",
props: {
instance: Function,
dict: Object,
permissions: Function
},
computed: {
2022-06-06 11:22:15 +08:00
currentPage() {
let {hash} = this.$route
return hash == "#Family" ? Family :
hash == "#MonitorUser" ? MonitorUser :
hash == "#Add" ? Add :
hash == "#ApplyAdd" ? ApplyAdd :
hash == "#ApplyDetail" ? ApplyDetail :
GmList
2022-05-27 11:51:18 +08:00
}
},
components: {
2022-06-06 11:22:15 +08:00
GmList,
2022-05-27 11:51:18 +08:00
Add,
List,
Family,
ApplyList,
ApplyDetail,
MonitorUser,
ApplyAdd
},
methods: {
onChange(data) {
2022-06-06 11:22:15 +08:00
let {type, params: query} = data,
hash = ["ApplyList", "list"].includes(type) ? "" : "#" + type
this.$router.push({hash, query})
2022-05-27 11:51:18 +08:00
}
}
}
</script>
<style lang="scss">
.AppGridMember {
height: 100%;
}
</style>