fix(PerformanceRanking): 简化选中成员的判断逻辑
feat(RawDataCards): 添加通话记录标签样式和显示 refactor(MemberDetails): 启用指导建议并修复空成员检查
This commit is contained in:
@@ -49,7 +49,7 @@
|
||||
</div>
|
||||
|
||||
<!-- 指导建议 -->
|
||||
<!-- <div class="guidance-section">
|
||||
<div class="guidance-section">
|
||||
<div class="guidance-header" @click="toggleGuidanceCollapse">
|
||||
<h3>💡 指导建议</h3>
|
||||
<div class="collapse-toggle" :class="{ 'collapsed': isGuidanceCollapsed }">
|
||||
@@ -77,13 +77,13 @@
|
||||
<div class="no-guidance" v-else>
|
||||
<div class="celebration-icon">🎉</div>
|
||||
<h4>表现优秀!</h4>
|
||||
<p>{{ selectedMember.user_name || selectedMember.name }} 的各项指标都很不错,继续保持这种状态!</p>
|
||||
<p>{{ selectedMember?.user_name || selectedMember?.name }} 的各项指标都很不错,继续保持这种状态!</p>
|
||||
</div>
|
||||
</div>
|
||||
</div> -->
|
||||
</div>
|
||||
|
||||
<!-- 录音列表 -->
|
||||
<div class="recordings-section">
|
||||
<!-- <div class="recordings-section" >
|
||||
<div class="recordings-header" @click="toggleRecordingsCollapse">
|
||||
<h3>🎧 通话录音</h3>
|
||||
<div class="collapse-toggle" :class="{ 'collapsed': isRecordingsCollapsed }">
|
||||
@@ -118,7 +118,7 @@
|
||||
<p>{{ selectedMember?.user_name || selectedMember?.name || '张三' }} 还没有通话录音记录</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div> -->
|
||||
|
||||
<!-- Tooltip 组件 -->
|
||||
<Tooltip
|
||||
@@ -243,7 +243,6 @@ const downloadRecording = (recording) => {
|
||||
document.body.appendChild(link)
|
||||
link.click()
|
||||
document.body.removeChild(link)
|
||||
|
||||
// 实际项目中可能需要调用API来获取下载链接
|
||||
console.log('下载录音:', recording.title)
|
||||
}
|
||||
@@ -252,6 +251,11 @@ const downloadRecording = (recording) => {
|
||||
const getGuidanceForMember = (member) => {
|
||||
const guidance = []
|
||||
|
||||
// 检查member是否存在
|
||||
if (!member) {
|
||||
return guidance
|
||||
}
|
||||
|
||||
// 业绩相关建议
|
||||
if (member.performance === 0) {
|
||||
guidance.push({
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
v-for="(member, index) in displayMembers"
|
||||
:key="member.user_name || member.id"
|
||||
class="table-row"
|
||||
:class="{ active: selectedMember && (selectedMember.user_name === member.user_name || selectedMember.id === member.id) }"
|
||||
:class="{ active: selectedMember && selectedMember === member }"
|
||||
@click="selectMember(member)"
|
||||
@dblclick="handleDoubleClick(member)"
|
||||
>
|
||||
|
||||
@@ -91,6 +91,10 @@
|
||||
<div class="call-header">
|
||||
<span class="call-type">用户: {{ call.user_name }}</span>
|
||||
<span class="call-duration">客户: {{ call.customer_name }}</span>
|
||||
<span class="call-tag" :class="{
|
||||
'tag-20min': call.record_tag === '20分钟通话',
|
||||
'tag-other': call.record_tag === '其他'
|
||||
}" v-if="call.record_tag">{{ call.record_tag }}</span>
|
||||
</div>
|
||||
<div class="call-actions">
|
||||
<div class="action-buttons">
|
||||
@@ -231,6 +235,7 @@ const callRecords = computed(() => {
|
||||
|
||||
// 从 props.callInfo 中获取真实的通话记录数据
|
||||
if (props.callInfo && Array.isArray(props.callInfo)) {
|
||||
console.log('通话记录:', props.callInfo)
|
||||
return props.callInfo
|
||||
}
|
||||
|
||||
@@ -581,6 +586,25 @@ const formatDateTime = (dateTimeString) => {
|
||||
font-size: 12px;
|
||||
color: #9ca3af;
|
||||
}
|
||||
|
||||
.call-tag {
|
||||
font-size: 11px;
|
||||
font-weight: 600;
|
||||
padding: 3px 8px;
|
||||
border-radius: 12px;
|
||||
|
||||
&.tag-20min {
|
||||
background: #dcfce7;
|
||||
color: #16a34a;
|
||||
border: 1px solid #bbf7d0;
|
||||
}
|
||||
|
||||
&.tag-other {
|
||||
background: #fef3c7;
|
||||
color: #d97706;
|
||||
border: 1px solid #fed7aa;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.call-actions {
|
||||
|
||||
Reference in New Issue
Block a user