zengyicheng 1 year ago
parent
commit
4cc6c53bc4

BIN
src/assets/icon/secondToolList/english.png


+ 7 - 2
src/components/components/onlineWrite.vue

@@ -236,7 +236,7 @@ export default {
 
 <style scoped>
 .engBox {
-  width: 50%;
+  width: 90%;
   margin: 0 auto;
 }
 
@@ -245,10 +245,15 @@ export default {
   display: flex;
   flex-direction: row;
   flex-wrap: nowrap;
-  align-items: center;
+  align-items: flex-start;
   margin-bottom: 20px;
 }
 
+.engTitle > .div:first-child,
+.engText > div:first-child {
+  min-width: 75px;
+}
+
 .chooseUpload {
   width: 100%;
   height: 300px;

+ 7 - 2
src/components/easy2/commpont/onlineWrite.vue

@@ -236,7 +236,7 @@ export default {
 
 <style scoped>
 .engBox {
-  width: 50%;
+  width: 90%;
   margin: 0 auto;
 }
 
@@ -245,10 +245,15 @@ export default {
   display: flex;
   flex-direction: row;
   flex-wrap: nowrap;
-  align-items: center;
+  align-items: flex-start;
   margin-bottom: 20px;
 }
 
+.engTitle > .div:first-child,
+.engText > div:first-child {
+  min-width: 75px;
+}
+
 .chooseUpload {
   width: 100%;
   height: 300px;

+ 139 - 19
src/components/easy2/studyStudent.vue

@@ -11245,7 +11245,7 @@
         @setEnglish="setEnglishList"
         :englishList="englishList"
       ></onlineWrite>
-      <span slot="footer" class="dialog-footer">
+      <span slot="footer" class="dialog-footer" style="text-align: center;">
         <el-button @click="engDialogVisible = false">取 消</el-button>
         <el-button type="primary" @click="addEnglishWork">确 定</el-button>
       </span>
@@ -11259,16 +11259,17 @@
       class="dialog_diy fullStyle"
     >
       <div class="engUpBox">
-        <div class="engTitle">
-          <div>作文题目:</div>
-          <div>{{ englishList1.engTitle }}</div>
-        </div>
-        <div class="engText">
-          <div>作文题目:</div>
-          <div v-html="englishList1.englishText"></div>
+        <div class="engUpTop">
+          <div class="engTitle">
+            <div>作文题目:</div>
+            <div>{{ englishList1.engTitle }}</div>
+          </div>
+          <div class="engText">
+            <div>作文题目:</div>
+            <div v-html="englishList1.englishText"></div>
+          </div>
         </div>
-
-        <div class="correctBox">
+        <div class="correctBox" :style="{height: `calc(100% - ${topHeight}px)` }">
           <div class="oldBox">
             <div class="oldMes">原文( 作者:{{ noteName }} )</div>
             <div class="oldText">
@@ -11284,7 +11285,7 @@
               </div>
             </div>
           </div>
-          <div class="oldBox">
+          <div class="oldBox" v-if="userMes[0].type == 2">
             <div class="oldMes" style="background: #aacaff;">{{ userMes[0].username }}</div>
             <div class="oldText">
               <div class="detailBox">
@@ -11293,7 +11294,7 @@
                   <el-input v-model="newEnglishList.engTitle" />
                 </div>
                 <div class="oldDetail">
-                  <div>正文</div>
+                  <div>正文</div>
                   <el-input type="textarea"
                   :rows="10"
                   resize="none" v-model="newEnglishList.engText" />
@@ -11301,6 +11302,40 @@
               </div>
             </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;">
+              <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>
+            <div class="oldText" v-if="newEngIndex == -1">
+              <div class="detailBox">
+                <div class="oldDetail">
+                  <div>标题:</div>
+                  <el-input v-model="oldEnglishJson1.engTitle" />
+                </div>
+                <div class="oldDetail">
+                  <div>正文:</div>
+                  <el-input type="textarea"
+                  :rows="10"
+                  resize="none" v-model="oldEnglishJson1.engText" />
+                </div>
+              </div>
+            </div>
+            <div class="oldText" v-else-if="newEngIndex > -1 && newEnglishList.length > 0">
+              <div class="detailBox">
+                <div class="oldDetail">
+                  <div>标题:</div>
+                  <el-input v-model="JSON.parse(newEnglishList[newEngIndex].cWork).engTitle" />
+                </div>
+                <div class="oldDetail">
+                  <div>正文:</div>
+                  <el-input type="textarea"
+                  :rows="10"
+                  resize="none" v-model="JSON.parse(newEnglishList[newEngIndex].cWork).engText" />
+                </div>
+              </div>
+            </div>
+          </div>
         </div>
       </div>
       <span slot="footer" class="dialog-footer">
@@ -11448,13 +11483,20 @@ export default {
       dialogVisiblePickPeople: false,
       engDialogVisible: false,
       engUpdateDialogVisible:false,
+      isNoUserid:false,
+      engListLength:0,
       engWid:"",
       newEnglishList:{
         engTitle:"",
         engText:"",
       },
       oldEnglishJson:{},
+      oldEnglishJson1:{},
       englishList1:{},
+      englishList:{},
+      topHeight:0,
+      newEngIndex:-1,
+      englishToolIndex:0,
       userMes:{},
       englishToolIndex:0,
       worksSName: "",
@@ -11470,6 +11512,7 @@ export default {
       videoDetail: {},
       selectJson: {},
       englishList: {},
+      topHeight:0,
       eScore: { eBzText: "", eStar: [] },
       id: this.$route.query.courseId,
       userid: this.$route.query.userid,
@@ -18597,6 +18640,10 @@ export default {
           console.error(err);
         });
     },
+    setEngText(i){
+      this.newEngIndex = i;
+      this.$forceUpdate();
+    },
     addCorrect(){
       this.$confirm("你确定提交批改嘛?", "提示", {
         confirmButtonText: "确定",
@@ -18606,15 +18653,21 @@ export default {
       })
         .then(() => {
           let params = {
+            cid: this.id,
+            s: parseInt(this.courseType),
+            t: this.taskCount,
+            tool: this.toolindex,
             wid: this.engWid,
             c: this.userid,
-            w: JSON.stringify(this.newEnglishList),
+            w: this.newEngIndex == -1 ? 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;
             })
             .catch((err) => {
               console.error(err);
@@ -18624,8 +18677,10 @@ export default {
     },
     selectEngC(z){
       let params = {
-        wid: this.engWid,
-        c: this.userid,
+        cid: this.id,
+        s: this.courseType,
+        t: this.taskCount,
+        tool: this.toolindex,
       };
       this.ajax
         .get(this.$store.state.api + "selectEngC", params)
@@ -18634,9 +18689,50 @@ export default {
             this.newEnglishList.engTitle = z.engTitle;
             this.newEnglishList.engText = z.engText;
           }else{
-            this.newEnglishList = JSON.parse(res.data[0][0].cWork);
+            var a = res.data[0];
+            if(this.userMes[0].type == 2){
+              for(var i = 0;i<a.length;i++){
+                if(this.userMes[0].userid == a[i].correct){
+                  this.newEnglishList = JSON.parse(a[i].cWork);
+                }
+              }
+            }else if(this.userMes[0].type == 1){
+              var num = 0;
+              for(var w= 0;w<a.length;w++){
+                if(this.userMes[0].userid == a[w].correct){
+                  num = 1;
+                }
+              }
+              if(num == 0){
+                this.isNoUserid = true;
+                var c = JSON.parse(JSON.stringify(z));
+                this.oldEnglishJson1 = c;
+              }
+              var b = a.sort((item, index) => {
+                if (item.correct === this.userMes[0].userid) {
+                  return -1; // 将a移到前面
+                } else if (index.correct === this.userMes[0].userid) {
+                  return 1; // 将b移到前面
+                } else {
+                  return 0; // 保持默认顺序
+                }
+              });
+              this.newEnglishList = b;
+            }
           }
           this.engUpdateDialogVisible = true;
+          this.$forceUpdate();
+          setTimeout(() => {
+            this.topHeight = document.querySelectorAll(".engUpTop")[0].offsetHeight;
+            if(this.isNoUserid == true){
+              this.engListLength = this.newEnglishList.length + 1;
+              this.newEngIndex = -1;
+            }else{
+              this.engListLength = this.newEnglishList.length;
+              this.newEngIndex = 0;
+            }
+          }, 500);
+          
         })
         .catch((err) => {
           console.error(err);
@@ -18718,6 +18814,9 @@ export default {
     this.opertimer = null;
   },
   computed: {
+    getHeight(){
+      return document.querySelectorAll(".engUpTop")[0].offsetHeight;
+    },
     contentConvent() {
       return function (c) {
         return c
@@ -23031,13 +23130,18 @@ ol {
   display: flex;
   flex-direction: row;
   flex-wrap: nowrap;
-  align-items: center;    
+  align-items: flex-start;    
   padding: 0 20px 20px 20px;
   box-sizing: border-box;
 }
+
+.engTitle > .div:first-child,
+.engText > div:first-child {
+  min-width: 75px;
+}
+
 .correctBox{
   width: 100%;
-  height: 100%;
   display: flex;
   flex-direction: row;
   flex-wrap: nowrap;
@@ -23066,17 +23170,21 @@ ol {
 
 .oldText{
   width: 100%;
-  height: 100%;
+  height: calc(100% - 35px);
   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;
@@ -23085,4 +23193,16 @@ ol {
 .oldDetail{
   padding-bottom: 30px;
 }
+
+.allName{
+  min-width: 200px;
+  white-space: nowrap;
+  overflow: hidden;
+  text-overflow: ellipsis;
+  word-break: break-word;
+  cursor: pointer;
+  text-align: center;
+  border: 1px solid #bcc2cc;
+  box-sizing: border-box;
+}
 </style>

+ 10 - 3
src/components/easy3/commpont/onlineWrite.vue

@@ -22,7 +22,9 @@
       </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 || type == 2">
+      +在线编写
+    </div>
     <div
       class="chooseUpload"
       @click="(type = 2), (uploadDialogVisible = true)"
@@ -236,7 +238,7 @@ export default {
 
 <style scoped>
 .engBox {
-  width: 50%;
+  width: 90%;
   margin: 0 auto;
 }
 
@@ -245,10 +247,15 @@ export default {
   display: flex;
   flex-direction: row;
   flex-wrap: nowrap;
-  align-items: center;
+  align-items: flex-start;
   margin-bottom: 20px;
 }
 
+.engTitle > .div:first-child,
+.engText > div:first-child {
+  min-width: 75px;
+}
+
 .chooseUpload {
   width: 100%;
   height: 300px;

+ 134 - 18
src/components/easy3/studyStudent.vue

@@ -11232,7 +11232,7 @@
         @setEnglish="setEnglishList"
         :englishList="englishList"
       ></onlineWrite>
-      <span slot="footer" class="dialog-footer">
+      <span slot="footer" class="dialog-footer" style="text-align: center;">
         <el-button @click="engDialogVisible = false">取 消</el-button>
         <el-button type="primary" @click="addEnglishWork">确 定</el-button>
       </span>
@@ -11246,16 +11246,17 @@
       class="dialog_diy fullStyle"
     >
       <div class="engUpBox">
-        <div class="engTitle">
-          <div>作文题目:</div>
-          <div>{{ englishList1.engTitle }}</div>
-        </div>
-        <div class="engText">
-          <div>作文题目:</div>
-          <div v-html="englishList1.englishText"></div>
+        <div class="engUpTop">
+          <div class="engTitle">
+            <div>作文题目:</div>
+            <div>{{ englishList1.engTitle }}</div>
+          </div>
+          <div class="engText">
+            <div>作文题目:</div>
+            <div v-html="englishList1.englishText"></div>
+          </div>
         </div>
-
-        <div class="correctBox">
+        <div class="correctBox" :style="{height: `calc(100% - ${topHeight}px)` }">
           <div class="oldBox">
             <div class="oldMes">原文( 作者:{{ noteName }} )</div>
             <div class="oldText">
@@ -11271,7 +11272,7 @@
               </div>
             </div>
           </div>
-          <div class="oldBox">
+          <div class="oldBox" v-if="userMes[0].type == 2">
             <div class="oldMes" style="background: #aacaff;">{{ userMes[0].username }}</div>
             <div class="oldText">
               <div class="detailBox">
@@ -11280,7 +11281,7 @@
                   <el-input v-model="newEnglishList.engTitle" />
                 </div>
                 <div class="oldDetail">
-                  <div>正文</div>
+                  <div>正文</div>
                   <el-input type="textarea"
                   :rows="10"
                   resize="none" v-model="newEnglishList.engText" />
@@ -11288,6 +11289,40 @@
               </div>
             </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;">
+              <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>
+            <div class="oldText" v-if="newEngIndex == -1">
+              <div class="detailBox">
+                <div class="oldDetail">
+                  <div>标题:</div>
+                  <el-input v-model="oldEnglishJson1.engTitle" />
+                </div>
+                <div class="oldDetail">
+                  <div>正文:</div>
+                  <el-input type="textarea"
+                  :rows="10"
+                  resize="none" v-model="oldEnglishJson1.engText" />
+                </div>
+              </div>
+            </div>
+            <div class="oldText" v-else-if="newEngIndex > -1 && newEnglishList.length > 0">
+              <div class="detailBox">
+                <div class="oldDetail">
+                  <div>标题:</div>
+                  <el-input v-model="JSON.parse(newEnglishList[newEngIndex].cWork).engTitle" />
+                </div>
+                <div class="oldDetail">
+                  <div>正文:</div>
+                  <el-input type="textarea"
+                  :rows="10"
+                  resize="none" v-model="JSON.parse(newEnglishList[newEngIndex].cWork).engText" />
+                </div>
+              </div>
+            </div>
+          </div>
         </div>
       </div>
       <span slot="footer" class="dialog-footer">
@@ -11620,13 +11655,20 @@ export default {
       toolDialogVisible: false,
       engDialogVisible: false,
       engUpdateDialogVisible:false,
+      isNoUserid:false,
+      engListLength:0,
       engWid:"",
       newEnglishList:{
         engTitle:"",
         engText:"",
       },
       oldEnglishJson:{},
+      oldEnglishJson1:{},
       englishList1:{},
+      englishList:{},
+      topHeight:0,
+      newEngIndex:-1,
+      englishToolIndex:0,
       userMes:{},
       englishToolIndex:0,
       replyIndex: 0,
@@ -11640,6 +11682,7 @@ export default {
       },
       testJson: {},
       englishList: {},
+      topHeight:0,
       checkJson: [],
       askList: [],
       answerList: [],
@@ -18586,6 +18629,10 @@ export default {
           console.error(err);
         });
     },
+    setEngText(i){
+      this.newEngIndex = i;
+      this.$forceUpdate();
+    },
     addCorrect(){
       this.$confirm("你确定提交批改嘛?", "提示", {
         confirmButtonText: "确定",
@@ -18595,15 +18642,21 @@ export default {
       })
         .then(() => {
           let params = {
+            cid: this.id,
+            s: parseInt(this.courseType),
+            t: this.taskCount,
+            tool: this.toolindex,
             wid: this.engWid,
             c: this.userid,
-            w: JSON.stringify(this.newEnglishList),
+            w: this.newEngIndex == -1 ? 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;
             })
             .catch((err) => {
               console.error(err);
@@ -18613,8 +18666,10 @@ export default {
     },
     selectEngC(z){
       let params = {
-        wid: this.engWid,
-        c: this.userid,
+        cid: this.id,
+        s: this.courseType,
+        t: this.taskCount,
+        tool: this.toolindex,
       };
       this.ajax
         .get(this.$store.state.api + "selectEngC", params)
@@ -18623,9 +18678,50 @@ export default {
             this.newEnglishList.engTitle = z.engTitle;
             this.newEnglishList.engText = z.engText;
           }else{
-            this.newEnglishList = JSON.parse(res.data[0][0].cWork);
+            var a = res.data[0];
+            if(this.userMes[0].type == 2){
+              for(var i = 0;i<a.length;i++){
+                if(this.userMes[0].userid == a[i].correct){
+                  this.newEnglishList = JSON.parse(a[i].cWork);
+                }
+              }
+            }else if(this.userMes[0].type == 1){
+              var num = 0;
+              for(var w= 0;w<a.length;w++){
+                if(this.userMes[0].userid == a[w].correct){
+                  num = 1;
+                }
+              }
+              if(num == 0){
+                this.isNoUserid = true;
+                var c = JSON.parse(JSON.stringify(z));
+                this.oldEnglishJson1 = c;
+              }
+              var b = a.sort((item, index) => {
+                if (item.correct === this.userMes[0].userid) {
+                  return -1; // 将a移到前面
+                } else if (index.correct === this.userMes[0].userid) {
+                  return 1; // 将b移到前面
+                } else {
+                  return 0; // 保持默认顺序
+                }
+              });
+              this.newEnglishList = b;
+            }
           }
           this.engUpdateDialogVisible = true;
+          this.$forceUpdate();
+          setTimeout(() => {
+            this.topHeight = document.querySelectorAll(".engUpTop")[0].offsetHeight;
+            if(this.isNoUserid == true){
+              this.engListLength = this.newEnglishList.length + 1;
+              this.newEngIndex = -1;
+            }else{
+              this.engListLength = this.newEnglishList.length;
+              this.newEngIndex = 0;
+            }
+          }, 500);
+          
         })
         .catch((err) => {
           console.error(err);
@@ -18707,6 +18803,9 @@ export default {
     this.opertimer = null;
   },
   computed: {
+    getHeight(){
+      return document.querySelectorAll(".engUpTop")[0].offsetHeight;
+    },
     contentConvent() {
       return function (c) {
         return c
@@ -23020,13 +23119,18 @@ ol {
   display: flex;
   flex-direction: row;
   flex-wrap: nowrap;
-  align-items: center;    
+  align-items: flex-start;    
   padding: 0 20px 20px 20px;
   box-sizing: border-box;
 }
+
+.engTitle > .div:first-child,
+.engText > div:first-child {
+  min-width: 75px;
+}
+
 .correctBox{
   width: 100%;
-  height: 100%;
   display: flex;
   flex-direction: row;
   flex-wrap: nowrap;
@@ -23074,4 +23178,16 @@ ol {
 .oldDetail{
   padding-bottom: 30px;
 }
+
+.allName{
+  min-width: 200px;
+  white-space: nowrap;
+  overflow: hidden;
+  text-overflow: ellipsis;
+  word-break: break-word;
+  cursor: pointer;
+  text-align: center;
+  border: 1px solid #bcc2cc;
+  box-sizing: border-box;
+}
 </style>

+ 128 - 17
src/components/studyStudent.vue

@@ -11198,7 +11198,7 @@
           style="width: 250px; margin: 15px 0px"
         ></el-input> -->
       </div>
-      <span slot="footer" class="dialog-footer">
+      <span slot="footer" class="dialog-footer" style="text-align: center;">
         <el-button @click="dialogVisibleSname = false">取 消</el-button>
         <el-button type="primary" @click="updateName">确 定</el-button>
       </span>
@@ -11229,16 +11229,17 @@
       class="dialog_diy fullStyle"
     >
       <div class="engUpBox">
-        <div class="engTitle">
-          <div>作文题目:</div>
-          <div>{{ englishList1.engTitle }}</div>
-        </div>
-        <div class="engText">
-          <div>作文题目:</div>
-          <div v-html="englishList1.englishText"></div>
+        <div class="engUpTop">
+          <div class="engTitle">
+            <div>作文题目:</div>
+            <div>{{ englishList1.engTitle }}</div>
+          </div>
+          <div class="engText">
+            <div>作文题目:</div>
+            <div v-html="englishList1.englishText"></div>
+          </div>
         </div>
-
-        <div class="correctBox">
+        <div class="correctBox" :style="{height: `calc(100% - ${topHeight}px)` }">
           <div class="oldBox">
             <div class="oldMes">原文( 作者:{{ noteName }} )</div>
             <div class="oldText">
@@ -11254,7 +11255,7 @@
               </div>
             </div>
           </div>
-          <div class="oldBox">
+          <div class="oldBox" v-if="userMes[0].type == 2">
             <div class="oldMes" style="background: #aacaff;">{{ userMes[0].username }}</div>
             <div class="oldText">
               <div class="detailBox">
@@ -11271,6 +11272,40 @@
               </div>
             </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;">
+              <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>
+            <div class="oldText" v-if="newEngIndex == -1">
+              <div class="detailBox">
+                <div class="oldDetail">
+                  <div>标题:</div>
+                  <el-input v-model="oldEnglishJson1.engTitle" />
+                </div>
+                <div class="oldDetail">
+                  <div>正文:</div>
+                  <el-input type="textarea"
+                  :rows="10"
+                  resize="none" v-model="oldEnglishJson1.engText" />
+                </div>
+              </div>
+            </div>
+            <div class="oldText" v-else-if="newEngIndex > -1 && newEnglishList.length > 0">
+              <div class="detailBox">
+                <div class="oldDetail">
+                  <div>标题:</div>
+                  <el-input v-model="JSON.parse(newEnglishList[newEngIndex].cWork).engTitle" />
+                </div>
+                <div class="oldDetail">
+                  <div>正文:</div>
+                  <el-input type="textarea"
+                  :rows="10"
+                  resize="none" v-model="JSON.parse(newEnglishList[newEngIndex].cWork).engText" />
+                </div>
+              </div>
+            </div>
+          </div>
         </div>
       </div>
       <span slot="footer" class="dialog-footer">
@@ -11418,13 +11453,19 @@ export default {
       dialogVisiblePickPeople: false,
       engDialogVisible: false,
       engUpdateDialogVisible:false,
+      isNoUserid:false,
+      engListLength:0,
       engWid:"",
       newEnglishList:{
         engTitle:"",
         engText:"",
       },
       oldEnglishJson:{},
+      oldEnglishJson1:{},
       englishList1:{},
+      englishList:{},
+      topHeight:0,
+      newEngIndex:-1,
       englishToolIndex:0,
       worksSName: "",
       classJuri: [],
@@ -18563,6 +18604,10 @@ export default {
           console.error(err);
         });
     },
+    setEngText(i){
+      this.newEngIndex = i;
+      this.$forceUpdate();
+    },
     addCorrect(){
       this.$confirm("你确定提交批改嘛?", "提示", {
         confirmButtonText: "确定",
@@ -18572,15 +18617,21 @@ export default {
       })
         .then(() => {
           let params = {
+            cid: this.id,
+            s: parseInt(this.courseType),
+            t: this.taskCount,
+            tool: this.toolindex,
             wid: this.engWid,
             c: this.userid,
-            w: JSON.stringify(this.newEnglishList),
+            w: this.newEngIndex == -1 ? 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;
             })
             .catch((err) => {
               console.error(err);
@@ -18590,8 +18641,10 @@ export default {
     },
     selectEngC(z){
       let params = {
-        wid: this.engWid,
-        c: this.userid,
+        cid: this.id,
+        s: this.courseType,
+        t: this.taskCount,
+        tool: this.toolindex,
       };
       this.ajax
         .get(this.$store.state.api + "selectEngC", params)
@@ -18600,9 +18653,50 @@ export default {
             this.newEnglishList.engTitle = z.engTitle;
             this.newEnglishList.engText = z.engText;
           }else{
-            this.newEnglishList = JSON.parse(res.data[0][0].cWork);
+            var a = res.data[0];
+            if(this.userMes[0].type == 2){
+              for(var i = 0;i<a.length;i++){
+                if(this.userMes[0].userid == a[i].correct){
+                  this.newEnglishList = JSON.parse(a[i].cWork);
+                }
+              }
+            }else if(this.userMes[0].type == 1){
+              var num = 0;
+              for(var w= 0;w<a.length;w++){
+                if(this.userMes[0].userid == a[w].correct){
+                  num = 1;
+                }
+              }
+              if(num == 0){
+                this.isNoUserid = true;
+                var c = JSON.parse(JSON.stringify(z));
+                this.oldEnglishJson1 = c;
+              }
+              var b = a.sort((item, index) => {
+                if (item.correct === this.userMes[0].userid) {
+                  return -1; // 将a移到前面
+                } else if (index.correct === this.userMes[0].userid) {
+                  return 1; // 将b移到前面
+                } else {
+                  return 0; // 保持默认顺序
+                }
+              });
+              this.newEnglishList = b;
+            }
           }
           this.engUpdateDialogVisible = true;
+          this.$forceUpdate();
+          setTimeout(() => {
+            this.topHeight = document.querySelectorAll(".engUpTop")[0].offsetHeight;
+            if(this.isNoUserid == true){
+              this.engListLength = this.newEnglishList.length + 1;
+              this.newEngIndex = -1;
+            }else{
+              this.engListLength = this.newEnglishList.length;
+              this.newEngIndex = 0;
+            }
+          }, 500);
+          
         })
         .catch((err) => {
           console.error(err);
@@ -22997,13 +23091,18 @@ ol {
   display: flex;
   flex-direction: row;
   flex-wrap: nowrap;
-  align-items: center;    
+  align-items: flex-start;    
   padding: 0 20px 20px 20px;
   box-sizing: border-box;
 }
+
+.engTitle > .div:first-child,
+.engText > div:first-child {
+  min-width: 75px;
+}
+
 .correctBox{
   width: 100%;
-  height: 100%;
   display: flex;
   flex-direction: row;
   flex-wrap: nowrap;
@@ -23051,4 +23150,16 @@ ol {
 .oldDetail{
   padding-bottom: 30px;
 }
+
+.allName{
+  min-width: 200px;
+  white-space: nowrap;
+  overflow: hidden;
+  text-overflow: ellipsis;
+  word-break: break-word;
+  cursor: pointer;
+  text-align: center;
+  border: 1px solid #bcc2cc;
+  box-sizing: border-box;
+}
 </style>