SanHQin преди 2 дни
родител
ревизия
0e15ab0b7a

+ 1 - 1
dist/index.html

@@ -32,7 +32,7 @@
       width: 100%;
       background: #e6eaf0;
       font-family: '黑体';
-    }</style><link href=./static/css/app.c559ad75f92ca4483a63a16d66c0adc3.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=./static/js/manifest.161e82026ac2ae03ab6f.js></script><script type=text/javascript src=./static/js/vendor.de15001ce66f032e9274.js></script><script type=text/javascript src=./static/js/app.057aba3d3a13d2bdf60d.js></script></body></html><script>function stopSafari() {
+    }</style><link href=./static/css/app.5f47915db469257905dc98f730e59253.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=./static/js/manifest.161e82026ac2ae03ab6f.js></script><script type=text/javascript src=./static/js/vendor.de15001ce66f032e9274.js></script><script type=text/javascript src=./static/js/app.1f8c08a0a65605d7f245.js></script></body></html><script>function stopSafari() {
     //阻止safari浏览器双击放大功能
     let lastTouchEnd = 0  //更新手指弹起的时间
     document.documentElement.addEventListener("touchstart", function (event) {

Файловите разлики са ограничени, защото са твърде много
+ 0 - 0
dist/static/css/app.5f47915db469257905dc98f730e59253.css


Файловите разлики са ограничени, защото са твърде много
+ 0 - 0
dist/static/css/app.5f47915db469257905dc98f730e59253.css.map


Файловите разлики са ограничени, защото са твърде много
+ 0 - 0
dist/static/js/app.1f8c08a0a65605d7f245.js


Файловите разлики са ограничени, защото са твърде много
+ 0 - 0
dist/static/js/app.1f8c08a0a65605d7f245.js.map


Файловите разлики са ограничени, защото са твърде много
+ 0 - 0
dist/static/js/manifest.161e82026ac2ae03ab6f.js.map


+ 103 - 102
src/components/pages/classroomObservation/components/chatArea.vue

@@ -29,9 +29,9 @@
         @startTape="onClickStartRecord"
         @uploadTape="uploadRecording"
         :uploadFileLoading="uploadFileLoading"
-				:teacherVoiceprintList="teacherVoiceprintList"
-				:chosenVoiceprint="chosenVoiceprint"
-				:controlsStatus="controlsStatus"
+        :teacherVoiceprintList="teacherVoiceprintList"
+        :chosenVoiceprint="chosenVoiceprint"
+        :controlsStatus="controlsStatus"
         ref="startPageRef"
       />
       <!-- 原文速递 -->
@@ -64,11 +64,10 @@
         v-if="pageStatus == 2 && !showIndexPage && editorBarData.type == '0'"
         v-loading="uploadFileLoading"
       >
-				
-				<el-button
+        <el-button
           style="position: absolute; bottom: 20px; right: 185px; z-index: 10002"
           size="small"
-					v-if="wavGetTextLoading"
+          v-if="wavGetTextLoading"
           type="danger"
           @click.stop="stopWavGetText()"
           >终止转译</el-button
@@ -177,7 +176,6 @@
                   >
                 </div>
               </div>
-        
             </template>
             <template v-if="recorderProvider === 'shengyang'">
               <div class="ca-b-o-h-l-btn">
@@ -242,13 +240,13 @@
                 </div>
               </div>
             </template>
-						<div
-                class="ca-b-o-h-l-btn"
-                @click.stop="uploadRecording()"
-                v-loading="uploadFileLoading"
-              >
-                <div class="ca-b-o-h-b-l-text">上传文件</div>
-              </div>
+            <div
+              class="ca-b-o-h-l-btn"
+              @click.stop="uploadRecording()"
+              v-loading="uploadFileLoading"
+            >
+              <div class="ca-b-o-h-b-l-text">上传文件</div>
+            </div>
           </div>
           <div class="ca-b-o-h-right">
             <div class="ca-b-o-h-r-radio">
@@ -689,7 +687,7 @@ export default {
       textareaLoading: false,
       showRoleList: false,
       showGetTextLoading: false,
-			wavGetTextLoading:false,
+      wavGetTextLoading: false,
       roleListIndex: 0,
 
       userId: this.$route.query["userid"],
@@ -764,7 +762,7 @@ export default {
         recorder: null,
         ws: null
       },
-			userName:"",
+      userName: ""
     };
   },
   computed: {
@@ -832,9 +830,9 @@ export default {
         // this.uploadWavFileAndGetText(file);
       };
     },
-		getVideoAudioSuccess(file){
-			this.uploadFile(file, { changeText: true, flag: true });
-		},
+    getVideoAudioSuccess(file) {
+      this.uploadFile(file, { changeText: true, flag: true });
+    },
     cutBar(val) {
       this.pageStatus = val;
       if (this.pageStatus == 0) {
@@ -1483,8 +1481,7 @@ ${JSON.stringify(_list)}
       } else {
         _file = audioFile;
       }
-      let iiframe = this.$refs["iiframe"];
-      let _this = this;
+     
       // this.uploadFile(_file,{changeText:false,flag:true})
       // return console.log(_file);
 
@@ -1492,41 +1489,44 @@ ${JSON.stringify(_list)}
       console.log(_file);
 
       try {
-				this.wavGetTextLoading = true;
-				iiframe.contentWindow.window.document.getElementById(
-        "languageOptions"
-      ).selectedIndex = this.languageRadio;
-      _this.transcriptionData.content = "";
-      iiframe.contentWindow.onRecognizedResult = function(e) {
-        if (flag) {
-          // 这里上传文件
-          // _this.uploadWavFile(audioFile);
-          _this.controlsStatus = 2;
-          _this.showIndexPage = false;
-          _this.pageStatus = 2;
-          _this.editorBarData.type = "0";
-          flag = false;
-          _this.uploadFileLoading = false;
-          _this.transcriptionData.content = "";
-          _this.editorBarData.content = "";
-          textList = [];
-        }
-					_this.wavGetTextLoading = true;
-				_this.showGetTextLoading = true;
-        let privText = e.privText;
-        console.log("👇转译对象👇");
-        console.log(e);
-        console.log("👇转译结果👇");
-        console.log(privText);
-        textList.push({
-          value: privText,
-          startTime: "",
-          endTime: "",
-          time: ""
-        });
-        _this.transcriptionData.content += privText;
+				let iiframe = this.$refs["iiframe"];
+				let _this = this;
+        this.wavGetTextLoading = true;
+        iiframe.contentWindow.window.document.getElementById(
+          "languageOptions"
+        ).selectedIndex = this.languageRadio;
+        _this.transcriptionData.content = "";
+        iiframe.contentWindow.onRecognizedResult = function(e) {
+          if (flag) {
+            // 这里上传文件
+            // _this.uploadWavFile(audioFile);
+            _this.controlsStatus = 2;
+            _this.showIndexPage = false;
+            _this.pageStatus = 2;
+            _this.editorBarData.type = "0";
+            flag = false;
+            _this.uploadFileLoading = false;
+            _this.transcriptionData.content = "";
+            _this.editorBarData.content = "";
+            textList = [];
+          }
+          _this.wavGetTextLoading = true;
+          _this.showGetTextLoading = true;
+          let privText = e.privText;
+          console.log("👇转译对象👇");
+          console.log(e);
+          console.log("👇转译结果👇");
+          console.log(privText);
+					if(!privText)return;
+          textList.push({
+            value: privText,
+            startTime: "",
+            endTime: "",
+            time: ""
+          });
+          _this.transcriptionData.content += privText;
 
-        let _result = `
+          let _result = `
 				<table
 						border="0"
 						width="100%"
@@ -1545,8 +1545,8 @@ ${JSON.stringify(_list)}
 								<th>行为编码</th>
 						</tr>
 				`;
-        textList.forEach((item, index) => {
-          _result += `<tr>
+          textList.forEach((item, index) => {
+            _result += `<tr>
 							<td>${index + 1}</td>
 							<td></td>
 							<td></td>
@@ -1555,8 +1555,8 @@ ${JSON.stringify(_list)}
 							<td></td>
 							<td></td>
 						</tr>`;
-        });
-        _result += `
+          });
+          _result += `
 				<tr>
 							<td></td>
 							<td></td>
@@ -1568,42 +1568,41 @@ ${JSON.stringify(_list)}
 						</tr>
 					</tbody>
 				</table>`;
-        _this.editorBarData.content = _result;
-        // _this.editorBarData.content += privText;
-      };
-			
-      iiframe.contentWindow.onSessionStopped = function(e) {
-        console.log("转译完成");
-        console.log(e);
-        _this.$message.success("转译完成");
-        _this.showGetTextLoading = false;
-				_this.wavGetTextLoading = false;
-        _this.saveEditorBar();
-      };
+          _this.editorBarData.content = _result;
+          // _this.editorBarData.content += privText;
+        };
 
-      iiframe.contentWindow.doContinuousPronunciationAssessment("", {
-        files: [_file]
-      });
-			} catch (error) {
-				this.wavGetTextLoading = false;
-				this.showGetTextLoading = false;
-			}
+        iiframe.contentWindow.onSessionStopped = function(e) {
+          if(_this.wavFileGetTextLoading)_this.$message.success("转译完成");
+          _this.showGetTextLoading = false;
+          _this.wavGetTextLoading = false;
+          _this.saveEditorBar();
+        };
+
+        iiframe.contentWindow.doContinuousPronunciationAssessment("", {
+          files: [_file]
+        });
+      } catch (error) {
+				console.log(error)
+        this.wavGetTextLoading = false;
+        this.showGetTextLoading = false;
+      }
+    },
+    stopWavGetText() {
+      if (this.wavGetTextLoading) {
+        try {
+          let iiframe = this.$refs["iiframe"];
+          iiframe.contentWindow.scenarioStopButton.click();
+          this.wavGetTextLoading = false;
+          this.showGetTextLoading = false;
+          this.$message.success("终止转译成功");
+        } catch (error) {
+          this.$message.error("终止转译失败");
+        }
+      } else {
+        this.$message.error("转译未开始");
+      }
     },
-		stopWavGetText(){
-			if(this.wavGetTextLoading){
-				try {
-					let iiframe = this.$refs["iiframe"];
-					iiframe.contentWindow.scenarioStopButton.click();
-					this.wavGetTextLoading = false;
-					this.showGetTextLoading = false;
-					this.$message.success("终止转译成功")
-				} catch (error) {
-					this.$message.error("终止转译失败")
-				}
-			}else {
-				this.$message.error("转译未开始")
-			}
-		},
     uploadFile(file, { changeText = true, flag = true }) {
       var credentials = {
         accessKeyId: "AKIATLPEDU37QV5CHLMH",
@@ -2027,7 +2026,7 @@ ${JSON.stringify(_list)}
     getChatList() {
       return new Promise((resolve, reject) => {
         if (!this.tid) return;
-				let _copyTid = this.tid;
+        let _copyTid = this.tid;
         // if (this.chatLoading) return;
         this.chatList = [];
         this.chatLoading = true;
@@ -2040,10 +2039,10 @@ ${JSON.stringify(_list)}
         this.ajax
           .post("https://gpt4.cocorobo.cn/get_agent_park_chat", params)
           .then(res => {
-						if(_copyTid!=this.tid)return;
-						// 	this.chatLoading = false;
-						// 	return this.getChatList()
-						// };
+            if (_copyTid != this.tid) return;
+            // 	this.chatLoading = false;
+            // 	return this.getChatList()
+            // };
             let _data = JSON.parse(res.data.FunctionResponse);
             if (_data.length > 0) {
               let _chatList = [];
@@ -2085,11 +2084,13 @@ ${JSON.stringify(_list)}
     //保存消息
     async insertChat(_uid) {
       let _data = this.chatList.find(i => i.uid == _uid);
-			
+
       if (!_data) return;
       let params = {
         userId: this.userId,
-        userName: this.userName?this.userName:await this.getUser(this.userId),
+        userName: this.userName
+          ? this.userName
+          : await this.getUser(this.userId),
         groupId: "602def61-005d-11ee-91d8-005056b8q12w",
         answer: _data.aiContent,
         problem: _data.content,
@@ -2110,8 +2111,8 @@ ${JSON.stringify(_list)}
           .get(this.$store.state.api + "getUser", params)
           .then(res => {
             let data = res.data[0][0];
-						this.userName = data.username;
-						resolve(data.username)
+            this.userName = data.username;
+            resolve(data.username);
           })
           .catch(err => {
             console.error(err);

Някои файлове не бяха показани, защото твърде много файлове са промени