GetpmProgressReportDTOs.vue 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135
  1. <template>
  2. <view>
  3. <uni-list>
  4. <uni-list-item v-for="(item, index) in listData" :key="index" @click="goDetail(item)" clickable >
  5. <view slot="body" class="slot-box">
  6. <view class="row">
  7. <view class="column-left">工作项:</view>
  8. <view class="column-right">{{item.progressName}}->{{item.nodeName}}</view>
  9. </view>
  10. <view class="row">
  11. <view class="column-left">实际开始时间:</view>
  12. <view class="column-right">{{item.actualStartDate}}</view>
  13. </view>
  14. <view class="row">
  15. <view class="column-left">实际结束时间:</view>
  16. <view class="column-right">{{item.actualFinishDate}}</view>
  17. </view>
  18. <view class="row">
  19. <view class="column-left">进度:</view>
  20. <view class="column-right progress-box">
  21. <progress :percent="item.completePercent" show-info stroke-width="3" />
  22. </view>
  23. </view>
  24. <view class="row">
  25. <view class="column-left">状态:</view>
  26. <view class="column-right">{{item.stateName}}</view>
  27. </view>
  28. </view>
  29. </uni-list-item>
  30. </uni-list>
  31. <view style="bottom: 15px;right:10px;position: fixed;z-index: 50;">
  32. <router-link :to="'/pages/template/ProgressReportAdd/ProgressReportAdd?progressId=' + progressId +'&progressName=' + progressName +'&progressNodeId=' + progressNodeId +'&progressNodeName=' + progressNodeName" style="text-decoration: none;" title="进度报告添加">
  33. <uni-icons type="plus-filled" size="80" color="#5678FE"></uni-icons>
  34. </router-link>
  35. </view>
  36. </view>
  37. </template>
  38. <script>
  39. import {
  40. GetpmProgressReportDTOs
  41. } from "@/common/api/ProgressApi.js";
  42. import uniLoadMore from '@/components/uni-load-more/uni-load-more.vue';
  43. export default {
  44. components: {
  45. uniLoadMore
  46. },
  47. data() {
  48. return {
  49. listData: [],
  50. searchvalue:'',
  51. last_id: '',
  52. progressId:0,
  53. progressName:'',
  54. progressNodeId:0,
  55. progressNodeName:'',
  56. reload: false,
  57. status: 'more',
  58. contentText: {
  59. contentdown: '上拉加载更多',
  60. contentrefresh: '加载中',
  61. contentnomore: '没有更多'
  62. }
  63. };
  64. },
  65. onLoad() {
  66. console.info("当前登录状态:" + this.$store.state.isLogin);
  67. //console.info(this);
  68. this.$util.persistLogin(this);
  69. },
  70. onPullDownRefresh() {
  71. this.reload = true;
  72. this.last_id = '';
  73. this.getList();
  74. },
  75. onReachBottom() {
  76. this.status = 'more';
  77. this.getList();
  78. },
  79. created: function() {
  80. this.getList();
  81. },
  82. methods: {
  83. getList() {
  84. let that = this;
  85. let progressNodeId = that.$util.getQuery("progressNodeId");
  86. let userCode=that.$util.getState(that, 'userCode');
  87. GetpmProgressReportDTOs(progressNodeId).then((res) => {
  88. console.info(res);
  89. that.listData=[];
  90. res.forEach(function(item, index, array) {
  91. that.$set(that.listData, index, item);
  92. if(index==0){
  93. that.progressId=item.progressId;
  94. that.progressName=item.progressName;
  95. that.progressNodeId=item.progressNodeId;
  96. that.progressNodeName=item.nodeName;
  97. }
  98. });
  99. console.info(that.listData);
  100. });
  101. },
  102. goDetail: function(item) {
  103. console.info('检查godetail', item);
  104. uni.navigateTo({
  105. url: '/pages/template/GetpmProgressReportDTO/GetpmProgressReportDTO?&id=' + item.id
  106. });
  107. },
  108. search(res) { //回车搜索
  109. this.searchvalue = res.value; //赋值
  110. this.getList(); //调用搜索方法
  111. },
  112. input(res) {
  113. this.searchVal = res.value
  114. },
  115. cancel(res) {
  116. console.info('点击取消,输入值为:' + res.value);
  117. }
  118. }
  119. };
  120. </script>
  121. <style scoped>
  122. </style>