Yannay месяцев назад: 2
Родитель
Сommit
bb627d9254

+ 74 - 4
components/soundRecorder/soundRecorder.vue

@@ -1,7 +1,12 @@
1
 <template>
1
 <template>
2
     <view class="sound-recorder">
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
     </view>
10
     </view>
6
 </template>
11
 </template>
7
 
12
 
@@ -10,13 +15,78 @@ export default {
10
     props: {
15
     props: {
11
         data: {
16
         data: {
12
             type: Object,
17
             type: Object,
13
-            default: {}
18
+            default: () => ({})
14
         }
19
         }
15
     },
20
     },
16
     data() {
21
     data() {
17
         return {
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
 </script>
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
                 { label: '是', value: '1' },
455
                 { label: '是', value: '1' },
456
                 { label: '否', value: '2' }
456
                 { label: '否', value: '2' }
457
             ]],
457
             ]],
458
+            currentEditItem: '',
458
 
459
 
459
         };
460
         };
460
     },
461
     },
@@ -714,6 +715,7 @@ export default {
714
         handleSelectOrg(item) {
715
         handleSelectOrg(item) {
715
             console.log(item.uuid, '当前选择的行的uuid')
716
             console.log(item.uuid, '当前选择的行的uuid')
716
             this.currentEditItem = item.uuid
717
             this.currentEditItem = item.uuid
718
+            console.log(this.currentEditItem, '当前选择的行')
717
             // this.showOrgPicker = true
719
             // this.showOrgPicker = true
718
             this.showPersonPicker = true
720
             this.showPersonPicker = true
719
             //把当前的组织赋值给当前的组件
721
             //把当前的组织赋值给当前的组件

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

@@ -416,10 +416,10 @@ export default {
416
         //获取通话记录
416
         //获取通话记录
417
         async getCallRecords() {
417
         async getCallRecords() {
418
             console.log('这里是参数', this.currentReceipt.clueId);
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
             console.log('通话记录:', data);
421
             console.log('通话记录:', data);
422
-            // this.soundRecordList = data;
422
+            this.soundRecordList = data;
423
         },
423
         },
424
 
424
 
425
     },
425
     },