approveList.js 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. import list from '@/mixins/list'
  2. import {dibootApi} from '@/utils/dibootApi'
  3. export default {
  4. mixins: [list],
  5. created() {
  6. this.activeIndex = -100
  7. this.getList(true)
  8. },
  9. methods: {
  10. handle2ProcessTask(id, instId, category, definitionId, allowDeal) {
  11. uni.navigateTo({
  12. url:`/pages/workflowTask/webviewPages/dealTask?id=${id}&definitionId=${definitionId}&instId=${instId}&category=${category}&allowDeal=${allowDeal}`
  13. })
  14. },
  15. // 撤销
  16. handle2Click(processInstanceId, taskOperate) {
  17. uni.showModal({
  18. title: '',
  19. content: `确认撤销?`,
  20. showCancel: true,
  21. confirmText: '确定',
  22. success: async (res) => {
  23. if (res.confirm) {
  24. const res = await dibootApi.put('/workflow/task/taskOperate', {
  25. processInstanceId,
  26. taskOperate,
  27. validTask: false
  28. })
  29. if (res.code === 0) {
  30. uni.showToast({
  31. title: '撤销成功',
  32. icon: 'none'
  33. })
  34. this.page.pageIndex = 1
  35. this.getList(true)
  36. }
  37. }
  38. }
  39. })
  40. },
  41. // 重新发起
  42. handle2RestartWorkflow(item){
  43. uni.navigateTo({
  44. url: `/pages/workflowTask/webviewPages/startFlow?id=${item.procDefId}&processInstanceId=${item.id}&defaultTitle=${item.name}&name=${item.processDefinitionName}&restart=true&type=myLaunch`
  45. })
  46. }
  47. },
  48. watch: {
  49. searchKeyWord: {
  50. handler: function (val) {
  51. this.list = []
  52. this.queryParam['processDefinitionName'] = val
  53. this.handlePullDownRefresh()
  54. }
  55. }
  56. },
  57. props: {
  58. approveListHeight: {
  59. type: Number
  60. },
  61. searchKeyWord: {
  62. type: String
  63. }
  64. }
  65. }