|
|
@@ -36,7 +36,7 @@
|
|
36
|
36
|
<div class="p-6 bg-gradient-to-r from-blue-500 to-blue-600 rounded-t-lg text-white">
|
|
37
|
37
|
<div class="flex justify-between items-center mb-4">
|
|
38
|
38
|
<div class="flex items-center space-x-2">
|
|
39
|
|
- <el-avatar :size="48" :src="currentCall.avatar" />
|
|
|
39
|
+ <el-avatar :size="48" :src="defaultTubiao" />
|
|
40
|
40
|
<div>
|
|
41
|
41
|
<h3 class="font-semibold text-lg">{{ currentCall.name || '暂无姓名' }}</h3>
|
|
42
|
42
|
<p class="text-sm opacity-90">{{ currentCall.phone || '暂无电话'}}</p>
|
|
|
@@ -131,10 +131,10 @@
|
|
131
|
131
|
<div class="flex items-center">
|
|
132
|
132
|
<el-avatar :size="32" :src="defaultTubiao" class="mr-3" />
|
|
133
|
133
|
<div>
|
|
134
|
|
- <p class="font-medium">{{ record.patientName || '未知' }}</p>
|
|
|
134
|
+ <p class="font-medium">{{ record.phone || '未知' }}</p>
|
|
135
|
135
|
<div class="flex items-center space-x-2">
|
|
136
|
136
|
<p class="text-xs text-gray-500">{{ record.answerTime }}</p>
|
|
137
|
|
- <p class="text-xs text-gray-500">{{ record.phone }}</p>
|
|
|
137
|
+ <!-- <p class="text-xs text-gray-500">{{ record.phone }}</p> -->
|
|
138
|
138
|
</div>
|
|
139
|
139
|
</div>
|
|
140
|
140
|
</div>
|
|
|
@@ -162,7 +162,7 @@ import { hidePhone } from '@/utils/tools';
|
|
162
|
162
|
import { useRouter } from 'vue-router';
|
|
163
|
163
|
import { getPageListData } from '@/api/main/system/system'
|
|
164
|
164
|
import defaultTubiao from '@/assets/images/defaultTubiao.png'
|
|
165
|
|
-import { getCallSate} from '@/utils/index';
|
|
|
165
|
+import { getCallSate,getUnprefixNuber} from '@/utils/index';
|
|
166
|
166
|
|
|
167
|
167
|
const router = useRouter();
|
|
168
|
168
|
import {
|
|
|
@@ -260,7 +260,8 @@ onMounted(() => {
|
|
260
|
260
|
// document.removeEventListener('mousemove', handleDrag);
|
|
261
|
261
|
// document.removeEventListener('mouseup', stopDrag);
|
|
262
|
262
|
initWs();
|
|
263
|
|
- getCustomeData()
|
|
|
263
|
+ getcalllogData()
|
|
|
264
|
+
|
|
264
|
265
|
});
|
|
265
|
266
|
|
|
266
|
267
|
const stateObj = {
|
|
|
@@ -329,8 +330,9 @@ const initWs = () => {
|
|
329
|
330
|
break
|
|
330
|
331
|
case 'incoming': // 来电
|
|
331
|
332
|
{
|
|
332
|
|
- currentCall.value.phone = telWSData.Number
|
|
|
333
|
+ currentCall.value.phone = getUnprefixNuber(telWSData.Number)
|
|
333
|
334
|
currentCall.value.truePhone = hidePhone(telWSData.Number)
|
|
|
335
|
+ getUserInfo(currentCall.value.phone)
|
|
334
|
336
|
router.push({
|
|
335
|
337
|
path: '/inComming/callScreen/' + telWSData.Number,
|
|
336
|
338
|
query: {
|
|
|
@@ -475,7 +477,8 @@ const callActions = [
|
|
475
|
477
|
|
|
476
|
478
|
];
|
|
477
|
479
|
const callHistory = ref([])
|
|
478
|
|
-function getCustomeData() {
|
|
|
480
|
+
|
|
|
481
|
+function getcalllogData() {
|
|
479
|
482
|
callHistory.value = []
|
|
480
|
483
|
const params = {
|
|
481
|
484
|
pageNum: 1,
|
|
|
@@ -489,6 +492,22 @@ function getCustomeData() {
|
|
489
|
492
|
}
|
|
490
|
493
|
)
|
|
491
|
494
|
}
|
|
|
495
|
+
|
|
|
496
|
+function getUserInfo(phoneNumber) {
|
|
|
497
|
+
|
|
|
498
|
+ getPageListData('/patient/patient', { phoneNumber }).then(
|
|
|
499
|
+ ({ data, total }) => {
|
|
|
500
|
+ const newArray = data[0]
|
|
|
501
|
+ console.log(newArray)
|
|
|
502
|
+ currentCall.value = {
|
|
|
503
|
+ name: newArray.name,
|
|
|
504
|
+ phone: phoneNumber,
|
|
|
505
|
+ avatar: newArray.avatar,
|
|
|
506
|
+ location: newArray.address
|
|
|
507
|
+ }
|
|
|
508
|
+ }
|
|
|
509
|
+ )
|
|
|
510
|
+}
|
|
492
|
511
|
const dialKeys = ['1', '2', '3', '4', '5', '6', '7', '8', '9', '*', '0', '#'];
|
|
493
|
512
|
|
|
494
|
513
|
|