feat:结束考试未考项目提示
This commit is contained in:
parent
13b36a77c6
commit
d1835688b6
@ -985,7 +985,7 @@ struct Index {
|
|||||||
//结束考试弹窗
|
//结束考试弹窗
|
||||||
if (this.endPopupVisible) {
|
if (this.endPopupVisible) {
|
||||||
EndPoPup({
|
EndPoPup({
|
||||||
title: '确定结束考试吗?',
|
title: this.getNotEndProjects().length ? `当前考试存在未完成的项目:${this.getNotEndProjects().join('、')},确定结束考试吗?` :'确定结束考试吗?',
|
||||||
cancelFn: () => {
|
cancelFn: () => {
|
||||||
this.endPopupVisible = false;
|
this.endPopupVisible = false;
|
||||||
},
|
},
|
||||||
@ -1303,6 +1303,21 @@ struct Index {
|
|||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// 获取必考项目里未完成的
|
||||||
|
getNotEndProjects = () => {
|
||||||
|
const projectsObj = this.projectsObj;
|
||||||
|
const notEndProjectsNames = [];
|
||||||
|
Reflect.ownKeys(projectsObj).forEach((projectKey:string) => {
|
||||||
|
const { type, isRequired ,name} = projectsObj[projectKey];
|
||||||
|
if (isRequired) {
|
||||||
|
if (type == undefined || type == '1' || type == '2') {
|
||||||
|
notEndProjectsNames.push(name)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
return notEndProjectsNames;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
scroller: Scroller = new Scroller()
|
scroller: Scroller = new Scroller()
|
||||||
//页面通用字体大小
|
//页面通用字体大小
|
||||||
|
|||||||
@ -11,7 +11,9 @@ export interface Project {
|
|||||||
type?: '1' | '2' | '3' | '4' | '5'
|
type?: '1' | '2' | '3' | '4' | '5'
|
||||||
//
|
//
|
||||||
isEnd:boolean,
|
isEnd:boolean,
|
||||||
isUpload:boolean
|
isUpload:boolean,
|
||||||
|
//是否是必考
|
||||||
|
isRequired: boolean
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface MarkRule {
|
export interface MarkRule {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user