<template>
    <el-form class="base-form" hide-required-asterisk :model="data" label-width="auto">
        <div class="d-flex j-c a-c" style="padding: 0px 30px 20px;">
            <HAvatar :size="100" :src="data.logo"></HAvatar>
        </div>
        <el-form-item v-if="['4', '6'].includes(data.type)" prop="certLevel" label="认证级别">
            <div class="flex1">
                <template v-if="data.type === '4'">
                    <dict-tag :options="cert_level" :value="data.certLevel"></dict-tag>
                </template>
                <template v-if="data.type === '6'">
                    <dict-tag :options="cert_level1" :value="data.certLevel"></dict-tag>
                </template>
            </div>
        </el-form-item>
        <el-form-item v-if="['7'].includes(data.type)" prop="certName" label="资质认证证书名称">
            {{ data.certName }}
        </el-form-item>
        <el-form-item prop="certFile" label="资质认证证书">
            <div class="flex1">
                <FileLook v-model="data.certFile" :span="18"></FileLook>
            </div>
        </el-form-item>
        <el-form-item prop="validity" label="有效期期限至">
            {{ +data.secularValidity ? '长期有效' : data.validity }}
        </el-form-item>
    </el-form>
</template>
<script setup name="OtherCertMaterials" lang="ts">
import { propTypes } from '@/utils/propTypes';
import { FileLook } from '@/views/models';
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
const props = defineProps({
    data: propTypes.any.def({})
});
const { cert_level, cert_level1 } = toRefs<any>(proxy?.useDict('cert_level', 'cert_level1'));
</script>
