launchList.vue 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  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.name" 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. <u-row style="justify-content: flex-end;">
  20. <u-col :span="2" v-if="item.endTime == null">
  21. <u-button type="primary" plain size="mini" @click="handle2Click(item.id, 'cancel')">撤销</u-button>
  22. </u-col>
  23. <u-col :span="2.5" v-if="['已撤销', '不通过'].indexOf(item.statusLabel) > -1">
  24. <u-button type="primary" plain size="mini" @click="handle2RestartWorkflow(item)">重新发起</u-button>
  25. </u-col>
  26. </u-row>
  27. </di-descriptions>
  28. </u-swipe-action>
  29. </view>
  30. <u-loadmore v-if="!triggered" :status="status" :loadText='loadText' margin-top="24" margin-bottom="20" />
  31. </scroll-view>
  32. </template>
  33. <script>
  34. import approveList from './approveList'
  35. export default {
  36. mixins: [approveList],
  37. data() {
  38. return {
  39. baseApi: '/workflow/processLaunch',
  40. listApi: 'myProcessList',
  41. statusColorMap: {
  42. '已完成': 'success',
  43. '进行中': 'warning',
  44. '已撤销': 'info',
  45. '不通过': 'error'
  46. }
  47. }
  48. },
  49. methods: {
  50. }
  51. }
  52. </script>
  53. <style>
  54. .di-scroll-list {
  55. background: none;
  56. }
  57. </style>