Revert "修改语音最长秒数"

This reverts commit 20de76047b.
This commit is contained in:
fan 2023-05-06 10:49:05 +08:00
parent 7fa5b1d62e
commit 1b1ddad29e

View File

@ -29,7 +29,7 @@
<el-input v-model="textContent" size="small" placeholder="请输入会话文字点击T发送" style="flex: 1; margin-left: 5px;" :rows="1" /> <el-input v-model="textContent" size="small" placeholder="请输入会话文字点击T发送" style="flex: 1; margin-left: 5px;" :rows="1" />
<el-button :id="sendTextId" size="mini" class="chat-box-footer-create" :disabled="contentSend || !id" @click="sendText">T</el-button> <el-button :id="sendTextId" size="mini" class="chat-box-footer-create" :disabled="contentSend || !id" @click="sendText">T</el-button>
<el-button :id="recordVoice" class="chat-box-footer-create chat-box-footer-send" :class="{'active': recordSending}" :disabled="audioPlay || (trainingDesign && !trainingSwitch) || !id" size="mini" type="primary" @click="startRecording()"> <el-button :id="recordVoice" class="chat-box-footer-create chat-box-footer-send" :class="{'active': recordSending}" :disabled="audioPlay || (trainingDesign && !trainingSwitch) || !id" size="mini" type="primary" @click="startRecording()">
<el-progress id="voice_progress_bar" type="circle" :show-text="false" :percentage="100/maxSeconds*seconds" :width="40" :stroke-width="2" status="success" /> <el-progress id="voice_progress_bar" type="circle" :show-text="false" :percentage="100/60*seconds" :width="40" :stroke-width="2" status="success" />
<i v-if="recordSending" class="el-icon-close close_icon" @click.stop="cancelRecording()" /> <i v-if="recordSending" class="el-icon-close close_icon" @click.stop="cancelRecording()" />
<span class="iconfont icon-yuyin">&#xe62b;</span> <span class="iconfont icon-yuyin">&#xe62b;</span>
</el-button> </el-button>
@ -60,7 +60,6 @@ export default {
return { return {
recordSending:false, recordSending:false,
seconds:0, seconds:0,
maxSeconds:59,
inter:null, inter:null,
recorders: null, recorders: null,
microphone:null, microphone:null,
@ -296,7 +295,7 @@ export default {
this.recordSending = true; this.recordSending = true;
this.audioPlay = false; this.audioPlay = false;
this.inter = setInterval(() => { this.inter = setInterval(() => {
if (this.seconds < this.maxSeconds) { if (this.seconds < 60) {
this.seconds++; this.seconds++;
} else { } else {
clearInterval(this.inter); clearInterval(this.inter);