index.vue 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175
  1. <template>
  2. <view class="container">
  3. <view class="back-btn" @click="backToBefore()">
  4. <u-icon name="arrow-left" color="#fff" size="20" customStyle="margin:0 auto"></u-icon>
  5. <text class="back-text">基本信息</text>
  6. </view>
  7. <view class="base-info company">
  8. <view class="info-item" v-for="item in companyInfoList">
  9. <view class="info-item-description">{{item.description}}</view>
  10. <view class="info-item-name">{{item.value}}</view>
  11. </view>
  12. </view>
  13. <view class="base-info project">
  14. <view class="info-item" v-for="item in projectInfoList">
  15. <view class="info-item-description">{{item.description}}</view>
  16. <view class="info-item-name">{{item.value}}</view>
  17. </view>
  18. </view>
  19. </view>
  20. </template>
  21. <script setup>
  22. import {
  23. ref
  24. } from 'vue'
  25. import {
  26. onLoad
  27. } from "@dcloudio/uni-app"
  28. import {
  29. getProjectInfoDetail,
  30. } from "@/api/work/projectInfo.js"
  31. function backToBefore() {
  32. uni.navigateBack({})
  33. }
  34. let companyInfoList = ref([{
  35. description: '申请单位',
  36. key: "unitName",
  37. value: ''
  38. }, {
  39. description: '主体单位',
  40. key: "mainName",
  41. value: ''
  42. }, {
  43. description: '监管单位',
  44. key: "manageName",
  45. value: ''
  46. }, {
  47. description: '审批单位',
  48. key: "approveName",
  49. value: ''
  50. }])
  51. let projectInfoList = ref([{
  52. description: '项目名称',
  53. key: "sub_name",
  54. value: ''
  55. }, {
  56. description: '建设性质',
  57. key: "propKindName",
  58. value: ''
  59. }, {
  60. description: '行业分类',
  61. key: "indusName",
  62. value: ''
  63. }, {
  64. description: '投资性质',
  65. key: "kindNature",
  66. value: ''
  67. }, {
  68. description: '总投资金额',
  69. key: "amt_total",
  70. value: ''
  71. }, {
  72. description: '年度计划投资金额',
  73. key: "amt_year",
  74. value: ''
  75. }])
  76. function filterData(obj) {
  77. for (let i in companyInfoList.value) {
  78. companyInfoList.value[i].value = obj[companyInfoList.value[i].key] || "--"
  79. }
  80. for (let i in projectInfoList.value) {
  81. projectInfoList.value[i].value = obj[projectInfoList.value[i].key] || "--"
  82. }
  83. }
  84. onLoad((option) => {
  85. getProjectInfoDetail({
  86. subId: option.id
  87. }).then(res => {
  88. filterData(res.data.projectsInfo)
  89. })
  90. })
  91. </script>
  92. <style lang="scss" scoped>
  93. page {
  94. height: 100%;
  95. background-color: #EAF0FA;
  96. }
  97. .container {
  98. position: relative;
  99. width: 100%;
  100. height: 100%;
  101. background: linear-gradient(180deg, #1869F6 0%, #EAF0FA 64%, #EAF0FA 100%);
  102. .back-btn {
  103. position: absolute;
  104. top: 8%;
  105. left: 4%;
  106. display: flex;
  107. font-size: 40rpx;
  108. font-weight: 500;
  109. color: #FFF;
  110. .back-text {
  111. margin-left: 28rpx;
  112. }
  113. }
  114. }
  115. .base-info {
  116. position: absolute;
  117. left: 4%;
  118. width: 92%;
  119. padding: 40rpx;
  120. border-radius: 40rpx;
  121. box-sizing: border-box;
  122. background-color: #fff;
  123. .info-item {
  124. display: flex;
  125. justify-content: space-between;
  126. width: 100%;
  127. height: 64rpx;
  128. .info-item-description {
  129. display: flex;
  130. flex-direction: column;
  131. justify-content: center;
  132. font-size: 32rpx;
  133. color: #9E9E9E;
  134. }
  135. .info-item-name {
  136. display: flex;
  137. flex-direction: column;
  138. justify-content: center;
  139. font-size: 32rpx;
  140. color: #343437;
  141. }
  142. }
  143. }
  144. .company {
  145. top: 14%;
  146. height: 336rpx;
  147. }
  148. .project {
  149. top: 37%;
  150. height: 484rpx
  151. }
  152. </style>