Files
dvcp_v2_webapp/project/pingchang/apps/AppNewEconomics/AppNewEconomics.vue
2023-01-09 16:38:58 +08:00

64 lines
1.1 KiB
Vue

<template>
<div class="AppNewEconomics">
<keep-alive :include="['List']">
<component
ref="component"
:is="component"
@change="onChange"
:params="params"
:instance="instance"
:dict="dict"
></component>
</keep-alive>
</div>
</template>
<script>
import List from "./components/List";
import Add from "./components/Add";
export default {
label: "新经济组织管理",
name: "AppNewEconomics",
components: { Add, List },
props: {
instance: Function,
dict: Object,
permissions: Function
},
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.getList();
}
});
}
}
}
};
</script>
<style scoped lang="scss">
.AppNewEconomics {
width: 100%;
height: 100%;
}
</style>