2024-12-18 18:03:35 +08:00
|
|
|
<script>
|
2024-12-19 18:04:12 +08:00
|
|
|
import AiUploader from "dui/packages/basic/AiUploader.vue";
|
|
|
|
|
|
|
|
|
|
const 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"]},
|
|
|
|
|
]
|
2024-12-18 18:03:35 +08:00
|
|
|
export default {
|
2024-12-19 18:04:12 +08:00
|
|
|
name: "authAdd",
|
|
|
|
|
components: {AiUploader},
|
|
|
|
|
props: {
|
|
|
|
|
instance: Function,
|
|
|
|
|
permissions: Function
|
|
|
|
|
},
|
|
|
|
|
data() {
|
|
|
|
|
return {
|
|
|
|
|
certificates,
|
|
|
|
|
detail: {},
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
|
|
|
|
getDetail() {
|
|
|
|
|
const {id} = this.$route.query
|
|
|
|
|
this.instance.post("/user/auth/page", null, {params: {id}}).then(res => {
|
|
|
|
|
if (res?.data) {
|
|
|
|
|
this.detail = res.data|| {}
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
getNeedCerts(type) {
|
|
|
|
|
return certificates.filter(e => !e.permit || e.permit.includes(type))
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
created() {
|
|
|
|
|
this.getDetail()
|
|
|
|
|
}
|
2024-12-18 18:03:35 +08:00
|
|
|
}
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<template>
|
2024-12-19 18:04:12 +08:00
|
|
|
<ai-page title="认证材料" class="authAdd" showBack content-string="detail">
|
|
|
|
|
<el-form size="small">
|
|
|
|
|
<ai-card title="认证材料">
|
|
|
|
|
<div class="grid">
|
|
|
|
|
<el-form-item v-for="(op,i) in getNeedCerts(detail.type)" :key="i" v-bind="op" :rules="{required:true,message:`请上传${op.label}`,trigger:'change'}">
|
|
|
|
|
<el-image v-model="detail[op.prop]" :preview-src-list="[detail[op.prop]]"/>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</div>
|
|
|
|
|
</ai-card>
|
|
|
|
|
<ai-card title="审核意见"></ai-card>
|
|
|
|
|
</el-form>
|
|
|
|
|
</ai-page>
|
2024-12-18 18:03:35 +08:00
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<style scoped lang="scss">
|
|
|
|
|
.authAdd {
|
|
|
|
|
}
|
|
|
|
|
</style>
|