GetWorkFlowProcedureList.vue 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125
  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.description}}</view>
  9. </view>
  10. <view class="row">
  11. <view class="column-left">索引:</view>
  12. <view class="column-right">{{item.procedureName}}</view>
  13. </view>
  14. <view class="row">
  15. <view class="column-left">版本号:</view>
  16. <view class="column-right">{{item.versionNumber}}</view>
  17. </view>
  18. </view>
  19. </uni-list-item>
  20. </uni-list>
  21. </view>
  22. </template>
  23. <script>
  24. import {
  25. GetWorkFlowProcedureList
  26. } from "@/common/api/commonApi.js";
  27. export default {
  28. data() {
  29. return {
  30. listData: [],
  31. };
  32. },
  33. onLoad() {
  34. console.info("当前登录状态:" + this.$store.state.isLogin);
  35. //console.info(this);
  36. this.$util.persistLogin(this);
  37. },
  38. onPullDownRefresh() {
  39. this.reload = true;
  40. this.last_id = '';
  41. },
  42. onReachBottom() {
  43. this.status = 'more';
  44. },
  45. created: function() {
  46. this.getList();
  47. },
  48. methods: {
  49. getList() {
  50. let that = this;
  51. let procedureName=this.$util.getQuery("procedureName");
  52. let projectCode=this.$util.getState(this,'projectCode');
  53. let activity=1;
  54. GetWorkFlowProcedureList(procedureName,projectCode,activity).then((res) => {
  55. console.info('res',res);
  56. res.forEach(function(item, index, array) {
  57. that.$set(that.listData, index, item);
  58. });
  59. console.info(that.listData);
  60. });
  61. },
  62. goDetail: function(item) {
  63. console.info('godetail');
  64. let procedureName=this.$util.getQuery("procedureName");
  65. let applicationCode=this.$util.getQuery("applicationCode");
  66. let projectCode=this.$util.getState(this,"projectCode");
  67. let procedureCode=item.procedureCode;
  68. uni.navigateTo({
  69. url: '../WorkFlowAudit/WorkFlowAudit?procedureName=' + procedureName+'&applicationCode='+applicationCode+'&procedureCode='+procedureCode
  70. });
  71. },
  72. }
  73. };
  74. </script>
  75. <style scoped>
  76. .uni-media-list-body {
  77. height: auto;
  78. justify-content: space-around;
  79. }
  80. .uni-media-list-text-top {
  81. height:35px;
  82. line-height: 35px;
  83. font-size: 15rpx;
  84. font-weight: 500;
  85. letter-spacing:1px;
  86. overflow: hidden;
  87. }
  88. .uni-media-list-text-body{
  89. flex-direction: row;
  90. height:50px;
  91. font-size: 13px;
  92. color: #8f8f94;
  93. letter-spacing:1px;
  94. }
  95. .uni-media-list-text-bottom {
  96. display: flex;
  97. justify-content: space-between;
  98. height:35px;
  99. line-height: 35px;
  100. font-size: 13px;
  101. color: #8f8f94;
  102. letter-spacing:1px;
  103. padding-bottom: 0;
  104. }
  105. </style>