Commit 1a04c7b2 authored by 赵茹林's avatar 赵茹林

今日实时数据 使用新的聊天记录组件、录音播放组件

parent 875415f5
...@@ -73,10 +73,11 @@ ...@@ -73,10 +73,11 @@
<td>{{ item.visit_desc }}</td> <td>{{ item.visit_desc }}</td>
<td>{{ item.next_visit_at }}</td> <td>{{ item.next_visit_at }}</td>
<td> <td>
<audio style="display: none;" controls="controls" class="sourceFile-audio" :id="'sourceFile'+item.id"> <!--<audio style="display: none;" controls="controls" class="sourceFile-audio" :id="'sourceFile'+item.id">
<source :src="item.source_file" type="audio/mp3"> <source :src="item.source_file" type="audio/mp3">
</audio> </audio>
<el-button size="mini" type="primary" @click="sourceFileClick('sourceFile' + item.id, index)" round>{{ infoText }}</el-button> <el-button size="mini" type="primary" @click="sourceFileClick('sourceFile' + item.id, index)" round>{{ infoText }}</el-button>-->
<phone-record v-if="item.source_file" :src="item.source_file"></phone-record>
</td> </td>
</template> </template>
...@@ -88,8 +89,10 @@ ...@@ -88,8 +89,10 @@
<td>{{ item.chat_count }}</td> <td>{{ item.chat_count }}</td>
<td>{{ item.visit_desc }}</td> <td>{{ item.visit_desc }}</td>
<td>{{ item.next_visit_at }}</td> <td>{{ item.next_visit_at }}</td>
<td @click="dialogTableClick(item.friend_id)"> <td>
<el-button size="mini" type="primary" round>{{ infoText }}</el-button> <!--<el-button @click="dialogTableClick(item.friend_id)" size="mini" type="primary" round>{{ infoText }}</el-button>-->
<!--聊天记录-->
<chat-record :friend-id="item.friend_id" :start-at="realTime"></chat-record>
</td> </td>
</template> </template>
...@@ -276,6 +279,8 @@ ...@@ -276,6 +279,8 @@
import page from '../framework/page' import page from '../framework/page'
import Util from '../../util/Za' import Util from '../../util/Za'
import addEmoji from '../../util/wechatEmoji' import addEmoji from '../../util/wechatEmoji'
import PhoneRecord from '@framework/PhoneRecord'
import ChatRecord from '@framework/ChatRecord'
export default { export default {
name: "customer", name: "customer",
...@@ -288,7 +293,7 @@ ...@@ -288,7 +293,7 @@
}, },
}, },
components: { components: {
page, task1 page, task1, PhoneRecord, ChatRecord
}, },
data() { data() {
return { return {
...@@ -369,7 +374,7 @@ ...@@ -369,7 +374,7 @@
/** /**
* 聊天记录 * 聊天记录
*/ */
dialogTableClick(friendId) { /*dialogTableClick(friendId) {
getChatrecordApi(friendId, { start_at: this.realTime }).then(res => { getChatrecordApi(friendId, { start_at: this.realTime }).then(res => {
if(res.length > 0) { if(res.length > 0) {
this.dialogTable = true this.dialogTable = true
...@@ -383,7 +388,7 @@ ...@@ -383,7 +388,7 @@
this.$message.error('没有聊天记录'); this.$message.error('没有聊天记录');
} }
}) })
}, },*/
/** /**
* 音频点击 * 音频点击
*/ */
...@@ -578,7 +583,7 @@ ...@@ -578,7 +583,7 @@
* 播放录音 * 播放录音
* id * id
*/ */
sourceFileClick(id, index) { /*sourceFileClick(id, index) {
var sourceFileAudio = document.querySelectorAll('.sourceFile-audio'); var sourceFileAudio = document.querySelectorAll('.sourceFile-audio');
for(var i = 0; i < sourceFileAudio.length; i++) { for(var i = 0; i < sourceFileAudio.length; i++) {
if(index === i) { if(index === i) {
...@@ -587,7 +592,7 @@ ...@@ -587,7 +592,7 @@
sourceFileAudio[i].pause(); sourceFileAudio[i].pause();
} }
} }
}, },*/
/** /**
* 改变图片header颜色 * 改变图片header颜色
* @param row * @param row
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment