feat:处理了电话详细数据

This commit is contained in:
KindSeven
2024-09-15 22:11:26 +08:00
parent 43ad0f03fd
commit 6c60c48c61
8 changed files with 77 additions and 47 deletions

2
.gitignore vendored
View File

@@ -13,6 +13,8 @@ dist
dist-ssr
coverage
*.local
vite.config.js
package-lock.json
/cypress/videos/
/cypress/screenshots/

View File

@@ -25,6 +25,6 @@ defineExpose({
<style>
.box{
height: 65vh;
height: 68vh;
}
</style>

View File

@@ -192,7 +192,7 @@ const initWebSocket = () => {
<style lang="scss" scoped>
.live-call {
width: 48%;
height: 47.5vh;
height: 47vh;
margin-bottom: 20px;
overflow: hidden;
border: 1px solid #d5d4d4;

View File

@@ -14,7 +14,7 @@
<script setup lang="jsx">
import LiveCall from '@/components/liveCall/index.vue'
import Voice from '@/components/voice/index.vue'
import Voice from '@/components/Voice/index.vue'
import infoLiveCall from '@/components/infoLiveCall/index.vue'
const infoLiveCallRef=ref()
const voiceRef=ref()
@@ -97,7 +97,7 @@ const tableConfig = reactive({
label: '操作',
align: 'center',
fixed: 'right',
// width: 150,
width: 200,
showOverflowTooltip: false,
currentRender: ({ row, index }) => {
// console.log(row);

View File

@@ -13,8 +13,9 @@ const dialogVisible = ref(false);
const props = defineProps({
rowData: Object
})
let dataDetails = ref();
let opsCallList = ref([]);
// let mergedData = ref([]);
const open = (row) => {
dialogVisible.value = true;
};
@@ -32,21 +33,48 @@ watch(() => props.rowData, (newRowData) => {
if (newRowData) {
// console.log(getData(newRowData));
getData(newRowData).then((data) => {
// console.log(data.data);
dataDetails = data.data.opsCallList
const dataDetails = data.data.opsCallList
// console.log(dataDetails);
// opsCallList = dataDetails.opsCallList
dataDetails.forEach(item => {
// console.log(item);
opsCallList.value.push(item)
const theData=[{createTime:'',data:[]}]
dataDetails.forEach(for1data => {
theData.forEach(for2data => {
if(for1data.createTime!==for2data.createTime){
console.log(for2data);
for2data.createTime=for1data.createTime
// for2data.data.push(for1data)
theData.push({createTime:for1data.createTime,data:[]})
}else{
for2data.data.push(for1data)
return;
}
})
});
// console.log(opsCallList);
theData.pop()
// console.log(theData);
theData.forEach(item => {
opsCallList.value.push(item)
})
console.log(opsCallList.value);
// dataDetails.forEach(item => {
// // console.log(item);
// opsCallList.value.push(item)
// });
// console.log(mergedData.value);
})
}
}, {
immediate: true // 立即执行一次以便在rowData初始值非空时也能触发
});
// getData()
function omitCreateTime(item) {
const { createTime, ...rest } = item;
return rest;
}
@@ -82,22 +110,22 @@ const test2 = [
size: "large",
}
];
const data = [
{
number: '17628661307',
state: '通话中',
time: '18 : 32',
},
{
number: '17628661307',
state: '已接通',
time: '18 : 32',
},
{
number: '17628661307',
state: '已接通',
time: '18 : 32',
}]
// const data = [
// {
// number: '17628661307',
// state: '通话中',
// time: '18 : 32',
// },
// {
// number: '17628661307',
// state: '已接通',
// time: '18 : 32',
// },
// {
// number: '17628661307',
// state: '已接通',
// time: '18 : 32',
// }]
defineExpose({
open,
});
@@ -107,7 +135,7 @@ defineExpose({
</script>
<template>
<el-dialog v-model="dialogVisible" :show-close=true title="工单详情" width="80%" overflow: auto>
<el-dialog v-model="dialogVisible" :show-close=true title="工单详情" width="80%">
<div class="common-layout">
<el-container>
<el-header class="header"><span>工单号</span>
@@ -140,7 +168,7 @@ defineExpose({
<div>
<div>工单内容</div>
<div class="textBox">
<el-scrollbar >
<el-scrollbar>
<div class="text">{{ rowData.orderContent }}</div>
</el-scrollbar>
</div>
@@ -148,7 +176,7 @@ defineExpose({
<div>
<div>处理内容</div>
<div class="textBox">
<el-scrollbar >
<el-scrollbar>
<div class="text">{{ rowData.processedContent }}</div>
</el-scrollbar>
</div>
@@ -157,7 +185,7 @@ defineExpose({
<div>
<div>录音信息</div>
<div class="textBox">
<el-scrollbar >
<el-scrollbar>
<div class="text">{{ rowData.recordUrl }}</div>
</el-scrollbar>
</div>
@@ -175,17 +203,17 @@ defineExpose({
:size="activity.size">
<div class="custom-card">
<div>{{ activity.createTime }}</div>
<!-- <div v-for="(info, index) in data" :key="index"> -->
<div>
<span :style="{ color: '#a8abb2' }">{{ activity.callIdNumber
}}</span>
<span :style="{
color: activity.callState === '通话中' ? '#6cc23a' : '#409eff'
}">{{ activity.callState }}</span>
<span class="span-3th" :style="{ color: '#a8abb2' }">{{
activity.answer_time }}</span>
<div v-for="(info, index) in activity.data" :key="index">
<div>
<span :style="{ color: '#a8abb2' }">{{ info.callIdNumber
}}</span>
<span :style="{
color: info.callState === '通话中' ? '#6cc23a' : '#409eff'
}">{{ info.callState }}</span>
<span class="span-3th" :style="{ color: '#a8abb2' }">{{
info.answer_time }}</span>
</div>
</div>
<!-- </div> -->
</div>
</el-timeline-item>
</el-timeline>

View File

@@ -233,7 +233,7 @@ const tableConfig = reactive({
}
],
api: '/order/list',
params: {},
params: {state:"1",name:"已处理"},
btns: [
// {name: '新增', key: 'add', color: '#DED0B2', auth: auths.report},
]

View File

@@ -233,7 +233,7 @@ const tableConfig = reactive({
}
],
api: '/order/list',
params: {},
params: {state:"0",name:"待处理"},
btns: [
// {name: '新增', key: 'add', color: '#DED0B2', auth: auths.report},
]

View File

@@ -76,10 +76,10 @@ export default defineConfig({
// rewrite: (path) => path.replace(/^\/api/, ""),
// },
"/api": {
// target: "http://frp.feashow.cn:31800/",
target: "http://112.19.165.99:20002/",
target: "http://frp.feashow.cn:31800/",
// target: "http://112.19.165.99:20002/",
changeOrigin: true,
// rewrite: (path) => path.replace(/^\/api/, ""),
rewrite: (path) => path.replace(/^\/api/, ""),
},
// "/socket": {
// target: "ws://frp.feashow.cn:8081/ws",