steps.vue 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. <template>
  2. <view class="">
  3. <view class="sys-background-fff m-20 p-20 r-20">
  4. <view class="row-c" v-for="(item,index) in stageList" :key="index">
  5. <view class="column-c" style="position: relative;top: 45rpx;">
  6. <image class="wh-36"
  7. :src="item.is_execute !== 1? 'https://wealfavor-1257406827.cos.ap-beijing.myqcloud.com/new-xcx/login/Checked1@3x.png':'https://wealfavor-1257406827.cos.ap-beijing.myqcloud.com/new-xcx/login/Checked2@3x.png'"
  8. mode="aspectFill"></image>
  9. <view class="steps-line" :style="{opacity:index == stageList.length - 1?0:1}"></view>
  10. </view>
  11. <view class="sys-from-background-color steps-item p-20 r-20 column flex m-l20">
  12. <text class="size-22 color-718096">{{item.updated_at}}</text>
  13. <view >
  14. <text class="size-26 text-color-666">{{item.stage_name}}:</text>
  15. <text class="size-26 text-color-000 sys-weight-600">{{item.name?item.name:'----'}}</text>
  16. </view>
  17. </view>
  18. </view>
  19. </view>
  20. </view>
  21. </template>
  22. <script>
  23. import {getStageList} from "@/api/task";
  24. export default {
  25. props: {
  26. businessId:{
  27. default:0
  28. }
  29. },
  30. data() {
  31. return {
  32. stageList: []
  33. }
  34. },
  35. watch:{
  36. 'businessId':function () {
  37. // this.getStageList()
  38. }
  39. },
  40. mounted() {
  41. this.getStageList()
  42. },
  43. methods: {
  44. getStageList() {
  45. if(this.businessId<=0){
  46. return false
  47. }
  48. getStageList({
  49. 'id': this.businessId
  50. }).then((res) => {
  51. if (res.code === 1) {
  52. this.stageList = res.data
  53. }
  54. })
  55. },
  56. },
  57. }
  58. </script>
  59. <style lang="scss" scoped>
  60. .steps-item:last-child {
  61. margin-bottom: 0;
  62. }
  63. .steps-line {
  64. width: 2rpx;
  65. background-color: #D9D9D9;
  66. height: 90rpx;
  67. }
  68. </style>