Merge pull request 'master' (#180) from master into test

Reviewed-on: http://git.feashow.cn/feashow/SmartOpsWeb/pulls/180
This commit is contained in:
2024-11-23 05:36:21 +00:00

View File

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