Bladeren bron

新增录音查找功能

Yannay 2 maanden geleden
bovenliggende
commit
bb627d9254

+ 74 - 4
components/soundRecorder/soundRecorder.vue

@@ -1,7 +1,12 @@
1 1
 <template>
2 2
     <view class="sound-recorder">
3
-        <!-- <view>{{ data }}</view> -->
4
-        <audio :src="data.fileUrl" controls></audio>
3
+        <view class="top-text">{{ topText }}</view>
4
+        <view class="file-name">{{ dataInner.fileName }}</view>
5
+        <view class="call-history">{{ callHistory }}</view>
6
+        <audio :src="dataInner.fileUrl" controls></audio>
7
+        <view @click="handleDelete">
8
+            <u-icon class="delectIcon" name="trash" size="22"></u-icon>
9
+        </view>
5 10
     </view>
6 11
 </template>
7 12
 
@@ -10,13 +15,78 @@ export default {
10 15
     props: {
11 16
         data: {
12 17
             type: Object,
13
-            default: {}
18
+            default: () => ({})
14 19
         }
15 20
     },
16 21
     data() {
17 22
         return {
23
+            dataInner: {}
18 24
         }
19 25
     },
26
+    watch: {
27
+        data: {
28
+            deep: true,
29
+            immediate: true,
30
+            handler(newVal) {
31
+                this.dataInner = { ...newVal }
32
+            }
33
+        }
34
+    },
35
+    computed: {
36
+        topText() {
37
+            return `${this.dataInner.createTime}号码(${this.dataInner.caller})上传录音`
38
+        },
39
+        callHistory() {
40
+            return `${this.dataInner.caller} 打给 ${this.dataInner.callee}`
41
+        }
42
+    },
43
+    methods: {
44
+        handleDelete() {
45
+            console.log('点击了删除录音的按钮')
46
+            // this.$emit('delete', this.dataInner)
47
+        }
48
+    }
49
+
20 50
 }
21 51
 </script>
22
-<style lang="scss" scoped></style>
52
+<style lang="scss" scoped>
53
+.sound-recorder {
54
+    background: #ffffff;
55
+    border-radius: 20rpx;
56
+    box-shadow: 0 4rpx 24rpx rgba(0, 0, 0, 0.08);
57
+    padding: 32rpx;
58
+    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
59
+    border: 2rpx solid #f0f0f0;
60
+    position: relative;
61
+    margin-bottom: 10rpx;
62
+
63
+    .top-text {
64
+        font-size: 20rpx;
65
+        color: #888;
66
+        line-height: 1.4;
67
+    }
68
+
69
+    .call-history {
70
+        font-size: 30rpx;
71
+        color: #333;
72
+        font-weight: 500;
73
+        margin-bottom: 20rpx;
74
+        line-height: 1.5;
75
+    }
76
+
77
+    .file-name {
78
+        font-size: 20rpx;
79
+        color: #666;
80
+        line-height: 1.4;
81
+        word-break: break-all;
82
+    }
83
+
84
+
85
+    .delectIcon {
86
+        position: absolute;
87
+        right: 32rpx;
88
+        top: 32rpx;
89
+        z-index: 1;
90
+    }
91
+}
92
+</style>

+ 2 - 0
pages/orderDetailNew/components/pageFour.vue

@@ -455,6 +455,7 @@ export default {
455 455
                 { label: '是', value: '1' },
456 456
                 { label: '否', value: '2' }
457 457
             ]],
458
+            currentEditItem: '',
458 459
 
459 460
         };
460 461
     },
@@ -714,6 +715,7 @@ export default {
714 715
         handleSelectOrg(item) {
715 716
             console.log(item.uuid, '当前选择的行的uuid')
716 717
             this.currentEditItem = item.uuid
718
+            console.log(this.currentEditItem, '当前选择的行')
717 719
             // this.showOrgPicker = true
718 720
             this.showPersonPicker = true
719 721
             //把当前的组织赋值给当前的组件

+ 3 - 3
pages/orderDetailNew/components/pageOne.vue

@@ -416,10 +416,10 @@ export default {
416 416
         //获取通话记录
417 417
         async getCallRecords() {
418 418
             console.log('这里是参数', this.currentReceipt.clueId);
419
-            // const { data } = await uni.$u.api.getCallClueFileByClueId({ clueId: this.currentReceipt.clueId });
420
-            const { data } = await uni.$u.api.getCallClueFileByClueId({ clueId: '1998278069905854466' });
419
+            const { data } = await uni.$u.api.getCallClueFileByClueId({ clueId: this.currentReceipt.clueId });
420
+            // const { data } = await uni.$u.api.getCallClueFileByClueId({ clueId: '1998278069905854466' });
421 421
             console.log('通话记录:', data);
422
-            // this.soundRecordList = data;
422
+            this.soundRecordList = data;
423 423
         },
424 424
 
425 425
     },