This commit is contained in:
KindSeven
2024-09-25 03:04:01 +08:00
parent 8301e9365b
commit 018ac4a8cf
6 changed files with 130 additions and 50 deletions

View File

@@ -1,7 +1,7 @@
<script setup>
import { nextTick, onMounted, reactive, ref, watch } from "vue";
import { ElMessageBox } from "element-plus";
import { MoreFilled, Check, Download ,VideoPlay} from "@element-plus/icons-vue";
import { MoreFilled, Check, Download, VideoPlay } from "@element-plus/icons-vue";
import { time } from "echarts";
import { defineExpose } from "vue";
import { defineProps } from "vue";
@@ -17,7 +17,7 @@ const props = defineProps({
let opsCallList = ref([]);
let orderData = ref([]);
let orderContent = ref([]);
const voiceRef=ref()
const voiceRef = ref()
const open = (row) => {
dialogVisible.value = true;
};
@@ -108,25 +108,27 @@ watch(() => props.rowData, (newRowData) => {
//电话拨打记录
const dataDetails = data.data.opsCallList
// console.log(dataDetails);
console.log(dataDetails);
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: [] })
// console.log(for1data.createTime, '--------');
for (let i = 0; i < theData.length; i++) {
// console.log(theData[i]);
if (theData[i].createTime === for1data.createTime) {
theData[i].data.push(for1data)
break;
} else if (theData[i].createTime === '') {
theData[i].createTime = for1data.createTime
theData[i].data.push(for1data)
} else {
for2data.data.push(for1data)
return;
theData.push({ createTime: '', data: [] })
}
})
}
});
theData.pop()
// theData.pop()
// theData[0].data.sort((a, b) => b.answer_time- a.answer_time)
// console.log(theData);
console.log(theData);
theData.forEach(item => {
item.data.forEach(info => {
if (info.answeredTime !== null) {
@@ -183,7 +185,7 @@ const inputOrderContent = (contentState) => {
}
const openRecord = () => {
voiceRef.value.open(true)
voiceRef.value.open(true)
}
defineExpose({
@@ -246,9 +248,10 @@ defineExpose({
<div>录音信息</div>
<div class="textBox—record">
<el-button @click="openRecord" type="primary" :icon="VideoPlay" style="margin-right: 10px ;">播放录音
<el-button @click="openRecord" type="primary" :icon="VideoPlay"
style="margin-right: 10px ;">播放录音
</el-button>
<voice ref="voiceRef" title="录音详情"/>
<voice ref="voiceRef" title="录音详情" />
<a :href="opsCallList.recordUrl" download="record.mp3">
<el-button type="primary" :icon="Download">下载录音</el-button>
</a>