feat(销售时间线): 添加无归属录音查看功能

添加无归属录音弹窗组件,包含录音列表展示和下载功能
This commit is contained in:
2025-10-14 20:07:39 +08:00
parent a6f4c96f1f
commit 1fdd8fe12a

View File

@@ -1,9 +1,14 @@
<template>
<div class="sales-timeline-with-task-list">
<div class="timeline-title-section" style="display: flex; align-items: center; gap: 10px;">
<div class="timeline-title-section" style="display: flex; align-items: center; gap: 10px; justify-content: space-between;">
<div style="display: flex; align-items: center; gap: 10px;">
<h2 style="font-size: 18px;margin: 0;">销售时间线</h2>
<span style="font-size: 14px;">客户转化全流程跟踪</span>
</div>
<div>
<button @click="showUnassignedRecordingsModal = true" class="unassigned-recordings-btn">无归属录音</button>
</div>
</div>
<div class="sales-timeline">
<div class="timeline-container">
@@ -36,7 +41,7 @@
</div>
</div>
<!-- 课1-4子时间轴 -->
<!-- 课1-4子时间轴 -->
<div v-if="selectedStage === '课1-4'" class="course-sub-timeline">
<div class="sub-timeline-container">
<!-- 课1子时间轴 -->
@@ -301,6 +306,31 @@
</div>
</div>
</div>
<!-- 无归属录音弹窗 -->
<div v-if="showUnassignedRecordingsModal" class="modal-overlay" @click="showUnassignedRecordingsModal = false">
<div class="modal-content" @click.stop>
<div class="modal-header">
<h3>无归属录音</h3>
<button class="close-btn" @click="showUnassignedRecordingsModal = false">×</button>
</div>
<div class="modal-body">
<div v-if="!unassignedRecordings || unassignedRecordings.length === 0" class="no-messages">
暂无录音
</div>
<div v-else class="recordings-list">
<div class="recording-item" v-for="recording in unassignedRecordings" :key="recording.id">
<div class="recording-info">
<span class="recording-name">{{ recording.name }}</span>
<span class="recording-time">{{ recording.time }}</span>
<span class="recording-type">{{ recording.type }}</span>
</div>
<a :href="recording.downloadUrl" class="download-link" download>下载</a>
</div>
</div>
</div>
</div>
</div>
</div>
</template>
@@ -311,6 +341,30 @@ import { computed, ref } from 'vue';
const showModal = ref(false);
const modalMessages = ref([]);
// 无归属录音弹窗
const showUnassignedRecordingsModal = ref(false);
const unassignedRecordings = ref([
{ id: 1, name: '录音A', time: '2023-10-27 10:00', type: '通话录音', downloadUrl: '#' },
{ id: 2, name: '录音B', time: '2023-10-27 11:30', type: '会议录音', downloadUrl: '#' },
{ id: 3, name: '录音C', time: '2023-10-28 14:00', type: '通话录音', downloadUrl: '#' },
{ id: 4, name: '录音D', time: '2023-10-29 09:00', type: '通话录音', downloadUrl: '#' },
{ id: 5, name: '录音E', time: '2023-10-29 16:30', type: '会议录音', downloadUrl: '#' },
{ id: 6, name: '录音F', time: '2023-10-30 11:00', type: '通话录音', downloadUrl: '#' },
{ id: 1, name: '录音A', time: '2023-10-27 10:00', type: '通话录音', downloadUrl: '#' },
{ id: 2, name: '录音B', time: '2023-10-27 11:30', type: '会议录音', downloadUrl: '#' },
{ id: 3, name: '录音C', time: '2023-10-28 14:00', type: '通话录音', downloadUrl: '#' },
{ id: 4, name: '录音D', time: '2023-10-29 09:00', type: '通话录音', downloadUrl: '#' },
{ id: 5, name: '录音E', time: '2023-10-29 16:30', type: '会议录音', downloadUrl: '#' },
{ id: 6, name: '录音F', time: '2023-10-30 11:00', type: '通话录音', downloadUrl: '#' },
{ id: 1, name: '录音A', time: '2023-10-27 10:00', type: '通话录音', downloadUrl: '#' },
{ id: 2, name: '录音B', time: '2023-10-27 11:30', type: '会议录音', downloadUrl: '#' },
{ id: 3, name: '录音C', time: '2023-10-28 14:00', type: '通话录音', downloadUrl: '#' },
{ id: 4, name: '录音D', time: '2023-10-29 09:00', type: '通话录音', downloadUrl: '#' },
{ id: 5, name: '录音E', time: '2023-10-29 16:30', type: '会议录音', downloadUrl: '#' },
{ id: 6, name: '录音F', time: '2023-10-30 11:00', type: '通话录音', downloadUrl: '#' },
]);
// 定义props
const props = defineProps({
data: {
@@ -1156,6 +1210,183 @@ $indigo: #4f46e5;
}
}
// Unassigned Recordings Button Styles
.unassigned-recordings-btn {
background-color: $primary;
color: white;
border: none;
padding: 8px 16px;
border-radius: 4px;
cursor: pointer;
font-size: 14px;
transition: background-color 0.3s ease;
&:hover {
background-color: darken($primary, 10%);
}
&:focus {
outline: 2px solid lighten($primary, 20%);
outline-offset: 2px;
}
}
// Unassigned Recordings Modal Styles
.modal-overlay {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background-color: rgba(0, 0, 0, 0.5);
display: flex;
justify-content: center;
align-items: center;
z-index: 1000;
backdrop-filter: blur(2px);
}
.modal-content {
background: $white;
border-radius: 12px;
box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
width: 90%;
max-width: 500px;
max-height: 60vh;
overflow: hidden;
display: flex;
flex-direction: column;
animation: modalFadeIn 0.3s ease-out;
}
@keyframes modalFadeIn {
from {
opacity: 0;
transform: translateY(-20px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
.modal-header {
display: flex;
justify-content: space-between;
align-items: center;
padding: 20px;
border-bottom: 1px solid $slate-200;
background: linear-gradient(135deg, $slate-50, $white);
h3 {
margin: 0;
font-size: 1.25rem;
font-weight: 600;
color: $slate-800;
}
}
.close-btn {
background: none;
border: none;
font-size: 1.5rem;
cursor: pointer;
color: $slate-500;
width: 32px;
height: 32px;
display: flex;
align-items: center;
justify-content: center;
border-radius: 50%;
transition: all 0.2s ease;
&:hover {
background-color: $slate-200;
color: $slate-700;
}
}
.modal-body {
padding: 20px;
overflow-y: auto;
flex: 1;
}
.no-messages {
text-align: center;
color: $slate-500;
font-size: 1rem;
padding: 2rem 0;
background-color: $slate-50;
border-radius: 8px;
margin: 10px 0;
}
.recordings-list {
display: flex;
flex-direction: column;
gap: 12px;
}
.recording-item {
display: flex;
justify-content: space-between;
align-items: center;
padding: 12px 16px;
background-color: $slate-50;
border-radius: 8px;
transition: all 0.2s ease;
&:hover {
background-color: $slate-100;
transform: translateY(-2px);
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
}
}
.recording-info {
display: flex;
flex-direction: column;
gap: 4px;
flex: 1;
}
.recording-name {
font-weight: 500;
color: $slate-800;
font-size: 0.95rem;
}
.recording-time {
font-size: 0.8rem;
color: $slate-600;
}
.recording-type {
font-size: 0.75rem;
color: $slate-500;
background-color: $slate-200;
padding: 2px 8px;
border-radius: 12px;
display: inline-flex;
width: fit-content;
margin-top: 4px;
}
.download-link {
background-color: $primary;
color: white;
text-decoration: none;
padding: 6px 12px;
border-radius: 4px;
font-size: 0.85rem;
transition: background-color 0.2s ease;
&:hover {
background-color: darken($primary, 10%);
}
}
.actionable-list {
display: flex;
flex-direction: column;
@@ -1485,9 +1716,11 @@ $indigo: #4f46e5;
border-radius: 8px;
width: 90%;
max-width: 600px;
max-height: 80vh;
max-height: 60vh;
overflow: hidden;
box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
display: flex;
flex-direction: column;
}
.modal-header {
@@ -1497,6 +1730,7 @@ $indigo: #4f46e5;
padding: 20px;
border-bottom: 1px solid #e5e7eb;
background-color: #f9fafb;
flex-shrink: 0;
}
.modal-header h3 {
@@ -1529,8 +1763,8 @@ $indigo: #4f46e5;
.modal-body {
padding: 20px;
max-height: 60vh;
overflow-y: auto;
flex-grow: 1;
}
.no-messages {
@@ -1696,4 +1930,84 @@ $indigo: #4f46e5;
color: #1d4ed8;
}
/* --- 无归属录音弹窗样式 --- */
.recordings-list {
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 16px;
}
.recording-item {
display: flex;
flex-direction: column;
justify-content: space-between;
gap: 12px;
padding: 16px;
background-color: #f9fafb;
border-radius: 6px;
border: 1px solid #e5e7eb;
transition: box-shadow 0.2s, transform 0.2s;
}
.recording-item:hover {
transform: translateY(-2px);
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}
.recording-info {
display: flex;
flex-direction: column;
gap: 4px;
}
.recording-name {
font-weight: 600;
color: #374151;
font-size: 1rem;
word-break: break-all;
}
.recording-time, .recording-type {
font-size: 0.875rem;
color: #6b7280;
}
.recording-type {
background-color: #e5e7eb;
color: #4b5563;
padding: 2px 8px;
border-radius: 10px;
align-self: flex-start;
font-size: 0.75rem;
font-weight: 500;
}
.download-link {
padding: 8px 12px;
background-color: #3b82f6;
color: white;
border-radius: 4px;
text-decoration: none;
font-size: 0.875rem;
font-weight: 500;
text-align: center;
transition: background-color 0.2s;
}
.download-link:hover {
background-color: #2563eb;
}
/* 响应式布局 */
@media (max-width: 768px) {
.recordings-list {
grid-template-columns: repeat(2, 1fr);
}
}
@media (max-width: 480px) {
.recordings-list {
grid-template-columns: 1fr;
}
}
</style>