wjy.vue 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183
  1. <template>
  2. <ComponentLoading class="outer" :loading="loading">
  3. <view class="top-img">
  4. <!-- <WindowTop title="物建员"></WindowTop> -->
  5. <view class="d_z">{{param.sqjcwhmc}}{{param.mlph}}{{param.ldph}}</view>
  6. <Tab ref="tab" :tabList="tabList" @tab-click="tabClick"></Tab>
  7. <view class="wjy_body">
  8. <view class="card" v-for="(item) in tableList" :key="item.id">
  9. <view class="c_i">
  10. <view class="c_l">姓名</view>
  11. <view class="c_v">{{ item.xm }}</view>
  12. </view>
  13. <view class="c_i">
  14. <view class="c_l">身份证号</view>
  15. <view class="c_v">{{ item.sfzh }}</view>
  16. </view>
  17. <view class="c_i">
  18. <view class="c_l">联系方式</view>
  19. <view class="c_v">{{ item.lxfs }}</view>
  20. </view>
  21. <view class="b_b">
  22. <view></view>
  23. <view class="btn" @click="view(item.id)">查 看</view>
  24. </view>
  25. </view>
  26. </view>
  27. <image :src="btn_new_72" class="add_img" @click="add" v-if="dyh && ldId"></image>
  28. </view>
  29. </ComponentLoading>
  30. </template>
  31. <script>
  32. import {
  33. getLdDetail
  34. } from '@/api/wjxxy.js'
  35. import Tab from '@/components/tab/index'
  36. import WindowTop from '@/components/window-top/index'
  37. import ComponentLoading from '@/components/component-loading/index'
  38. import jsonBig from 'json-bigint-master'
  39. export default {
  40. components: {
  41. Tab,
  42. WindowTop,
  43. ComponentLoading
  44. },
  45. data() {
  46. return {
  47. tabList: [],
  48. tableList: [],
  49. ldId: '',
  50. dyh: '',
  51. btn_new_72: require('./img/btn_new_72.svg'),
  52. loading: false,
  53. param: {}
  54. }
  55. },
  56. onLoad(option) {
  57. const param = JSON.parse(option.param)
  58. this.param = param
  59. this.ldId = param.ldphxlh
  60. },
  61. onShow() {
  62. this.$nextTick(() => {
  63. this.getList()
  64. })
  65. },
  66. methods: {
  67. tabClick(param) {
  68. this.dyh = param.dyh
  69. this.tableList = param.xxyList.map(item => {
  70. if (typeof item.id == 'object') {
  71. item.id = item.id.c[0] + '' + item.id.c[1]
  72. }
  73. return item
  74. })
  75. // console.log('tableList', this.tableList)
  76. },
  77. add() {
  78. uni.navigateTo({
  79. url: `/pages/home/detail?type=add&ldId=${this.ldId}&dyh=${this.dyh}`
  80. })
  81. },
  82. getList() {
  83. this.loading = true
  84. getLdDetail(this.ldId).then(res => {
  85. const list = jsonBig.parse(res.data.dataList[0].fieldValues[0].value).data
  86. this.tabList = list
  87. // this.tableList = res
  88. this.$nextTick(() => {
  89. this.$refs.tab.show()
  90. })
  91. }).finally(() => {
  92. this.loading = false
  93. })
  94. },
  95. view(id) {
  96. uni.navigateTo({
  97. url: `/pages/home/detail?type=view&id=${id}`
  98. })
  99. }
  100. }
  101. }
  102. </script>
  103. <style lang="scss" scoped>
  104. .outer {
  105. background-color: rgba(248, 248, 248, 1);
  106. height: 100vh;
  107. overflow-y: scroll;
  108. font-family: PingFangSC, PingFang SC;
  109. .top-img {
  110. width: 100%;
  111. background-image: url(./img/bj_blue.svg);
  112. background-repeat: repeat-x;
  113. // padding-top: 100rpx;
  114. }
  115. }
  116. .d_z {
  117. width: 100%;
  118. height: 100rpx;
  119. text-align: center;
  120. line-height: 100rpx;
  121. color: rgba(255, 255, 255, 1);
  122. }
  123. .wjy_body {
  124. padding: 24rpx;
  125. height: calc(100vh - 200rpx);
  126. }
  127. .card {
  128. width: 100%;
  129. background-color: rgba(255, 255, 255, 1);
  130. border-radius: 16rpx;
  131. padding: 24rpx 28rpx;
  132. font-size: 28rpx;
  133. margin: 16rpx 0;
  134. .c_i {
  135. height: 54rpx;
  136. display: flex;
  137. }
  138. .c_l {
  139. width: 200rpx;
  140. color: rgba(17, 17, 17, 1);
  141. }
  142. .c_v {
  143. color: rgba(102, 102, 102, 1);
  144. }
  145. .b_b {
  146. height: 80rpx;
  147. width: 100%;
  148. display: flex;
  149. align-items: center;
  150. justify-content: space-between;
  151. }
  152. .btn {
  153. background-color: rgba(16, 109, 255, 1);
  154. border-radius: 8rpx;
  155. width: 160rpx;
  156. height: 64rpx;
  157. text-align: center;
  158. color: rgba(255, 255, 255, 1);
  159. font-weight: 600;
  160. line-height: 64rpx;
  161. }
  162. }
  163. .add_img {
  164. position: absolute;
  165. right: 24rpx;
  166. bottom: 48rpx;
  167. width: 144rpx;
  168. height: 144rpx;
  169. }
  170. </style>