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

flowNote.vue 2.4KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. <!--
  2. * @Author: ysh
  3. * @Date: 2025-03-17 10:04:51
  4. * @LastEditors: Please set LastEditors
  5. * @LastEditTime: 2025-03-28 14:29:11
  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. this.getFlowRecordList(this.taskForm.procInsId, this.taskForm.deployId);
  42. },
  43. methods: {
  44. /** 流程流转记录 */
  45. getFlowRecordList(procInsId, deployId) {
  46. this.currentNum = 0;
  47. const params = { procInsId: procInsId, deployId: deployId }
  48. flowRecordFull(params).then(res => {
  49. if (res.data.flowList.length > 1 && res.data.flowList[1].comment && res.data.flowList[1].comment.type == '退回意见') {
  50. this.reBackDescription = res.data.flowList[1].comment.comment
  51. this.assigneeName = res.data.flowList[1].assigneeName
  52. this.isRetrun = true
  53. } else {
  54. this.isRetrun = false
  55. }
  56. this.flowRecordList = res.data.flowList.reverse();
  57. for (let i = 0; i < this.flowRecordList.length; i++) {
  58. if (!this.flowRecordList[i].finishTime) {
  59. this.currentNum = i
  60. }
  61. }
  62. if (this.currentNum == 0) {
  63. this.currentNum = this.flowRecordList.length
  64. }
  65. })
  66. },
  67. },
  68. }
  69. </script>
  70. <style lang="scss" scoped>
  71. .custom-block {
  72. padding: 10px;
  73. border-left-width: 2px;
  74. border-left-style: solid;
  75. margin: 5px 0;
  76. }
  77. .danger {
  78. background-color: #ffe6e6;
  79. border-color: #c00;
  80. color: #4d0000;
  81. }
  82. </style>