【修改】试卷任务切换,总体细节
This commit is contained in:
@@ -21,7 +21,15 @@
|
||||
</el-step>
|
||||
</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"
|
||||
@@ -96,7 +104,46 @@ async function handleStepClick(index) {
|
||||
}
|
||||
activeStep.value = index
|
||||
}
|
||||
const prevStep = () => {
|
||||
// 如果下一步是考场设置(第四步),提前校验
|
||||
if (activeStep.value - 1 === 2) {
|
||||
validateBeforeStepFour(props.data.taskId)
|
||||
|
||||
.then((msg) => {
|
||||
})
|
||||
.catch((e) => {
|
||||
// 校验失败,直接跳到第五步
|
||||
activeStep.value = 1
|
||||
return
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
if (activeStep.value > 0) {
|
||||
activeStep.value--
|
||||
}
|
||||
}
|
||||
|
||||
const nextStep = async () => {
|
||||
// 如果下一步是考场设置(第四步),提前校验
|
||||
if (activeStep.value + 1 === 2) {
|
||||
validateBeforeStepFour(props.data.taskId)
|
||||
|
||||
.then((msg) => {
|
||||
})
|
||||
.catch((e) => {
|
||||
// 校验失败,直接跳到第五步
|
||||
activeStep.value = 3
|
||||
return
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
|
||||
if (activeStep.value < stepTitles.length - 1) {
|
||||
activeStep.value++
|
||||
}
|
||||
}
|
||||
/** 打开弹窗 */
|
||||
const open = async (type, row) => {
|
||||
isVisible.value = true
|
||||
|
Reference in New Issue
Block a user