AchPatentAuthForm.vue 6.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168
  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="所属平台">
  34. <view class="platform-tags">
  35. <template v-if="platformList.length > 0">
  36. <text v-for="(p, index) in platformList" :key="index" class="platform-tag">
  37. {{ p.platformName }}
  38. </text>
  39. </template>
  40. <text v-else>-</text>
  41. </view>
  42. </CommonInfoRow>
  43. <CommonInfoRow label="所属团队" :value="form.belongTeam || '-'" />
  44. <!-- 专利转化特有字段 -->
  45. <template v-if="code.includes('专利转化')">
  46. <CommonInfoRow label="转化时间" :value="formatDate(form.invertTime)" />
  47. <CommonInfoRow label="转化金额" :value="(form.invertAmount || '0') + ' 元'" isAmount />
  48. <CommonInfoRow label="转化单位" :value="form.invertUnit" />
  49. <CommonInfoRow label="知识产权交易类型" :value="form.tradeType === '10' ? '转让' : form.tradeType === '20' ? '许可' : '-'" />
  50. </template>
  51. <CommonInfoRow label="专利简介" :value="form.patentDesc" isColumn />
  52. </CommonSection>
  53. <!-- 标注经济来源 -->
  54. <CommonSection title="标注经济来源" v-if="form.projList?.length">
  55. <view class="achievement-card" v-for="(row, index) in form.projList" :key="index">
  56. <view class="a-row">
  57. <text class="al">关联类型:</text>
  58. <text class="av">{{ row.sourceType === '10' ? '项目' : '学科' }}</text>
  59. </view>
  60. <view class="a-row">
  61. <text class="al">项目/学科:</text>
  62. <text class="av">{{ row.projectSource || '-' }}</text>
  63. </view>
  64. </view>
  65. </CommonSection>
  66. <!-- 附件信息 -->
  67. <AttachmentList :list="mergedFileList" title="相关附件" />
  68. </template>
  69. <uv-empty v-else mode="data" text="暂无数据"></uv-empty>
  70. </view>
  71. </template>
  72. <script setup lang="ts">
  73. import { ref, onMounted, watch, computed } from 'vue';
  74. import { useDict } from '@/hooks/useDict';
  75. import { useDocumentApi } from '@/api/document';
  76. import { formatDate } from '@/utils/date';
  77. import to from 'await-to-js';
  78. import AttachmentList from './AttachmentList.vue';
  79. import CommonSection from '@/components/ui/CommonSection.vue';
  80. import CommonInfoRow from '@/components/ui/CommonInfoRow.vue';
  81. const props = defineProps<{
  82. code: string;
  83. }>();
  84. const { getDictLabel } = useDict(
  85. 'sci_patent_class',
  86. 'sci_patent_scope',
  87. 'sci_patent_condition',
  88. 'sci_circuit_signature',
  89. 'achievement_owner_unit'
  90. );
  91. const documentApi = useDocumentApi();
  92. const form = ref<any>(null);
  93. const loading = ref(false);
  94. const platformList = computed(() => {
  95. if (form.value?.belongPlatform) {
  96. try {
  97. const data = JSON.parse(form.value.belongPlatform);
  98. return Array.isArray(data) ? data : [];
  99. } catch (e) {
  100. if (form.value.belongPlatform === '其他') return [{ platformName: '其他' }];
  101. return [{ platformName: form.value.belongPlatform }];
  102. }
  103. }
  104. return [];
  105. });
  106. const mergedFileList = computed(() => {
  107. if (!form.value) return [];
  108. const list: any[] = [];
  109. if (form.value.patentFile) {
  110. try {
  111. const file = JSON.parse(form.value.patentFile);
  112. list.push({ ...file, fileType: '专利附件' });
  113. } catch (e) {}
  114. }
  115. if (form.value.agencyContractFile) {
  116. try {
  117. const file = JSON.parse(form.value.agencyContractFile);
  118. list.push({ ...file, fileType: '委托合同' });
  119. } catch (e) {}
  120. }
  121. if (form.value.invertUrl) {
  122. try {
  123. const file = JSON.parse(form.value.invertUrl);
  124. list.push({ ...file, fileType: '转化附件' });
  125. } catch (e) {}
  126. }
  127. return list;
  128. });
  129. const fetchData = async () => {
  130. if (!props.code) return;
  131. loading.value = true;
  132. const patentCode = props.code.includes('-') ? props.code.split('-')[1] : props.code;
  133. const [err, res] = await to(documentApi.getPatentByCode(patentCode));
  134. if (!err && res?.data) {
  135. form.value = res.data;
  136. }
  137. loading.value = false;
  138. };
  139. onMounted(() => {
  140. fetchData();
  141. });
  142. watch(() => props.code, () => {
  143. fetchData();
  144. });
  145. const showMembers = (list: any[]) => {
  146. return list?.map(m => m.memberName).join(', ') || '-';
  147. };
  148. </script>
  149. <style lang="scss" scoped>
  150. @import "./common.scss";
  151. </style>