【修改】试卷任务切换,总体细节

This commit is contained in:
YOHO\20373
2025-05-22 14:23:13 +08:00
committed by 陆光LG
parent df984dc3a6
commit 5d8ae6de72
17 changed files with 378 additions and 18 deletions

View File

@@ -213,7 +213,7 @@ const open = async (type: 'create' | 'update', data?: any) => {
schemeId: undefined,
taskId: props.taskId,
spName: undefined,
quLevel: undefined,
quLevel: 3,
quTitle:undefined,
keyword: [],
pointName: [],
@@ -375,6 +375,12 @@ watch(
},
{ deep: true }
)
watch(() => form.value.spName, (newVal) => {
if (newVal) {
form.value.quTitle = newVal
}
})
watch(
() => [form.value.quNumbers, form.value.quScores],
() => {

View File

@@ -22,6 +22,15 @@
</template>
</el-steps>
<!-- 左右切换箭头按钮 -->
<div style="text-align: center; margin-top: 15px;">
<el-button :disabled="activeStep === 0" @click="prevStep">
上一步
</el-button>
<el-button :disabled="activeStep === stepTitles.length - 1" @click="nextStep">
下一步
</el-button>
</div>
<div style="margin-top: 30px;">
<component
:is="currentComponent"
@@ -106,6 +115,47 @@ defineExpose({ open })
const handleCancel = () => {
isVisible.value = false
}
const prevStep = () => {
// 如果下一步是考场设置(第四步),提前校验
if (activeStep.value - 1 === 3) {
validateBeforeStepFour(props.data.taskId)
.then((msg) => {
})
.catch((e) => {
// 校验失败,直接跳到第五步
activeStep.value = 2
return
});
}
if (activeStep.value > 0) {
activeStep.value--
}
}
const nextStep = async () => {
// 如果下一步是考场设置(第四步),提前校验
if (activeStep.value + 1 === 3) {
validateBeforeStepFour(props.data.taskId)
.then((msg) => {
})
.catch((e) => {
// 校验失败,直接跳到第五步
activeStep.value = 4
return
});
}
if (activeStep.value < stepTitles.length - 1) {
activeStep.value++
}
}
</script>
<style scoped>