fix:修复了工单,工单详情,工作台的部分显示问题

This commit is contained in:
KindSeven
2024-09-27 01:30:14 +08:00
parent 68f3d61974
commit 19e2cece7c
7 changed files with 155 additions and 123 deletions

View File

@@ -18,6 +18,7 @@ let opsCallList = ref([]);
let orderData = ref([]);
let orderContent = ref([]);
const voiceRef = ref()
const rowUrl = ref()
const open = (row) => {
dialogVisible.value = true;
};
@@ -108,7 +109,7 @@ watch(() => props.rowData, (newRowData) => {
//电话拨打记录
const dataDetails = data.data.opsCallList
console.log(dataDetails);
// console.log(dataDetails);
const theData = [{ createTime: '', data: [] }]
dataDetails.forEach(for1data => {
@@ -128,7 +129,7 @@ watch(() => props.rowData, (newRowData) => {
});
// 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) {
@@ -145,7 +146,7 @@ watch(() => props.rowData, (newRowData) => {
//工单时间线
orderContent.value = []
console.log(orderData.value);
// console.log(orderData.value);
// orderData.value.orderState='2'
if (orderData.value.orderState === '0') {
inputOrderContent(contentState0)
@@ -185,9 +186,26 @@ const inputOrderContent = (contentState) => {
}
const openRecord = () => {
voiceRef.value.open(true)
if ( props.rowData.recordUrl !== null) {
voiceRef.value.open(true)
rowUrl.value = props.rowData.recordUrl
} else {
ElMessage({
message: '暂无语音',
type: 'warning',
})
}
}
const downloadRecord = () => {
if(props.rowData.recordUrl === null){
ElMessage({
message: '暂无语音',
type: 'warning',
})
}
}
defineExpose({
open,
});
@@ -201,7 +219,7 @@ defineExpose({
<div class="common-layout">
<el-container>
<el-header class="header"><span>工单号</span>
<span>{{ rowData.orderNumber }}</span>
<span>{{ rowData.orderNumber || '--' }}</span>
</el-header>
<el-container class="main-container">
<el-aside width="200px" :style="{ position: 'static' }">
@@ -219,11 +237,11 @@ defineExpose({
<div class="top">
<div class="info">
<!-- <span>创始人{{ rowData.createBy }}</span> -->
<span>处理人{{ rowData.operationUser }}</span>
<span>处理人{{ rowData.operationUser || '--' }}</span>
</div>
<div class="info">
<span>工单名称{{ rowData.orderName }}</span>
<span>关单人{{ rowData.knotter }}</span>
<span>工单名称{{ rowData.orderName || '--' }}</span>
<span>关单人{{ rowData.knotter || '--' }}</span>
</div>
</div>
<div class="body">
@@ -231,7 +249,7 @@ defineExpose({
<div>工单内容</div>
<div class="textBox">
<el-scrollbar>
<div class="text">{{ rowData.orderContent }}</div>
<div class="text">{{ rowData.orderContent || '暂无工单内容' }}</div>
</el-scrollbar>
</div>
</div>
@@ -239,7 +257,7 @@ defineExpose({
<div>通话记录</div>
<div class="textBox">
<el-scrollbar>
<div class="text">{{ rowData.processedContent }}</div>
<div class="text">{{ rowData.processedContent || '暂无通话记录' }}</div>
</el-scrollbar>
</div>
@@ -251,9 +269,10 @@ defineExpose({
<el-button @click="openRecord" type="primary" :icon="VideoPlay"
style="margin-right: 10px ;">播放录音
</el-button>
<voice ref="voiceRef" title="录音详情" />
<a :href="opsCallList.recordUrl" download="record.mp3">
<el-button type="primary" :icon="Download">下载录音</el-button>
<voice ref="voiceRef" title="录音详情" :rowUrl="rowUrl" />
<a :href=rowData.recordUrl download>
<el-button type="primary" :icon="Download"
@click="downloadRecord">下载录音</el-button>
</a>
<!-- <el-scrollbar> -->
<!-- <div class="text">{{ rowData.recordUrl }}</div> -->
@@ -267,6 +286,7 @@ defineExpose({
<div class="timebox">
<div>
<el-scrollbar height="20vh">
<p v-if="opsCallList.length === 0">暂无电话拨打记录</p>
<el-timeline style="max-width: 99%" class="timeline">
<el-timeline-item v-for="(activity, index) in opsCallList" :key="index"
icon="MoreFilled" type="primary" size="large">