Quellcode durchsuchen

新增查看录音

Yannay vor 2 Monaten
Ursprung
Commit
8da16f894b

+ 22 - 0
components/soundRecorder/soundRecorder.vue

@@ -0,0 +1,22 @@
1
+<template>
2
+    <view class="sound-recorder">
3
+        <!-- <view>{{ data }}</view> -->
4
+        <audio :src="data.fileUrl" controls></audio>
5
+    </view>
6
+</template>
7
+
8
+<script>
9
+export default {
10
+    props: {
11
+        data: {
12
+            type: Object,
13
+            default: {}
14
+        }
15
+    },
16
+    data() {
17
+        return {
18
+        }
19
+    },
20
+}
21
+</script>
22
+<style lang="scss" scoped></style>

+ 13 - 2
pages/orderDetailNew/components/pageOne.vue

@@ -33,6 +33,7 @@
33 33
                 <text style="margin: 0 10rpx;">|</text>
34 34
                 <text @click="chatRecordOrCallRecord = 'callRecords'">通话记录</text>
35 35
             </view>
36
+            <!-- 聊天记录卡片 -->
36 37
             <view class="image-upload-container" v-if="chatRecordOrCallRecord === 'chatRecords'">
37 38
                 <view class="image-list">
38 39
                     <view class="image-item" v-for="(item, index) in chatRecordsUploadList"
@@ -45,7 +46,13 @@
45 46
                     </view>
46 47
                 </view>
47 48
             </view>
49
+            <!-- 通话录音卡片 -->
48 50
             <view class="image-upload-container" v-if="chatRecordOrCallRecord === 'callRecords'">
51
+                <view>
52
+
53
+                    <sound-recorder v-for="item in soundRecordList" :key="item.fileName" :data="item"></sound-recorder>
54
+
55
+                </view>
49 56
 
50 57
             </view>
51 58
         </view>
@@ -103,6 +110,8 @@
103 110
 <script>
104 111
 import picComp from './picComp.vue'
105 112
 import imgUploadAndDownLoad from '../mixin/imgUploadAndDownLoad.js'
113
+import soundRecorder from '@/components/soundRecorder/soundRecorder.vue'
114
+
106 115
 export default {
107 116
     mixins: [imgUploadAndDownLoad],
108 117
     props: {
@@ -120,7 +129,7 @@ export default {
120 129
         },
121 130
     },
122 131
     components: {
123
-        picComp
132
+        picComp, soundRecorder
124 133
     },
125 134
     data() {
126 135
         return {
@@ -130,6 +139,7 @@ export default {
130 139
             // 待绑定的图片列表
131 140
             bindList: [],
132 141
             chatRecordOrCallRecord: 'chatRecords',
142
+            soundRecordList: [],//录音记录
133 143
         }
134 144
     },
135 145
     watch: {
@@ -407,8 +417,9 @@ export default {
407 417
         async getCallRecords() {
408 418
             console.log('这里是参数', this.currentReceipt.clueId);
409 419
             // const { data } = await uni.$u.api.getCallClueFileByClueId({ clueId: this.currentReceipt.clueId });
410
-            const { data } = await uni.$u.api.getCallClueFileByClueId({ clueId: 1998278069905854466 });
420
+            const { data } = await uni.$u.api.getCallClueFileByClueId({ clueId: '1998278069905854466' });
411 421
             console.log('通话记录:', data);
422
+            // this.soundRecordList = data;
412 423
         },
413 424
 
414 425
     },

+ 3 - 0
pages/pagereceivecenter/pagereceivecenter.vue

@@ -1,6 +1,7 @@
1 1
 <script>
2 2
 // import orderCard from "./compounts/orderCard.vue";
3 3
 
4
+// status 状态 1 发单(刚发出来) 2 接单(处理中) 3 收单(入库了) 4 未收(没有收到)
4 5
 export default {
5 6
     components: {
6 7
         // orderCard,
@@ -85,6 +86,7 @@ export default {
85 86
                 // 把数组按照status的大小排序,从小到大
86 87
                 result.rows.sort((a, b) => {
87 88
                     return a.status - b.status;
89
+                    // return b.status - a.status;
88 90
                 })
89 91
 
90 92
 
@@ -365,6 +367,7 @@ export default {
365 367
                         </view>
366 368
 
367 369
                         <view class="Btns">
370
+                            <!-- status 状态 1 发单(刚发出来) 2 接单(处理中) 3 收单(入库了) 4 未收(没有收到) -->
368 371
 
369 372
                             <view class="btnGroup" v-if="item && (item.status == '1')">
370 373
                                 <view class="card-button" @click.stop="handleBtnClick('acceptOrder', item)">立即接单</view>