SanHQin 2 ヶ月 前
コミット
b25b44c870

+ 1 - 1
dist/index.html

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

ファイルの差分が大きいため隠しています
+ 0 - 0
dist/static/css/app.f3b23b042ca755e51c1fcfb7257c945c.css


ファイルの差分が大きいため隠しています
+ 0 - 0
dist/static/css/app.f3b23b042ca755e51c1fcfb7257c945c.css.map


ファイルの差分が大きいため隠しています
+ 0 - 0
dist/static/js/app.5b1354939e147c8f9330.js


ファイルの差分が大きいため隠しています
+ 0 - 0
dist/static/js/app.5b1354939e147c8f9330.js.map


ファイルの差分が大きいため隠しています
+ 0 - 0
dist/static/js/manifest.161e82026ac2ae03ab6f.js.map


+ 40 - 4
src/components/pages/classroomObservation/components/analysisItem.vue

@@ -508,6 +508,8 @@ export default {
                 ["1", "2", "3"].includes(this.data.jsonData.echartsType)
               ) {
                 this.editEcharts();
+              }else{
+                this.changeShowIndex(1);
               }
             });
           })
@@ -599,7 +601,7 @@ export default {
       _copyData.json_data = JSON.stringify(_copyData.jsonData);
       _oldCopyDate.json_data = JSON.stringify(_oldCopyDate.jsonData);
       // 一样就不用更新了
-      if (JSON.stringify(_copyData) == JSON.stringify(_oldCopyDate)) return;
+      // if (JSON.stringify(_copyData) == JSON.stringify(_oldCopyDate)) return;
       // this.data = _copyData;
       this.$emit("editItem", this.data.id, _copyData);
       console.log("save👉",save)
@@ -642,6 +644,7 @@ export default {
       });
     },
     editEcharts() {
+      console.log("生成图表")
       this.loading = true;
       this.loadNum = 1;
       this.openItem = false;
@@ -709,6 +712,18 @@ export default {
             console.log(e);
             this.loadNum = 2;
             this.loading = false;
+            let _copyData = JSON.parse(JSON.stringify(this.data));
+            _copyData.json_data = JSON.stringify(_copyData.jsonData);
+            if (this.historyResult.length == 0) {
+              this.historyResult.push(_copyData.jsonData);
+            } else {
+              this.historyResult.splice(
+                this.showIndex + 1,
+                0,
+                _copyData.jsonData
+              );
+            }
+            this.changeShowIndex(1);
             this.$message.error("生成图表失败");
           }
         });
@@ -780,6 +795,18 @@ export default {
             console.log(e);
             this.loadNum = 2;
             this.loading = false;
+            let _copyData = JSON.parse(JSON.stringify(this.data));
+            _copyData.json_data = JSON.stringify(_copyData.jsonData);
+            if (this.historyResult.length == 0) {
+              this.historyResult.push(_copyData.jsonData);
+            } else {
+              this.historyResult.splice(
+                this.showIndex + 1,
+                0,
+                _copyData.jsonData
+              );
+            }
+            this.changeShowIndex(1);
             this.$message.error("生成图表失败");
           }
         });
@@ -889,6 +916,18 @@ export default {
             console.log(e);
             this.loadNum = 2;
             this.loading = false;
+            let _copyData = JSON.parse(JSON.stringify(this.data));
+            _copyData.json_data = JSON.stringify(_copyData.jsonData);
+            if (this.historyResult.length == 0) {
+              this.historyResult.push(_copyData.jsonData);
+            } else {
+              this.historyResult.splice(
+                this.showIndex + 1,
+                0,
+                _copyData.jsonData
+              );
+            }
+            this.changeShowIndex(1);
             this.$message.error("生成图表失败");
           }
         });
@@ -897,9 +936,6 @@ export default {
         this.loadNum = 2;
         return this.$message.error("该模板不是图表模板");
       }
