launchList.vue 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. <template>
  2. <scroll-view :style="{height: `calc(${approveListHeight}px - 20rpx)`}" class="di-scroll" scroll-y @scrolltolower="handleOnreachBottom" :refresher-triggered="triggered"
  3. refresher-enabled @refresherrefresh="handlePullDownRefresh">
  4. <view class="di-scroll-list">
  5. <!-- 右滑 -->
  6. <u-swipe-action
  7. style="margin-bottom: 20rpx;border-radius: 10rpx;overflow: hidden;"
  8. v-for="(item, index) in list"
  9. :show="activeIndex === item[primaryKey]"
  10. :key="index"
  11. :index='item.id'
  12. @content-click="(id) => handle2ProcessTask('', item.id, item.category, item.procDefId, false)">
  13. <di-descriptions :title="item.processDefinitionName" label-col="3" value-col="9" :border-bottom="true" >
  14. <u-tag slot="right" size="mini" :text="item.statusLabel" :type="statusColorMap[item.statusLabel]" mode="light" />
  15. <!-- <di-descriptions-item label="流程名称" :value="item.processDefinitionName" :ellipsis="true"/>
  16. <di-descriptions-item label="开始时间" :value="item.startTime" :ellipsis="true"/>
  17. <di-descriptions-item label="结束时间" :value="item.endTime" :ellipsis="true"/>
  18. <di-descriptions-item label="流程耗时" :value="item.durationLabel" :ellipsis="true"/> -->
  19. <!-- 后端说单号是id 查询是procInstId -->
  20. <di-descriptions-item label="流程单号" :value="item.processNo" :ellipsis="true"/>
  21. <di-descriptions-item label="当前节点" :value="item.taskDefName" :ellipsis="true"/>
  22. <di-descriptions-item label="申请人" :value="item.applyUserName" :ellipsis="true"/>
  23. <di-descriptions-item label="申请时间" :value="item.applyTime" :ellipsis="true"/>
  24. <u-row style="justify-content: flex-end;">
  25. <u-col :span="2" v-if="item.endTime == null">
  26. <u-button type="primary" plain size="mini" @click="handle2Click(item.id, 'cancel')">撤销</u-button>
  27. </u-col>
  28. <u-col :span="2.5" v-if="['已撤销', '不通过'].indexOf(item.statusLabel) > -1">
  29. <u-button type="primary" plain size="mini" @click="handle2RestartWorkflow(item)">重新发起</u-button>
  30. </u-col>
  31. </u-row>
  32. </di-descriptions>
  33. </u-swipe-action>
  34. </view>
  35. <u-loadmore v-if="!triggered" :status="status" :loadText='loadText' margin-top="24" margin-bottom="20" />
  36. </scroll-view>
  37. </template>
  38. <script>
  39. import approveList from './approveList'
  40. export default {
  41. mixins: [approveList],
  42. // inject: ['applyTime'],
  43. data() {
  44. return {
  45. baseApi: '/cusFlowTask',
  46. listApi: 'myApplyList',
  47. statusColorMap: {
  48. '已完成': 'success',
  49. '进行中': 'warning',
  50. '已撤销': 'info',
  51. '不通过': 'error'
  52. }
  53. }
  54. },
  55. methods: {
  56. }
  57. }
  58. </script>
  59. <style>
  60. .di-scroll-list {
  61. background: none;
  62. }
  63. </style>