plan.vue 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  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. console.log(res.data.data)
  54. setTimeout(()=>{
  55. this.data_res = res.data.data?1:0
  56. },100)
  57. // alert(this.data_res)
  58. // this.planList = this.getData.point
  59. },
  60. goInnerList(item) {
  61. uni.navigateTo({
  62. url: "/pages/xunJian/planInnerList/planInnerList?id=" + item.id ,
  63. })
  64. }
  65. }
  66. }
  67. </script>
  68. <style lang="scss">
  69. </style>