|
@@ -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>
|