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