launchList.vue 2.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  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.id" :ellipsis="true"/>
  21. <di-descriptions-item label="当前节点" :value="item.nodeKeyName" :ellipsis="true"/>
  22. <di-descriptions-item label="申请人" :value="item.startUserName" :ellipsis="true"/>
  23. <di-descriptions-item label="申请时间" :value="item.startTime" :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. data() {
  43. return {
  44. baseApi: '/workflow/processLaunch',
  45. listApi: 'myProcessList',
  46. statusColorMap: {
  47. '已完成': 'success',
  48. '进行中': 'warning',
  49. '已撤销': 'info',
  50. '不通过': 'error'
  51. }
  52. }
  53. },
  54. methods: {
  55. }
  56. }
  57. </script>
  58. <style>
  59. .di-scroll-list {
  60. background: none;
  61. }
  62. </style>