index.vue 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160
  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">
  8. <view class="info-item" v-for="item in businessPersonInfo">
  9. <view class="info-item-description">{{item.description}}</view>
  10. <view class="info-item-name" :class="item.type?item.type:''">{{item.value}}
  11. </view>
  12. </view>
  13. </view>
  14. </view>
  15. </template>
  16. <script setup>
  17. import {
  18. ref
  19. } from 'vue'
  20. import {
  21. onLoad
  22. } from "@dcloudio/uni-app"
  23. import {
  24. getEnterpriseInfoDetail,
  25. } from "@/api/work/enterpriseInfo.js"
  26. function backToBefore() {
  27. uni.navigateBack({})
  28. };
  29. let businessPersonInfo = ref([{
  30. description: '姓名',
  31. key: "nameJur2",
  32. value: ''
  33. }, {
  34. description: '性别',
  35. key: "sex2",
  36. value: ""
  37. }, {
  38. description: '电话',
  39. key: "tel2",
  40. value: '',
  41. type: 'number'
  42. }, {
  43. description: '移动电话',
  44. key: "simCode2",
  45. value: '',
  46. type: 'number'
  47. }, {
  48. description: '传真',
  49. key: "faxCode2",
  50. value: '',
  51. type: 'number'
  52. }, {
  53. description: '电子邮箱',
  54. key: "email2",
  55. value: '',
  56. type: 'email'
  57. }, {
  58. description: '护照号码',
  59. key: "passport2",
  60. value: '',
  61. type: 'passport'
  62. }])
  63. function filterData(obj) {
  64. for (let i in businessPersonInfo.value) {
  65. businessPersonInfo.value[i].value =
  66. (obj[businessPersonInfo.value[i].key] != null) ? obj[businessPersonInfo.value[i].key] : "--"
  67. }
  68. }
  69. onLoad((option) => {
  70. getEnterpriseInfoDetail({
  71. id: option.id
  72. }).then(res => {
  73. filterData(res.data.junitInfo)
  74. })
  75. })
  76. </script>
  77. <style lang="scss" scoped>
  78. page {
  79. height: 100%;
  80. background-color: #EAF0FA;
  81. }
  82. .container {
  83. position: relative;
  84. width: 100%;
  85. height: 100%;
  86. background: linear-gradient(180deg, #1869F6 0%, #EAF0FA 64%, #EAF0FA 100%);
  87. .back-btn {
  88. position: absolute;
  89. top: 8%;
  90. left: 4%;
  91. display: flex;
  92. font-size: 40rpx;
  93. font-weight: 500;
  94. color: #FFF;
  95. .back-text {
  96. margin-left: 28rpx;
  97. }
  98. }
  99. }
  100. .base-info {
  101. position: absolute;
  102. left: 4%;
  103. top: 14%;
  104. width: 92%;
  105. height: 584rpx;
  106. padding: 10rpx 40rpx;
  107. border-radius: 40rpx;
  108. box-sizing: border-box;
  109. background-color: #fff;
  110. .info-item {
  111. display: flex;
  112. justify-content: space-between;
  113. width: 100%;
  114. height: 80rpx;
  115. .info-item-description {
  116. display: flex;
  117. flex-direction: column;
  118. justify-content: center;
  119. font-size: 32rpx;
  120. color: #9E9E9E;
  121. }
  122. .info-item-name {
  123. display: flex;
  124. flex-direction: column;
  125. justify-content: center;
  126. font-size: 32rpx;
  127. color: #343437;
  128. }
  129. .number {
  130. color: #1869F6;
  131. }
  132. .email {
  133. color: #FF530F;
  134. }
  135. .passport {
  136. color: #09B200;
  137. }
  138. }
  139. }
  140. </style>