Преглед изворни кода

Merge branches 'beta' and 'beta' of https://git.cocorobo.cn/CocoRoboLabs/pbl-teacher-table into beta

SanHQin пре 6 часа
родитељ
комит
52903fae94

+ 25 - 9
src/components/pages/pptEasy/addCourse3.vue

@@ -2890,7 +2890,9 @@ export default {
     },
     selectAppSuccess({ data, type }) {
       let _data = { id: new Date().getTime(), tool: 72, title: data.name, brief: data.detail, json: data, icon: data.json.icon, url: data.url }
-      if (this.editId) {
+      if(this.editId === 111){
+        this.pptCourseJson.toolsList.push(_data);
+      } if (this.editId) {
         let oldData = this.pptCourseJson.toolsList.find(i => i.id === this.editId);
         _data.id = oldData.id;
         this.pptCourseJson.toolsList.splice(this.pptCourseJson.toolsList.findIndex(i => i.id === this.editId), 1, _data);
@@ -2904,7 +2906,9 @@ export default {
     selectAppSuccess2({ data, type }) {
       for (let i = 0; i < data.length; i++) {
         let _data = { id: new Date().getTime(), tool: 72, title: data[i].name, brief: data[i].detail, json: data[i], icon: data[i].json.icon, url: data[i].url }
-        if (this.editId) {
+        if(this.editId === 111){
+          this.pptCourseJson.toolsList.push(_data);
+        } if (this.editId) {
           let oldData = this.pptCourseJson.toolsList.find(i => i.id === this.editId);
           _data.id = oldData.id;
           this.pptCourseJson.toolsList.splice(this.pptCourseJson.toolsList.findIndex(i => i.id === this.editId), 1, _data);
@@ -3043,7 +3047,9 @@ export default {
       testJson.testCount = testJson.testJson.length;
 
       let _data = { id: new Date().getTime(), tool: 45, title: this.lang.ssChoice, brief: this.lang.ssChoiceTool2, json: testJson, url: "" }
-      if (this.editId) {
+      if(this.editId === 111){
+        this.pptCourseJson.toolsList.push(_data);
+      } if (this.editId) {
         let oldData = this.pptCourseJson.toolsList.find(i => i.id === this.editId);
         _data.id = oldData.id;
         _data.title = oldData.title;
@@ -3082,7 +3088,9 @@ export default {
       testJson.testCount = testJson.testJson.length;
 
       let _data = { id: new Date().getTime(), tool: 78, title: this.lang.ssChoice, brief: this.lang.ssChoiceTool2, json: testJson, url: "" }
-      if (this.editId) {
+      if(this.editId === 111){
+        this.pptCourseJson.toolsList.push(_data);
+      } if (this.editId) {
         let oldData = this.pptCourseJson.toolsList.find(i => i.id === this.editId);
         _data.id = oldData.id;
         _data.title = oldData.title;
@@ -3339,7 +3347,9 @@ export default {
       //   return;
       // }
       let _data = { id: new Date().getTime(), tool: 15, title: this.lang.ssQAQuestion, brief: this.lang.ssQAQuestionTool, json: { answerQ: this.answerQ }, url: "" }
-      if (this.editId) {
+      if(this.editId === 111){
+        this.pptCourseJson.toolsList.push(_data);
+      } if (this.editId) {
         let oldData = this.pptCourseJson.toolsList.find(i => i.id === this.editId);
         _data.id = oldData.id;
         _data.title = oldData.title;
@@ -3370,7 +3380,9 @@ export default {
       //   return;
       // }
       let _data = { id: new Date().getTime(), tool: 79, title: this.lang.ssPhoto, brief: this.lang.ssPhotoTool, json: { answerQ: this.answerQ, fileList: [] }, url: "" }
-      if (this.editId) {
+      if(this.editId === 111){
+        this.pptCourseJson.toolsList.push(_data);
+      } if (this.editId) {
         let oldData = this.pptCourseJson.toolsList.find(i => i.id === this.editId);
         _data.id = oldData.id;
         _data.title = oldData.title;
@@ -3401,7 +3413,9 @@ export default {
       //   return;
       // }
       let _data = { id: new Date().getTime(), tool: 84, title: this.lang.ssFile, brief: this.lang.ssFileTool, json: { answerQ: this.answerQ, fileList: [] }, url: "" }
-      if (this.editId) {
+      if(this.editId === 111){
+        this.pptCourseJson.toolsList.push(_data);
+      } if (this.editId) {
         let oldData = this.pptCourseJson.toolsList.find(i => i.id === this.editId);
         _data.id = oldData.id;
         _data.title = oldData.title;
@@ -3481,7 +3495,7 @@ export default {
     },
     toolBtn2(type, id, tool){
       let _data = this.pptCourseJson.toolsList.find(i => i.id === id || i.url === id);
-      this.editId = _data ? _data.id : 1;
+      this.editId = _data ? _data.id : 111;
       if (tool == 45) {
         this.testJsonName = "";
         this.testJsonBrief = "";
@@ -3703,7 +3717,9 @@ export default {
       }
 
       let _data = { id: new Date().getTime(), tool: 73, title: this.lineTitle, brief: this.lang.ssH5Page, json: { lineTitle: this.lineTitle, line: this.line }, url: this.line }
-      if (this.editId) {
+      if(this.editId === 111){
+        this.pptCourseJson.toolsList.push(_data);
+      } if (this.editId) {
         let oldData = this.pptCourseJson.toolsList.find(i => i.id === this.editId);
         _data.id = oldData.id;
         _data.brief = oldData.brief;

+ 7 - 2
src/components/pages/workPage/components/setQuestionsAndAnswers.vue

@@ -70,7 +70,7 @@
             <span>{{ chatLoading ? lang.ssGenerating : lang.ssAIGenerate }}</span>
           </div>
         </div>
-        <el-input type="textarea" rows="3" resize="none" v-model="jsonData.evaluationCriteria" :placeholder="lang.ssEnterEvaluationStandard"
+        <el-input class="explain_textarea" type="textarea" rows="10" resize="none" v-model="jsonData.evaluationCriteria" :placeholder="lang.ssEnterEvaluationStandard"
           @input="setTestJson()" v-loading="messagesloading" :disabled="chatLoading"></el-input>
       </div>
     </div>
@@ -186,6 +186,7 @@ export default {
           this.jsonData.evaluationCriteria = event.data
           this.messagesloading = false
           this.chatLoading = false
+          this.setTestJson()
         }else if (event.type === 'error') {
           this.chatLoading = false
           this.messagesloading = false
@@ -466,7 +467,7 @@ export default {
 
 .e_header>span {
   color: #6b7280;
-  font-size: .8rem;
+  font-size: 1rem;
   font-weight: 500;
 }
 
@@ -489,6 +490,10 @@ export default {
   fill: #fff;
 }
 
+.explain_textarea {
+  font-size: 1.2rem;
+}
+
 .imageList {
   width: 100%;
   height: auto;