managerList.vue 2.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  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.processDefinitionName" 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.processNo" :ellipsis="true"/>
  19. <di-descriptions-item label="当前节点" :value="item.name" :ellipsis="true"/>
  20. <di-descriptions-item label="申请人" :value="item.applyUserName" :ellipsis="true"/>
  21. <di-descriptions-item label="申请时间" :value="item.applyTime" :ellipsis="true"/>
  22. <!-- <di-descriptions-item label="办结时间" :value="item.endTime" :ellipsis="true"/> -->
  23. </di-descriptions>
  24. </u-swipe-action>
  25. </view>
  26. <u-loadmore v-if="!triggered" :status="status" :loadText='loadText' margin-top="24" margin-bottom="20" />
  27. </scroll-view>
  28. </template>
  29. <script>
  30. import approveList from './approveList'
  31. export default {
  32. mixins: [approveList],
  33. data() {
  34. return {
  35. baseApi: '/cusFlowTask',
  36. listApi: 'myMeddleList',
  37. customQueryParam: {
  38. // category: 'todo',
  39. // taskCategory: 'cc',
  40. manager: true,
  41. // findByCurrentUserId: true,
  42. // orderBy: 'startTime:DESC'
  43. },
  44. categoryMap: {
  45. todo: {
  46. label: '待办',
  47. type: 'primary'
  48. },
  49. hold: {
  50. label: '暂存',
  51. type: 'warning'
  52. },
  53. cc: {
  54. label: '抄送',
  55. type: 'success'
  56. }
  57. }
  58. }
  59. },
  60. methods: {
  61. async handleClickContext (id, item) {
  62. /* if (!item.assignee) {
  63. await this.claim(item.id)
  64. } */
  65. this.handle2ProcessTask(id, item.procInstId, item.category, item.procDefId, true)
  66. },
  67. handle2ProcessTask(id, instId, category, definitionId, allowDeal) {
  68. uni.navigateTo({
  69. url:`/pages/workflowTask/webviewPages/dealTask?id=${id}&definitionId=${definitionId}&instId=${instId}&category=${category}&allowDeal=${allowDeal}&withManager=true`
  70. })
  71. },
  72. }
  73. }
  74. </script>
  75. <style>
  76. .di-scroll-list {
  77. background: none;
  78. }
  79. </style>