瀏覽代碼

课堂观察更新

SanHQin 2 月之前
父節點
當前提交
38a97868b2

+ 1 - 1
dist/index.html

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

File diff suppressed because it is too large
+ 0 - 0
dist/static/css/app.5ad57275ccc209ee5bd67f7a77c5ee33.css


File diff suppressed because it is too large
+ 0 - 0
dist/static/css/app.5ad57275ccc209ee5bd67f7a77c5ee33.css.map


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/app.4a5f3eba840490f85b04.js


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/app.4a5f3eba840490f85b04.js.map


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/manifest.161e82026ac2ae03ab6f.js.map


+ 34 - 4
src/components/pages/classroomObservation/dialog/batchCreationClassDialog.vue

@@ -131,7 +131,7 @@ export default {
       ],
       userId: this.$route.query["userid"],
       selectStatus: "99",
-      show: false,
+      show: true,
       selectList: [],
       dataList: [],
       nowDoTaskId: [],
@@ -253,7 +253,7 @@ export default {
           create_at: "2025-05-07 16.05.03",
           remarks: "备注",
           batch: batch,
-          status: "3",
+          status: "0",
           createId: "",
           jsonData: {
             file_ids: "",
@@ -464,6 +464,9 @@ export default {
       Promise.all(promiseList)
         .then(res => {
           this.$message.success("创建成功");
+          if(!this.dataList.find(i =>i.status == 1)){
+            this.startTask(this.dataList.find(i =>i.status == 0).id);
+          }
         })
         .catch(err => {
           console.log("创建出错", err);
@@ -626,6 +629,10 @@ export default {
             delete dataCopy.jsonData.baseMessage.editorBarData.tableList;
           }
 
+          if(dataCopy.jsonData.errorMessage){
+            delete dataCopy.jsonData.errorMessage;
+          }
+
           console.log("dataCopy", dataCopy);
           let params = [
             {
@@ -777,6 +784,16 @@ export default {
             ).jsonData.steps = _stepList;
             let _fileData = _startData.jsonData.fileData;
             let audioFile = await this.getVideoToVoiceAndUploadMixin(_fileData);
+            if(audioFile.data==3){
+              this.dataList.find(
+                i => i.id === _startData.id
+              ).jsonData.errorMessage = {content:"视频提取音频失败",err:audioFile.err};
+
+              this.dataList.find(
+                i => i.id === _startData.id
+              ).status = "3"
+              break;
+            }
             if(!this.nowDoTaskId.includes(_startData.id))break;
             _startData.jsonData.fileData.videoUrl = _fileData.url;
             _startData.jsonData.fileData.fileObj = audioFile.fileObj;
@@ -1088,6 +1105,17 @@ export default {
             //创建课堂   赋值好fileid   替换创建后课堂的基础数据  继续下一个任务
             let newOption = await this.createClassMixin(_startData.jsonData);
 
+            if([1,2,3].includes(newOption.data)){
+              this.dataList.find(
+                i => i.id === _startData.id
+              ).jsonData.errorMessage = {content:"创建课堂失败",err:data.err};
+
+              this.dataList.find(
+                i => i.id === _startData.id
+              ).status = "3"
+              break;
+
+            }
             if(!this.nowDoTaskId.includes(_startData.id))break;
 
             this.$emit("addNewCourseOption", newOption.data);
@@ -1259,7 +1287,8 @@ export default {
 }
 
 .b_n_left {
-  width: calc(100% - 60px);
+  flex: 1;
+  /* width: calc(100% - 60px); */
   height: 100%;
   display: flex;
   align-items: center;
@@ -1298,13 +1327,14 @@ export default {
 }
 
 .b_n_right {
-  width: 60px;
+  width: auto;
   height: 100%;
   display: flex;
   align-items: center;
   justify-content: flex-end;
   color: rgba(150, 155, 163, 1);
   font-size: 16px;
+  white-space: nowrap;
 }
 
 .b_bottom {

+ 11 - 45
src/components/pages/classroomObservation/tools/mixin.js

@@ -147,7 +147,7 @@ ${arr.map(row => `<tr>
           // 把uint8Array转换为视频文件
           _file = new File([videoRes.data], 'video.mp4', { type: 'video/mp4' });
         }
-        if (!_file) return resolve({ data: 0 })
+        if (!_file) return resolve({ data: 2,err:"未找到文件" })
         console.log("需要处理的文件👉", _file)
         try {
           const reader = new FileReader();
@@ -179,14 +179,14 @@ ${arr.map(row => `<tr>
               })
             } catch (error) {
               console.log("👉", error);
-              return resolve({ data: 2 })
+              return resolve({ data: 2,err:error })
             }
 
           }
           reader.readAsArrayBuffer(_file);
         } catch (error) {
           console.log("👉", error);
-          return resolve({ data: 2 })
+          return resolve({ data: 2,err:error })
         }
       })
     },
@@ -1149,51 +1149,13 @@ CH:${_CH}
                         Promise.all(promises).then(res => {
                           resolve({ data: newOption, tid: params.tid })
                         })
-
-                        // promises.push(new Promise((resolve)=>{
-                        //    this.ajax
-                        //   .post("https://gpt4.cocorobo.cn/update_classroom_observation", {
-                        //     id: _bmData.id,
-                        //     json_data: JSON.stringify(_bmData.jsonData)
-                        //   })
-                        //   .then(res => {
-                        //     resolve({ data: newOption,tid:params.tid })
-                        //   })
-                        //   .catch(e => {
-                        //     console.log("保存失败", e);
-                        //     resolve({ data: newOption,tid:params.tid })
-                        //   });
-                        // }))
-
-
-                        // Promise.all(()=>{
-
-                        // },)
-                        // promises.push(new Promise((resolve)=>{
-
-                        // }))
-
-
-                        // 保存修改信息
-                        // this.ajax
-                        //   .post("https://gpt4.cocorobo.cn/update_classroom_observation", {
-                        //     id: _bmData.id,
-                        //     json_data: JSON.stringify(_bmData.jsonData)
-                        //   })
-                        //   .then(res => {
-                        //     resolve({ data: newOption,tid:params.tid })
-                        //   })
-                        //   .catch(e => {
-                        //     console.log("保存失败", e);
-                        //     resolve({ data: newOption,tid:params.tid })
-                        //   });
                       }).catch(err => {
                         console.log("修改基础信息失败", err)
-                        resolve({ data: 1, err: err })
+                        resolve({ data: 3, err: err })
                       })
                   }
                 }).catch(err => {
-                  resolve({ data: 1, err: err })
+                  resolve({ data: 2, err: err })
                   console.log("存储fileId失败")
                   console.log(err)
                 })
@@ -1491,9 +1453,13 @@ CH:${_CH}
             .then(audioBuffer => {
 
               let wavBlob = this.bufferToWav(audioBuffer);
+
+              let _wavFile = new File([wavBlob], "audio.wav", {
+                type: "audio/wav"
+              })
               // 在控制台输出WAV文件对象
-              resolve({ data: wavBlob })
-              console.log('转换后的WAV文件对象:', wavBlob);
+              resolve({ data: _wavFile })
+              console.log('转换后的WAV文件对象:', _wavFile);
             })
             .catch(err => {
               resolve({ data: 1, err: err })

Some files were not shown because too many files changed in this diff