소스 검색

课堂观察更新

SanHQin 2 달 전
부모
커밋
fe2da098a4

+ 1 - 1
dist/index.html

@@ -32,7 +32,7 @@
       width: 100%;
       background: #e6eaf0;
       font-family: '黑体';
-    }</style><link href=./static/css/app.b3b54293cb15652faa8e512ce218aac4.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.bb486323f0fa002ba2e7.js></script><script type=text/javascript src=./static/js/app.ce06d3c7064b7d5f54f2.js></script></body></html><script>function stopSafari() {
+    }</style><link href=./static/css/app.4911939ff841756b2e566012b691be72.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.bb486323f0fa002ba2e7.js></script><script type=text/javascript src=./static/js/app.1c91f3d0106837549428.js></script></body></html><script>function stopSafari() {
     //阻止safari浏览器双击放大功能
     let lastTouchEnd = 0  //更新手指弹起的时间
     document.documentElement.addEventListener("touchstart", function (event) {

파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 0 - 0
dist/static/css/app.4911939ff841756b2e566012b691be72.css


파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 0 - 0
dist/static/css/app.4911939ff841756b2e566012b691be72.css.map


파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 0 - 0
dist/static/js/app.1c91f3d0106837549428.js


파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 0 - 0
dist/static/js/app.1c91f3d0106837549428.js.map


파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 0 - 0
dist/static/js/manifest.161e82026ac2ae03ab6f.js.map


+ 175 - 101
src/components/pages/classroomObservation/dialog/batchCreationClassDialog.vue

@@ -35,7 +35,7 @@
             >
           </div>
           <div class="b_n_right">
-            <span>总计{{ dataList.length }}个</span>
+            <span @click="test">总计{{ dataList.length }}个</span>
           </div>
         </div>
         <div class="b_bottom">
@@ -96,6 +96,13 @@
         @success="editBaseMessageSuccess"
       />
     </el-dialog>
+    <!-- 录音转文字 -->
+    <iframe
+      allow="camera *; microphone *;display-capture;midi;encrypted-media;"
+      src="https://beta.cloud.cocorobo.cn/browser/public/index.html"
+      ref="iframeRef"
+      v-show="false"
+    ></iframe>
   </div>
 </template>
 
@@ -232,7 +239,7 @@ export default {
           { value: 1, name: "学科课堂分析", loading: false },
           { value: 2, name: "扩展分析", loading: false }
         ];
-      }else{
+      } else {
         tagList = tagList.dialogTagList;
       }
 
@@ -267,7 +274,7 @@ export default {
                 fileList1: [],
                 fileList2: [],
                 fileList3: [],
-                name:"课堂记录",
+                name: "课堂记录",
                 NephogramList: [],
                 videoList: []
               }
@@ -595,9 +602,18 @@ export default {
           if (dataCopy.jsonData.fileData.fileObj) {
             delete _data.jsonData.fileData.fileObj;
           }
-          if (dataCopy.jsonData.baseMessage.editorBarData && dataCopy.jsonData.baseMessage.editorBarData.content) {
+          if (
+            dataCopy.jsonData.baseMessage.editorBarData &&
+            dataCopy.jsonData.baseMessage.editorBarData.content
+          ) {
             delete dataCopy.jsonData.baseMessage.editorBarData.content;
           }
+          if (
+            dataCopy.jsonData.baseMessage.editorBarData &&
+            dataCopy.jsonData.baseMessage.editorBarData.tableList
+          ) {
+            delete dataCopy.jsonData.baseMessage.editorBarData.tableList;
+          }
 
           console.log("dataCopy", dataCopy);
           let params = [
@@ -804,13 +820,20 @@ export default {
               this.dataList.find(
                 i => i.id === _startData.id
               ).jsonData.steps = _stepList;
-              // let { editorBarData } = await this.getTextContentMixin(fileData);
+              let {
+                transcriptionContent,
+                editorBarData
+              } = await this.wavAudioToTextAndObjMixin({
+                wavUrl: _startData.jsonData.fileData.url
+              });
+
+              this.dataList.find(
+                i => i.id === _startData.id
+              ).jsonData.baseMessage.transcriptionData = transcriptionContent;
               this.dataList.find(
                 i => i.id === _startData.id
-              ).jsonData.baseMessage.editorBarData = {
-                content: "xxxxxx",
-                url: "xxxxxxx"
-              };
+              ).jsonData.baseMessage.editorBarData = editorBarData;
+
               _stepList[i].status = "1";
               this.dataList.find(
                 i => i.id === _startData.id
@@ -825,7 +848,63 @@ export default {
             }
           } else if (_step.type === "automaticCoding") {
             if (_startData.jsonData.automaticCoding) {
-              console.log("开始自动编码");
+              _stepList[i].status = "2";
+              this.dataList.find(
+                i => i.id === _startData.id
+              ).jsonData.steps = _stepList;
+              //选择了字段编码
+              let _content =
+                _startData.jsonData.baseMessage.editorBarData.content;
+              let _tableList =
+                _startData.jsonData.baseMessage.editorBarData.table;
+              if (!_content) {
+                _content = await this.getFile(
+                  _startData.jsonData.baseMessage.editorBarData.url
+                );
+                _content = _content.data;
+                this.dataList.find(
+                  i => i.id === _startData.id
+                ).jsonData.baseMessage.editorBarData.content = _content;
+              }
+              if(!_tableList){
+                let _result = [];
+                let _data = _content;
+                let _div = document.createElement("div");
+                _div.innerHTML = _data;
+                let _tableRows = _div.querySelectorAll(`table tbody tr`);
+                _tableRows.forEach((i, index) => {
+                  if (index == 0) return;
+                  let obj = {
+                    index: i.cells[0].textContent,
+                    startTime: i.cells[1].textContent,
+                    endTime: i.cells[2].textContent,
+                    value: i.cells[3].textContent,
+                    time: i.cells[4].textContent,
+                    role: i.cells[5] ? i.cells[5].textContent : "",
+                    code: i.cells[6] ? i.cells[6].textContent : ""
+                  };
+                  _result.push(obj);
+                });
+
+                _tableList = _result;
+              }
+
+              let { editorBarData} = await this.wavAudioToTextAndObjMixin({ wavUrl: _startData.jsonData.fileData.url});
+
+              this.dataList.find(
+                i => i.id === _startData.id
+              ).jsonData.baseMessage.editorBarData = editorBarData;
+
+              this.dataList.find(
+                i => i.id === _startData.id
+              ).jsonData.steps = _stepList;
+              this.updateTask(_startData.id);
+              _startData.jsonData = JSON.parse(
+                JSON.stringify(
+                  this.dataList.find(i => i.id === _startData.id).jsonData
+                )
+              );
+              console.log(`${_startData.id}:已获完成自动编码`);
             } else {
               _stepList[i].status = "1";
               this.dataList.find(
@@ -935,8 +1014,8 @@ export default {
 
             await Promise.all(promises).then(() => {
               console.log(`${_startData.id}:已完成分析获取`);
-              console.log(_startData.jsonData.analysisList)
-                _stepList[i].status = "1";
+              console.log(_startData.jsonData.analysisList);
+              _stepList[i].status = "1";
               this.dataList.find(
                 i => i.id === _startData.id
               ).jsonData.steps = _stepList;
@@ -957,20 +1036,16 @@ export default {
 
             //创建课堂   赋值好fileid   替换创建后课堂的基础数据  继续下一个任务
 
-
             let newOption = await this.createClassMixin(_startData.jsonData);
 
-            this.$emit("addNewCourseOption",newOption.data);
-            this.dataList.find(
-              i => i.id === _startData.id
-            ).jsonData.createId = newOption.tid;
+            this.$emit("addNewCourseOption", newOption.data);
+            this.dataList.find(i => i.id === _startData.id).jsonData.createId =
+              newOption.tid;
             _stepList[i].status = "1";
             this.dataList.find(
               i => i.id === _startData.id
             ).jsonData.steps = _stepList;
-            this.dataList.find(
-              i => i.id === _startData.id
-            ).status = "2";
+            this.dataList.find(i => i.id === _startData.id).status = "2";
             this.updateTask(_startData.id);
             _startData.jsonData = JSON.parse(
               JSON.stringify(
@@ -979,89 +1054,85 @@ export default {
             );
             console.log(`${_startData.id}:已创建课堂`);
             // 查看是否有需要开启的任务
-            if(this.dataList.find(i=>i.status=='0')){
-              let id = this.dataList.find(i=>i.status=='0').id;
+            if (this.dataList.find(i => i.status == "0")) {
+              let id = this.dataList.find(i => i.status == "0").id;
               this.startTask(id);
             }
 
-          //   let _analysisList = _startData.jsonData.analysisList;
-          //   let createJson = _analysisList.map(i=>{return {
-          //     jsonData: i.jsonData,
-          //     type: i.Type,
-          //     index: i.tIndex
-          //   }})
-          //   var OpenCC = require("opencc-js");
-          //   let converter = OpenCC.Converter({
-          //     from: "hk",
-          //     to: "cn"
-          //   });
-          //   createJson = createJson.filter(
-          //     i =>
-          //       !i.isOtherData &&
-          //       converter(i.jsonData.name) != converter("词频词汇分析")
-          //   );
-          //   let params = {
-          //     tid: uuidv4(),
-          //     userid: this.userId,
-          //     template: createJson
-          //   }
-          //   this.ajax
-          // .post(
-          //   "https://gpt4.cocorobo.cn/insert_classroom_observation_template",
-          //   params
-          // )
-          // .then(res => {
-          //   let _data = res.data.FunctionResponse;
-          //   if (converter(_data.message) == converter("创建成功")) {
-          //     this.ajax
-          //       .post("https://gpt4.cocorobo.cn/insert_classroom_observation", {
-          //         tid: params.tid,
-          //         type: 10,
-          //         index: 0,
-          //         json_data: JSON.stringify({ file_ids: _startData.jsonData.file_ids }),
-          //         userid: this.userId
-          //       })
-          //       .then(res2 => {
-          //         let _data2 = res2.data.FunctionResponse;
-          //         if (converter(_data2.message) == converter("创建成功")) {
-          //           let newOption = {id:uuidv4(),label:_startData.jsonData.baseMessage.name,value:params.tid}
-          //           console.log(newOption);
-
-          //           this.$emit("addNewCourseOption",newOption);
-          //           _stepList[i].status = "1";
-          //           this.dataList.find(
-          //             i => i.id === _startData.id
-          //           ).jsonData.steps = _stepList;
-          //           this.dataList.find(
-          //             i => i.id === _startData.id
-          //           ).status = "2";
-          //           this.updateTask(_startData.id);
-          //           _startData.jsonData = JSON.parse(
-          //             JSON.stringify(
-          //               this.dataList.find(i => i.id === _startData.id).jsonData
-          //             )
-          //           );
-          //           console.log(`${_startData.id}:已创建课堂`);
-
-          //           // 查看是否有需要开启的任务
-          //           if(this.dataList.find(i=>i.status=='0')){
-          //             let id = this.dataList.find(i=>i.status=='0').id;
-          //             this.startTask(id);
-          //           }
-          //         }
-          //       }).catch(err=>{
-          //         console.log("存储fileId失败")
-          //         console.log(err)
-          //       })
-          //   }
-          // }).catch(err=>{
-          //   console.log("创建课堂失败")
-          //   console.log(err)
-          // })
-
-
-
-
+            //   let _analysisList = _startData.jsonData.analysisList;
+            //   let createJson = _analysisList.map(i=>{return {
+            //     jsonData: i.jsonData,
+            //     type: i.Type,
+            //     index: i.tIndex
+            //   }})
+            //   var OpenCC = require("opencc-js");
+            //   let converter = OpenCC.Converter({
+            //     from: "hk",
+            //     to: "cn"
+            //   });
+            //   createJson = createJson.filter(
+            //     i =>
+            //       !i.isOtherData &&
+            //       converter(i.jsonData.name) != converter("词频词汇分析")
+            //   );
+            //   let params = {
+            //     tid: uuidv4(),
+            //     userid: this.userId,
+            //     template: createJson
+            //   }
+            //   this.ajax
+            // .post(
+            //   "https://gpt4.cocorobo.cn/insert_classroom_observation_template",
+            //   params
+            // )
+            // .then(res => {
+            //   let _data = res.data.FunctionResponse;
+            //   if (converter(_data.message) == converter("创建成功")) {
+            //     this.ajax
+            //       .post("https://gpt4.cocorobo.cn/insert_classroom_observation", {
+            //         tid: params.tid,
+            //         type: 10,
+            //         index: 0,
+            //         json_data: JSON.stringify({ file_ids: _startData.jsonData.file_ids }),
+            //         userid: this.userId
+            //       })
+            //       .then(res2 => {
+            //         let _data2 = res2.data.FunctionResponse;
+            //         if (converter(_data2.message) == converter("创建成功")) {
+            //           let newOption = {id:uuidv4(),label:_startData.jsonData.baseMessage.name,value:params.tid}
+            //           console.log(newOption);
+
+            //           this.$emit("addNewCourseOption",newOption);
+            //           _stepList[i].status = "1";
+            //           this.dataList.find(
+            //             i => i.id === _startData.id
+            //           ).jsonData.steps = _stepList;
+            //           this.dataList.find(
+            //             i => i.id === _startData.id
+            //           ).status = "2";
+            //           this.updateTask(_startData.id);
+            //           _startData.jsonData = JSON.parse(
+            //             JSON.stringify(
+            //               this.dataList.find(i => i.id === _startData.id).jsonData
+            //             )
+            //           );
+            //           console.log(`${_startData.id}:已创建课堂`);
+
+            //           // 查看是否有需要开启的任务
+            //           if(this.dataList.find(i=>i.status=='0')){
+            //             let id = this.dataList.find(i=>i.status=='0').id;
+            //             this.startTask(id);
+            //           }
+            //         }
+            //       }).catch(err=>{
+            //         console.log("存储fileId失败")
+            //         console.log(err)
+            //       })
+            //   }
+            // }).catch(err=>{
+            //   console.log("创建课堂失败")
+            //   console.log(err)
+            // })
           }
         }
       }
@@ -1091,6 +1162,9 @@ export default {
         //只停止这个任务
         this.dataList.find(i => i.id === id).status = "3";
       }
+    },
+    test() {
+      this.testMixin();
     }
   },
   mounted() {
@@ -1161,7 +1235,7 @@ export default {
 .b_head {
   width: 100%;
   height: 50px;
-  margin: 20px 0 10px 0;
+  margin: 20px 0 0px 0;
   box-sizing: border-box;
 }
 

+ 1 - 1
src/components/pages/classroomObservation/index.vue

@@ -83,7 +83,7 @@
       </div>
       <div class="co-h2-right">
 
-        <div class="co-h2-r-btn" style="background: rgba(54, 129, 252, 1)" @click.stop="batchBtn()" v-show="false">
+        <div class="co-h2-r-btn" style="background: rgba(54, 129, 252, 1)" @click.stop="batchBtn()">
           <span class="co-h2-r-b-icon3"></span>
           <div style="color: #fff;">批量创建</div>
         </div>

+ 287 - 4
src/components/pages/classroomObservation/tools/mixin.js

@@ -53,8 +53,8 @@ import markdownIt from "markdown-it";
 
 export const toolMixin = {
   methods: {
-    test() {
-      this.$message.info("测试")
+    testMixin() {
+
     },
     getTextContentMixin(file) {
       return new Promise((resolve) => {
@@ -1148,8 +1148,8 @@ CH:${_CH}
                               });
                           }))
                         })
-                        Promise.all(promises).then(res=>{
-                          resolve({ data: newOption,tid:params.tid })
+                        Promise.all(promises).then(res => {
+                          resolve({ data: newOption, tid: params.tid })
                         })
 
                         // promises.push(new Promise((resolve)=>{
@@ -1207,5 +1207,288 @@ CH:${_CH}
           })
       })
     },
+    //文本转录
+    wavAudioToTextAndObjMixin(data) {
+      return new Promise((resolve) => {
+        let { wavUrl } = data;
+        let iframeRef = this.$refs["iframeRef"];
+        iframeRef.contentWindow.window.document.getElementById(
+          "languageOptions"
+        ).selectedIndex = 2;//默认普通话
+
+        let transcriptionContent = "";
+        let tableContent = "";
+        let tableList = [];
+        let _startTime = 0;
+        let _endTime = 0;
+
+        // 转录中
+        iframeRef.contentWindow.onRecognizedResult = (e) => {
+          let privText = e.privText;
+          let privSpeakerId = e.privSpeakerId;
+          let privDuration = e.privDuration;
+          let privOffset = e.privOffset;
+          if (!privText || !privSpeakerId || privSpeakerId == "Unknown") {//不记录
+            return;
+          }
+
+          _endTime = (privOffset + privDuration) / 10000000;
+
+          tableList.push({
+            value: privText,
+            startTime: this.updateRecordedTimeMixin({ duration: _startTime }),
+            endTime: this.updateRecordedTimeMixin({ duration: _endTime }),
+            time: this.updateRecordedTimeMixin({ duration: _endTime - _startTime }),
+            role: privSpeakerId,
+            code: ""
+          });
+
+          _startTime = _endTime;
+          transcriptionContent += privText;
+        };
+
+        //转录结束
+        iframeRef.contentWindow.onSessionStopped = async (e) => {
+          tableContent = `<table
+	border="0"
+	width="100%"
+	cellpadding="0"
+	cellspacing="0"
+	style="text-align: center"
+>
+	<tbody>
+		<tr>
+			<th>序号</th>
+			<th>开始时间</th>
+			<th>结束时间</th>
+			<th>发言内容</th>
+			<th>时长</th>
+			<th>说话人身份</th>
+			<th>行为编码</th>
+	</tr>`;
+          tableList.forEach((item, index) => {
+            tableContent += `<tr>
+							<td>${index + 1}</td>
+							<td>${item.startTime}</td>
+							<td>${item.endTime}</td>
+							<td>${item.value}</td>
+							<td>${item.time}</td>
+							<td>${item.role}</td>
+							<td>${item.code}</td>
+						</tr>`
+          })
+
+          tableContent += `<tr><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr></tbody></table>`
+
+          var blob = new Blob([tableContent], { type: "text/plain;charset=utf-8" });
+          blob.lastModifiedDate = new Date();
+          blob.name = `classroomObservation.txt`;
+          this.uploadFileMixin(blob).then(upload => {
+            resolve({ transcriptionContent: transcriptionContent, editorBarData: { type: "0", url: upload.Location, content: tableContent, tableList: tableList } })
+            // this.ajax
+            //   .put("https://gpt4.cocorobo.cn/upload_file_knowledge", {
+            //     url: upload.Location
+            //   })
+            //   .then(res => {
+            //     let resData = res.data.FunctionResponse;
+            //     if (resData.result && resData.result.id) {
+            //       resolve({ fileId: resData.result.id, editorBarData: { type: "0", url: upload.Location }, })
+            //     }
+            //   })
+          })
+          // resolve({ transcriptionContent: transcriptionContent, tableContent: tableContent, tableList: tableList })
+        };
+
+        //开始转录
+        iframeRef.contentWindow.ConversationTranscriber({
+          files: [_file]
+        });
+      })
+
+    },
+    updateRecordedTimeMixin({ duration }) {
+      // 更新currentTime,将秒数转换为时分秒格式
+      let hours = Math.floor(duration / 3600);
+      let minutes = Math.floor((duration % 3600) / 60);
+      let seconds = Math.floor(duration % 60);
+      // this.recordedForm.time = `${hours.toString().padStart(2, "0")}:${minutes
+      // 	.toString()
+      // 	.padStart(2, "0")}:${seconds.toString().padStart(2, "0")}`;
+      return `${hours
+        .toString()
+        .padStart(2, "0")}:${minutes
+          .toString()
+          .padStart(2, "0")}:${seconds.toString().padStart(2, "0")}`;
+    },
+    //自动编码
+    automaticCodingMixin(data) {
+      return new Promise(async (resolve) => {
+        let { tableList } = data;
+
+        let roleObj = {};
+        let tableContent = `<table
+	border="0"
+	width="100%"
+	cellpadding="0"
+	cellspacing="0"
+	style="text-align: center"
+>
+	<tbody>
+		<tr>
+			<th>序号</th>
+			<th>开始时间</th>
+			<th>结束时间</th>
+			<th>发言内容</th>
+			<th>时长</th>
+			<th>说话人身份</th>
+			<th>行为编码</th>
+	</tr>`;
+
+        console.log("说话人身份编码开始")
+        // 说话人身份编码
+        while (tableList.some(i => i.role.indexOf("Guest") != -1 && i.role !== '')) {
+          let _ajaxList = tableList.filter(i => i.role.indexOf("Guest") != -1 && i.role !== '').slice(0, 10);
+          console.log(`说话人身份编码:`,_ajaxList)
+          const params = {
+            inputs: {
+              options: "老师,学生",
+              rows: JSON.stringify(
+                _ajaxList.map(i => {
+                  return { content: i.value, role: i.role };
+                })
+              )
+            },
+            response_mode: "blocking",
+            user: this.userId
+          };
+
+          let roleRes = await this.getWavRoleList(params);
+          if (roleRes.data === 1) continue;;
+          let _roleResult = roleRes.data.data.outputs.result;
+          let _numRole = [];
+
+          _roleResult.forEach((txt, index) => {
+            let _oldRole = _getRoleList[index].role;
+            if (_numRole.map(i => i.role).includes(_oldRole)) {
+              let _findIndex = _numRole.findIndex(
+                i => i.role == _oldRole
+              );
+              if (txt == "学生") {
+                _numRole[_findIndex].s += 1;
+              } else if (txt == "老师") {
+                _numRole[_findIndex].t += 1;
+              }
+            } else {
+              if (txt == "学生") {
+                _numRole.push({ role: _oldRole, t: 0, s: 1 });
+              } else if (txt == "老师") {
+                _numRole.push({ role: _oldRole, t: 1, s: 0 });
+              }
+            }
+          });
+
+          //根据数量判断是老师还是学生
+          _numRole.forEach(i => {
+            if (i.t > i.s) {
+              roleObj[i.role] = "老师";
+            } else if (i.t < i.s) {
+              roleObj[i.role] = "学生";
+            }
+          });
+
+          //已经有的role
+          let roleKeys = Object.keys(roleObj);
+
+          tableList.forEach(i => {
+            if (roleKeys.includes(i.role)) {
+              i.role = roleObj[i.role];
+            }
+          });
+        }
+        console.log("说话人身份编码完成")
+
+
+        console.log("说话人行为编码开始")
+        //说话人行为编码
+        while (tableList.some(i => i.code == "" && i.role.indexOf("Guest") == -1)) {
+          let _ajaxList = tableList.filter(i => i.code == "" && i.role.indexOf("Guest") == -1).slice(0, 10);
+          console.log(`说话人行为编码:`,_ajaxList)
+          let params = {
+            inputs: {
+              rows: JSON.stringify(
+                _ajaxList.map(i => ({
+                  content: i.value,
+                  role: i.role
+                }))
+              ),
+              options: "老师讲课,老师提问或点名,老师板书或操作,老师评价或反馈,老师其他,学生发言,学生小组活动,学生自主学习,学生汇报分享,学生其他",
+              attention: "- 先根据说话人角色判断,再在对应角色的选项中选择选项\n- 如果没有合适的选项,默认使用`老师其他`或者`学生其他`"
+            },
+            response_mode: "blocking",
+            user: this.userId
+          };
+
+          let _codeRes = await this.getBehavioralCoding(params)
+          if (_codeRes.data === 1) continue;
+          const _codeResult = _codeRes.data.data.outputs.result;
+
+          _ajaxList.forEach((item, index) => {
+            let _findIndex = tableList.findIndex(i => i.index === item.index);
+            if (_findIndex != -1) {
+              tableList[_findIndex].code = _codeResult[index];
+            }
+          })
+        }
+        console.log("说话人行为编码完成")
+
+        tableList.forEach((item, index) => {
+          tableContent += `<tr>
+          <td>${index + 1}</td>
+          <td>${item.startTime}</td>
+          <td>${item.endTime}</td>
+          <td>${item.value}</td>
+          <td>${item.time}</td>
+          <td>${item.role}</td>
+          <td>${item.code}</td>
+        </tr>`
+        })
+        tableContent += `<tr><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr></tbody></table>`
+
+        var blob = new Blob([tableContent], { type: "text/plain;charset=utf-8" });
+        blob.lastModifiedDate = new Date();
+        blob.name = `classroomObservation.txt`;
+        this.uploadFileMixin(blob).then(upload => {
+          resolve({ editorBarData: { type: "0", url: upload.Location, content: tableContent, tableList: tableList } })
+        })
+      })
+
+    },
+    getWavRoleList(params) {
+      return new Promise((resolve, reject) => {
+        this.ajax
+          .post("https://dify.cocorobo.cn/v1/workflows/run?key=role", params)
+          .then(res => {
+            resolve(res);
+          })
+          .catch(err => {
+            console.log("获取说话人身份失败", err)
+            resolve({ data: 1 })
+            // reject(err);
+          });
+      });
+    },
+    getBehavioralCoding(params) {
+      return new Promise((resolve, reject) => {
+        this.ajax
+          .post("https://dify.cocorobo.cn/v1/workflows/run?key=code", params)
+          .then(res => {
+            resolve(res);
+          })
+          .catch(err => {
+            console.log("获取说话人编码失败", err)
+            resolve({ data: 1 })
+          });
+      });
+    },
   }
 };

이 변경점에서 너무 많은 파일들이 변경되어 몇몇 파일들은 표시되지 않았습니다.