-      this.loadNum = 2;
-      this.loading = false;
-      return this.$message.error("生成图表失败");
     },
     calculateTopValues(len, minTop = -80, maxTop = 70, maxStep = 40) {
       const length = len;

+ 204 - 161
src/components/pages/classroomObservation/components/analysisSpecialItem.vue

@@ -1,10 +1,14 @@
 <template>
-  <div class="analysisItem" ref="analysisItemRef" :style="
+  <div
+    class="analysisItem"
+    ref="analysisItemRef"
+    :style="
       `top:${moveTop}px;transition:${isDragging ? '0' : '.3s'}s;${
         isDragging ? 'z-index:999' : ''
       }`
     "
-		@mousedown="moveDown($event)">
+    @mousedown="moveDown($event)"
+  >
     <div class="ai-header">
       <div class="ai-h-left" @click.stop="changeOpenItem(!openItem)">
         <span
@@ -184,7 +188,10 @@
       <!-- 光谱图 -->
       <echartsSpectrogram
         style="max-height: 200px;max-width: 90%;width: 90%;height: 200px;margin: auto;margin-bottom: 50px;"
-        v-if="data.jsonData.spectrogramData && data.jsonData.mId == 'bfe844b1-7a45-11ef-9b30-005056b86db5'"
+        v-if="
+          data.jsonData.spectrogramData &&
+            data.jsonData.mId == 'bfe844b1-7a45-11ef-9b30-005056b86db5'
+        "
         :data="data.jsonData.spectrogramData"
       />
 
@@ -197,7 +204,11 @@
         "
       />
 
-			<echartsRTCH v-if="data.jsonData.RT && data.jsonData.CH" :data="{RT:data.jsonData.RT,CH:data.jsonData.CH}" style="width: 100%;height: 350px;display: flex;justify-content: center;margin-bottom: 20px;"/>
+      <echartsRTCH
+        v-if="data.jsonData.RT && data.jsonData.CH"
+        :data="{ RT: data.jsonData.RT, CH: data.jsonData.CH }"
+        style="width: 100%;height: 350px;display: flex;justify-content: center;margin-bottom: 20px;"
+      />
       <!-- <div class="rtCh" v-if="data.jsonData.RT && data.jsonData.CH">
         <img
           :src="
@@ -227,14 +238,14 @@ import { v4 as uuidv4 } from "uuid";
 import echartsSpectrogram from "./echartsSpectrogram";
 // import editNameDialog from './editNameDialog.vue'
 import markdownIt from "markdown-it";
-import echartsRTCH from './echartsRTCH'
+import echartsRTCH from "./echartsRTCH";
 export default {
   emits: ["delItem", "editItem", "saveItem"],
   components: {
     mdView,
     eChartTemplate,
     echartsSpectrogram,
-		echartsRTCH
+    echartsRTCH
     // editNameDialog
   },
   props: {
@@ -272,7 +283,7 @@ export default {
       type: Boolean,
       default: true
     },
-		isDrag: {
+    isDrag: {
       type: Boolean,
       default: false
     },
@@ -319,7 +330,7 @@ export default {
           }
         ]
       },
-			startY: 0,
+      startY: 0,
       startTop: 0,
       moveTop: 0,
       isDragging: false,
@@ -349,7 +360,7 @@ export default {
   },
   methods: {
     changeOpenItem(newValue) {
-			if(this.isDrag)return;
+      if (this.isDrag) return;
       if (this.loading == true && this.loadNum != 0)
         return this.$message("请稍后...");
       this.loadNum = 0;
@@ -459,7 +470,7 @@ export default {
     },
     getData(type = 0) {
       if (
-        this.data.jsonData.mId == 'bfe844b1-7a45-11ef-9b30-005056b86db5' &&
+        this.data.jsonData.mId == "bfe844b1-7a45-11ef-9b30-005056b86db5" &&
         type == 1
       ) {
         return this.getSpectrogram("", type);
@@ -503,7 +514,7 @@ export default {
         ) {
           this.getTeachingModeData(_result, type);
         } else if (
-          this.data.jsonData.mId == 'bfe844b1-7a45-11ef-9b30-005056b86db5'
+          this.data.jsonData.mId == "bfe844b1-7a45-11ef-9b30-005056b86db5"
         ) {
           return this.getSpectrogram(_result, type);
         } else {
@@ -513,6 +524,14 @@ export default {
         console.log(error);
         this.loadNum = 2;
         this.loading = false;
+        let _copyData = JSON.parse(JSON.stringify(this.data));
+        _copyData.json_data = JSON.stringify(_copyData.jsonData);
+        if (this.historyResult.length == 0) {
+          this.historyResult.push(_copyData.jsonData);
+        } else {
+          this.historyResult.splice(this.showIndex + 1, 0, _copyData.jsonData);
+        }
+        this.changeShowIndex(1);
         return this.$message.error("生成分析失败");
       }
     },
@@ -558,14 +577,14 @@ export default {
           trigger: "item",
           formatter: "{a} <br/>{b}: {d}%",
           textStyle: {
-            color: '#000000'
+            color: "#000000"
           }
         },
         legend: {
           top: "5%",
           left: "center",
           textStyle: {
-            color: '#000000'
+            color: "#000000"
           }
         },
         series: [
@@ -575,13 +594,13 @@ export default {
             radius: ["40%", "70%"],
             label: {
               formatter: "{b}: {d}%",
-              color: '#000000'
+              color: "#000000"
             },
             emphasis: {
               label: {
                 show: true,
                 formatter: "{b}: {d}%",
-                color: '#000000'
+                color: "#000000"
               },
               itemStyle: {
                 shadowBlur: 10,
@@ -594,7 +613,6 @@ export default {
         ]
       };
 
-
       let _copyData = JSON.parse(JSON.stringify(this.data));
       _copyData.jsonData.eChartData = _option;
       _copyData.json_data = JSON.stringify(_copyData.jsonData);
@@ -672,8 +690,7 @@ ${JSON.stringify(_dataList)}
             step: "start",
             data: _result,
             type: "line",
-            lineStyle: {
-            }
+            lineStyle: {}
           },
           {
             name: "对角线",
@@ -683,7 +700,7 @@ ${JSON.stringify(_dataList)}
               [_maxValue, _maxValue]
             ],
             lineStyle: {
-              type: "dashed",
+              type: "dashed"
             },
             markLine: {
               symbol: ["none", "none"]
@@ -800,18 +817,18 @@ CH:${_CH}
       // };
 
       let parm = {
-          id:"f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b",
-          message: _msg,
-          session_name: uuidv4(),
-          userId: this.userId,
-          file_ids: this.fileId ? [this.fileId] : [],
-          model: "gpt-4o-2024-11-20",
-          sound_url:"",
-          temperature:0.2,
-          top_p:1,
-          max_completion_tokens:4096,
-          stream:false,
-          uid:uuidv4()
+        id: "f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b",
+        message: _msg,
+        session_name: uuidv4(),
+        userId: this.userId,
+        file_ids: this.fileId ? [this.fileId] : [],
+        model: "gpt-4o-2024-11-20",
+        sound_url: "",
+        temperature: 0.2,
+        top_p: 1,
+        max_completion_tokens: 4096,
+        stream: false,
+        uid: uuidv4()
       };
 
       this.ajax
@@ -832,12 +849,11 @@ CH:${_CH}
               _copyData.jsonData
             );
           }
-          this.changeShowIndex(1,false);
+          this.changeShowIndex(1, false);
           this.loading = false;
-					this.$nextTick(()=>{
-
-						this.editEcharts(true);
-						})
+          this.$nextTick(() => {
+            this.editEcharts(true);
+          });
         })
         .catch(err => {
           this.loadNum = 2;
@@ -858,7 +874,7 @@ CH:${_CH}
           console.log("取消");
         });
     },
-    changeShowIndex(value,save=true) {
+    changeShowIndex(value, save = true) {
       if (this.historyResult.length == 0) return;
       if (value == -1) {
         if (this.showIndex > 0) this.showIndex--;
@@ -871,11 +887,11 @@ CH:${_CH}
       _copyData.json_data = JSON.stringify(_copyData.jsonData);
       _oldCopyDate.json_data = JSON.stringify(_oldCopyDate.jsonData);
       // 一样就不用更新了
-      if (JSON.stringify(_copyData) == JSON.stringify(_oldCopyDate)) return;
+      // if (JSON.stringify(_copyData) == JSON.stringify(_oldCopyDate)) return;
       // this.data = _copyData;
       this.$emit("editItem", this.data.id, _copyData);
-      console.log("save👉",save)
-      if(save)this.$emit("saveItem", this.data.id, _copyData);
+      console.log("save👉", save);
+      if (save) this.$emit("saveItem", this.data.id, _copyData);
     },
     convertToSeconds(time) {
       let parts = time.split(":");
@@ -917,108 +933,124 @@ CH:${_CH}
     },
     getSpectrogram(_dataList, type = 1) {
       if (type === 0) {
-				try {
-					this.loading = true;
-				this.openItem = false;
-        return this.getContentTable().then(res => {
-          if (res.length <= 0) {
-            this.loadNum = 2;
-            this.loading = false;
-            return this.$message.error("在正文中未找到表格数据");
-          }
-
-          let _tableData = res;
-
-					let _delIndex = _tableData.findIndex(i=>i.includes(this.converter("时间点")))
-          console.log("👉===",_dataList,_tableData)
-					_tableData = _tableData.slice(_delIndex+1)
-          console.log()
-          let _result = [];
-          let identity = "老师"; //0:老师 1:学生
-          let startTime = "";
-          let endTime = "";
-          let sumTime = 0;
-          let upTime = '00:00:00';
-
-          _dataList.forEach((item, index) => {
-            if (index == 0) {
-              //第一个
-              identity = item.role;
-              startTime = item.startTime;
-              endTime = item.endTime;
-              sumTime = (this.convertToSeconds(item.endTime) - this.convertToSeconds(upTime));
-              upTime = item.endTime
-              // console.log(item.endTime,item.startTime,(this.convertToSeconds(item.endTime) - this.convertToSeconds(item.startTime)))
-              return;
-            }
-            if (item.role == identity) {
-              //没更换角色
-              sumTime += (this.convertToSeconds(item.endTime) - this.convertToSeconds(upTime));
-              endTime = item.endTime;
-              upTime = item.endTime
-              // console.log(item.endTime,item.startTime,(this.convertToSeconds(item.endTime) - this.convertToSeconds(item.startTime)))
-            } else {
-              //更换角色了
-              _result.push({
-                startTime: startTime,
-                endTime: endTime,
-                identity: identity,
-                sumTime: sumTime
-              });
-              identity = item.role;
-              startTime = item.startTime;
-              endTime = item.endTime;
-              sumTime = (this.convertToSeconds(item.endTime) - this.convertToSeconds(upTime));
-              upTime = item.endTime
-              // console.log(item.endTime,item.startTime,(this.convertToSeconds(item.endTime) - this.convertToSeconds(item.startTime)))
-            }
-            if(index==_dataList.length-1){
-              console.log("👉???",this.convertToSeconds(item.endTime))
+        try {
+          this.loading = true;
+          this.openItem = false;
+          return this.getContentTable().then(res => {
+            if (res.length <= 0) {
+              this.loadNum = 2;
+              this.loading = false;
+              return this.$message.error("在正文中未找到表格数据");
             }
-          });
 
-           console.log(_result.reduce((pre,cur)=>{return pre+=cur.sumTime},0))
-          console.log("→xxx",_result)
-          let breakpoint = [];
+            let _tableData = res;
 
-					breakpoint = _tableData.map(i=>this.convertToSeconds(i[0]))
+            let _delIndex = _tableData.findIndex(i =>
+              i.includes(this.converter("时间点"))
+            );
+            console.log("👉===", _dataList, _tableData);
+            _tableData = _tableData.slice(_delIndex + 1);
+            console.log();
+            let _result = [];
+            let identity = "老师"; //0:老师 1:学生
+            let startTime = "";
+            let endTime = "";
+            let sumTime = 0;
+            let upTime = "00:00:00";
+
+            _dataList.forEach((item, index) => {
+              if (index == 0) {
+                //第一个
+                identity = item.role;
+                startTime = item.startTime;
+                endTime = item.endTime;
+                sumTime =
+                  this.convertToSeconds(item.endTime) -
+                  this.convertToSeconds(upTime);
+                upTime = item.endTime;
+                // console.log(item.endTime,item.startTime,(this.convertToSeconds(item.endTime) - this.convertToSeconds(item.startTime)))
+                return;
+              }
+              if (item.role == identity) {
+                //没更换角色
+                sumTime +=
+                  this.convertToSeconds(item.endTime) -
+                  this.convertToSeconds(upTime);
+                endTime = item.endTime;
+                upTime = item.endTime;
+                // console.log(item.endTime,item.startTime,(this.convertToSeconds(item.endTime) - this.convertToSeconds(item.startTime)))
+              } else {
+                //更换角色了
+                _result.push({
+                  startTime: startTime,
+                  endTime: endTime,
+                  identity: identity,
+                  sumTime: sumTime
+                });
+                identity = item.role;
+                startTime = item.startTime;
+                endTime = item.endTime;
+                sumTime =
+                  this.convertToSeconds(item.endTime) -
+                  this.convertToSeconds(upTime);
+                upTime = item.endTime;
+                // console.log(item.endTime,item.startTime,(this.convertToSeconds(item.endTime) - this.convertToSeconds(item.startTime)))
+              }
+              if (index == _dataList.length - 1) {
+                console.log("👉???", this.convertToSeconds(item.endTime));
+              }
+            });
 
-          _result = _result.filter(
-            i =>
-              i.identity == this.converter("老师") ||
-              i.identity == this.converter("学生")
-          );
-          // let
-          let _data = {
-            data: [],
-            breakpoint: []
-          };
+            console.log(
+              _result.reduce((pre, cur) => {
+                return (pre += cur.sumTime);
+              }, 0)
+            );
+            console.log("→xxx", _result);
+            let breakpoint = [];
 
-          _data.data = _result.map(i => ({role:i.identity,type:i.identity==this.converter("老师")?0:1,value:i.sumTime}));
-          _data.breakpoint = breakpoint;
-          let _copyData = JSON.parse(JSON.stringify(this.data));
-          _copyData.jsonData.spectrogramData = _data;
-          _copyData.json_data = JSON.stringify(_copyData.jsonData);
-          if (this.historyResult.length == 0) {
-            this.historyResult.push(_copyData.jsonData);
-          } else {
-            this.historyResult.splice(
-              this.showIndex + 1,
-              0,
-              _copyData.jsonData
+            breakpoint = _tableData.map(i => this.convertToSeconds(i[0]));
+
+            _result = _result.filter(
+              i =>
+                i.identity == this.converter("老师") ||
+                i.identity == this.converter("学生")
             );
-          }
-          this.changeShowIndex(1);
-          this.loading = false;
+            // let
+            let _data = {
+              data: [],
+              breakpoint: []
+            };
+
+            _data.data = _result.map(i => ({
+              role: i.identity,
+              type: i.identity == this.converter("老师") ? 0 : 1,
+              value: i.sumTime
+            }));
+            _data.breakpoint = breakpoint;
+            let _copyData = JSON.parse(JSON.stringify(this.data));
+            _copyData.jsonData.spectrogramData = _data;
+            _copyData.json_data = JSON.stringify(_copyData.jsonData);
+            if (this.historyResult.length == 0) {
+              this.historyResult.push(_copyData.jsonData);
+            } else {
+              this.historyResult.splice(
+                this.showIndex + 1,
+                0,
+                _copyData.jsonData
+              );
+            }
+            this.changeShowIndex(1);
+            this.loading = false;
 
-          // console.log(_dataList);
-          // console.log(_tableData);
-        });
-				} catch (e) {
-					this.loadNum = 2;
+            // console.log(_dataList);
+            // console.log(_tableData);
+          });
+        } catch (e) {
+          this.loadNum = 2;
           this.loading = false;
           return this.$message.error("数据格式错误");
-				}
+        }
       }
       this.$nextTick(() => {
         this.loading = true;
@@ -1061,13 +1093,13 @@ CH:${_CH}
           userId: this.userId,
           file_ids: this.fileId ? [this.fileId] : [],
           model: "gpt-4o-2024-11-20",
-          sound_url:"",
-          temperature:0.2,
-          top_p:1,
-          max_completion_tokens:4096,
-          stream:false,
-          uid:uuidv4()
-					// model: "gpt-4o-mini"
+          sound_url: "",
+          temperature: 0.2,
+          top_p: 1,
+          max_completion_tokens: 4096,
+          stream: false,
+          uid: uuidv4()
+          // model: "gpt-4o-mini"
         };
 
         // 👇
@@ -1129,11 +1161,11 @@ CH:${_CH}
                 _copyData.jsonData
               );
             }
-            this.changeShowIndex(1,false);
+            this.changeShowIndex(1);
             this.loading = false;
-						this.$nextTick(()=>{
-							this.editEcharts(true);
-						})
+            this.$nextTick(() => {
+              this.editEcharts(true);
+            });
           })
           .catch(err => {
             this.loadNum = 2;
@@ -1177,8 +1209,8 @@ CH:${_CH}
         resolve(_contentTableList);
       });
     },
-		moveDown(e) {
-			if(!this.isDrag)return;
+    moveDown(e) {
+      if (!this.isDrag) return;
       this.isDragging = true;
       this.startY = e.clientY;
       this.$nextTick(() => {
@@ -1187,15 +1219,23 @@ CH:${_CH}
             ...this.$parent.$parent.$refs[`analysis_${i.value}`][0].$refs
               .dragBoxRefTop
           );
-					if(this.$parent.$parent.$refs[`analysis_${i.value}`][0].$refs.dragBoxRefBottom.length>0){
-						this.dragBoxList.push(
-            ...this.$parent.$parent.$refs[`analysis_${i.value}`][0].$refs
+          if (
+            this.$parent.$parent.$refs[`analysis_${i.value}`][0].$refs
+              .dragBoxRefBottom.length > 0
+          ) {
+            this.dragBoxList.push(
+              ...this.$parent.$parent.$refs[`analysis_${i.value}`][0].$refs
+                .dragBoxRefBottom
+            );
+          } else if (
+            this.$parent.$parent.$refs[`analysis_${i.value}`][0].$refs
               .dragBoxRefBottom
-          );
-					}else if(this.$parent.$parent.$refs[`analysis_${i.value}`][0].$refs.dragBoxRefBottom){
-						this.dragBoxList.push(this.$parent.$parent.$refs[`analysis_${i.value}`][0].$refs.dragBoxRefBottom);
-					}
-
+          ) {
+            this.dragBoxList.push(
+              this.$parent.$parent.$refs[`analysis_${i.value}`][0].$refs
+                .dragBoxRefBottom
+            );
+          }
         });
         // 禁用页面文本选择
         document.body.style.userSelect = "none";
@@ -1259,18 +1299,21 @@ CH:${_CH}
         if (!this.enterDrag) {
           this.moveTop = 0;
         } else {
-					this.moveTop = 0;
-					let moveData = this.enterDrag.getAttribute('type');
-					this.$emit("moveAnalysis",{form:`${this.data.Type}_${this.index}_${this.data.tIndex}`,to:moveData})
+          this.moveTop = 0;
+          let moveData = this.enterDrag.getAttribute("type");
+          this.$emit("moveAnalysis", {
+            form: `${this.data.Type}_${this.index}_${this.data.tIndex}`,
+            to: moveData
+          });
         }
         // 移除全局的鼠标移动和释放事件
         document.removeEventListener("mousemove", this.onMouseMove);
         document.removeEventListener("mouseup", this.stopDragging);
       } catch (error) {
-				this.moveTop = 0;
-				document.removeEventListener("mousemove", this.onMouseMove);
+        this.moveTop = 0;
+        document.removeEventListener("mousemove", this.onMouseMove);
         document.removeEventListener("mouseup", this.stopDragging);
-			}
+      }
     }
   },
   mounted() {
@@ -1294,7 +1337,7 @@ CH:${_CH}
   border: 1px solid #e7e7e7;
   border-radius: 4px;
   transition: 0.3s;
-	position: relative;
+  position: relative;
 }
 
 .analysisItem:hover {

+ 5 - 3
src/components/pages/classroomObservation/components/resourceLibraryDialog.vue

@@ -4,7 +4,7 @@
 			<div style="width: 100%;height: 100%;">
 					<fileBox type="2" ref="fileBoxRef" @addFile="addFile"></fileBox>
 			</div>
-	</el-dialog>    
+	</el-dialog>
 </template>
 
 <script>
@@ -38,7 +38,9 @@ export default {
 	methods: {
 		open(){
 			this.show = true;
-			this.$refs.fileBoxRef.getData();
+			this.$nextTick(()=>{
+        this.$refs.fileBoxRef.getData();
+      })
 		},
 		handleClose(done) {
 			this.close();
@@ -55,7 +57,7 @@ export default {
 					this.close();
 			}
 
-	}   
+	}
 };
 </script>
 

+ 46 - 14
src/components/pages/classroomObservation/dialog/batchCreationClassDialog.vue

@@ -507,7 +507,22 @@ export default {
     //修改课堂的baseMessage
     editBaseMessageSuccess({ editId, message }) {
       if (editId) {
+        let _editorBarData = null
+        let _transcriptionData = null;
+        if(this.dataList.find(i=>i.id===editId).jsonData.baseMessage.editorBarData){
+          _editorBarData = this.dataList.find(i=>i.id===editId).jsonData.baseMessage.editorBarData;
+        }
+
+        if(this.dataList.find(i=>i.id===editId).jsonData.baseMessage.transcriptionData){
+          _transcriptionData = this.dataList.find(i=>i.id===editId).jsonData.baseMessage.transcriptionData;
+        }
         this.dataList.find(i => i.id === editId).jsonData.baseMessage = message;
+        if(_editorBarData){
+          this.dataList.find(i=>i.id===editId).jsonData.baseMessage.editorBarData = _editorBarData;
+        }
+        if(_transcriptionData){
+          this.dataList.find(i=>i.id===editId).jsonData.baseMessage.transcriptionData = _transcriptionData;
+        }
         this.$forceUpdate();
         this.$refs.editBaseMessageDialogRef.close();
         this.updateTask(editId);
@@ -751,7 +766,7 @@ export default {
           //按顺序处理任务
           let _step = _stepList[i];
           console.log(_step);
-          if(!nowDoTaskId.includes(_startData.id))break;
+          if(!this.nowDoTaskId.includes(_startData.id))break;
           if (_step.status === "1") continue;
           if (_step.type === "uploadFile") continue;
           if (_step.type === "getVideoVoice") {
@@ -762,7 +777,7 @@ export default {
             ).jsonData.steps = _stepList;
             let _fileData = _startData.jsonData.fileData;
             let audioFile = await this.getVideoToVoiceAndUploadMixin(_fileData);
-            if(!nowDoTaskId.includes(_startData.id))break;
+            if(!this.nowDoTaskId.includes(_startData.id))break;
             _startData.jsonData.fileData.videoUrl = _fileData.url;
             _startData.jsonData.fileData.fileObj = audioFile.fileObj;
             _startData.jsonData.fileData.url = audioFile.audioUrl.Location;
@@ -796,7 +811,7 @@ export default {
                 i => i.id === _startData.id
               ).jsonData.steps = _stepList;
               let { editorBarData } = await this.getTextContentMixin(fileData);
-              if(!nowDoTaskId.includes(_startData.id))break;
+              if(!this.nowDoTaskId.includes(_startData.id))break;
               this.dataList.find(
                 i => i.id === _startData.id
               ).jsonData.baseMessage.editorBarData = editorBarData;
@@ -896,7 +911,7 @@ export default {
               }
 
               let { editorBarData} = await this.automaticCodingMixin({ tableList: _tableList});
-              if(!nowDoTaskId.includes(_startData.id))break;
+              if(!this.nowDoTaskId.includes(_startData.id))break;
 
               _stepList[i].status = "1";
 
@@ -936,7 +951,7 @@ export default {
             ).jsonData.steps = _stepList;
             let _fileData = _startData.jsonData.baseMessage.editorBarData;
             let { fileId } = await this.getFileIdMixin(_fileData.url);
-            if(!nowDoTaskId.includes(_startData.id))break;
+            if(!this.nowDoTaskId.includes(_startData.id))break;
             this.dataList.find(
               i => i.id === _startData.id
             ).jsonData.file_ids = fileId;
@@ -1010,6 +1025,7 @@ export default {
                     assistantData: _assistantData,
                     baseMessage: _startData.jsonData.baseMessage
                   });
+                  if(!this.nowDoTaskId.includes(_startData.id))return resolve();
                   if (data.data == 1) {
                     if (_num < _maxNum) {
                       //重试
@@ -1028,7 +1044,7 @@ export default {
 
             await Promise.all(promises).then(() => {
               console.log(`${_startData.id}:已完成分析获取`);
-              if(!nowDoTaskId.includes(_startData.id))return;
+              if(!this.nowDoTaskId.includes(_startData.id))return;
               console.log("data👉",JSON.parse(JSON.stringify(_startData)))
               console.log(_startData.jsonData.analysisList);
               _stepList[i].status = "1";
@@ -1046,7 +1062,7 @@ export default {
                 )
               );
             });
-            if(!nowDoTaskId.includes(_startData.id))break;
+            if(!this.nowDoTaskId.includes(_startData.id))break;
           } else if (_step.type === "createClass") {
             //创建课堂
             _stepList[i].status = "2";
@@ -1057,7 +1073,7 @@ export default {
             //创建课堂   赋值好fileid   替换创建后课堂的基础数据  继续下一个任务
             let newOption = await this.createClassMixin(_startData.jsonData);
 
-            if(!nowDoTaskId.includes(_startData.id))break;
+            if(!this.nowDoTaskId.includes(_startData.id))break;
 
             this.$emit("addNewCourseOption", newOption.data);
             this.dataList.find(i => i.id === _startData.id).jsonData.createId =
@@ -1099,17 +1115,33 @@ export default {
     },
     //停止任务
     stopTask(id) {
-      let _waitTask = this.dataList.find(i => i.status === "0");
-      if (_waitTask) {
-        //停止这个任务,
+      let stopTask = this.dataList.find(i=>i.id===id);
+      if(stopTask.status==='0'){
+        this.dataList.find(i => i.id === id).status = "3";
+      }if(stopTask.status==='1'){
         this.dataList.find(i => i.id === id).status = "3";
         this.nowDoTaskId = this.nowDoTaskId.filter(i=>i!==id);
+      }
+
+      console.log(stopTask)
+
+      let _waitTask = this.dataList.find(i => i.status === "0");
+      console.log(_waitTask)
+      if(_waitTask){
         // 开始另一个任务
         this.startTask(_waitTask.id);
-      } else {
-        //只停止这个任务
-        this.dataList.find(i => i.id === id).status = "3";
       }
+      // let _waitTask = this.dataList.find(i => i.status === "0" && i.id===id);
+      // if (_waitTask) {
+      //   //停止这个任务,
+      //   this.dataList.find(i => i.id === id).status = "3";
+      //   this.nowDoTaskId = this.nowDoTaskId.filter(i=>i!==id);
+      //   // 开始另一个任务
+      //   this.startTask(_waitTask.id);
+      // } else {
+      //   //只停止这个任务
+      //   this.dataList.find(i => i.id === id).status = "3";
+      // }
     },
     goToEdit(id){
       let _data = this.dataList.find(i=>i.id===id);

+ 36 - 28
src/components/pages/classroomObservation/dialog/editBaseMessageDialog.vue

@@ -211,7 +211,7 @@
   					>
 						<div class="m_m_box">
 							<el-button-group style="width: 100%;display: flex;justify-content: center;">
-							  <el-button size="small" @click="localUploadVideo()">本地上传</el-button>
+							  <el-button size="small" @click="addVideo()">本地上传</el-button>
 								<el-button size="small" @click="resourceUploadVideo()">资源库上传</el-button>
 							</el-button-group>
 						</div>
@@ -340,6 +340,7 @@ export default {
 		return {
 			loading: false,
 			show: false,
+      userId: this.$route.query["userid"],
       uploadVideoLoading:false,
       uploadImageLoading:false,
       uploadNephogramLoading:false,
@@ -458,11 +459,29 @@ export default {
     },
     //资源库上传
     resourceUploadVideo(){
-      this.$message.info("资源库上传")
+      this.$refs.resourceLibraryDialogRef.open();
     },
     //添加视频
     addVideo(){
-      this.$message.info("添加视频")
+      let input = document.createElement("input");
+			input.type = "file";
+			input.accept = "video/*";
+			input.click();
+			input.onchange = () => {
+				this.progressData.uploadVideo = true;
+				// this.uploadVideoLoading = true;
+				this.progressData.stop = false;
+				this.progressData.status = "";
+				this.progressData.value = 0;
+				let file = input.files[0];
+				this.uploadFileObj = file;
+				this.$nextTick(()=>{
+					this.$refs.uploadFileRef.awsupload({
+					file:file,
+					folderName:this.editId
+				})
+				})
+			}
     },
     //删除词云图
     delNephogram(){
@@ -493,17 +512,13 @@ export default {
 			}
       console.log(_file)
       this.$message.info("上传文件")
-			// this.$emit('saveVideo',{
-			// 		name: _file.name,
-			// 		status: "success",
-			// 		uid: _file.id,
-			// 		url: _file.file,
-			// })
-			// this.$message.success("上传成功")
-
-			// this.$confirm("是否提取视频音频并上传?","提示").then(()=>{
-			// 	this.getVideoVoice({url:_file.file});
-			// })
+      this.data.imageList.videoList = [{
+        name: _file.name,
+				status: "success",
+				uid: _file.id,
+				url: _file.file,
+      }]
+			this.$message.success("上传成功")
     },
     videoProgressUpdate(data){
 			if(data.status=="processing"){
@@ -550,20 +565,13 @@ export default {
 			let {data} = res;
 			this.$refs.uploadFileRef.file = null;
       console.log(data)
-			// this.$emit('saveVideo',{
-			// 		name: data.Key,
-			// 		status: "success",
-			// 		uid: "qgt",
-			// 		url: data.Location,
-			// })
-			// this.$message.success("上传成功");
-			// // this.uploadFileObj = null;
-			// this.$confirm("是否提取视频音频并上传?","提示").then(()=>{
-			// 	this.getVideoVoice({file:this.uploadFileObj});
-			// 	this.uploadFileObj = null;
-			// }).catch(err=>{
-			// 	this.uploadFileObj = null;
-			// })
+      this.data.imageList.videoList = [{
+        name: data.Key,
+					status: "success",
+					uid: this.userId,
+					url: data.Location,
+      }]
+      this.$message.success("上传成功");
 		},
     //上传课堂图片
     addImage2(){

この差分においてかなりの量のファイルが変更されているため、一部のファイルを表示していません