feat(manager): 添加优秀录音文件获取及展示功能
新增获取优秀录音文件的API接口,并在管理页面添加GoodMusic组件展示录音文件列表 支持录音文件的下载、转文字及分析功能,优化了页面布局和间距
This commit is contained in:
@@ -59,3 +59,7 @@ export const getGroupEntiretyThirdReport = (params) => {
|
|||||||
return https.post('/api/v1/manager/group_entirety_third_report', params)
|
return https.post('/api/v1/manager/group_entirety_third_report', params)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 获取优秀录音文件 /api/v1/level_five/overview/get_excellent_record_file
|
||||||
|
export const getExcellentRecordFile = (params) => {
|
||||||
|
return https.post('/api/v1/level_five/overview/get_excellent_record_file', params)
|
||||||
|
}
|
||||||
1144
my-vue-app/src/views/maneger/components/GoodMusic.vue
Normal file
1144
my-vue-app/src/views/maneger/components/GoodMusic.vue
Normal file
File diff suppressed because it is too large
Load Diff
@@ -37,7 +37,9 @@
|
|||||||
<!-- Top Section - Team Alerts and Today's Report -->
|
<!-- Top Section - Team Alerts and Today's Report -->
|
||||||
<div class="top-section">
|
<div class="top-section">
|
||||||
<!-- Team Alerts -->
|
<!-- Team Alerts -->
|
||||||
<TeamAlerts :abnormalData="groupAbnormalResponse" />
|
<!-- <TeamAlerts :abnormalData="groupAbnormalResponse" /> -->
|
||||||
|
<GoodMusic :quality-calls="excellentRecord"
|
||||||
|
/>
|
||||||
<!-- Today's Team Report -->
|
<!-- Today's Team Report -->
|
||||||
<TeamReport :weekTotalData="weekTotalData" @show-team-analysis="fetchTeamAnalysis" />
|
<TeamReport :weekTotalData="weekTotalData" @show-team-analysis="fetchTeamAnalysis" />
|
||||||
|
|
||||||
@@ -88,6 +90,7 @@
|
|||||||
<script setup>
|
<script setup>
|
||||||
import { ref, onMounted, computed } from "vue";
|
import { ref, onMounted, computed } from "vue";
|
||||||
import TeamAlerts from "./components/TeamAlerts.vue";
|
import TeamAlerts from "./components/TeamAlerts.vue";
|
||||||
|
import GoodMusic from "./components/GoodMusic.vue";
|
||||||
import TeamReport from "./components/TeamReport.vue";
|
import TeamReport from "./components/TeamReport.vue";
|
||||||
import SalesFunnel from "./components/SalesFunnel.vue";
|
import SalesFunnel from "./components/SalesFunnel.vue";
|
||||||
import PerformanceRanking from "./components/PerformanceRanking.vue";
|
import PerformanceRanking from "./components/PerformanceRanking.vue";
|
||||||
@@ -99,7 +102,7 @@ import CustomerDetail from "../person/components/CustomerDetail.vue";
|
|||||||
import { useUserStore } from "@/stores/user";
|
import { useUserStore } from "@/stores/user";
|
||||||
import { useRouter } from "vue-router";
|
import { useRouter } from "vue-router";
|
||||||
import {getGroupAbnormalResponse, getWeekTotalCall, getWeekAddCustomerTotal, getWeekAddDealTotal,
|
import {getGroupAbnormalResponse, getWeekTotalCall, getWeekAddCustomerTotal, getWeekAddDealTotal,
|
||||||
getWeekAddFeeTotal, getGroupFunnel,getPayDepositToMoneyRate,getGroupRanking, getGroupCallDuration,getGroupDetail, getGroupEntiretyThirdReport} from "@/api/manager.js";
|
getWeekAddFeeTotal, getGroupFunnel,getPayDepositToMoneyRate,getGroupRanking, getGroupCallDuration,getGroupDetail, getGroupEntiretyThirdReport,getExcellentRecordFile} from "@/api/manager.js";
|
||||||
|
|
||||||
// 团队成员数据
|
// 团队成员数据
|
||||||
const teamMembers = [
|
const teamMembers = [
|
||||||
@@ -261,7 +264,48 @@ async function TeamGetWeekAddDealTotal() {
|
|||||||
weekTotalData.value.week_add_deal_total = res.data
|
weekTotalData.value.week_add_deal_total = res.data
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// 月度总业绩
|
// 优秀录音
|
||||||
|
// 获取优秀录音
|
||||||
|
const excellentRecord = ref([]);
|
||||||
|
// 获取优秀录音文件
|
||||||
|
async function CentergetGoodRecord() {
|
||||||
|
console.log('CentergetGoodRecord 开始执行')
|
||||||
|
try {
|
||||||
|
const params = getRequestParams()
|
||||||
|
const params1 = {
|
||||||
|
user_level: userStore.userInfo?.user_level?.toString() || '',
|
||||||
|
user_name: userStore.userInfo?.username || ''
|
||||||
|
}
|
||||||
|
|
||||||
|
// 检查参数是否有效
|
||||||
|
const hasParams = params.user_name && params.user_level
|
||||||
|
const requestParams = hasParams ? {
|
||||||
|
...params,
|
||||||
|
} : params1
|
||||||
|
|
||||||
|
console.log('CentergetGoodRecord request params:', requestParams)
|
||||||
|
|
||||||
|
// 验证必要参数是否存在
|
||||||
|
if (!requestParams.user_name || !requestParams.user_level) {
|
||||||
|
console.error("缺少必要的请求参数:", requestParams);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 直接发送请求,不使用缓存
|
||||||
|
const res = await getExcellentRecordFile(requestParams)
|
||||||
|
console.log(972872132,res)
|
||||||
|
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 = []
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// 定金转化
|
// 定金转化
|
||||||
@@ -419,6 +463,7 @@ const formatReportContent = (content) => {
|
|||||||
// 团队异常预警
|
// 团队异常预警
|
||||||
|
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
|
CentergetGoodRecord()
|
||||||
TeamGetGroupAbnormalResponse()
|
TeamGetGroupAbnormalResponse()
|
||||||
TeamGetWeekTotalCall()
|
TeamGetWeekTotalCall()
|
||||||
TeamGetGroupCallDuration()
|
TeamGetGroupCallDuration()
|
||||||
@@ -743,12 +788,12 @@ onMounted(async () => {
|
|||||||
.top-section {
|
.top-section {
|
||||||
display: grid;
|
display: grid;
|
||||||
grid-template-columns: 1fr 3fr;
|
grid-template-columns: 1fr 3fr;
|
||||||
gap: 1rem;
|
gap: 0.5rem;
|
||||||
|
|
||||||
// PC端保持一致布局
|
// PC端保持一致布局
|
||||||
@media (min-width: 1024px) {
|
@media (min-width: 1024px) {
|
||||||
grid-template-columns: 1fr 3fr;
|
grid-template-columns: 1fr 3fr;
|
||||||
gap: 1.5rem;
|
gap: 1rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 平板端适配
|
// 平板端适配
|
||||||
@@ -773,7 +818,7 @@ onMounted(async () => {
|
|||||||
.analytics-section {
|
.analytics-section {
|
||||||
display: grid;
|
display: grid;
|
||||||
grid-template-columns: 1fr 1fr;
|
grid-template-columns: 1fr 1fr;
|
||||||
gap: 1rem;
|
gap: 0.5rem;
|
||||||
margin-bottom: 1rem;
|
margin-bottom: 1rem;
|
||||||
|
|
||||||
// PC端保持一致布局
|
// PC端保持一致布局
|
||||||
|
|||||||
Reference in New Issue
Block a user