controlReport.vue 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. <template>
  2. <view class="site-wrapper">
  3. <view style="height: calc(100vh - 200rpx);overflow:scroll">
  4. <view class="cu-list menu-avatar">
  5. <view class="cu-item" :class="modalName=='move-box-'+ index?'move-cur':''" v-for="(item,index) in controlReport"
  6. :key="index" :data-target="'move-box-' + index" @tap="goDetail(item.id)" >
  7. <view class="cu-avatar round lg" style="background-image:url(../../../static/controlReportIcon.png)"></view>
  8. <view class="content" >
  9. <view class="pro-title">
  10. <view class="cut">{{item.supervision_title}}</view>
  11. </view>
  12. <view class="pro-date ">{{item.site_name}}</view>
  13. <view class="pro-date ">{{item.create_time}}</view>
  14. </view>
  15. <view class="nav-right num">
  16. <view class="text-grey">
  17. <text class="icon iconfont margin-right-sm margin-left-lg">&#xe629;</text>
  18. </view>
  19. </view>
  20. </view>
  21. </view>
  22. </view>
  23. <!-- 新增按钮start -->
  24. <view class="plus">
  25. <image src="../../../static/plus.png" style="width:100rpx;height:100rpx" @tap="goAddPage()"></image>
  26. </view>
  27. <!-- 新增按钮end -->
  28. </view>
  29. </template>
  30. <script>
  31. export default {
  32. data() {
  33. return {
  34. controlReport: [],
  35. modalName: null,
  36. };
  37. },
  38. onLoad:function(option){
  39. this.getDataList()
  40. },
  41. methods: {
  42. // 页面跳转
  43. goAddPage(item) {
  44. uni.navigateTo({
  45. url: '/pages/eleControl/controlReport/controlReportAdd/controlReportAdd',
  46. });
  47. },
  48. goDetail(id) {
  49. uni.navigateTo({
  50. url: '/pages/eleControl/controlReport/controlReportDetail/controlReportDetail?id='+id,
  51. });
  52. },
  53. //数据请求
  54. async getDataList(params = {}) {
  55. const res = await this.$myRequest({
  56. url: 'MonitoringReporting/getMonitoringReportingList',
  57. showLoading: true,
  58. data: params
  59. })
  60. console.log('res.data.data')
  61. console.log(res.data.data)
  62. this.controlReport = res.data.data
  63. }
  64. }
  65. }
  66. </script>
  67. <style lang="scss">
  68. .cu-item{
  69. height:160rpx!important
  70. }
  71. </style>