Files
dvcp_v2_webapp/packages/wxwork/AppMassNotification/AppMassNotification.vue
liuye b9964d64b0 fix
2022-06-28 09:15:10 +08:00

51 lines
1006 B
Vue

<template>
<section class="AppMassNotification">
<keep-alive :include="['List']">
<component ref="component" :is="currentPage" :instance="instance" :params="params" :dict="dict" @change="onChange"/>
</keep-alive>
</section>
</template>
<script>
import List from "./components/List.vue";
import Add from "./components/Add.vue";
export default {
name: "AppMassNotification",
label: "群发通知",
props: {
instance: Function,
dict: Object,
},
components: {Add, List},
data() {
return {
component: "List",
params: {},
include: [],
}
},
computed: {
currentPage() {
const {hash} = this.$route
return hash == "#add" ? Add : List
},
},
methods: {
onChange(data) {
if (data.type === "Add") {
this.$router.push({hash: "#add", query: data.params})
} else {
this.$router.push({})
}
},
},
}
</script>
<style lang="scss" scoped>
.AppMassNotification {
height: 100%;
}
</style>