repair.vue 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148
  1. <template>
  2. <view class="processWrapper " style=" height: calc(100vh - 134px);
  3. overflow: scroll;">
  4. <!-- 宫格列表 -->
  5. <view class="bg-white " >
  6. <view class="cu-list grid col-3 no-border" style="padding-bottom:0">
  7. <view class="cu-item justify-center align-center " v-for="(item,index) in repairSquare"
  8. :key="index">
  9. <view :style="`background:${item.color}`" style="width:90%" class=" repairSquare">
  10. <view class="num">{{item.num}}</view>
  11. <text class="title" style="color:#fff">{{item.title}}</text>
  12. </view>
  13. </view>
  14. </view>
  15. </view>
  16. <block>
  17. <view>
  18. <!-- <view class="cu-list menu-avatar ">
  19. <view class="cu-item" v-for="(item,index) in unporcessList" :key="index">
  20. <view class="cu-avatar " :style="`background-image:url(${item.imgUrl})`" style="width:82rpx;height:82rpx"></view>
  21. <view class="content">
  22. <view class="pro-title">
  23. <view class="cut">{{item.title}}</view>
  24. </view>
  25. <view class="pro-des ">
  26. <view class="text-cut">
  27. {{item.subTitle}}
  28. </view>
  29. </view>
  30. <view class="pro-date ">{{item.time}}</view>
  31. </view>
  32. <view class="action margin-right-sm" style="text-align:right">
  33. <view style="color:#FDCA60" v-if="item.status==0">未处理</view>
  34. <view style="color:#59D1EA" v-if="item.status==1">未审核</view>
  35. <view style="color:#F77070" v-if="item.status==2">未通过</view>
  36. <view style="color:#72D06A" v-if="item.status==3">已完成</view>
  37. <view style="color:#F7895E" v-if="item.status==4">超时完成</view>
  38. </view>
  39. </view>
  40. </view> -->
  41. <view class="cu-list menu-avatar ">
  42. <view class="cu-item" v-for="(item,index) in getDataList" :key="index">
  43. <view class="cu-avatar " :style="`background-image:url(${item.imgUrl})`"
  44. style="width:82rpx;height:82rpx"></view>
  45. <view class="content">
  46. <view class="pro-title">
  47. <view class="cut">{{item.wx_name}}</view>
  48. </view>
  49. <view class="pro-des ">
  50. <view class="text-cut">
  51. {{item.sj_type==1?'故障':item.sj_type==2?'隐患':'其他'}}
  52. </view>
  53. </view>
  54. </view>
  55. <view class="action margin-right-sm" style="text-align:right">
  56. <view style="color:#FDCA60">未处理</view>
  57. </view>
  58. </view>
  59. </view>
  60. </view>
  61. </block>
  62. <view class="btn-area submitBottomBtn padding-lr-sm">
  63. <button class="bg-blue round margin-top" @tap="goRepairDetail">报 修 </button>
  64. </view>
  65. </view>
  66. </template>
  67. <script>
  68. import json from '../../data/json.js';
  69. export default {
  70. data() {
  71. return {
  72. unporcessList:json.repair,
  73. repairSquare: json.repairSquare,
  74. modalName: null,
  75. listTouchStart: 0,
  76. listTouchDirection: null,
  77. CustomBar: this.CustomBar,
  78. getData:{},
  79. getDataList:{}
  80. };
  81. },
  82. onLoad:function(option){
  83. this.goRepairList({'company_code':uni.getStorageSync('selectedCode')})
  84. },
  85. methods: {
  86. // 保修列表数据请求
  87. async goRepairList(params = {}) {
  88. const res = await this.$myRequest({
  89. url: 'Repair/getRepairList',
  90. data:params,
  91. showLoading: true
  92. })
  93. this.getData=res.data;
  94. this.getDataList=res.data.data;
  95. this.repairSquare[0].num=res.data.repair_count;
  96. this.repairSquare[1].num=res.data.unprocessed_count;
  97. this.repairSquare[2].num=res.data.not_reviewed_count;
  98. this.repairSquare[3].num=res.data.failed_count;
  99. this.repairSquare[4].num=res.data.completed_count;
  100. this.repairSquare[5].num=res.data.overtime_count;
  101. console.log(this.getData);
  102. },
  103. // 页面跳转
  104. goRepairDetail() {
  105. uni.navigateTo({
  106. url: '/pages/repair/repairDetail/repairDetail',
  107. success: res => {},
  108. fail: () => {},
  109. complete: () => {}
  110. });
  111. }
  112. }
  113. }
  114. </script>
  115. <style lang="scss">
  116. .processList{
  117. position:static;
  118. }
  119. </style>