shxxList.vue 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130
  1. <template>
  2. <view>
  3. <uni-card>
  4. <uni-search-bar :radius="100" @confirm="search" placeholder="请输入身份证号或手机号搜索" v-model="form.lrZjhm"></uni-search-bar>
  5. <uni-list>
  6. <uni-list-item v-for="(item,index) in dataList" :key="index" :title="item.lrXm"
  7. :thumb="item.lrTx?config.baseUrl+item.lrTx:config.baseUrl + config.head" :note="item.sqyy"
  8. thumbSize="lg" :showArrow="false">
  9. <template v-slot:footer>
  10. <view v-if="item.lzzt == '0'"
  11. style="width: 60px;display: flex;flex-direction: column;background-image: url('../../static/images/caogao.png');background-position: left;background-size:58px 58px;background-repeat: no-repeat;">
  12. <text>{{item.sqsj.substring(0,8) }}</text>
  13. <text>{{item.lrSpyj || '无'}}</text>
  14. </view>
  15. <view v-else-if="item.lzzt == '1' || item.lzzt == '2' || item.lzzt == '5'|| item.lzzt == '7'"
  16. style="width: 60px;display: flex;flex-direction: column;background-image: url('../../static/images/daishenhe.png');background-position: left;background-size:58px 58px;background-repeat: no-repeat;">
  17. <text>{{item.sqsj.substring(0,8) }}</text>
  18. <text>{{item.lrSpyj || '无'}}</text>
  19. </view>
  20. <view v-else-if="item.lzzt == '3'"
  21. style="width: 60px;display: flex;flex-direction: column;background-image: url('../../static/images/tongguo.png');background-position: left;background-size:58px 58px;background-repeat: no-repeat;">
  22. <text>{{item.sqsj.substring(0,8) }}</text>
  23. <text>{{item.lrSpyj || '无'}}</text>
  24. </view>
  25. <view v-else-if="item.lzzt == '4'"
  26. style="width: 60px;display: flex;flex-direction: column;background-image: url('../../static/images/jujue.png');background-position: left;background-size:58px 58px;background-repeat: no-repeat;">
  27. <text>{{item.sqsj.substring(0,8) }}</text>
  28. <text>{{item.lrSpyj || '无'}}</text>
  29. </view>
  30. </template>
  31. </uni-list-item>
  32. </uni-list>
  33. <uni-load-more status="status" @clickLoadMore="clickLoadMore"></uni-load-more>
  34. </uni-card>
  35. </view>
  36. </template>
  37. <script>
  38. import {
  39. getToken,
  40. getUser
  41. } from '@/common/auth.js'
  42. import {
  43. ListKhjbxx,
  44. ListKhShxx
  45. } from '@/api/kh.js'
  46. import {
  47. decryptRowData_ECB
  48. } from '@/common/sm4.js'
  49. export default {
  50. components: {},
  51. data() {
  52. return {
  53. status: 'more',
  54. form: {
  55. pageNum: 1,
  56. pageSize: 10,
  57. lrId: ''
  58. },
  59. dataList: [],
  60. total: 0,
  61. }
  62. },
  63. mounted() {
  64. this.userInfo = getUser()
  65. if (this.userInfo.userType == '07') {
  66. this.info(this.userInfo.userId)
  67. } else {
  68. this.form.createUserId = this.userInfo.userId
  69. }
  70. this.getList()
  71. },
  72. created() {},
  73. onLoad: function(options) {
  74. this.form.lrId = options.lrId
  75. },
  76. onPullDownRefresh() {
  77. this.dataList = []
  78. this.form.pageNum = 1
  79. this.form.pageSize = 10
  80. this.getList()
  81. },
  82. onReachBottom() {
  83. if (this.dataList.length < this.total) {
  84. this.form.pageNum += 1
  85. this.getList()
  86. }
  87. },
  88. methods: {
  89. search() {
  90. this.dataList = []
  91. this.form.pageNum = 1
  92. this.form.pageSize = 10
  93. this.getList()
  94. },
  95. clickLoadMore(e) {
  96. this.status = 'loading'
  97. if (this.dataList.length < this.total) {
  98. this.form.pageNum += 1
  99. this.getList()
  100. } else {
  101. this.status = 'no-more'
  102. }
  103. },
  104. getList() {
  105. ListKhShxx(this.form).then(res => {
  106. if (res.code == 200) {
  107. this.total = res.total
  108. // let list = decryptRowData_ECB(res.rows, ["lrZjhm", "lrXm", "lrHjbcxx", "lrXjdzBcxx",
  109. // "lrCydh", "lrPoxm", "lrPoZjmh", "jhrXm", "jhrSjhm", "zlrXm", "zlrDh", "cjzh",
  110. // "yhzh", "khmc"
  111. // ], [2, 1, 4, 4, 3, 1, 2, 1, 2, 1, 3, 5, 5, 5])
  112. let list = res.rows
  113. this.dataList.push(...list)
  114. uni.stopPullDownRefresh();
  115. if (this.dataList.length < this.total) {
  116. this.status = 'more'
  117. } else if (this.dataList.length == this.total) {
  118. this.status = 'no-more'
  119. }
  120. }
  121. })
  122. }
  123. },
  124. watch: {},
  125. }
  126. </script>
  127. <style>
  128. </style>