ProjectSetupVertical.vue 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. <template>
  2. <view class="setup-wrapper">
  3. <CommonSection title="立项概览" isFirst>
  4. <CommonInfoRow label="项目名称" :value="projectData?.projectName" />
  5. <CommonInfoRow label="学科类型" :value="getDictLabel('project_class', projectData?.projectClass)" />
  6. <CommonInfoRow label="项目来源单位" :value="projectData?.projectSource" />
  7. <CommonInfoRow label="负责人" :value="projectData?.projectLeaderName" />
  8. <CommonInfoRow label="负责人类型" :value="getDictLabel('sci_leader_type', projectData?.projectLeaderType)" />
  9. <CommonInfoRow label="项目级别" :value="getDictLabel('sci_pjt_level', projectData?.projectLevel)" />
  10. <CommonInfoRow label="项目分类" :value="projectData?.projectClazzName" />
  11. <CommonInfoRow label="立项日期" :value="projectData?.approvalDate ? formatDate(projectData.approvalDate) : '--'" />
  12. <CommonInfoRow label="开始日期" :value="projectData?.planStartDate ? formatDate(projectData.planStartDate) : '--'" />
  13. <CommonInfoRow label="计划结题日期" :value="projectData?.planEndDate ? formatDate(projectData.planEndDate) : '--'" />
  14. <CommonInfoRow label="合同经费(元)" :value="amountUnitFormatter(projectData?.contractFunds)" isAmount />
  15. <CommonInfoRow label="批准经费(元)" :value="amountUnitFormatter(projectData?.approvedFunds)" isAmount />
  16. <CommonInfoRow label="配套经费(元)" :value="amountUnitFormatter(projectData?.supportFunds)" isAmount />
  17. <CommonInfoRow label="外拨经费(元)" :value="amountUnitFormatter(projectData?.outsourcedFunds)" isAmount />
  18. <CommonInfoRow label="所属年度" :value="projectData?.statisticalYear || '--'" />
  19. <CommonInfoRow label="所属平台" :value="platformNames || '--'" />
  20. <CommonInfoRow label="所属团队" :value="projectData?.belongTeam || '--'" />
  21. <CommonInfoRow label="到账日期" :value="projectData?.arrivalDate ? formatDate(projectData.arrivalDate) : '--'" />
  22. <CommonInfoRow label="到账金额(元)" :value="projectData?.arrivalFunds || '--'" />
  23. <CommonInfoRow label="备注" :value="projectData?.remark || '--'" noBorder />
  24. </CommonSection>
  25. </view>
  26. </template>
  27. <script setup lang="ts">
  28. import { computed } from 'vue';
  29. import { useDict } from '@/hooks/useDict';
  30. import { formatDate } from '@/utils/date';
  31. import { formatWithComma } from '@/utils/format';
  32. import CommonSection from '@/components/ui/CommonSection.vue';
  33. import CommonInfoRow from '@/components/ui/CommonInfoRow.vue';
  34. const props = defineProps<{
  35. projectData: any;
  36. }>();
  37. const { getDictLabel } = useDict('sci_pjt_level', 'project_class', 'sci_leader_type');
  38. const platformNames = computed(() => {
  39. if (props.projectData?.belongPlatform) {
  40. try {
  41. const data = JSON.parse(props.projectData.belongPlatform)
  42. if (Array.isArray(data)) {
  43. return data.map(item => `${item.platformName} (${item.platformType})`).join(', ')
  44. }
  45. } catch (e) {
  46. return ''
  47. }
  48. }
  49. return ''
  50. })
  51. const amountUnitFormatter = (num: any) => {
  52. return formatWithComma(num);
  53. };
  54. </script>
  55. <style lang="scss" scoped>
  56. .setup-wrapper {
  57. width: 100%;
  58. padding-bottom: 20px;
  59. }
  60. </style>