Commit 04e371d2 authored by zhengke's avatar zhengke

修改

parent 991be175
......@@ -317,7 +317,8 @@
v-for="(dItem,dIndex) in gItem.DetailsList" :key="dIndex" @click="ClickItem(dItem,gIndex,dIndex)">
({{dIndex+1}}) <span class="exam_DetailList" v-html="dItem.ShowTitle"></span>
<span style="position:absolute;right:5px;">
<el-tag type="warning" size="mini" style="margin-right:5px;" v-if="getRepeat(dItem.QuestionId,gItem.DetailsList)">与{{gIndex+1}}.1重复出现</el-tag>
<el-tag type="warning" size="mini" style="margin-right:5px;"
v-if="getRepeat(dItem.QuestionId,gItem.DetailsList)&&dIndex+1!=getIndex(dItem.QuestionId,gItem.DetailsList)">与{{gIndex+1}}.{{getIndex(dItem.QuestionId,gItem.DetailsList)}}重复出现</el-tag>
<span class="exam_ListSHow">
<i class="iconfont icon-shangyi2" @click.stop="MoveChildItem(gIndex,dIndex,0)"
style="margin-right:5px;" v-if="dIndex!=0"></i>
......@@ -1339,11 +1340,8 @@
},
//获取相同
getRepeat(QuestionId,Arr){
console.log(QuestionId,'进入');
console.log(this.DataObj,'this.DataObj');
console.log(Arr,'Arrrrrrrrr');
let Num=0;
Arr.forEach(x=>{
Arr.forEach((x,index)=>{
if (x.QuestionId == QuestionId) {
Num++;
}
......@@ -1351,6 +1349,10 @@
if(Num>1){
return true
}
},
getIndex(Id,Arr){
const index = Arr.findIndex(d => d.QuestionId === Id);
return index+1;
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment