managerList.vue 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  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) => handleClickContext(id, item)">
  13. <!-- @content-click="(id) => handle2ProcessTask(item.id, item.procInstId, 'cc', item.procDefId,false)" -->
  14. <di-descriptions :title="item.processInstanceName" label-col="3" value-col="9" :border-bottom="true" >
  15. <!-- <template slot="right" v-if="categoryMap[item.category]">
  16. <u-tag size="mini" :text="categoryMap[item.category].label" :type="categoryMap[item.category].type" mode="light" />
  17. </template> -->
  18. <di-descriptions-item label="流程名称" :value="item.processDefinitionName" :ellipsis="true"/>
  19. <di-descriptions-item label="节点名称" :value="item.name" :ellipsis="true"/>
  20. <di-descriptions-item label="开始时间" :value="item.createTime" :ellipsis="true"/>
  21. <!-- <di-descriptions-item label="办结时间" :value="item.endTime" :ellipsis="true"/> -->
  22. </di-descriptions>
  23. </u-swipe-action>
  24. </view>
  25. <u-loadmore v-if="!triggered" :status="status" :loadText='loadText' margin-top="24" margin-bottom="20" />
  26. </scroll-view>
  27. </template>
  28. <script>
  29. import approveList from './approveList'
  30. export default {
  31. mixins: [approveList],
  32. data() {
  33. return {
  34. baseApi: '/workflow',
  35. listApi: 'task/runTaskList',
  36. customQueryParam: {
  37. // category: 'todo',
  38. // taskCategory: 'cc',
  39. manager: true,
  40. // findByCurrentUserId: true,
  41. // orderBy: 'startTime:DESC'
  42. },
  43. categoryMap: {
  44. todo: {
  45. label: '待办',
  46. type: 'primary'
  47. },
  48. hold: {
  49. label: '暂存',
  50. type: 'warning'
  51. },
  52. cc: {
  53. label: '抄送',
  54. type: 'success'
  55. }
  56. }
  57. }
  58. },
  59. methods: {
  60. async handleClickContext (id, item) {
  61. /* if (!item.assignee) {
  62. await this.claim(item.id)
  63. } */
  64. this.handle2ProcessTask(id, item.procInstId, item.category, item.procDefId, true)
  65. },
  66. handle2ProcessTask(id, instId, category, definitionId, allowDeal) {
  67. uni.navigateTo({
  68. url:`/pages/workflowTask/webviewPages/dealTask?id=${id}&definitionId=${definitionId}&instId=${instId}&category=${category}&allowDeal=${allowDeal}&withManager=true`
  69. })
  70. },
  71. }
  72. }
  73. </script>
  74. <style>
  75. .di-scroll-list {
  76. background: none;
  77. }
  78. </style>