plan.vue 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  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. setTimeout(()=>{
  54. this.data_res = parseInt(res.data.length)?1:0
  55. },100)
  56. // this.planList = this.getData.point
  57. },
  58. goInnerList(item) {
  59. uni.navigateTo({
  60. url: "/pages/weiBao/planInnerList/planInnerList?id=" + item.id ,
  61. })
  62. }
  63. }
  64. }
  65. </script>
  66. <style lang="scss">
  67. // page {
  68. // background-color: #F4F5F7;
  69. // }
  70. </style>