Files
dvcp_v2_webapp/project/xumu/AppDeathManage/AppDeathManage.vue
aixianling b23f8325f4 refactor(xumu): 优化字典数据加载和组件结构
- 移动字典数据加载到父组件 AppDeathManage
- 修复死亡日期和死亡原因的验证规则
- 优化死亡原因的显示逻辑
- 移除子组件中的重复字典数据加载
2025-01-09 11:43:16 +08:00

36 lines
651 B
Vue

<script>
import add from "./add.vue";
import list from "./list.vue";
export default {
name: "AppDeathManage",
label: "死亡登记",
props: {
instance: Function,
dict: Object,
permissions: Function
},
computed: {
currentPage() {
let { hash } = this.$route
return hash == "#add" ? add : list
}
},
created() {
this.dict.load("yesOrNo", "category", "variety", "deathReason", "auditStatus")
}
}
</script>
<template>
<section class="AppDeathManage">
<component :is="currentPage" v-bind="$props" />
</section>
</template>
<style scoped lang="scss">
.AppDeathManage {
height: 100%;
}
</style>