123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130 |
- <template>
- <div class="card-box card-box-list">
- <div class="card-box-title">通话申请</div>
- <ul class="card-box-list-content">
- <li
- class="card-box card-box-list-item"
- v-for="(item, i) in viewList"
- :key="item.id"
- >
- <span class="icon icon-call-full"></span>
- <span class="ellipsis card-box-list-item-user">
- {{ item.examStudentName }}
- </span>
- <span class="call-time">{{ item.durationTime }}</span>
- <span class="ellipsis early-warning-reason">
- <span
- v-if="item.callStatus === 'CANCEL'"
- class="operation"
- @click="onCancel(item, i)"
- >
- 忽略
- </span>
- <span class="operation" @click="$emit('backCall', item)">
- {{ item.callStatus === "CANCEL" ? "回拨" : "接听" }}
- </span>
- </span>
- </li>
- </ul>
- </div>
- </template>
- <script>
- import { communicationOver } from "@/api/invigilation";
- export default {
- name: "RequestCallList",
- props: {
- list: {
- type: Array,
- default: () => [],
- },
- },
- data() {
- return {
- removed: [],
- };
- },
- computed: {
- viewList() {
- return this.list.filter((item) => !this.removed.includes(item.id));
- },
- },
- methods: {
- async onCancel(item) {
- this.removed.push(item.id);
- // await communicationCalling({
- // recordId: item.examRecordId,
- // source: item.source,
- // });
- await communicationOver({
- recordId: item.examRecordId,
- source: item.source,
- });
- },
- },
- };
- </script>
- <style lang="scss" scoped>
- .ellipsis {
- overflow: hidden;
- white-space: nowrap;
- text-overflow: ellipsis;
- }
- .card-box-list {
- padding: 0 10px 10px;
- list-style: none;
- .card-box-title {
- font-size: 14px;
- font-weight: bold;
- color: #ffffff;
- line-height: 1;
- padding: 20px 0;
- }
- .card-box-list-content {
- margin: 0;
- padding: 0;
- padding-right: 10px;
- height: 300px; // 6
- overflow-y: auto;
- .card-box-list-item {
- width: unset;
- background-color: #3f444d;
- padding: 10px;
- line-height: 1;
- display: flex;
- align-items: center;
- color: #fff;
- font-size: 12px;
- &:not(:last-child) {
- margin-bottom: 6px;
- }
- .icon {
- width: 24px;
- height: 24px;
- }
- .card-box-list-item-user {
- font-weight: bold;
- margin: 0 10px;
- width: 48px;
- }
- .call-time {
- color: #a1a8b3;
- }
- .early-warning-reason {
- color: #a1a8b3;
- margin-left: auto;
- flex: 1;
- text-align: right;
- .operation {
- margin-left: 10px;
- cursor: pointer;
- &:hover {
- filter: brightness(1.2);
- }
- }
- }
- }
- }
- }
- </style>
|