launchList.vue 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  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. v-for="(item, index) in list"
  8. :show="activeIndex === item[primaryKey]"
  9. :key="index"
  10. :index='item.id'
  11. @content-click="(id) => handle2ProcessTask('', item.id, item.category, item.procDefId, false)">
  12. <di-descriptions :title="item.name" label-col="3" value-col="9" :border-bottom="true" >
  13. <u-tag slot="right" size="mini" :text="item.statusLabel" :type="statusColorMap[item.statusLabel]" mode="light" />
  14. <di-descriptions-item label="流程名称" :value="item.processDefinitionName" :ellipsis="true"/>
  15. <di-descriptions-item label="开始时间" :value="item.startTime" :ellipsis="true"/>
  16. <di-descriptions-item label="结束时间" :value="item.endTime" :ellipsis="true"/>
  17. <di-descriptions-item label="流程耗时" :value="item.durationLabel" :ellipsis="true"/>
  18. </di-descriptions>
  19. </u-swipe-action>
  20. </view>
  21. <u-loadmore v-if="!triggered" :status="status" :loadText='loadText' margin-top="24" margin-bottom="20" />
  22. </scroll-view>
  23. </template>
  24. <script>
  25. import approveList from './approveList'
  26. export default {
  27. mixins: [approveList],
  28. data() {
  29. return {
  30. baseApi: '/workflow/processLaunch',
  31. listApi: 'myProcessList',
  32. statusColorMap: {
  33. '已完成': 'success',
  34. '进行中': 'warning',
  35. '已撤销': 'info',
  36. '不通过': 'error'
  37. }
  38. }
  39. }
  40. }
  41. </script>
  42. <style>
  43. </style>