Files
dvcp_v2_webapp/core/apps/AppMassNotification/AppMassNotification.vue
shijingjing 8ebac73812 群发通知
2022-06-13 17:18:21 +08:00

55 lines
1.1 KiB
Vue

<template>
<section class="AppMassNotification">
<keep-alive :include="['List']">
<component ref="component" :is="component" :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: [],
}
},
methods: {
onChange(data) {
if (data.type === "Add") {
this.component = "Add";
this.params = data.params;
}
if (data.type === "List") {
this.component = "List";
this.params = data.params;
this.$nextTick(() => {
if (data.isRefresh) {
this.$refs.component.getTableData();
}
});
}
},
},
}
</script>
<style lang="scss" scoped>
.AppMassNotification {
height: 100%;
}
</style>