list.vue 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129
  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. <view class="shax" v-if="wtdt">{{wtdt}}</view>
  27. </block>
  28. <!-- 无数据 -->
  29. <view class="nodata" v-else>
  30. <image :src="noiconpimg"></image>
  31. <view>
  32. 暂无数据
  33. </view>
  34. </view>
  35. </view>
  36. </template>
  37. <script>
  38. import config from '@/config'
  39. export default{
  40. props:{
  41. datainfo: {
  42. type: Array,
  43. default () {
  44. return []
  45. }
  46. },
  47. wtdt:{
  48. type:String,
  49. default () {
  50. return ''
  51. }
  52. },
  53. type:{
  54. type:String,
  55. default () {
  56. return 0
  57. }
  58. },
  59. topval:{
  60. type:String,
  61. default () {
  62. return ''
  63. }
  64. }
  65. },
  66. data(){
  67. return{
  68. noiconpimg:require("@/work/static/nodata.png"),
  69. rimg:require('@/static/images/rimg.png'),
  70. baseUrl:config.baseUrl,
  71. }
  72. },
  73. mounted() {
  74. },
  75. methods:{
  76. getDetail(e){
  77. this.$emit('getDetail',e)
  78. },
  79. getPreview(idx,arr) {
  80. var newArr=[];
  81. arr.forEach(ite=>{
  82. var ds=this.baseUrl+ite
  83. newArr.push(ds)
  84. })
  85. uni.previewImage({
  86. urls: newArr,
  87. current:idx,
  88. success: function(data) {},
  89. fail: function(err) {}
  90. });
  91. },
  92. }
  93. }
  94. </script>
  95. <style lang="scss" scoped>
  96. .flex{display: flex;}
  97. .flexc{display: flex;align-items: center;}
  98. .mb10{margin-bottom: 20rpx;}
  99. // 报修
  100. .walists{background: #FFFFFF;border-radius: 20rpx;margin-bottom: 24rpx; position: relative;
  101. .watop{
  102. padding: 0 36rpx 8rpx 38rpx;
  103. .watit{padding: 24rpx 0;margin-bottom: 4rpx;display: flex;
  104. .tit{font-weight: bold;font-size: 28rpx;color: #272727;flex: 1;
  105. .cir{width: 14rpx;margin-left: 8rpx;margin-bottom: 10rpx;height: 14rpx;display: inline-block;background: #FF6969;border-radius: 8rpx;}
  106. }
  107. .txt{font-weight: bold;font-size: 26rpx;flex: 0 0 auto;
  108. }
  109. }
  110. }
  111. .walist{display: flex;font-weight: 500;font-size: 24rpx;color: #666666;margin-bottom: 16rpx;
  112. .tit{min-width: 100rpx;text-align-last: justify}
  113. }
  114. .wabtn{display: flex;align-items: center;justify-content: space-between;border-top: 2rpx solid #E5E5E5;height: 80rpx;padding: 0 38rpx;
  115. view{font-weight: 500;font-size: 24rpx;color: #666666;}
  116. image{width: 16rpx;height: 28rpx;}
  117. }
  118. }
  119. // 无数据
  120. .nodata{display: flex;flex-direction: column;align-items: center;
  121. image{width: 440rpx;height: 440rpx;}
  122. view{font-size: 30rpx;color: #666666;font-weight: bold;}
  123. }
  124. </style>