steps.vue 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  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? '/static/img/login/Checked1@3x.png':'/static/img/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-24 text-color-576">{{item.updated_at}}</text>
  13. <view >
  14. <text class="size-28 text-color-000 sys-weight-600">{{item.stage_name}}:</text>
  15. <text class="size-28 text-color-576">{{item.name?item.name:'----'}}</text>
  16. </view>
  17. <!-- <view v-else>-->
  18. <!-- <text class="size-28 text-color-666">外访:</text>-->
  19. <!-- <text class="size-28 text-color-12 sys-weight-600">张三</text>-->
  20. <!-- </view>-->
  21. </view>
  22. </view>
  23. </view>
  24. </view>
  25. </template>
  26. <script>
  27. import {getStageList} from "@/api/task";
  28. export default {
  29. props: {
  30. businessId:{
  31. default:0
  32. }
  33. },
  34. data() {
  35. return {
  36. stageList: []
  37. }
  38. },
  39. watch:{
  40. 'businessId':function () {
  41. this.getStageList()
  42. }
  43. },
  44. mounted() {
  45. // this.getStageList()
  46. },
  47. methods: {
  48. getStageList() {
  49. if(this.businessId<=0){
  50. return false
  51. }
  52. getStageList({
  53. 'id': this.businessId
  54. }).then((res) => {
  55. if (res.code === 1) {
  56. this.stageList = res.data
  57. }
  58. })
  59. },
  60. },
  61. }
  62. </script>
  63. <style lang="scss" scoped>
  64. .steps-item:last-child {
  65. margin-bottom: 0;
  66. }
  67. .steps-line {
  68. width: 2rpx;
  69. background-color: #D9D9D9;
  70. height: 90rpx;
  71. }
  72. </style>