mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-20 08:16:44 +08:00
修改样式
This commit is contained in:
@@ -572,10 +572,17 @@ export default {
|
||||
if(!this.paper.testName) {
|
||||
return this.$message.warning('请您完善基本信息必填项!')
|
||||
}
|
||||
//检查是否都有分数了
|
||||
|
||||
//检查是否有重复的试卷
|
||||
let qidMap=new Map();
|
||||
let hasItem=null;
|
||||
let allScore=true;
|
||||
this.paper.data.some(qitem=>{
|
||||
if(!qitem.score){
|
||||
allScore=false;
|
||||
return true;
|
||||
}
|
||||
if(qidMap.has(qitem.id)){
|
||||
hasItem=qitem;
|
||||
return true;
|
||||
@@ -583,7 +590,13 @@ export default {
|
||||
qidMap.set(qitem.id,qitem.id);
|
||||
return false;
|
||||
}
|
||||
})
|
||||
});
|
||||
|
||||
if(!allScore){
|
||||
this.$message.error('有试题未设置分数');
|
||||
return;
|
||||
}
|
||||
|
||||
if(hasItem!=null){
|
||||
console.log(hasItem);
|
||||
this.$message.error('选择的试题重复:'+hasItem.title)
|
||||
|
||||
Reference in New Issue
Block a user