diff --git a/src/views/Survey/views/Preview/Index.vue b/src/views/Survey/views/Preview/Index.vue index 3d9ae44..c17a325 100644 --- a/src/views/Survey/views/Preview/Index.vue +++ b/src/views/Survey/views/Preview/Index.vue @@ -538,6 +538,10 @@ import PreviewCheckbox from '@/views/Survey/views/Preview/components/questions/P import PreviewRate from '@/views/Survey/views/Preview/components/questions/PreviewRate.vue'; import PreviewSign from '@/views/Survey/views/Preview/components/questions/PreviewSign.vue'; import PreviewTextWithImages from '@/views/Survey/views/Preview/components/questions/PreviewTextWithImages.vue'; +import { + startValidate, + validateList +} from '@/views/Survey/views/Preview/hooks/useValidateQuestion'; const isPreview = defineModel('isPreview', { type: Boolean, @@ -610,6 +614,8 @@ async function previous() { // 下一页 async function next(callbackBeforePage) { + // 开始校验答案 + startValidate(); // console.log(`click next button`, prevLoading.value || loading.value); // if (prevLoading.value || loading.value) { // return; diff --git a/src/views/Survey/views/Preview/components/questions/PreviewMatrixCheckbox.vue b/src/views/Survey/views/Preview/components/questions/PreviewMatrixCheckbox.vue index 37fdba5..669b994 100644 --- a/src/views/Survey/views/Preview/components/questions/PreviewMatrixCheckbox.vue +++ b/src/views/Survey/views/Preview/components/questions/PreviewMatrixCheckbox.vue @@ -3,8 +3,8 @@ :index="answerIndex" v-model:rowRecord="rowRecord" v-model:matrix-radio-answer="answer!" - :rows="rows" - :cols="cols" + :rows="rows.options" + :cols="cols.options" :is-preview="true" :errorMessage="question.error" :element="question" @@ -13,11 +13,12 @@