From 1fdd8fe12a8606851388a2c86dca07184818a321 Mon Sep 17 00:00:00 2001 From: lbw_9527443 <780139497@qq.com> Date: Tue, 14 Oct 2025 20:07:39 +0800 Subject: [PATCH] =?UTF-8?q?feat(=E9=94=80=E5=94=AE=E6=97=B6=E9=97=B4?= =?UTF-8?q?=E7=BA=BF):=20=E6=B7=BB=E5=8A=A0=E6=97=A0=E5=BD=92=E5=B1=9E?= =?UTF-8?q?=E5=BD=95=E9=9F=B3=E6=9F=A5=E7=9C=8B=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 添加无归属录音弹窗组件,包含录音列表展示和下载功能 --- .../components/SalesTimelineWithTaskList.vue | 324 +++++++++++++++++- 1 file changed, 319 insertions(+), 5 deletions(-) diff --git a/my-vue-app/src/views/person/components/SalesTimelineWithTaskList.vue b/my-vue-app/src/views/person/components/SalesTimelineWithTaskList.vue index f1b5aa9..17f3dde 100644 --- a/my-vue-app/src/views/person/components/SalesTimelineWithTaskList.vue +++ b/my-vue-app/src/views/person/components/SalesTimelineWithTaskList.vue @@ -1,8 +1,13 @@ @@ -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; + } +} \ No newline at end of file