Files
dvcp_v2_webapp/project/xumu/AppAuthManage/AppAuthManage.vue
aixianling ae83152271 refactor(xumu): 重构 AppAuthManage 组件
- 移除 certificates 常量的单独定义
- 将 certificates 数据移至 data 函数内部
-优化代码结构,提高组件的可维护性
2024-12-24 16:15:04 +08:00

44 lines
1.0 KiB
Vue

<script>
import authAdd from "./authAdd.vue";
import authList from "./authList.vue";
export default {
name: "AppAuthManage",
label: "认证审核",
props: {
instance: Function,
dict: Object,
permissions: Function
},
computed: {
currentPage() {
let {hash} = this.$route
return hash == "#add" ? authAdd : authList
}
},
data(){
return {
certificates:[
{label: "身份证(正面)", prop: "frontCard"},
{label: "身份证(反面)", prop: "reverseCard"},
{label: "营业执照", prop: "businessPic", permit: ["breed"]},
{label: "畜禽经营许可证", prop: "breedPic", permit: ["breed"]},
{label: "动物防疫条件许可证", prop: "prevention", permit: ["breed"]},
{label: "组织机构证明", prop: "orgPic", permit: ["bank", "insurance"]},
]
}
}
}
</script>
<template>
<section class="AppAuthManage">
<component :is="currentPage" v-bind="$props"/>
</section>
</template>
<style scoped lang="scss">
.AppAuthManage {
height: 100%;
}
</style>