launchList.vue 3.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  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.processNo" :ellipsis="true"/>
  21. <di-descriptions-item label="当前节点" :value="item.taskDefName" :ellipsis="true"/>
  22. <di-descriptions-item label="申请人" :value="item.applyUserName" :ellipsis="true"/>
  23. <di-descriptions-item label="申请时间" :value="item.applyTime" :ellipsis="true"/>
  24. <di-descriptions-item label="药剂类型" :value="item.medicineTypeName" :ellipsis="true"/>
  25. <u-row style="justify-content: flex-end;">
  26. <u-col :span="2" v-if="item.endTime == null">
  27. <u-button type="primary" plain size="mini" @click="handle2Click(item.id, 'cancel')">撤销</u-button>
  28. </u-col>
  29. <u-col :span="2.5" v-if="['已撤销', '不通过'].indexOf(item.statusLabel) > -1">
  30. <u-button type="primary" plain size="mini" @click="handle2RestartWorkflow(item)">重新发起</u-button>
  31. </u-col>
  32. </u-row>
  33. </di-descriptions>
  34. </u-swipe-action>
  35. </view>
  36. <u-loadmore v-if="!triggered" :status="status" :loadText='loadText' margin-top="24" margin-bottom="20" />
  37. </scroll-view>
  38. </template>
  39. <script>
  40. import approveList from './approveList'
  41. export default {
  42. mixins: [approveList],
  43. // inject: ['applyTime'],
  44. data() {
  45. return {
  46. baseApi: '/cusFlowTask',
  47. listApi: 'myApplyList',
  48. statusColorMap: {
  49. '已完成': 'success',
  50. '进行中': 'warning',
  51. '已撤销': 'info',
  52. '不通过': 'error'
  53. }
  54. }
  55. },
  56. methods: {
  57. }
  58. }
  59. </script>
  60. <style>
  61. .di-scroll-list {
  62. background: none;
  63. }
  64. </style>