DetailsRecords.vue 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141
  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>{{ parseTime(item.opnDate, '{y}-{m}-{d} {h}:{i}') }}</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. margin-top: 6px;
  69. overflow-y: auto;
  70. > li {
  71. display: flex;
  72. & + li {
  73. margin-top: 10px;
  74. }
  75. }
  76. .date {
  77. width: 100px;
  78. display: flex;
  79. flex-direction: column;
  80. align-items: center;
  81. h2,
  82. h3 {
  83. margin: 0;
  84. }
  85. h2 {
  86. font-size: 26px;
  87. line-height: 32px;
  88. }
  89. }
  90. .content {
  91. flex: 1;
  92. list-style: none;
  93. li {
  94. display: flex;
  95. & + li {
  96. margin-top: 10px;
  97. }
  98. }
  99. .user-avatar {
  100. font-size: 40px;
  101. }
  102. .text {
  103. flex: 1;
  104. padding-left: 20px;
  105. p {
  106. font-weight: 500;
  107. margin: 0;
  108. line-height: 20px;
  109. span {
  110. color: #1d66dc;
  111. }
  112. }
  113. p:nth-child(2) {
  114. margin-bottom: 10px;
  115. }
  116. .action {
  117. font-weight: bold;
  118. color: #333;
  119. }
  120. }
  121. }
  122. }
  123. </style>