【修改】试卷任务切换,总体细节
This commit is contained in:
@@ -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],
|
||||
() => {
|
||||
|
@@ -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>
|
||||
|
Reference in New Issue
Block a user