RequestCallList.vue 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132
  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. import IntervalMixin from "../mixins/IntervalMixin";
  34. export default {
  35. name: "RequestCallList",
  36. mixin: [IntervalMixin],
  37. props: {
  38. list: {
  39. type: Array,
  40. default: () => [],
  41. },
  42. },
  43. data() {
  44. return {
  45. removed: [],
  46. };
  47. },
  48. computed: {
  49. viewList() {
  50. return this.list.filter((item) => !this.removed.includes(item.id));
  51. },
  52. },
  53. methods: {
  54. async onCancel(item) {
  55. this.removed.push(item.id);
  56. // await communicationCalling({
  57. // recordId: item.examRecordId,
  58. // source: item.source,
  59. // });
  60. await communicationOver({
  61. recordId: item.examRecordId,
  62. source: item.source,
  63. });
  64. },
  65. },
  66. };
  67. </script>
  68. <style lang="scss" scoped>
  69. .ellipsis {
  70. overflow: hidden;
  71. white-space: nowrap;
  72. text-overflow: ellipsis;
  73. }
  74. .card-box-list {
  75. padding: 0 10px 10px;
  76. list-style: none;
  77. .card-box-title {
  78. font-size: 14px;
  79. font-weight: bold;
  80. color: #ffffff;
  81. line-height: 1;
  82. padding: 20px 0;
  83. }
  84. .card-box-list-content {
  85. margin: 0;
  86. padding: 0;
  87. padding-right: 10px;
  88. height: 300px; // 6
  89. overflow-y: auto;
  90. .card-box-list-item {
  91. width: unset;
  92. background-color: #3f444d;
  93. padding: 10px;
  94. line-height: 1;
  95. display: flex;
  96. align-items: center;
  97. color: #fff;
  98. font-size: 12px;
  99. &:not(:last-child) {
  100. margin-bottom: 6px;
  101. }
  102. .icon {
  103. width: 24px;
  104. height: 24px;
  105. }
  106. .card-box-list-item-user {
  107. font-weight: bold;
  108. margin: 0 10px;
  109. width: 48px;
  110. }
  111. .call-time {
  112. color: #a1a8b3;
  113. }
  114. .early-warning-reason {
  115. color: #a1a8b3;
  116. margin-left: auto;
  117. flex: 1;
  118. text-align: right;
  119. .operation {
  120. margin-left: 10px;
  121. cursor: pointer;
  122. &:hover {
  123. filter: brightness(1.2);
  124. }
  125. }
  126. }
  127. }
  128. }
  129. }
  130. </style>