AchPatentForm.vue 7.9 KB

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