11wqe1 пре 5 месеци
родитељ
комит
c85e1c9e54

+ 104 - 9
src/components/components/choseWorksDetailDialog.vue

@@ -300,14 +300,11 @@
                 </div>
                 <!-- 文档 1 -->
                 <div v-if="[52].includes(toolType)" class="s_b_m_b_i_m_evaluation">
-                  <!-- <div v-if="testData && testData.wordJson && testData.wordJson.text"> -->
-                    <!-- <div v-html="testData.wordJson.text"></div> -->
                     <editor-bar
                       v-model="questionsData"
                     ></editor-bar>
-
-                  <!-- </div> -->
                 </div>
+
                 <div v-if="[4].includes(toolType)" class="s_b_m_b_i_m_evaluation">
 
 
@@ -462,6 +459,44 @@
     								></iframe>
                   </div>
                 </div>
+
+                <!-- 英语写作  -->
+                <div v-if="[69].includes(toolType)" class="s_b_m_b_i_m_evaluation">
+                  <onlineWrite
+                    :englishList="englishList"
+                    :myAnswerList1="myAnswerList1"
+                    ref="engJson"
+                  ></onlineWrite>
+                  <div style="width: 100%;display: flex;justify-content: flex-end;">
+                    <el-button type="primary" @click="addEnglishWork">确 定</el-button>
+                  </div>
+                </div>
+                <!-- 英语写作  -->
+                <div v-if="[70].includes(toolType)" class="s_b_m_b_i_m_evaluation">
+                  <!-- <EnglishVoice :EnglishVoiceDialog.sync='EnglishVoiceDialog'
+                    :englishVoiceJson='englishVoiceJson'
+                    :userid="userid"
+                    :id="id"
+                    :courseType="courseType"
+                    :taskCount="taskCount"
+                    :toolindex="toolindex"
+                    @selectSWorks="selectSWorks"
+                    @selectStudent="selectStudent"
+                    :englishVoiceJsonWork="englishVoiceJsonWork"></EnglishVoice>
+                    <checkEnglishVoice :englishVoiceJson='englishVoiceJson'
+                    :userid="userid"
+                    :dialogVisibleENScore.sync='dialogVisibleENScore'
+                    :commentDetail="commentDetail"
+                    :courseDetail="courseDetail"
+                    :wScore="wScore"
+                    :scoreDetail="scoreDetail"
+                    @selectSWorks="selectSWorks"
+                    @selectStudent="selectStudent"></checkEnglishVoice> -->
+                </div>
+
+
+
+
                 <!-- 学生分组 -->
                 <div v-if="[49].includes(toolType)" class="s_b_m_b_i_m_evaluation">
                   <div v-if="courseDetail.userid == userId" class="g_d_btnBox">
@@ -848,6 +883,9 @@ import eChartsView from './eChartsView.vue'
 import choseWordCloud from './choseWordCloud.vue'
 import studentWorkPreviewDialog from './studentWorkPreviewDialog.vue';
 import EditorBar from "../tools/wangEnduit.vue";
