feat:完成了详情页的实时数据渲染

This commit is contained in:
KindSeven
2024-09-16 01:47:24 +08:00
parent 16d9d6ebac
commit 884285fdd2

View File

@@ -6,17 +6,12 @@ import { time } from "echarts";
import { defineExpose } from "vue";
import { defineProps } from "vue";
import { orderGetDetails } from "@/api/order/order.js"
//控制显示隐藏
const dialogVisible = ref(false);
const props = defineProps({
rowData: Object
})
const rowData=props.rowData
console.log(rowData);
let opsCallList = ref([]);
let orderData = ref([]);
let orderContent = ref([]);
@@ -57,6 +52,7 @@ watch(() => props.rowData, (newRowData) => {
if (newRowData) {
// console.log(getData(newRowData));
getData(newRowData).then((data) => {
opsCallList.value=[]
orderData.value = data.data
//电话拨打记录
const dataDetails = data.data.opsCallList
@@ -68,7 +64,7 @@ watch(() => props.rowData, (newRowData) => {
if (for1data.createTime !== for2data.createTime) {
// console.log(for2data);
for2data.createTime = for1data.createTime
// for2data.data.push(for1data)
for2data.data.push(for1data)
theData.push({ createTime: for1data.createTime, data: [] })
} else {
for2data.data.push(for1data)
@@ -82,6 +78,7 @@ watch(() => props.rowData, (newRowData) => {
opsCallList.value.push(item)
})
//工单时间线
orderContent.value=[]
console.log(orderData.value);
content.map((item, index) => {
if (index === 0) {
@@ -95,13 +92,8 @@ watch(() => props.rowData, (newRowData) => {
}
})
content.forEach(item => {
// if (orderContent.value.length < 1) {
content.forEach(item => {
orderContent.value.push(item)
// }else{
// orderContent.value.pop()
// }
})
console.log(orderContent.value);
@@ -223,6 +215,7 @@ defineExpose({
<div>
<span :style="{ color: '#a8abb2' }">{{ info.callIdNumber
}}</span>
<!-- <PointTag dictType="call_status" :value="info.callState" /> -->
<span :style="{
color: info.callState === '通话中' ? '#6cc23a' : '#409eff'
}">{{ info.callState }}</span>