AchPatentAuthForm.vue 6.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166
  1. <template>
  2. <view class="document-form">
  3. <uv-loading-icon v-if="loading" mode="circle" text="正在加载专利授权详情..."></uv-loading-icon>
  4. <template v-else-if="form">
  5. <!-- 基本信息 -->
  6. <CommonSection title="基本信息" :isFirst="true">
  7. <CommonInfoRow label="专利名称" :value="form.patentName" />
  8. <CommonInfoRow label="所属科室" :value="form.deptName" />
  9. <CommonInfoRow label="专利类型" :value="getDictLabel('sci_patent_class', form.patentClass)" />
  10. <CommonInfoRow label="专利范围" :value="getDictLabel('sci_patent_scope', form.patentScope)" />
  11. <CommonInfoRow label="专利状态" :value="getDictLabel('sci_patent_condition', form.patentCondition)" />
  12. <CommonInfoRow label="专利(申请)号" :value="form.patentNumber" />
  13. <CommonInfoRow label="申请人" :value="form.applicantName" />
  14. <CommonInfoRow label="第几参与人" :value="form.patentApplicationCode" />
  15. <CommonInfoRow label="申请日期" :value="formatDate(form.patentApplicationDate)" />
  16. <CommonInfoRow label="发明人" :value="showMembers(form.memberList)" />
  17. <CommonInfoRow label="分类号" :value="form.classNum" />
  18. <CommonInfoRow label="公开号" :value="form.patentPublicCode" />
  19. <CommonInfoRow label="公开日期" :value="formatDate(form.patentPublicDate)" />
  20. <CommonInfoRow label="授权号" :value="form.patentAccreditCode" />
  21. <CommonInfoRow label="授权日期" :value="formatDate(form.effectiveTime)" />
  22. <CommonInfoRow label="署名" :value="getDictLabel('sci_circuit_signature', form.patentSchoolSignature)" />
  23. <CommonInfoRow label="专利权人" :value="form.patentObligee" />
  24. <CommonInfoRow label="专利代理机构" :value="form.entrustUnit" />
  25. <CommonInfoRow label="代理人" :value="form.agencyUserName" />
  26. <CommonInfoRow label="代理人联系电话" :value="form.agencyPhone" />
  27. <CommonInfoRow label="专利文献出版日" :value="formatDate(form.publicationDate)" />
  28. <CommonInfoRow label="所属年份" :value="form.patentYeat" />
  29. <CommonInfoRow label="是否失效" :value="form.patentEffectiveness === '10' ? '是' : '否'" />
  30. <CommonInfoRow label="成果权属" :value="getDictLabel('achievement_owner_unit', form.achievementOwnerUnit)" />
  31. <CommonInfoRow label="是否职务专利" :value="form.patentOffice === '10' ? '是' : '否'" />
  32. <CommonInfoRow label="是否为PCT专利" :value="form.patentCt === '10' ? '是' : '否'" />
  33. <CommonInfoRow label="所属平台" isColumn>
  34. <view class="platform-tags">
  35. <template v-if="platformList.length > 0">
  36. <uv-tags v-for="(p, index) in platformList" :key="index" :text="p.platformName === '其他' ? '其他' : (p.platformType ? p.platformName + ' (' + p.platformType + ')' : p.platformName)" type="primary" plain size="mini" class="mr5"></uv-tags>
  37. </template>
  38. <text v-else>-</text>
  39. </view>
  40. </CommonInfoRow>
  41. <CommonInfoRow label="所属团队" :value="form.belongTeam || '-'" />
  42. <!-- 专利转化特有字段 -->
  43. <template v-if="code.includes('专利转化')">
  44. <CommonInfoRow label="转化时间" :value="formatDate(form.invertTime)" />
  45. <CommonInfoRow label="转化金额" :value="(form.invertAmount || '0') + ' 元'" isAmount />
  46. <CommonInfoRow label="转化单位" :value="form.invertUnit" />
  47. <CommonInfoRow label="知识产权交易类型" :value="form.tradeType === '10' ? '转让' : form.tradeType === '20' ? '许可' : '-'" />
  48. </template>
  49. <CommonInfoRow label="专利简介" :value="form.patentDesc" isColumn />
  50. </CommonSection>
  51. <!-- 标注经济来源 -->
  52. <CommonSection title="标注经济来源" v-if="form.projList?.length">
  53. <view class="achievement-card" v-for="(row, index) in form.projList" :key="index">
  54. <view class="a-row">
  55. <text class="al">关联类型:</text>
  56. <text class="av">{{ row.sourceType === '10' ? '项目' : '学科' }}</text>
  57. </view>
  58. <view class="a-row">
  59. <text class="al">项目/学科:</text>
  60. <text class="av">{{ row.projectSource || '-' }}</text>
  61. </view>
  62. </view>
  63. </CommonSection>
  64. <!-- 附件信息 -->
  65. <AttachmentList :list="mergedFileList" title="相关附件" />
  66. </template>
  67. <uv-empty v-else mode="data" text="暂无数据"></uv-empty>
  68. </view>
  69. </template>
  70. <script setup lang="ts">
  71. import { ref, onMounted, watch, computed } from 'vue';
  72. import { useDict } from '@/hooks/useDict';
  73. import { useDocumentApi } from '@/api/document';
  74. import { formatDate } from '@/utils/date';
  75. import to from 'await-to-js';
  76. import AttachmentList from './AttachmentList.vue';
  77. import CommonSection from '@/components/ui/CommonSection.vue';
  78. import CommonInfoRow from '@/components/ui/CommonInfoRow.vue';
  79. const props = defineProps<{
  80. code: string;
  81. }>();
  82. const { getDictLabel } = useDict(
  83. 'sci_patent_class',
  84. 'sci_patent_scope',
  85. 'sci_patent_condition',
  86. 'sci_circuit_signature',
  87. 'achievement_owner_unit'
  88. );
  89. const documentApi = useDocumentApi();
  90. const form = ref<any>(null);
  91. const loading = ref(false);
  92. const platformList = computed(() => {
  93. if (form.value?.belongPlatform) {
  94. try {
  95. const data = JSON.parse(form.value.belongPlatform);
  96. return Array.isArray(data) ? data : [];
  97. } catch (e) {
  98. if (form.value.belongPlatform === '其他') return [{ platformName: '其他' }];
  99. return [{ platformName: form.value.belongPlatform }];
  100. }
  101. }
  102. return [];
  103. });
  104. const mergedFileList = computed(() => {
  105. if (!form.value) return [];
  106. const list: any[] = [];
  107. if (form.value.patentFile) {
  108. try {
  109. const file = JSON.parse(form.value.patentFile);
  110. list.push({ ...file, fileType: '专利附件' });
  111. } catch (e) {}
  112. }
  113. if (form.value.agencyContractFile) {
  114. try {
  115. const file = JSON.parse(form.value.agencyContractFile);
  116. list.push({ ...file, fileType: '委托合同' });
  117. } catch (e) {}
  118. }
  119. if (form.value.invertUrl) {
  120. try {
  121. const file = JSON.parse(form.value.invertUrl);
  122. list.push({ ...file, fileType: '转化附件' });
  123. } catch (e) {}
  124. }
  125. return list;
  126. });
  127. const fetchData = async () => {
  128. if (!props.code) return;
  129. loading.value = true;
  130. const patentCode = props.code.includes('-') ? props.code.split('-')[1] : props.code;
  131. const [err, res] = await to(documentApi.getPatentByCode(patentCode));
  132. if (!err && res?.data) {
  133. form.value = res.data;
  134. }
  135. loading.value = false;
  136. };
  137. onMounted(() => {
  138. fetchData();
  139. });
  140. watch(() => props.code, () => {
  141. fetchData();
  142. });
  143. const showMembers = (list: any[]) => {
  144. return list?.map(m => m.memberName).join(', ') || '-';
  145. };
  146. </script>
  147. <style lang="scss" scoped>
  148. @import "./common.scss";
  149. </style>