+
+import onlineWrite from "./onlineWrite";
+
 // import html2canvas from "html2canvas";
 
 export default {
@@ -856,7 +894,8 @@ export default {
 		eChartsView2:eChartsView,
     choseWordCloud,
     studentWorkPreviewDialog,
-    EditorBar
+    EditorBar,
+    onlineWrite
 	},
   props: {
     worksStudentData: {
@@ -910,6 +949,8 @@ export default {
       AIUrl:'',
       show: false,
       showType: 0,
+      myAnswerList1:{}, //英语写作
+      englishList:{},//英语写作
       userId: this.$route.query.userid,
       courseId:this.$route.query.courseId,
       id: this.$route.query.courseId,
@@ -930,7 +971,7 @@ export default {
         worksPreview: false
       },
       dialogTypeList: [
-        { label: "作业详细", value: 0,showType:[1,7,15,40,41,45,47,48,49,52,3,4,57,18,21,71], loading: false },
+        { label: "作业详细", value: 0,showType:[1,7,15,40,41,45,47,48,49,52,3,4,57,18,21,71,69], loading: false },
         { label: "题目统计", value: 1,showType:[45,15], loading: false },
         { label: "学生统计", value: 2,showType:[1,7,15,40,41,45,47,48,52,3,4,57], loading: false }
       ],
@@ -938,6 +979,7 @@ export default {
 				{label:"选择题",value:45,img:require("../../assets/icon/thirdToolList/choose.png")},
 				{label:"训练平台",value:18,img:require("../../assets/icon/thirdToolList/trainPlatform.png")},
 				{label:"AIoT Blockly",value:21,img:require("../../assets/icon/fourthToolList/program.png")},
+				{label:"英语写作",value:69,img:require("../../assets/icon/secondToolList/english.png")},
 				{label:"AI智能体",value:71,img:require("../../assets/icon/fourthToolList/chatgpt.png")},
 				{label:"CocoPi",value:57,img:require("../../assets/icon/fourthToolList/cocopi.png")},
 				{label:"问卷调查",value:4,img:require("../../assets/icon/thirdToolList/ask.png")},
@@ -1280,6 +1322,44 @@ export default {
     }
   },
   methods: {
+    // 提交英语写作作业
+    addEnglishWork() {
+      let myAnList ={}
+      myAnList = this.$refs['engJson'].myAnswerList;
+      if (!myAnList.engTitle || !myAnList.engText || myAnList.engTitle == "" || myAnList.engText == "") {
+        this.$message.error("请输入作文标题和正文!");
+        return;
+      }
+      let params = [
+        {
+          uid: this.userId,
+          cid: this.id,
+          stage: this.courseType,
+          task: this.taskCount,
+          tool: this.toolIndex,
+          content: JSON.stringify(myAnList),
+          type: 16,
+          atool: 69,
+          text: "",
+        },
+      ];
+      //  console.log('params',params);
+      
+      this.ajax
+        .post(this.$store.state.api + "addCourseWorks5", params)
+        .then((res) => {
+          this.$message({
+            message: "提交成功",
+            type: "success",
+          });
+          
+          this.englishList = {};
+        })
+        .catch((err) => {
+          this.$message.error("提交失败");
+          console.error(err);
+        });
+    },
     lockChair(){
       let a =  this.islock ? true : false
       
@@ -1690,9 +1770,6 @@ export default {
               JSON.stringify(this.worksStudentData[this.toolIndex])
             );
           }
-
-        // }
-       
       
         
         this.noWorksStudent = JSON.parse(
@@ -1759,6 +1836,24 @@ export default {
                 this.radioS.push('')
               }
             })
+          } else if (this.toolType == 69) {
+            console.log('this.testJsonCopy',this.testJsonCopy);
+            
+
+            // if (this.testJsonCopy.length) {
+            //     this.myAnswerList1 = JSON.parse(this.testJsonCopy[0].works)
+            // } else {
+                this.myAnswerList1 = {engTitle: "",engText: "",imgList: [],};
+            // }
+
+            console.log('this.testData',this.testData);
+            
+
+
+            this.englishList = this.testData.englishList
+              ? this.testData.englishList
+              : {};
+
           }
       }
     },

+ 4 - 0
src/components/easy2/studyStudent.vue

@@ -1493,6 +1493,10 @@
                               alt
                             />
                             <div style="margin: 5px 0">英语写作</div>
+                            <div class="upload_toolBtn"  @click="openChoseWorksDetailDialog(tooC,toolIndex,taskCount,69)"
+                            style="position: absolute;right: 33px;top: -30px;">
+                              投影
+                            </div>
                           </div>
                           <div v-if="tooC == 70">
                             <img

+ 4 - 0
src/components/easy3/studyStudent.vue

@@ -1426,6 +1426,10 @@
                               alt
                             />
                             <div style="margin: 5px 0">英语写作</div>
+                            <div class="upload_toolBtn"  @click="openChoseWorksDetailDialog(tooC,toolIndex,taskCount,69)"
+                            style="position: absolute;right: 33px;top: -30px;">
+                              投影
+                            </div>
                           </div>
                           <div v-if="tooC == 70">
                             <img

+ 4 - 0
src/components/studyStudent.vue

@@ -1388,6 +1388,10 @@
                               alt
                             />
                             <div style="margin: 5px 0">英语写作</div>
+                            <div class="upload_toolBtn"  @click="openChoseWorksDetailDialog(tooC,toolIndex,taskCount,69)"
+                            style="position: absolute;right: 33px;top: -30px;">
+                              投影
+                            </div>
                           </div>
                           <div v-if="tooC == 70">
                             <img

+ 4 - 0
src/components/studySutdentClass/studyStudent.vue

@@ -1446,6 +1446,10 @@
                               alt
                             />
                             <div style="margin: 5px 0">英语写作</div>
+                            <div class="upload_toolBtn"  @click="openChoseWorksDetailDialog(tooC,toolIndex,taskCount,69)"
+                            style="position: absolute;right: 33px;top: -30px;">
+                              投影
+                            </div>
                           </div>
                           <div v-if="tooC == 70">
                             <img