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