|
@@ -0,0 +1,154 @@
|
|
|
+<template>
|
|
|
+ <el-tabs v-model="activeTab" type="card">
|
|
|
+ <el-tab-pane label="基础信息" name="1">
|
|
|
+ <el-descriptions title="基础信息" :border="true">
|
|
|
+ <el-descriptions-item
|
|
|
+ v-for="(label, key) in baseLabelMap"
|
|
|
+ :key="key"
|
|
|
+ :label="label"
|
|
|
+ >
|
|
|
+ <template v-if="isImageField(key)">
|
|
|
+ <img :src="baseData[key]" alt="商标图片" style="width: 100px; height: auto;" />
|
|
|
+ </template>
|
|
|
+ <template v-else>
|
|
|
+ {{ baseData[key] || '无数据' }}
|
|
|
+ </template>
|
|
|
+ </el-descriptions-item>
|
|
|
+ </el-descriptions>
|
|
|
+ </el-tab-pane>
|
|
|
+ <el-tab-pane label="身份信息" name="2">
|
|
|
+ <el-descriptions title="身份信息" :border="true">
|
|
|
+ <el-descriptions-item
|
|
|
+ v-for="(label, key) in identityLabelMap"
|
|
|
+ :key="key"
|
|
|
+ :label="label"
|
|
|
+ >
|
|
|
+ <template v-if="isImageField(key, 'identity')">
|
|
|
+ <img :src="identityData[key]" alt="身份证图片" style="width: 100px; height: auto;" />
|
|
|
+ </template>
|
|
|
+ <template v-else>
|
|
|
+ {{ identityData[key] || '无数据' }}
|
|
|
+ </template>
|
|
|
+ </el-descriptions-item>
|
|
|
+ </el-descriptions>
|
|
|
+ </el-tab-pane>
|
|
|
+ <el-tab-pane label="企业证件" name="3">
|
|
|
+ <el-descriptions title="企业证件" :border="true">
|
|
|
+ <el-descriptions-item
|
|
|
+ v-for="(label, key) in businessLabelMap"
|
|
|
+ :key="key"
|
|
|
+ :label="label"
|
|
|
+ >
|
|
|
+ <template v-if="isImageField(key, 'business')">
|
|
|
+ <img :src="businessData[key]" alt="企业证件图片" style="width: 100px; height: auto;" />
|
|
|
+ </template>
|
|
|
+ <template v-else>
|
|
|
+ {{ businessData[key] || '无数据' }}
|
|
|
+ </template>
|
|
|
+ </el-descriptions-item>
|
|
|
+ </el-descriptions>
|
|
|
+ </el-tab-pane>
|
|
|
+ <el-tab-pane label="下载列表" name="4">
|
|
|
+ <el-table :data="downloadsUrlList" style="width: 100%">
|
|
|
+ <el-table-column prop="file_name" label="文件名称" />
|
|
|
+ <el-table-column label="操作" width="150">
|
|
|
+ <template #default="{ row }">
|
|
|
+ <el-button @click="downloadFile(row.url)" type="primary">下载</el-button>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ </el-tab-pane>
|
|
|
+ </el-tabs>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script setup lang="ts">
|
|
|
+import { ref, defineProps, computed } from 'vue';
|
|
|
+
|
|
|
+const props = defineProps<{
|
|
|
+ data: Record<string, any>; // 接收完整的数据
|
|
|
+}>();
|
|
|
+
|
|
|
+// 选中的 tab
|
|
|
+const activeTab = ref('1');
|
|
|
+
|
|
|
+// 基础信息
|
|
|
+const baseData = computed(() => ({
|
|
|
+ logoRegistrationNumber: props.data.logoRegistrationNumber,
|
|
|
+ isLogoModify: props.data.isLogoModify,
|
|
|
+ logoPath: props.data.logoPath,
|
|
|
+ applicantType: props.data.applicantType,
|
|
|
+ country: props.data.country,
|
|
|
+ corporationsName: props.data.corporationsName,
|
|
|
+ contactDetails: props.data.contactDetails,
|
|
|
+ operationStatus: props.data.operationStatus,
|
|
|
+ createTime: props.data.createTime,
|
|
|
+ updateTime: props.data.updateTime
|
|
|
+}));
|
|
|
+
|
|
|
+const baseLabelMap = {
|
|
|
+ logoRegistrationNumber: '商标注册号',
|
|
|
+ isLogoModify: '商标图样是否变更',
|
|
|
+ logoPath: '商标图片',
|
|
|
+ applicantType: '申请人类型',
|
|
|
+ country: '国家',
|
|
|
+ corporationsName: '企业名称',
|
|
|
+ contactDetails: '联系方式',
|
|
|
+ operationStatus: '操作状态',
|
|
|
+ createTime: '创建时间',
|
|
|
+ updateTime: '更新时间'
|
|
|
+};
|
|
|
+
|
|
|
+// 身份信息
|
|
|
+const identityData = computed(() => ({
|
|
|
+ applicant: props.data.applicant,
|
|
|
+ idCard: props.data.idCard,
|
|
|
+ idCardPositivelyPath: props.data.idCardPositivelyPath,
|
|
|
+ idCardBacksidePath: props.data.idCardBacksidePath
|
|
|
+}));
|
|
|
+
|
|
|
+const identityLabelMap = {
|
|
|
+ applicant: '申请人',
|
|
|
+ idCard: '证件号',
|
|
|
+ idCardPositivelyPath: '身份证正面',
|
|
|
+ idCardBacksidePath: '身份证反面'
|
|
|
+};
|
|
|
+
|
|
|
+// 企业证件
|
|
|
+const businessData = computed(() => ({
|
|
|
+ businessLicensePath: props.data.businessLicensePath,
|
|
|
+ authorizationPath: props.data.authorizationPath,
|
|
|
+ sealPath: props.data.sealPath
|
|
|
+}));
|
|
|
+
|
|
|
+const businessLabelMap = {
|
|
|
+ businessLicensePath: '营业执照',
|
|
|
+ authorizationPath: '委托书',
|
|
|
+ sealPath: '公章'
|
|
|
+};
|
|
|
+
|
|
|
+// 下载列表
|
|
|
+const downloadsUrlList = computed(() => props.data.downloadsUrlList);
|
|
|
+
|
|
|
+// 下载文件的方法
|
|
|
+const downloadFile = (url: string) => {
|
|
|
+ const link = document.createElement("a");
|
|
|
+ link.href = url;
|
|
|
+ link.setAttribute("download", ""); // 设置为下载链接
|
|
|
+ document.body.appendChild(link);
|
|
|
+ link.click(); // 触发下载
|
|
|
+ document.body.removeChild(link); // 移除链接元素
|
|
|
+};
|
|
|
+
|
|
|
+// 判断字段是否为图片
|
|
|
+const isImageField = (key: string, type: string = 'base') => {
|
|
|
+ if (type === 'identity') {
|
|
|
+ return key === 'idCardPositivelyPath' || key === 'idCardBacksidePath';
|
|
|
+ } else if (type === 'business') {
|
|
|
+ return key === 'businessLicensePath' || key === 'authorizationPath' || key === 'sealPath';
|
|
|
+ }
|
|
|
+ return key === 'logoPath';
|
|
|
+};
|
|
|
+</script>
|
|
|
+
|
|
|
+<style scoped>
|
|
|
+</style>
|