GetPmProgressDTOs.vue 3.5 KB

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