approveList.js 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  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. console.log(val,'搜索关键字', this.type)
  53. if(this.type === 'myLaunch'){
  54. this.queryParam['processNo'] = val||undefined
  55. }else{
  56. this.queryParam['queryName'] = val
  57. }
  58. this.handlePullDownRefresh()
  59. }
  60. },
  61. applyTime:{
  62. handler: function (val) {
  63. console.log('改变',val)
  64. this.queryParam['applyTime'] = val||undefined
  65. this.handlePullDownRefresh()
  66. }
  67. },
  68. processDefinitionName:{
  69. handler: function (val) {
  70. console.log('改变',val)
  71. this.queryParam['processDefinitionName'] = val||undefined
  72. this.handlePullDownRefresh()
  73. }
  74. },
  75. processStatus:{
  76. handler: function (val) {
  77. console.log('改变',val)
  78. this.queryParam['processStatus'] = val||undefined
  79. this.handlePullDownRefresh()
  80. }
  81. }
  82. },
  83. props: {
  84. approveListHeight: {
  85. type: Number
  86. },
  87. searchKeyWord: {
  88. type: String
  89. },
  90. type: {
  91. type: String,
  92. required: true
  93. },
  94. applyTime: {
  95. type: Array
  96. },
  97. processDefinitionName: {
  98. type: String
  99. },
  100. processStatus: {
  101. type: Number
  102. },
  103. }
  104. }