Commit 9689b99a authored by 黄奎's avatar 黄奎

页面修改

parent 039a1c42
...@@ -271,6 +271,12 @@ ...@@ -271,6 +271,12 @@
}, },
deep: true deep: true
}, },
questionData: {
handler(newValue) {
this.data = this.questionData;
},
deep: true
},
} }
}; };
......
...@@ -129,6 +129,12 @@ ...@@ -129,6 +129,12 @@
}, },
deep: true deep: true
}, },
questionData: {
handler(newValue) {
this.data = this.questionData;
},
deep: true
},
} }
}; };
......
...@@ -120,6 +120,12 @@ ...@@ -120,6 +120,12 @@
}, },
deep: true deep: true
}, },
questionData: {
handler(newValue) {
this.data = this.questionData;
},
deep: true
},
} }
}; };
......
...@@ -83,6 +83,12 @@ ...@@ -83,6 +83,12 @@
}, },
deep: true deep: true
}, },
questionData: {
handler(newValue) {
this.data = this.questionData;
},
deep: true
},
} }
}; };
......
...@@ -252,6 +252,12 @@ ...@@ -252,6 +252,12 @@
}, },
deep: true deep: true
}, },
questionData: {
handler(newValue) {
this.data = this.questionData;
},
deep: true
},
} }
}; };
......
...@@ -142,6 +142,12 @@ ...@@ -142,6 +142,12 @@
}, },
deep: true deep: true
}, },
questionData: {
handler(newValue) {
this.data = this.questionData;
},
deep: true
},
} }
}; };
......
...@@ -46,11 +46,6 @@ ...@@ -46,11 +46,6 @@
</div> </div>
</th> </th>
</tr> </tr>
<!-- <tr>
<th colspan="3">
<UeEditor v-model="item.SubTitle" :config="config"></UeEditor>
</th>
</tr> -->
</thead> </thead>
<tbody v-if="(commonIndex==index)&&!isShow"> <tbody v-if="(commonIndex==index)&&!isShow">
<tr> <tr>
...@@ -349,6 +344,12 @@ ...@@ -349,6 +344,12 @@
}, },
deep: true deep: true
}, },
questionData: {
handler(newValue) {
this.data = this.questionData;
},
deep: true
},
} }
}; };
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
<br /> <br />
答案 答案
<br /> <br />
<UeEditor v-model="setOption.Answer" :config="config"></UeEditor> <UeEditor v-model="setOption.Answer" :config="config" ref="UE_Answer"></UeEditor>
</div> </div>
</template> </template>
<script> <script>
...@@ -40,7 +40,13 @@ ...@@ -40,7 +40,13 @@
mounted() { mounted() {
}, },
watch: {
'setOption'(newVal, oldVal) {
if (newVal != oldVal) {
this.$refs.UE_Answer.reloadNewValue();
}
}
}
}; };
</script> </script>
...@@ -194,6 +194,12 @@ ...@@ -194,6 +194,12 @@
}, },
deep: true deep: true
}, },
questionData: {
handler(newValue) {
this.data = this.questionData;
},
deep: true
},
} }
}; };
......
...@@ -253,7 +253,7 @@ ...@@ -253,7 +253,7 @@
<template v-if="!gItem.isShowEdit">{{gIndex+1}}&nbsp;{{gItem.GroupName}}</template> <template v-if="!gItem.isShowEdit">{{gIndex+1}}&nbsp;{{gItem.GroupName}}</template>
<template v-else> <template v-else>
<input style="width:160px;margin-right:10px;" v-model="gItem.GroupName" /> <input style="width:160px;margin-right:10px;" v-model="gItem.GroupName" />
<input style="width:40px;" filled v-model="gItem.GSortNum" /> <input style="width:40px;" filled v-model="gItem.GScore" @change="changeGroupScore(gItem)" />
</template> </template>
</strong> </strong>
<i class="iconfont icon-edit" title="编辑" style="font-size:18px;margin-right:5px;" <i class="iconfont icon-edit" title="编辑" style="font-size:18px;margin-right:5px;"
...@@ -269,7 +269,7 @@ ...@@ -269,7 +269,7 @@
<ul class="List-ul" v-if="gItem.DetailsList&&gItem.DetailsList.length>0"> <ul class="List-ul" v-if="gItem.DetailsList&&gItem.DetailsList.length>0">
<li class="" style="cursor:pointer;" :class="{'checkUl':dIndex==ComCheckIndex&&gIndex==ComOneIndex}" <li class="" style="cursor:pointer;" :class="{'checkUl':dIndex==ComCheckIndex&&gIndex==ComOneIndex}"
v-for="(dItem,dIndex) in gItem.DetailsList" :key="dIndex" @click="ClickItem(dItem,gIndex,dIndex)"> 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> ({{dIndex+1}}) <span class="exam_DetailList" v-html="dItem.ShowTitle"></span>
<span class="exam_ListSHow"> <span class="exam_ListSHow">
<i class="iconfont icon-shangyi2" @click.stop="MoveChildItem(gIndex,dIndex,0)" <i class="iconfont icon-shangyi2" @click.stop="MoveChildItem(gIndex,dIndex,0)"
style="margin-right:5px;" v-if="dIndex!=0"></i> style="margin-right:5px;" v-if="dIndex!=0"></i>
...@@ -523,6 +523,20 @@ ...@@ -523,6 +523,20 @@
} }
}, },
methods: { methods: {
//大类改变分数
changeGroupScore(gItem) {
var subScore = 0;
if (gItem.GScore && gItem.GScore > 0) {
subScore = gItem.GScore;
}
if (gItem.DetailsList && gItem.DetailsList.length > 0) {
var avgScore = Number(subScore / gItem.DetailsList.length).toFixed(2);
gItem.DetailsList.forEach(sItem => {
sItem.Score = avgScore;
})
}
this.calcPaper();
},
//上移下移(IsUp:0上移,1下移) //上移下移(IsUp:0上移,1下移)
MoveFatherItem(subIndex, IsUp) { MoveFatherItem(subIndex, IsUp) {
var currentItem = this.DataObj.GroupList[subIndex]; var currentItem = this.DataObj.GroupList[subIndex];
...@@ -657,6 +671,7 @@ ...@@ -657,6 +671,7 @@
QuestionTypeId: qItem.QuestionTypeId, QuestionTypeId: qItem.QuestionTypeId,
QuestionTypeKey: qItem.QuestionTypeKey, QuestionTypeKey: qItem.QuestionTypeKey,
GSortNum: 0, GSortNum: 0,
GScore: 0, //分数
DetailsList: [], //问题列表 DetailsList: [], //问题列表
}); });
} }
...@@ -774,12 +789,13 @@ ...@@ -774,12 +789,13 @@
}, },
//点击问题 //点击问题
ClickItem(questionItem, index, index2) { ClickItem(questionItem, index, index2) {
this.ChooseItem={}; this.ChooseItem = {};
this.ComOneIndex = index; this.ComOneIndex = index;
this.ComCheckIndex = index2; this.ComCheckIndex = index2;
this.ChooseItem = questionItem; this.ChooseItem = questionItem;
this.ChooseItem.QuestionContentObj=questionItem.QuestionContentObj; this.ChooseItem.QuestionContentObj = questionItem.QuestionContentObj;
this.$refs.UE_Title.reloadNewValue(); this.$refs.UE_Title.reloadNewValue();
this.$refs.AnswerParse.reloadNewValue();
this.$forceUpdate(); this.$forceUpdate();
}, },
//保存题目 //保存题目
...@@ -795,7 +811,7 @@ ...@@ -795,7 +811,7 @@
position: 'top' position: 'top'
}) })
this.$router.push({ this.$router.push({
path: '/exam/examManagement', path: '/exam/examPaper',
query: {} query: {}
}); });
} else { } else {
......
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