list.vue 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153
  1. <template>
  2. <view>
  3. <!-- 第一种样式 人员管理-->
  4. <block v-if="datainfo.length>0">
  5. <!-- 报修管理 -->
  6. <block v-if="type=='warranty'">
  7. <view class="walists" v-for="(ite,idx) in datainfo" :key="idx" @click="getDetail">
  8. <view class="watop ">
  9. <view class="watit">
  10. <view class="tit">一号楼3单元12楼楼梯间灯不亮</view>
  11. <view class="txt co01" v-if="ite.type==1">待分派</view>
  12. <view class="txt coa" v-if="ite.type==3">已完成</view>
  13. <view class="txt co28" v-if="ite.type==2">处理中</view>
  14. </view>
  15. <view class="walist"><view class="tit">小区名称</view>:幸福小区</view>
  16. <view class="walist"><view class="tit">报修门户</view>:3号楼1单元406</view>
  17. <view class="walist"><view class="tit">报修时间</view>:2024-11-14 17:16:31</view>
  18. <view class="walist" v-if="ite.type==3"><view class="tit" >完成时间</view>:2024-11-14 18:16:31</view>
  19. </view>
  20. <view class="wabtn">
  21. <view>查看详情</view>
  22. <image :src="rimg"></image>
  23. </view>
  24. </view>
  25. </block>
  26. <!-- 访客 -->
  27. <block v-if="type=='visitor'">
  28. <view class="vislist" v-for="(ite,idx) in datainfo" :key="idx" @click="getDetail">
  29. <view class="vistop flexc mb12">
  30. <view class="tit flex0">王女士</view>
  31. <view class="btns flex0">驾车</view>
  32. <view class="flex1"></view>
  33. <view class="txt flex0 coa">已来访</view>
  34. <view class="txt flex0 co01">待来访</view>
  35. </view>
  36. <view class="vlist flexcw">
  37. <view>来访人数:1人</view>
  38. <view>来访事由:亲友</view>
  39. <view>车牌号码:皖A B8888</view>
  40. <view >手机号码:18705665588</view>
  41. <view>来访时间:2024-11-20 10:00</view>
  42. </view>
  43. </view>
  44. </block>
  45. <view class="shax" v-if="wtdt">{{wtdt}}</view>
  46. </block>
  47. <!-- 无数据 -->
  48. <view class="nodata" v-else>
  49. <image :src="noiconpimg"></image>
  50. <view>
  51. 暂无数据
  52. </view>
  53. </view>
  54. </view>
  55. </template>
  56. <script>
  57. import config from '@/config'
  58. export default{
  59. props:{
  60. datainfo: {
  61. type: Array,
  62. default () {
  63. return []
  64. }
  65. },
  66. wtdt:{
  67. type:String,
  68. default () {
  69. return ''
  70. }
  71. },
  72. type:{
  73. type:String,
  74. default () {
  75. return 0
  76. }
  77. },
  78. },
  79. data(){
  80. return{
  81. noiconpimg:require("@/static/images/nodata.png"),
  82. rimg:require('@/static/images/rimg.png'),
  83. baseUrl:config.baseUrl,
  84. }
  85. },
  86. mounted() {
  87. },
  88. methods:{
  89. getDetail(e){
  90. this.$emit('getDetail',e)
  91. },
  92. getPreview(idx,arr) {
  93. var newArr=[];
  94. arr.forEach(ite=>{
  95. var ds=this.baseUrl+ite
  96. newArr.push(ds)
  97. })
  98. uni.previewImage({
  99. urls: newArr,
  100. current:idx,
  101. success: function(data) {},
  102. fail: function(err) {}
  103. });
  104. },
  105. }
  106. }
  107. </script>
  108. <style lang="scss" scoped>
  109. .flex{display: flex;}
  110. .flexc{display: flex;align-items: center;}
  111. .mb10{margin-bottom: 20rpx;}
  112. // 报修
  113. .walists{background: #FFFFFF;border-radius: 20rpx;margin-bottom: 24rpx; position: relative;
  114. .watop{
  115. padding: 0 36rpx 8rpx 38rpx;
  116. .watit{padding: 24rpx 0;margin-bottom: 4rpx;display: flex;
  117. .tit{font-weight: bold;font-size: 28rpx;color: #272727;flex: 1;
  118. .cir{width: 14rpx;margin-left: 8rpx;margin-bottom: 10rpx;height: 14rpx;display: inline-block;background: #FF6969;border-radius: 8rpx;}
  119. }
  120. .txt{font-weight: bold;font-size: 26rpx;flex: 0 0 auto;
  121. }
  122. }
  123. }
  124. .walist{display: flex;font-weight: 500;font-size: 24rpx;color: #666666;margin-bottom: 16rpx;
  125. .tit{min-width: 100rpx;text-align-last: justify}
  126. }
  127. .wabtn{display: flex;align-items: center;justify-content: space-between;border-top: 2rpx solid #E5E5E5;height: 80rpx;padding: 0 38rpx;
  128. view{font-weight: 500;font-size: 24rpx;color: #666666;}
  129. image{width: 16rpx;height: 28rpx;}
  130. }
  131. }
  132. .vislist{background: #FFFFFF;border-radius: 20rpx;margin-bottom: 24rpx;padding: 26rpx 38rpx 12rpx;
  133. .vistop{
  134. .tit{font-size: 28rpx;color: #272727;font-weight: bold;}
  135. .btns{min-width: 70rpx;font-weight: 500;
  136. font-size: 20rpx;padding: 0 8rpx;box-sizing: border-box;text-align: center;margin-left: 18rpx;color: #00B861;border-radius: 16rpx;border: 2rpx solid #0AC86E;}
  137. .txt{font-weight: bold;font-size: 26rpx;margin-left: 18rpx;}
  138. }
  139. .vlist{
  140. view{font-weight: 500;font-size: 24rpx;color: #666666;margin-bottom: 16rpx;flex: 0 1 auto;min-width: 50%;}
  141. }
  142. }
  143. // 无数据
  144. .nodata{display: flex;flex-direction: column;align-items: center;
  145. image{width: 440rpx;height: 440rpx;}
  146. view{font-size: 30rpx;color: #666666;font-weight: bold;}
  147. }
  148. </style>