|
@@ -163,7 +163,17 @@ export default defineComponent({
|
|
|
});
|
|
|
|
|
|
function submit() {
|
|
|
- emit("submit");
|
|
|
+ const errors: any = [];
|
|
|
+ store.currentTask?.questionList.forEach((question, index) => {
|
|
|
+ if (!isNumber(question.score)) {
|
|
|
+ errors.push({ question, index, error: "没有赋分不能提交" });
|
|
|
+ }
|
|
|
+ });
|
|
|
+ if (errors.length === 0) {
|
|
|
+ emit("submit");
|
|
|
+ } else {
|
|
|
+ console.log(errors);
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
return {
|