index.vue 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200
  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" :class="item.type?item.type:''">{{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" :class="item.type?item.type:''">{{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. getEnterpriseInfoDetail,
  30. } from "@/api/work/enterpriseInfo.js"
  31. function backToBefore() {
  32. uni.navigateBack({})
  33. };
  34. let companyInfoList = ref([{
  35. description: "单位简称",
  36. key: "titleAbb",
  37. value: "",
  38. }, {
  39. description: "所在地",
  40. key: "area",
  41. value: ""
  42. }, {
  43. description: "通信地址",
  44. key: "addre",
  45. value: ""
  46. }, {
  47. description: "单位代码类型",
  48. key: "kindUnit",
  49. value: ""
  50. }, {
  51. description: "代码类型",
  52. key: "kindCode",
  53. value: ""
  54. }, {
  55. description: "统一社会信用代码",
  56. key: "trustCode",
  57. value: "",
  58. type: "number"
  59. }])
  60. let projectInfoList = ref([{
  61. description: "成立日期",
  62. key: "dateFound",
  63. value: "",
  64. }, {
  65. description: "联系手机号",
  66. key: "simCode",
  67. value: "",
  68. type: "number"
  69. }, {
  70. description: "电子邮箱",
  71. key: "email",
  72. value: "",
  73. type: "email"
  74. }, {
  75. description: "单位性质",
  76. key: "unitPropId",
  77. value: ""
  78. }, {
  79. description: "是否独立法人",
  80. key: "isJur",
  81. value: ""
  82. }, {
  83. description: "单位传真",
  84. key: "fax",
  85. value: "",
  86. type: "number"
  87. }, {
  88. description: "单位类型",
  89. key: "unitKindId",
  90. value: ""
  91. }])
  92. function filterData(obj) {
  93. for (let i in companyInfoList.value) {
  94. companyInfoList.value[i].value =
  95. (obj[companyInfoList.value[i].key] != null) ? obj[companyInfoList.value[i].key] : "--"
  96. }
  97. for (let i in projectInfoList.value) {
  98. projectInfoList.value[i].value =
  99. (obj[projectInfoList.value[i].key] != null) ? obj[projectInfoList.value[i].key] : "--"
  100. }
  101. }
  102. onLoad((option) => {
  103. getEnterpriseInfoDetail({
  104. id: option.id
  105. }).then(res => {
  106. filterData(res.data.junitInfo)
  107. })
  108. })
  109. </script>
  110. <style lang="scss" scoped>
  111. page {
  112. height: 100%;
  113. background-color: #EAF0FA;
  114. }
  115. .container {
  116. position: relative;
  117. width: 100%;
  118. height: 100%;
  119. background: linear-gradient(180deg, #1869F6 0%, #EAF0FA 64%, #EAF0FA 100%);
  120. .back-btn {
  121. position: absolute;
  122. top: 8%;
  123. left: 4%;
  124. display: flex;
  125. font-size: 40rpx;
  126. font-weight: 500;
  127. color: #FFF;
  128. .back-text {
  129. margin-left: 28rpx;
  130. }
  131. }
  132. }
  133. .base-info {
  134. position: absolute;
  135. left: 4%;
  136. width: 92%;
  137. padding: 10rpx 40rpx;
  138. border-radius: 40rpx;
  139. box-sizing: border-box;
  140. background-color: #fff;
  141. .info-item {
  142. display: flex;
  143. justify-content: space-between;
  144. width: 100%;
  145. height: 80rpx;
  146. .info-item-description {
  147. display: flex;
  148. flex-direction: column;
  149. justify-content: center;
  150. font-size: 32rpx;
  151. color: #9E9E9E;
  152. }
  153. .info-item-name {
  154. display: flex;
  155. flex-direction: column;
  156. justify-content: center;
  157. font-size: 32rpx;
  158. color: #343437;
  159. }
  160. .number {
  161. color: #1869F6;
  162. }
  163. .email {
  164. color: #FF530F;
  165. }
  166. }
  167. }
  168. .company {
  169. top: 14%;
  170. height: 504rpx;
  171. }
  172. .project {
  173. top: 48%;
  174. height: 584rpx
  175. }
  176. </style>