AchConversionForm.vue 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212
  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. <!-- 专利类 -->
  7. <template v-if="form.achievementType === '10'">
  8. <CommonSection title="成果信息 (专利)" :isFirst="true">
  9. <CommonInfoRow label="专利名称" :value="form.patentName" />
  10. <CommonInfoRow label="专利号" :value="form.patentNumber" />
  11. <CommonInfoRow label="专利类型" :value="getDictLabel('patent_class', form.patentClass)" />
  12. <CommonInfoRow label="专利范围" :value="getDictLabel('patent_scope', form.patentScope)" />
  13. <CommonInfoRow label="权利人" :value="form.patentObligee" />
  14. <CommonInfoRow label="所属单位" :value="form.deptName" />
  15. <CommonInfoRow label="所属平台">
  16. <view class="platform-tags">
  17. <template v-if="platformList.length > 0">
  18. <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>
  19. </template>
  20. <text v-else>-</text>
  21. </view>
  22. </CommonInfoRow>
  23. <CommonInfoRow label="所属团队" :value="form.belongTeam || '-'" />
  24. <CommonInfoRow label="授权号" :value="form.patentAccreditCode" />
  25. <CommonInfoRow label="授权日期" :value="formatDate(form.effectiveTime)" />
  26. <CommonInfoRow label="是否职务专利" :value="form.patentOffice === '10' ? '是' : form.patentOffice === '20' ? '否' : '-'" />
  27. <CommonInfoRow label="是否PCT专利" :value="form.patentCt === '10' ? '是' : form.patentCt === '20' ? '否' : '-'" />
  28. <CommonInfoRow label="专利简介" :value="form.patentDesc" isColumn />
  29. </CommonSection>
  30. <!-- 发明(设计)人信息 -->
  31. <CommonSection title="发明(设计)人信息" v-if="form.memberList?.length">
  32. <view class="member-list">
  33. <view class="member-item" v-for="(member, index) in form.memberList" :key="index">
  34. <view class="member-header">
  35. <view class="m-left">
  36. <text class="m-name">{{ member.memberName }}</text>
  37. <text class="m-type-tag blue">{{ getDictLabel('paper_member_type', member.memberType) }}</text>
  38. </view>
  39. <text class="m-tag" v-if="member.contributionRate">{{ member.contributionRate }}%</text>
  40. </view>
  41. <view class="m-body">
  42. <view class="m-line"><text class="l">学位:</text><text class="v">{{ getDictLabel('academic_degree', member.degree) || '-' }}</text></view>
  43. <view class="m-line"><text class="l">职称:</text><text class="v">{{ getDictLabel('discipline_job_title', member.jobTitle) || '-' }}</text></view>
  44. </view>
  45. </view>
  46. </view>
  47. </CommonSection>
  48. </template>
  49. <!-- 软件类 -->
  50. <template v-else-if="form.achievementType === '20'">
  51. <CommonSection title="成果信息 (软件)" :isFirst="true">
  52. <CommonInfoRow label="软件名称" :value="form.softwareName" />
  53. <CommonInfoRow label="版本号" :value="form.version" />
  54. <CommonInfoRow label="著作权人" :value="form.applicant" />
  55. <CommonInfoRow label="权利取得方式" :value="getDictLabel('rights_acquire_method', form.rightsAcquireMethod)" />
  56. <CommonInfoRow label="所属单位" :value="form.organization" />
  57. <CommonInfoRow label="所属平台">
  58. <view class="platform-tags">
  59. <template v-if="platformList.length > 0">
  60. <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>
  61. </template>
  62. <text v-else>-</text>
  63. </view>
  64. </CommonInfoRow>
  65. <CommonInfoRow label="所属团队" :value="form.belongTeam || '-'" />
  66. <CommonInfoRow label="开发完成日期" :value="formatDate(form.developmentFinishDate)" />
  67. <CommonInfoRow label="首次发表日期" :value="formatDate(form.firstPublishDate)" />
  68. <CommonInfoRow label="成果权属" :value="getDictLabel('achievement_owner_unit', form.achievementOwnerUnit)" />
  69. <CommonInfoRow label="权利范围" :value="getDictLabel('rights_scope', form.rightsScope)" />
  70. <CommonInfoRow label="开发方式" :value="getDictLabel('development_method', form.developmentMethod)" />
  71. <CommonInfoRow label="合作单位" :value="form.partnerUnit" />
  72. <CommonInfoRow label="备注" :value="form.remark" isColumn />
  73. </CommonSection>
  74. </template>
  75. <!-- 其他类 -->
  76. <template v-else>
  77. <CommonSection title="成果信息" :isFirst="true">
  78. <CommonInfoRow label="成果名称" :value="form.achievementName" />
  79. <CommonInfoRow label="成果类型" :value="getDictLabel('other_achieve_type', form.achievementType)" />
  80. <CommonInfoRow label="获得日期" :value="formatDate(form.acquireTime)" />
  81. <CommonInfoRow label="所属单位" :value="form.organization" />
  82. <CommonInfoRow label="所属平台">
  83. <view class="platform-tags">
  84. <template v-if="platformList.length > 0">
  85. <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>
  86. </template>
  87. <text v-else>-</text>
  88. </view>
  89. </CommonInfoRow>
  90. <CommonInfoRow label="所属团队" :value="form.belongTeam || '-'" />
  91. <CommonInfoRow label="成果权属" :value="getDictLabel('achievement_owner_unit', form.achievementOwnerUnit)" />
  92. <CommonInfoRow label="备注" :value="form.remark" isColumn />
  93. </CommonSection>
  94. </template>
  95. <!-- 转化信息 -->
  96. <CommonSection title="转化详情">
  97. <CommonInfoRow label="转化时间" :value="formatDate(form.conversionDate)" />
  98. <CommonInfoRow label="转化金额" :value="'¥' + (form.conversionAmount || 0)" isAmount />
  99. <CommonInfoRow label="转化单位" :value="form.conversionUnit" />
  100. <CommonInfoRow label="转化方式" :value="formatDictList('conversion_type', form.conversionType)" />
  101. <CommonInfoRow label="成熟度" :value="formatDictList('trl_level', form.trlLevel)" />
  102. <CommonInfoRow label="成果水平" :value="getDictLabel('achievement_level', form.achievementLevel)" />
  103. <CommonInfoRow label="成果体现形式" :value="getDictLabel('results_display_form', form.displayForm)" />
  104. <CommonInfoRow label="国民经济领域" :value="formatDictList('economy_sector', form.economySector)" />
  105. <CommonInfoRow label="战略布局领域" :value="formatDictList('strategic_domain', form.strategicDomain)" />
  106. <CommonInfoRow label="制造业集群" :value="formatDictList('manufacturing_cluster', form.manufacturingCluster)" />
  107. <CommonInfoRow label="是否成立企业" :value="form.isCompany === '10' ? '是' : form.isCompany === '20' ? '否' : '-'" />
  108. <CommonInfoRow v-if="form.isCompany === '10'" label="企业名称" :value="form.companyName" />
  109. <CommonInfoRow label="成果简介" :value="form.remark" isColumn />
  110. </CommonSection>
  111. <!-- 附件信息 -->
  112. <AttachmentList :list="mergedFileList" title="电子附件" />
  113. </template>
  114. <uv-empty v-else mode="data" text="暂无数据"></uv-empty>
  115. </view>
  116. </template>
  117. <script setup lang="ts">
  118. import { ref, onMounted, watch, computed } from 'vue';
  119. import { useDict } from '@/hooks/useDict';
  120. import { useDocumentApi } from '@/api/document';
  121. import { formatDate } from '@/utils/date';
  122. import to from 'await-to-js';
  123. import AttachmentList from './AttachmentList.vue';
  124. import CommonSection from '@/components/ui/CommonSection.vue';
  125. import CommonInfoRow from '@/components/ui/CommonInfoRow.vue';
  126. const props = defineProps<{
  127. code: string | number;
  128. }>();
  129. const { getDictLabel } = useDict(
  130. 'patent_class', 'patent_scope', 'rights_acquire_method', 'other_achieve_type',
  131. 'conversion_type', 'trl_level', 'achievement_level', 'results_display_form',
  132. 'economy_sector', 'strategic_domain', 'manufacturing_cluster',
  133. 'paper_member_type', 'academic_degree', 'discipline_job_title',
  134. 'achievement_owner_unit', 'development_method', 'rights_scope'
  135. );
  136. const documentApi = useDocumentApi();
  137. const form = ref<any>(null);
  138. const loading = ref(false);
  139. const platformList = computed(() => {
  140. if (form.value?.belongPlatform) {
  141. try {
  142. const data = JSON.parse(form.value.belongPlatform);
  143. if (Array.isArray(data) && data.length > 0) {
  144. return data;
  145. }
  146. } catch (e) {
  147. return [];
  148. }
  149. }
  150. return [];
  151. });
  152. const formatDictList = (dictType: string, values: any) => {
  153. if (!values) return '-';
  154. const valList = Array.isArray(values) ? values : String(values).split(',');
  155. return valList.map(v => getDictLabel(dictType, v)).join(', ') || '-';
  156. };
  157. const mergedFileList = computed(() => {
  158. if (!form.value) return [];
  159. const list: any[] = [];
  160. // 成果附件
  161. const achieveFiles = form.value.fileList || form.value.uploadList || [];
  162. if (Array.isArray(achieveFiles)) {
  163. achieveFiles.forEach(f => list.push({ fileName: f.name, fileUrl: f.url, fileType: '成果附件' }));
  164. }
  165. // 转化附件
  166. const conversionFiles = form.value.conversionList || [];
  167. if (Array.isArray(conversionFiles)) {
  168. conversionFiles.forEach(f => list.push({ fileName: f.name, fileUrl: f.url, fileType: '转化附件' }));
  169. }
  170. return list;
  171. });
  172. const fetchData = async () => {
  173. if (!props.code) return;
  174. loading.value = true;
  175. const [err, res] = await to(documentApi.getConversionByCode(props.code));
  176. if (!err && res?.data) {
  177. form.value = res.data;
  178. }
  179. loading.value = false;
  180. };
  181. onMounted(() => {
  182. fetchData();
  183. });
  184. watch(() => props.code, () => {
  185. fetchData();
  186. });
  187. </script>
  188. <style lang="scss" scoped>
  189. @import "./common.scss";
  190. </style>