|
|
@@ -14927,14 +14927,14 @@
|
|
|
<div>{{ lang.ssContentColon }}</div>
|
|
|
<div v-html="oldEnglishJson.engText" style="white-space: pre-line;"></div>
|
|
|
</div>
|
|
|
- <div class="oldDetail" v-if="oldEnglishJson.imgList && oldEnglishJson.imgList.length > 0">
|
|
|
+ <div class="oldDetail" v-if="oldEnglishJson && oldEnglishJson.imgList && oldEnglishJson.imgList.length > 0 && oldEnglishJson.imgList[0]">
|
|
|
<div>{{ lang.ssImageColon }}</div>
|
|
|
- <div class="oldImg"><img :src="oldEnglishJson.imgList[0].url" alt="" /></div>
|
|
|
+ <div class="oldImg"><img :src="oldEnglishJson.imgList[0].url || ''" alt="" /></div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <div class="oldBox loadingText" v-if="userMes[0].type == 2">
|
|
|
+ <div class="oldBox loadingText" v-if="userMes && userMes[0] && userMes[0].type == 2">
|
|
|
<div class="oldMes" style="background: #aacaff;">{{ userMes[0].username }}</div>
|
|
|
<div class="oldText">
|
|
|
<div class="detailBox" style="position: relative;">
|
|
|
@@ -14956,7 +14956,7 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <div class="oldBox loadingText" v-else-if="userMes[0].type == 1">
|
|
|
+ <div class="oldBox loadingText" v-else-if="userMes && userMes[0] && 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="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 newEnglishList1" :key="index" class="allName" :style="{minWidth: `calc(100% / ${engListLength})`,background: index == newEngIndex ? '#aacaff' : ''}" @click="setEngText(index)">{{ item.username }}</div>
|
|
|
@@ -15004,7 +15004,7 @@
|
|
|
<div class="detailBox" style="position: relative;">
|
|
|
<div class="oldDetail">
|
|
|
<div>{{ lang.ssTitleColon }}</div>
|
|
|
- <div v-if="userMes[0].userid != newEnglishList1[newEngIndex].correct" v-html="newEnglishList1[newEngIndex].cWork.engTitle"></div>
|
|
|
+ <div v-if="userMes && userMes[0] && userMes[0].userid != newEnglishList1[newEngIndex].correct" v-html="newEnglishList1[newEngIndex].cWork.engTitle"></div>
|
|
|
<div v-else>
|
|
|
<el-input v-if="greyType" v-model="newEnglishList1[newEngIndex].cWork.engTitle" />
|
|
|
<div v-else v-html="newEnglishList1[newEngIndex].cWork.engTitle"></div>
|
|
|
@@ -15013,7 +15013,7 @@
|
|
|
<div class="oldDetail">
|
|
|
<div>{{ lang.ssContentColon }}</div>
|
|
|
<!-- <div v-if="userMes[0].userid != newEnglishList1[newEngIndex].correct" v-html="newEnglishList1[newEngIndex].cWork.engText"></div> -->
|
|
|
- <correctText v-if="userMes[0].userid != newEnglishList1[newEngIndex].correct" :newText="newEnglishList1[newEngIndex].cWork.engText" :oldData="oldEnglishJson.engText"/>
|
|
|
+ <correctText v-if="userMes && userMes[0] && userMes[0].userid != newEnglishList1[newEngIndex].correct" :newText="newEnglishList1[newEngIndex].cWork.engText" :oldData="oldEnglishJson.engText"/>
|
|
|
<div v-else>
|
|
|
<el-input v-if="greyType" type="textarea" :rows="10" resize="none" v-model="newEnglishList1[newEngIndex].cWork.engText" @input="gx"/>
|
|
|
<correctText v-else :newText="newEnglishList1[newEngIndex].cWork.engText" :oldData="oldEnglishJson.engText"/>
|
|
|
@@ -15021,8 +15021,8 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
<div style="position: absolute;bottom: -25px;">{{ lang.ssNoteRedDeleteGreenAdd }}</div>
|
|
|
- <el-button @click="isUpdateCorrect(newEnglishList1[newEngIndex].cWork.engText,4)" class="correctCss" :style="{right: greyType == false ? '0' : '80px' }" v-if="!greyType && userMes[0].userid == newEnglishList1[newEngIndex].correct">{{ greyType == false ? lang.ssAddAnnotation : lang.ssCancelAdd }}</el-button>
|
|
|
- <el-button @click="aiCorrect(newEnglishList1[newEngIndex].cWork.engText,4)" style="position: absolute;bottom: -70px;right: 110px;background: #409eff;color: #fff;" v-if="!greyType && userMes[0].userid == newEnglishList1[newEngIndex].correct">{{ lang.ssAIAnnotation }}</el-button>
|
|
|
+ <el-button @click="isUpdateCorrect(newEnglishList1[newEngIndex].cWork.engText,4)" class="correctCss" :style="{right: greyType == false ? '0' : '80px' }" v-if="!greyType && userMes && userMes[0] && userMes[0].userid == newEnglishList1[newEngIndex].correct">{{ greyType == false ? lang.ssAddAnnotation : lang.ssCancelAdd }}</el-button>
|
|
|
+ <el-button @click="aiCorrect(newEnglishList1[newEngIndex].cWork.engText,4)" style="position: absolute;bottom: -70px;right: 110px;background: #409eff;color: #fff;" v-if="!greyType && userMes && userMes[0] && userMes[0].userid == newEnglishList1[newEngIndex].correct">{{ lang.ssAIAnnotation }}</el-button>
|
|
|
<el-button @click="addCorrect" style="position: absolute;bottom: -70px;right: 0;background: #409eff;color: #fff;" v-if="greyType">{{ lang.ssConfirm }}</el-button>
|
|
|
</div>
|
|
|
</div>
|
|
|
@@ -15620,7 +15620,7 @@ export default {
|
|
|
topHeight:0,
|
|
|
newEngIndex:-1,
|
|
|
englishToolIndex:0,
|
|
|
- userMes:{},
|
|
|
+ userMes:[],
|
|
|
englishToolIndex:0,
|
|
|
replyIndex: 0,
|
|
|
replyPid: "",
|
|
|
@@ -24503,7 +24503,7 @@ export default {
|
|
|
this.ajax
|
|
|
.get(this.$store.state.api + "selectUser", params)
|
|
|
.then((res) => {
|
|
|
- this.userMes = res.data[0];
|
|
|
+ this.userMes = (res.data && res.data[0]) ? res.data[0] : [];
|
|
|
})
|
|
|
.catch((err) => {
|
|
|
console.error(err);
|
|
|
@@ -24528,7 +24528,7 @@ export default {
|
|
|
tool: this.toolindex,
|
|
|
wid: this.engWid,
|
|
|
c: this.userid,
|
|
|
- w: this.userMes[0].type == 2 ? JSON.parse(this.newEnglishList) : (this.newEngIndex == -1 && this.isNoUserid == true && this.newEnglishList1.length) ? JSON.stringify(this.oldEnglishJson1) : this.newEngIndex == -1 ? JSON.stringify(this.newEnglishList) : (this.newEngIndex > -1 && this.newEnglishList1.length > 0) ? JSON.stringify(this.newEnglishList1[this.newEngIndex].cWork) : "",
|
|
|
+ w: this.userMes && this.userMes[0] && this.userMes[0].type == 2 ? JSON.parse(this.newEnglishList) : (this.newEngIndex == -1 && this.isNoUserid == true && this.newEnglishList1.length) ? JSON.stringify(this.oldEnglishJson1) : this.newEngIndex == -1 ? JSON.stringify(this.newEnglishList) : (this.newEngIndex > -1 && this.newEnglishList1.length > 0) ? JSON.stringify(this.newEnglishList1[this.newEngIndex].cWork) : "",
|
|
|
};
|
|
|
this.ajax
|
|
|
.get(this.$store.state.api + "addEngC", params)
|
|
|
@@ -24555,7 +24555,7 @@ export default {
|
|
|
}else{
|
|
|
var a = res.data[0];
|
|
|
var ppp = JSON.parse(JSON.stringify(res.data[0]));
|
|
|
- if(this.userMes[0].type == 2){
|
|
|
+ if(this.userMes && this.userMes[0] && this.userMes[0].type == 2){
|
|
|
var snum = 0;
|
|
|
for(var i = 0;i<a.length;i++){
|
|
|
if(this.userMes[0].userid == a[i].correct){
|
|
|
@@ -24568,7 +24568,7 @@ export default {
|
|
|
this.newEnglishList.engTitle = z.engTitle;
|
|
|
this.newEnglishList.engText = z.engText;
|
|
|
}
|
|
|
- }else if(this.userMes[0].type == 1){
|
|
|
+ }else if(this.userMes && this.userMes[0] && this.userMes[0].type == 1){
|
|
|
var num = 0;
|
|
|
for(var w= 0;w<a.length;w++){
|
|
|
if(this.userMes[0].userid == a[w].correct){
|
|
|
@@ -24584,9 +24584,9 @@ export default {
|
|
|
}
|
|
|
var b = a.sort((item, index) => {
|
|
|
console.log(item)
|
|
|
- if (item.correct === this.userMes[0].userid) {
|
|
|
+ if (this.userMes && this.userMes[0] && item.correct === this.userMes[0].userid) {
|
|
|
return -1; // 将a移到前面
|
|
|
- } else if (index.correct === this.userMes[0].userid) {
|
|
|
+ } else if (this.userMes && this.userMes[0] && index.correct === this.userMes[0].userid) {
|
|
|
return 1; // 将b移到前面
|
|
|
} else {
|
|
|
return 0; // 保持默认顺序
|
|
|
@@ -24615,7 +24615,7 @@ export default {
|
|
|
this.newEngIndex = 0;
|
|
|
}
|
|
|
}
|
|
|
- if(this.userMes[0].type == 2){
|
|
|
+ if(this.userMes && this.userMes[0] && this.userMes[0].type == 2){
|
|
|
this.correctWord = Diff.diffWordsWithSpace(this.oldEnglishJson.engText,this.newEnglishList.engText);
|
|
|
}else if(this.newEngIndex == -1 && this.isNoUserid == true && this.newEnglishList1.length){
|
|
|
this.correctWord = Diff.diffWordsWithSpace(this.oldEnglishJson.engText,this.oldEnglishJson1.engText);
|