diff --git a/src/views/monitor/monitor/index.vue b/src/views/monitor/monitor/index.vue index 74ab4c9..211dfc6 100644 --- a/src/views/monitor/monitor/index.vue +++ b/src/views/monitor/monitor/index.vue @@ -175,7 +175,7 @@ - + diff --git a/src/views/task/exam/components/steps/step1/components/step-edit.vue b/src/views/task/exam/components/steps/step1/components/step-edit.vue index 385898a..e25f2ed 100644 --- a/src/views/task/exam/components/steps/step1/components/step-edit.vue +++ b/src/views/task/exam/components/steps/step1/components/step-edit.vue @@ -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], () => { diff --git a/src/views/task/exam/components/task-edit.vue b/src/views/task/exam/components/task-edit.vue index 63dca09..f3acd8b 100644 --- a/src/views/task/exam/components/task-edit.vue +++ b/src/views/task/exam/components/task-edit.vue @@ -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 diff --git a/src/views/task/selftrans/ai/components/task-edit.vue b/src/views/task/selftrans/ai/components/task-edit.vue index e21ece9..bc234ad 100644 --- a/src/views/task/selftrans/ai/components/task-edit.vue +++ b/src/views/task/selftrans/ai/components/task-edit.vue @@ -21,7 +21,15 @@ - + +
+ + ← 上一步 + + + 下一步 → + +
{ }) } 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 } diff --git a/src/views/task/selftrans/collegeexam/components/steps/step1/components/step-edit.vue b/src/views/task/selftrans/collegeexam/components/steps/step1/components/step-edit.vue index fc00e83..eec693a 100644 --- a/src/views/task/selftrans/collegeexam/components/steps/step1/components/step-edit.vue +++ b/src/views/task/selftrans/collegeexam/components/steps/step1/components/step-edit.vue @@ -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], () => { diff --git a/src/views/task/selftrans/collegeexam/components/task-add.vue b/src/views/task/selftrans/collegeexam/components/task-add.vue index 9223018..a22202b 100644 --- a/src/views/task/selftrans/collegeexam/components/task-add.vue +++ b/src/views/task/selftrans/collegeexam/components/task-add.vue @@ -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 }) \ No newline at end of file diff --git a/src/views/task/selftrans/collegeexam/components/task-edit.vue b/src/views/task/selftrans/collegeexam/components/task-edit.vue index e21ece9..5682c74 100644 --- a/src/views/task/selftrans/collegeexam/components/task-edit.vue +++ b/src/views/task/selftrans/collegeexam/components/task-edit.vue @@ -21,7 +21,15 @@ - + +
+ + ← 上一步 + + + 下一步 → + +
{ + // 如果下一步是考场设置(第四步),提前校验 + 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 diff --git a/src/views/task/selftrans/module/components/steps/step1/components/step-edit.vue b/src/views/task/selftrans/module/components/steps/step1/components/step-edit.vue index 7d8499d..091ff8d 100644 --- a/src/views/task/selftrans/module/components/steps/step1/components/step-edit.vue +++ b/src/views/task/selftrans/module/components/steps/step1/components/step-edit.vue @@ -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], () => { diff --git a/src/views/task/selftrans/module/components/task-add.vue b/src/views/task/selftrans/module/components/task-add.vue index 486dc23..26bb91b 100644 --- a/src/views/task/selftrans/module/components/task-add.vue +++ b/src/views/task/selftrans/module/components/task-add.vue @@ -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 }) \ No newline at end of file diff --git a/src/views/task/selftrans/module/components/task-edit.vue b/src/views/task/selftrans/module/components/task-edit.vue index 47225d6..423ee52 100644 --- a/src/views/task/selftrans/module/components/task-edit.vue +++ b/src/views/task/selftrans/module/components/task-edit.vue @@ -21,7 +21,15 @@ - + +
+ + ← 上一步 + + + 下一步 → + +
{ + // 如果下一步是考场设置(第四步),提前校验 + 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 diff --git a/src/views/task/selftrans/random/components/steps/step1/components/step-edit.vue b/src/views/task/selftrans/random/components/steps/step1/components/step-edit.vue index 17cf8eb..145548f 100644 --- a/src/views/task/selftrans/random/components/steps/step1/components/step-edit.vue +++ b/src/views/task/selftrans/random/components/steps/step1/components/step-edit.vue @@ -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], () => { diff --git a/src/views/task/selftrans/random/components/task-add.vue b/src/views/task/selftrans/random/components/task-add.vue index 2240003..fd3c9c0 100644 --- a/src/views/task/selftrans/random/components/task-add.vue +++ b/src/views/task/selftrans/random/components/task-add.vue @@ -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 }) \ No newline at end of file diff --git a/src/views/task/selftrans/random/components/task-edit.vue b/src/views/task/selftrans/random/components/task-edit.vue index bca8961..257a173 100644 --- a/src/views/task/selftrans/random/components/task-edit.vue +++ b/src/views/task/selftrans/random/components/task-edit.vue @@ -21,7 +21,15 @@ - + +
+ + ← 上一步 + + + 下一步 → + +
{ + // 如果下一步是考场设置(第四步),提前校验 + 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 diff --git a/src/views/task/sprint/components/steps/step1/components/step-edit.vue b/src/views/task/sprint/components/steps/step1/components/step-edit.vue index 2b6246a..22efd3c 100644 --- a/src/views/task/sprint/components/steps/step1/components/step-edit.vue +++ b/src/views/task/sprint/components/steps/step1/components/step-edit.vue @@ -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], () => { diff --git a/src/views/task/sprint/components/task-edit.vue b/src/views/task/sprint/components/task-edit.vue index 63dca09..bd28a34 100644 --- a/src/views/task/sprint/components/task-edit.vue +++ b/src/views/task/sprint/components/task-edit.vue @@ -21,7 +21,15 @@ - + +
+ + ← 上一步 + + + 下一步 → + +
{ }) } 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 } diff --git a/src/views/task/trans/components/steps/step1/components/step-edit.vue b/src/views/task/trans/components/steps/step1/components/step-edit.vue index d99c88b..81d8465 100644 --- a/src/views/task/trans/components/steps/step1/components/step-edit.vue +++ b/src/views/task/trans/components/steps/step1/components/step-edit.vue @@ -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], () => { diff --git a/src/views/task/trans/components/task-edit.vue b/src/views/task/trans/components/task-edit.vue index 37ff456..e4c6a51 100644 --- a/src/views/task/trans/components/task-edit.vue +++ b/src/views/task/trans/components/task-edit.vue @@ -22,6 +22,15 @@ + +
+ + ← 上一步 + + + 下一步 → + +
{ 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++ + } +} +