import question
This commit is contained in:
parent
db1bacaaa1
commit
ec9fcba978
|
@ -190,9 +190,9 @@ export default {
|
|||
},
|
||||
methods: {
|
||||
checkPermission,
|
||||
getList(query = this.listQuery) {
|
||||
getList() {
|
||||
this.listLoading = true;
|
||||
getExamTestlist(query).then(response => {
|
||||
getExamTestlist(this.listQuery).then(response => {
|
||||
this.tableData = response.data;
|
||||
this.listLoading = false;
|
||||
});
|
||||
|
|
|
@ -168,7 +168,7 @@ class QuestionViewSet(ModelViewSet):
|
|||
else:
|
||||
cateobj = Questioncat.objects.get(id=questioncatdict[questioncat])
|
||||
if type == '单选':
|
||||
if Question.objects.filter(type='单选',name=name,right=right,is_delete=0).exists():
|
||||
if Question.objects.filter(type='单选',name=name, is_delete=0).exists():
|
||||
notinlist.append(i)
|
||||
else:
|
||||
if right in ['A','B','C','D','E','F']:
|
||||
|
@ -186,7 +186,7 @@ class QuestionViewSet(ModelViewSet):
|
|||
obj.save()
|
||||
elif type == '多选':
|
||||
right = list(right)
|
||||
if Question.objects.filter(type='多选',name=name,right=right,is_delete=0).exists():
|
||||
if Question.objects.filter(type='多选', name=name, is_delete=0).exists():
|
||||
notinlist.append(i)
|
||||
else:
|
||||
if [False for c in right if c not in qlist]:
|
||||
|
@ -209,7 +209,7 @@ class QuestionViewSet(ModelViewSet):
|
|||
right = 'A'
|
||||
else:
|
||||
right = 'B'
|
||||
if Question.objects.filter(type='判断',name=name,right=right,is_delete=0).exists():
|
||||
if Question.objects.filter(type='判断',name=name, is_delete=0).exists():
|
||||
notinlist.append(i)
|
||||
else:
|
||||
obj = Question()
|
||||
|
|
Loading…
Reference in New Issue