修改语音最长秒数

This commit is contained in:
dong 2023-04-25 17:41:08 +08:00
parent cc3003dbb0
commit 20de76047b

View File

@ -29,7 +29,7 @@
<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="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/60*seconds" :width="40" :stroke-width="2" status="success" />
<el-progress id="voice_progress_bar" type="circle" :show-text="false" :percentage="100/maxSeconds*seconds" :width="40" :stroke-width="2" status="success" />
<i v-if="recordSending" class="el-icon-close close_icon" @click.stop="cancelRecording()" />
<span class="iconfont icon-yuyin">&#xe62b;</span>
</el-button>
@ -60,6 +60,7 @@ export default {
return {
recordSending:false,
seconds:0,
maxSeconds:59,
inter:null,
recorders: null,
microphone:null,
@ -295,7 +296,7 @@ export default {
this.recordSending = true;
this.audioPlay = false;
this.inter = setInterval(() => {
if (this.seconds < 60) {
if (this.seconds < this.maxSeconds) {
this.seconds++;
} else {
clearInterval(this.inter);