| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212 |
- <template>
- <view class="document-form">
- <uv-loading-icon v-if="loading" mode="circle" text="正在加载成果转化详情..."></uv-loading-icon>
- <template v-else-if="form">
- <!-- 成果基本信息 (根据成果类型显示) -->
- <!-- 专利类 -->
- <template v-if="form.achievementType === '10'">
- <CommonSection title="成果信息 (专利)" :isFirst="true">
- <CommonInfoRow label="专利名称" :value="form.patentName" />
- <CommonInfoRow label="专利号" :value="form.patentNumber" />
- <CommonInfoRow label="专利类型" :value="getDictLabel('patent_class', form.patentClass)" />
- <CommonInfoRow label="专利范围" :value="getDictLabel('patent_scope', form.patentScope)" />
- <CommonInfoRow label="权利人" :value="form.patentObligee" />
- <CommonInfoRow label="所属单位" :value="form.deptName" />
- <CommonInfoRow label="所属平台">
- <view class="platform-tags">
- <template v-if="platformList.length > 0">
- <uv-tags v-for="(item, index) in platformList" :key="index" :text="item.platformName === '其他' ? '其他' : (item.platformType ? item.platformName + ' (' + item.platformType + ')' : item.platformName)" type="primary" plain size="mini" class="mr5"></uv-tags>
- </template>
- <text v-else>-</text>
- </view>
- </CommonInfoRow>
- <CommonInfoRow label="所属团队" :value="form.belongTeam || '-'" />
- <CommonInfoRow label="授权号" :value="form.patentAccreditCode" />
- <CommonInfoRow label="授权日期" :value="formatDate(form.effectiveTime)" />
- <CommonInfoRow label="是否职务专利" :value="form.patentOffice === '10' ? '是' : form.patentOffice === '20' ? '否' : '-'" />
- <CommonInfoRow label="是否PCT专利" :value="form.patentCt === '10' ? '是' : form.patentCt === '20' ? '否' : '-'" />
- <CommonInfoRow label="专利简介" :value="form.patentDesc" isColumn />
- </CommonSection>
- <!-- 发明(设计)人信息 -->
- <CommonSection title="发明(设计)人信息" v-if="form.memberList?.length">
- <view class="member-list">
- <view class="member-item" v-for="(member, index) in form.memberList" :key="index">
- <view class="member-header">
- <view class="m-left">
- <text class="m-name">{{ member.memberName }}</text>
- <text class="m-type-tag blue">{{ getDictLabel('paper_member_type', member.memberType) }}</text>
- </view>
- <text class="m-tag" v-if="member.contributionRate">{{ member.contributionRate }}%</text>
- </view>
- <view class="m-body">
- <view class="m-line"><text class="l">学位:</text><text class="v">{{ getDictLabel('academic_degree', member.degree) || '-' }}</text></view>
- <view class="m-line"><text class="l">职称:</text><text class="v">{{ getDictLabel('discipline_job_title', member.jobTitle) || '-' }}</text></view>
- </view>
- </view>
- </view>
- </CommonSection>
- </template>
- <!-- 软件类 -->
- <template v-else-if="form.achievementType === '20'">
- <CommonSection title="成果信息 (软件)" :isFirst="true">
- <CommonInfoRow label="软件名称" :value="form.softwareName" />
- <CommonInfoRow label="版本号" :value="form.version" />
- <CommonInfoRow label="著作权人" :value="form.applicant" />
- <CommonInfoRow label="权利取得方式" :value="getDictLabel('rights_acquire_method', form.rightsAcquireMethod)" />
- <CommonInfoRow label="所属单位" :value="form.organization" />
- <CommonInfoRow label="所属平台">
- <view class="platform-tags">
- <template v-if="platformList.length > 0">
- <uv-tags v-for="(item, index) in platformList" :key="index" :text="item.platformName === '其他' ? '其他' : (item.platformType ? item.platformName + ' (' + item.platformType + ')' : item.platformName)" type="primary" plain size="mini" class="mr5"></uv-tags>
- </template>
- <text v-else>-</text>
- </view>
- </CommonInfoRow>
- <CommonInfoRow label="所属团队" :value="form.belongTeam || '-'" />
- <CommonInfoRow label="开发完成日期" :value="formatDate(form.developmentFinishDate)" />
- <CommonInfoRow label="首次发表日期" :value="formatDate(form.firstPublishDate)" />
- <CommonInfoRow label="成果权属" :value="getDictLabel('achievement_owner_unit', form.achievementOwnerUnit)" />
- <CommonInfoRow label="权利范围" :value="getDictLabel('rights_scope', form.rightsScope)" />
- <CommonInfoRow label="开发方式" :value="getDictLabel('development_method', form.developmentMethod)" />
- <CommonInfoRow label="合作单位" :value="form.partnerUnit" />
- <CommonInfoRow label="备注" :value="form.remark" isColumn />
- </CommonSection>
- </template>
- <!-- 其他类 -->
- <template v-else>
- <CommonSection title="成果信息" :isFirst="true">
- <CommonInfoRow label="成果名称" :value="form.achievementName" />
- <CommonInfoRow label="成果类型" :value="getDictLabel('other_achieve_type', form.achievementType)" />
- <CommonInfoRow label="获得日期" :value="formatDate(form.acquireTime)" />
- <CommonInfoRow label="所属单位" :value="form.organization" />
- <CommonInfoRow label="所属平台">
- <view class="platform-tags">
- <template v-if="platformList.length > 0">
- <uv-tags v-for="(item, index) in platformList" :key="index" :text="item.platformName === '其他' ? '其他' : (item.platformType ? item.platformName + ' (' + item.platformType + ')' : item.platformName)" type="primary" plain size="mini" class="mr5"></uv-tags>
- </template>
- <text v-else>-</text>
- </view>
- </CommonInfoRow>
- <CommonInfoRow label="所属团队" :value="form.belongTeam || '-'" />
- <CommonInfoRow label="成果权属" :value="getDictLabel('achievement_owner_unit', form.achievementOwnerUnit)" />
- <CommonInfoRow label="备注" :value="form.remark" isColumn />
- </CommonSection>
- </template>
- <!-- 转化信息 -->
- <CommonSection title="转化详情">
- <CommonInfoRow label="转化时间" :value="formatDate(form.conversionDate)" />
- <CommonInfoRow label="转化金额" :value="'¥' + (form.conversionAmount || 0)" isAmount />
- <CommonInfoRow label="转化单位" :value="form.conversionUnit" />
- <CommonInfoRow label="转化方式" :value="formatDictList('conversion_type', form.conversionType)" />
- <CommonInfoRow label="成熟度" :value="formatDictList('trl_level', form.trlLevel)" />
- <CommonInfoRow label="成果水平" :value="getDictLabel('achievement_level', form.achievementLevel)" />
- <CommonInfoRow label="成果体现形式" :value="getDictLabel('results_display_form', form.displayForm)" />
- <CommonInfoRow label="国民经济领域" :value="formatDictList('economy_sector', form.economySector)" />
- <CommonInfoRow label="战略布局领域" :value="formatDictList('strategic_domain', form.strategicDomain)" />
- <CommonInfoRow label="制造业集群" :value="formatDictList('manufacturing_cluster', form.manufacturingCluster)" />
- <CommonInfoRow label="是否成立企业" :value="form.isCompany === '10' ? '是' : form.isCompany === '20' ? '否' : '-'" />
- <CommonInfoRow v-if="form.isCompany === '10'" label="企业名称" :value="form.companyName" />
- <CommonInfoRow label="成果简介" :value="form.remark" isColumn />
- </CommonSection>
- <!-- 附件信息 -->
- <AttachmentList :list="mergedFileList" title="电子附件" />
- </template>
- <uv-empty v-else mode="data" text="暂无数据"></uv-empty>
- </view>
- </template>
- <script setup lang="ts">
- import { ref, onMounted, watch, computed } from 'vue';
- import { useDict } from '@/hooks/useDict';
- import { useDocumentApi } from '@/api/document';
- import { formatDate } from '@/utils/date';
- import to from 'await-to-js';
- import AttachmentList from './AttachmentList.vue';
- import CommonSection from '@/components/ui/CommonSection.vue';
- import CommonInfoRow from '@/components/ui/CommonInfoRow.vue';
- const props = defineProps<{
- code: string | number;
- }>();
- const { getDictLabel } = useDict(
- 'patent_class', 'patent_scope', 'rights_acquire_method', 'other_achieve_type',
- 'conversion_type', 'trl_level', 'achievement_level', 'results_display_form',
- 'economy_sector', 'strategic_domain', 'manufacturing_cluster',
- 'paper_member_type', 'academic_degree', 'discipline_job_title',
- 'achievement_owner_unit', 'development_method', 'rights_scope'
- );
- const documentApi = useDocumentApi();
- const form = ref<any>(null);
- const loading = ref(false);
- const platformList = computed(() => {
- if (form.value?.belongPlatform) {
- try {
- const data = JSON.parse(form.value.belongPlatform);
- if (Array.isArray(data) && data.length > 0) {
- return data;
- }
- } catch (e) {
- return [];
- }
- }
- return [];
- });
- const formatDictList = (dictType: string, values: any) => {
- if (!values) return '-';
- const valList = Array.isArray(values) ? values : String(values).split(',');
- return valList.map(v => getDictLabel(dictType, v)).join(', ') || '-';
- };
- const mergedFileList = computed(() => {
- if (!form.value) return [];
- const list: any[] = [];
-
- // 成果附件
- const achieveFiles = form.value.fileList || form.value.uploadList || [];
- if (Array.isArray(achieveFiles)) {
- achieveFiles.forEach(f => list.push({ fileName: f.name, fileUrl: f.url, fileType: '成果附件' }));
- }
-
- // 转化附件
- const conversionFiles = form.value.conversionList || [];
- if (Array.isArray(conversionFiles)) {
- conversionFiles.forEach(f => list.push({ fileName: f.name, fileUrl: f.url, fileType: '转化附件' }));
- }
-
- return list;
- });
- const fetchData = async () => {
- if (!props.code) return;
- loading.value = true;
- const [err, res] = await to(documentApi.getConversionByCode(props.code));
- if (!err && res?.data) {
- form.value = res.data;
- }
- loading.value = false;
- };
- onMounted(() => {
- fetchData();
- });
- watch(() => props.code, () => {
- fetchData();
- });
- </script>
- <style lang="scss" scoped>
- @import "./common.scss";
- </style>
|