RequestCallList.vue 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130
  1. <template>
  2. <div class="card-box card-box-list">
  3. <div class="card-box-title">通话申请</div>
  4. <ul class="card-box-list-content">
  5. <li
  6. class="card-box card-box-list-item"
  7. v-for="(item, i) in viewList"
  8. :key="item.id"
  9. >
  10. <span class="icon icon-call-full"></span>
  11. <span class="ellipsis card-box-list-item-user">
  12. {{ item.examStudentName }}
  13. </span>
  14. <span class="call-time">{{ item.durationTime }}</span>
  15. <span class="ellipsis early-warning-reason">
  16. <span
  17. v-if="item.callStatus === 'CANCEL'"
  18. class="operation"
  19. @click="onCancel(item, i)"
  20. >
  21. 忽略
  22. </span>
  23. <span class="operation" @click="$emit('backCall', item)">
  24. {{ item.callStatus === "CANCEL" ? "回拨" : "接听" }}
  25. </span>
  26. </span>
  27. </li>
  28. </ul>
  29. </div>
  30. </template>
  31. <script>
  32. import { communicationOver } from "@/api/invigilation";
  33. export default {
  34. name: "RequestCallList",
  35. props: {
  36. list: {
  37. type: Array,
  38. default: () => [],
  39. },
  40. },
  41. data() {
  42. return {
  43. removed: [],
  44. };
  45. },
  46. computed: {
  47. viewList() {
  48. return this.list.filter((item) => !this.removed.includes(item.id));
  49. },
  50. },
  51. methods: {
  52. async onCancel(item) {
  53. this.removed.push(item.id);
  54. // await communicationCalling({
  55. // recordId: item.examRecordId,
  56. // source: item.source,
  57. // });
  58. await communicationOver({
  59. recordId: item.examRecordId,
  60. source: item.source,
  61. });
  62. },
  63. },
  64. };
  65. </script>
  66. <style lang="scss" scoped>
  67. .ellipsis {
  68. overflow: hidden;
  69. white-space: nowrap;
  70. text-overflow: ellipsis;
  71. }
  72. .card-box-list {
  73. padding: 0 10px 10px;
  74. list-style: none;
  75. .card-box-title {
  76. font-size: 14px;
  77. font-weight: bold;
  78. color: #ffffff;
  79. line-height: 1;
  80. padding: 20px 0;
  81. }
  82. .card-box-list-content {
  83. margin: 0;
  84. padding: 0;
  85. padding-right: 10px;
  86. height: 300px; // 6
  87. overflow-y: auto;
  88. .card-box-list-item {
  89. width: unset;
  90. background-color: #3f444d;
  91. padding: 10px;
  92. line-height: 1;
  93. display: flex;
  94. align-items: center;
  95. color: #fff;
  96. font-size: 12px;
  97. &:not(:last-child) {
  98. margin-bottom: 6px;
  99. }
  100. .icon {
  101. width: 24px;
  102. height: 24px;
  103. }
  104. .card-box-list-item-user {
  105. font-weight: bold;
  106. margin: 0 10px;
  107. width: 48px;
  108. }
  109. .call-time {
  110. color: #a1a8b3;
  111. }
  112. .early-warning-reason {
  113. color: #a1a8b3;
  114. margin-left: auto;
  115. flex: 1;
  116. text-align: right;
  117. .operation {
  118. margin-left: 10px;
  119. cursor: pointer;
  120. &:hover {
  121. filter: brightness(1.2);
  122. }
  123. }
  124. }
  125. }
  126. }
  127. }
  128. </style>