DetailsRecords.vue 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139
  1. <!--
  2. * @Author: liuzl 461480418@qq.com
  3. * @Date: 2023-01-09 17:42:13
  4. * @LastEditors: wanglj
  5. * @LastEditTime: 2023-02-21 17:14:52
  6. * @Description: file content
  7. * @FilePath: \opms_frontend\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}') }}</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. methods: {},
  58. }
  59. </script>
  60. <style lang="scss" scoped>
  61. .records {
  62. margin: 0;
  63. padding: 10px 20px;
  64. list-style: none;
  65. height: calc(100% - 60px);
  66. margin-top: 6px;
  67. overflow-y: auto;
  68. > li {
  69. display: flex;
  70. & + li {
  71. margin-top: 10px;
  72. }
  73. }
  74. .date {
  75. width: 100px;
  76. display: flex;
  77. flex-direction: column;
  78. align-items: center;
  79. h2,
  80. h3 {
  81. margin: 0;
  82. }
  83. h2 {
  84. font-size: 26px;
  85. line-height: 32px;
  86. }
  87. }
  88. .content {
  89. flex: 1;
  90. list-style: none;
  91. li {
  92. display: flex;
  93. & + li {
  94. margin-top: 10px;
  95. }
  96. }
  97. .user-avatar {
  98. font-size: 40px;
  99. }
  100. .text {
  101. flex: 1;
  102. padding-left: 20px;
  103. p {
  104. font-weight: 500;
  105. margin: 0;
  106. line-height: 20px;
  107. span {
  108. color: #1d66dc;
  109. }
  110. }
  111. p:nth-child(2) {
  112. margin-bottom: 10px;
  113. }
  114. .action {
  115. font-weight: bold;
  116. color: #333;
  117. }
  118. }
  119. }
  120. }
  121. </style>