plan.vue 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  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: 'Inspection/getInspectionList',
  49. data: params,
  50. showLoading: true
  51. })
  52. this.getData = res.data.data;
  53. setTimeout(()=>{
  54. this.data_res = parseInt(res.data.length)?1:0
  55. },100)
  56. // alert(this.data_res)
  57. // this.planList = this.getData.point
  58. },
  59. goInnerList(item) {
  60. uni.navigateTo({
  61. url: "/pages/xunJian/planInnerList/planInnerList?id=" + item.id ,
  62. })
  63. }
  64. }
  65. }
  66. </script>
  67. <style lang="scss">
  68. </style>