综合办公系统
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

flowNote.vue 2.5KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. <!--
  2. * @Author: ysh
  3. * @Date: 2025-03-17 10:04:51
  4. * @LastEditors: Please set LastEditors
  5. * @LastEditTime: 2025-06-16 17:08:15
  6. -->
  7. <template>
  8. <view>
  9. <scroll-view scroll-x="true">
  10. <uv-steps :current="currentNum">
  11. <uv-steps-item :error="item.comment && item.comment.type == '退回意见'" v-for="item, index in flowRecordList"
  12. :key="'f' + index" :title="item.taskName" :desc="item.finishTime"></uv-steps-item>
  13. </uv-steps>
  14. </scroll-view>
  15. <view class="custom-block danger" v-if="isRetrun">
  16. <uni-title type="h3" title="任务被退回,请修改后重新提交" color="#900"></uni-title>
  17. <view>
  18. <p>退回意见:{{ reBackDescription }}</p>
  19. <p>办理人:{{ assigneeName }}</p>
  20. </view>
  21. </view>
  22. <uv-divider></uv-divider>
  23. </view>
  24. </template>
  25. <script>
  26. import { flowRecord, flowRecordFull } from "@/api/flowable/finished";
  27. export default {
  28. props: {
  29. taskForm: Object,
  30. },
  31. data() {
  32. return {
  33. flowRecordList: [],
  34. currentNum: 0,
  35. isRetrun: false,
  36. reBackDescription: '',
  37. assigneeName: ''
  38. }
  39. },
  40. created() {
  41. if (!this.taskForm.procInsId) {
  42. return
  43. }
  44. this.getFlowRecordList(this.taskForm.procInsId, this.taskForm.deployId);
  45. },
  46. methods: {
  47. /** 流程流转记录 */
  48. getFlowRecordList(procInsId, deployId) {
  49. this.currentNum = 0;
  50. const params = { procInsId: procInsId, deployId: deployId }
  51. flowRecordFull(params).then(res => {
  52. if (res.data.flowList.length > 1 && res.data.flowList[1].comment && res.data.flowList[1].comment.type == '退回意见') {
  53. this.reBackDescription = res.data.flowList[1].comment.comment
  54. this.assigneeName = res.data.flowList[1].assigneeName
  55. this.isRetrun = true
  56. } else {
  57. this.isRetrun = false
  58. }
  59. this.flowRecordList = res.data.flowList.reverse();
  60. for (let i = 0; i < this.flowRecordList.length; i++) {
  61. if (!this.flowRecordList[i].finishTime) {
  62. this.currentNum = i
  63. }
  64. }
  65. if (this.currentNum == 0) {
  66. this.currentNum = this.flowRecordList.length
  67. }
  68. })
  69. },
  70. },
  71. }
  72. </script>
  73. <style lang="scss" scoped>
  74. .custom-block {
  75. padding: 10px;
  76. border-left-width: 2px;
  77. border-left-style: solid;
  78. margin: 5px 0;
  79. }
  80. .danger {
  81. background-color: #ffe6e6;
  82. border-color: #c00;
  83. color: #4d0000;
  84. }
  85. </style>