Files
dvcp_v2_webapp/project/pingchang/apps/AppGeneralElection/AppGeneralElection.vue
shijingjing 4fd7e4ee2a 换届选举
2022-10-13 14:42:24 +08:00

58 lines
1.3 KiB
Vue

<template>
<section class="AppGeneralElection">
<keep-alive :include="['electionList']">
<component ref="component" :is="component" :instance="instance" :params="params" :dict="dict" @change="onChange"/>
</keep-alive>
</section>
</template>
<script>
import electionList from "./components/electionList.vue";
import electionAdd from "./components/electionAdd.vue";
export default {
name: "AppGeneralElection",
label: "换届选举",
props: {
instance: Function,
dict: Object,
},
components: {electionAdd, electionList},
data() {
return {
component: "electionList",
params: {},
include: [],
}
},
methods: {
onChange(data) {
if (data.type === "electionAdd") {
this.component = "electionAdd";
this.params = data.params;
}
if (data.type === "electionList") {
this.component = "electionList";
this.params = data.params;
this.$nextTick(() => {
if (data.isRefresh) {
this.$refs.component.getList();
}
});
}
},
},
created() {
// this.dict.load("portalUserStatus", "enterpriseStatus", "userEnterpriseStatus","enterpriseType")
}
}
</script>
<style lang="scss" scoped>
.AppGeneralElection {
height: 100%;
}
</style>