综合办公系统
Ви не можете вибрати більше 25 тем Теми мають розпочинатися з літери або цифри, можуть містити дефіси (-) і не повинні перевищувати 35 символів.

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140
  1. <template>
  2. <view class="box">
  3. <!-- <uni-steps :options="flowRecordList" active-color="#007AFF" :active="active" direction="column">
  4. <uni-card>
  5. <text>这是一个基础卡片示例,内容较少,此示例展示了一个没有任何属性不带阴影的卡片。</text>
  6. </uni-card>
  7. </uni-steps> -->
  8. <scroll-view scroll-y="true" class="scroll-box">
  9. <uv-steps :current="active" direction="column">
  10. <uv-steps-item v-for="item, index in flowRecordList" :key="'f' + index" :title="item.taskName">
  11. <!-- <template v-slot:icon>
  12. <uv-icon name="checkmark-circle-fill" color="#53c21d"></uv-icon>
  13. </template> -->
  14. <template v-slot:desc>
  15. <view class="desc">
  16. <view class="desc-item">
  17. <view class="item-label">办理人:</view>
  18. <view class="item-value">{{ item.assigneeName }}</view>
  19. </view>
  20. <view class="desc-item" v-if="item.candidate">
  21. <view class="item-label">候选办理:</view>
  22. <view class="item-value">{{ item.candidate }}</view>
  23. </view>
  24. <view class="desc-item">
  25. <view class="item-label">接收时间:</view>
  26. <view class="item-value">{{ item.createTime }}</view>
  27. </view>
  28. <view class="desc-item">
  29. <view class="item-label">处理时间:</view>
  30. <view class="item-value">{{ item.finishTime }}</view>
  31. </view>
  32. <view class="desc-item">
  33. <view class="item-label">耗时:</view>
  34. <view class="item-value">{{ item.duration }}</view>
  35. </view>
  36. </view>
  37. </template>
  38. </uv-steps-item>
  39. </uv-steps>
  40. </scroll-view>
  41. </view>
  42. </template>
  43. <script>
  44. import { flowRecord } from "@/api/flowable/finished";
  45. export default {
  46. props: {
  47. rows: Object
  48. },
  49. watch: {
  50. rows(newval) {
  51. console.log(newval);
  52. this.getFlowRecordList();
  53. }
  54. },
  55. created() {
  56. this.getFlowRecordList();
  57. },
  58. data() {
  59. return {
  60. flowRecordList: [], // 流程流转数据
  61. flowList: [],
  62. active: 0,
  63. }
  64. },
  65. methods: {
  66. setColor(val) {
  67. if (val) {
  68. return "#2bc418";
  69. } else {
  70. return "#b3bdbb";
  71. }
  72. },
  73. setIcon(val) {
  74. if (val) {
  75. return "el-icon-check";
  76. } else {
  77. return "el-icon-time";
  78. }
  79. },
  80. /** 获取流程变量内容 */
  81. processVariables() {
  82. if (this.rows.taskId) {
  83. }
  84. },
  85. /** 流程流转记录 */
  86. getFlowRecordList() {
  87. const params = { procInsId: this.rows.procInsId, deployId: this.rows.deployId }
  88. flowRecord(params).then(res => {
  89. this.flowRecordList = res.data.flowList.reverse();
  90. console.log(this.flowRecordList);
  91. this.active = this.flowRecordList[i].length - 1
  92. for (let i = 0; i < this.flowRecordList.length; i++) {
  93. if (!this.flowRecordList[i].finishTime) {
  94. this.active = i
  95. }
  96. }
  97. }).catch(res => {
  98. })
  99. },
  100. }
  101. }
  102. </script>
  103. <style lang="scss" scoped>
  104. .box {
  105. padding: 20px;
  106. height: 100%;
  107. }
  108. .scroll-box {
  109. height: 100%;
  110. }
  111. .desc {
  112. padding: 8px;
  113. background: #fff;
  114. border-radius: 8px;
  115. box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
  116. width: 100%;
  117. .desc-item {
  118. display: flex;
  119. border-bottom: 1px solid #eee;
  120. height: 30px;
  121. align-items: center;
  122. .item-label {
  123. width: 80px;
  124. text-align: right;
  125. }
  126. .item-value {
  127. // flex: 1;
  128. }
  129. }
  130. }
  131. </style>