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

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

@@ -175,7 +175,7 @@
<el-table-column label="用户账号" align="center" prop="username" />
<el-table-column label="用户姓名" align="center" prop="nickname" />
<el-table-column label="班级" align="center" prop="className" />
<el-table-column label="考试状态" align="center" prop="examStatus">
<el-table-column label="任务状态" align="center" prop="examStatus">
<template #default="scope">
<dict-tag :type="DICT_TYPE.EXAM_STATUS" :value="scope.row.examStatus" />
</template>

View File

@@ -212,7 +212,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

@@ -92,7 +92,46 @@ async function handleStepClick(index) {
}
activeStep.value = index
}
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++
}
}
/** 打开弹窗 */
const open = async (type, row) => {
isVisible.value = true

View File

@@ -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"
@@ -109,7 +117,46 @@ const open = async (type, row) => {
})
}
defineExpose({ open })
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 handleCancel = () => {
isVisible.value = false
}

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

@@ -199,7 +199,7 @@ const fetchSpecialtyOptions = async () => {
};
/** 弹窗打开事件 */
const handleOpen = () => {
const open = () => {
// if (props.data) {
// assignFields(props.data);
// isUpdate.value = true;
@@ -233,5 +233,5 @@ const fetchSpecialtyOptions = async () => {
onMounted(() => {
fetchSpecialtyOptions();
});
defineExpose({ handleOpen })
defineExpose({ open })
</script>

View File

@@ -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

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: [],
@@ -376,6 +376,12 @@ watch(
},
{ deep: true }
)
watch(() => form.value.spName, (newVal) => {
if (newVal) {
form.value.quTitle = newVal
}
})
watch(
() => [form.value.quNumbers, form.value.quScores],
() => {

View File

@@ -199,7 +199,7 @@ const fetchSpecialtyOptions = async () => {
};
/** 弹窗打开事件 */
const handleOpen = () => {
const open = () => {
// if (props.data) {
// assignFields(props.data);
// isUpdate.value = true;
@@ -234,5 +234,5 @@ const fetchSpecialtyOptions = async () => {
onMounted(() => {
fetchSpecialtyOptions();
});
defineExpose({ handleOpen })
defineExpose({ open })
</script>

View File

@@ -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"
@@ -92,7 +100,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

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: [],
@@ -374,6 +374,12 @@ watch(
},
{ deep: true }
)
watch(() => form.value.spName, (newVal) => {
if (newVal) {
form.value.quTitle = newVal
}
})
watch(
() => [form.value.quNumbers, form.value.quScores],
() => {

View File

@@ -199,7 +199,7 @@ const fetchSpecialtyOptions = async () => {
};
/** 弹窗打开事件 */
const handleOpen = () => {
const open = () => {
// if (props.data) {
// assignFields(props.data);
// isUpdate.value = true;
@@ -234,5 +234,5 @@ const fetchSpecialtyOptions = async () => {
onMounted(() => {
fetchSpecialtyOptions();
});
defineExpose({ handleOpen })
defineExpose({ open })
</script>

View File

@@ -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"
@@ -94,7 +102,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) => {
// 校验失败直接跳到第3步
activeStep.value = 3
return
});
}
if (activeStep.value < stepTitles.length - 1) {
activeStep.value++
}
}
/** 打开弹窗 */
const open = async (type, row) => {
isVisible.value = true

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: [],
@@ -376,6 +376,12 @@ watch(
},
{ deep: true }
)
watch(() => form.value.spName, (newVal) => {
if (newVal) {
form.value.quTitle = newVal
}
})
watch(
() => [form.value.quNumbers, form.value.quScores],
() => {

View File

@@ -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"
@@ -105,7 +113,46 @@ const open = async (type, row) => {
})
}
defineExpose({ open })
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++
}
}
const handleCancel = () => {
isVisible.value = false
}

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>