ProjectSetupSafety.vue 3.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. <template>
  2. <view class="setup-wrapper">
  3. <CommonSection title="立项概览" :isFirst="true">
  4. <CommonInfoRow label="项目编号" :value="projectData?.projectCode" />
  5. <CommonInfoRow label="项目名称" :value="projectData?.projectName" />
  6. <CommonInfoRow label="项目学科分类" :value="getDictLabel('project_class', projectData?.disciplineFirstName)" />
  7. <CommonInfoRow label="负责人类型" :value="getDictLabel('sci_leader_type', projectData?.projectLeaderType)" />
  8. <CommonInfoRow v-if="projectData?.isClinicalTrial === '20'" label="项目类别" :value="getDictLabel('sci_pjt_class', projectData?.projectClass)" />
  9. <CommonInfoRow label="合同类别" :value="getDictLabel('contract_type', projectData?.contractType)" />
  10. <CommonInfoRow label="项目状态" :value="getDictLabel('project_status', projectData?.projectStatus)" />
  11. <CommonInfoRow label="签订日期" :value="formatDate(projectData?.signDate)" />
  12. <CommonInfoRow label="统计年度" :value="projectData?.statisticalYear" />
  13. <CommonInfoRow label="开始日期" :value="formatDate(projectData?.planStartDate)" />
  14. <CommonInfoRow label="结束日期" :value="formatDate(projectData?.planEndDate)" />
  15. <CommonInfoRow label="承接部门" :value="projectData?.deptName" />
  16. <CommonInfoRow label="负责人" :value="projectData?.projectLeaderName" />
  17. <CommonInfoRow label="负责人电话" :value="projectData?.projectLeaderPhone" />
  18. <CommonInfoRow label="合同经费(元)" :value="formatWithComma(projectData?.contractFunds)" isAmount />
  19. <CommonInfoRow label="配套经费(元)" :value="formatWithComma(projectData?.supportFunds)" isAmount />
  20. <CommonInfoRow label="总金额(元)" :value="formatWithComma((Number(projectData?.contractFunds || 0) + Number(projectData?.supportFunds || 0) + Number(projectData?.selfFunds || 0)))" isAmount />
  21. <CommonInfoRow label="到账金额(元)" :value="formatWithComma(projectData?.arrivalFunds)" isAmount />
  22. <CommonInfoRow label="到账日期" :value="formatDate(projectData?.arrivalDate)" />
  23. <CommonInfoRow label="所属平台" :value="platformDisplay" />
  24. <CommonInfoRow label="所属团队" :value="projectData?.belongTeam" :noBorder="true" />
  25. </CommonSection>
  26. </view>
  27. </template>
  28. <script setup lang="ts">
  29. import { computed } from 'vue';
  30. import { useDict } from '@/hooks/useDict';
  31. import { formatWithComma } from '@/utils/format';
  32. import { formatDate } from '@/utils/date';
  33. import CommonSection from '@/components/ui/CommonSection.vue';
  34. import CommonInfoRow from '@/components/ui/CommonInfoRow.vue';
  35. const { getDictLabel } = useDict('project_class', 'sci_leader_type', 'sci_pjt_class', 'contract_type', 'project_status');
  36. /**
  37. * 安评项目 立项信息展示组件
  38. */
  39. const props = defineProps<{
  40. /** 项目主数据详情 */
  41. projectData: any;
  42. }>();
  43. /**
  44. * 平台信息显示转换
  45. */
  46. const platformDisplay = computed(() => {
  47. if (props.projectData?.belongPlatform) {
  48. try {
  49. const data = JSON.parse(props.projectData.belongPlatform);
  50. if (Array.isArray(data)) {
  51. return data.map((item: any) => `${item.platformName} (${item.platformType})`).join(', ');
  52. }
  53. } catch (e) {}
  54. }
  55. return '--';
  56. });
  57. </script>
  58. <style lang="scss" scoped>
  59. .setup-wrapper {
  60. padding-bottom: 30rpx;
  61. }
  62. </style>