fix: 修改工单详情状态显示
This commit is contained in:
@@ -1,11 +1,11 @@
|
|||||||
<script setup>
|
<script setup>
|
||||||
import { nextTick, onMounted, reactive, ref, watch } from "vue";
|
import {nextTick, onMounted, reactive, ref, watch} from "vue";
|
||||||
import { ElMessageBox } from "element-plus";
|
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 {time} from "echarts";
|
||||||
import { defineExpose } from "vue";
|
import {defineExpose} from "vue";
|
||||||
import { defineProps } from "vue";
|
import {defineProps} from "vue";
|
||||||
import { orderGetDetails } from "@/api/order/order.js"
|
import {orderGetDetails} from "@/api/order/order.js"
|
||||||
import Voice from '@/components/voice/index.vue'
|
import Voice from '@/components/voice/index.vue'
|
||||||
//控制显示隐藏
|
//控制显示隐藏
|
||||||
const dialogVisible = ref(false);
|
const dialogVisible = ref(false);
|
||||||
@@ -26,9 +26,9 @@ const open = (row) => {
|
|||||||
const getData = async () => {
|
const getData = async () => {
|
||||||
// console.log(123);
|
// console.log(123);
|
||||||
const data = await orderGetDetails({
|
const data = await orderGetDetails({
|
||||||
orderNumber:props.rowData.orderNumber,
|
orderNumber: props.rowData.orderNumber,
|
||||||
alarmObject :props.rowData.alarmObject,
|
alarmObject: props.rowData.alarmObject,
|
||||||
alarmUnit :props.rowData.alarmUnit
|
alarmUnit: props.rowData.alarmUnit
|
||||||
})
|
})
|
||||||
// console.log("111", data);
|
// console.log("111", data);
|
||||||
return data
|
return data
|
||||||
@@ -114,9 +114,9 @@ watch(() => props.rowData, (newRowData) => {
|
|||||||
//电话拨打记录
|
//电话拨打记录
|
||||||
const dataDetails = data.data.opsCallList
|
const dataDetails = data.data.opsCallList
|
||||||
// console.log(dataDetails);
|
// console.log(dataDetails);
|
||||||
const theData = [{ createTime: '', data: [] }]
|
const theData = [{createTime: '', data: []}]
|
||||||
|
|
||||||
dataDetails.forEach(for1data => {
|
dataDetails?.forEach(for1data => {
|
||||||
// console.log(for1data.createTime, '--------');
|
// console.log(for1data.createTime, '--------');
|
||||||
for (let i = 0; i < theData.length; i++) {
|
for (let i = 0; i < theData.length; i++) {
|
||||||
// console.log(theData[i]);
|
// console.log(theData[i]);
|
||||||
@@ -127,7 +127,7 @@ watch(() => props.rowData, (newRowData) => {
|
|||||||
theData[i].createTime = for1data.createTime
|
theData[i].createTime = for1data.createTime
|
||||||
theData[i].data.push(for1data)
|
theData[i].data.push(for1data)
|
||||||
} else {
|
} else {
|
||||||
theData.push({ createTime: '', data: [] })
|
theData.push({createTime: '', data: []})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -150,15 +150,13 @@ watch(() => props.rowData, (newRowData) => {
|
|||||||
|
|
||||||
//工单时间线
|
//工单时间线
|
||||||
orderContent.value = []
|
orderContent.value = []
|
||||||
// console.log(orderData.value);
|
console.log(orderData.value);
|
||||||
// orderData.value.orderState='2'
|
// orderData.value.orderState='2'
|
||||||
if (orderData.value.orderState === '0') {
|
if (orderData.value.orderState === '0') {
|
||||||
inputOrderContent(contentState0)
|
inputOrderContent(contentState0)
|
||||||
}
|
} else if (orderData.value.orderState === '1') {
|
||||||
else if (orderData.value.orderState === '1') {
|
|
||||||
inputOrderContent(contentState1)
|
inputOrderContent(contentState1)
|
||||||
}
|
} else if (orderData.value.orderState === '2') {
|
||||||
else if (orderData.value.orderState === '2') {
|
|
||||||
inputOrderContent(contentState2)
|
inputOrderContent(contentState2)
|
||||||
}
|
}
|
||||||
// console.log(orderContent.value);
|
// console.log(orderContent.value);
|
||||||
@@ -190,7 +188,7 @@ const inputOrderContent = (contentState) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const openRecord = () => {
|
const openRecord = () => {
|
||||||
if ( props.rowData.recordUrl !== null) {
|
if (props.rowData.recordUrl !== null) {
|
||||||
voiceRef.value.open(true)
|
voiceRef.value.open(true)
|
||||||
rowUrl.value = props.rowData.recordUrl
|
rowUrl.value = props.rowData.recordUrl
|
||||||
} else {
|
} else {
|
||||||
@@ -203,7 +201,7 @@ const openRecord = () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const downloadRecord = () => {
|
const downloadRecord = () => {
|
||||||
if(props.rowData.recordUrl === null){
|
if (props.rowData.recordUrl === null) {
|
||||||
ElMessage({
|
ElMessage({
|
||||||
message: '暂无语音',
|
message: '暂无语音',
|
||||||
type: 'warning',
|
type: 'warning',
|
||||||
@@ -215,7 +213,6 @@ defineExpose({
|
|||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
@@ -257,15 +254,15 @@ defineExpose({
|
|||||||
</el-scrollbar>
|
</el-scrollbar>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- <div>-->
|
<!-- <div>-->
|
||||||
<!-- <div>通话记录:</div>-->
|
<!-- <div>通话记录:</div>-->
|
||||||
<!-- <div class="textBox">-->
|
<!-- <div class="textBox">-->
|
||||||
<!-- <el-scrollbar>-->
|
<!-- <el-scrollbar>-->
|
||||||
<!-- <div class="text">{{ rowData.processedContent || '暂无通话记录' }}</div>-->
|
<!-- <div class="text">{{ rowData.processedContent || '暂无通话记录' }}</div>-->
|
||||||
<!-- </el-scrollbar>-->
|
<!-- </el-scrollbar>-->
|
||||||
<!-- </div>-->
|
<!-- </div>-->
|
||||||
|
|
||||||
<!-- </div>-->
|
<!-- </div>-->
|
||||||
<div>
|
<div>
|
||||||
<div>录音信息:</div>
|
<div>录音信息:</div>
|
||||||
<div class="textBox—record">
|
<div class="textBox—record">
|
||||||
@@ -273,10 +270,11 @@ defineExpose({
|
|||||||
<el-button @click="openRecord" type="primary" :icon="VideoPlay"
|
<el-button @click="openRecord" type="primary" :icon="VideoPlay"
|
||||||
style="margin-right: 10px ;">播放录音
|
style="margin-right: 10px ;">播放录音
|
||||||
</el-button>
|
</el-button>
|
||||||
<voice ref="voiceRef" title="录音详情" :rowUrl="rowUrl" />
|
<voice ref="voiceRef" title="录音详情" :rowUrl="rowUrl"/>
|
||||||
<a :href=rowData.recordUrl download>
|
<a :href=rowData.recordUrl download>
|
||||||
<el-button type="primary" :icon="Download"
|
<el-button type="primary" :icon="Download"
|
||||||
@click="downloadRecord">下载录音</el-button>
|
@click="downloadRecord">下载录音
|
||||||
|
</el-button>
|
||||||
</a>
|
</a>
|
||||||
<!-- <el-scrollbar> -->
|
<!-- <el-scrollbar> -->
|
||||||
<!-- <div class="text">{{ rowData.recordUrl }}</div> -->
|
<!-- <div class="text">{{ rowData.recordUrl }}</div> -->
|
||||||
@@ -296,19 +294,27 @@ defineExpose({
|
|||||||
icon="MoreFilled" type="primary" size="large">
|
icon="MoreFilled" type="primary" size="large">
|
||||||
<div class="custom-card">
|
<div class="custom-card">
|
||||||
<div style="font-weight: bold">{{ activity.createTime }}</div>
|
<div style="font-weight: bold">{{ activity.createTime }}</div>
|
||||||
|
<template v-if="activity.data&&activity.data.length>0">
|
||||||
<div v-for="(info, index) in activity.data" :key="index">
|
<div v-for="(info, index) in activity.data" :key="index">
|
||||||
<div class="timeline-row">
|
<div class="timeline-row">
|
||||||
<span :style="{ color: '#a8abb2' }">{{ info.callIdNumber
|
<span :style="{ color: '#a8abb2' }">{{
|
||||||
|
info.callIdNumber
|
||||||
}}</span>
|
}}</span>
|
||||||
<PointTag dictType="call_status" :value="info.callState"
|
<PointTag dictType="call_status" :value="info.callState"
|
||||||
class="tag" />
|
class="tag"/>
|
||||||
<!-- <span :style="{
|
<!-- <span :style="{
|
||||||
color: info.callState === '通话中' ? '#6cc23a' : '#409eff'
|
color: info.callState === '通话中' ? '#6cc23a' : '#409eff'
|
||||||
}">{{ info.callState }}</span> -->
|
}">{{ info.callState }}</span> -->
|
||||||
<span class="span-3th" :style="{ color: '#a8abb2' }">{{
|
<span class="span-3th" :style="{ color: '#a8abb2' }">{{
|
||||||
info.answeredTime || '00:00:00' }}</span>
|
info.answeredTime || '00:00:00'
|
||||||
|
}}</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</template>
|
||||||
|
<template v-else>
|
||||||
|
<p>暂无电话拨打记录</p>
|
||||||
|
</template>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</el-timeline-item>
|
</el-timeline-item>
|
||||||
</el-timeline>
|
</el-timeline>
|
||||||
|
|||||||
Reference in New Issue
Block a user