SanHQin 11 meses atrás
pai
commit
ce535e4b1d

+ 34 - 5
src/components/EnglishVoice2/component/right.vue

@@ -339,38 +339,67 @@ export default {
       if (this.cjson.type == 'theme' || this.cjson.type == 'QA') {
         this.isloading = true
         let _this = this
+				let _result = ``;
         iiframe.contentWindow.onRecognizedResult = function (e) {
           console.log('onRecognizedResult', e);
           let privText = e.privText
-          _this.beforeUpload1(audioFile, 3, privText);
+					_result+=privText;
+
+          // _this.beforeUpload1(audioFile, 3, privText);
         }
 
+				iiframe.contentWindow.onSessionStopped = function(e){
+					console.log("转译完成")
+					console.log(e);
+					_this.beforeUpload1(audioFile, 3, _result);
+				}
+
         iiframe.contentWindow.doContinuousPronunciationAssessment('', { files: [audioFile] })
       } else if (this.cjson.type == 'createRole') {
         // this.isloading = true
         // this.beforeUpload1(audioFile, 3);
         this.isloading = true
         let _this = this
+				let _result = ``;
         iiframe.contentWindow.onRecognizedResult = function (e) {
           console.log('onRecognizedResult', e);
           let privText = e.privText
-          _this.beforeUpload1(audioFile, 3, privText);
+					_result+=privText;
+          // _this.beforeUpload1(audioFile, 3, privText);
         }
 
+				iiframe.contentWindow.onSessionStopped = function(e){
+					console.log("转译完成")
+					console.log(e);
+					_this.beforeUpload1(audioFile, 3, _result);
+				}
+
         iiframe.contentWindow.doContinuousPronunciationAssessment('', { files: [audioFile] })
       } else {
         this.isloading = true
         let _this = this
+				let _result = ``;
+				let _star = ``;
         iiframe.contentWindow.onRecognizedResult = function (e) {
           console.log('onRecognizedResult', e);
           let privText = e.privText
-          let star = JSON.parse(e.privJson).NBest[0].PronunciationAssessment
-          console.log('star', star)
+					_result +=privText;
+          _star = JSON.parse(e.privJson).NBest[0].PronunciationAssessment
+					console.log(_star)
+          // console.log('star', star)
           // e.privText 
           // JSON.parse(e.privJson).NBest[0].PronunciationAssessment
 
-          _this.beforeUpload1(audioFile, 3, privText, star);
+          // _this.beforeUpload1(audioFile, 3, privText, star);
         }
+
+				iiframe.contentWindow.onSessionStopped = function(e){
+					console.log("转译完成")
+					console.log(e);
+					_this.beforeUpload1(audioFile, 3, _result, _star);
+				}
+
+
         iiframe.contentWindow.doContinuousPronunciationAssessment(this.cjson.content, { files: [audioFile] })
       }
 

+ 41 - 1
src/components/checkEnglishVoice/data/index.vue

@@ -31,6 +31,20 @@
           </div>
         </div>
       </div>
+
+			<div class=whiteBox v-if="mark.wScore2!=0 && mark.scoreDetail2!=''">
+				<div class="mark">
+					<div>
+						<span>评分:</span>
+						<div>{{ mark.wScore2 }}</div>
+					</div>
+				</div>
+				<div class="mark">
+					<span>评分评论:</span>
+					<div>{{ mark.scoreDetail2 }}</div>
+				</div>
+			</div>
+
       <div class="whiteBox" v-if="wordArray.length">
         <div class="word_box" v-for="(item, index) in wordArray" :key="index">
           <div class="word"><span>{{ index + 1 }}.</span><span>{{ item.content }}</span></div>
@@ -129,7 +143,16 @@ export default {
     commentDetail: {
       type: Object,
       default: () => { }
-    }
+    },
+		mark:{
+			type:Object,
+			default:()=>{
+				return {
+					wScore2:0,
+					scoreDetail2:'',
+				}
+			}
+		},
   },
   data() {
     return {
@@ -403,5 +426,22 @@ export default {
   color: #000;
   margin-top: 5px;
 }
+
+.whiteBox>.mark{
+	display: flex;
+	margin-bottom: 10px;
+	flex-direction: column;
+}
+
+.whiteBox>.mark span{
+	font-weight: bold;
+	font-size: 16px;
+}
+
+.whiteBox>.mark>div{
+	margin-top: 10px;
+	display: flex;
+	width:fit-content;
+}
 </style>
   

+ 1 - 1
src/components/checkEnglishVoice/index.vue

@@ -74,7 +74,7 @@
         >确 定
       </el-button>
     </span>
-    <dataBoard :dataDialog.sync="dataDialog" :englishVoiceJson="englishVoiceJson" :commentDetail="commentDetail"></dataBoard>
+    <dataBoard :dataDialog.sync="dataDialog" :mark="{wScore2:wScore2,scoreDetail2:scoreDetail2}" :englishVoiceJson="englishVoiceJson" :commentDetail="commentDetail"></dataBoard>
   </el-dialog>
 </template>