zengyicheng há 1 ano atrás
pai
commit
72792a4a93

+ 43 - 5
src/components/components/onlineWrite.vue

@@ -22,11 +22,11 @@
       </div>
     </div>
 
-    <div class="chooseUpload" @click="type = 1" v-if="type == 0 || type == 2">+在线编写</div>
+    <div class="chooseUpload" @click="type = 1" v-if="type == 0">+在线编写</div>
     <div
       class="chooseUpload"
-      @click="(type = 2), (uploadDialogVisible = true)"
-      v-if="type == 0 || type == 2"
+      @click="uploadDialogVisible = true"
+      v-if="type == 0"
     >
       +图片上传
     </div>
@@ -106,7 +106,7 @@
 
 <script>
 export default {
-  props: ["englishList"],
+  props: ["englishList", "myAnswerList1"],
   data() {
     return {
       type: 0,
@@ -119,6 +119,28 @@ export default {
       noneBtnImg: false,
     };
   },
+  watch: {
+    myAnswerList1: {
+      handler(newVal) {
+        if (
+          !this.myAnswerList1.engTitle &&
+          !this.myAnswerList1.engText &&
+          !this.myAnswerList1.imgList.length
+        ) {
+          this.myAnswerList = {
+            engTitle: "",
+            engText: "",
+            imgList: [],
+          };
+          this.type = 0;
+        } else {
+          this.myAnswerList = newVal;
+          this.type = 1;
+        }
+      },
+      deep: true,
+    },
+  },
   methods: {
     handleClose(done) {
       done();
@@ -230,7 +252,23 @@ export default {
       }
     },
   },
-  created() {},
+  mounted() {
+    if (
+      !this.myAnswerList1.engTitle &&
+      !this.myAnswerList1.engText &&
+      !this.myAnswerList1.imgList.length
+    ) {
+      this.myAnswerList = {
+        engTitle: "",
+        engText: "",
+        imgList: [],
+      };
+      this.type = 0;
+    } else {
+      this.myAnswerList = JSON.parse(JSON.stringify(this.myAnswerList1));
+      this.type = 1;
+    }
+  },
 };
 </script>
 

+ 43 - 5
src/components/easy2/commpont/onlineWrite.vue

@@ -22,11 +22,11 @@
       </div>
     </div>
 
-    <div class="chooseUpload" @click="type = 1" v-if="type == 0 || type == 2">+在线编写</div>
+    <div class="chooseUpload" @click="type = 1" v-if="type == 0">+在线编写</div>
     <div
       class="chooseUpload"
-      @click="(type = 2), (uploadDialogVisible = true)"
-      v-if="type == 0 || type == 2"
+      @click="uploadDialogVisible = true"
+      v-if="type == 0"
     >
       +图片上传
     </div>
@@ -106,7 +106,7 @@
 
 <script>
 export default {
-  props: ["englishList"],
+  props: ["englishList", "myAnswerList1"],
   data() {
     return {
       type: 0,
@@ -119,6 +119,28 @@ export default {
       noneBtnImg: false,
     };
   },
+  watch: {
+    myAnswerList1: {
+      handler(newVal) {
+        if (
+          !this.myAnswerList1.engTitle &&
+          !this.myAnswerList1.engText &&
+          !this.myAnswerList1.imgList.length
+        ) {
+          this.myAnswerList = {
+            engTitle: "",
+            engText: "",
+            imgList: [],
+          };
+          this.type = 0;
+        } else {
+          this.myAnswerList = newVal;
+          this.type = 1;
+        }
+      },
+      deep: true,
+    },
+  },
   methods: {
     handleClose(done) {
       done();
@@ -230,7 +252,23 @@ export default {
       }
     },
   },
-  created() {},
+  mounted() {
+    if (
+      !this.myAnswerList1.engTitle &&
+      !this.myAnswerList1.engText &&
+      !this.myAnswerList1.imgList.length
+    ) {
+      this.myAnswerList = {
+        engTitle: "",
+        engText: "",
+        imgList: [],
+      };
+      this.type = 0;
+    } else {
+      this.myAnswerList = JSON.parse(JSON.stringify(this.myAnswerList1));
+      this.type = 1;
+    }
+  },
 };
 </script>
 

+ 40 - 26
src/components/easy2/studyStudent.vue

@@ -11242,8 +11242,10 @@
       class="dialog_diy"
     >
       <onlineWrite
+        v-if="engDialogVisible"
         @setEnglish="setEnglishList"
         :englishList="englishList"
+        :myAnswerList1="myAnswerList1"
       ></onlineWrite>
       <span slot="footer" class="dialog-footer" style="text-align: center;">
         <el-button @click="engDialogVisible = false">取 消</el-button>
@@ -11303,12 +11305,12 @@
             </div>
           </div>
           <div class="oldBox" v-else-if="userMes[0].type == 1">
-            <div class="oldMes" style="background: rgb(224 236 255);display: flex;flex-direction: row;flex-wrap: nowrap;align-items: center;overflow-x: auto;overflow-y: hidden;" v-if="newEnglishList.length > 0">
+            <div class="oldMes" style="background: rgb(224 236 255);display: flex;flex-direction: row;flex-wrap: nowrap;align-items: center;overflow-x: auto;overflow-y: hidden;" v-if="newEnglishList1.length > 0">
               <div v-if="isNoUserid" class="allName" :style="{minWidth: `calc(100% / ${engListLength})`,background: newEngIndex == -1 ? '#aacaff' : ''}" @click="setEngText(-1)" style="background: #aacaff;">{{ userMes[0].username }}</div>
-              <div v-for="(item,index) in newEnglishList" :key="index" class="allName" :style="{minWidth: `calc(100% / ${engListLength})`,background: index == newEngIndex ? '#aacaff' : ''}" @click="setEngText(index)">{{ item.username }}</div>
+              <div v-for="(item,index) in newEnglishList1" :key="index" class="allName" :style="{minWidth: `calc(100% / ${engListLength})`,background: index == newEngIndex ? '#aacaff' : ''}" @click="setEngText(index)">{{ item.username }}</div>
             </div>
             <div class="oldMes" style="background: #aacaff;" v-else>{{ userMes[0].username }}</div>
-            <div class="oldText" v-if="newEngIndex == -1 && isNoUserid == true">
+            <div class="oldText" v-if="newEngIndex == -1 && isNoUserid == true && newEnglishList1.length">
               <div class="detailBox">
                 <div class="oldDetail">
                   <div>标题:</div>
@@ -11322,7 +11324,7 @@
                 </div>
               </div>
             </div>
-            <div class="oldText" v-else-if="newEngIndex == -1 && !newEnglishList.length">
+            <div class="oldText" v-else-if="newEngIndex == -1">
               <div class="detailBox">
                 <div class="oldDetail">
                   <div>标题:</div>
@@ -11336,19 +11338,19 @@
                 </div>
               </div>
             </div>
-            <div class="oldText" v-else-if="newEngIndex > -1 && newEnglishList.length > 0">
+            <div class="oldText" v-else-if="newEngIndex > -1 && newEnglishList1.length > 0">
               <div class="detailBox">
                 <div class="oldDetail">
                   <div>标题:</div>
-                  <div v-if="userMes[0].userid != newEnglishList[newEngIndex].correct" v-html="JSON.parse(newEnglishList[newEngIndex].cWork).engTitle"></div>
-                  <el-input v-else v-model="JSON.parse(newEnglishList[newEngIndex].cWork).engTitle" />
+                  <div v-if="userMes[0].userid != newEnglishList1[newEngIndex].correct" v-html="JSON.parse(newEnglishList1[newEngIndex].cWork).engTitle"></div>
+                  <el-input v-else v-model="JSON.parse(newEnglishList1[newEngIndex].cWork).engTitle" />
                 </div>
                 <div class="oldDetail">
                   <div>正文:</div>
-                  <div v-if="userMes[0].userid != newEnglishList[newEngIndex].correct" v-html="JSON.parse(newEnglishList[newEngIndex].cWork).engText"></div>
+                  <div v-if="userMes[0].userid != newEnglishList1[newEngIndex].correct" v-html="JSON.parse(newEnglishList1[newEngIndex].cWork).engText"></div>
                   <el-input v-else type="textarea"
                   :rows="10"
-                  resize="none" v-model="JSON.parse(newEnglishList[newEngIndex].cWork).engText" />
+                  resize="none" v-model="JSON.parse(newEnglishList1[newEngIndex].cWork).engText" />
                 </div>
               </div>
             </div>
@@ -11507,10 +11509,12 @@ export default {
         engTitle:"",
         engText:"",
       },
+      newEnglishList1:[],
       oldEnglishJson:{},
       oldEnglishJson1:{},
       englishList1:{},
       englishList:{},
+      myAnswerList1:{},
       topHeight:0,
       newEngIndex:-1,
       englishToolIndex:0,
@@ -16934,11 +16938,17 @@ export default {
         this.isAnswer = true;
         this.dialogVisibleChoice = true;
       }else if(t == 69){
+        this.oldEnglishJson1 = {}
+        this.oldEnglishJson = {}
+        this.englishList1 = {}
+        this.newEngIndex = -1;
+        this.isNoUserid = false;
         this.englishList1 = this.chapInfoList[this.courseType].chapterInfo[0].taskJson[index]
               .toolChoose[i].englishList;
         this.oldEnglishJson = z;
         this.engWid = id;
         this.newEnglishList = { engTitle:"",engText:"" }
+        this.newEnglishList1 = []
         this.selectEngC(id,z);
       }
       //  else if (t == 15) {
@@ -17253,11 +17263,24 @@ export default {
       } else if (t == 63) {
         window.parent.postMessage({ tools: "63" }, "*");
       } else if (t == 69) {
+        if (this.worksStudent[i].length) {
+          for (var k = 0; k < this.worksStudent[i].length; k++) {
+            if (this.userid == this.worksStudent[i][k].userid) {
+              this.myAnswerList1 = JSON.parse(this.worksStudent[i][k].works)
+              break;
+            } else {
+              this.myAnswerList1 = {engTitle: "",engText: "",imgList: [],};
+            }
+          }
+        } else {
+          this.myAnswerList1 = {engTitle: "",engText: "",imgList: [],};
+        }
         this.englishList = this.chapInfoList[this.courseType].chapterInfo[0]
           .taskJson[index].toolChoose[i].englishList
           ? this.chapInfoList[this.courseType].chapterInfo[0].taskJson[index]
               .toolChoose[i].englishList
           : {};
+        
         this.englishToolIndex = i;
         this.engDialogVisible = true;
       } else if (t == 65) {
@@ -18678,20 +18701,13 @@ export default {
             tool: this.toolindex,
             wid: this.engWid,
             c: this.userid,
-            w: (this.newEngIndex == -1 && this.isNoUserid == true) ? JSON.stringify(this.oldEnglishJson1) : JSON.stringify(this.newEnglishList),
+            w: (this.newEngIndex == -1 && this.isNoUserid == true && this.newEnglishList1.length) ? JSON.stringify(this.oldEnglishJson1) : JSON.stringify(this.newEnglishList),
           };
           this.ajax
             .get(this.$store.state.api + "addEngC", params)
             .then((res) => {
               this.$message.success("提交成功");
               this.engUpdateDialogVisible = false;
-              this.newEngIndex = -1;
-              this.isNoUserid = false;
-              if(this.newEngIndex == -1 && this.isNoUserid == true){
-                this.oldEnglishJson1 = {}
-              }else{
-                this.newEnglishList = { engTitle:"",engText:"" }
-              }
             })
             .catch((err) => {
               console.error(err);
@@ -18728,6 +18744,8 @@ export default {
                 this.isNoUserid = true;
                 var c = JSON.parse(JSON.stringify(z));
                 this.oldEnglishJson1 = c;
+              }else{
+                this.isNoUserid = false;
               }
               var b = a.sort((item, index) => {
                 if (item.correct === this.userMes[0].userid) {
@@ -18738,19 +18756,19 @@ export default {
                   return 0; // 保持默认顺序
                 }
               });
-              this.newEnglishList = b;
+              this.newEnglishList1 = b;
             }
           }
           this.engUpdateDialogVisible = true;
           this.$forceUpdate();
           setTimeout(() => {
             this.topHeight = document.querySelectorAll(".engUpTop")[0].offsetHeight;
-            if(this.newEnglishList.length > 0){
+            if(this.newEnglishList1.length > 0){
               if(this.isNoUserid == true){
-                this.engListLength = this.newEnglishList.length + 1;
+                this.engListLength = this.newEnglishList1.length + 1;
                 this.newEngIndex = -1;
               }else{
-                this.engListLength = this.newEnglishList.length;
+                this.engListLength = this.newEnglishList1.length;
                 this.newEngIndex = 0;
               }
             }
@@ -23191,21 +23209,17 @@ ol {
 
 .oldText{
   width: 100%;
-  height: calc(100% - 35px);
+  height: 100%;
   display: flex;
   flex-direction: column;
   flex-wrap: nowrap;
   align-content: center;
   justify-content: center;
   align-items: center;
-  padding-top: 35px;
-  box-sizing: border-box;
-  overflow: auto;
 }
 
 .detailBox{
   width: 50%;
-  height: 100%;
   padding: 10px;
   background: #f6f6f6;
   border-radius: 5px;

+ 43 - 7
src/components/easy3/commpont/onlineWrite.vue

@@ -22,13 +22,11 @@
       </div>
     </div>
 
-    <div class="chooseUpload" @click="type = 1" v-if="type == 0 || type == 2">
-      +在线编写
-    </div>
+    <div class="chooseUpload" @click="type = 1" v-if="type == 0">+在线编写</div>
     <div
       class="chooseUpload"
-      @click="(type = 2), (uploadDialogVisible = true)"
-      v-if="type == 0 || type == 2"
+      @click="uploadDialogVisible = true"
+      v-if="type == 0"
     >
       +图片上传
     </div>
@@ -108,7 +106,7 @@
 
 <script>
 export default {
-  props: ["englishList"],
+  props: ["englishList", "myAnswerList1"],
   data() {
     return {
       type: 0,
@@ -121,6 +119,28 @@ export default {
       noneBtnImg: false,
     };
   },
+  watch: {
+    myAnswerList1: {
+      handler(newVal) {
+        if (
+          !this.myAnswerList1.engTitle &&
+          !this.myAnswerList1.engText &&
+          !this.myAnswerList1.imgList.length
+        ) {
+          this.myAnswerList = {
+            engTitle: "",
+            engText: "",
+            imgList: [],
+          };
+          this.type = 0;
+        } else {
+          this.myAnswerList = newVal;
+          this.type = 1;
+        }
+      },
+      deep: true,
+    },
+  },
   methods: {
     handleClose(done) {
       done();
@@ -232,7 +252,23 @@ export default {
       }
     },
   },
-  created() {},
+  mounted() {
+    if (
+      !this.myAnswerList1.engTitle &&
+      !this.myAnswerList1.engText &&
+      !this.myAnswerList1.imgList.length
+    ) {
+      this.myAnswerList = {
+        engTitle: "",
+        engText: "",
+        imgList: [],
+      };
+      this.type = 0;
+    } else {
+      this.myAnswerList = JSON.parse(JSON.stringify(this.myAnswerList1));
+      this.type = 1;
+    }
+  },
 };
 </script>
 

+ 39 - 21
src/components/easy3/studyStudent.vue

@@ -11229,8 +11229,10 @@
       class="dialog_diy"
     >
       <onlineWrite
+        v-if="engDialogVisible"
         @setEnglish="setEnglishList"
         :englishList="englishList"
+        :myAnswerList1="myAnswerList1"
       ></onlineWrite>
       <span slot="footer" class="dialog-footer" style="text-align: center;">
         <el-button @click="engDialogVisible = false">取 消</el-button>
@@ -11290,12 +11292,12 @@
             </div>
           </div>
           <div class="oldBox" v-else-if="userMes[0].type == 1">
-            <div class="oldMes" style="background: rgb(224 236 255);display: flex;flex-direction: row;flex-wrap: nowrap;align-items: center;overflow-x: auto;overflow-y: hidden;" v-if="newEnglishList.length > 0">
+            <div class="oldMes" style="background: rgb(224 236 255);display: flex;flex-direction: row;flex-wrap: nowrap;align-items: center;overflow-x: auto;overflow-y: hidden;" v-if="newEnglishList1.length > 0">
               <div v-if="isNoUserid" class="allName" :style="{minWidth: `calc(100% / ${engListLength})`,background: newEngIndex == -1 ? '#aacaff' : ''}" @click="setEngText(-1)" style="background: #aacaff;">{{ userMes[0].username }}</div>
-              <div v-for="(item,index) in newEnglishList" :key="index" class="allName" :style="{minWidth: `calc(100% / ${engListLength})`,background: index == newEngIndex ? '#aacaff' : ''}" @click="setEngText(index)">{{ item.username }}</div>
+              <div v-for="(item,index) in newEnglishList1" :key="index" class="allName" :style="{minWidth: `calc(100% / ${engListLength})`,background: index == newEngIndex ? '#aacaff' : ''}" @click="setEngText(index)">{{ item.username }}</div>
             </div>
             <div class="oldMes" style="background: #aacaff;" v-else>{{ userMes[0].username }}</div>
-            <div class="oldText" v-if="newEngIndex == -1 && isNoUserid == true">
+            <div class="oldText" v-if="newEngIndex == -1 && isNoUserid == true && newEnglishList1.length">
               <div class="detailBox">
                 <div class="oldDetail">
                   <div>标题:</div>
@@ -11309,7 +11311,7 @@
                 </div>
               </div>
             </div>
-            <div class="oldText" v-else-if="newEngIndex == -1 && !newEnglishList.length">
+            <div class="oldText" v-else-if="newEngIndex == -1">
               <div class="detailBox">
                 <div class="oldDetail">
                   <div>标题:</div>
@@ -11323,19 +11325,19 @@
                 </div>
               </div>
             </div>
-            <div class="oldText" v-else-if="newEngIndex > -1 && newEnglishList.length > 0">
+            <div class="oldText" v-else-if="newEngIndex > -1 && newEnglishList1.length > 0">
               <div class="detailBox">
                 <div class="oldDetail">
                   <div>标题:</div>
-                  <div v-if="userMes[0].userid != newEnglishList[newEngIndex].correct" v-html="JSON.parse(newEnglishList[newEngIndex].cWork).engTitle"></div>
-                  <el-input v-else v-model="JSON.parse(newEnglishList[newEngIndex].cWork).engTitle" />
+                  <div v-if="userMes[0].userid != newEnglishList1[newEngIndex].correct" v-html="JSON.parse(newEnglishList1[newEngIndex].cWork).engTitle"></div>
+                  <el-input v-else v-model="JSON.parse(newEnglishList1[newEngIndex].cWork).engTitle" />
                 </div>
                 <div class="oldDetail">
                   <div>正文:</div>
-                  <div v-if="userMes[0].userid != newEnglishList[newEngIndex].correct" v-html="JSON.parse(newEnglishList[newEngIndex].cWork).engText"></div>
+                  <div v-if="userMes[0].userid != newEnglishList1[newEngIndex].correct" v-html="JSON.parse(newEnglishList1[newEngIndex].cWork).engText"></div>
                   <el-input v-else type="textarea"
                   :rows="10"
-                  resize="none" v-model="JSON.parse(newEnglishList[newEngIndex].cWork).engText" />
+                  resize="none" v-model="JSON.parse(newEnglishList1[newEngIndex].cWork).engText" />
                 </div>
               </div>
             </div>
@@ -11679,10 +11681,12 @@ export default {
         engTitle:"",
         engText:"",
       },
+      newEnglishList1:[],
       oldEnglishJson:{},
       oldEnglishJson1:{},
       englishList1:{},
       englishList:{},
+      myAnswerList1:{},
       topHeight:0,
       newEngIndex:-1,
       englishToolIndex:0,
@@ -16927,11 +16931,17 @@ export default {
         this.isAnswer = true;
         this.dialogVisibleChoice = true;
       }else if(t == 69){
+        this.oldEnglishJson1 = {}
+        this.oldEnglishJson = {}
+        this.englishList1 = {}
+        this.newEngIndex = -1;
+        this.isNoUserid = false;
         this.englishList1 = this.chapInfoList[this.courseType].chapterInfo[0].taskJson[index]
               .toolChoose[i].englishList;
         this.oldEnglishJson = z;
         this.engWid = id;
         this.newEnglishList = { engTitle:"",engText:"" }
+        this.newEnglishList1 = []
         this.selectEngC(id,z);
       }
       //  else if (t == 15) {
@@ -17246,11 +17256,24 @@ export default {
       } else if (t == 63) {
         window.parent.postMessage({ tools: "63" }, "*");
       } else if (t == 69) {
+        if (this.worksStudent[i].length) {
+          for (var k = 0; k < this.worksStudent[i].length; k++) {
+            if (this.userid == this.worksStudent[i][k].userid) {
+              this.myAnswerList1 = JSON.parse(this.worksStudent[i][k].works)
+              break;
+            } else {
+              this.myAnswerList1 = {engTitle: "",engText: "",imgList: [],};
+            }
+          }
+        } else {
+          this.myAnswerList1 = {engTitle: "",engText: "",imgList: [],};
+        }
         this.englishList = this.chapInfoList[this.courseType].chapterInfo[0]
           .taskJson[index].toolChoose[i].englishList
           ? this.chapInfoList[this.courseType].chapterInfo[0].taskJson[index]
               .toolChoose[i].englishList
           : {};
+        
         this.englishToolIndex = i;
         this.engDialogVisible = true;
       } else if (t == 65) {
@@ -18667,20 +18690,13 @@ export default {
             tool: this.toolindex,
             wid: this.engWid,
             c: this.userid,
-            w: (this.newEngIndex == -1 && this.isNoUserid == true) ? JSON.stringify(this.oldEnglishJson1) : JSON.stringify(this.newEnglishList),
+            w: (this.newEngIndex == -1 && this.isNoUserid == true && this.newEnglishList1.length) ? JSON.stringify(this.oldEnglishJson1) : JSON.stringify(this.newEnglishList),
           };
           this.ajax
             .get(this.$store.state.api + "addEngC", params)
             .then((res) => {
               this.$message.success("提交成功");
               this.engUpdateDialogVisible = false;
-              this.newEngIndex = -1;
-              this.isNoUserid = false;
-              if(this.newEngIndex == -1 && this.isNoUserid == true){
-                this.oldEnglishJson1 = {}
-              }else{
-                this.newEnglishList = { engTitle:"",engText:"" }
-              }
             })
             .catch((err) => {
               console.error(err);
@@ -18717,6 +18733,8 @@ export default {
                 this.isNoUserid = true;
                 var c = JSON.parse(JSON.stringify(z));
                 this.oldEnglishJson1 = c;
+              }else{
+                this.isNoUserid = false;
               }
               var b = a.sort((item, index) => {
                 if (item.correct === this.userMes[0].userid) {
@@ -18727,19 +18745,19 @@ export default {
                   return 0; // 保持默认顺序
                 }
               });
-              this.newEnglishList = b;
+              this.newEnglishList1 = b;
             }
           }
           this.engUpdateDialogVisible = true;
           this.$forceUpdate();
           setTimeout(() => {
             this.topHeight = document.querySelectorAll(".engUpTop")[0].offsetHeight;
-            if(this.newEnglishList.length > 0){
+            if(this.newEnglishList1.length > 0){
               if(this.isNoUserid == true){
-                this.engListLength = this.newEnglishList.length + 1;
+                this.engListLength = this.newEnglishList1.length + 1;
                 this.newEngIndex = -1;
               }else{
-                this.engListLength = this.newEnglishList.length;
+                this.engListLength = this.newEnglishList1.length;
                 this.newEngIndex = 0;
               }
             }

+ 39 - 21
src/components/studyStudent.vue

@@ -11212,8 +11212,10 @@
       class="dialog_diy"
     >
       <onlineWrite
+        v-if="engDialogVisible"
         @setEnglish="setEnglishList"
         :englishList="englishList"
+        :myAnswerList1="myAnswerList1"
       ></onlineWrite>
       <span slot="footer" class="dialog-footer">
         <el-button @click="engDialogVisible = false">取 消</el-button>
@@ -11273,12 +11275,12 @@
             </div>
           </div>
           <div class="oldBox" v-else-if="userMes[0].type == 1">
-            <div class="oldMes" style="background: rgb(224 236 255);display: flex;flex-direction: row;flex-wrap: nowrap;align-items: center;overflow-x: auto;overflow-y: hidden;" v-if="newEnglishList.length > 0">
+            <div class="oldMes" style="background: rgb(224 236 255);display: flex;flex-direction: row;flex-wrap: nowrap;align-items: center;overflow-x: auto;overflow-y: hidden;" v-if="newEnglishList1.length > 0">
               <div v-if="isNoUserid" class="allName" :style="{minWidth: `calc(100% / ${engListLength})`,background: newEngIndex == -1 ? '#aacaff' : ''}" @click="setEngText(-1)" style="background: #aacaff;">{{ userMes[0].username }}</div>
-              <div v-for="(item,index) in newEnglishList" :key="index" class="allName" :style="{minWidth: `calc(100% / ${engListLength})`,background: index == newEngIndex ? '#aacaff' : ''}" @click="setEngText(index)">{{ item.username }}</div>
+              <div v-for="(item,index) in newEnglishList1" :key="index" class="allName" :style="{minWidth: `calc(100% / ${engListLength})`,background: index == newEngIndex ? '#aacaff' : ''}" @click="setEngText(index)">{{ item.username }}</div>
             </div>
             <div class="oldMes" style="background: #aacaff;" v-else>{{ userMes[0].username }}</div>
-            <div class="oldText" v-if="newEngIndex == -1 && isNoUserid == true">
+            <div class="oldText" v-if="newEngIndex == -1 && isNoUserid == true && newEnglishList1.length">
               <div class="detailBox">
                 <div class="oldDetail">
                   <div>标题:</div>
@@ -11292,7 +11294,7 @@
                 </div>
               </div>
             </div>
-            <div class="oldText" v-else-if="newEngIndex == -1 && !newEnglishList.length">
+            <div class="oldText" v-else-if="newEngIndex == -1">
               <div class="detailBox">
                 <div class="oldDetail">
                   <div>标题:</div>
@@ -11306,19 +11308,19 @@
                 </div>
               </div>
             </div>
-            <div class="oldText" v-else-if="newEngIndex > -1 && newEnglishList.length > 0">
+            <div class="oldText" v-else-if="newEngIndex > -1 && newEnglishList1.length > 0">
               <div class="detailBox">
                 <div class="oldDetail">
                   <div>标题:</div>
-                  <div v-if="userMes[0].userid != newEnglishList[newEngIndex].correct" v-html="JSON.parse(newEnglishList[newEngIndex].cWork).engTitle"></div>
-                  <el-input v-else v-model="JSON.parse(newEnglishList[newEngIndex].cWork).engTitle" />
+                  <div v-if="userMes[0].userid != newEnglishList1[newEngIndex].correct" v-html="JSON.parse(newEnglishList1[newEngIndex].cWork).engTitle"></div>
+                  <el-input v-else v-model="JSON.parse(newEnglishList1[newEngIndex].cWork).engTitle" />
                 </div>
                 <div class="oldDetail">
                   <div>正文:</div>
-                  <div v-if="userMes[0].userid != newEnglishList[newEngIndex].correct" v-html="JSON.parse(newEnglishList[newEngIndex].cWork).engText"></div>
+                  <div v-if="userMes[0].userid != newEnglishList1[newEngIndex].correct" v-html="JSON.parse(newEnglishList1[newEngIndex].cWork).engText"></div>
                   <el-input v-else type="textarea"
                   :rows="10"
-                  resize="none" v-model="JSON.parse(newEnglishList[newEngIndex].cWork).engText" />
+                  resize="none" v-model="JSON.parse(newEnglishList1[newEngIndex].cWork).engText" />
                 </div>
               </div>
             </div>
@@ -11477,10 +11479,12 @@ export default {
         engTitle:"",
         engText:"",
       },
+      newEnglishList1:[],
       oldEnglishJson:{},
       oldEnglishJson1:{},
       englishList1:{},
       englishList:{},
+      myAnswerList1:{},
       topHeight:0,
       newEngIndex:-1,
       englishToolIndex:0,
@@ -16902,11 +16906,17 @@ export default {
         this.isAnswer = true;
         this.dialogVisibleChoice = true;
       }else if(t == 69){
+        this.oldEnglishJson1 = {}
+        this.oldEnglishJson = {}
+        this.englishList1 = {}
+        this.newEngIndex = -1;
+        this.isNoUserid = false;
         this.englishList1 = this.chapInfoList[this.courseType].chapterInfo[0].taskJson[index]
               .toolChoose[i].englishList;
         this.oldEnglishJson = z;
         this.engWid = id;
         this.newEnglishList = { engTitle:"",engText:"" }
+        this.newEnglishList1 = []
         this.selectEngC(id,z);
       }
       //  else if (t == 15) {
@@ -17221,11 +17231,24 @@ export default {
       } else if (t == 63) {
         window.parent.postMessage({ tools: "63" }, "*");
       } else if (t == 69) {
+        if (this.worksStudent[i].length) {
+          for (var k = 0; k < this.worksStudent[i].length; k++) {
+            if (this.userid == this.worksStudent[i][k].userid) {
+              this.myAnswerList1 = JSON.parse(this.worksStudent[i][k].works)
+              break;
+            } else {
+              this.myAnswerList1 = {engTitle: "",engText: "",imgList: [],};
+            }
+          }
+        } else {
+          this.myAnswerList1 = {engTitle: "",engText: "",imgList: [],};
+        }
         this.englishList = this.chapInfoList[this.courseType].chapterInfo[0]
           .taskJson[index].toolChoose[i].englishList
           ? this.chapInfoList[this.courseType].chapterInfo[0].taskJson[index]
               .toolChoose[i].englishList
           : {};
+        
         this.englishToolIndex = i;
         this.engDialogVisible = true;
       } else if (t == 65) {
@@ -18642,20 +18665,13 @@ export default {
             tool: this.toolindex,
             wid: this.engWid,
             c: this.userid,
-            w: (this.newEngIndex == -1 && this.isNoUserid == true) ? JSON.stringify(this.oldEnglishJson1) : JSON.stringify(this.newEnglishList),
+            w: (this.newEngIndex == -1 && this.isNoUserid == true && this.newEnglishList1.length) ? JSON.stringify(this.oldEnglishJson1) : JSON.stringify(this.newEnglishList),
           };
           this.ajax
             .get(this.$store.state.api + "addEngC", params)
             .then((res) => {
               this.$message.success("提交成功");
               this.engUpdateDialogVisible = false;
-              this.newEngIndex = -1;
-              this.isNoUserid = false;
-              if(this.newEngIndex == -1 && this.isNoUserid == true){
-                this.oldEnglishJson1 = {}
-              }else{
-                this.newEnglishList = { engTitle:"",engText:"" }
-              }
             })
             .catch((err) => {
               console.error(err);
@@ -18692,6 +18708,8 @@ export default {
                 this.isNoUserid = true;
                 var c = JSON.parse(JSON.stringify(z));
                 this.oldEnglishJson1 = c;
+              }else{
+                this.isNoUserid = false;
               }
               var b = a.sort((item, index) => {
                 if (item.correct === this.userMes[0].userid) {
@@ -18702,19 +18720,19 @@ export default {
                   return 0; // 保持默认顺序
                 }
               });
-              this.newEnglishList = b;
+              this.newEnglishList1 = b;
             }
           }
           this.engUpdateDialogVisible = true;
           this.$forceUpdate();
           setTimeout(() => {
             this.topHeight = document.querySelectorAll(".engUpTop")[0].offsetHeight;
-            if(this.newEnglishList.length > 0){
+            if(this.newEnglishList1.length > 0){
               if(this.isNoUserid == true){
-                this.engListLength = this.newEnglishList.length + 1;
+                this.engListLength = this.newEnglishList1.length + 1;
                 this.newEngIndex = -1;
               }else{
-                this.engListLength = this.newEnglishList.length;
+                this.engListLength = this.newEnglishList1.length;
                 this.newEngIndex = 0;
               }
             }