应用层PC端前端服务

expressDeliveryInfo.vue 3.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130
  1. <template>
  2. <div>
  3. <div class="loading" v-if="flagLoading">
  4. <i class="el-icon-loading"></i>
  5. </div>
  6. <div v-else>
  7. <div class="deliverName">
  8. <span>申请人快递信息:</span>
  9. {{ expressOne.company }} {{ expressOne.no }}
  10. </div>
  11. <el-divider></el-divider>
  12. <el-timeline :reverse="reverse">
  13. <el-timeline-item
  14. v-for="(activity, index) in expressOne.list"
  15. :key="index"
  16. :timestamp="activity.timestamp"
  17. >
  18. {{ activity.content }}
  19. </el-timeline-item>
  20. </el-timeline>
  21. <div class="deliverName">
  22. <span>被申请人快递信息:</span>
  23. {{ expressTwo.company }} {{ expressTwo.no }}
  24. </div>
  25. <el-divider></el-divider>
  26. <el-timeline :reverse="reverse">
  27. <el-timeline-item
  28. v-for="(activity, index) in expressTwo.list"
  29. :key="index"
  30. :timestamp="activity.timestamp"
  31. >
  32. {{ activity.content }}
  33. </el-timeline-item>
  34. </el-timeline>
  35. </div>
  36. </div>
  37. </template>
  38. <script>
  39. export default {
  40. props: ["deliveryDataArr", "flagLoading"],
  41. data() {
  42. return {
  43. reverse: true,
  44. applicantdelivery: {}, //申请人物流信息
  45. expressOne: {},
  46. expressTwo: {},
  47. };
  48. },
  49. created() {
  50. console.log(this.deliveryDataArr, "deliveryDataArr");
  51. if ((this.deliveryDataArr && this.deliveryDataArr, length > 0)) {
  52. this.deliveryDataArr.forEach((item) => {
  53. if (item.identityType == 1) {
  54. let applicantdata = item.logisticsInfo;
  55. this.applicantdelivery = JSON.parse(applicantdata);
  56. this.expressOne = this.applicantdelivery;
  57. console.log(this.expressOne, "this.expressOne");
  58. if (this.expressOne.length > 0) {
  59. this.expressOne.list.forEach((item) => {
  60. item.content = item.datetime;
  61. item.timestamp = item.remark;
  62. });
  63. }
  64. } else {
  65. let applicantdata = item.logisticsInfo;
  66. this.applicantdelivery = JSON.parse(applicantdata);
  67. if (this.applicantdelivery.list) {
  68. this.expressTwo = this.applicantdelivery;
  69. if (this.expressOne.length > 0) {
  70. this.expressTwo.forEach((item) => {
  71. item.content = item.datetime;
  72. item.timestamp = item.remark;
  73. });
  74. }
  75. }
  76. }
  77. });
  78. }
  79. },
  80. methods: {
  81. cancel() {
  82. this.$emit("closeDeliveryModel");
  83. },
  84. },
  85. };
  86. </script>
  87. <style lang="scss" scoped>
  88. ::v-deep .el-dialog {
  89. width: 600px;
  90. background: #ffffff;
  91. border-radius: 20px;
  92. }
  93. .deliverName {
  94. // margin-left: 6%;
  95. font-size: 16px;
  96. font-weight: 500;
  97. span {
  98. font-size: 18px;
  99. font-weight: 600;
  100. }
  101. }
  102. .endbutton {
  103. width: 154px;
  104. height: 37px;
  105. background: #ffffff;
  106. border: 1px solid #d0d0d0;
  107. border-radius: 19px;
  108. span {
  109. width: 31px;
  110. height: 13px;
  111. font-size: 16px;
  112. font-family: Microsoft YaHei;
  113. font-weight: 400;
  114. color: #959595;
  115. }
  116. }
  117. .loading {
  118. width: 100%;
  119. height: 100%;
  120. display: flex;
  121. justify-content: center;
  122. align-items: center;
  123. .el-icon-loading {
  124. font-size: 50px;
  125. }
  126. }
  127. </style>