plan.vue 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. <template>
  2. <view>
  3. <!-- <view style="height:30rpx"></view> -->
  4. <view class=" bg-white plan-sec">
  5. <view class=" text-center margin-top" v-if="data_res === 0">暂无数据...</view>
  6. <view class="cu-list menu-avatar">
  7. <view class="cu-item " v-for="(item,index) in getData" :key="index"
  8. @tap="goInnerList(item)">
  9. <view class="content" style="left:0!important;width:80%">
  10. <view class="title">{{item.plan_name}}</view>
  11. <view class="pro-des ">
  12. <view class="text-cut">
  13. 任务完成率:{{item.completion}}
  14. </view>
  15. </view>
  16. </view>
  17. <view class="nav-right num">
  18. <view class="text-grey">
  19. <!-- <span class="online" v-if="item.data3==2">已执行</span>
  20. <span class="error" v-if="item.data3==1">未执行</span> -->
  21. <text class="icon iconfont margin-right-xs ">&#xe629;</text>
  22. </view>
  23. </view>
  24. </view>
  25. </view>
  26. </view>
  27. </view>
  28. </template>
  29. <script>
  30. import json from '../../../data/json.js';
  31. export default {
  32. data() {
  33. return {
  34. inspectList: json.xunJianPlan,
  35. getData: {},
  36. data_res:1
  37. };
  38. },
  39. onLoad: function(option) {
  40. this.getPlanList({
  41. 'company_code': uni.getStorageSync('selectedCode')
  42. })
  43. },
  44. methods: {
  45. // 巡检计划列表数据请求
  46. async getPlanList(params = {}) {
  47. const res = await this.$myRequest({
  48. url: 'Maintenance/getMaintenanceList',
  49. data: params,
  50. showLoading: true
  51. })
  52. this.getData = res.data.data;
  53. console.log(this.getData)
  54. setTimeout(()=>{
  55. this.data_res = res.data.data?1:0
  56. },100)
  57. // this.planList = this.getData.point
  58. },
  59. goInnerList(item) {
  60. uni.navigateTo({
  61. url: "/pages/weiBao/planInnerList/planInnerList?id=" + item.id ,
  62. })
  63. }
  64. }
  65. }
  66. </script>
  67. <style lang="scss">
  68. // page {
  69. // background-color: #F4F5F7;
  70. // }
  71. </style>