DetailsRecords.vue 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140
  1. <!--
  2. * @Author: liuzl 461480418@qq.com
  3. * @Date: 2023-01-09 17:42:13
  4. * @LastEditors: liuzhenlin
  5. * @LastEditTime: 2023-01-09 17:55:42
  6. * @Description: file content
  7. * @FilePath: \订单全流程管理系统\src\views\contract\components\DetailsRecords.vue
  8. -->
  9. <template>
  10. <ul class="records">
  11. <li v-for="(value, key) in dynamicsList" :key="key">
  12. <div class="date">
  13. {{ key }}
  14. <h2>{{ key.split('-')[2] }}</h2>
  15. <h3>{{ key.split('-').splice(0, 2).join('.') }}</h3>
  16. </div>
  17. <ul class="content">
  18. <li v-for="(item, index) in dynamicsList[key]" :key="index">
  19. <!-- <el-avatar class="user-avatar"
  20. :src="avatar" /> -->
  21. <vab-icon class="user-avatar" icon="account-circle-fill" />
  22. <div class="text">
  23. <p class="action">{{ item.opnPeople }} {{ item.opnType }}</p>
  24. <p>{{ item.opnDate }}</p>
  25. <p v-if="item.opnContent.custName">
  26. 客户名称:
  27. <span>{{ item.opnContent.custName }}</span>
  28. </p>
  29. <template v-else-if="item.opnContent.cuctName">
  30. <p>
  31. 联系人名称:
  32. <span>{{ item.opnContent.cuctName }}</span>
  33. </p>
  34. <p>职务:{{ item.opnContent.postion }}</p>
  35. <p>手机:{{ item.opnContent.telephone }}</p>
  36. </template>
  37. </div>
  38. </li>
  39. </ul>
  40. </li>
  41. </ul>
  42. </template>
  43. <script>
  44. export default {
  45. name: 'Records',
  46. props: {
  47. dynamicsList: {
  48. // eslint-disable-next-line vue/require-prop-type-constructor
  49. type: Array | Object,
  50. default: () => [],
  51. },
  52. },
  53. data() {
  54. return {}
  55. },
  56. mounted() {
  57. console.log(this.dynamicsList)
  58. },
  59. methods: {},
  60. }
  61. </script>
  62. <style lang="scss" scoped>
  63. .records {
  64. margin: 0;
  65. padding: 10px 20px;
  66. list-style: none;
  67. height: 100%;
  68. overflow-y: auto;
  69. > li {
  70. display: flex;
  71. & + li {
  72. margin-top: 10px;
  73. }
  74. }
  75. .date {
  76. width: 100px;
  77. display: flex;
  78. flex-direction: column;
  79. align-items: center;
  80. h2,
  81. h3 {
  82. margin: 0;
  83. }
  84. h2 {
  85. font-size: 26px;
  86. line-height: 32px;
  87. }
  88. }
  89. .content {
  90. flex: 1;
  91. list-style: none;
  92. li {
  93. display: flex;
  94. & + li {
  95. margin-top: 10px;
  96. }
  97. }
  98. .user-avatar {
  99. font-size: 40px;
  100. }
  101. .text {
  102. flex: 1;
  103. padding-left: 20px;
  104. p {
  105. font-weight: 500;
  106. margin: 0;
  107. line-height: 20px;
  108. span {
  109. color: #1d66dc;
  110. }
  111. }
  112. p:nth-child(2) {
  113. margin-bottom: 10px;
  114. }
  115. .action {
  116. font-weight: bold;
  117. color: #333;
  118. }
  119. }
  120. }
  121. }
  122. </style>