Files
dvcp_v2_webapp/project/pingchang/apps/AppNewEconomics/AppNewEconomics.vue
2022-10-21 17:37:41 +08:00

76 lines
1.3 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: []
};
},
// 计算
computed: {},
// 监听
watch: {},
// 实例创建后
created() {},
// 实例创建后
onShow() {},
// 实例渲染后
mounted() {},
// 方法
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>