CircuitForm.vue 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150
  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">
  9. <text class="label">集成电路布图名称</text>
  10. <text class="value">{{ form.circuitName || '-' }}</text>
  11. </view>
  12. <view class="info-row">
  13. <text class="label">所属单位</text>
  14. <text class="value">{{ form.deptName || '-' }}</text>
  15. </view>
  16. <view class="info-row">
  17. <text class="label">学校署名</text>
  18. <text class="value">{{ getDictLabel('sci_circuit_signature', form.circuitSchoolSignature) }}</text>
  19. </view>
  20. <view class="info-row">
  21. <text class="label">登记证书号</text>
  22. <text class="value">{{ form.circuitCertificateCode || '-' }}</text>
  23. </view>
  24. <view class="info-row">
  25. <text class="label">申请日期</text>
  26. <text class="value">{{ formatDate(form.applicationDate, 'YYYY-MM-DD') }}</text>
  27. </view>
  28. <view class="info-row">
  29. <text class="label">权利人</text>
  30. <text class="value">{{ form.obligee || '-' }}</text>
  31. </view>
  32. <view class="info-row">
  33. <text class="label">权利人地址</text>
  34. <text class="value">{{ form.obligeeAddress || '-' }}</text>
  35. </view>
  36. <view class="info-row">
  37. <text class="label">布图设计登记号</text>
  38. <text class="value">{{ form.circuitCode || '-' }}</text>
  39. </view>
  40. <view class="info-row">
  41. <text class="label">完成日期</text>
  42. <text class="value">{{ formatDate(form.finishDate, 'YYYY-MM-DD') }}</text>
  43. </view>
  44. <view class="info-row">
  45. <text class="label">颁证日期</text>
  46. <text class="value">{{ formatDate(form.issueDate, 'YYYY-MM-DD') }}</text>
  47. </view>
  48. <view class="info-row" v-if="form.fileName">
  49. <text class="label">审批附件</text>
  50. <text class="value primary-color" @click="previewFile(form.fileUrl, form.fileName)">{{ form.fileName }}</text>
  51. </view>
  52. <view class="info-row">
  53. <text class="label">备注</text>
  54. <text class="value">{{ form.remark || '-' }}</text>
  55. </view>
  56. </view>
  57. <!-- 完成人信息 -->
  58. <view class="common-section-card mt20" v-if="form.memberList?.length">
  59. <view class="section-title">完成人信息</view>
  60. <view class="member-list">
  61. <view class="member-item" v-for="(member, index) in form.memberList" :key="index">
  62. <view class="member-header">
  63. <text class="m-name">{{ member.memberName }}</text>
  64. <text class="m-tag">署名顺序: {{ member.signOrder }}</text>
  65. </view>
  66. <view class="m-body">
  67. <view class="m-line">
  68. <text class="l">作者类型:</text>
  69. <text class="v">{{ getDictLabel('sci_paper_author_type', member.memberType) }}</text>
  70. </view>
  71. <view class="m-line"><text class="l">职工号/学号:</text><text class="v">{{ member.memberCode || '-' }}</text></view>
  72. <view class="m-line">
  73. <text class="l">性别:</text>
  74. <text class="v">{{ member.gender === '10' ? '男' : member.gender === '20' ? '女' : '-' }}</text>
  75. </view>
  76. <view class="m-line">
  77. <text class="l">学历:</text>
  78. <text class="v">{{ getDictLabel('sci_academic_degree', member.educated) }}</text>
  79. </view>
  80. <view class="m-line">
  81. <text class="l">职称:</text>
  82. <text class="v">{{ getDictLabel('sci_discipline_job_title', member.technicalTitle) }}</text>
  83. </view>
  84. <view class="m-line"><text class="l">所属单位/学校:</text><text class="v">{{ member.deptName || '-' }}</text></view>
  85. <view class="m-line"><text class="l">贡献率:</text><text class="v">{{ member.contributionRate || 0 }}%</text></view>
  86. </view>
  87. </view>
  88. </view>
  89. </view>
  90. </template>
  91. <uv-empty v-else mode="data" text="暂无数据"></uv-empty>
  92. </view>
  93. </template>
  94. <script setup lang="ts">
  95. import { ref, onMounted, watch } from 'vue';
  96. import { useDict } from '@/hooks/useDict';
  97. import { useDocumentApi } from '@/api/document';
  98. import { previewFile } from '@/utils/file';
  99. import { formatDate } from '@/utils/date';
  100. import to from 'await-to-js';
  101. const props = defineProps<{
  102. code: string;
  103. }>();
  104. const { getDictLabel } = useDict(
  105. 'sci_circuit_signature',
  106. 'sci_paper_author_type',
  107. 'sci_academic_degree',
  108. 'sci_discipline_job_title'
  109. );
  110. const documentApi = useDocumentApi();
  111. const form = ref<any>(null);
  112. const loading = ref(false);
  113. const fetchData = async () => {
  114. if (!props.code) return;
  115. loading.value = true;
  116. const [err, res] = await to(documentApi.getCircuitByCode(props.code));
  117. if (!err && res?.data) {
  118. form.value = res.data;
  119. }
  120. loading.value = false;
  121. };
  122. onMounted(() => {
  123. fetchData();
  124. });
  125. watch(() => props.code, () => {
  126. fetchData();
  127. });
  128. </script>
  129. <style lang="scss" scoped>
  130. @import "./common.scss";
  131. .m-body {
  132. padding: 10rpx 0;
  133. .m-line {
  134. font-size: 26rpx;
  135. line-height: 1.6;
  136. display: flex;
  137. .l { color: #888; width: 180rpx; flex-shrink: 0; }
  138. .v { color: #333; }
  139. }
  140. }
  141. </style>