WorkflowHistoryDialog.vue 1019 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. <template>
  2. <table-dialog
  3. ref="tableDialog"
  4. title="流程历史"
  5. :schema="historySchema"
  6. />
  7. </template>
  8. <script>
  9. import { WorkflowStateInfo } from '@/constant'
  10. import { getWorkflowHistory } from '../api'
  11. export default {
  12. name: 'WorkflowHistoryDialog',
  13. data () {
  14. return {
  15. historySchema: {
  16. nonPagination: true,
  17. list: this.getWorkflowHistory,
  18. transform: this.transformHistory,
  19. cols: [
  20. { label: '节点', render: ({ status }) => WorkflowStateInfo[status], width: 100, align: 'center' },
  21. { prop: 'handledBy', label: '处理人', width: 160, align: 'center' },
  22. { prop: 'createTime', label: '处理时间', align: 'center' },
  23. { prop: 'reason', label: '备注', align: 'right' }
  24. ]
  25. }
  26. }
  27. },
  28. methods: {
  29. show (workflowId) {
  30. this.$workflowId = workflowId
  31. this.$refs.tableDialog.show()
  32. },
  33. getWorkflowHistory () {
  34. return getWorkflowHistory(this.$workflowId)
  35. }
  36. }
  37. }
  38. </script>