Compare commits
4 Commits
d75fd9beb8
...
2979e7e216
| Author | SHA1 | Date | |
|---|---|---|---|
| 2979e7e216 | |||
| 288a525537 | |||
| db6433693a | |||
| 99efa8de75 |
@@ -66,7 +66,7 @@ export const getCampPeriodAdmin = (params) => {
|
|||||||
}
|
}
|
||||||
// 获取优秀录音文件 /api/v1/level_four/overview/get_excellent_record_file
|
// 获取优秀录音文件 /api/v1/level_four/overview/get_excellent_record_file
|
||||||
export const getExcellentRecordFile = (params) => {
|
export const getExcellentRecordFile = (params) => {
|
||||||
return https.post('/api/v1/common/get_excellent_record_file', params)
|
return https.post('/api/v1/level_four/overview/get_excellent_record_file', params)
|
||||||
}
|
}
|
||||||
// 修改营期 /api/v1/level_four/overview/change_camp_period
|
// 修改营期 /api/v1/level_four/overview/change_camp_period
|
||||||
export const changeCampPeriod = (params) => {
|
export const changeCampPeriod = (params) => {
|
||||||
|
|||||||
@@ -69,8 +69,8 @@ export const getDetailedDataTable = (params) => {
|
|||||||
export const getPeriodStage = (params) => {
|
export const getPeriodStage = (params) => {
|
||||||
return https.get('/api/v1/level_five/overview/get_period_stage', params)
|
return https.get('/api/v1/level_five/overview/get_period_stage', params)
|
||||||
}
|
}
|
||||||
// 获取优秀录音文件 /api/v1/level_four/overview/get_excellent_record_file
|
// 获取优秀录音文件 /api/v1/level_five/overview/get_excellent_record_file
|
||||||
export const getExcellentRecordFile = (params) => {
|
export const getExcellentRecordFile = (params) => {
|
||||||
return https.post('/api/v1/common/get_excellent_record_file', params)
|
return https.post('/api/v1/level_five/overview/get_excellent_record_file', params)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -5,8 +5,8 @@ import { useUserStore } from '@/stores/user'
|
|||||||
|
|
||||||
// 创建axios实例
|
// 创建axios实例
|
||||||
const service = axios.create({
|
const service = axios.create({
|
||||||
// baseURL: 'https://mldash.nycjy.cn/' || '', // API基础路径,支持完整URL
|
baseURL: 'https://mldash.nycjy.cn/' || '', // API基础路径,支持完整URL
|
||||||
baseURL: 'http://192.168.15.121:8890' || '', // API基础路径,支持完整URL
|
// baseURL: 'http://192.168.15.121:8890' || '', // API基础路径,支持完整URL
|
||||||
timeout: 100000, // 请求超时时间
|
timeout: 100000, // 请求超时时间
|
||||||
headers: {
|
headers: {
|
||||||
'Content-Type': 'application/json;charset=UTF-8'
|
'Content-Type': 'application/json;charset=UTF-8'
|
||||||
|
|||||||
@@ -658,7 +658,7 @@ $white: #ffffff;
|
|||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
padding: 20px 20px 16px;
|
padding: 10px 20px 10px;
|
||||||
border-bottom: 1px solid #ebeef5;
|
border-bottom: 1px solid #ebeef5;
|
||||||
h3 { margin: 0; color: $slate-900; font-size: 18px; font-weight: 600; }
|
h3 { margin: 0; color: $slate-900; font-size: 18px; font-weight: 600; }
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -311,7 +311,7 @@ onBeforeUnmount(() => {
|
|||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
padding: 20px 20px 16px;
|
padding: 10px 20px 10px;
|
||||||
border-bottom: 1px solid #ebeef5;
|
border-bottom: 1px solid #ebeef5;
|
||||||
h3 { margin: 0; color: #303133; font-size: 18px; font-weight: 600; }
|
h3 { margin: 0; color: #303133; font-size: 18px; font-weight: 600; }
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,6 +18,7 @@
|
|||||||
:class="{ active: selectedRecording === index }"
|
:class="{ active: selectedRecording === index }"
|
||||||
@click="selectRecording(index)"
|
@click="selectRecording(index)"
|
||||||
>
|
>
|
||||||
|
<span class="recording-index">{{ recording.score}}</span>
|
||||||
<div class="recording-info">
|
<div class="recording-info">
|
||||||
<div class="recording-name" :title="recording.name">{{ recording.name.length > 10 ? recording.name.substring(0, 10) + '...' : recording.name }}</div>
|
<div class="recording-name" :title="recording.name">{{ recording.name.length > 10 ? recording.name.substring(0, 10) + '...' : recording.name }}</div>
|
||||||
<div class="recording-meta">
|
<div class="recording-meta">
|
||||||
@@ -172,8 +173,8 @@ import MarkdownIt from 'markdown-it'
|
|||||||
// Props定义
|
// Props定义
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
qualityCalls: {
|
qualityCalls: {
|
||||||
type: Object,
|
type: Array,
|
||||||
default: () => ({})
|
default: () => []
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
@@ -221,25 +222,24 @@ const recordings = computed(() => {
|
|||||||
if (!props.qualityCalls ) {
|
if (!props.qualityCalls ) {
|
||||||
return staticRecordings.value;
|
return staticRecordings.value;
|
||||||
}
|
}
|
||||||
|
console.log(66666,props.qualityCalls);
|
||||||
const recordingsList = [];
|
const recordingsList = [];
|
||||||
Object.keys(props.qualityCalls).forEach(userName => {
|
props.qualityCalls.forEach((record, index) => {
|
||||||
props.qualityCalls[userName].forEach((record, index) => {
|
|
||||||
recordingsList.push({
|
recordingsList.push({
|
||||||
id: recordingsList.length + 1,
|
id: recordingsList.length + 1,
|
||||||
name: record.obj_file_name ? record.obj_file_name.split('/').pop() : `${record.sale_name}-录音-${index + 1}`,
|
name: record.record_name ? record.record_name : `${record.sale_name}-录音-${index + 1}`,
|
||||||
date: new Date().toISOString().split('T')[0],
|
date: new Date().toISOString().split('T')[0],
|
||||||
url: record.obj_file_name,
|
url: record.record_file_addr,
|
||||||
transcription: record.context || null,
|
transcription: record.record_context || null,
|
||||||
score: record.score,
|
score: record.record_score,
|
||||||
sop: record.sop,
|
sop: record.record_report,
|
||||||
sale_name: record.sale_name,
|
sale_name: record.record_name,
|
||||||
size: 2048576, // 默认文件大小 2MB
|
size: 2048576, // 默认文件大小 2MB
|
||||||
uploadTime: new Date().toLocaleDateString('zh-CN')
|
uploadTime: record.created_at,
|
||||||
});
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
return recordingsList;
|
return recordingsList;
|
||||||
})
|
})
|
||||||
|
|
||||||
@@ -512,7 +512,7 @@ const downloadRecording = (index) => {
|
|||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
padding: 20px 20px 0;
|
padding: 10px 20px 0;
|
||||||
border-bottom: 1px solid #ebeef5;
|
border-bottom: 1px solid #ebeef5;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -549,7 +549,7 @@ const downloadRecording = (index) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.chart-content {
|
.chart-content {
|
||||||
padding: 20px;
|
padding: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.recording-section {
|
.recording-section {
|
||||||
@@ -562,7 +562,6 @@ const downloadRecording = (index) => {
|
|||||||
.recording-list {
|
.recording-list {
|
||||||
margin-bottom: 20px;
|
margin-bottom: 20px;
|
||||||
max-height: 400px;
|
max-height: 400px;
|
||||||
overflow-y: auto;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.recording-item {
|
.recording-item {
|
||||||
@@ -602,6 +601,39 @@ const downloadRecording = (index) => {
|
|||||||
display: inline-block;
|
display: inline-block;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.recording-index {
|
||||||
|
/* 基础分数样式 */
|
||||||
|
padding: 2px 8px;
|
||||||
|
border-radius: 12px;
|
||||||
|
font-size: 12px;
|
||||||
|
font-weight: 600;
|
||||||
|
background-color: #e9ecef;
|
||||||
|
color: #495057;
|
||||||
|
margin-right: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 第一名样式 */
|
||||||
|
.recording-item:first-child .recording-index {
|
||||||
|
background: linear-gradient(135deg, #FFD700, #FFA500);
|
||||||
|
color: #fff;
|
||||||
|
box-shadow: 0 2px 4px rgba(255, 215, 0, 0.3);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 第二名样式 */
|
||||||
|
.recording-item:nth-child(2) .recording-index {
|
||||||
|
background: linear-gradient(135deg, #C0C0C0, #A9A9A9);
|
||||||
|
color: #fff;
|
||||||
|
box-shadow: 0 2px 4px rgba(192, 192, 192, 0.3);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 第三名样式 */
|
||||||
|
.recording-item:nth-child(3) .recording-index {
|
||||||
|
background: linear-gradient(135deg, #CD7F32, #A0522D);
|
||||||
|
color: #fff;
|
||||||
|
box-shadow: 0 2px 4px rgba(205, 127, 50, 0.3);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
.recording-meta {
|
.recording-meta {
|
||||||
display: flex;
|
display: flex;
|
||||||
gap: 12px;
|
gap: 12px;
|
||||||
|
|||||||
@@ -196,7 +196,7 @@ async function exportData() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.chart-header {
|
.chart-header {
|
||||||
padding: 20px 20px 16px;
|
padding: 10px 20px 10px;
|
||||||
border-bottom: 1px solid #ebeef5;
|
border-bottom: 1px solid #ebeef5;
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
|
|||||||
@@ -178,7 +178,7 @@
|
|||||||
</main>
|
</main>
|
||||||
|
|
||||||
<!-- Loading 组件 -->
|
<!-- Loading 组件 -->
|
||||||
<Loading :visible="isLoading" text="数据加载中..." />
|
<!-- <Loading :visible="isLoading" text="数据加载中..." /> -->
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -860,31 +860,46 @@ const conversionRateVsAverage = ref({})
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
// 获取优秀录音
|
// 获取优秀录音
|
||||||
const excellentRecord = ref({});
|
const excellentRecord = ref([]);
|
||||||
// 获取优秀录音文件
|
// 获取优秀录音文件
|
||||||
// async function CentergetGoodRecord() {
|
async function CentergetGoodRecord() {
|
||||||
// const params = getRequestParams()
|
console.log('CentergetGoodRecord 开始执行')
|
||||||
// const params1 = {
|
try {
|
||||||
// user_level:userStore.userInfo.user_level.toString(),
|
const params = getRequestParams()
|
||||||
// user_name:userStore.userInfo.username
|
const params1 = {
|
||||||
// }
|
user_level: userStore.userInfo?.user_level?.toString() || '',
|
||||||
// const hasParams = params.user_name
|
user_name: userStore.userInfo?.username || ''
|
||||||
// const requestParams = hasParams ? {
|
}
|
||||||
// ...params,
|
|
||||||
// } : params1
|
|
||||||
// console.log(188811111,requestParams)
|
|
||||||
|
|
||||||
// try {
|
// 检查参数是否有效
|
||||||
// const res = await withCache('CentergetGoodRecord',
|
const hasParams = params.user_name && params.user_level
|
||||||
// () => getExcellentRecordFile(requestParams),
|
const requestParams = hasParams ? {
|
||||||
// requestParams
|
...params,
|
||||||
// )
|
} : params1
|
||||||
// excellentRecord.value = res.data.excellent_record_list
|
|
||||||
// console.log(111111,res.data.excellent_record_list)
|
console.log('CentergetGoodRecord request params:', requestParams)
|
||||||
// } catch (error) {
|
|
||||||
// console.error("获取优秀录音失败:", error);
|
// 验证必要参数是否存在
|
||||||
// }
|
if (!requestParams.user_name || !requestParams.user_level) {
|
||||||
// }
|
console.error("缺少必要的请求参数:", requestParams);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 直接发送请求,不使用缓存
|
||||||
|
const res = await getExcellentRecordFile(requestParams)
|
||||||
|
|
||||||
|
if (res && res.code === 200 && res.data) {
|
||||||
|
excellentRecord.value = res.data || []
|
||||||
|
console.log('获取优秀录音成功:', res.data)
|
||||||
|
} else {
|
||||||
|
console.error("获取优秀录音失败,响应数据不完整:", res);
|
||||||
|
excellentRecord.value = []
|
||||||
|
}
|
||||||
|
} catch (error) {
|
||||||
|
console.error("获取优秀录音失败:", error);
|
||||||
|
excellentRecord.value = []
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// 缓存管理功能
|
// 缓存管理功能
|
||||||
// 清除所有缓存
|
// 清除所有缓存
|
||||||
@@ -941,7 +956,7 @@ const excellentRecord = ref({});
|
|||||||
if (!isFromRoute) {
|
if (!isFromRoute) {
|
||||||
await CenterCampPeriodAdmin()
|
await CenterCampPeriodAdmin()
|
||||||
}
|
}
|
||||||
|
await CentergetGoodRecord()
|
||||||
await CenterOverallCenterPerformance()
|
await CenterOverallCenterPerformance()
|
||||||
await CenterTotalGroupCount()
|
await CenterTotalGroupCount()
|
||||||
await CenterConversionRate()
|
await CenterConversionRate()
|
||||||
@@ -951,6 +966,7 @@ const excellentRecord = ref({});
|
|||||||
await CenterCustomerType()
|
await CenterCustomerType()
|
||||||
await CenterUrgentNeedToAddress()
|
await CenterUrgentNeedToAddress()
|
||||||
await CenterConversionRateVsAverage()
|
await CenterConversionRateVsAverage()
|
||||||
|
|
||||||
await CenterSeniorManagerList()
|
await CenterSeniorManagerList()
|
||||||
await CenterGroupList('all')
|
await CenterGroupList('all')
|
||||||
|
|
||||||
@@ -980,6 +996,7 @@ const excellentRecord = ref({});
|
|||||||
await CenterTotalGroupCount()
|
await CenterTotalGroupCount()
|
||||||
await CenterConversionRate()
|
await CenterConversionRate()
|
||||||
await CenterTotalCallCount()
|
await CenterTotalCallCount()
|
||||||
|
await CentergetGoodRecord()
|
||||||
await CenterNewCustomer()
|
await CenterNewCustomer()
|
||||||
await CenterDepositConversionRate()
|
await CenterDepositConversionRate()
|
||||||
await CenterCustomerType()
|
await CenterCustomerType()
|
||||||
|
|||||||
@@ -151,7 +151,7 @@ $white: #ffffff;
|
|||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
padding: 0px 20px 16px;
|
padding: 0px 20px 10px;
|
||||||
border-bottom: 1px solid #ebeef5;
|
border-bottom: 1px solid #ebeef5;
|
||||||
h3 {
|
h3 {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
|
|||||||
@@ -18,6 +18,7 @@
|
|||||||
:class="{ active: selectedRecording === index }"
|
:class="{ active: selectedRecording === index }"
|
||||||
@click="selectRecording(index)"
|
@click="selectRecording(index)"
|
||||||
>
|
>
|
||||||
|
<span class="recording-index">{{ recording.score}}</span>
|
||||||
<div class="recording-info">
|
<div class="recording-info">
|
||||||
<div class="recording-name" :title="recording.name">{{ recording.name.length > 10 ? recording.name.substring(0, 10) + '...' : recording.name }}</div>
|
<div class="recording-name" :title="recording.name">{{ recording.name.length > 10 ? recording.name.substring(0, 10) + '...' : recording.name }}</div>
|
||||||
<div class="recording-meta">
|
<div class="recording-meta">
|
||||||
@@ -172,8 +173,8 @@ import MarkdownIt from 'markdown-it'
|
|||||||
// Props定义
|
// Props定义
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
qualityCalls: {
|
qualityCalls: {
|
||||||
type: Object,
|
type: Array,
|
||||||
default: () => ({})
|
default: () => []
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
@@ -221,25 +222,24 @@ const recordings = computed(() => {
|
|||||||
if (!props.qualityCalls ) {
|
if (!props.qualityCalls ) {
|
||||||
return staticRecordings.value;
|
return staticRecordings.value;
|
||||||
}
|
}
|
||||||
|
console.log(66666,props.qualityCalls);
|
||||||
const recordingsList = [];
|
const recordingsList = [];
|
||||||
Object.keys(props.qualityCalls).forEach(userName => {
|
props.qualityCalls.forEach((record, index) => {
|
||||||
props.qualityCalls[userName].forEach((record, index) => {
|
|
||||||
recordingsList.push({
|
recordingsList.push({
|
||||||
id: recordingsList.length + 1,
|
id: recordingsList.length + 1,
|
||||||
name: record.obj_file_name ? record.obj_file_name.split('/').pop() : `${record.sale_name}-录音-${index + 1}`,
|
name: record.record_name ? record.record_name : `${record.sale_name}-录音-${index + 1}`,
|
||||||
date: new Date().toISOString().split('T')[0],
|
date: new Date().toISOString().split('T')[0],
|
||||||
url: record.obj_file_name,
|
url: record.record_file_addr,
|
||||||
transcription: record.context || null,
|
transcription: record.record_context || null,
|
||||||
score: record.score,
|
score: record.record_score,
|
||||||
sop: record.sop,
|
sop: record.record_report,
|
||||||
sale_name: record.sale_name,
|
sale_name: record.record_name,
|
||||||
size: 2048576, // 默认文件大小 2MB
|
size: 2048576, // 默认文件大小 2MB
|
||||||
uploadTime: new Date().toLocaleDateString('zh-CN')
|
uploadTime: record.created_at,
|
||||||
});
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
return recordingsList;
|
return recordingsList;
|
||||||
})
|
})
|
||||||
|
|
||||||
@@ -512,7 +512,7 @@ const downloadRecording = (index) => {
|
|||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
padding: 20px 20px 0;
|
padding: 10px 20px 0;
|
||||||
border-bottom: 1px solid #ebeef5;
|
border-bottom: 1px solid #ebeef5;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -549,7 +549,7 @@ const downloadRecording = (index) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.chart-content {
|
.chart-content {
|
||||||
padding: 20px;
|
padding: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.recording-section {
|
.recording-section {
|
||||||
@@ -562,7 +562,6 @@ const downloadRecording = (index) => {
|
|||||||
.recording-list {
|
.recording-list {
|
||||||
margin-bottom: 20px;
|
margin-bottom: 20px;
|
||||||
max-height: 400px;
|
max-height: 400px;
|
||||||
overflow-y: auto;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.recording-item {
|
.recording-item {
|
||||||
@@ -602,6 +601,39 @@ const downloadRecording = (index) => {
|
|||||||
display: inline-block;
|
display: inline-block;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.recording-index {
|
||||||
|
/* 基础分数样式 */
|
||||||
|
padding: 2px 8px;
|
||||||
|
border-radius: 12px;
|
||||||
|
font-size: 12px;
|
||||||
|
font-weight: 600;
|
||||||
|
background-color: #e9ecef;
|
||||||
|
color: #495057;
|
||||||
|
margin-right: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 第一名样式 */
|
||||||
|
.recording-item:first-child .recording-index {
|
||||||
|
background: linear-gradient(135deg, #FFD700, #FFA500);
|
||||||
|
color: #fff;
|
||||||
|
box-shadow: 0 2px 4px rgba(255, 215, 0, 0.3);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 第二名样式 */
|
||||||
|
.recording-item:nth-child(2) .recording-index {
|
||||||
|
background: linear-gradient(135deg, #C0C0C0, #A9A9A9);
|
||||||
|
color: #fff;
|
||||||
|
box-shadow: 0 2px 4px rgba(192, 192, 192, 0.3);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 第三名样式 */
|
||||||
|
.recording-item:nth-child(3) .recording-index {
|
||||||
|
background: linear-gradient(135deg, #CD7F32, #A0522D);
|
||||||
|
color: #fff;
|
||||||
|
box-shadow: 0 2px 4px rgba(205, 127, 50, 0.3);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
.recording-meta {
|
.recording-meta {
|
||||||
display: flex;
|
display: flex;
|
||||||
gap: 12px;
|
gap: 12px;
|
||||||
|
|||||||
@@ -665,7 +665,7 @@ const handleFilterChange = (filterParams) => {
|
|||||||
getDetailData(filterParams)
|
getDetailData(filterParams)
|
||||||
}
|
}
|
||||||
// 优秀录音
|
// 优秀录音
|
||||||
const excellentRecord = ref({});
|
const excellentRecord = ref([]);
|
||||||
async function CenterExcellentRecord() {
|
async function CenterExcellentRecord() {
|
||||||
const params={
|
const params={
|
||||||
user_level:userStore.userInfo.user_level.toString(),
|
user_level:userStore.userInfo.user_level.toString(),
|
||||||
@@ -675,7 +675,7 @@ const params={
|
|||||||
const cacheKey = getCacheKey('CenterExcellentRecord', params);
|
const cacheKey = getCacheKey('CenterExcellentRecord', params);
|
||||||
const result = await withCache(cacheKey, async () => {
|
const result = await withCache(cacheKey, async () => {
|
||||||
const res = await getExcellentRecordFile(params);
|
const res = await getExcellentRecordFile(params);
|
||||||
return res.data.excellent_record_list;
|
return res.data;
|
||||||
});
|
});
|
||||||
excellentRecord.value = result;
|
excellentRecord.value = result;
|
||||||
console.log(111111,result);
|
console.log(111111,result);
|
||||||
|
|||||||
Reference in New Issue
Block a user