AchPaperForm.vue 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136
  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.paperName || '-' }}</text></view>
  9. <view class="info-row">
  10. <text class="label">论文类型</text>
  11. <text class="value">{{ getDictLabel('sci_paper_type', form.paperType) }}</text>
  12. </view>
  13. <view class="info-row"><text class="label">发表/出版时间</text><text class="value">{{ form.publicationDate || '-' }}</text></view>
  14. <view class="info-row"><text class="label">刊名</text><text class="value">{{ form.publicationName || '-' }}</text></view>
  15. <view class="info-row">
  16. <text class="label">期刊类型</text>
  17. <text class="value">{{ getDictLabel('sci_publication_range', form.publicationRange) }}</text>
  18. </view>
  19. <view class="info-row">
  20. <text class="label">中科院分区</text>
  21. <text class="value">{{ getDictLabel('sci_paper_subTreasury', form.subTreasury) }}</text>
  22. </view>
  23. <view class="info-row"><text class="label">IF</text><text class="value">{{ form.impactFactors || '-' }}</text></view>
  24. <view class="info-row"><text class="label">DOI号/PMID</text><text class="value">{{ form.doi || '-' }}</text></view>
  25. <view class="info-row"><text class="label">所属年份</text><text class="value">{{ form.statisticalYear || '-' }}</text></view>
  26. <view class="info-row">
  27. <text class="label">年/卷/期/页</text>
  28. <text class="value">{{ form.yearNum || '' }}/{{ form.volNum || '' }}/{{ form.issueNum || '' }}/{{ form.pageRange || '' }}</text>
  29. </view>
  30. <view class="info-row">
  31. <text class="label">本院署名</text>
  32. <text class="value">{{ getDictLabel('sci_paper_signType', form.signType) }}</text>
  33. </view>
  34. <view class="info-row"><text class="label">ISSN号</text><text class="value">{{ form.issnNum || '-' }}</text></view>
  35. </view>
  36. <!-- 作者信息 -->
  37. <view class="common-section-card mt20" v-if="form.authorList?.length">
  38. <view class="section-title">作者信息</view>
  39. <view class="member-list">
  40. <view class="member-item" v-for="(row, index) in form.authorList" :key="index">
  41. <view class="member-header">
  42. <view class="name-box">
  43. <text class="m-name">{{ row.memberName }}</text>
  44. <text class="m-tag">{{ getDictLabel('sci_paper_author_type', row.authorType) }}</text>
  45. </view>
  46. <text class="m-type-tag">{{ getDictLabel('sci_paper_member_type', row.memberType) }}</text>
  47. </view>
  48. <view class="m-body">
  49. <view class="m-line" v-if="row.deptName"><text class="l">科室/单位:</text><text class="v">{{ row.deptName }}</text></view>
  50. <view class="m-line" v-if="row.technicalTitle"><text class="l">职称:</text><text class="v">{{ row.technicalTitle }}</text></view>
  51. </view>
  52. </view>
  53. </view>
  54. </view>
  55. <!-- 标注经济来源 -->
  56. <view class="common-section-card mt20" v-if="form.projList?.length">
  57. <view class="section-title">标注经济来源</view>
  58. <view class="achievement-card" v-for="(item, index) in form.projList" :key="index">
  59. <view class="a-row">
  60. <text class="al">关联类型:</text>
  61. <text class="av">{{ item.sourceType === '10' ? '项目' : '学科' }}</text>
  62. </view>
  63. <view class="a-row">
  64. <text class="al">关联对象:</text>
  65. <text class="av">{{ item.projectSource || '-' }}</text>
  66. </view>
  67. </view>
  68. </view>
  69. <!-- 电子附件 -->
  70. <AttachmentList :list="mergedFileList" title="电子附件" />
  71. </template>
  72. <uv-empty v-else mode="data" text="暂无数据"></uv-empty>
  73. </view>
  74. </template>
  75. <script setup lang="ts">
  76. import { ref, onMounted, watch, computed } from 'vue';
  77. import { useDict } from '@/hooks/useDict';
  78. import { useDocumentApi } from '@/api/document';
  79. import to from 'await-to-js';
  80. import AttachmentList from './AttachmentList.vue';
  81. const props = defineProps<{
  82. code: string;
  83. }>();
  84. const { getDictLabel } = useDict(
  85. 'sci_paper_type',
  86. 'sci_publication_range',
  87. 'sci_paper_subTreasury',
  88. 'sci_paper_signType',
  89. 'sci_paper_author_type',
  90. 'sci_paper_member_type'
  91. );
  92. const documentApi = useDocumentApi();
  93. const form = ref<any>(null);
  94. const loading = ref(false);
  95. const mergedFileList = computed(() => {
  96. if (!form.value) return [];
  97. const list: any[] = [];
  98. if (form.value.paperResultList) list.push(...form.value.paperResultList.map((item: any) => ({ ...item, fileType: '论文全文' })));
  99. if (form.value.includedProofList) list.push(...form.value.includedProofList.map((item: any) => ({ ...item, fileType: '收录证明' })));
  100. if (form.value.ethicsApprovalList) list.push(...form.value.ethicsApprovalList.map((item: any) => ({ ...item, fileType: '伦理批件' })));
  101. if (form.value.rawDataList) list.push(...form.value.rawDataList.map((item: any) => ({ ...item, fileType: '原始数据' })));
  102. return list;
  103. });
  104. const fetchData = async () => {
  105. if (!props.code) return;
  106. loading.value = true;
  107. // 提取 code 中的业务 ID
  108. const paperCode = props.code.includes('-') ? props.code.split('-')[1] : props.code;
  109. const [err, res] = await to(documentApi.getPaperByCode(paperCode));
  110. if (!err && res?.data) {
  111. form.value = res.data;
  112. }
  113. loading.value = false;
  114. };
  115. onMounted(() => {
  116. fetchData();
  117. });
  118. watch(() => props.code, () => {
  119. fetchData();
  120. });
  121. </script>
  122. <style lang="scss" scoped>
  123. @import "./common.scss";
  124. </style>