index.ts 797 B

123456789101112131415161718192021222324252627282930313233
  1. import request from '@/config/axios'
  2. export interface CommentVO {
  3. id: string
  4. taskId?: string
  5. task?: {
  6. id: string
  7. name: string
  8. taskDefinitionKey: string
  9. }
  10. processInstanceId: string
  11. type: string
  12. message: string
  13. createTime: string
  14. user?: {
  15. id: number
  16. nickname: string
  17. avatar?: string
  18. deptName?: string
  19. }
  20. }
  21. // 获得指定流程实例的评论列表
  22. export const getCommentListByProcessInstanceId = async (processInstanceId: string) => {
  23. return await request.get({
  24. url: '/bpm/comment/list-by-process-instance-id?processInstanceId=' + processInstanceId
  25. })
  26. }
  27. // 创建流程评论
  28. export const createComment = async (taskId: string, message: string) => {
  29. return await request.post({ url: '/bpm/comment/create', data: { taskId, message } })
  30. }