|
@@ -1,23 +1,20 @@
|
|
|
<template>
|
|
|
<div>
|
|
|
- <div style="height: 100%">
|
|
|
+ <div>
|
|
|
<el-button type="primary" @click="startRecorder()">{{
|
|
|
- !isRecord ? "开始录音" : "结束录音"
|
|
|
+ !isRecord ? "开始录音" : "结束录音"
|
|
|
}}</el-button>
|
|
|
<el-button type="primary" @click="playRecorder()">{{
|
|
|
- !isPlayerRecord ? "录音播放" : "停止播放"
|
|
|
+ !isPlayerRecord ? "录音播放" : "停止播放"
|
|
|
}}</el-button>
|
|
|
<el-button type="primary" @click="getMp3Data()">上传录音</el-button>
|
|
|
|
|
|
- <div
|
|
|
- style="margin: 10px auto 0; display: flex; align-items: center"
|
|
|
- v-if="LuAudioUrl"
|
|
|
- >
|
|
|
+ <!-- <div style="margin: 10px auto 0; display: flex; align-items: center" v-if="LuAudioUrl">
|
|
|
<span>已上传录音:</span>
|
|
|
<audio :src="LuAudioUrl" controls="controls" ref="audio">
|
|
|
Your browser does not support the audio element.
|
|
|
</audio>
|
|
|
- </div>
|
|
|
+ </div> -->
|
|
|
</div>
|
|
|
</div>
|
|
|
</template>
|
|
@@ -59,7 +56,7 @@ export default {
|
|
|
recorder.destroy(); // 销毁录音
|
|
|
_this.isRecord = true;
|
|
|
recorder.start().then(
|
|
|
- () => {},
|
|
|
+ () => { },
|
|
|
(error) => {
|
|
|
_this.$message.error(`${error.name} : ${error.message}`);
|
|
|
// 出错了
|
|
@@ -199,14 +196,18 @@ export default {
|
|
|
if (type == 3) {
|
|
|
_this.LuAudioUrl = data.Location;
|
|
|
// _this.addWork(8);
|
|
|
+ _this.addPz(data.Location);
|
|
|
}
|
|
|
console.log(data.Location);
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
},
|
|
|
+ addPz(audio) {
|
|
|
+ this.$emit("addPz", '2',audio);
|
|
|
+ },
|
|
|
},
|
|
|
- mounted() {},
|
|
|
+ mounted() { },
|
|
|
};
|
|
|
</script>
|
|
|
|
|
@@ -223,6 +224,7 @@ export default {
|
|
|
align-items: center;
|
|
|
justify-content: center;
|
|
|
}
|
|
|
+
|
|
|
.progressBox {
|
|
|
width: 500px;
|
|
|
height: 180px;
|
|
@@ -234,6 +236,7 @@ export default {
|
|
|
justify-content: center;
|
|
|
flex-direction: column;
|
|
|
}
|
|
|
+
|
|
|
.progressBox .lbox {
|
|
|
height: 100px;
|
|
|
font-size: 19px;
|
|
@@ -246,9 +249,10 @@ export default {
|
|
|
margin-right: 20px;
|
|
|
}
|
|
|
|
|
|
-.progressBox >>> .el-progress-bar__outer {
|
|
|
+.progressBox>>>.el-progress-bar__outer {
|
|
|
background-color: #d1dfff !important;
|
|
|
}
|
|
|
+
|
|
|
.progressBox .lbox {
|
|
|
height: 100px;
|
|
|
font-size: 19px;
|