SanHQin 5 months ago
parent
commit
5710a69270

+ 1 - 1
src/components/classRoomHelper/component/countdown.vue

@@ -655,7 +655,7 @@ export default {
       choiceBehavior: [],
       memorandumList: [],
       memorandumLoading: false,
-      showBtnType: 0, //0:所有事件  1:计时事件
+      showBtnType: 1, //0:所有事件  1:计时事件
       exportLoading: false
     };
   },

+ 13 - 3
src/components/classRoomHelper/component/taskArea.vue

@@ -1243,7 +1243,7 @@ ${_textData}
             this.aiBoxLoading = false;
             this.showCard = 1;
             this.saveTaskList(1);
-            this.$message.success("一键出题成功");
+            // this.$message.success("一键出题成功");
           } else {
             this.$message.error("一键出题失败");
           }
@@ -1675,8 +1675,14 @@ ${taskText}
                   this.selectDefaultTaskList();
                 });
               } else {
-                this.showCard = 0;
+								this.showCard = 0;
                 this.aiBoxLoading = false;
+								if(['1'].includes(this.ttype)){
+									this.getTopic();
+								}else{
+									this.showCard = 0;
+                	this.aiBoxLoading = false;
+								}
               }
             });
           }
@@ -1812,7 +1818,7 @@ Instruction: Based on the context, follow "Format example", write content
 3. 请确保解析清晰、易懂,适合对应年级的学生理解。
 
 ##Format example
-{analyze:"题目解析内容",knowledgePoint:"分析考核的知识点"}
+{"analyze":"题目解析内容","knowledgePoint":"分析考核的知识点"}
 
 ##数据
 ${_choiceText}
@@ -1835,9 +1841,13 @@ ${_choiceText}
           .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", params)
           .then(res => {
             let _data = res.data.FunctionResponse.message;
+						// console.log(_data)
             _data = _data.replaceAll("```json", "").replaceAll("```", "");
+						// console.log(_data)
             const match = _data.match(/{[^}]*"analyze"[^}]*}/);
+						// console.log(match)
             let _result = JSON.parse(match[0]);
+						// console.log(_result)
             resolve({ ..._result, uuid: data.uuid });
           })
           .catch(e => {

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

@@ -23,7 +23,7 @@
         :openMegaphone="openMegaphone"
         ref="taskAreaRef"
         :fileId="fileId"
-        v-if="itemType == 2"
+        v-show="itemType == 2"
       />
       <countdown
         ref="countdownRef"