fix:修复了工单,工单详情,工作台的部分显示问题
This commit is contained in:
@@ -43,7 +43,7 @@ watch(() => props.rowData, async (newVal) => {
|
||||
item.textVoList = convertArrayToMap(item.textVoList);
|
||||
})
|
||||
recordLeftObj.value = res.data
|
||||
console.info("🚀 ~method:res.data -----", res.data)
|
||||
// console.info("🚀 ~method:res.data -----", res.data)
|
||||
if (res.data && res.data.length > 0) {
|
||||
leftHeadData.value.username = res.data[0].callIdNumber || '--';
|
||||
leftHeadData.value.phone = res.data[0].callPhone || '--';
|
||||
|
||||
@@ -5,17 +5,21 @@ const open = (row) => {
|
||||
};
|
||||
// console.log(dialogVisible.value);
|
||||
defineProps({
|
||||
title:String
|
||||
title:String,
|
||||
rowUrl:String
|
||||
})
|
||||
defineExpose({
|
||||
open,
|
||||
});
|
||||
|
||||
|
||||
// console.log(props.rowUrl);
|
||||
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<el-dialog v-model="dialogVisible" :title="title" width="500" >
|
||||
<audio src="" controls style="width: 100%;"></audio>
|
||||
<audio :src=rowUrl controls style="width: 100%;"></audio>
|
||||
<template #footer>
|
||||
<div class="dialog-footer">
|
||||
|
||||
|
||||
@@ -4,10 +4,11 @@
|
||||
<div class="real-time-call">
|
||||
<LiveCall />
|
||||
</div>
|
||||
<div class="call-history"><h3 >历史通话记录</h3>
|
||||
<div class="call-history">
|
||||
<h3>历史通话记录</h3>
|
||||
<fvTable ref="tableIns" :tableConfig="tableConfig"></fvTable>
|
||||
<voice ref="voiceRef" title="语音详情"/>
|
||||
<infoLiveCall ref="infoLiveCallRef" :rowData="rowData"/>
|
||||
<voice ref="voiceRef" title="语音详情" :rowUrl="rowUrl" />
|
||||
<infoLiveCall ref="infoLiveCallRef" :rowData="rowData" />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@@ -17,15 +18,16 @@ import LiveCall from '@/components/liveCall/index.vue'
|
||||
import Voice from '@/components/voice/index.vue'
|
||||
import InfoLiveCall from '@/components/infoLiveCall/index.vue'
|
||||
const rowData = ref()
|
||||
const infoLiveCallRef=ref()
|
||||
const voiceRef=ref()
|
||||
const rowUrl = ref()
|
||||
const infoLiveCallRef = ref()
|
||||
const voiceRef = ref()
|
||||
const tableIns = ref()
|
||||
const auths = reactive({
|
||||
report: ['mosr:collect:reported'],
|
||||
})
|
||||
const tableConfig = reactive({
|
||||
columns: [
|
||||
{
|
||||
{
|
||||
prop: 'index',
|
||||
type: 'index',
|
||||
label: '序号',
|
||||
@@ -119,14 +121,23 @@ const tableConfig = reactive({
|
||||
],
|
||||
api: '/order/list',
|
||||
params: {
|
||||
orderState:'2'
|
||||
orderState: '2'
|
||||
}
|
||||
})
|
||||
const handleVoice = (row) => {
|
||||
voiceRef.value.open(true)
|
||||
if (row.recordUrl !== null) {
|
||||
voiceRef.value.open(true)
|
||||
rowUrl.value = row.recordUrl
|
||||
}else{
|
||||
ElMessage({
|
||||
message: '暂无语音',
|
||||
type: 'warning',
|
||||
})
|
||||
}
|
||||
|
||||
}
|
||||
const handleInfo = (row) => {
|
||||
// console.log(row);
|
||||
console.log(row);
|
||||
|
||||
infoLiveCallRef.value.open(true)
|
||||
rowData.value = row.orderNumber
|
||||
|
||||
@@ -276,25 +276,27 @@ const handleClose = async (row) => {
|
||||
}
|
||||
)
|
||||
.then(async () => {
|
||||
await orderdClose(row.orderNumber)
|
||||
tableIns.value.refresh()
|
||||
ElMessage({
|
||||
type: 'success',
|
||||
message: '关闭成功',
|
||||
})
|
||||
})
|
||||
.catch(() => {
|
||||
// tableIns.value.refresh()
|
||||
ElMessage({
|
||||
type: 'info',
|
||||
message: '关闭失败',
|
||||
})
|
||||
const info = await orderdClose(row.orderNumber)
|
||||
// console.log(info);
|
||||
if (info.code === 1000) {
|
||||
tableIns.value.refresh()
|
||||
ElMessage({
|
||||
message: '关闭成功',
|
||||
type: 'success',
|
||||
})
|
||||
} else {
|
||||
ElMessage({
|
||||
message: info.msg,
|
||||
type: 'warning',
|
||||
})
|
||||
}
|
||||
})
|
||||
|
||||
} else {
|
||||
ElMessageBox.alert('此工单已被关闭!', '温馨提示', {
|
||||
// if you want to disable its autofocus
|
||||
// autofocus: false,
|
||||
type:'warning',
|
||||
type: 'warning',
|
||||
confirmButtonText: '确定',
|
||||
})
|
||||
}
|
||||
@@ -313,19 +315,20 @@ const handleDelete = async (row) => {
|
||||
}
|
||||
)
|
||||
.then(async () => {
|
||||
await orderdDetele(row.orderNumber)
|
||||
tableIns.value.refresh()
|
||||
ElMessage({
|
||||
type: 'success',
|
||||
message: '删除成功',
|
||||
})
|
||||
})
|
||||
.catch(() => {
|
||||
// tableIns.value.refresh()
|
||||
ElMessage({
|
||||
type: 'info',
|
||||
message: '删除失败',
|
||||
})
|
||||
const info = await orderdDetele(row.orderNumber)
|
||||
console.log(info);
|
||||
if (info.code === 1000) {
|
||||
tableIns.value.refresh()
|
||||
ElMessage({
|
||||
message: '删除成功',
|
||||
type: 'success',
|
||||
})
|
||||
} else {
|
||||
ElMessage({
|
||||
message: info.msg,
|
||||
type: 'warning',
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -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">
|
||||
|
||||
@@ -233,14 +233,14 @@ const tableConfig = reactive({
|
||||
}
|
||||
],
|
||||
api: '/order/list',
|
||||
params: {orderState:"2"},
|
||||
params: { orderState: "2" },
|
||||
btns: [
|
||||
// {name: '新增', key: 'add', color: '#DED0B2', auth: auths.report},
|
||||
]
|
||||
})
|
||||
|
||||
const search = (val) => {
|
||||
let obj = {...val}
|
||||
let obj = { ...val, orderState: '2' }
|
||||
if (obj.dateValue) {
|
||||
obj.startTime = obj.dateValue[0]
|
||||
obj.endTime = obj.dateValue[1]
|
||||
@@ -276,25 +276,26 @@ const handleClose = async (row) => {
|
||||
}
|
||||
)
|
||||
.then(async () => {
|
||||
await orderdClose(row.orderNumber)
|
||||
tableIns.value.refresh()
|
||||
ElMessage({
|
||||
type: 'success',
|
||||
message: '关闭成功',
|
||||
})
|
||||
})
|
||||
.catch(() => {
|
||||
// tableIns.value.refresh()
|
||||
ElMessage({
|
||||
type: 'info',
|
||||
message: '关闭失败',
|
||||
})
|
||||
const info = await orderdClose(row.orderNumber)
|
||||
// console.log(info);
|
||||
if (info.code === 1000) {
|
||||
tableIns.value.refresh()
|
||||
ElMessage({
|
||||
message: '关闭成功',
|
||||
type: 'success',
|
||||
})
|
||||
} else {
|
||||
ElMessage({
|
||||
message: info.msg,
|
||||
type: 'warning',
|
||||
})
|
||||
}
|
||||
})
|
||||
} else {
|
||||
ElMessageBox.alert('此工单已被关闭!', '温馨提示', {
|
||||
// if you want to disable its autofocus
|
||||
// autofocus: false,
|
||||
type:'warning',
|
||||
type: 'warning',
|
||||
confirmButtonText: '确定',
|
||||
})
|
||||
}
|
||||
@@ -313,19 +314,20 @@ const handleDelete = async (row) => {
|
||||
}
|
||||
)
|
||||
.then(async () => {
|
||||
await orderdDetele(row.orderNumber)
|
||||
tableIns.value.refresh()
|
||||
ElMessage({
|
||||
type: 'success',
|
||||
message: '删除成功',
|
||||
})
|
||||
})
|
||||
.catch(() => {
|
||||
// tableIns.value.refresh()
|
||||
ElMessage({
|
||||
type: 'info',
|
||||
message: '删除失败',
|
||||
})
|
||||
const info = await orderdDetele(row.orderNumber)
|
||||
console.log(info);
|
||||
if (info.code === 1000) {
|
||||
tableIns.value.refresh()
|
||||
ElMessage({
|
||||
message: '删除成功',
|
||||
type: 'success',
|
||||
})
|
||||
} else {
|
||||
ElMessage({
|
||||
message: info.msg,
|
||||
type: 'warning',
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -52,16 +52,6 @@ const searchConfig = reactive([
|
||||
checkStrictly: true
|
||||
},
|
||||
component: 'el-input',
|
||||
}, {
|
||||
label: '工单状态',
|
||||
prop: 'orderState',
|
||||
props: {
|
||||
placeholder: '请选择工单状态查询',
|
||||
cacheKey: 'work_order_status',
|
||||
clearable: true,
|
||||
filterable: true,
|
||||
},
|
||||
component: shallowRef(fvSelect),
|
||||
}, {
|
||||
label: '处理人',
|
||||
prop: 'operationUser',
|
||||
@@ -233,14 +223,14 @@ const tableConfig = reactive({
|
||||
}
|
||||
],
|
||||
api: '/order/list',
|
||||
params: {orderState:"0"},
|
||||
params: { orderState: "0" },
|
||||
btns: [
|
||||
// {name: '新增', key: 'add', color: '#DED0B2', auth: auths.report},
|
||||
]
|
||||
})
|
||||
|
||||
const search = (val) => {
|
||||
let obj = {...val}
|
||||
let obj = { ...val, orderState: '0' }
|
||||
if (obj.dateValue) {
|
||||
obj.startTime = obj.dateValue[0]
|
||||
obj.endTime = obj.dateValue[1]
|
||||
@@ -276,25 +266,26 @@ const handleClose = async (row) => {
|
||||
}
|
||||
)
|
||||
.then(async () => {
|
||||
await orderdClose(row.orderNumber)
|
||||
tableIns.value.refresh()
|
||||
ElMessage({
|
||||
type: 'success',
|
||||
message: '关闭成功',
|
||||
})
|
||||
})
|
||||
.catch(() => {
|
||||
// tableIns.value.refresh()
|
||||
ElMessage({
|
||||
type: 'info',
|
||||
message: '关闭失败',
|
||||
})
|
||||
const info = await orderdClose(row.orderNumber)
|
||||
// console.log(info);
|
||||
if (info.code === 1000) {
|
||||
tableIns.value.refresh()
|
||||
ElMessage({
|
||||
message: '关闭成功',
|
||||
type: 'success',
|
||||
})
|
||||
} else {
|
||||
ElMessage({
|
||||
message: info.msg,
|
||||
type: 'warning',
|
||||
})
|
||||
}
|
||||
})
|
||||
} else {
|
||||
ElMessageBox.alert('此工单已被关闭!', '温馨提示', {
|
||||
// if you want to disable its autofocus
|
||||
// autofocus: false,
|
||||
type:'warning',
|
||||
type: 'warning',
|
||||
confirmButtonText: '确定',
|
||||
})
|
||||
}
|
||||
@@ -313,19 +304,20 @@ const handleDelete = async (row) => {
|
||||
}
|
||||
)
|
||||
.then(async () => {
|
||||
await orderdDetele(row.orderNumber)
|
||||
tableIns.value.refresh()
|
||||
ElMessage({
|
||||
type: 'success',
|
||||
message: '删除成功',
|
||||
})
|
||||
})
|
||||
.catch(() => {
|
||||
// tableIns.value.refresh()
|
||||
ElMessage({
|
||||
type: 'info',
|
||||
message: '删除失败',
|
||||
})
|
||||
const info = await orderdDetele(row.orderNumber)
|
||||
console.log(info);
|
||||
if (info.code === 1000) {
|
||||
tableIns.value.refresh()
|
||||
ElMessage({
|
||||
message: '删除成功',
|
||||
type: 'success',
|
||||
})
|
||||
} else {
|
||||
ElMessage({
|
||||
message: info.msg,
|
||||
type: 'warning',
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user